예제 #1
0
<?php

/**
 * UnionCMS Core
 *
 * This file is part of the of the simple cms based on CakePHP 3.
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 *
 * @package   Core
 * @license   MIT
 * @copyright MIT License http://www.opensource.org/licenses/mit-license.php
 * @link      https://github.com/UnionCMS/Core
 * @author    Sergey Kalistratov <*****@*****.**>
 */
use Union\Core\Nav;
use Union\Core\Plugin;
$plugin = 'Union/Core';
Nav::add('sidebar', 'dashboard', ['title' => __d('union', 'Dashboard'), 'weight' => 0, 'icon' => 'dashboard', 'url' => ['plugin' => $plugin, 'controller' => 'Union', 'action' => 'dashboard']]);
Nav::add('sidebar', 'system', ['title' => __d('union', 'System'), 'weight' => 1, 'icon' => 'cog', 'children' => ['global-config' => ['title' => __d('union', 'Global config'), 'url' => ['plugin' => 'Union/Extensions', 'controller' => 'Plugins', 'action' => 'config', Plugin::alias($plugin)]]]]);
예제 #2
0
 /**
  * Test plugin alias.
  *
  * @return void
  */
 public function testAlias()
 {
     $this->assertSame('search', Plugin::alias('Search'));
     $this->assertSame('union-core', Plugin::alias('Union/Core'));
     $this->assertSame('union-community', Plugin::alias('Union\\Community'));
 }
예제 #3
0
<?php

/**
 * UnionCMS Community
 *
 * This file is part of the of the simple cms based on CakePHP 3.
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 *
 * @package   Community
 * @license   MIT
 * @copyright MIT License http://www.opensource.org/licenses/mit-license.php
 * @link      https://github.com/UnionCMS/Community
 * @author    Sergey Kalistratov <*****@*****.**>
 */
use Union\Core\Nav;
use Union\Core\Plugin;
$plugin = 'Union/Community';
Nav::add('sidebar', 'community', ['title' => __d('community', 'Community'), 'weight' => 50, 'icon' => 'group', 'children' => ['roles' => ['title' => __d('community', 'Groups'), 'weight' => 0, 'url' => ['plugin' => $plugin, 'controller' => 'Roles', 'action' => 'index']], 'users' => ['title' => __d('community', 'Users'), 'weight' => 10, 'url' => ['plugin' => $plugin, 'controller' => 'Users', 'action' => 'index']], 'permissions' => ['title' => __d('community', 'Permissions'), 'weight' => 15, 'url' => ['plugin' => $plugin, 'controller' => 'Acl', 'action' => 'permissions']], 'config' => ['title' => __d('union', 'Configure'), 'weight' => 20, 'url' => ['plugin' => 'Union/Extensions', 'controller' => 'Plugins', 'action' => 'config', Plugin::alias($plugin)]]]]);