silverstripe-blog/src/Admin/GridFieldFormAction.php

35 lines
627 B
PHP
Raw Permalink Normal View History

2015-04-21 06:47:46 +02:00
<?php
namespace SilverStripe\Blog\Admin;
use SilverStripe\Forms\GridField\GridField_FormAction;
2015-11-21 07:17:29 +01:00
class GridFieldFormAction extends GridField_FormAction
{
/**
* @var array
*/
2017-09-14 00:59:01 +02:00
protected $extraAttributes = [];
2015-04-21 06:47:46 +02:00
2015-11-21 07:17:29 +01:00
/**
* @param array $attributes
*/
public function setExtraAttributes(array $attributes)
{
$this->extraAttributes = $attributes;
}
2015-04-21 06:47:46 +02:00
2015-11-21 07:17:29 +01:00
/**
* @return array
*/
public function getAttributes()
{
$attributes = parent::getAttributes();
2015-04-21 06:47:46 +02:00
2015-11-21 07:17:29 +01:00
return array_merge(
$attributes,
$this->extraAttributes
);
}
}