silverstripe-blog/code/admin/GridFieldFormAction.php

31 lines
540 B
PHP
Raw Permalink Normal View History

2015-04-21 06:47:46 +02:00
<?php
2015-11-21 07:17:29 +01:00
class GridFieldFormAction extends GridField_FormAction
{
/**
* @var array
*/
protected $extraAttributes = array();
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
);
}
}