cms-niceties/src/Extensions/CompositeFieldExtension.php

27 lines
629 B
PHP
Raw Normal View History

2021-06-19 21:30:03 +02:00
<?php
namespace A2nt\CMSNiceties\Extensions;
use SilverStripe\Blog\Forms\GridField\GridFieldConfigBlogPost;
use SilverStripe\Core\Extension;
use SilverStripe\Forms\CompositeField;
use SilverStripe\Forms\FieldList;
use SilverStripe\ORM\DataExtension;
class CompositeFieldExtension extends CompositeField
{
public function extraClass()
{
return 'composite '.parent::extraClass();
}
public function getAttributes()
{
$attrs = parent::getAttributes();
unset($attrs['name'], $attrs['type'], $attrs['disabled'], $attrs['readonly'], $attrs['autofocus']);
return $attrs;
}
}