for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php namespace Anomaly\Streams\Platform\Ui\Table\Component\View;
use Anomaly\Streams\Platform\Ui\Table\TableBuilder;
/**
* Class ViewDefaults
*
* @link http://anomaly.is/streams-platform
* @author AnomalyLabs, Inc. <[email protected]>
* @author Ryan Thompson <[email protected]>
* @package Anomaly\Streams\Platform\Ui\Table\Component\View
*/
class ViewDefaults
{
* Default table views.
* @param TableBuilder $builder
public function defaults(TableBuilder $builder)
if (!$stream = $builder->getTableStream()) {
return;
}
if ($stream->isTrashable() && !$builder->getViews() && !$builder->isAjax()) {
$builder->setViews(
[
'all',
'trash'
]
);