diff -u b/content_entity_example/content_entity_example.info.yml b/content_entity_example/content_entity_example.info.yml --- b/content_entity_example/content_entity_example.info.yml +++ b/content_entity_example/content_entity_example.info.yml @@ -3,2 +3,3 @@ description: 'Provides ContentEntityExample entity.' +package: Example modules core: 8.x diff -u b/content_entity_example/content_entity_example.module b/content_entity_example/content_entity_example.module --- b/content_entity_example/content_entity_example.module +++ b/content_entity_example/content_entity_example.module @@ -6,6 +6,14 @@ */ /** + * @defgroup content_entity_example Example: Content Entity + * @ingroup examples + * @{ + * Example of how to define a content entity. + * } + */ + +/** * Implements hook_menu_link_defaults(). */ function content_entity_example_menu_link_defaults() { diff -u b/content_entity_example/lib/Drupal/content_entity_example/ContentEntityExampleInterface.php b/content_entity_example/lib/Drupal/content_entity_example/ContentEntityExampleInterface.php --- b/content_entity_example/lib/Drupal/content_entity_example/ContentEntityExampleInterface.php +++ b/content_entity_example/lib/Drupal/content_entity_example/ContentEntityExampleInterface.php @@ -10,6 +10,7 @@ use Drupal\user\EntityOwnerInterface; /** * Provides an interface defining a ContentEntityExample entity. + * @ingroup content_entity_example */ interface ContentEntityExampleInterface extends ContentEntityInterface, EntityOwnerInterface { diff -u b/content_entity_example/lib/Drupal/content_entity_example/Entity/ContentEntityExample.php b/content_entity_example/lib/Drupal/content_entity_example/Entity/ContentEntityExample.php --- b/content_entity_example/lib/Drupal/content_entity_example/Entity/ContentEntityExample.php +++ b/content_entity_example/lib/Drupal/content_entity_example/Entity/ContentEntityExample.php @@ -14,12 +14,14 @@ /** * Defines the ContentEntityExample entity. * + * @ingroup content_entity_example + * * @ContentEntityType( * id = "content_entity_example", * label = @Translation("ContentEntityExample entity"), * controllers = { * "view_builder" = "Drupal\Core\Entity\EntityViewBuilder", - * "list" = "Drupal\content_entity_example\Entity\Controller\ContentEntityExampleListController", + * "list_builder" = "Drupal\content_entity_example\Entity\Controller\ContentEntityExampleListController", * * "form" = { * "add" = "Drupal\content_entity_example\Entity\Form\ContentEntityExampleFormController", diff -u b/content_entity_example/lib/Drupal/content_entity_example/Entity/Controller/ContentEntityExampleListController.php b/content_entity_example/lib/Drupal/content_entity_example/Entity/Controller/ContentEntityExampleListController.php --- b/content_entity_example/lib/Drupal/content_entity_example/Entity/Controller/ContentEntityExampleListController.php +++ b/content_entity_example/lib/Drupal/content_entity_example/Entity/Controller/ContentEntityExampleListController.php @@ -8,12 +8,14 @@ namespace Drupal\content_entity_example\Entity\Controller; use Drupal\Core\Entity\EntityInterface; -use Drupal\Core\Entity\EntityListController; +use Drupal\Core\Entity\EntityListBuilder; /** * Provides a list controller for content_entity_example entity. + * + * @ingroup content_entity_example */ -class ContentEntityExampleListController extends EntityListController { +class ContentEntityExampleListController extends EntityListBuilder { /** * {@inheritdoc} diff -u b/content_entity_example/lib/Drupal/content_entity_example/Entity/Form/ContentEntityExampleDeleteForm.php b/content_entity_example/lib/Drupal/content_entity_example/Entity/Form/ContentEntityExampleDeleteForm.php --- b/content_entity_example/lib/Drupal/content_entity_example/Entity/Form/ContentEntityExampleDeleteForm.php +++ b/content_entity_example/lib/Drupal/content_entity_example/Entity/Form/ContentEntityExampleDeleteForm.php @@ -11,6 +11,8 @@ /** * Provides a form for deleting a content_entity_example entity. + * + * @ingroup content_entity_example */ class ContentEntityExampleDeleteForm extends ContentEntityConfirmFormBase { diff -u b/content_entity_example/lib/Drupal/content_entity_example/Entity/Form/ContentEntityExampleFormController.php b/content_entity_example/lib/Drupal/content_entity_example/Entity/Form/ContentEntityExampleFormController.php --- b/content_entity_example/lib/Drupal/content_entity_example/Entity/Form/ContentEntityExampleFormController.php +++ b/content_entity_example/lib/Drupal/content_entity_example/Entity/Form/ContentEntityExampleFormController.php @@ -11,13 +11,15 @@ /** * Form controller for the content_entity_example entity edit forms. + * + * @ingroup content_entity_example */ class ContentEntityExampleFormController extends ContentEntityFormController { /** - * Overrides Drupal\Core\Entity\EntityFormController::form(). + * Overrides Drupal\Core\Entity\EntityFormController::buildForm(). */ - public function form(array $form, array &$form_state) { + public function builForm(array $form, array &$form_state) { /* @var $entity \Drupal\content_entity_example\Entity\ContentEntityExample */ $form = parent::form($form, $form_state); $entity = $this->entity; diff -u b/content_entity_example/lib/Drupal/content_entity_example/Form/ContentEntityExampleSettingsForm.php b/content_entity_example/lib/Drupal/content_entity_example/Form/ContentEntityExampleSettingsForm.php --- b/content_entity_example/lib/Drupal/content_entity_example/Form/ContentEntityExampleSettingsForm.php +++ b/content_entity_example/lib/Drupal/content_entity_example/Form/ContentEntityExampleSettingsForm.php @@ -8,6 +8,11 @@ use Drupal\Core\Form\FormBase; +/** + * Class ContentEntityExampleSettingsForm. + * @package Drupal\content_entity_example\Form + * @ingroup content_entity_example + */ class ContentEntityExampleSettingsForm extends FormBase { /** * Returns a unique string identifying the form. diff -u b/content_entity_example/lib/Drupal/content_entity_example/Tests/ContentEntityExampleTest.php b/content_entity_example/lib/Drupal/content_entity_example/Tests/ContentEntityExampleTest.php --- b/content_entity_example/lib/Drupal/content_entity_example/Tests/ContentEntityExampleTest.php +++ b/content_entity_example/lib/Drupal/content_entity_example/Tests/ContentEntityExampleTest.php @@ -9,12 +9,18 @@ use Drupal\simpletest\WebTestBase; +/** + * Class ContentEntityExampleTest. + * @package Drupal\content_entity_example\Tests + * + * @ingroup content_entity_example + */ class ContentEntityExampleTest extends WebTestBase { public static $modules = array('content_entity_example'); /** - * Implements getinfo(). + * {@inheritdoc} */ public static function getInfo() { return array( @@ -31,6 +37,7 @@ public function testContentEntityExample() { // Listing menu not visible without permission. + $this->drupalGet('/'); $this->assertNoText('Content Entity Example Listing', 'The listing menu appears on the page');