本文整理匯總了PHP中Sonata\AdminBundle\Admin\Admin::getExportFields方法的典型用法代碼示例。如果您正苦於以下問題:PHP Admin::getExportFields方法的具體用法?PHP Admin::getExportFields怎麽用?PHP Admin::getExportFields使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Sonata\AdminBundle\Admin\Admin
的用法示例。
在下文中一共展示了Admin::getExportFields方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getExportFields
public function getExportFields()
{
$translations = array();
foreach ($this->getConfigurationPool()->getContainer()->getParameter('locales') as $locale) {
$translations[$locale] = "contentTranslations[{$locale}]";
}
$fields = array_merge(parent::getExportFields(), $translations);
$fields = array_diff($fields, ['content', 'translations']);
return $fields;
}
示例2: getExportFields
/**
* {@inheritdoc}
*/
public function getExportFields()
{
// avoid security field to be exported
return array_filter(parent::getExportFields(), function ($v) {
return !in_array($v, array('password', 'salt'));
});
}
示例3: getExportFields
/**
* {@inheritDoc}
*/
public function getExportFields()
{
$exportFields = parent::getExportFields();
$exportFields[] = 'totalBeforeTaxes';
return $exportFields;
}