Commit bbd005c8 by Julien Jorry

PageAdmin : add URL to list of pages

parent 4de17b1a
......@@ -112,10 +112,10 @@ class PageAdmin extends AbstractAdmin
$listMapper
->addIdentifier('user', null, ['label' => 'Auteur'])
->addIdentifier('name', null, ['label' => 'Titre'])
// ->add('enabled', null, array(
// 'label' => 'Activé',
// 'editable' => true
// ))
->addIdentifier('url', null, ['label' => 'Url'])
->add('_action', null, [
'actions' => ['edit' => []],
])
;
}
......
......@@ -199,6 +199,11 @@ class Page
return $this;
}
public function getUrl(): string
{
return '/page/'.$this->getSlug();
}
public function __toString(): string
{
return $this->getName()?$this->getName():'Page';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment