/* (non-PHPdoc)
@see \n2n\persistence\orm\store\action\ActionQueue::getOrCreatePersistAction()
164687
public function getOrCreatePersistAction($entity) {
		$this->removeActionPool->removeAction($entity);
		return $this->persistActionPool->getOrCreateAction($entity);
	}
304664
public function getPersistenceHelper()
    {
        if (null === $this->persistenceHelper) {
            $this->persistenceHelper = new Doctrine\ORM\PersistenceHelper(
                $this->em,
                $this->getPersistenceEventQueue()
            );
        }

        return $this->persistenceHelper;
    }
251636
public function getRequestHandlerBuilder(){
        if(null === $this->requestHandlerBuilder){
            $this->requestHandlerBuilder    = new RequestHandlerBuilder(
                $this->getContainer()
            );

            foreach($this->bundles as $bundle){
                if($bundle instanceof Bundle\MiddlewareRegisterInterface){
                    $bundle->middlewareRegister($this->requestHandlerBuilder);
                }
            }
        }

        return clone $this->requestHandlerBuilder;
    }
1345496
public function createItem()
	{
		$context = $this->_getContext();
		$priceManager = MShop_Factory::createManager( $context, 'price' );
		$values = array('siteid'=> $context->getLocale()->getSiteId());

		$base = $this->_createItem($priceManager->createItem(), clone $context->getLocale(), $values);

		$pluginManager = MShop_Factory::createManager( $context, 'plugin' );
		$pluginManager->register( $base, 'order' );

		return $base;
	}
474935
public function getPersistenceEventQueue()
    {
        if (null === $this->persistenceEventQueue) {
            $this->persistenceEventQueue = new Persistence\PersistenceEventQueue(
                $this->getConfigurationRegistry(),
                $this->getEventDispatcher()
            );
        }

        return $this->persistenceEventQueue;
    }
79431
public function build(): SetProduceCompilationCacheRequest
	{
		$instance = new SetProduceCompilationCacheRequest();
		if ($this->enabled === null) {
			throw new BuilderException('Property [enabled] is required.');
		}
		$instance->enabled = $this->enabled;
		return $instance;
	}
78552
public function getOrCreateRemoveAction($entity) {
		$this->persistActionPool->removeAction($entity);
		return $this->removeActionPool->getOrCreateAction($entity);
	}
373179
public function supplyPersistAction(PersistAction $persistingJob, $value, ValueHash $valueHash, ?ValueHash $oldValueHash) {
		$fileManager = $this->lookupFileManager($persistingJob->getActionQueue()->getEntityManager());
		
		$oldValue = null; 
		if ($oldValueHash !== null) {
			$oldValue = $oldValueHash->getHash();
		}
		
		$oldQualifiedName = null;
		if ($oldValueHash !== null && 2 == count($parts = explode(self::FM_FILE_VH_SEPERATOR, $oldValue, 2))) {
			$oldQualifiedName = $parts[1];
		}
		
		if ($value === null) {
			if ($this->cascadeDelete && $oldQualifiedName !== null) {
				$fileManager->removeByQualifiedName($oldQualifiedName);
			}
			
			$persistingJob->getMeta()->setRawValue($this->getEntityModel(), $this->columnName, null);
			return;
		}
		
		$qualifiedName = $fileManager->persist($value, $this->fileLocator);
		CastUtils::assertTrue($valueHash instanceof CommonValueHash);
		$valueHash->setHash($this->createHash($qualifiedName));
		
		if ($this->cascadeDelete && $oldQualifiedName !== null && $oldQualifiedName !== $qualifiedName) {
			$fileManager->removeByQualifiedName($oldQualifiedName);
		}
		
		$persistingJob->getMeta()->setRawValue($this->getEntityModel(), $this->columnName, $qualifiedName);
	}
353704
public function createResolver()
    {
        $resolver = $this->getResolver();
        if (isset($resolver)) {
            $resolver_class = get_class($resolver);

        // Create new retriever.
        $retriever = $resolver->getUriRetriever();
            if (isset($retriever)) {
                $retriever_class = get_class($retriever);
                $new_retriever = new $retriever_class();
            } else {
                $new_retriever = new UriRetriever();
            }

        // Store max depth before init since maxDepth is set on the parent.
        $max_depth = $resolver::$maxDepth;

        // Create new resolver.
        $new_resolver = new $resolver_class($new_retriever);

        // Sync public static properties.
        $new_resolver::$maxDepth = $max_depth;
        } else {
            $new_retriever = new UriRetriever();
            $new_resolver = new RefResolver($new_retriever);
        }

        return $new_resolver;
    }
1230454
protected function create()
	{
		// Only allow creation with new object, otherwise: clone first, create later
		if ( ! $this->is_new())
		{
			return false;
		}

		$this->observe('before_insert');

		// Set all current values
		$query = Query::forge(get_called_class(), static::connection(true));
		$primary_key = static::primary_key();
		$properties  = array_keys(static::properties());
		foreach ($properties as $p)
		{
			if ( ! (in_array($p, $primary_key) and is_null($this->{$p})))
			{
				$query->set($p, $this->{$p});
			}
		}

		// Insert!
		$id = $query->insert();

		// when there's one PK it might be auto-incremented, get it and set it
		if (count($primary_key) == 1 and $id !== false)
		{
			$pk = reset($primary_key);
			// only set it if it hasn't been set manually
			is_null($this->{$pk}) and $this->{$pk} = $id;
		}

		// update the original properties on creation and cache object for future retrieval in this request
		$this->_is_new = false;
		$this->_original = $this->_data;
		static::$_cached_objects[get_class($this)][static::implode_pk($this)] = $this;

		$this->observe('after_insert');

		return $id !== false;
	}
944759
public function processCreateDraft(FormActionEvent $event)
    {
        /** @var $createContentDraft \EzSystems\RepositoryForms\Data\Content\CreateContentDraftData */
        $createContentDraft = $event->getData();

        $contentInfo = $this->contentService->loadContentInfo($createContentDraft->contentId);
        $versionInfo = $this->contentService->loadVersionInfo($contentInfo, $createContentDraft->fromVersionNo);
        $contentDraft = $this->contentService->createContentDraft($contentInfo, $versionInfo);
        $referrerLocation = $event->getOption('referrerLocation');

        $event->setPayload('content', $contentDraft);
        $event->setPayload('is_new', $contentDraft->contentInfo->isDraft());

        $contentEditUrl = $this->router->generate('ez_content_draft_edit', [
            'contentId' => $contentDraft->id,
            'versionNo' => $contentDraft->getVersionInfo()->versionNo,
            'language' => $contentDraft->contentInfo->mainLanguageCode,
            'locationId' => null !== $referrerLocation ? $referrerLocation->id : null,
        ]);
        $event->setResponse(new RedirectResponse($contentEditUrl));
    }
333176
public function cloneQueryBuilder()
    {
        $paramContent = $this->newParamName();
        
        $subQuery = clone $this->queryBuilder;
        $subQuery->resetDQLParts();
        $subQuery->setParameters([]);
        $subQuery->select($paramContent)->from('OpiferCmsBundle:Content', $paramContent);

        return $subQuery;
    }
1344810
public function createComponentPaginator()
	{
		/**
		 * Init paginator
		 */
		$component = new Components\DataGridPaginator\DataGridPaginator(
			$this->getTranslator(),
			static::$icon_prefix
		);
		$paginator = $component->getPaginator();

		$paginator->setPage($this->page);
		$paginator->setItemsPerPage($this->getPerPage());

		if ($this->custom_paginator_template) {
			$component->setTemplateFile($this->custom_paginator_template);
		}

		return $component;
	}
645740
function createOrganizer() {
    $cnt = count( $this->organizer );
    if( 0 >= $cnt )
      return;
    $attributes = $this->_createParams( $this->organizer['params']
                                      , array( 'CN', 'DIR', 'LANGUAGE', 'SENT-BY' ));
    $content    = 'MAILTO:'.$this->organizer['value'];
    return $this->_createElement( 'ORGANIZER', $attributes, $content );
  }
1315775
public function create()
    {
        /**
         * @var Store $store
         */
        $classNamespace = $this->getEntityNamespace();
        $store = new $classNamespace();
        $store
            ->setIsCompany(true)
            ->setRoutingStrategy(StoreRoutingStrategy::STRATEGY_PREFIX_EXCEPT_DEFAULT)
            ->setEnabled(true)
            ->setCreatedAt($this->now());

        return $store;
    }
898284
public function create()
    {
        $syncLevel = $this->scopeConfig->getValue(
            \Dotdigitalgroup\Email\Helper\Config::XML_PATH_CONNECTOR_SYNC_CATALOG_VALUES
        );

        if ($syncLevel == self::SYNC_CATALOG_DEFAULT_LEVEL) {
            return $this->defaultLevelCatalogSyncerFactory->create();
        } elseif ($syncLevel == self::SYNC_CATALOG_STORE_LEVEL) {
            return $this->storeLevelCatalogSyncerFactory->create();
        }

        return null;
    }
940806
protected function getPHPCreatorInstance()
    {
        if ( empty( self::$PHPCreator ) )
        {
            self::$PHPCreator = new eZPHPCreator( eZDIR::path( array( eZSys::storageDirectory(),
                                                                      ezfSolrDocumentFieldName::LOOKUP_FILEDIR ) ),
                                                  ezfSolrDocumentFieldName::LOOKUP_FILENAME );
        }

        return self::$PHPCreator;
    }