Sulu\Bundle\MediaBundle\Controller\MediaController::getFieldDescriptors PHP Method

getFieldDescriptors() protected method

Returns field-descriptors for media.
protected getFieldDescriptors ( string $locale, boolean $all = true ) : Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface[]
$locale string
$all boolean
return Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface[]
    protected function getFieldDescriptors($locale, $all = true)
    {
        return $this->get('sulu_core.list_builder.field_descriptor_factory')->getFieldDescriptorForClass($this->getParameter('sulu.model.media.class'), ['locale' => $locale], $all ? null : DoctrineFieldDescriptorInterface::class);
    }