diff --git a/contextual_links_example/contextual_links_example.module b/contextual_links_example/contextual_links_example.module index 6e8eb6f..48f635e 100644 --- a/contextual_links_example/contextual_links_example.module +++ b/contextual_links_example/contextual_links_example.module @@ -6,6 +6,7 @@ * * @see https://www.drupal.org/docs/8/api/menu-api/providing-module-defined-contextual-links */ + /** * @defgroup contextual_links_example Example: Contextual Links * @ingroup examples @@ -30,14 +31,16 @@ * 1appearing on the frontend. * * @see https://www.drupal.org/docs/8/api/menu-api/providing-module-defined-contextual-links - * @endlink - * + * @endlink */ + /** * Implements hook_theme(). + * * Register a module or theme's theme implementations.The implementations * declared by this hook specify how a particular render array is to be * rendered as HTML. + * * @see https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Render!theme.api.php/function/hook_theme/8.2.x */ function contextual_links_example_theme() { @@ -58,6 +61,7 @@ function template_preprocess_contextual_links_example_entity(&$variables) { $variables['title'] = $variables['element']['#object']->titleContent(); $variables['content'] = $variables['element']['#object']->bodyContent(); } + /** * @} End of "defgroup contextual_links_example Example: Contextual Links". */ diff --git a/contextual_links_example/src/Controller/CLEController.php b/contextual_links_example/src/Controller/CLEController.php index 22eb20e..32f9079 100644 --- a/contextual_links_example/src/Controller/CLEController.php +++ b/contextual_links_example/src/Controller/CLEController.php @@ -5,12 +5,13 @@ namespace Drupal\contextual_links_example\Controller; use Drupal\contextual_links_example\Entity\CLEEntity; use Drupal\Core\Controller\ControllerBase; use Drupal\examples\Utility\DescriptionTemplateTrait; + /** * Controller routines for contextual example routes. */ class CLEController extends ControllerBase { -use DescriptionTemplateTrait; + use DescriptionTemplateTrait; /** * {@inheritdoc} @@ -18,6 +19,7 @@ use DescriptionTemplateTrait; protected function getModuleName() { return 'contextual_links_example'; } + /** * Returns a list of CLEEntity objects. */ @@ -28,10 +30,10 @@ use DescriptionTemplateTrait; // Create the renderable array for every CLEEntity. foreach ($entity_ids as $id) { - // To add a contextual link we need to provide the key #contextual_links. - /** - *@see \Drupal\contextual\Element\ContextualLinks.(.). - */ + /* To add a contextual link we need to provide the key #contextual_links. + * + * @see \Drupal\contextual\Element\ContextualLinks.(.). + */ $build[$id] = [ '#theme' => 'contextual_links_example_entity', '#object' => new CLEEntity(['id' => $id], 'contextual_links_example_entity'), diff --git a/contextual_links_example/src/Form/ContextualLinksExampleNodeActionForm.php b/contextual_links_example/src/Form/ContextualLinksExampleNodeActionForm.php index 9c65019..7592ca3 100644 --- a/contextual_links_example/src/Form/ContextualLinksExampleNodeActionForm.php +++ b/contextual_links_example/src/Form/ContextualLinksExampleNodeActionForm.php @@ -11,6 +11,7 @@ use Drupal\node\NodeInterface; * * Creates a form action for the given node in context. Contains the needed * functions for the form and some helper functions. + * * @package Drupal\contextual_links_example\Form */ class ContextualLinksExampleNodeActionForm extends FormBase {