本文整理汇总了PHP中Plugin::Admin方法的典型用法代码示例。如果您正苦于以下问题:PHP Plugin::Admin方法的具体用法?PHP Plugin::Admin怎么用?PHP Plugin::Admin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Plugin
的用法示例。
在下文中一共展示了Plugin::Admin方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __
/**
* Pages plugin
*
* @package Monstra
* @subpackage Plugins
* @author Romanenko Sergey / Awilum
* @copyright 2012-2014 Romanenko Sergey / Awilum
* @version 1.0.0
*
*/
// Register plugin
Plugin::register(__FILE__, __('Pages', 'pages'), __('Pages manager', 'pages'), '1.0.0', 'Awilum', 'http://monstra.org/', 'pages', 'box');
if (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin', 'editor'))) {
// Include Admin
Plugin::Admin('pages', 'box');
}
// Add Plugin Javascript
Javascript::add('plugins/box/pages/js/pages.js', 'backend');
/**
* Pages Class
*/
class Pages extends Frontend
{
/**
* Current page data
*
* @var object
*/
public static $page = null;
/**
示例2: __
<?php
/**
* Information plugin
*
* @package Monstra
* @subpackage Plugins
* @author Romanenko Sergey / Awilum
* @copyright 2012-2014 Romanenko Sergey / Awilum
* @version 1.0.0
*
*/
// Register plugin
Plugin::register(__FILE__, __('Information', 'information'), __('Information plugin', 'information'), '1.0.0', 'Awilum', 'http://monstra.org/', null, 'box');
if (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin'))) {
// Include Information Admin
Plugin::Admin('information', 'box');
}
示例3: __
/**
* Users plugin
*
* @package Monstra
* @subpackage Plugins
* @author Romanenko Sergey / Awilum
* @copyright 2012-2014 Romanenko Sergey / Awilum
* @version 1.0.0
*
*/
// Register plugin
Plugin::register(__FILE__, __('Users', 'users'), __('Users manager', 'users'), '1.0.0', 'Awilum', 'http://monstra.org/', 'users', 'box');
if (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin', 'editor'))) {
// Include Users Admin
Plugin::Admin('users', 'box');
}
// Add Plugin Javascript
Javascript::add('plugins/box/users/js/users.js', 'backend');
/**
* Users class
*/
class Users extends Frontend
{
/**
* Users table
*/
public static $users = null;
/**
* Sandbox main function
*/
示例4: __
*
* Provides CRUD for events and different output possibilities for event lists
*
* @package Monstra
* @subpackage Plugins
* @author Andreas Müller | devmount <mail@devmount.de>
* @license MIT
* @version 0.1.2016-01-02
* @link https://github.com/devmount-monstra/events
*
*/
// Register plugin
Plugin::register(__FILE__, __('Events'), __('Event management for Monstra.'), '0.1.2016-01-02', 'devmount', 'http://devmount.de');
// Include plugin admin
if (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin', 'editor'))) {
Plugin::Admin('events');
}
// Add shortcode
Shortcode::add('events', 'Events::_shortcode');
// Add CSS and JavaScript
Action::add('theme_footer', 'Events::_insertJS');
Action::add('theme_header', 'Events::_insertCSS');
// register repository classes
require_once 'repositories/repository.events.php';
require_once 'repositories/repository.categories.php';
require_once 'repositories/repository.locations.php';
/**
* Events class
*
* <code>
* <?php Events::listEvents('list', 'minimal', 'future', 5, 'ASC'); ?>
示例5: __
* http://api.jquery.com/slidetoggle
*
* Generates content, that slide-toggles further content on click.
*
* @package Monstra
* @subpackage Plugins
* @author Andreas Müller | devmount <mail@devmount.de>
* @license MIT
* @link https://github.com/devmount-monstra/toggle
*
*/
// Register plugin
Plugin::register(__FILE__, __('Toggle', 'toggle'), __('Toggle plugin for Monstra.', 'toggle'), '1.3', 'devmount', 'http://devmount.de');
// Include plugin admin
if (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin', 'editor'))) {
Plugin::Admin('toggle');
}
// Shortcode: {toggle click="some link text" toggle="some toggle content"}
Shortcode::add('toggle', 'Toggle::_shortcode');
// Add CSS and JavaScript
Action::add('theme_footer', 'Toggle::_insertJS');
Action::add('theme_header', 'Toggle::_insertCSS');
/**
* Toggle class
*
* Usage: <?php Toggle::show('What is life, the universe and everything?', '42'); ?>
*
*/
class Toggle
{
/**
示例6: __
<?php
/**
* System plugin
*
* @package Monstra
* @subpackage Plugins
* @author Romanenko Sergey / Awilum
* @copyright 2012-2014 Romanenko Sergey / Awilum
* @version 1.0.0
*
*/
// Register plugin
Plugin::register(__FILE__, __('System', 'system'), __('System plugin', 'system'), '1.0.0', 'Awilum', 'http://monstra.org/', null, 'box');
if (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin', 'editor'))) {
// Admin top navigation
Navigation::add(__('Welcome, :username', 'system', array(':username' => Session::get('user_login'))), 'top', 'users&action=edit&user_id=' . Session::get('user_id'), 1, Navigation::TOP, false);
Navigation::add(__('View Site', 'system'), 'top', Option::get('siteurl'), 2, Navigation::TOP, true);
Navigation::add(__('Log Out', 'users'), 'top', '&logout=do', 3, Navigation::TOP, false);
if (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin'))) {
Navigation::add(__('Settings', 'system'), 'system', 'system', 1);
}
}
Plugin::Admin('system', 'box');