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


PHP FRoute::_方法代码示例

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


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

示例1: route

 /**
  * Redirects a notification item to the intended location
  *
  * @since	1.0
  * @access	public
  * @param	string
  * @return
  */
 public function route()
 {
     // The user needs to be logged in to access notifications
     FD::requireLogin();
     // Check for user profile completeness
     FD::checkCompleteProfile();
     $id = JRequest::getInt('id');
     $table = FD::table('Notification');
     $table->load($id);
     if (!$id || !$table->id) {
         FD::info()->set(JText::_('COM_EASYSOCIAL_NOTIFICATIONS_INVALID_ID_PROVIDED'), SOCIAL_MSG_ERROR);
         return $this->redirect(FRoute::dashboard(array(), false));
     }
     // Check if the user is allowed to view this notification item.
     $my = FD::user();
     if ($table->target_id != $my->id) {
         FD::info()->set(JText::_('COM_EASYSOCIAL_NOTIFICATIONS_NOT_ALLOWED'), SOCIAL_MSG_ERROR);
         return $this->redirect(FRoute::dashboard(array(), false));
     }
     // Mark the notification item as read
     $table->markAsRead();
     // Ensure that all & are replaced with &
     $url = str_ireplace('&', '&', $table->url);
     $this->redirect(FRoute::_($url, false));
     $this->close();
 }
开发者ID:ppantilla,项目名称:bbninja,代码行数:34,代码来源:view.html.php

示例2: route

 /**
  * Redirects a notification item to the intended location
  *
  * @since	1.0
  * @access	public
  * @param	string
  * @return
  */
 public function route()
 {
     // The user needs to be logged in to access notifications
     FD::requireLogin();
     // Get the notification id
     $id = $this->input->get('id', 0, 'int');
     $table = FD::table('Notification');
     $table->load($id);
     // Default redirection URL
     $redirect = FRoute::dashboard(array(), false);
     if (!$id || !$table->id) {
         $this->info->set(JText::_('COM_EASYSOCIAL_NOTIFICATIONS_INVALID_ID_PROVIDED'), SOCIAL_MSG_ERROR);
         return $this->redirect($redirect);
     }
     // Ensure that the viewer really owns this item
     if ($table->target_id != $this->my->id) {
         $this->info->set(JText::_('COM_EASYSOCIAL_NOTIFICATIONS_NOT_ALLOWED'), SOCIAL_MSG_ERROR);
         return $this->redirect($redirect);
     }
     // Mark the notification item as read
     $table->markAsRead();
     // Ensure that all & are replaced with &
     $url = str_ireplace('&', '&', $table->url);
     $redirect = FRoute::_($url, false);
     $this->redirect($redirect);
     $this->close();
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:35,代码来源:view.html.php

示例3: load

 public function load($options = array())
 {
     if (!isset($options['url'])) {
         $options['url'] = FRoute::_(JRequest::getURI());
     }
     $this->url = $options['url'];
     // If display mode is specified, set it accordingly.
     if (isset($options['display'])) {
         $this->display = $options['display'];
     }
     // Set the default text to our own text.
     $this->text = JText::_('COM_EASYSOCIAL_SHARING_SHARE_THIS');
     // If text is provided, allow user to override the default text.
     if (isset($options['text'])) {
         $this->text = $options['text'];
     }
     // Obey settings
     $config = FD::config();
     foreach (self::$availableVendors as $vendor) {
         if ($config->get('sharing.vendors.' . $vendor)) {
             $this->vendors[] = $vendor;
         }
     }
     // Force exclude
     if (isset($options['exclude'])) {
         $this->vendors = array_diff($this->vendors, self::$availableVendors);
         unset($options['exclude']);
     }
     // Force include
     if (isset($options['include'])) {
         $notInList = array_diff($options['include'], $this->vendors);
         $this->vendors = array_merge($this->vendors, $options['include']);
         unset($options['include']);
     }
     if (isset($options['css'])) {
         $this->css = $options['css'];
     }
     $this->options = $options;
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:39,代码来源:sharing.php

示例4:

						<?php 
            echo $this->html('grid.id', $i, $category->id);
            ?>
					</td>
					<?php 
        }
        ?>

					<td>
						<div class="row">
							<img src="<?php 
        echo $category->getAvatar();
        ?>
" class="es-avatar pull-left mr-10" />
							<a href="<?php 
        echo FRoute::_('index.php?option=com_easysocial&view=groups&layout=categoryForm&id=' . $category->id);
        ?>
"
								data-category-insert
								data-id="<?php 
        echo $category->id;
        ?>
"
								data-avatar="<?php 
        echo $category->getAvatar();
        ?>
"
								data-alias="<?php 
        echo $category->alias;
        ?>
"
开发者ID:knigherrant,项目名称:decopatio,代码行数:31,代码来源:categories.php

示例5:

    ?>
</a>
				</li>
				<li data-avatar-select-button>
					<a href="javascript:void(0);"><?php 
    echo JText::_('COM_EASYSOCIAL_PHOTOS_SELECT_AVATAR');
    ?>
</a>
				</li>
				<?php 
    if ($user->hasAvatar()) {
        ?>
				<li class="divider"></li>
				<li data-avatar-remove-button>
					<a href="<?php 
        echo FRoute::_('index.php?option=com_easysocial&controller=profile&task=removeAvatar', true, '', null, true);
        ?>
"><?php 
        echo JText::_("COM_EASYSOCIAL_PHOTOS_REMOVE_AVATAR");
        ?>
</a>
				</li>
				<?php 
    }
    ?>
			</ul>
		</div>
	</div>
	<?php 
}
?>
开发者ID:ppantilla,项目名称:bbninja,代码行数:31,代码来源:avatar.php

示例6: foreach

    ?>

		<?php 
    foreach ($themes as $theme) {
        ?>
		<tr>
			<td class="center">
				<input type="radio" name="cid[]" value="<?php 
        echo $theme->element;
        ?>
" data-theme-item data-table-grid-id />
			</td>

			<td>
				<a href="<?php 
        echo FRoute::_('index.php?option=com_easysocial&view=themes&layout=form&element=' . strtolower($theme->element));
        ?>
">
					<?php 
        echo $theme->name;
        ?>
				</a>
			</td>

			<td class="center">
				<?php 
        echo $this->html('grid.featured', $theme, 'themes', 'default', 'toggleDefault', !$theme->default ? true : false, array(JText::_('COM_EASYSOCIAL_THEMES_MAKE_DEFAULT')));
        ?>
			</td>

			<td class="center">
开发者ID:knigherrant,项目名称:decopatio,代码行数:31,代码来源:default.php

示例7: redirect

 /**
  * Allows overriden objects to redirect the current request only when in html mode.
  *
  * @access	public
  * @param	string	$uri 	The raw uri string.
  * @param	boolean	$route	Whether or not the uri should be routed
  */
 public function redirect($uri, $route = true)
 {
     if ($route) {
         // Since redirects does not matter of the xhtml codes, we can just ignore this.
         $uri = FRoute::_($uri, false);
     }
     $this->app->redirect($uri);
     $this->app->close();
 }
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:16,代码来源:dependencies.php

示例8:

        }
        ?>

									<?php 
        if ($group->isInviteOnly()) {
            ?>
									<span class="label label-danger"><i class="ies-locked"></i> <?php 
            echo JText::_('COM_EASYSOCIAL_GROUPS_INVITE_GROUP');
            ?>
</span>
									<?php 
        }
        ?>

									<a href="<?php 
        echo FRoute::_('index.php?option=com_easysocial&view=groups&layout=form&id=' . $group->id);
        ?>
" data-group-insert data-id="<?php 
        echo $group->id;
        ?>
"><?php 
        echo $group->getName();
        ?>
</a>

									<p class="mt-5 fd-small">
										<?php 
        echo $group->description;
        ?>
									</p>
								</div>
开发者ID:knigherrant,项目名称:decopatio,代码行数:31,代码来源:pending.php

示例9: route

 /**
  * Builds the URLs for apps view
  *
  * @since   1.0
  * @access  public
  * @param   array   An array of request arguments
  * @param   bool    Determines if the url should be xhtml compliant
  * @return  url     The string of the URL
  */
 public function route($options = array(), $xhtml = true)
 {
     $url = self::$base . '&view=' . $this->name;
     // Custom options
     $ssl = $options['ssl'];
     $tokenize = $options['tokenize'];
     $external = $options['external'];
     $tmpl = $options['tmpl'];
     $sef = $options['sef'];
     $layout = isset($options['layout']) ? $options['layout'] : '';
     // check if the current request is from feed page or not.
     // if yes, let set the external to always true.
     $pageFormat = FD::input()->get('format', '', 'var');
     if (!$external && $pageFormat == 'feed') {
         $external = true;
     }
     // Determines if this is a request to the controller
     $controller = $options['controller'];
     $data = array();
     unset($options['ssl'], $options['tokenize'], $options['external'], $options['tmpl'], $options['controller'], $options['sef']);
     if ($options) {
         foreach ($options as $key => $value) {
             $data[] = $key . '=' . $value;
         }
     }
     $query = $options;
     $options = implode('&', $data);
     $join = !empty($options) ? '&' : '';
     $url = $url . $join . $options;
     // Try to get the url from the adapter
     $overrideUrl = '';
     // Set temporary data
     $query['view'] = $this->name;
     $query['option'] = 'com_easysocial';
     // Ensure that all query values are lowercased
     $query = array_map(array('JString', 'strtolower'), $query);
     // Let's find for a suitable menu
     $view = $this->name;
     $layout = isset($query['layout']) ? $query['layout'] : '';
     $id = isset($query['id']) ? (int) $query['id'] : '';
     // For photos and albums, we want to fetch menu from "All Albums"
     if ($view == 'photos' || $view == 'albums') {
         $view = 'albums';
         $layout = 'all';
         $id = '';
     }
     $menuId = FRoute::getItemId($view, $layout, $id);
     if ($menuId) {
         $menu = JFactory::getApplication()->getMenu()->getItem($menuId);
         if ($menu) {
             $current = $menu->query;
             if (isset($current['id']) && !empty($current['id'])) {
                 $current['id'] = (int) $current['id'];
             }
             if (isset($query['id'])) {
                 $query['id'] = (int) $query['id'];
             }
             $hasDiff = array_diff($query, $current);
             // // If there's no difference in both sets of query, we can safely assume that there's already
             // // a menu for this link
             if (empty($hasDiff)) {
                 $overrideUrl = 'index.php?Itemid=' . $menuId;
             }
             //$overrideUrl    = 'index.php?Itemid=' . $menuId;
         }
     }
     // If there are no overriden url's, we append our own item id.
     if ($overrideUrl) {
         $url = $overrideUrl;
     } else {
         // If there is no getUrl method, we want to get the default item id.
         if ($menuId) {
             $url .= '&Itemid=' . $menuId;
         } else {
             $url .= '&Itemid=' . FRoute::getItemId($view, $layout);
         }
     }
     return FRoute::_($url, $xhtml, array(), $ssl, $tokenize, $external, $tmpl, $controller, $sef);
 }
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:88,代码来源:router.php

示例10:

    ?>
</a>
                </li>
                <li data-avatar-select-button>
                    <a href="javascript:void(0);"><?php 
    echo JText::_('COM_EASYSOCIAL_PHOTOS_SELECT_AVATAR');
    ?>
</a>
                </li>
                <?php 
    if ($event->hasAvatar() && ($event->isAdmin() || $this->my->isSiteAdmin())) {
        ?>
                <li class="divider"></li>
                <li data-avatar-remove-button>
                    <a href="<?php 
        echo FRoute::_('index.php?option=com_easysocial&id=' . $event->id . '&controller=events&task=removeAvatar', true, '', null, true);
        ?>
"><?php 
        echo JText::_("COM_EASYSOCIAL_PHOTOS_REMOVE_AVATAR");
        ?>
</a>
                </li>
                <?php 
    }
    ?>
            </ul>
        </div>
    </div>
    <?php 
}
?>
开发者ID:knigherrant,项目名称:decopatio,代码行数:31,代码来源:avatar.php

示例11:

				<tr>
					<td><?php 
        echo $this->html('grid.id', $i, $member->id);
        ?>
</td>

					<td style="text-align: left;">
						<span class="es-avatar es-avatar-rounded pull-left mr-15 ml-5">
							<img src="<?php 
        echo $user->getAvatar(SOCIAL_AVATAR_MEDIUM);
        ?>
" width="24" align="left" />
						</span>

						<a href="<?php 
        echo FRoute::_('index.php?option=com_easysocial&view=users&layout=form&id=' . $user->id);
        ?>
"
							data-user-insert
							data-id="<?php 
        echo $user->id;
        ?>
"
							data-alias="<?php 
        echo $user->getAlias();
        ?>
"
							data-title="<?php 
        echo $this->html('string.escape', $user->name);
        ?>
"
开发者ID:knigherrant,项目名称:decopatio,代码行数:31,代码来源:form.group.users.php

示例12: getPermalink

 /**
  * Retrieve the badge permalink
  *
  * @since	1.0
  * @access	public
  * @return	int		The total number of users who achieved this badge.
  */
 public function getPermalink($xhtml = false)
 {
     $url = FRoute::_('index.php?option=com_easysocial&view=labels&layout=item&id=' . $this->id, $xhtml);
     return $url;
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:12,代码来源:label.php

示例13:

                ?>
"></a>
						<?php 
            }
            ?>
					</td>
					<td class="center">
						<?php 
            $title = $userObj->getProfile()->title;
            ?>

						<?php 
            if ($title) {
                ?>
							<a href="<?php 
                echo FRoute::_('index.php?option=com_easysocial&view=profiles&layout=form&id=' . $userObj->getProfile()->id);
                ?>
"><?php 
                echo $title;
                ?>
</a>
						<?php 
            } else {
                ?>
							<?php 
                echo JText::_('COM_EASYSOCIAL_NOT_AVAILABLE');
                ?>
						<?php 
            }
            ?>
					</td>
开发者ID:ppantilla,项目名称:bbninja,代码行数:31,代码来源:default.php

示例14: url

 public static function url($options = array())
 {
     // Set option as com_easysocial by default
     if (!isset($options['option'])) {
         $options['option'] = SOCIAL_COMPONENT_NAME;
     }
     // Remove external
     $external = false;
     if (isset($options['external'])) {
         $external = $options['external'];
         unset($options['external']);
     }
     // Remove sef
     $sef = false;
     if (isset($options['sef'])) {
         $sef = $options['sef'];
         unset($options['sef']);
     }
     // Remove tokenize
     $tokenize = false;
     if (isset($options['tokenize'])) {
         $tokenize = $options['tokenize'];
         unset($options['tokenize']);
     }
     // Remove ssl
     $ssl = false;
     if (isset($options['ssl'])) {
         $ssl = $options['ssl'];
         unset($options['ssl']);
     }
     // Remove xhtml
     $xhtml = false;
     if (isset($options['xhtml'])) {
         $xhtml = $options['xhtml'];
         unset($options['xhtml']);
     }
     $base = 'index.php?' . JURI::buildQuery($options);
     return FRoute::_($base, $xhtml, array(), $ssl, $tokenize, $external, '', '', $sef);
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:39,代码来源:router.php

示例15:

    ?>
			</p>
			<?php 
}
?>

			<div class="mt-20">
				<a href="<?php 
echo FRoute::_('index.php?option=com_easysocial&view=apps');
?>
" class="btn btn-es-primary btn-medium">
					<?php 
echo JText::_('COM_EASYSOCIAL_BACK_TO_APPLICATION_LISTINGS');
?>
				</a>
				<?php 
echo JText::_('COM_EASYSOCIAL_OR');
?>
 <a href="<?php 
echo FRoute::_('index.php?option=com_easysocial&view=apps&layout=install');
?>
"><?php 
echo JText::_('COM_EASYSOCIAL_APPS_INSTALL_OTHER_APPS');
?>
</a>
			</div>
		</div>
	</div>

</div>
开发者ID:ppantilla,项目名称:bbninja,代码行数:30,代码来源:install.completed.php


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