getParams() public méthode

parameter of property.
public getParams ( ) : PropertyParameter[]
Résultat PropertyParameter[]
 /**
  * @param PropertyInterface $property
  *
  * @return array
  */
 public function getParamsFunction($property)
 {
     $typeParams = [];
     if ($this->contentTypeManager->has($property->getContentTypeName())) {
         $type = $this->getTypeFunction($property->getContentTypeName());
         $typeParams = $type->getDefaultParams();
     }
     return $this->mergeRecursive($typeParams, $property->getParams());
 }
Exemple #2
0
 /**
  * Returns provider for given property.
  *
  * @param PropertyInterface $property
  *
  * @return DataProviderInterface
  */
 private function getProvider(PropertyInterface $property)
 {
     $params = $property->getParams();
     // default fallback to content
     $providerAlias = 'content';
     if (array_key_exists('provider', $params)) {
         $providerAlias = $params['provider']->getValue();
     }
     return $this->dataProviderPool->get($providerAlias);
 }
 /**
  * parameter of property.
  *
  * @return array
  */
 public function getParams()
 {
     return $this->property->getParams();
 }
 /**
  * {@inheritDoc}
  */
 public function getContentData(PropertyInterface $property)
 {
     $data = $property->getValue();
     $params = $this->getParams($property->getParams());
     $types = $params['types']->getValue();
     $container = new MediaSelectionContainer(isset($data['config']) ? $data['config'] : [], isset($data['displayOption']) ? $data['displayOption'] : '', isset($data['ids']) ? $data['ids'] : [], $property->getStructure()->getLanguageCode(), $types, $this->mediaManager);
     return $container->getData();
 }
Exemple #5
0
 /**
  * {@inheritdoc}
  */
 public function getContentData(PropertyInterface $property)
 {
     $data = $property->getValue();
     $container = new InternalLinksContainer(isset($data) ? $data : [], $this->contentQueryExecutor, $this->contentQueryBuilder, array_merge($this->getDefaultParams(), $property->getParams()), $this->logger, $property->getStructure()->getWebspaceKey(), $property->getStructure()->getLanguageCode(), $this->showDrafts);
     return $container->getData();
 }
Exemple #6
0
 /**
  * {@inheritDoc}
  */
 public function getContentData(PropertyInterface $property)
 {
     $params = array_merge($this->getDefaultParams(), $property->getParams());
     $data = $property->getValue();
     $container = new SmartContentContainer($this->contentQuery, $this->contentQueryBuilder, $this->tagManager, $params, $property->getStructure()->getWebspaceKey(), $property->getStructure()->getLanguageCode(), null, $this->stopwatch);
     $container->setConfig($data === null || !is_array($data) ? [] : $data);
     $pages = $this->loadData($container, $property, $params);
     $data['page'] = $container->getPage();
     $data['hasNextPage'] = $container->getHasNextPage();
     $property->setValue($data);
     return $pages;
 }
Exemple #7
0
 /**
  * Returns snippets with given property value.
  */
 private function getSnippets(PropertyInterface $property)
 {
     /** @var PageBridge $page */
     $page = $property->getStructure();
     $webspaceKey = $page->getWebspaceKey();
     $locale = $page->getLanguageCode();
     $shadowLocale = null;
     if ($page->getIsShadow()) {
         $shadowLocale = $page->getShadowBaseLanguage();
     }
     $refs = $property->getValue();
     $ids = $this->getUuids($refs);
     $snippetType = $this->getParameterValue($property->getParams(), 'snippetType');
     $default = $this->getParameterValue($property->getParams(), 'default', false);
     if (empty($ids) && $snippetType && $default && $this->defaultEnabled) {
         $ids = [$this->defaultSnippetManager->loadIdentifier($webspaceKey, $snippetType)];
         // to filter null default snippet
         $ids = array_filter($ids);
     }
     return $this->snippetResolver->resolve($ids, $webspaceKey, $locale, $shadowLocale);
 }