You are here

class Generic in Form mode manager 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/EntityRoutingMap/Generic.php \Drupal\form_mode_manager\Plugin\EntityRoutingMap\Generic

Class Generic routing entity mapper.

Plugin annotation


@EntityRoutingMap(
  id = "generic",
  label = @Translation("Generic Routes properties"),
)

Hierarchy

Expanded class hierarchy of Generic

File

src/Plugin/EntityRoutingMap/Generic.php, line 15

Namespace

Drupal\form_mode_manager\Plugin\EntityRoutingMap
View source
class Generic extends EntityRoutingMapBase {

  /**
   * {@inheritdoc}
   */
  public function setOperations() {
    $operations = [
      'add_form' => "entity.{$this->targetEntityType}.add_form",
      'edit_form' => "entity.{$this->targetEntityType}.edit_form",
      'add_page' => "{$this->targetEntityType}.add_page",
    ];
    $this->pluginDefinition['operations'] += $operations;
  }

  /**
   * {@inheritdoc}
   */
  public function defaultConfiguration() {
    return [
      'entityTypeId' => '',
    ] + parent::defaultConfiguration();
  }

}

Members

Namesort descending Modifiers Type Description Overrides
EntityRoutingMapBase::$defaultFormClass protected property Default form class Definition name.
EntityRoutingMapBase::$editFormClass protected property Default editing form class Definition name.
EntityRoutingMapBase::$label protected property Plugin label.
EntityRoutingMapBase::$targetEntityType protected property Entity type id of entity.
EntityRoutingMapBase::calculateDependencies public function Calculates dependencies for the configured plugin. Overrides DependentPluginInterface::calculateDependencies
EntityRoutingMapBase::create public static function Creates an instance of the plugin. Overrides ContainerFactoryPluginInterface::create
EntityRoutingMapBase::getConfiguration public function Gets this plugin's configuration. Overrides ConfigurablePluginInterface::getConfiguration
EntityRoutingMapBase::getDefaultFormClass public function Get the default form class Definition. Overrides EntityRoutingMapInterface::getDefaultFormClass
EntityRoutingMapBase::getEditFormClass public function Get the edit form class Definition. Overrides EntityRoutingMapInterface::getEditFormClass
EntityRoutingMapBase::getOperation public function Return the form operation route for given operation. Overrides EntityRoutingMapInterface::getOperation
EntityRoutingMapBase::getOperations public function Return the form operation route mapping. Overrides EntityRoutingMapInterface::getOperations
EntityRoutingMapBase::getTargetEntityType public function Gets the target entity type. Overrides EntityRoutingMapInterface::getTargetEntityType
EntityRoutingMapBase::label public function Returns the display label. Overrides EntityRoutingMapInterface::label
EntityRoutingMapBase::setConfiguration public function Sets the configuration for this plugin instance. Overrides ConfigurablePluginInterface::setConfiguration
EntityRoutingMapBase::setDefaultFormClass public function Set the default form class Definition. Overrides EntityRoutingMapInterface::setDefaultFormClass
EntityRoutingMapBase::setEditFormClass public function Set the edit form class Definition. Overrides EntityRoutingMapInterface::setEditFormClass
EntityRoutingMapBase::setTargetEntityType public function Set the target entity type. Overrides EntityRoutingMapInterface::setTargetEntityType
EntityRoutingMapBase::__construct public function Constructs display plugin. Overrides PluginBase::__construct
Generic::defaultConfiguration public function Gets default configuration for this plugin. Overrides EntityRoutingMapBase::defaultConfiguration
Generic::setOperations public function Set a mapping of operations for Generic plugin. Overrides EntityRoutingMapBase::setOperations
PluginBase::$configuration protected property Configuration information passed into the plugin. 1
PluginBase::$pluginDefinition protected property The plugin implementation definition. 1
PluginBase::$pluginId protected property The plugin_id.
PluginBase::DERIVATIVE_SEPARATOR constant A string which is used to separate base plugin IDs from the derivative ID.
PluginBase::getBaseId public function Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface::getBaseId
PluginBase::getDerivativeId public function Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface::getDerivativeId
PluginBase::getPluginDefinition public function Gets the definition of the plugin implementation. Overrides PluginInspectionInterface::getPluginDefinition 3
PluginBase::getPluginId public function Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface::getPluginId
PluginBase::isConfigurable public function Determines if the plugin is configurable.
StringTranslationTrait::$stringTranslation protected property The string translation service. 1
StringTranslationTrait::formatPlural protected function Formats a string containing a count of items.
StringTranslationTrait::getNumberOfPlurals protected function Returns the number of plurals supported by a given language.
StringTranslationTrait::getStringTranslation protected function Gets the string translation service.
StringTranslationTrait::setStringTranslation public function Sets the string translation service to use. 2
StringTranslationTrait::t protected function Translates a string to the current language or to a given language.