for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* (c) FSi sp. z o.o. <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace FSi\Bundle\AdminBundle\Admin\ResourceRepository;
use FSi\Bundle\AdminBundle\Admin\AbstractElement;
use Symfony\Component\OptionsResolver\OptionsResolver;
abstract class GenericResourceElement extends AbstractElement implements Element
{
* {@inheritdoc}
public function getRoute()
return 'fsi_admin_resource';
}
public function getRouteParameters()
return [
'element' => $this->getId(),
];
public function getSuccessRoute()
return $this->getRoute();
public function getSuccessRouteParameters()
return $this->getRouteParameters();
abstract public function getKey();
* @return array
public function getResourceFormOptions()
return [];
public function configureOptions(OptionsResolver $resolver)
$resolver->setDefaults([
'template' => null,
]);
$resolver->setAllowedTypes('template', ['null', 'string']);