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


PHP ModUtil::url方法代码示例

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


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

示例1: updateConfig

    public function updateConfig($args)
    {
        // Security check
        if (!SecurityUtil::checkPermission('SiriusXtecAuth::', '::', ACCESS_ADMIN)) {
            return LogUtil::registerPermissionError();
        }
        $items = array( 'ldap_active' => FormUtil::getPassedValue('ldap_active', false, 'POST')?true:false,
                'users_creation' => FormUtil::getPassedValue('users_creation', false, 'POST')?true:false,
                'new_users_activation' => FormUtil::getPassedValue('new_users_activation', false, 'POST')?true:false,
                'iw_write' => FormUtil::getPassedValue('iw_write', false, 'POST')?true:false,
                'iw_lastnames' => FormUtil::getPassedValue('iw_lastnames', false, 'POST')?true:false,
                'new_users_groups' => FormUtil::getPassedValue('new_users_groups', array(), 'POST'),
                'ldap_server' => FormUtil::getPassedValue('ldap_server', false, 'POST'),
                'ldap_basedn' => FormUtil::getPassedValue('ldap_basedn', false, 'POST'),
                'ldap_searchattr' => FormUtil::getPassedValue('ldap_searchattr', false, 'POST'),
                'loginXtecApps' => FormUtil::getPassedValue('loginXtecApps', false, 'POST'),
                'logoutXtecApps' => FormUtil::getPassedValue('logoutXtecApps', false, 'POST'),
                'gtafProtocol' => FormUtil::getPassedValue('gtafProtocol', false, 'POST'),
                'e13Protocol' => FormUtil::getPassedValue('e13Protocol', false, 'POST'),
                'gtafURL' => FormUtil::getPassedValue('gtafURL', false, 'POST'),
                'e13URL' => FormUtil::getPassedValue('e13URL', false, 'POST'),
				'loginTime' => FormUtil::getPassedValue('loginTime', false, 'POST'),
				'logoutTime' => FormUtil::getPassedValue('logoutTime', false, 'POST'));
        ModUtil::setVars($this->name,$items);
        LogUtil::registerStatus($this->__('S\'ha actualitzat la configuració del mòdul.'));
        return System::redirect(ModUtil::url('SiriusXtecAuth', 'admin', 'main'));
    }
开发者ID:projectesIF,项目名称:Sirius,代码行数:27,代码来源:Admin.php

示例2: deleteidsentry

    /**
     * Function to delete an ids log entry
     */
    public function deleteidsentry()
    {
        // verify auth-key
        $this->checkCsrfToken();

        // Security check
        if (!SecurityUtil::checkPermission('SecurityCenter::', '::', ACCESS_DELETE)) {
            return LogUtil::registerPermissionError();
        }

        // get paramters
        $id = (int)FormUtil::getPassedValue('id', 0, 'GETPOST');

        // sanity check
        if (!is_numeric($id)) {
            return LogUtil::registerError($this->__f("Error! Received a non-numeric object ID '%s'.", $id));
        }

        $class = 'SecurityCenter_DBObject_Intrusion';
        $object = new $class();
        $data = $object->get($id);

        // check for valid object
        if (!$data) {
            return LogUtil::registerError($this->__f('Error! Invalid %s received.', "object ID [$id]"));
        } else {
            // delete object
            $object->delete();
        }

        // redirect back to view function
        $this->redirect(ModUtil::url('SecurityCenter', 'admin', 'viewidslog'));
    }
开发者ID:projectesIF,项目名称:Sirius,代码行数:36,代码来源:Adminform.php

示例3: getlinks

    /**
     * get available admin panel links
     * @return array array of admin links
     */
    public function getlinks()
    {
        $links = array();

        if (SecurityUtil::checkPermission('SecurityCenter::', '::', ACCESS_ADMIN)) {
            $links[] = array('url' => ModUtil::url('SecurityCenter', 'admin', 'modifyconfig'), 'text' => $this->__('Settings'), 'class' => 'z-icon-es-config');
            $links[] = array('url' => ModUtil::url('SecurityCenter', 'admin', 'allowedhtml'), 'text' => $this->__('Allowed HTML settings'), 'class' => 'z-icon-es-options');
            $links[] = array('url' => ModUtil::url('SecurityCenter', 'admin', 'viewidslog'),
                             'text' => $this->__('View IDS Log'),
                             'class' => 'z-icon-es-log',
                             'links' => array(
                                             array('url' => ModUtil::url('SecurityCenter', 'admin', 'viewidslog'),
                                                   'text' => $this->__('View IDS Log')),
                                             array('url' => ModUtil::url('SecurityCenter', 'admin', 'exportidslog'),
                                                   'text' => $this->__('Export IDS Log')),
                                             array('url' => ModUtil::url('SecurityCenter', 'admin', 'purgeidslog'),
                                                   'text' => $this->__('Purge IDS Log'))
                                               ));

            $outputfilter = System::getVar('outputfilter');
            if ($outputfilter == 1) {
                $links[] = array('url' => ModUtil::url('SecurityCenter', 'admin', 'purifierconfig'), 'text' => $this->__('HTMLPurifier settings'), 'class' => 'z-icon-es-options');
            }
        }

        return $links;
    }
开发者ID:projectesIF,项目名称:Sirius,代码行数:31,代码来源:Admin.php

示例4: smarty_function_nextpostlink

/**
 * Smarty function to display a link to the next post
 *
 * Example
 * <!--[nextpostlink sid=$info.sid layout='%link% <span class="news_metanav">&raquo;</span>']-->
 *
 * @author Mark West
 * @since 20/10/03
 * @see function.nextpostlink.php::smarty_function_nextpostlink()
 * @param array $params All attributes passed to this function from the template
 * @param object &$smarty Reference to the Smarty object
 * @param integer $sid article id
 * @param string $layout HTML string in which to insert link
 * @return string the results of the module function
 */
function smarty_function_nextpostlink($params, &$smarty)
{
    if (!isset($params['sid'])) {
        // get the info template var
        $info = $smarty->get_template_vars('info');
        $params['sid'] = $info['sid'];
    }

    if (!isset($params['layout'])) {
        $params['layout'] = '%link% <span class="news_metanav">&raquo;</span>';
    }

    $article = ModUtil::apiFunc('News', 'user', 'getall',
                            array('query' => array(array('sid', '>', $params[sid])),
                                  'orderdir' => 'ASC',
                                  'numitems' => 1));

    if (!$article) {
        return;
    }

    $articlelink = '<a href="'.DataUtil::formatForDisplay(ModUtil::url('News', 'user', 'display', array('sid' => $article[0]['sid']))).'">'.DataUtil::formatForDisplay($article[0]['title']).'</a>';
    $articlelink = str_replace('%link%', $articlelink, $params['layout']);

    if (isset($params['assign'])) {
        $smarty->assign($params['assign'], $articlelink);
    } else {
        return $articlelink;
    }
}
开发者ID:projectesIF,项目名称:Sirius,代码行数:45,代码来源:function.nextpostlink.php

示例5: handleCommand

 function handleCommand(Zikula_Form_View $view, &$args)
 {
     if ($args['commandName'] == 'cancel') {
         $url = ModUtil::url('Scribite', 'admin', 'main');
         return $view->redirect($url);
     } else {
         if ($args['commandName'] == 'restore') {
             $classname = 'ModulePlugin_Scribite_' . $this->editor . '_Plugin';
             if (method_exists($classname, 'getDefaults')) {
                 $defaults = $classname::getDefaults();
                 if (!empty($defaults)) {
                     ModUtil::setVars("moduleplugin.scribite." . strtolower($this->editor), $defaults);
                     LogUtil::registerStatus('Defaults succesfully restored.');
                 }
             }
             return true;
         }
     }
     // check for valid form
     if (!$view->isValid()) {
         return false;
     }
     $data = $view->getValues();
     ModUtil::setVars("moduleplugin.scribite." . strtolower($this->editor), $data);
     LogUtil::registerStatus($this->__('Done! Module configuration updated.'));
     return true;
 }
开发者ID:pheski,项目名称:Scribite,代码行数:27,代码来源:ModifyEditor.php

示例6: confupdate

    /**
     * Update the configuration values
     * @author: Sara Arjona Téllez (sarjona@xtec.cat)
     * @params	The config values from the form
     * @return	Thue if success
     */
    public function confupdate($args) {
        $skins = FormUtil::getPassedValue('skins', isset($args['skins']) ? $args['skins'] : null, 'POST');
        $langs = FormUtil::getPassedValue('langs', isset($args['langs']) ? $args['langs'] : null, 'POST');
        $maxdelivers = FormUtil::getPassedValue('maxdelivers', isset($args['maxdelivers']) ? $args['maxdelivers'] : null, 'POST');
        $basedisturl = FormUtil::getPassedValue('basedisturl', isset($args['basedisturl']) ? $args['basedisturl'] : null, 'POST');

        // Security check
        if (!SecurityUtil::checkPermission('IWqv::', "::", ACCESS_ADMIN)) {
            throw new Zikula_Exception_Forbidden();
        }

        // Confirm authorisation code
        $this->checkCsrfToken();

        if (isset($skins))
            ModUtil::setVar('IWqv', 'skins', $skins);
        if (isset($langs))
            ModUtil::setVar('IWqv', 'langs', $langs);
        if (isset($maxdelivers))
            ModUtil::setVar('IWqv', 'maxdelivers', $maxdelivers);
        if (isset($basedisturl))
            ModUtil::setVar('IWqv', 'basedisturl', $basedisturl);

        LogUtil::registerStatus($this->__f('Done! %1$s updated.', $this->__('settings')));
        return System::redirect(ModUtil::url('IWqv', 'admin', 'main'));
    }
开发者ID:projectesIF,项目名称:Sirius,代码行数:32,代码来源:Admin.php

示例7: getlinks

 public function getlinks($args)
 {
     $links = array();
     $sublinks = array();
     $links[] = array('url' => ModUtil::url('Scribite', 'admin', 'modules'), 'text' => $this->__('Module list'), 'class' => 'z-icon-es-view');
     $links[] = array('url' => ModUtil::url('Scribite', 'admin', 'newmodule'), 'text' => $this->__('Add module'), 'class' => 'z-icon-es-new');
     $links[] = array('url' => ModUtil::url('Scribite', 'admin', 'modifyconfig'), 'text' => $this->__('Settings'), 'class' => 'z-icon-es-config');
     // check for all supported editors and generate links
     if (ModUtil::apiFunc('scribite', 'user', 'getEditors', array('editorname' => 'xinha'))) {
         $sublinks[] = array('url' => ModUtil::url('scribite', 'admin', 'modifyxinha'), 'text' => $this->__('Xinha'));
     }
     if (ModUtil::apiFunc('scribite', 'user', 'getEditors', array('editorname' => 'ckeditor'))) {
         $sublinks[] = array('url' => ModUtil::url('scribite', 'admin', 'modifyckeditor'), 'text' => $this->__('CKEditor'));
     }
     // openwysiwyg deprecated @4.3.0
     //        if (ModUtil::apiFunc('scribite', 'user', 'getEditors', array('editorname' => 'openwysiwyg'))) {
     //            $sublinks[] = array(
     //                'url' => ModUtil::url('scribite', 'admin', 'modifyopenwysiwyg'),
     //                'text' => $this->__('openWYSIWYG'));
     //        }
     if (ModUtil::apiFunc('scribite', 'user', 'getEditors', array('editorname' => 'nicedit'))) {
         $sublinks[] = array('url' => ModUtil::url('scribite', 'admin', 'modifynicedit'), 'text' => $this->__('NicEdit'));
     }
     if (ModUtil::apiFunc('scribite', 'user', 'getEditors', array('editorname' => 'markitup'))) {
         $sublinks[] = array('url' => ModUtil::url('scribite', 'admin', 'modifymarkitup'), 'text' => $this->__('markitup'));
     }
     if (ModUtil::apiFunc('scribite', 'user', 'getEditors', array('editorname' => 'tinymce'))) {
         $sublinks[] = array('url' => ModUtil::url('scribite', 'admin', 'modifytinymce'), 'text' => $this->__('TinyMCE'));
     }
     // add YUI page
     $sublinks[] = array('url' => ModUtil::url('scribite', 'admin', 'modifyyui'), 'text' => $this->__('YUI Editor'));
     $links[] = array('url' => ModUtil::url('Scribite', 'admin', 'modules'), 'text' => $this->__('Editor Config'), 'class' => 'z-icon-es-editor', 'links' => $sublinks);
     // return output
     return $links;
 }
开发者ID:rmaiwald,项目名称:Scribite,代码行数:35,代码来源:Admin.php

示例8: EZComments_migrateapi_pnFlashGames

/**
 * Do the migration
 * 
 * With this function, the actual migration is done.
 * 
 * @return   boolean   true on sucessful migration, false else
 * @since    0.2
 */
function EZComments_migrateapi_pnFlashGames()
{
    // Security check
    if (!SecurityUtil::checkPermission('EZComments::', '::', ACCESS_ADMIN)) {
        return LogUtil::registerError('pnFlashGames comments migration: Not Admin');
    }
    // Get datbase setup
    $tables = DBUtil::getTables();
    $Commentstable = $tables['pnFlashGames_comments'];
    $Commentscolumn = $tables['pnFlashGames_comments_column'];
    $Usertable = $tables['users'];
    $Usercolumn = $tables['users_column'];
    $sql = "SELECT {$Commentscolumn['gid']},\n                   {$Commentscolumn['uname']},\n                   {$Commentscolumn['date']},\n                   {$Commentscolumn['comment']},\n                   {$Usercolumn['uid']}\n             FROM  {$Commentstable}\n         LEFT JOIN {$Usertable}\n                ON {$Commentscolumn['uname']} = {$Usercolumn['uname']}";
    $result = DBUtil::executeSQL($sql);
    if ($result == false) {
        return LogUtil::registerError('pnFlashGames migration: DB Error: ' . $sql . ' -- ' . mysql_error());
    }
    // loop through the old comments and insert them one by one into the DB
    $items = DBUtil::marshalObjects($result, array('gid', 'uname', 'date', 'comment', 'uid'));
    foreach ($items as $item) {
        // set the correct user id for anonymous users
        if (empty($item['uid'])) {
            $item['uid'] = 1;
        }
        $id = ModUtil::apiFunc('EZComments', 'user', 'create', array('mod' => 'pnFlashGames', 'objectid' => DataUtil::formatForStore($item['gid']), 'url' => ModUtil::url('pnFlashGames', 'user', 'display', array('id' => $item['gid'])), 'comment' => $item['comment'], 'subject' => '', 'uid' => $item['uid'], 'date' => $item['date']));
        if (!$id) {
            return LogUtil::registerError('pnFlashGames migration: Error creating comment');
        }
    }
    return LogUtil::registerStatus('pnFlashGames migration successful');
}
开发者ID:rmaiwald,项目名称:EZComments,代码行数:39,代码来源:pnFlashGames.php

示例9: content_needleapi_content

/**
 * Content needle
 * @param $args['nid'] needle id
 * @return array()
 */
function content_needleapi_content($args)
{
    $dom = ZLanguage::getModuleDomain('Content');
    // Get arguments from argument array
    $nid = $args['nid'];
    unset($args);
    // cache the results
    static $cache;
    if (!isset($cache)) {
        $cache = array();
    }
    if (!empty($nid)) {
        if (!isset($cache[$nid])) {
            // not in cache array
            if (ModUtil::available('Content')) {
                $contentpage = ModUtil::apiFunc('Content', 'Page', 'getPage', array('id' => $nid, 'includeContent' => false));
                if ($contentpage != false) {
                    $cache[$nid] = '<a href="' . DataUtil::formatForDisplay(ModUtil::url('Content', 'user', 'view', array('pid' => $nid))) . '" title="' . DataUtil::formatForDisplay($contentpage['title']) . '">' . DataUtil::formatForDisplay($contentpage['title']) . '</a>';
                } else {
                    $cache[$nid] = '<em>' . DataUtil::formatForDisplay(__('Unknown id', $dom)) . '</em>';
                }
            } else {
                $cache[$nid] = '<em>' . DataUtil::formatForDisplay(__('Content not available', $dom)) . '</em>';
            }
        }
        $result = $cache[$nid];
    } else {
        $result = '<em>' . DataUtil::formatForDisplay(__('No needle id', $dom)) . '</em>';
    }
    return $result;
}
开发者ID:robbrandt,项目名称:Content,代码行数:36,代码来源:content.php

示例10: edit

 /**
  * This method provides a generic handling of all edit requests.
  *
  * @param string  $ot           Treated object type.
  * @param string  $tpl          Name of alternative template (for alternative display options, feeds and xml output)
  * @param boolean $raw          Optional way to display a template instead of fetching it (needed for standalone output)
  *
  * @return mixed Output.
  */
 public function edit()
 {
     $id = $this->request->query->filter('id', 0);
     if ($id > 0) {
         $url = ModUtil::url($this->name, 'user', 'view');
         return System::redirect($url);
     }
     $controllerHelper = new Reviews_Util_Controller($this->serviceManager);
     // parameter specifying which type of objects we are treating
     $objectType = $this->request->query->filter('ot', 'review', FILTER_SANITIZE_STRING);
     $utilArgs = array('controller' => 'user', 'action' => 'edit');
     if (!in_array($objectType, $controllerHelper->getObjectTypes('controllerAction', $utilArgs))) {
         $objectType = $controllerHelper->getDefaultObjectType('controllerAction', $utilArgs);
     }
     $this->throwForbiddenUnless(SecurityUtil::checkPermission($this->name . ':' . ucwords($objectType) . ':', '::', ACCESS_EDIT), LogUtil::getErrorMsgPermission());
     // create new Form reference
     $view = FormUtil::newForm($this->name, $this);
     // build form handler class name
     $handlerClass = $this->name . '_Form_Handler_User_' . ucfirst($objectType) . '_Edit';
     // determine the output template
     $viewHelper = new Reviews_Util_View($this->serviceManager);
     $template = $viewHelper->getViewTemplate($this->view, 'user', $objectType, 'edit', array());
     // execute form using supplied template and page event handler
     return $view->execute($template, new $handlerClass());
 }
开发者ID:rmaiwald,项目名称:Reviews,代码行数:34,代码来源:User.php

示例11: smarty_function_selector_user_category

/**
 * User category selector.
 *
 * Available parameters:
 *   - btnText:  If set, the results are assigned to the corresponding variable instead of printed out
 *   - cid:      category ID
 *
 * Example
 * {selector_user_category cid="1" assign="category"}
 *
 * @param array       $params All attributes passed to this function from the template.
 * @param Zikula_View $view   Reference to the Zikula_View object.
 *
 * @return string HTML code of the selector.
 */
function smarty_function_selector_user_category($params, Zikula_View $view)
{
    $field = isset($params['field']) ? $params['field'] : 'id';
    $selectedValue = isset($params['selectedValue']) ? $params['selectedValue'] : 0;
    $defaultValue = isset($params['defaultValue']) ? $params['defaultValue'] : 0;
    $defaultText = isset($params['defaultText']) ? $params['defaultText'] : '';
    $lang = isset($params['lang']) ? $params['lang'] : ZLanguage::getLanguageCode();
    $name = isset($params['name']) ? $params['name'] : 'defautlselectorname';
    $recurse = isset($params['recurse']) ? $params['recurse'] : true;
    $relative = isset($params['relative']) ? $params['relative'] : true;
    $includeRoot = isset($params['includeRoot']) ? $params['includeRoot'] : false;
    $includeLeaf = isset($params['includeLeaf']) ? $params['includeLeaf'] : true;
    $all = isset($params['all']) ? $params['all'] : false;
    $displayPath = isset($params['displayPath']) ? $params['displayPath'] : false;
    $attributes = isset($params['attributes']) ? $params['attributes'] : null;
    $assign = isset($params['assign']) ? $params['assign'] : null;
    $editLink = isset($params['editLink']) ? $params['editLink'] : true;
    $submit = isset($params['submit']) ? $params['submit'] : false;
    $multipleSize = isset($params['multipleSize']) ? $params['multipleSize'] : 1;
    $doReplaceRootCat = false;
    $userCats = ModUtil::apiFunc('ZikulaCategoriesModule', 'user', 'getusercategories', array('returnCategory' => 1, 'relative' => $relative));
    $html = CategoryUtil::getSelector_Categories($userCats, $field, $selectedValue, $name, $defaultValue, $defaultText, $submit, $displayPath, $doReplaceRootCat, $multipleSize);
    if ($editLink && $allowUserEdit && UserUtil::isLoggedIn() && SecurityUtil::checkPermission('ZikulaCategoriesModule::', "{$category['id']}::", ACCESS_EDIT)) {
        $url = ModUtil::url('ZikulaCategoriesModule', 'user', 'edituser');
        $html .= "&nbsp;&nbsp;<a href=\"{$url}\">" . __('Edit sub-categories') . '</a>';
    }
    if ($assign) {
        $view->assign($assign, $html);
    } else {
        return $html;
    }
}
开发者ID:rmaiwald,项目名称:core,代码行数:47,代码来源:function.selector_user_category.php

示例12: display

 /**
  * Display block.
  *
  * @param  array  $blockinfo Blockinfo structure.
  *
  * @return output Rendered block.
  */
 public function display($blockinfo)
 {
     if (!SecurityUtil::checkPermission('PendingContent::', "{$blockinfo['title']}::", ACCESS_OVERVIEW)) {
         return;
     }
     // trigger event
     $event = new Zikula_Event('get.pending_content', new Zikula_Collection_Container('pending_content'));
     $pendingCollection = EventUtil::getManager()->notify($event)->getSubject();
     $content = array();
     // process results
     foreach ($pendingCollection as $collection) {
         $module = $collection->getName();
         foreach ($collection as $item) {
             $link = ModUtil::url($module, $item->getController(), $item->getMethod(), $item->getArgs());
             $content[] = array('description' => $item->getDescription(), 'link' => $link, 'number' => $item->getNumber());
         }
     }
     if (!empty($content)) {
         $this->view->assign('content', $content);
         $blockinfo['content'] = $this->view->fetch('blocks_block_pendingcontent.tpl');
     } else {
         $blockinfo['content'] = '';
     }
     return BlockUtil::themeBlock($blockinfo);
 }
开发者ID:,项目名称:,代码行数:32,代码来源:

示例13: getlinks

	public function getlinks($args)
    {
       if (SecurityUtil::checkPermission('IWmessages::', '::', ACCESS_ADMIN)) {
			$links[] = array('url' => ModUtil::url($this->name, 'admin', 'main'), 'text' => $this->__('Module configuration'),'class' => 'z-icon-es-config');
       }
        return $links;
    }
开发者ID:projectesIF,项目名称:Sirius,代码行数:7,代码来源:Admin.php

示例14: getlinks

 /**
  * get available User panel links
  *
  * @return array Array of admin links
  */
 public function getlinks()
 {
     $func = $this->request->query->filter('func', 'main', FILTER_SANITIZE_STRING);
     $ot = $this->request->query->filter('ot', 'category', FILTER_SANITIZE_STRING);
     $forum = $this->request->query->filter('id', 0, FILTER_SANITIZE_NUMBER_INT);
     $links = array();
     if (SecurityUtil::checkPermission($this->name . '::', '::', ACCESS_ADMIN)) {
         $links[] = array('url' => ModUtil::url($this->name, 'admin', 'main'), 'text' => $this->__('Backend'), 'title' => $this->__('Switch to administration area.'), 'class' => 'z-icon-es-options');
     }
     if (SecurityUtil::checkPermission($this->name . '::', '::', ACCESS_READ)) {
         $links[] = array('url' => ModUtil::url($this->name, 'user', 'view', array('ot' => 'category')), 'text' => $this->__('Categories'), 'title' => $this->__('Category list'));
     }
     if (SecurityUtil::checkPermission($this->name . ':Forum:', $forum . '::', ACCESS_ADD) && $func == 'display' && $ot == 'forum') {
         $links[] = array('url' => ModUtil::url($this->name, 'user', 'edit', array('ot' => 'posting', 'forum' => $forum)), 'text' => $this->__('New issue'), 'title' => $this->__('Create a new issue'));
     }
     if (SecurityUtil::checkPermission($this->name . '::', '::', ACCESS_OVERVIEW)) {
         $links[] = array('url' => ModUtil::url($this->name, 'search', 'moduleSearch', array('kind' => 'latestPostings')), 'text' => $this->__('Latest issues'), 'title' => $this->__('Look for latest issues'));
     }
     if (SecurityUtil::checkPermission($this->name . '::', '::', ACCESS_OVERVIEW)) {
         $links[] = array('url' => ModUtil::url($this->name, 'search', 'moduleSearch'), 'text' => $this->__('Search issues'), 'title' => $this->__('Look for relevant issues'));
     }
     /*if (SecurityUtil::checkPermission($this->name . '::', '::', ACCESS_READ)) {
           $links[] = array('url' => ModUtil::url($this->name, 'user', 'view', array('ot' => 'forum')),
                            'text' => $this->__('Forums'),
                            'title' => $this->__('Forum list'));
       }
       if (SecurityUtil::checkPermission($this->name . '::', '::', ACCESS_READ)) {
           $links[] = array('url' => ModUtil::url($this->name, 'user', 'view', array('ot' => 'posting')),
                            'text' => $this->__('Postings'),
                            'title' => $this->__('Posting list'));
       }*/
     return $links;
 }
开发者ID:rmaiwald,项目名称:MUBoard,代码行数:38,代码来源:User.php

示例15: edit

 /**
  * Create or edit record.
  *
  * @return string|boolean Output.
  */
 public function edit()
 {
     if (!SecurityUtil::checkPermission('ExampleDoctrine::', '::', ACCESS_ADD)) {
         return LogUtil::registerPermissionError(ModUtil::url('ExampleDoctrine', 'user', 'index'));
     }
     $id = $this->request->query->getInt('id');
     if ($id) {
         // load user with id
         $user = $this->entityManager->find('ExampleDoctrine_Entity_User', $id);
         if (!$user) {
             return LogUtil::registerError($this->__f('User with id %s not found', $id));
         }
     } else {
         $user = new ExampleDoctrine_Entity_User();
     }
     /* @var $form Symfony\Component\Form\Form */
     $form = $this->serviceManager->getService('symfony.formfactory')->create(new ExampleDoctrine_Form_UserType(), $user);
     if ($this->request->getMethod() == 'POST') {
         $form->bindRequest($this->request);
         if ($form->isValid()) {
             $data = $form->getData();
             $this->entityManager->persist($data);
             $this->entityManager->flush();
             return $this->redirect(ModUtil::url('ExampleDoctrine', 'user', 'view'));
         }
     }
     return $this->view->assign('form', $form->createView())->fetch('exampledoctrine_user_edit.tpl');
 }
开发者ID:planetenkiller,项目名称:core,代码行数:33,代码来源:User.php


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