The problem is that the parameters are stored in the native PHP array and are used on the fly using templates, the DoctrineORM package, etc., so there is no easy way to find an exhaustive list of all of them.
However, I found a solution for a list of almost all ListMapper parameters (some of DatagridMapper , but it is really difficult to distinguish between them).
Here they are:
_sort_order
admin_code
ajax_hidden
association_mapping
code
editable
field_mapping
field_name
field_options
field_type
format
global_search
header_class
header_style
identifier
label
mapping_type
name
operator_options
operator_type
options
parameters
parent_association_mappings
route
route.name
route.parameters
row_align
sort_field_mapping
sort_parent_association_mappings
sortable
timezone
translation_domain
virtual_field
, SonataAdminBundle\Admin\BaseFieldDescription:: getOptions() , isset, unset, getters seters ( ). SonataAdminBundle\Admin\BaseFieldDescription:: getOption ($ name, $default = null).
:
TestBundle\ArrayTest
namespace TestBundle;
class ArrayTest implements \ArrayAccess
{
private $container = array();
private $previousOffset;
public function __construct($array, $previousOffset = null) {
$this->container = $array;
$this->previousOffset = $previousOffset;
}
public function offsetSet($offset, $value) {
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->dump($offset);
$this->container[$offset] = $value;
}
}
public function offsetExists($offset) {
$this->dump($offset);
return isset($this->container[$offset]);
}
public function offsetUnset($offset) {
$this->dump($offset);
unset($this->container[$offset]);
}
public function offsetGet($offset) {
$this->dump($offset);
if (isset($this->container[$offset])) {
if (is_array($this->container[$offset])) {
$newOffset = ($this->previousOffset ?: '').$offset.'.';
if ($newOffset === 'route.parameter.') {
return $this->container[$offset];
}
return new ArrayTest($this->container[$offset], $newOffset);
}
return $this->container[$offset];
}
return null;
}
private function dump($offset)
{
$offset = ($this->previousOffset ?: '').$offset;
file_put_contents("/tmp/toto.txt", $offset."\n", FILE_APPEND);
}
}
SonataAdminBundle\Admin\BaseFieldDescription:: getOption ($ name, $default = null)
public function getOption($name, $default = null)
{
file_put_contents("/tmp/toto.txt", $name."\n", FILE_APPEND);
return isset($this->options[$name]) ? $this->options[$name] : $default;
}
SonataAdminBundle\Admin\BaseFieldDescription:: getOptions()
: getOptions ($ fakeArray = true)
public function getOptions($fakeArray = true)
{
if ($fakeArray) {
return new \TestBundle\ArrayTest($this->options);
}
return $this->options;
}
\DoctrineORMAdminBundle\Builder\DatagridBuilder:: addFilter (DatagridInterface $datagrid, $type, FieldDescriptionInterface $fieldDescription, AdminInterface $admin)
129:
$filter = $this->filterFactory->create($fieldDescription->getName(), $type, $fieldDescription->getOptions());
$filter = $this->filterFactory->create($fieldDescription->getName(), $type, $fieldDescription->getOptions(false));
cat /tmp/toto.txt | sort -u, .
, SonataUserBundle. , (, ).
N.B.: Symfony 2.8.11, SonataAdminBundle 3.8.0, SonataDoctrineORMAdminBundle 3.1.0 SonataUserBundle 3.0.1.