class ImceHelpController in IMCE 8.2
Same name and namespace in other branches
- 8 src/Controller/ImceHelpController.php \Drupal\imce\Controller\ImceHelpController
Controller routines for help routes.
Hierarchy
- class \Drupal\Core\Controller\ControllerBase implements ContainerInjectionInterface uses LoggerChannelTrait, MessengerTrait, LinkGeneratorTrait, RedirectDestinationTrait, UrlGeneratorTrait, StringTranslationTrait
- class \Drupal\imce\Controller\ImceHelpController
Expanded class hierarchy of ImceHelpController
1 file declares its use of ImceHelpController
- imce.module in ./
imce.module - Defines Drupal hooks for imce module.
File
- src/
Controller/ ImceHelpController.php, line 13
Namespace
Drupal\imce\ControllerView source
class ImceHelpController extends ControllerBase {
/**
* The current route match.
*
* @var \Drupal\Core\Routing\RouteMatchInterface
*/
protected $routeMatch;
/**
* The list of available modules.
*
* @var \Drupal\Core\Extension\ModuleExtensionList
*/
protected $extensionListModule;
/**
* Creates a new HelpController.
*
* @param \Drupal\Core\Routing\RouteMatchInterface $route_match
* The current route match.
* @param \Drupal\Core\Extension\ModuleExtensionList $extension_list_module
* The list of available modules.
*/
public function __construct(RouteMatchInterface $route_match, ModuleExtensionList $extension_list_module) {
$this->routeMatch = $route_match;
$this->extensionListModule = $extension_list_module;
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container) {
return new static($container
->get('current_route_match'), $container
->get('extension.list.module'));
}
/**
* {@inheritdoc}
*/
public function index() {
$build = [];
$build['#theme'] = 'imce_help';
$build['#title'] = 'Imce File Manager Help';
$build['#markup'] = static::htmlHelp();
$build['#videos'][1]['title'] = 'IMCE with CKEditor in Drupal 8';
$build['#videos'][1]['video'] = 'https://www.youtube.com/embed/wnOmlvG4tRo';
$build['#videos'][2]['title'] = 'Integration IMCE with image/file field in Drupal 8';
$build['#videos'][2]['video'] = 'https://www.youtube.com/embed/MAHonUyKVc0';
return $build;
}
/**
* Returns html help.
*/
public static function htmlHelp() {
return '
<h3>' . t('About') . '</h3>
<p>' . t('IMCE is an image/file uploader and browser that supports personal directories and quota.') . '</p>
<h3>Menu Integration</h3>
<p>Create a custom menu item with /imce path.</p>
<h3>CKEditor Iintegration</h3>
<ol>
<li type="1">' . t('Go to Administration > Configuration > Content Authoring > Text formats and editors > and <b>edit</b> a text format that uses CKEditor.') . '</li>
<li type="1">' . t('Enable CKEditor image button without image uploads.') . '</li>
</ol>
<p><b>Note:</b> Image uploads must be disabled in order for IMCE link appear in the image
dialog. There is also an image button provided by Imce but it can\'t be used for
editing existing images.</p>
<h3>BUEditor Integration</h3>
<ol>
<li type="1">' . t('Edit your editor at /admin/config/content/bueditor') . '</li>
<li type="1">' . t('Select Imce File Manager as the File browser under Settings.') . '</li>
</ol>
<h3>File/Image Field Integration</h3>
<ol>
<li type="1">' . t('Go to form settings of your content type.') . '<br/>Ex: /admin/structure/types/manage/article/form-display.</li>
<li type="1">' . t('Edit widget settings of a file/image field.') . '</li>
<li type="1">' . t('Check the box saying "Allow users to select files from Imce File Manager
for this field." and save.') . '</li>
<li type="1">' . t('You should now see the "Open File Browser" link above the upload widget
in the content form.') . '</li>
</ol>';
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ControllerBase:: |
protected | property | The configuration factory. | |
ControllerBase:: |
protected | property | The current user service. | 1 |
ControllerBase:: |
protected | property | The entity form builder. | |
ControllerBase:: |
protected | property | The entity manager. | |
ControllerBase:: |
protected | property | The entity type manager. | |
ControllerBase:: |
protected | property | The form builder. | 2 |
ControllerBase:: |
protected | property | The key-value storage. | 1 |
ControllerBase:: |
protected | property | The language manager. | 1 |
ControllerBase:: |
protected | property | The module handler. | 2 |
ControllerBase:: |
protected | property | The state service. | |
ControllerBase:: |
protected | function | Returns the requested cache bin. | |
ControllerBase:: |
protected | function | Retrieves a configuration object. | |
ControllerBase:: |
private | function | Returns the service container. | |
ControllerBase:: |
protected | function | Returns the current user. | 1 |
ControllerBase:: |
protected | function | Retrieves the entity form builder. | |
ControllerBase:: |
protected | function | Retrieves the entity manager service. | |
ControllerBase:: |
protected | function | Retrieves the entity type manager. | |
ControllerBase:: |
protected | function | Returns the form builder service. | 2 |
ControllerBase:: |
protected | function | Returns a key/value storage collection. | 1 |
ControllerBase:: |
protected | function | Returns the language manager service. | 1 |
ControllerBase:: |
protected | function | Returns the module handler. | 2 |
ControllerBase:: |
protected | function |
Returns a redirect response object for the specified route. Overrides UrlGeneratorTrait:: |
|
ControllerBase:: |
protected | function | Returns the state storage service. | |
ImceHelpController:: |
protected | property | The list of available modules. | |
ImceHelpController:: |
protected | property | The current route match. | |
ImceHelpController:: |
public static | function |
Instantiates a new instance of this class. Overrides ControllerBase:: |
|
ImceHelpController:: |
public static | function | Returns html help. | |
ImceHelpController:: |
public | function | ||
ImceHelpController:: |
public | function | Creates a new HelpController. | |
LinkGeneratorTrait:: |
protected | property | The link generator. | 1 |
LinkGeneratorTrait:: |
protected | function | Returns the link generator. | |
LinkGeneratorTrait:: |
protected | function | Renders a link to a route given a route name and its parameters. | |
LinkGeneratorTrait:: |
public | function | Sets the link generator service. | |
LoggerChannelTrait:: |
protected | property | The logger channel factory service. | |
LoggerChannelTrait:: |
protected | function | Gets the logger for a specific channel. | |
LoggerChannelTrait:: |
public | function | Injects the logger channel factory. | |
MessengerTrait:: |
protected | property | The messenger. | 29 |
MessengerTrait:: |
public | function | Gets the messenger. | 29 |
MessengerTrait:: |
public | function | Sets the messenger. | |
RedirectDestinationTrait:: |
protected | property | The redirect destination service. | 1 |
RedirectDestinationTrait:: |
protected | function | Prepares a 'destination' URL query parameter for use with \Drupal\Core\Url. | |
RedirectDestinationTrait:: |
protected | function | Returns the redirect destination service. | |
RedirectDestinationTrait:: |
public | function | Sets the redirect destination service. | |
StringTranslationTrait:: |
protected | property | The string translation service. | 1 |
StringTranslationTrait:: |
protected | function | Formats a string containing a count of items. | |
StringTranslationTrait:: |
protected | function | Returns the number of plurals supported by a given language. | |
StringTranslationTrait:: |
protected | function | Gets the string translation service. | |
StringTranslationTrait:: |
public | function | Sets the string translation service to use. | 2 |
StringTranslationTrait:: |
protected | function | Translates a string to the current language or to a given language. | |
UrlGeneratorTrait:: |
protected | property | The url generator. | |
UrlGeneratorTrait:: |
protected | function | Returns the URL generator service. | |
UrlGeneratorTrait:: |
public | function | Sets the URL generator service. | |
UrlGeneratorTrait:: |
protected | function | Generates a URL or path for a specific route based on the given parameters. |