2015-04-21 16:47:46 +12:00
|
|
|
<?php
|
|
|
|
|
2015-11-21 19:17:29 +13:00
|
|
|
class GridFieldFormAction extends GridField_FormAction
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $extraAttributes = array();
|
2015-04-21 16:47:46 +12:00
|
|
|
|
2015-11-21 19:17:29 +13:00
|
|
|
/**
|
|
|
|
* @param array $attributes
|
|
|
|
*/
|
|
|
|
public function setExtraAttributes(array $attributes)
|
|
|
|
{
|
|
|
|
$this->extraAttributes = $attributes;
|
|
|
|
}
|
2015-04-21 16:47:46 +12:00
|
|
|
|
2015-11-21 19:17:29 +13:00
|
|
|
/**
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function getAttributes()
|
|
|
|
{
|
|
|
|
$attributes = parent::getAttributes();
|
2015-04-21 16:47:46 +12:00
|
|
|
|
2015-11-21 19:17:29 +13:00
|
|
|
return array_merge(
|
|
|
|
$attributes,
|
|
|
|
$this->extraAttributes
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|