This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Drupal\example_rest\Plugin\rest\resource; | |
use Drupal\Core\Session\AccountProxyInterface; | |
use Drupal\rest\Plugin\ResourceBase; | |
use Drupal\rest\ResourceResponse; | |
use Symfony\Component\DependencyInjection\ContainerInterface; | |
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException; | |
use Psr\Log\LoggerInterface; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Example Rest | |
type: module | |
description: Example module Rest service. | |
core: 8.x | |
package: Example |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Drupal\manage_inventory; | |
use Drupal\Core\Access\AccessResult; | |
use Drupal\Core\Entity\EntityAccessControlHandler; | |
use Drupal\Core\Entity\EntityInterface; | |
use Drupal\Core\Session\AccountInterface; | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Drupal\manage_inventory\Form; | |
use Drupal\Core\Form\FormBase; | |
use Drupal\Core\Form\FormStateInterface; | |
/** | |
* Class InventorySettingsForm. | |
* @package Drupal\manage_inventory\Form |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Drupal\manage_inventory\Entity\Controller; | |
use Drupal\Core\Entity\EntityInterface; | |
use Drupal\Core\Entity\EntityListBuilder; | |
use Drupal\Core\Url; | |
/** | |
* Provides a list controller for content_entity_manage_inventory entity. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Drupal\manage_inventory\Form; | |
use Drupal\Core\Entity\ContentEntityConfirmFormBase; | |
use Drupal\Core\Form\FormStateInterface; | |
use Drupal\Core\Url; | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Drupal\manage_inventory\Form; | |
use Drupal\Core\Entity\ContentEntityForm; | |
use Drupal\Core\Language\Language; | |
use Drupal\Core\Form\FormStateInterface; | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @file | |
* Contains \Drupal\manage_inventory\Entity\Contact. | |
*/ | |
namespace Drupal\manage_inventory\Entity; | |
use Drupal\Core\Entity\EntityStorageInterface; | |
use Drupal\Core\Field\BaseFieldDefinition; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Drupal\manage_inventory; | |
use Drupal\Core\Entity\ContentEntityInterface; | |
use Drupal\user\EntityOwnerInterface; | |
use Drupal\Core\Entity\EntityChangedInterface; | |
/** | |
* Provides an interface defining a Inventory entity. | |
* @ingroup manage_inventory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Define the 'local' links for the module | |
inventory.settings_tab: | |
route_name: manage_inventory.inventory_settings | |
title: Settings | |
base_route: manage_inventory.inventory_settings | |
inventory.view: | |
route_name: entity.content_entity_manage_inventory.canonical | |
base_route: entity.content_entity_manage_inventory.canonical |