本文整理汇总了PHP中Toolbar::preferences方法的典型用法代码示例。如果您正苦于以下问题:PHP Toolbar::preferences方法的具体用法?PHP Toolbar::preferences怎么用?PHP Toolbar::preferences使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Toolbar
的用法示例。
在下文中一共展示了Toolbar::preferences方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: controller_exec
function controller_exec()
{
global $conf;
if (!authorized()) {
$err_str = 'Access restricted.';
if ($conf['modes']['db']['enabled']) {
$group = $conf['access_limit_to_group'];
Toolbar::title('Databases', 'databases');
Toolbar::preferences('com_databases', '200');
$err_str = "<p class=\"error\">Not authorized, access is limited to \"<em>{$group}</em>\"</p>. <h3>Use the Databases component parameters to change this</h3>";
}
print $err_str;
return;
}
// Get the task
$task = Request::getVar('task', 'list');
$task_file = JPATH_COMPONENT . DS . 'tasks' . DS . $task . '.php';
if (require_once $task_file) {
$task_func = 'dv_' . $task;
if (function_exists($task_func)) {
if (file_exists(JPATH_COMPONENT . DS . 'tasks' . DS . 'html' . DS . $task . '.js')) {
$document = App::get('document');
$document->addScript(DB_PATH . DS . 'tasks' . DS . 'html' . DS . $task . '.js?v=2');
}
$task_func();
}
}
}
示例2: addToolbar
/**
* Add the page title and toolbar.
*
* @since 1.6
*/
protected function addToolbar()
{
$state = $this->get('State');
$canDo = ContentHelper::getActions($this->state->get('filter.category_id'));
Toolbar::title(Lang::txt('COM_CONTENT_FEATURED_TITLE'), 'featured.png');
if ($canDo->get('core.create')) {
Toolbar::addNew('article.add');
}
if ($canDo->get('core.edit')) {
Toolbar::editList('article.edit');
}
if ($canDo->get('core.edit.state')) {
Toolbar::divider();
Toolbar::publish('articles.publish', 'JTOOLBAR_PUBLISH', true);
Toolbar::unpublish('articles.unpublish', 'JTOOLBAR_UNPUBLISH', true);
Toolbar::divider();
Toolbar::archiveList('articles.archive');
Toolbar::checkin('articles.checkin');
Toolbar::custom('featured.delete', 'remove.png', 'remove_f2.png', 'JTOOLBAR_REMOVE', true);
}
if ($state->get('filter.published') == -2 && $canDo->get('core.delete')) {
Toolbar::deleteList('', 'articles.delete', 'JTOOLBAR_EMPTY_TRASH');
Toolbar::divider();
} elseif ($canDo->get('core.edit.state')) {
Toolbar::divider();
Toolbar::trash('articles.trash');
}
if ($canDo->get('core.admin')) {
Toolbar::preferences('com_content');
Toolbar::divider();
}
Toolbar::help('featured');
}
示例3: addToolbar
/**
* Add the page title and toolbar.
*
* @since 1.6
*/
protected function addToolbar()
{
require_once JPATH_COMPONENT . '/helpers/languages.php';
$canDo = LanguagesHelper::getActions();
Toolbar::title(Lang::txt('COM_LANGUAGES_VIEW_LANGUAGES_TITLE'), 'langmanager.png');
if ($canDo->get('core.create')) {
Toolbar::addNew('language.add');
}
if ($canDo->get('core.edit')) {
Toolbar::editList('language.edit');
Toolbar::divider();
}
if ($canDo->get('core.edit.state')) {
if ($this->state->get('filter.published') != 2) {
Toolbar::publishList('languages.publish');
Toolbar::unpublishList('languages.unpublish');
}
}
if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) {
Toolbar::deleteList('', 'languages.delete', 'JTOOLBAR_EMPTY_TRASH');
Toolbar::divider();
} elseif ($canDo->get('core.edit.state')) {
Toolbar::trash('languages.trash');
Toolbar::divider();
}
if ($canDo->get('core.admin')) {
// Add install languages link to the lang installer component
Toolbar::appendButton('Link', 'extension', 'COM_LANGUAGES_INSTALL', 'index.php?option=com_installer&view=languages');
Toolbar::divider();
Toolbar::preferences('com_languages');
Toolbar::divider();
}
Toolbar::help('languages');
}
示例4: addToolbar
/**
* Add the page title and toolbar.
*
* @since 1.6
*/
protected function addToolbar()
{
$state = $this->get('State');
$canDo = NewsfeedsHelper::getActions($state->get('filter.category_id'));
Toolbar::title(Lang::txt('COM_NEWSFEEDS_MANAGER_NEWSFEEDS'), 'newsfeeds.png');
if (count(User::getAuthorisedCategories('com_newsfeeds', 'core.create')) > 0) {
Toolbar::addNew('newsfeed.add');
}
if ($canDo->get('core.edit')) {
Toolbar::editList('newsfeed.edit');
}
if ($canDo->get('core.edit.state')) {
Toolbar::divider();
Toolbar::publish('newsfeeds.publish', 'JTOOLBAR_PUBLISH', true);
Toolbar::unpublish('newsfeeds.unpublish', 'JTOOLBAR_UNPUBLISH', true);
Toolbar::divider();
Toolbar::archiveList('newsfeeds.archive');
}
if ($canDo->get('core.admin')) {
Toolbar::checkin('newsfeeds.checkin');
}
if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) {
Toolbar::deleteList('', 'newsfeeds.delete', 'JTOOLBAR_EMPTY_TRASH');
Toolbar::divider();
} elseif ($canDo->get('core.edit.state')) {
Toolbar::trash('newsfeeds.trash');
Toolbar::divider();
}
if ($canDo->get('core.admin')) {
Toolbar::preferences('com_newsfeeds');
Toolbar::divider();
}
Toolbar::help('JHELP_COMPONENTS_NEWSFEEDS_FEEDS');
}
示例5: addToolbar
/**
* Add the page title and toolbar.
*
* @since 1.6
*/
protected function addToolbar()
{
$canDo = UsersHelper::getActions();
Toolbar::title(Lang::txt('COM_USERS_VIEW_USERS_TITLE'), 'user');
if ($canDo->get('core.create')) {
//Toolbar::addNew('user.add');
}
if ($canDo->get('core.edit')) {
Toolbar::editList('user.edit');
}
if ($canDo->get('core.edit.state')) {
Toolbar::divider();
Toolbar::publish('users.approve', 'COM_USERS_TOOLBAR_APPROVE', true);
Toolbar::unpublish('users.block', 'COM_USERS_TOOLBAR_BLOCK', true);
Toolbar::custom('users.unblock', 'unblock.png', 'unblock_f2.png', 'COM_USERS_TOOLBAR_UNBLOCK', true);
Toolbar::divider();
}
if ($canDo->get('core.delete')) {
Toolbar::deleteList('', 'users.delete');
Toolbar::divider();
}
if ($canDo->get('core.admin')) {
Toolbar::preferences('com_users');
Toolbar::divider();
}
Toolbar::help('users');
}
示例6: addToolbar
/**
* Add the page title and toolbar.
*
* @since 1.6
*/
protected function addToolbar()
{
$state = $this->get('State');
$canDo = ModulesHelper::getActions();
Toolbar::title(Lang::txt('COM_MODULES_MANAGER_MODULES'), 'module.png');
if ($canDo->get('core.create')) {
//Toolbar::addNew('module.add');
Toolbar::appendButton('Popup', 'new', 'JTOOLBAR_NEW', 'index.php?option=com_modules&view=select&tmpl=component', 850, 400);
}
if ($canDo->get('core.edit')) {
Toolbar::editList('module.edit');
}
if ($canDo->get('core.create')) {
Toolbar::custom('modules.duplicate', 'copy.png', 'copy_f2.png', 'JTOOLBAR_DUPLICATE', true);
}
if ($canDo->get('core.edit.state')) {
Toolbar::divider();
Toolbar::publish('modules.publish', 'JTOOLBAR_PUBLISH', true);
Toolbar::unpublish('modules.unpublish', 'JTOOLBAR_UNPUBLISH', true);
Toolbar::divider();
Toolbar::checkin('modules.checkin');
}
if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) {
Toolbar::deleteList('', 'modules.delete', 'JTOOLBAR_EMPTY_TRASH');
Toolbar::divider();
} elseif ($canDo->get('core.edit.state')) {
Toolbar::trash('modules.trash');
Toolbar::divider();
}
if ($canDo->get('core.admin')) {
Toolbar::preferences('com_modules');
Toolbar::divider();
}
Toolbar::help('modules');
}
示例7: addToolbar
/**
* Add the page title and toolbar.
*
* @since 1.6
*/
protected function addToolbar()
{
$state = $this->get('State');
$canDo = TemplatesHelper::getActions();
$isSite = $state->get('filter.client_id') == 0;
Toolbar::title(Lang::txt('COM_TEMPLATES_MANAGER_STYLES'), 'thememanager');
if ($canDo->get('core.edit.state')) {
Toolbar::makeDefault('styles.setDefault', 'COM_TEMPLATES_TOOLBAR_SET_HOME');
Toolbar::divider();
}
if ($canDo->get('core.edit')) {
Toolbar::editList('style.edit');
}
if ($canDo->get('core.create')) {
Toolbar::custom('styles.duplicate', 'copy.png', 'copy_f2.png', 'JTOOLBAR_DUPLICATE', true);
Toolbar::divider();
}
if ($canDo->get('core.delete')) {
Toolbar::deleteList('', 'styles.delete');
Toolbar::divider();
}
if ($canDo->get('core.admin')) {
Toolbar::preferences('com_templates');
Toolbar::divider();
}
Toolbar::help('styles');
}
示例8: addToolbar
/**
* Add the page title and toolbar.
*
* @since 1.6
*/
protected function addToolbar()
{
// Set the titlebar text
Toolbar::title(Lang::txt('COM_MEDIA'), 'mediamanager.png');
// Add a delete button
if (User::authorise('core.delete', 'com_media')) {
$title = Lang::txt('JTOOLBAR_DELETE');
$dhtml = "<a href=\"#\" onclick=\"MediaManager.submit('folder.delete')\" data-title=\"{$title}\">\n\t\t\t\t\t\t<span class=\"icon-32-delete\">{$title}</span>\n\t\t\t\t\t</a>";
Toolbar::appendButton('Custom', $dhtml, 'delete');
Toolbar::divider();
}
// Add a delete button
if (User::authorise('core.admin', 'com_media')) {
Toolbar::preferences('com_media', 450, 800, 'JToolbar_Options', '', 'window.location.reload()');
Toolbar::divider();
}
Toolbar::help('media');
}
示例9: dv_list
function dv_list()
{
global $com_name, $conf;
Toolbar::title(Lang::txt('Database List'), 'databases');
Toolbar::preferences(Request::getcmd('option'), '500');
$base = $conf['dir_base'];
$arry = array();
$list = `cd {$base}; ls ./*/database.json`;
$list = explode("\n", $list);
array_pop($list);
?>
<table class="adminlist">
<thead>
<tr>
<th width="50px">#</th>
<th width="40%">Name</th>
<th>Config</th>
<th width="30%">Data Views</th>
</tr>
</thead>
<tbody>
<?php
$c = 0;
foreach ($list as $item) {
chdir($base);
$id = explode('/', $item);
$id = $id[1];
$db = json_decode(file_get_contents($item), true);
print '<tr>';
print '<td >' . ++$c . '</td>';
print '<td >' . $db['name'] . '</td>';
print '<td><a href="/administrator/index.php?option=com_dataviewer&task=config&db=' . $id . '">Edit Config</a></td>';
print '<td><a href="/administrator/index.php?option=com_dataviewer&task=dataview_list&db=' . $id . '" target="_blank">' . 'Dataviews' . '</a></td>';
print '</tr>';
}
?>
<tbody>
</table>
<?php
}
示例10: addToolbar
/**
* Add the page title and toolbar.
*
* @since 1.6
*/
protected function addToolbar()
{
require_once JPATH_COMPONENT . '/helpers/menus.php';
$canDo = MenusHelper::getActions($this->state->get('filter.parent_id'));
Toolbar::title(Lang::txt('COM_MENUS_VIEW_MENUS_TITLE'), 'menumgr.png');
if ($canDo->get('core.create')) {
Toolbar::addNew('menu.add');
}
if ($canDo->get('core.edit')) {
Toolbar::editList('menu.edit');
}
if ($canDo->get('core.delete')) {
Toolbar::divider();
Toolbar::deleteList('', 'menus.delete');
}
Toolbar::custom('menus.rebuild', 'refresh.png', 'refresh_f2.png', 'JTOOLBAR_REBUILD', false);
if ($canDo->get('core.admin')) {
Toolbar::divider();
Toolbar::preferences('com_menus');
}
Toolbar::divider();
Toolbar::help('menus');
}
示例11: defined
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* HUBzero is a registered trademark of Purdue University.
*
* @package hubzero-cms
* @author Alissa Nedossekina <alisa@purdue.edu>
* @copyright Copyright 2005-2015 HUBzero Foundation, LLC.
* @license http://opensource.org/licenses/MIT MIT
*/
// No direct access
defined('_HZEXEC_') or die;
$canDo = \Components\Jobs\Helpers\Permissions::getActions('job');
Toolbar::title(Lang::txt('COM_JOBS'), 'addedit.png');
if ($canDo->get('core.admin')) {
Toolbar::preferences('com_jobs', '550');
Toolbar::spacer();
}
if ($canDo->get('core.create')) {
Toolbar::addNew();
}
if ($canDo->get('core.edit')) {
Toolbar::editList();
}
if ($canDo->get('core.delete')) {
Toolbar::deleteList();
}
Toolbar::spacer();
Toolbar::help('jobs');
$this->css();
Html::behavior('tooltip');
示例12: defined
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* HUBzero is a registered trademark of Purdue University.
*
* @package hubzero-cms
* @copyright Copyright 2005-2015 HUBzero Foundation, LLC.
* @license http://opensource.org/licenses/MIT MIT
*/
// no direct access
defined('_HZEXEC_') or die;
Toolbar::title(Lang::txt('COM_CACHE_CLEAR_CACHE'), 'clear');
Toolbar::custom('delete', 'delete.png', 'delete_f2.png', 'JTOOLBAR_DELETE', true);
Toolbar::divider();
if (User::authorise('core.admin', 'com_cache')) {
Toolbar::preferences('com_cache');
}
Toolbar::divider();
Toolbar::help('clear');
$listOrder = $this->escape($this->state->get('list.ordering'));
$listDirn = $this->escape($this->state->get('list.direction'));
?>
<form action="<?php
echo Route::url('index.php?option=com_cache');
?>
" method="post" name="adminForm" id="adminForm">
<fieldset id="filter-bar">
<div class="filter-select">
<select name="filter_client_id" class="inputbox" onchange="this.form.submit()">
<?php
示例13: defined
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* HUBzero is a registered trademark of Purdue University.
*
* @package hubzero-cms
* @author Shawn Rice <zooley@purdue.edu>
* @copyright Copyright 2005-2015 HUBzero Foundation, LLC.
* @license http://opensource.org/licenses/MIT MIT
*/
// No direct access
defined('_HZEXEC_') or die;
Toolbar::title(Lang::txt('COM_TOOLS'), 'tools.png');
Toolbar::preferences('com_tools', '550');
Toolbar::spacer();
Toolbar::help('tools');
$this->css();
Html::behavior('tooltip');
?>
<script type="text/javascript">
function submitbutton(pressbutton)
{
var form = document.getElementById('adminForm');
if (pressbutton == 'cancel') {
submitform(pressbutton);
return;
}
// do field validation
示例14: array
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* HUBzero is a registered trademark of Purdue University.
*
* @package hubzero-cms
* @author Shawn Rice <zooley@purdue.edu>
* @copyright Copyright 2005-2015 HUBzero Foundation, LLC.
* @copyright Copyright 2005-2014 Open Source Matters, Inc.
* @license http://www.gnu.org/licenses/gpl-2.0.html GPLv2
*/
$canDo = \Components\Installer\Admin\Helpers\Installer::getActions();
Toolbar::title(Lang::txt('COM_INSTALLER_HEADER_' . $this->getName()), 'install.png');
if ($canDo->get('core.admin')) {
Toolbar::preferences('com_installer');
Toolbar::divider();
}
Toolbar::help('warnings');
Document::setTitle(Lang::txt('COM_INSTALLER_TITLE_' . $this->getName()));
?>
<div id="installer-warnings">
<form action="<?php
echo Route::url('index.php?option=com_installer&controller=warnings');
?>
" method="post" name="adminForm" id="item-form">
<?php
if (!count($this->messages)) {
echo '<p class="nowarning">' . Lang::txt('COM_INSTALLER_MSG_WARNINGS_NONE') . '</p>';
} else {
echo Html::sliders('start', 'warning-sliders', array('useCookie' => 1));
示例15: defined
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* HUBzero is a registered trademark of Purdue University.
*
* @package hubzero-cms
* @copyright Copyright 2005-2015 HUBzero Foundation, LLC.
* @license http://opensource.org/licenses/MIT MIT
*/
// No direct access.
defined('_HZEXEC_') or die;
Toolbar::title(Lang::txt('COM_USAGE'), 'usage.png');
Toolbar::preferences('com_usage', '550');
?>
<form action="<?php
echo Route::url('index.php?option=com_usage');
?>
" name="adminForm" id="item-form">
<p class="warning"><?php
echo Lang::txt('COM_USAGE_WARNING');
?>
</p>
</form>