|
@@ -416,6 +416,13 @@ abstract class AbstractAdmin implements AdminInterface, DomainObjectInterface
|
|
|
|
|
|
protected $cacheIsGranted = array();
|
|
protected $cacheIsGranted = array();
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * Action list for the search result.
|
|
|
|
+ *
|
|
|
|
+ * @var string[]
|
|
|
|
+ */
|
|
|
|
+ protected $searchResultActions = array('edit', 'show');
|
|
|
|
+
|
|
protected $listModes = array(
|
|
protected $listModes = array(
|
|
'list' => array(
|
|
'list' => array(
|
|
'class' => 'fa fa-list fa-fw',
|
|
'class' => 'fa fa-list fa-fw',
|
|
@@ -2823,6 +2830,20 @@ abstract class AbstractAdmin implements AdminInterface, DomainObjectInterface
|
|
/**
|
|
/**
|
|
* @param FormMapper $form
|
|
* @param FormMapper $form
|
|
*/
|
|
*/
|
|
|
|
+ final public function getSearchResultLink($object)
|
|
|
|
+ {
|
|
|
|
+ foreach ($this->searchResultActions as $action) {
|
|
|
|
+ if ($this->hasRoute($action) && $this->isGranted(strtoupper($action), $object)) {
|
|
|
|
+ return $this->generateObjectUrl($action, $object);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * {@inheritdoc}
|
|
|
|
+ */
|
|
protected function configureFormFields(FormMapper $form)
|
|
protected function configureFormFields(FormMapper $form)
|
|
{
|
|
{
|
|
}
|
|
}
|