The class Sonata\AdminBundle\Admin\Admin has been deprecated: since version 3.1, to be removed in 4.0. Use Sonata\AdminBundle\AbstractAdmin instead
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated annotation
18
class StaticReferenceAdmin extends /** @scrutinizer ignore-deprecated */ Admin
Loading history...
19
{
20
/**
21
* @{inheritDoc}
22
*/
23
public function configureListFields(ListMapper $listMapper)
24
{
25
$listMapper
26
->add('machine_name')
27
->add(
28
'_action',
29
'actions',
30
array(
31
'actions' => array(
32
'show' => array(),
33
'edit' => array(),
34
'delete' => array()
35
)
36
)
37
);
38
}
39
40
/**
41
* @{inheritDoc}
42
*/
43
protected function configureFormFields(FormMapper $form)
44
{
45
if ($this->getSubject()->getId()) {
46
$form
47
->add('machine_name')
48
->add(
49
'translations',
50
'sonata_type_collection',
51
array(),
52
array(
53
'edit' => 'inline',
54
'inline' => 'table',
55
)
56
);
57
} else {
58
$form
59
->add('machine_name');
60
}
61
}
62
63
/**
64
* @{inheritDoc}
65
*/
66
protected function configureShowFields(ShowMapper $show)