protected function DefaultModuleHelper::factory

7.x-1.x DefaultModuleHelper.php protected DefaultModuleHelper::factory()

The current factory or a lazily created DefaultFactory.

Return value

\Drupal\ooe\Factory\IFactory The currently set factory, otherwise lazily creates a fresh DefaultFactory.

22 calls to DefaultModuleHelper::factory()
AbstractControlledProject::newPageMenuItem in lib/Drupal/ooe/Project/AbstractControlledProject.php
Creates a default new page menu item using the primary page controller.
AbstractProject::blockRegion in lib/Drupal/ooe/Project/AbstractProject.php
If not injected on construction, defaults to the Bartik theme 1st sidebar.
AbstractProject::menuItemSet in lib/Drupal/ooe/Project/AbstractProject.php
Lazily creates and configures a set/group of menu items.
AbstractProject::newBlock in lib/Drupal/ooe/Project/AbstractProject.php
A helper method to assist in implementing @link AbstractBlock::myBlock().
AbstractProject::newMenuItem in lib/Drupal/ooe/Project/AbstractProject.php
Creates a new basic menu item with an explicit .module file callback.

... See full list


lib/Drupal/ooe/Module/DefaultModuleHelper.php, line 115


Classes that need to keep a record of the name of the module they serve may choose to extend this.




protected function factory() {
  // @todo Consider promote and use static myFactory to choose default.
  if (empty($this->factory)) {
    $this->factory = new DefaultFactory($this->getModule());
  return $this->factory;