当前位置: 首页>>代码示例>>PHP>>正文


PHP PFApplicationHelper::enabled方法代码示例

本文整理汇总了PHP中PFApplicationHelper::enabled方法的典型用法代码示例。如果您正苦于以下问题:PHP PFApplicationHelper::enabled方法的具体用法?PHP PFApplicationHelper::enabled怎么用?PHP PFApplicationHelper::enabled使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PFApplicationHelper的用法示例。


在下文中一共展示了PFApplicationHelper::enabled方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getButtons

 protected function getButtons()
 {
     $components = PFapplicationHelper::getComponents();
     $buttons = array();
     foreach ($components as $component) {
         if (!PFApplicationHelper::enabled($component->element)) {
             continue;
         }
         $helper = JPATH_ADMINISTRATOR . '/components/' . $component->element . '/helpers/dashboard.php';
         $class = str_replace('com_pf', 'PF', $component->element) . 'HelperDashboard';
         if (!JFile::exists($helper)) {
             continue;
         }
         JLoader::register($class, $helper);
         if (class_exists($class)) {
             if (in_array('getAdminButtons', get_class_methods($class))) {
                 $com_buttons = (array) call_user_func(array($class, 'getAdminButtons'));
                 $buttons[$component->element] = array();
                 foreach ($com_buttons as $button) {
                     $buttons[$component->element][] = $button;
                 }
             }
         }
     }
     return $buttons;
 }
开发者ID:johngrange,项目名称:wookeyholeweb,代码行数:26,代码来源:view.html.php

示例2: getButtons

 /**
  * Method to get a list of available buttons
  *
  * @return    array    $buttons    The available buttons
  */
 public static function getButtons()
 {
     $components = PFApplicationHelper::getComponents();
     $buttons = array();
     foreach ($components as $component) {
         if (!PFApplicationHelper::enabled($component->element)) {
             continue;
         }
         // Register component route helper if exists
         $router = JPATH_SITE . '/components/' . $component->element . '/helpers/route.php';
         $class = str_replace('com_pf', 'PF', $component->element) . 'HelperRoute';
         if (JFile::exists($router)) {
             JLoader::register($class, $router);
         }
         // Register component dashboard helper if exists
         $helper = JPATH_ADMINISTRATOR . '/components/' . $component->element . '/helpers/dashboard.php';
         $class = str_replace('com_pf', 'PF', $component->element) . 'HelperDashboard';
         if (!JFile::exists($helper)) {
             continue;
         }
         JLoader::register($class, $helper);
         // Get the dashboard button
         if (class_exists($class)) {
             if (in_array('getSiteButtons', get_class_methods($class))) {
                 $com_buttons = (array) call_user_func(array($class, 'getSiteButtons'));
                 $buttons[$component->element] = array();
                 foreach ($com_buttons as $button) {
                     $buttons[$component->element][] = $button;
                 }
             }
         }
     }
     return $buttons;
 }
开发者ID:gagnonjeanfrancois,项目名称:Projectfork,代码行数:39,代码来源:helper.php

示例3: getItems

 /**
  * Method to get a list of items.
  * Overriden to inject convert the attribs field into a JParameter object.
  *
  * @return    mixed    $items    An array of objects on success, false on failure.
  */
 public function getItems()
 {
     $items = parent::getItems();
     $base_path = JPATH_ROOT . '/media/com_projectfork/repo/0/logo';
     $base_url = JURI::root(true) . '/media/com_projectfork/repo/0/logo';
     $tasks_exists = PFApplicationHelper::enabled('com_pftasks');
     $repo_exists = PFApplicationHelper::enabled('com_pfrepo');
     $pks = JArrayHelper::getColumn($items, 'id');
     // Get aggregate data
     $progress = array();
     $total_tasks = array();
     $completed_tasks = array();
     $total_files = array();
     if ($tasks_exists) {
         JLoader::register('PFtasksModelTasks', JPATH_SITE . '/components/com_pftasks/models/tasks.php');
         $tmodel = JModelLegacy::getInstance('Tasks', 'PFtasksModel', array('ignore_request' => true));
         $progress = $tmodel->getAggregatedProgress($pks, 'project_id');
         $total_tasks = $tmodel->getAggregatedTotal($pks, 'project_id');
         $completed_tasks = $tmodel->getAggregatedTotal($pks, 'project_id', 1);
     }
     if ($repo_exists) {
         JLoader::register('PFrepoModelFiles', JPATH_SITE . '/components/com_pfrepo/models/files.php');
         $fmodel = JModelLegacy::getInstance('Files', 'PFrepoModel', array('ignore_request' => true));
         $total_files = $fmodel->getProjectCount($pks);
     }
     // Loop over each row to inject data
     foreach ($items as $i => &$item) {
         $params = new JRegistry();
         $params->loadString($item->attribs);
         // Convert the parameter fields into objects.
         $items[$i]->params = clone $this->getState('params');
         // Create slug
         $items[$i]->slug = $items[$i]->alias ? $items[$i]->id . ':' . $items[$i]->alias : $items[$i]->id;
         // Try to find the logo img
         $items[$i]->logo_img = null;
         if (JFile::exists($base_path . '/' . $item->id . '.jpg')) {
             $items[$i]->logo_img = $base_url . '/' . $item->id . '.jpg';
         } elseif (JFile::exists($base_path . '/' . $item->id . '.jpeg')) {
             $items[$i]->logo_img = $base_url . '/' . $item->id . '.jpeg';
         } elseif (JFile::exists($base_path . '/' . $item->id . '.png')) {
             $items[$i]->logo_img = $base_url . '/' . $item->id . '.png';
         } elseif (JFile::exists($base_path . '/' . $item->id . '.gif')) {
             $items[$i]->logo_img = $base_url . '/' . $item->id . '.gif';
         }
         // Inject task count
         $items[$i]->tasks = isset($total_tasks[$item->id]) ? $total_tasks[$item->id] : 0;
         // Inject completed task count
         $items[$i]->completed_tasks = isset($completed_tasks[$item->id]) ? $completed_tasks[$item->id] : 0;
         // Inject progress
         $items[$i]->progress = isset($progress[$item->id]) ? $progress[$item->id] : 0;
         // Inject attached files
         $items[$i]->attachments = isset($total_files[$item->id]) ? $total_files[$item->id] : 0;
     }
     return $items;
 }
开发者ID:gagnonjeanfrancois,项目名称:Projectfork,代码行数:61,代码来源:projects.php

示例4:

    echo $this->form->getLabel('modified');
    ?>
                </div>
                <div class="controls">
                    <?php 
    echo $this->form->getInput('modified');
    ?>
                </div>
            </div>
        <?php 
}
?>
    </fieldset>

    <?php 
if (PFApplicationHelper::enabled('com_pfrepo')) {
    ?>
        <?php 
    echo JHtml::_('tabs.panel', JText::_('COM_PROJECTFORK_FIELDSET_ATTACHMENTS'), 'reply-attachments');
    ?>
        <fieldset>
        	<div class="formelm control-group">
        		<?php 
    echo $this->form->getInput('attachment');
    ?>
        	</div>
        </fieldset>
    <?php 
}
?>
开发者ID:gagnonjeanfrancois,项目名称:Projectfork,代码行数:30,代码来源:edit.php

示例5: getSiteHTML

 /**
  * Method to generate the frontend input markup.
  *
  * @return    array    $html    The html field markup
  */
 protected function getSiteHTML($assets)
 {
     $html = array();
     foreach ($assets as $asset) {
         list($component, $asset_name) = explode('.', $asset, 2);
         if (!PFApplicationHelper::enabled($component)) {
             continue;
         }
         $asset_id = str_replace('.', '_', $asset);
         $html[] = '<ul class="unstyled">';
         $html[] = '<li class="well well-small">';
         $html[] = '<strong>' . JText::_(strtoupper($asset_id) . '_LABEL_TITLE') . '</strong>';
         $html[] = '<hr/>';
         $html[] = '<ul id="' . $this->id . '_' . $asset_id . '" class="unstyled">';
         if (array_key_exists($asset, $this->items)) {
             foreach ($this->items[$asset] as $item) {
                 $html[] = '<li><div class="control-group">';
                 $html[] = '<a class="btn btn-mini" href="javascript:void(0);" onclick="pfRemoveLabel_' . $this->id . '(this)"><i class="icon-remove"></i></a>';
                 $html[] = '<input type="text" class="inputbox input-medium" onkeyup="pfPreviewLabel_' . $this->id . '(this, \'text\')"';
                 $html[] = 'name="' . $this->name . '[' . $asset . '][title][]" placeholder="' . JText::_('COM_PROJECTFORK_LABEL_TITLE_PLACEHOLDER') . '"';
                 $html[] = ' value="' . htmlspecialchars($item->title, ENT_COMPAT, 'UTF-8') . '" maxlength="32"/>';
                 $html[] = '<select class="inputbox input-medium" name="' . $this->name . '[' . $asset . '][style][]" onchange="pfPreviewLabel_' . $this->id . '(this, \'style\')">';
                 $html[] = '<option value="">' . JText::_('COM_PROJECTFORK_LABEL_OPTION_LABEL_STYLE_DEFAULT') . '</option>';
                 $html[] = '<option value="label-success"' . ($item->style == 'label-success' ? ' selected="selected"' : '') . '>' . JText::_('COM_PROJECTFORK_LABEL_OPTION_LABEL_STYLE_SUCCESS') . '</option>';
                 $html[] = '<option value="label-warning"' . ($item->style == 'label-warning' ? ' selected="selected"' : '') . '>' . JText::_('COM_PROJECTFORK_LABEL_OPTION_LABEL_STYLE_WARNING') . '</option>';
                 $html[] = '<option value="label-important"' . ($item->style == 'label-important' ? ' selected="selected"' : '') . '>' . JText::_('COM_PROJECTFORK_LABEL_OPTION_LABEL_STYLE_IMPORTANT') . '</option>';
                 $html[] = '<option value="label-info"' . ($item->style == 'label-info' ? ' selected="selected"' : '') . '>' . JText::_('COM_PROJECTFORK_LABEL_OPTION_LABEL_STYLE_INFO') . '</option>';
                 $html[] = '<option value="label-inverse"' . ($item->style == 'label-inverse' ? ' selected="selected"' : '') . '>' . JText::_('COM_PROJECTFORK_LABEL_OPTION_LABEL_STYLE_INVERSE') . '</option>';
                 $html[] = '</select>';
                 $html[] = JText::_('COM_PROJECTFORK_LABEL_PREVIEW') . ': ';
                 $html[] = '<span class="label ' . $item->style . '"><i class="icon-bookmark"></i> ' . htmlspecialchars($item->title, ENT_COMPAT, 'UTF-8') . '</span>';
                 $html[] = '<input type="hidden" name="' . $this->name . '[' . $asset . '][id][]" value="' . intval($item->id) . '"/>';
                 $html[] = '</div></li>';
             }
         }
         $html[] = '</ul>';
         $html[] = '<div class="control-group">';
         $html[] = '<a class="btn" href="javascript:void(0);" onclick="pfAddLabel_' . $this->id . '(\'' . $asset_id . '\', \'' . $asset . '\');">';
         $html[] = JText::_('JACTION_ADD_LABEL');
         $html[] = '</a>';
         $html[] = '</div>';
         $html[] = '</li>';
         $html[] = '</ul>';
         $html[] = '<input type="hidden" name="' . $this->name . '[]" id="' . $this->id . '" value=""/>';
     }
     return $html;
 }
开发者ID:gagnonjeanfrancois,项目名称:Projectfork,代码行数:52,代码来源:labelmanager.php

示例6: getOptions

 /**
  * Method to get the task select options
  *
  * @param     integer    $project    The project id
  * @return    array                  The options
  */
 protected function getOptions($project)
 {
     $app = JFactory::getApplication();
     $db = JFactory::getDbo();
     $query = $db->getQuery(true);
     $opts = array();
     $ms_exists = PFApplicationHelper::enabled('com_pfmilestones');
     $id = (int) $this->form->getValue('id');
     $view = $app->input->get('view');
     $query->select('a.id AS value, a.title AS t_title')->select('l.title AS l_title')->from('#__pf_tasks AS a')->join('left', '#__pf_task_lists AS l ON l.id = a.list_id');
     if ($ms_exists) {
         $query->select('m.title AS m_title')->join('left', '#__pf_milestones AS m ON m.id = a.milestone_id');
     }
     $query->where('a.project_id = ' . (int) $project);
     if ($ms_exists) {
         $query->order('m.title, l.title, a.title ASC');
     } else {
         $query->order('l.title, a.title ASC');
     }
     $db->setQuery($query);
     $items = $db->loadObjectList();
     $opts[] = JHtml::_('select.option', '', JText::_('COM_PROJECTFORK_OPTION_SELECT_TASK'));
     if (empty($items)) {
         return $opts;
     }
     foreach ($items as $item) {
         if ($view == 'taskform' && $id == (int) $item->value) {
             // Skip if the value is the same as the task we're editing
             continue;
         }
         $value = array();
         if ($ms_exists) {
             $value[] = empty($item->m_title) ? '-' : $item->m_title;
         }
         $value[] = empty($item->l_title) ? '-' : $item->l_title;
         $value[] = $item->t_title;
         $text = implode('/', $value);
         $opts[] = JHtml::_('select.option', $item->value, $text);
     }
     return $opts;
 }
开发者ID:gagnonjeanfrancois,项目名称:Projectfork,代码行数:47,代码来源:taskdependency.php

示例7:

            <?php 
}
?>
    		<dt class="owner-title">
    			<?php 
echo JText::_('JGRID_HEADING_CREATED_BY');
?>
:
    		</dt>
    		<dd class="owner-data">
    			 <?php 
echo JHtml::_('pfhtml.label.author', $item->author, $item->created);
?>
    		</dd>
            <?php 
if (PFApplicationHelper::enabled('com_pfrepo') && count($item->attachments)) {
    ?>
                <dt class="attachment-title">
        			<?php 
    echo JText::_('COM_PROJECTFORK_FIELDSET_ATTACHMENTS');
    ?>
:
        		</dt>
        		<dd class="attachment-data">
                     <?php 
    echo JHtml::_('pfrepo.attachments', $item->attachments);
    ?>
        		</dd>
            <?php 
}
?>
开发者ID:sgershen,项目名称:Projectfork,代码行数:31,代码来源:default.php

示例8:

            <div class="control-label">
                <?php 
    echo $this->form->getLabel('project_id');
    ?>
            </div>
            <div class="controls">
                <?php 
    echo $this->form->getInput('project_id');
    ?>
            </div>
        </div>
        <?php 
}
?>
        <?php 
if (PFApplicationHelper::enabled('com_pfmilestones')) {
    ?>
            <div class="formelm control-group">
                <div class="control-label">
                    <?php 
    echo $this->form->getLabel('milestone_id');
    ?>
                </div>
                <div class="controls" id="jform_milestone_id_reload">
                    <?php 
    echo $this->form->getInput('milestone_id');
    ?>
                </div>
            </div>
        <?php 
}
开发者ID:gagnonjeanfrancois,项目名称:Projectfork,代码行数:31,代码来源:edit.php

示例9: defined

 * @license      http://www.gnu.org/licenses/gpl.html GNU/GPL, see LICENSE.txt
 */
defined('_JEXEC') or die;
JHtml::_('pfhtml.script.jquerysortable');
JHtml::_('pfhtml.script.listform');
JHtml::_('pfhtml.script.task');
$list_order = $this->escape($this->state->get('list.ordering'));
$list_dir = $this->escape($this->state->get('list.direction'));
$user = JFactory::getUser();
$uid = $user->get('id');
$action_count = count($this->actions);
$filter_in = $this->state->get('filter.isset') ? 'in ' : '';
$can_order = $user->authorise('core.edit.state', 'com_pftasks');
$repo_enabled = PFApplicationHelper::enabled('com_pfrepo');
$cmnts_enabled = PFApplicationHelper::enabled('com_pfcomments');
$time_enabled = PFApplicationHelper::enabled('com_pftime');
$can_track = $user->authorise('core.create', 'com_pftime') && $time_enabled;
$doc = JFactory::getDocument();
$style = '.complete .task-title > a, .complete .task-description, .complete .caret {' . 'opacity:0.35;' . '}' . '.task-title > a {' . 'margin-left:10px;' . 'margin-right:10px;' . '}' . '.margin-none {' . 'margin: 0;' . '}' . '.priority-1 {' . 'border-left:8px solid #CCC;' . '}' . '.priority-2 {' . 'border-left:8px solid #468847;' . '}' . '.priority-3 {' . 'border-left:8px solid #3a87ad;' . '}' . '.priority-4 {' . 'border-left:8px solid #c09853;' . '}' . '.priority-5 {' . 'border-left:8px solid #b94a48;' . '}' . '.list-striped .dropdown-menu li {' . 'background-color:transparent;' . 'padding: 0;' . 'border-bottom-width: 0;' . '}' . '.list-striped .dropdown-menu li.divider {' . 'background-color: rgba(0, 0, 0, 0.1);' . 'margin: 2px 0;' . '}';
$doc->addStyleDeclaration($style);
$print_url = PFtasksHelperRoute::getTasksRoute($this->state->get('filter.project'), $this->state->get('filter.milestone'), $this->state->get('filter.tasklist')) . '&tmpl=component&layout=print';
$print_opt = 'width=1024,height=600,resizable=yes,scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no';
?>
<script type="text/javascript">
jQuery(document).ready(function() {
    <?php 
if ($can_track) {
    ?>
        var turl  = '<?php 
    echo JRoute::_('index.php?option=com_pftime&task=recorder.add&tmpl=component', false);
    ?>
开发者ID:MrJookie,项目名称:pm,代码行数:31,代码来源:default.php

示例10: save

 /**
  * Method to save the form data.
  *
  * @param     array      The form data
  *
  * @return    boolean    True on success
  */
 public function save($data)
 {
     $table = $this->getTable();
     $key = $table->getKeyName();
     $pk = !empty($data[$key]) ? $data[$key] : (int) $this->getState($this->getName() . '.id');
     $is_new = true;
     // Include the content plugins for the on save events.
     JPluginHelper::importPlugin('content');
     $dispatcher = JDispatcher::getInstance();
     try {
         if ($pk > 0) {
             if ($table->load($pk)) {
                 $is_new = false;
             }
         }
         if (!$is_new) {
             $data['project_id'] = $table->project_id;
         }
         if (!PFApplicationHelper::enabled('com_pfmilestones')) {
             $data['milestone_id'] = $is_new ? 0 : $table->milestone_id;
         }
         // Handle task completition meta info
         if (isset($data['complete'])) {
             $date = new JDate();
             if ($is_new && $data['complete'] == '1') {
                 $data['completed'] = $date->toSql();
                 $data['completed_by'] = JFactory::getUser()->id;
             }
             if (!$is_new) {
                 if ($data['complete'] == '0') {
                     $data['completed'] = JFactory::getDbo()->getNullDate();
                     $data['completed_by'] = '0';
                 } else {
                     if (JFactory::getUser()->id != $table->completed_by) {
                         $data['completed'] = $date->toSql();
                         $data['completed_by'] = JFactory::getUser()->id;
                     }
                 }
             }
         }
         // Make sure the title and alias are always unique
         $data['alias'] = '';
         list($title, $alias) = $this->generateNewTitle($data['title'], $data['project_id'], $data['milestone_id'], $data['list_id'], $data['alias'], $pk);
         $data['title'] = $title;
         $data['alias'] = $alias;
         // Handle permissions and access level
         if (isset($data['rules'])) {
             $access = PFAccessHelper::getViewLevelFromRules($data['rules'], intval($data['access']));
             if ($access) {
                 $data['access'] = $access;
             }
         } else {
             if ($is_new) {
                 // Let the table class find the correct access level
                 $data['access'] = 0;
             } else {
                 // Keep the existing access in the table
                 if (isset($data['access'])) {
                     unset($data['access']);
                 }
             }
         }
         // Try to convert estimate string to time
         if (isset($data['estimate'])) {
             if (!is_numeric($data['estimate'])) {
                 $estimate_time = strtotime($data['estimate']);
                 if ($estimate_time === false || $estimate_time <= 0) {
                     $data['estimate'] = 1;
                 } else {
                     $data['estimate'] = $estimate_time - time();
                 }
             } else {
                 // not a literal time, so convert minutes to secs
                 $data['estimate'] = $data['estimate'] * 60;
             }
         }
         // Make item published by default if new
         if (!isset($data['state']) && $is_new) {
             $data['state'] = 1;
         }
         // Make item priority 1 by default if not set
         if (!isset($data['priority']) && $is_new) {
             $data['priority'] = 1;
         }
         // Bind the data.
         if (!$table->bind($data)) {
             $this->setError($table->getError());
             return false;
         }
         // Prepare the row for saving
         $this->prepareTable($table);
         // Check the data.
         if (!$table->check()) {
//.........这里部分代码省略.........
开发者ID:gagnonjeanfrancois,项目名称:Projectfork,代码行数:101,代码来源:task.php

示例11: defined

/**
 * @package      pkg_projectfork
 * @subpackage   com_pfforum
 *
 * @author       Tobias Kuhn (eaxs)
 * @copyright    Copyright (C) 2006-2013 Tobias Kuhn. All rights reserved.
 * @license      http://www.gnu.org/licenses/gpl.html GNU/GPL, see LICENSE.txt
 */
defined('_JEXEC') or die;
JHtml::_('pfhtml.script.listform');
$list_order = $this->escape($this->state->get('list.ordering'));
$list_dir = $this->escape($this->state->get('list.direction'));
$user = JFactory::getUser();
$uid = $user->get('id');
$filter_in = $this->state->get('filter.isset') ? 'in ' : '';
$repo_enabled = PFApplicationHelper::enabled('com_pfrepo');
$doc = JFactory::getDocument();
$style = '.row-topics .well,.row-topics .btn-toolbar {' . 'margin-bottom: 0;' . '}' . '.list-comments img,.collapse-comments img {' . 'margin-right: 10px;' . '}' . '.img-avatar {' . 'max-height: 50px;' . 'max-width: 50px;' . 'margin-right: 10px;' . '}' . '.well-item {' . 'margin-left: 60px;' . '}' . '.collapse-comments blockquote {' . 'margin-left: 50px;' . '}' . '.collapse-comments .btn-toolbar {' . 'margin: 0 0 0 50px;' . '}';
$doc->addStyleDeclaration($style);
?>
<div id="projectfork" class="category-list<?php 
echo $this->pageclass_sfx;
?>
 view-topics">

    <?php 
if ($this->params->get('show_page_heading', 1)) {
    ?>
        <h1><?php 
    echo $this->escape($this->params->get('page_heading'));
    ?>
开发者ID:sgershen,项目名称:Projectfork,代码行数:31,代码来源:default.php

示例12: getItem

 /**
  * Method to get item data.
  *
  * @param     integer    The id of the item.
  *
  * @return    mixed      Record object on success, false on failure.
  */
 public function getItem($pk = null)
 {
     // Initialise variables.
     $pk = !empty($pk) ? $pk : (int) $this->getState($this->getName() . '.id');
     if ($this->_item === null) {
         $this->_item = array();
     }
     if (isset($this->_item[$pk])) {
         return $this->_item[$pk];
     }
     $cfg = JComponentHelper::getParams('com_pfprojects');
     $create_group = (int) $cfg->get('create_group');
     $group_location = (int) $cfg->get('group_location');
     $inherit = $this->getState($this->getName() . '.inherit');
     if (!$group_location) {
         $group_location = 1;
     }
     try {
         $db = $this->getDbo();
         $query = $db->getQuery(true);
         if (!$inherit && !$pk && $create_group) {
             $item = new stdClass();
             $item->id = 0;
             $item->parent_id = $group_location;
             $item->lft = 0;
             $item->rgt = 0;
             $item->title = JText::_('COM_PFUSERS_DEFAULT_GROUP');
         } else {
             $query->select('id, parent_id, lft, rgt, title')->from('#__usergroups')->where('id = ' . (int) $pk);
             $db->setQuery($query);
             $item = $db->loadObject();
         }
         if ($error = $db->getErrorMsg()) {
             throw new Exception($error);
         }
         $this->_item[$pk] = empty($item) ? false : $item;
         if ($this->_item[$pk]) {
             if (!$inherit) {
                 $component = $this->getState($this->getName() . '.component');
                 $section = $this->getState($this->getName() . '.section');
                 $this->_item[$pk]->actions = array();
                 $this->_item[$pk]->actions[$component] = JAccess::getActions($component, $section);
                 $components = PFApplicationHelper::getComponents();
                 foreach ($components as $name => $item) {
                     if ($name == $component) {
                         continue;
                     }
                     $use_asset = PFApplicationHelper::usesProjectAsset($name);
                     $enabled = PFApplicationHelper::enabled($name);
                     if (!$use_asset || !$enabled) {
                         continue;
                     }
                     $this->_item[$pk]->actions[$name] = JAccess::getActions($name, $section);
                 }
                 // Get child group names
                 if ($this->_item[$pk]->lft && $this->_item[$pk]->rgt) {
                     $this->_item[$pk]->children = $this->getChildGroups($this->_item[$pk]->lft, $this->_item[$pk]->rgt);
                 } else {
                     $this->_item[$pk]->children = array();
                 }
             } else {
                 $component = $this->getState($this->getName() . '.component');
                 $section = $this->getState($this->getName() . '.section');
                 $this->_item[$pk]->actions = JAccess::getActions($component, $section);
                 // Get child group names
                 if ($this->_item[$pk]->lft && $this->_item[$pk]->rgt) {
                     $this->_item[$pk]->children = $this->getChildGroups($this->_item[$pk]->lft, $this->_item[$pk]->rgt);
                 } else {
                     $this->_item[$pk]->children = array();
                 }
             }
         }
     } catch (JException $e) {
         if ($e->getCode() == 404) {
             // Need to go thru the error handler to allow Redirect to work.
             JError::raiseError(404, $e->getMessage());
         } else {
             $this->setError($e);
             $this->_item[$pk] = false;
         }
     }
     return $this->_item[$pk];
 }
开发者ID:gagnonjeanfrancois,项目名称:Projectfork,代码行数:90,代码来源:grouprules.php

示例13: getToolbar

 /**
  * Generates the toolbar for the top of the view
  *
  * @return    string    Toolbar with buttons
  */
 protected function getToolbar()
 {
     $options = array();
     $options[] = array('text' => 'JSAVE', 'task' => $this->getName() . '.save');
     $options[] = array('text' => 'COM_PROJECTFORK_ACTION_2NEW', 'task' => $this->getName() . '.save2new');
     $options[] = array('text' => 'COM_PROJECTFORK_ACTION_2COPY', 'task' => $this->getName() . '.save2copy', 'options' => array('access' => $this->item->id > 0));
     if (PFApplicationHelper::enabled('com_pftasks') && JFactory::getUser()->authorise('core.create', 'com_pftasks')) {
         $options[] = array('text' => 'divider');
         $options[] = array('text' => 'COM_PROJECTFORK_ACTION_2TASKLIST', 'task' => $this->getName() . '.save2tasklist');
         $options[] = array('text' => 'COM_PROJECTFORK_ACTION_2TASK', 'task' => $this->getName() . '.save2task');
     }
     PFToolbar::dropdownButton($options, array('icon' => 'icon-white icon-ok'));
     PFToolbar::button('JCANCEL', $this->getName() . '.cancel', false, array('class' => '', 'icon' => ''));
     return PFToolbar::render();
 }
开发者ID:gagnonjeanfrancois,项目名称:Projectfork,代码行数:20,代码来源:view.html.php

示例14:

?>
    </fieldset>

    <?php 
echo JHtml::_('tabs.panel', JText::_('COM_PROJECTFORK_FIELDSET_LABELS'), 'project-labels');
?>
    <fieldset>
    	<div class="formelm control-group">
    		<?php 
echo $this->form->getInput('labels');
?>
    	</div>
    </fieldset>

    <?php 
if ($this->item->id && PFApplicationHelper::enabled('com_pfrepo')) {
    ?>
    <?php 
    echo JHtml::_('tabs.panel', JText::_('COM_PROJECTFORK_FIELDSET_ATTACHMENTS'), 'project-attachments');
    ?>
    <fieldset>
    	<div class="formelm control-group">
    		<?php 
    echo $this->form->getInput('attachment');
    ?>
    	</div>
    </fieldset>
    <?php 
}
?>
开发者ID:gagnonjeanfrancois,项目名称:Projectfork,代码行数:30,代码来源:edit.php

示例15: defined

 */
defined('_JEXEC') or die;
JHtml::_('pfhtml.script.listform');
$list_order = $this->escape($this->state->get('list.ordering'));
$list_dir = $this->escape($this->state->get('list.direction'));
$user = JFactory::getUser();
$uid = $user->get('id');
$nulldate = JFactory::getDbo()->getNullDate();
$filter_in = $this->state->get('filter.isset') ? 'in ' : '';
$milestones_enabled = PFApplicationHelper::enabled('com_pfmilestones');
$tasks_enabled = PFApplicationHelper::enabled('com_pftasks');
$time_enabled = PFApplicationHelper::enabled('com_pftime');
$repo_enabled = PFApplicationHelper::enabled('com_pfrepo');
$forum_enabled = PFApplicationHelper::enabled('com_pfforum');
$users_enabled = PFApplicationHelper::enabled('com_pfusers');
$cmnts_enabled = PFApplicationHelper::enabled('com_pfcomments');
$is_ssl = JFactory::getURI()->isSSL();
$print_url = PFprojectsHelperRoute::getProjectsRoute() . '&tmpl=component&layout=print';
$print_opt = 'width=1024,height=600,resizable=yes,scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no';
?>
<div id="projectfork" class="category-list<?php 
echo $this->pageclass_sfx;
?>
 view-projects PrintArea all">
    <?php 
if ($this->params->get('show_page_heading', 1)) {
    ?>
        <h1><?php 
    echo $this->escape($this->params->get('page_heading'));
    ?>
</h1>
开发者ID:Kontent,项目名称:Projectfork,代码行数:31,代码来源:default.php


注:本文中的PFApplicationHelper::enabled方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。