Retrieve the secondary menu group factory.

@throws RuntimeException If the secondary menu group factory was not previously set.
@return FactoryInterface
7674
protected function secondaryMenu()
    {
        if (!isset($this->secondaryMenu)) {
            throw new RuntimeException(sprintf(
                'Secondary Menu Group Factory is not defined for "%s"',
                get_class($this)
            ));
        }

        return $this->secondaryMenu;
    }
658139
public function getHeaderFactory()
    {
        if ($this->headerFactory === null) {
            $this->headerFactory = new HeaderFactory($this->getConsumerService());
        }
        return $this->headerFactory;
    }
1151125
protected function propertyFactory()
    {
        if ($this->propertyFactory === null) {
            throw new RuntimeException(sprintf(
                'Model [%s] does not have a property factory.',
                get_class($this)
            ));
        }

        return $this->propertyFactory;
    }
336992
public function getEntityService()
    {
        if (null === $this->entityService) {
            $entityServiceClass = $this->getEntityServiceClass();
            if (!class_exists($entityServiceClass)) {
                throw new \RuntimeException("Classe $entityServiceClass inexistente!");
            }
            $this->entityService = new $entityServiceClass();
            $this->entityService->setServiceLocator($this->getServiceLocator());
        }

        return $this->entityService;
    }
393206
public final function getFactory()
    {
        $calledClass = get_called_class();
        if (empty(self::$factories[$calledClass])) {
            self::$factories[$calledClass] = $this->getDefaultFactory();
        }

        return self::$factories[$calledClass];
    }
247540
protected function widgetFactory()
    {
        if ($this->widgetFactory === null) {
            throw new RuntimeException(sprintf(
                'Widget Factory is not defined for "%s"',
                get_class($this)
            ));
        }

        return $this->widgetFactory;
    }
450625
public function proto()
    {
        $objType = $this->objType();
        if (!$objType) {
            throw new RuntimeException('Can not create prototype, object type is undefined');
        }

        return $this->modelFactory()->get($objType);
    }
1107057
public function getMenu()
    {
        if (!$this->menu) {

            foreach ($this->getAllMenus() as $menu) {
                $menu->configureTopMenu($this);
            }
        }

        return parent::getMenu();
    }
830012
public function getConfigsFactory() {
		if ($this->_configsFactory === null) {
			if ($this instanceof LocatorAwareInterface && $this->hasLocator()) {
				$this->_configsFactory = $this->getLocator()->get('configsFactory');
				
				if (! $this->_configsFactory instanceof FactoryInterface) {
					throw new NoConfigsFactory('Configs\' factory must implement the "FactoryInterface"');
				}
			} else {
				throw new NoConfigsFactory('No configs\' factory been supplied, also unable to obtain one through locator');
			}
		}
		
		return $this->_configsFactory;
	}
1223647
public static function getFactory()
    {
        if (self::$nb_provider_factory === null) {
            self::$nb_provider_factory = new CNabuProviderFactory();
            self::$nb_provider_factory->init();
        }

        return self::$nb_provider_factory;
    }
505205
public function getAuthFactory(): ?Factory
    {
        if (!$this->hasAuthFactory()) {
            $this->setAuthFactory($this->getDefaultAuthFactory());
        }
        return $this->authFactory;
    }
378259
public static function getInstance()
    {
        if (is_null(self::$instance)) {
            throw new \RuntimeException('You must first create the singleton instance with createInstance().');
        }
        self::$instance->setGlobalsFromSugar();
        self::$instance->chdirToSugarDir();

        return self::$instance;
    }
379341
protected function getFactory(): FactoryInterface
    {
        if ($this->container instanceof FactoryInterface) {
            return $this->container;
        }

        return $this->container->get(FactoryInterface::class);
    }
1067706
public function obj()
    {
        if ($this->obj === null) {
            $formGroup = $this->formGroup();
            if ($formGroup instanceof self) {
                $prop = $formGroup->storageProperty();
                $val  = $formGroup->obj()->propertyValue($prop->ident());

                $this->obj = $prop->structureVal($val, [ 'default_data' => true ]);
                if ($this->obj === null) {
                    $this->obj = clone $prop->structureProto();
                }
            } elseif ($this->form() instanceof ObjectContainerInterface) {
                $this->obj = $this->form()->obj();
            }

            if ($this->obj === null) {
                throw new RuntimeException(sprintf(
                    'The [%1$s] widget has no data model.',
                    static::CLASS
                ));
            }
        }

        return $this->obj;
    }
511228
public function getRuntimeConfigurableWrapper()
    {
        if ($this->wrapper === null) {
            $this->wrapper = new RuntimeConfigurable($this, $this->getTaskName());
        }

        return $this->wrapper;
    }
498649
public function getQueueFactory(): ?Factory
    {
        if (!$this->hasQueueFactory()) {
            $this->setQueueFactory($this->getDefaultQueueFactory());
        }
        return $this->queueFactory;
    }
857005
protected function factory()
    {
        if (empty($this->factory)) {
            $this->config->theme($this->getView()->getTheme());
            $this->factory = new Factory($this->config);
        }

        return $this->factory;
    }