Skip to content

Instantly share code, notes, and snippets.

@RyanThompson
Last active August 29, 2015 14:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RyanThompson/1f71012ca664fbfb7fa5 to your computer and use it in GitHub Desktop.
Save RyanThompson/1f71012ca664fbfb7fa5 to your computer and use it in GitHub Desktop.
An example of property normalization and overriding.
<?php namespace Acme\Foo\Table;
use Anomaly\Streams\PlatTable\Ui\Table\TableBuilder;
class FooTableBuilder extends TableBuilder
{
/**
* The table buttons.
*/
protected $buttons = [
'delete',
'delete' => [
'text' => 'DELETE ME!'
],
[
'handler' => 'Anomaly\Streams\Platform\Ui\Table\Component\Button\Handler\Delete@handle',
'text' => 'streams::button.delete',
'icon' => 'trash',
'type' => 'danger',
'attributes' => [
'data-toggle' => 'confirm',
'data-message' => 'streams::message.confirm_delete'
]
]
];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment