public function PresentationFormBase::__construct in Isotope (with Masonry and Packery) 8
Construct the PresentationFormBase.
For simple entity forms, there's no need for a constructor. Our Presentation form base, however, requires an entity query factory to be injected into it from the container. We later use this query factory to build an entity query for the exists() method.
Parameters
\Drupal\Core\Entity\Query\QueryFactory $query_factory: An entity query factory for the Presentation entity type.
File
- src/
Form/ PresentationFormBase.php, line 41 - Contains Drupal\isotope\Form\PresentationFormBase.
Class
- PresentationFormBase
- Class PresentationFormBase.
Namespace
Drupal\isotope\FormCode
public function __construct(QueryFactory $query_factory) {
$this->entityQueryFactory = $query_factory;
}