本文整理汇总了PHP中Drupal\Core\Entity\ContentEntityForm::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP ContentEntityForm::__construct方法的具体用法?PHP ContentEntityForm::__construct怎么用?PHP ContentEntityForm::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Drupal\Core\Entity\ContentEntityForm
的用法示例。
在下文中一共展示了ContentEntityForm::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Constructs a MessageForm object.
*
* @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
* The entity manager.
* @param \Drupal\Core\Flood\FloodInterface $flood
* The flood control mechanism.
* @param \Drupal\Core\Language\LanguageManagerInterface $language_manager
* The language manager service.
* @param \Drupal\contact\MailHandlerInterface $mail_handler
* The contact mail handler service.
*/
public function __construct(EntityManagerInterface $entity_manager, FloodInterface $flood, LanguageManagerInterface $language_manager, MailHandlerInterface $mail_handler)
{
parent::__construct($entity_manager);
$this->flood = $flood;
$this->languageManager = $language_manager;
$this->mailHandler = $mail_handler;
}
示例2: __construct
/**
* Constructs a new AddToCartForm object.
*
* @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
* The entity manager.
* @param \Drupal\commerce_cart\CartManagerInterface $cart_manager
* The cart manager.
* @param \Drupal\commerce_cart\CartProviderInterface $cart_provider
* The cart provider.
* @param \Drupal\commerce_store\StoreContextInterface $store_context
* The store context.
*/
public function __construct(EntityManagerInterface $entity_manager, CartManagerInterface $cart_manager, CartProviderInterface $cart_provider, StoreContextInterface $store_context)
{
parent::__construct($entity_manager);
$this->cartManager = $cart_manager;
$this->cartProvider = $cart_provider;
$this->storeContext = $store_context;
}
示例3: __construct
/**
* Constructs a BlockContentForm object.
*
* @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
* The entity manager.
* @param \Drupal\Core\Entity\EntityStorageInterface $block_content_storage
* The custom block storage.
* @param \Drupal\Core\Entity\EntityStorageInterface $block_content_type_storage
* The custom block type storage.
* @param \Drupal\Core\Language\LanguageManagerInterface $language_manager
* The language manager.
*/
public function __construct(EntityManagerInterface $entity_manager, EntityStorageInterface $block_content_storage, EntityStorageInterface $block_content_type_storage, LanguageManagerInterface $language_manager)
{
parent::__construct($entity_manager);
$this->blockContentStorage = $block_content_storage;
$this->blockContentTypeStorage = $block_content_type_storage;
$this->languageManager = $language_manager;
}
示例4: __construct
/**
* Constructs a new instance.
*
* @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
* The entity manager.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* @param \Drupal\Core\Session\AccountInterface $current_user
* @param \Drupal\plugin\Plugin\Plugin\PluginSelector\PluginSelectorManagerInterface $plugin_selector_manager
* @param \Drupal\plugin\PluginType\PluginTypeInterface $payment_method_type
*/
public function __construct(EntityManagerInterface $entity_manager, TranslationInterface $string_translation, AccountInterface $current_user, PluginSelectorManagerInterface $plugin_selector_manager, PluginTypeInterface $payment_method_type)
{
parent::__construct($entity_manager);
$this->currentUser = $current_user;
$this->paymentMethodType = $payment_method_type;
$this->pluginSelectorManager = $plugin_selector_manager;
$this->stringTranslation = $string_translation;
}
示例5: __construct
public function __construct(EntityManagerInterface $entity_manager, FillPdfAdminFormHelperInterface $admin_form_helper,
FillPdfLinkManipulatorInterface $link_manipulator,
EntityHelper $entity_helper, InputHelperInterface $input_helper,
SerializerInterface $fillpdf_serializer, FileSystemInterface $file_system) {
$this->entityManager = $entity_manager;
parent::__construct($this->entityManager);
$this->adminFormHelper = $admin_form_helper;
$this->linkManipulator = $link_manipulator;
$this->entityHelper = $entity_helper;
$this->inputHelper = $input_helper;
$this->serializer = $fillpdf_serializer;
$this->fileSystem = $file_system;
}
示例6: __construct
/**
* Constructs a MenuLinkContentForm object.
*
* @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
* The entity manager.
* @param \Drupal\Core\Menu\MenuParentFormSelectorInterface $menu_parent_selector
* The menu parent form selector service.
* @param \Drupal\Core\Language\LanguageManagerInterface $language_manager
* The language manager.
* @param \Drupal\Core\Path\PathValidatorInterface $path_validator
* The path validator.
*/
public function __construct(EntityManagerInterface $entity_manager, MenuParentFormSelectorInterface $menu_parent_selector, LanguageManagerInterface $language_manager, PathValidatorInterface $path_validator)
{
parent::__construct($entity_manager, $language_manager);
$this->menuParentSelector = $menu_parent_selector;
$this->pathValidator = $path_validator;
}
示例7: __construct
/**
* Constructs a new EntityForm object.
*
* @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
* The entity manager.
* @param \Drupal\Core\Language\LanguageManagerInterface $language_manager
* The language manager.
* @param \Drupal\Core\Entity\Query\QueryFactory $entity_query
* The entity query factory.
*/
public function __construct(EntityManagerInterface $entity_manager, LanguageManagerInterface $language_manager, QueryFactory $entity_query)
{
parent::__construct($entity_manager);
$this->languageManager = $language_manager;
$this->entityQuery = $entity_query;
}
示例8: __construct
/**
* Constructs a new OrderForm object.
*
* @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
* The entity manager.
* @param \Drupal\Core\Datetime\DateFormatterInterface $date_formatter
* The date formatter.
*/
public function __construct(EntityManagerInterface $entity_manager, DateFormatterInterface $date_formatter)
{
parent::__construct($entity_manager);
$this->dateFormatter = $date_formatter;
}
示例9: __construct
/**
* Constructs a MessageEditForm object.
*
* @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
* The entity manager.
* @param \Drupal\Core\Language\LanguageManagerInterface $language_manager
* The language manager service.
*/
public function __construct(EntityManagerInterface $entity_manager, LanguageManagerInterface $language_manager)
{
parent::__construct($entity_manager);
$this->languageManager = $language_manager;
}
示例10: __construct
/**
* Constructs a MenuLinkContentForm object.
*
* @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
* The entity manager.
* @param \Drupal\Core\Menu\MenuParentFormSelectorInterface $menu_parent_selector
* The menu parent form selector service.
* @param \Drupal\Core\Path\AliasManagerInterface $alias_manager
* The alias manager.
* @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
* The module handler;
* @param \Symfony\Component\Routing\RequestContext $request_context
* The request context.
* @param \Drupal\Core\Language\LanguageManagerInterface $language_manager
* The language manager.
* @param \Drupal\Core\Access\AccessManagerInterface $access_manager
* The access manager.
* @param \Drupal\Core\Session\AccountInterface $account
* The current user.
*/
public function __construct(EntityManagerInterface $entity_manager, MenuParentFormSelectorInterface $menu_parent_selector, AliasManagerInterface $alias_manager, ModuleHandlerInterface $module_handler, RequestContext $request_context, LanguageManagerInterface $language_manager, AccessManagerInterface $access_manager, AccountInterface $account)
{
parent::__construct($entity_manager, $language_manager);
$this->menuParentSelector = $menu_parent_selector;
$this->pathAliasManager = $alias_manager;
$this->moduleHandler = $module_handler;
$this->requestContext = $request_context;
$this->languageManager = $language_manager;
$this->accessManager = $access_manager;
$this->account = $account;
}
示例11: __construct
/**
* Constructs a BookOutlineForm object.
*
* @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
* The entity manager.
* @param \Drupal\book\BookManagerInterface $book_manager
* The BookManager service.
*/
public function __construct(EntityManagerInterface $entity_manager, BookManagerInterface $book_manager)
{
parent::__construct($entity_manager);
$this->bookManager = $book_manager;
}
示例12: __construct
/**
* Constructs a ContentEntityForm object.
*
* @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
* The entity manager.
* @param \Drupal\user\PrivateTempStoreFactory $temp_store_factory
* The factory for the temp store object.
*/
public function __construct(EntityManagerInterface $entity_manager, PrivateTempStoreFactory $temp_store_factory)
{
parent::__construct($entity_manager);
$this->tempStoreFactory = $temp_store_factory;
}
示例13: __construct
/**
* Constructs a new StoreForm object.
*
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
* The entity type manager.
*/
public function __construct(EntityTypeManagerInterface $entity_type_manager)
{
parent::__construct($entity_type_manager);
$this->storage = $entity_type_manager->getStorage('commerce_store');
}
示例14: __construct
/**
* Constructs a registration form.
*
* @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
* The entity manager.
* @param \Drupal\Core\Entity\EntityReferenceSelection\SelectionPluginManager $selection_manager
* The selection plugin manager.
* @param \Drupal\rng\EventManagerInterface $event_manager
* The RNG event manager.
*/
public function __construct(EntityManagerInterface $entity_manager, SelectionPluginManager $selection_manager, EventManagerInterface $event_manager)
{
parent::__construct($entity_manager);
$this->selectionManager = $selection_manager;
$this->eventManager = $event_manager;
}
示例15: __construct
/**
* Constructs a new ShortcutForm instance.
*
* @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
* The entity manager
* @param \Drupal\Core\Path\PathValidatorInterface $path_validator
* The path validator.
*/
public function __construct(EntityManagerInterface $entity_manager, PathValidatorInterface $path_validator)
{
parent::__construct($entity_manager);
$this->pathValidator = $path_validator;
}