eZ Publish の Controller まわり
特定ロケーションの viewCache の破棄
$this->container->get( 'ezpublish.http_cache.purger' )->purge( $locationId );
すべての viewCache の破棄
$this->container->get( 'ezpublish.http_cache.purger' )->purgeAll();
子のロケーション ID の取得
$currentLocation = $locationService->loadLocation( $locationId );
$currentLocationChildren = $locationService->loadLocationChildren(
$currentLocation, $offset = 0, $limit = -1
);
$childrenLocatinoId = array();
foreach ( $currentLocationChildren->locations as $childLocation )
{
$childrenLocatinoId[] = $childLocation->contentInfo->mainLocationId;
}
認証済みユーザーの確認
$securityToken = $this->container->get('security.context')->getToken();
$userAuth = $securityToken->isAuthenticated(); // return true or false
Symfony ロケールを eZ Publish に変換
$symfonyLocale = $this->getRequest()->get( '_locale' );
$localeConverter = $this->container->get( 'ezpublish.locale.converter' );
$ezLocale = $ezLocale = $localeConverter->convertToEz( $symfonyLocale );
Author And Source
この問題について(eZ Publish の Controller まわり), 我々は、より多くの情報をここで見つけました https://qiita.com/bezeklik/items/6644ffb38e9f833a0754著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .