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


PHP Site::urlManager方法代码示例

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


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

示例1: getControllerAction

 /**
  * Parses a path info into an action ID and GET variables.
  * @param string $pathInfo path info
  * @return string action ID
  */
 protected function getControllerAction($pathInfo)
 {
     if (($pos = strpos($pathInfo, '/')) !== false) {
         $manager = \Site::urlManager();
         $manager->parsePathInfo((string) substr($pathInfo, $pos + 1));
         $actionID = substr($pathInfo, 0, $pos);
         return $manager->caseSensitive ? $actionID : strtolower($actionID);
     } else {
         return $pathInfo;
     }
 }
开发者ID:ajaboa,项目名称:crmpuan,代码行数:16,代码来源:Router.php

示例2: init

 public function init()
 {
     try {
         $this->uploadTarget = \Site::urlManager()->createUrl('site/front/ajaxWidget', array('widget_method' => 'upload', 'widget_class' => $this->className()));
         if (empty($this->max_file_size)) {
             $this->max_file_size = \GO::config()->max_file_size;
         }
         \Site::scripts()->registerGapiScript('jquery');
         \Site::scripts()->registerGapiScript('jquery-ui');
         $assetUrl = \Site::assetManager()->publish(\GO::config()->root_path . 'modules/site/widget/plupload/assets');
         $this->_swfUrl = $assetUrl . '/assets/js/plupload.flash.swf';
         \Site::scripts()->registerCssFile($assetUrl . '/assets/style.css');
         \Site::scripts()->registerScriptFile($assetUrl . '/assets/js/plupload.full.js');
         \Site::scripts()->registerScriptFile($assetUrl . '/assets/js/jquery.plupload.queue/jquery.plupload.queue.js');
         $langFile = '/assets/js/i18n/' . \GO::language()->getLanguage() . '.js';
         //			if(file_exists(\Site::assetManager()->getBasePath().$langFile)){
         \Site::scripts()->registerScriptFile($assetUrl . $langFile);
         //			}
     } catch (\Exception $e) {
         echo '<h2 style="color:red;">AN ERROR HAS OCCURED</h2>';
         //echo '<p style="color:red;">'.$e->getMessage().'</p>';
         echo '<p style="color:red;">Please check if the folder( <b>' . \GO::config()->assets_path . '</b> ) is writable for the webserver.<br />This path is also configurable in the Group-Office <b>config.php</b> file.<br />Please check the options: <b>assets_path</b> and <b>assets_url</b></p>';
     }
 }
开发者ID:ajaboa,项目名称:crmpuan,代码行数:24,代码来源:Widget.php

示例3:

				</tr>
			<?php 
}
?>
				
			<tr>
				<td><label><?php 
echo \GO::t('rememberme', 'defaultsite');
?>
</label></td>
				<td><input type="checkbox" name="rememberMe" value="rememberMe"></tr>
			</tr>
		</table>
			
		<div class="button-bar">
			<input class="button" type="submit" id="submit-login-button" value="Login">
			<a id="recover-login-button" href="<?php 
echo \Site::urlManager()->createUrl('/site/account/recoverpassword');
?>
 " class="button"><?php 
echo \GO::t('lostPassword', 'defaultsite');
?>
</a>
			<div class="clear"></div>
		</div>
		
		<?php 
echo $form->endForm();
?>
	</div>
</div>
开发者ID:ajaboa,项目名称:crmpuan,代码行数:31,代码来源:login.php

示例4: actionLogout

 /**
  * Logout the current user and redirect to loginpage 
  */
 public function actionLogout()
 {
     \GO::session()->logout();
     \GO::session()->start();
     $this->redirect(\Site::urlManager()->getHomeUrl());
 }
开发者ID:ajaboa,项目名称:crmpuan,代码行数:9,代码来源:AccountController.php

示例5: TOC

    ?>
	
	
  <div class="col-md-3">
			
			<div data-spy="affix" data-offset-top="100" class="panel panel-default toc">
				<div class="panel-heading">Table of contents</div>
				<div class="panel-body">
				<?php 
    $toc = new TOC(array('content' => $content));
    echo $toc->render();
    ?>
				<div class="nav-bottom">
					<!--<div class="top-link"><a title="Jump to the top of the page" href="#header"><span class="glyphicon glyphicon-chevron-up"></span> Jump to top</a></div>-->				
					<div class="home-link"><a title="Go to home page" href="<?php 
    echo Site::urlManager()->getHomeUrl();
    ?>
"><span class="glyphicon glyphicon-chevron-left"></span> Home</a></div>
				</div>
				</div>
			</div>
	
	</div>
	
	

	<div class="col-md-9">
		
	<?php 
} else {
    echo '<div class="col-md-12">';
开发者ID:ajaboa,项目名称:crmpuan,代码行数:31,代码来源:content.php

示例6: foreach

    echo $message->getAttribute("content", "html");
    ?>
</p>

					<?php 
    if (!empty($message->attachments)) {
        ?>
						<span class="ticketmessage-files"><?php 
        echo \GO::t('ticketFiles', 'defaultsite');
        ?>
:</span>
							<?php 
        foreach ($message->getFiles() as $file => $obj) {
            ?>
								<a target="_blank" href="<?php 
            echo \Site::urlManager()->createUrl('tickets/site/downloadAttachment', array('file' => $obj->id, 'ticket_number' => $ticket->ticket_number, 'ticket_verifier' => $ticket->ticket_verifier));
            ?>
">
									<?php 
            echo $file;
            ?>
								</a>
							<?php 
        }
        ?>
					<?php 
    }
    ?>

				<?php 
    if ($message->has_status) {
开发者ID:ajaboa,项目名称:crmpuan,代码行数:31,代码来源:ticket.php

示例7:

$form = new \GO\Site\Widget\Form();
?>
		<?php 
echo $form->beginForm();
?>

		<?php 
if (Site::notifier()->hasMessage('success')) {
    ?>
			<div class="notification success"><?php 
    echo Site::notifier()->getMessage('success');
    ?>
</div>
			<div class="button-bar">
				<a id="reset-login-button" class="button" href="<?php 
    echo Site::urlManager()->createUrl('/site/account/login');
    ?>
"><?php 
    echo \GO::t('login', 'defaultsite');
    ?>
</a>
				<div class="clear"></div>
			</div>
		<?php 
} else {
    ?>

			<?php 
    if (Site::notifier()->hasMessage('error')) {
        ?>
				<div class="notification error"><?php 
开发者ID:ajaboa,项目名称:crmpuan,代码行数:31,代码来源:resetPassword.php

示例8:

<?php

\Site::scripts()->registerCssFile(\Site::file('css/ticket.css'));
?>

<div class="external-ticket-page newticket ticket">
	<div class="wrapper">
		
			<?php 
if (\GO::user()) {
    ?>
				&lt;&lt;&nbsp;<a id="back-to-overview-button" href="<?php 
    echo \Site::urlManager()->createUrl('tickets/externalpage/ticketlist');
    ?>
"><?php 
    echo \GO::t('ticketBackToList', 'defaultsite');
    ?>
</a>			
			<?php 
}
?>

		
		<h2><?php 
echo \GO::t('ticketNewTicket', 'defaultsite');
?>
</h2>
		

		
		<?php 
开发者ID:ajaboa,项目名称:crmpuan,代码行数:31,代码来源:newticket.php

示例9: foreach

				<tr><td colspan="5"><?php 
    echo \GO::t('ticketNoneFound', 'defaultsite');
    ?>
</td></tr>
			<?php 
} else {
    ?>
				<?php 
    foreach ($pager->getItems() as $i => $ticket) {
        ?>
					<tr class="<?php 
        echo $i % 2 ? 'even' : 'odd';
        ?>
">
						<td><?php 
        echo '<a href="' . \Site::urlManager()->createUrl("tickets/externalpage/ticket", array("ticket_number" => $ticket->ticket_number, "ticket_verifier" => $ticket->ticket_verifier)) . '">' . $ticket->ticket_number . '</a>';
        ?>
</td>
						<td><?php 
        echo $ticket->subject;
        ?>
</td>
						<td><?php 
        echo $ticket->getStatusName();
        ?>
</td>
						<td><?php 
        echo $ticket->agent ? $ticket->agent->name : "";
        ?>
</td>
						<td><?php 
开发者ID:ajaboa,项目名称:crmpuan,代码行数:31,代码来源:ticketlist.php

示例10: getPageUrl

 /**
  * The link for the page with the given number
  * @param int $pageNum number of page
  * @return string URL to page
  */
 private function getPageUrl($pageNum)
 {
     $params = array_merge($_GET, array($this->requestPrefix . $this->pageParam => $pageNum));
     return \Site::urlManager()->createUrl(\Site::router()->getRoute(), $params);
 }
开发者ID:ajaboa,项目名称:crmpuan,代码行数:10,代码来源:Pager.php

示例11: setReturnUrl

 /**
  * Return to this url its return value can be used in redirect()
  * @param type $url
  */
 public function setReturnUrl($url)
 {
     if (is_array($url)) {
         $route = isset($url[0]) ? $url[0] : '';
         $url = \Site::urlManager()->createUrl($route, array_splice($url, 1));
     }
     \GO::session()->values['sites']['returnUrl'] = $url;
 }
开发者ID:ajaboa,项目名称:crmpuan,代码行数:12,代码来源:Controller.php

示例12: array

<h1><?php 
echo \GO::t('ticketCreatedTitle', 'defaultsite');
?>
</h1>
<p><?php 
echo \GO::t('ticketCreatedText', 'defaultsite');
?>
</p>


<?php 
echo '<a href="' . \Site::urlManager()->createUrl("tickets/externalpage/ticket", array("ticket_number" => $ticket->ticket_number, "ticket_verifier" => $ticket->ticket_verifier)) . '">' . \GO::t('gotoTicket', 'defaultsite') . '</a>';
开发者ID:ajaboa,项目名称:crmpuan,代码行数:12,代码来源:ticketcreated.php

示例13: thumb

 /**
  * Get a thumbnail URL for user uploaded files. This does not work for template
  * images.
  * 
  * @param string $relativePath
  * @param array $thumbParams
  * @return string URL to thumbnail
  */
 public static function thumb($relativePath, $thumbParams = array("lw" => 100, "ph" => 100, "zc" => 1))
 {
     $file = new \GO\Base\Fs\File(\GO::config()->file_storage_path . $relativePath);
     $thumbParams['filemtime'] = $file->mtime();
     $thumbParams['src'] = $relativePath;
     return \Site::urlManager()->createUrl('site/front/thumb', $thumbParams);
 }
开发者ID:ajaboa,项目名称:crmpuan,代码行数:15,代码来源:Site.php


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