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


PHP type::getUrl方法代码示例

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


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

示例1: _generateElement

 /**
  * Create one element
  * 
  * @param type $node
  */
 private function _generateElement($node)
 {
     if (!$node->isAllow()) {
         return;
     }
     $cssClasses = array();
     $cssActive = '';
     if ($node->isActive()) {
         $cssActive = 'class="active"';
     }
     if (!is_null($node->getClass())) {
         $cssClasses[] = $node->getClass();
     }
     $class = count($cssClasses) > 0 ? " class='" . implode(',', $cssClasses) . "'" : '';
     $id = !is_null($node->getId()) ? " id='" . $node->getId() . "'" : '';
     $target = !is_null($node->getTarget()) ? " target='" . $node->getTarget() . "'" : '';
     $this->html .= "\t\t" . '<li ' . $cssActive . '>' . PHP_EOL;
     if (!$node->hasChilds()) {
         $this->html .= "\t\t\t" . '<a href="' . $node->getUrl() . '" ' . $target . ' class="nav-header" ><span' . $class . '></span> ' . $this->_translate($node->getName()) . "</a>" . PHP_EOL;
     }
     //generate childs
     if ($node->hasChilds()) {
         //$this->html .= "\t\t<div class='dropdown'>" . PHP_EOL;
         $this->html .= '<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">' . $this->_translate($node->getName()) . ' <span class="caret"></span></a>' . PHP_EOL;
         $this->html .= "\t\t<ul class=\"dropdown-menu\">" . PHP_EOL;
         $this->_generateChilds($node->getChilds());
         $this->html .= "\t\t</ul>" . PHP_EOL;
         //$this->html .= "\t\t</div>" . PHP_EOL;
     }
     $this->html .= "\t\t</li>" . PHP_EOL;
 }
开发者ID:zedmaster,项目名称:ticobox,代码行数:36,代码来源:Navigate.php

示例2: createJSONUserInfo

 /**
  * Creates an single user-information array for a given user. A user will be marked
  * as disabled, if the permission check fails on this user.
  * 
  * @param type $user
  * @param type $permission
  * @return type
  */
 private static function createJSONUserInfo($user, $permission = null, $priority = null)
 {
     $disabled = false;
     if ($permission != null && $permission instanceof \humhub\libs\BasePermission) {
         $disabled = !$user->getPermissionManager()->can($permission);
     } else {
         if ($permission != null) {
             $disabled = $permission;
         }
     }
     $priority = $priority == null ? 0 : $priority;
     $userInfo = [];
     $userInfo['id'] = $user->id;
     $userInfo['guid'] = $user->guid;
     $userInfo['disabled'] = $disabled;
     $userInfo['displayName'] = Html::encode($user->displayName);
     $userInfo['image'] = $user->getProfileImage()->getUrl();
     $userInfo['priority'] = $priority;
     $userInfo['link'] = $user->getUrl();
     return $userInfo;
 }
开发者ID:VasileGabriel,项目名称:humhub,代码行数:29,代码来源:UserPicker.php

示例3: _generateElement

 /**
  * Create one element
  * 
  * @param type $node
  */
 private function _generateElement($node)
 {
     $cssClasses = array();
     if ($node->isActive()) {
         $cssClasses[] = 'active';
     }
     if (!is_null($node->getClass())) {
         $cssClasses[] = $node->getClass();
     }
     $class = count($cssClasses) > 0 ? " class='" . implode(',', $cssClasses) . "'" : '';
     $id = !is_null($node->getId()) ? " id='" . $node->getId() . "'" : '';
     $target = !is_null($node->getTarget()) ? " target='" . $node->getTarget() . "'" : '';
     $this->html .= "\t\t<li{$class} {$id}>" . PHP_EOL;
     $this->html .= "\t\t\t<a title='" . $this->_translate($node->getName()) . "' href='" . $node->getUrl() . "' {$target}>" . $this->_translate($node->getName()) . "</a>" . PHP_EOL;
     //generate childs
     if ($node->hasChilds()) {
         $this->html .= "\t\t<div class='dropdown'>" . PHP_EOL;
         $this->html .= "\t\t<ul>" . PHP_EOL;
         $this->_generateChilds($node->getChilds());
         $this->html .= "\t\t</ul>" . PHP_EOL;
         $this->html .= "\t\t</div>" . PHP_EOL;
     }
     $this->html .= "\t\t</li>" . PHP_EOL;
 }
开发者ID:kmsquared,项目名称:phalcon-navigation,代码行数:29,代码来源:Navigate.php

示例4: invokeRpcAndDeserializeResponse

 /**
  * @deprecated
  * @param type $apiEndpoint
  * @param type $contentType
  * @param type $payload
  * @param type $responseContentType
  * @param type $responsePayload
  * @return type
  */
 protected function invokeRpcAndDeserializeResponse($apiEndpoint, $contentType, $responseContentType, &$deserializedPayload)
 {
     //
     //  Create responsePayload variable to pass by reference to
     //  HttpsRpc::invoke.
     //
     $responsePayload = null;
     //
     //  Log request
     //
     self::log(\Psr\Log\LogLevel::DEBUG, "ApiRequest::invokeRpcAndDeserializeResponse [" . "endpoint=\"{endpoint}\", " . "contentType=\"{contentType}\", " . "responseContentType=\"{responseContentType}\"" . "]", array('endpoint' => $apiEndpoint != null ? $apiEndpoint->getUrl() : 'null', 'contentType' => $contentType, 'responseContentType' => $responseContentType));
     //
     //
     //
     $responseCode = HttpsRpc::invoke($apiEndpoint->getUrl(), $contentType, $this, $responseContentType, $deserializedPayload);
     return $responseCode;
 }
开发者ID:citypay,项目名称:php-sdk,代码行数:26,代码来源:ApiRequest.php

示例5: getAssetUrl

 /**
  * Returns the public path of an asset.
  *
  * Absolute paths (i.e. http://...) are returned unmodified.
  *
  * @param string $path        A public path
  * @param string $packageName The name of the asset package to use
  *
  * @return string A public path which takes into account the base path and URL path
  */
 public function getAssetUrl($path, $packageName = null)
 {
     return $this->assetsHelper->getUrl($path, $packageName);
 }
开发者ID:dragoonis,项目名称:framework,代码行数:14,代码来源:AssetsExtension.php


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