Inheritance: implements Sulu\Component\SmartContent\DataProviderInterface
コード例 #1
0
ファイル: MediaDataProvider.php プロジェクト: sulu/sulu
 public function __construct(DataProviderRepositoryInterface $repository, CollectionManagerInterface $collectionManager, SerializerInterface $serializer, RequestStack $requestStack)
 {
     parent::__construct($repository, $serializer);
     $this->configuration = self::createConfigurationBuilder()->enableTags()->enableCategories()->enableLimit()->enablePagination()->enablePresentAs()->enableDatasource('media-datasource@sulumedia', ['rootUrl' => '/admin/api/collections?sortBy=title&limit=9999&locale={locale}&include-root=true', 'selectedUrl' => '/admin/api/collections/{datasource}?tree=true&sortBy=title&locale={locale}&include-root=true', 'resultKey' => 'collections'])->getConfiguration();
     $this->requestStack = $requestStack;
     $this->collectionManager = $collectionManager;
 }
コード例 #2
0
 /**
  * {@inheritdoc}
  */
 protected function getSerializationContext()
 {
     return parent::getSerializationContext()->setGroups(['fullAccount', 'partialContact']);
 }