コード例 #1
0
 /**
  * Constructs a new instance.
  *
  * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
  *   The entity manager.
  * @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
  *    The string translator.
  */
 function __construct(EntityManagerInterface $entity_manager, TranslationInterface $string_translation)
 {
     parent::__construct($entity_manager);
     $this->stringTranslation = $string_translation;
 }
コード例 #2
0
 /**
  * Constructs a MenuLinkContentDeleteForm object.
  *
  * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
  *   The entity manager.
  * @param \Drupal\Core\Logger\LoggerChannelFactoryInterface $logger_factory
  *   The logger channel factory.
  */
 public function __construct(EntityManagerInterface $entity_manager, LoggerChannelFactoryInterface $logger_factory)
 {
     parent::__construct($entity_manager);
     $this->logger = $logger_factory->get('menu');
 }
コード例 #3
0
ファイル: NodeDeleteForm.php プロジェクト: alnutile/drunatra
 /**
  * Constructs a NodeDeleteForm object.
  *
  * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
  *   The entity manager.
  * @param \Drupal\Core\Routing\UrlGeneratorInterface $url_generator
  *   The URL generator.
  */
 public function __construct(EntityManagerInterface $entity_manager, UrlGeneratorInterface $url_generator)
 {
     parent::__construct($entity_manager);
     $this->urlGenerator = $url_generator;
 }
コード例 #4
0
 /**
  * Constructs a new instance.
  *
  * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
  *   The entity manager.
  * @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
  *   The string translator.
  * @param \Psr\Log\LoggerInterface $logger
  */
 public function __construct(EntityManagerInterface $entity_manager, TranslationInterface $string_translation, LoggerInterface $logger)
 {
     parent::__construct($entity_manager);
     $this->logger = $logger;
     $this->stringTranslation = $string_translation;
 }