LoginSignup
0
0

More than 5 years have passed since last update.

eZ Publish 5.x の小技

Posted at

eZ Publish 4.x モジュール経由で Symfony サービスを呼び出す

$Module = $Params['Module'];
$Result = array();

$container = ezpKernel::instance()->getServiceContainer();
/** @var \Acme\TestBundle\Controller\AdminController $controller */
$controller = $container->get( 'my.admin.controller' );
$Result['content'] = $controller->myAdminAction( 'blabla' )->getContent();

詳細はこちら: https://gist.github.com/lolautruche/5694727

サイトアクセスから設定を取得

$configResolver = $this->container->get( 'ezpublish.config.resolver' );
$rootLocationId = $configResolver->getParameter( 'content.tree_root.location_id' );
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0