<?php
/**
 * @package     DOCman
 * @copyright   Copyright (C) 2019 Timble CVBA. (http://www.timble.net)
 * @license     GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
 * @link        http://www.joomlatools.com
 */

namespace Foliolabs\Docman\Admin;

use Foliolabs\Component\Tags;
use Foliolabs\Library;

class ControllerTag extends Tags\ControllerTag
{
    protected function _initialize(Library\ObjectConfig $config)
    {
        $config->append([
            'behaviors' => [
                'editable',
                'restrictable' => [
                    'redirect_url' => 'admin.php?page=docman-settings'
                ],
                'persistable'
            ],
            'formats'   => ['json'],
            'toolbars'  => [
                'menubar',
                'com:docman.controller.toolbar.tag'
            ]
        ]);

        parent::_initialize($config);
    }
}
