Same name in other branches
  1. 2.x src/EntityClone/Config/MenuEntityCloneForm.php \Drupal\entity_clone\EntityClone\Config\MenuEntityCloneForm

Class Menu Entity Clone Form.

Hierarchy

Expanded class hierarchy of MenuEntityCloneForm

1 file declares its use of MenuEntityCloneForm
entity_clone.module in ./entity_clone.module
Contains entity_clone.module.

File

src/EntityClone/Config/MenuEntityCloneForm.php, line 10

Namespace

Drupal\entity_clone\EntityClone\Config
View source
class MenuEntityCloneForm extends ConfigEntityCloneFormBase {
    
    /**
     * {@inheritdoc}
     */
    public function formElement(EntityInterface $entity, $parent = TRUE) {
        $form = parent::formElement($entity, $parent);
        // Menu entities require special replace pattern.
        $form['id']['#machine_name'] += [
            'replace_pattern' => '[^a-z0-9-]+',
            'replace' => '-',
        ];
        return $form;
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
ConfigEntityCloneFormBase::$entityTypeManager protected property The entity type manager.
ConfigEntityCloneFormBase::$translationManager protected property The string translation.
ConfigEntityCloneFormBase::createInstance public static function
ConfigEntityCloneFormBase::getValues public function Get all new values provided by the specific form element. Overrides EntityCloneFormInterface::getValues
ConfigEntityCloneFormBase::__construct public function Constructs a new ConfigEntityCloneFormBase.
MenuEntityCloneForm::formElement public function Get all specific form element. Overrides ConfigEntityCloneFormBase::formElement