Eccube\Controller\Admin\Content\NewsController::index PHP Method

index() public method

新着情報一覧を表示する。
public index ( Application $app, Request $request ) : Response
$app Eccube\Application
$request Symfony\Component\HttpFoundation\Request
return Symfony\Component\HttpFoundation\Response
    public function index(Application $app, Request $request)
    {
        $NewsList = $app['eccube.repository.news']->findBy(array(), array('rank' => 'DESC'));
        $builder = $app->form();
        $event = new EventArgs(array('builder' => $builder, 'NewsList' => $NewsList), $request);
        $app['eccube.event.dispatcher']->dispatch(EccubeEvents::ADMIN_CONTENT_NEWS_INDEX_INITIALIZE, $event);
        $form = $builder->getForm();
        return $app->render('Content/news.twig', array('form' => $form->createView(), 'NewsList' => $NewsList));
    }

Usage Example

Esempio n. 1
0
 /**
  * (non-PHPdoc)
  * @see \Eccube\Controller\Admin\Content\NewsController::index()
  * @deprecated 3.1 delete. use NewsController
  * @param Application $app
  * @return \Symfony\Component\HttpFoundation\Response
  */
 public function index(Application $app)
 {
     return parent::index($app);
 }
All Usage Examples Of Eccube\Controller\Admin\Content\NewsController::index