/** * {@inheritdoc} */ protected function configureRoutes(RouteCollection $collection) { parent::configureRoutes($collection); $collection->add('savePosition', 'save-position'); $collection->add('switchParent', 'switch-parent'); $collection->add('composePreview', '{block_id}/compose_preview', array('block_id' => null)); }
/** * {@inheritDoc) */ public function createQuery($context = 'list') { $query = parent::createQuery($context); // Filter on blocks without page and parents $query->andWhere($query->expr()->isNull($query->getRootAlias() . '.page')); $query->andWhere($query->expr()->isNull($query->getRootAlias() . '.parent')); return $query; }
/** * {@inheritdoc} */ public function getPersistentParameters() { $parameters = parent::getPersistentParameters(); if ($composer = $this->getRequest()->get('composer')) { $parameters['composer'] = $composer; } return $parameters; }