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


PHP View::url方法代码示例

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


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

示例1: view

    public function view()
    {
        $parent = Page::getByPath(STACKS_PAGE_PATH);
        $cpc = new Permissions($parent);
        if ($cpc->canMoveOrCopyPage()) {
            $this->set('canMoveStacks', true);
            $sortUrl = View::url('/dashboard/blocks/stacks', 'update_order');
            $this->addFooterItem('<script type="text/javascript">
			$("div.ccm-stack-content-wrapper").sortable({
				handle: "img.ccm-group-sort",
				cursor: "move",
				axis: "y",
				opacity: 0.5,
				stop: function() {
					var pagelist = $(this).sortable("serialize");
					$.ajax({
						dataType: "json",
						type: "post",
						url: "' . $sortUrl . '",
						data: pagelist,
						success: function(r) {
							if (r.success) {
								ccmAlert.hud(r.message, 2000, "success");
							} else {
								ccmAlert.hud(r.message, 2000, "error");
							}
						}
					});
				}
			});
			</script>');
        }
    }
开发者ID:ojalehto,项目名称:concrete5-legacy,代码行数:33,代码来源:stacks.php

示例2: on_before_render

 public function on_before_render()
 {
     $tabs = array();
     foreach ($this->categories as $cat) {
         $active = $cat->getWorkflowProgressCategoryHandle() == $this->wpCategoryHandleActive;
         if ($active) {
             $this->set('category', $cat);
         }
         switch ($cat->getWorkflowProgressCategoryHandle()) {
             case 'page':
                 $tabName = t('Pages');
                 break;
             case 'file':
                 $tabName = t('Files');
                 break;
             case 'user':
                 $tabName = t('Users');
                 break;
             default:
                 $tabName = t(sprintf('%ss', Loader::helper('text')->unhandle($cat->getWorkflowProgressCategoryHandle())));
                 break;
         }
         $tabs[] = array(View::url('/dashboard/workflow/me/', 'view', $cat->getWorkflowProgressCategoryHandle()), $tabName, $active);
     }
     $this->set('tabs', $tabs);
 }
开发者ID:ojalehto,项目名称:concrete5-legacy,代码行数:26,代码来源:me.php

示例3: view

 public function view($page = 0)
 {
     $this->set('title', t('Logs'));
     $pageBase = View::url('/dashboard/reports/logs', 'view');
     $paginator = Loader::helper('pagination');
     $total = Log::getTotal($_REQUEST['keywords'], $_REQUEST['logType']);
     $paginator->init(intval($page), $total, $pageBase . '/%pageNum%/?keywords=' . $_REQUEST['keywords'] . '&logType=' . $_REQUEST['logType'], 10);
     $limit = $paginator->getLIMIT();
     $types = Log::getTypeList();
     $txt = Loader::helper('text');
     $logTypes = array();
     $logTypes[''] = '** ' . t('All');
     foreach ($types as $t) {
         if ($t == '') {
             $logTypes[''] = '** ' . t('All');
         } else {
             $logTypes[$t] = $txt->unhandle($t);
         }
     }
     $entries = Log::getList($_REQUEST['keywords'], $_REQUEST['logType'], $limit);
     $this->set('keywords', $keywords);
     $this->set('pageBase', $pageBase);
     $this->set('entries', $entries);
     $this->set('paginator', $paginator);
     $this->set('logTypes', $logTypes);
 }
开发者ID:VonUniGE,项目名称:concrete5-1,代码行数:26,代码来源:logs.php

示例4: on_start

 public function on_start()
 {
     $subnav = array(array(View::url('/dashboard/easy_news'), t('Easy News Manage'), true), array(View::url('/dashboard/easy_news/help'), 'Help'));
     $this->set('subnav', $subnav);
     Loader::model('page_list');
     $this->error = Loader::helper('validation/error');
 }
开发者ID:hanicker,项目名称:Concrete5-EasyNews,代码行数:7,代码来源:controller.php

示例5: getLatestAvailableVersionNumber

	public function getLatestAvailableVersionNumber() {
		if (defined('MULTI_SITE') && MULTI_SITE == 1) {
			$updates = Update::getLocalAvailableUpdates();
			$multiSiteVersion = 0;
			foreach($updates as $up) {
				if (version_compare($up->getUpdateVersion(), $multiSiteVersion, '>')) {
					$multiSiteVersion = $up->getUpdateVersion();
				}	
			}
			Config::save('APP_VERSION_LATEST', $multiSiteVersion);
			return $multiSiteVersion;
		}
		
		$d = Loader::helper('date');
		// first, we check session
		$queryWS = false;
		Cache::disableCache();
		$vNum = Config::get('APP_VERSION_LATEST', true);
		Cache::enableCache();
		if (is_object($vNum)) {
			$seconds = strtotime($vNum->timestamp);
			$version = $vNum->value;
			if (is_object($version)) {
				$versionNum = $version->version;
			} else {
				$versionNum = $version;
			}
			$diff = time() - $seconds;
			if ($diff > APP_VERSION_LATEST_THRESHOLD) {
				// we grab a new value from the service
				$queryWS = true;
			}
		} else {
			$queryWS = true;
		}
		
		if ($queryWS) {
			Loader::library('marketplace');
			$mi = Marketplace::getInstance();
			if ($mi->isConnected()) {
				Marketplace::checkPackageUpdates();
			}
			$update = Update::getLatestAvailableUpdate();
			$versionNum = $update->version;
			
			if ($versionNum) {
				Config::save('APP_VERSION_LATEST', $versionNum);
				if (version_compare($versionNum, APP_VERSION, '>')) {
					Loader::model('system_notification');
					SystemNotification::add(SystemNotification::SN_TYPE_CORE_UPDATE, t('A new version of concrete5 is now available.'), '', $update->notes, View::url('/dashboard/system/update'));
				}		
			} else {
				// we don't know so we're going to assume we're it
				Config::save('APP_VERSION_LATEST', APP_VERSION);
			}
		}
		
		return $versionNum;
	}
开发者ID:rii-J,项目名称:concrete5-de,代码行数:59,代码来源:update.php

示例6: on_start

	public function on_start() {
		$subnav = array(
			array(View::url('/dashboard/settings'), t('General')),
			array(View::url('/dashboard/settings/mail'), t('Email')),
			array(View::url('/dashboard/settings', 'set_permissions'), t('Access')),
			array(View::url('/dashboard/settings/multilingual'), t('Multilingual'), true),
			array(View::url('/dashboard/settings', 'set_developer'), t('Debug')),
			array(View::url('/dashboard/settings', 'manage_attribute_types'), t('Attributes'))
		);
		$this->set('subnav', $subnav);	}
开发者ID:rii-J,项目名称:concrete5-de,代码行数:10,代码来源:controller.php

示例7: run

 public function run()
 {
     self::fetch();
     // if they're not running any kind of js analytics, redirect immediately
     if (self::is_url() && !Config::$analytics) {
         Response::redirect(self::$long);
     }
     self::$url = SnS::make_url(self::url());
     return self::$template;
 }
开发者ID:helloandre,项目名称:shortnsweet,代码行数:10,代码来源:view.php

示例8: on_before_render

 public function on_before_render()
 {
     $tabs = array();
     foreach ($this->categories as $cat) {
         $active = $cat->getWorkflowProgressCategoryHandle() == $this->wpCategoryHandleActive;
         if ($active) {
             $this->set('category', $cat);
         }
         $tabs[] = array(View::url('/dashboard/workflow/me/', 'view', $cat->getWorkflowProgressCategoryHandle()), t('%ss', Loader::helper('text')->unhandle($cat->getWorkflowProgressCategoryHandle())), $active);
     }
     $this->set('tabs', $tabs);
 }
开发者ID:ricardomccerqueira,项目名称:rcerqueira.portfolio,代码行数:12,代码来源:me.php

示例9: browse

 public function browse($what = 'themes')
 {
     $tp = new TaskPermission();
     $subnav = array(array(View::url('/dashboard/install'), t('Installed and Available'), false), array(View::url('/dashboard/install', 'browse', 'themes'), t('More Themes'), $what == 'themes'), array(View::url('/dashboard/install', 'browse', 'addons'), t('More Add-Ons'), $what == 'addons'));
     if ($tp->canInstallPackages()) {
         Loader::model('marketplace_remote_item');
         $mri = new MarketplaceRemoteItemList();
         $mri->setItemsPerPage(9);
         if ($what == 'addons') {
             $sets = MarketplaceRemoteItemList::getItemSets('addons');
         } else {
             // themes
             $sets = MarketplaceRemoteItemList::getItemSets('themes');
         }
         $setsel = array('' => t('All Items'), 'FEATURED' => t('Featured Items'));
         if (is_array($sets)) {
             foreach ($sets as $s) {
                 $setsel[$s->getMarketplaceRemoteSetID()] = $s->getMarketplaceRemoteSetName();
             }
         }
         $mri->setIncludeInstalledItems(false);
         if (isset($_REQUEST['marketplaceRemoteItemSetID'])) {
             $set = $_REQUEST['marketplaceRemoteItemSetID'];
         }
         if (isset($_REQUEST['marketplaceRemoteItemKeywords'])) {
             $keywords = $_REQUEST['marketplaceRemoteItemKeywords'];
         }
         if ($keywords != '') {
             $mri->filterByKeywords($keywords);
         }
         if ($set == 'FEATURED') {
             $mri->filterByIsFeaturedRemotely(1);
         } else {
             if ($set > 0) {
                 $mri->filterBySet($set);
             }
         }
         $mri->setType($what);
         $mri->execute();
         $items = $mri->getPage();
         $this->set('selectedSet', $set);
         $this->set('list', $mri);
         $this->set('items', $items);
         $this->set('form', Loader::helper('form'));
         $this->set('sets', $setsel);
         $this->set('type', $what);
     }
     $this->set('subnav', $subnav);
 }
开发者ID:VonUniGE,项目名称:concrete5-1,代码行数:49,代码来源:install.php

示例10: connect_complete

	public function connect_complete() {
		$tp = new TaskPermission();
		if ($tp->canInstallPackages()) {
			if (!$_POST['csToken']) {
				$this->set('error', array(t('An unexpected error occurred when connecting your site to the marketplace.')));
			} else {
				Config::save('MARKETPLACE_SITE_TOKEN', $_POST['csToken']);
				Config::save('MARKETPLACE_SITE_URL_TOKEN', $_POST['csURLToken']);
				print '<script type="text/javascript">parent.window.location.href=\'' . View::url('/dashboard/install', 'view', 'community_connect_success') . '\';</script>';
				exit;
			}
		} else {
			$this->set('error', array(t('You do not have permission to connect this site to the marketplace.')));
		}
	}
开发者ID:notzen,项目名称:concrete5,代码行数:15,代码来源:marketplace.php

示例11: notifyAdmin

 protected function notifyAdmin($offenderID)
 {
     $offender = UserInfo::getByID($offenderID);
     $ue = new \Concrete\Core\User\Event\UserInfo($offender);
     Events::dispatch('on_private_message_over_limit', $ue);
     $admin = UserInfo::getByID(USER_SUPER_ID);
     Log::addEntry(t("User: %s has tried to send more than %s private messages within %s minutes", $offender->getUserName(), \Config::get('concrete.user.private_messages.throttle_max'), \Config::get('concrete.user.private_messages.throttle_max_timespan')), t('warning'));
     Loader::helper('mail');
     $mh = new MailHelper();
     $mh->addParameter('offenderUname', $offender->getUserName());
     $mh->addParameter('profileURL', BASE_URL . View::url('/profile', 'view', $offender->getUserID()));
     $mh->addParameter('profilePreferencesURL', BASE_URL . View::url('/profile/edit'));
     $mh->to($admin->getUserEmail());
     $mh->load('private_message_admin_warning');
     $mh->sendMail();
 }
开发者ID:meixelsberger,项目名称:concrete5-5.7.0,代码行数:16,代码来源:Limit.php

示例12: convert

 public function convert($val)
 {
     $editLink = "<a href='%s'>Edit</a>";
     $deleteLink = "<a href='%s'>Delete</a>";
     $listItem = "<li>%s - {$editLink} {$deleteLink}</li>";
     if ($val) {
         $db = Loader::db();
         $rows = $db->getAll("SELECT ID," . $this->colName . " as name FROM " . $this->tableName . " WHERE " . $this->joinCol . "=?", array($val));
         $retval = "<ul class=\"unstyled\">";
         foreach ($rows as $row) {
             $retval .= t($listItem, $row['name'], View::url($this->editUrl, $val, $row['ID']), View::url($this->deleteUrl, $row['ID']));
         }
         $retval .= t("</ul><a href='%s'>Add New</a>", View::url($this->editUrl, $val));
         return $retval;
     }
     return "ERROR";
 }
开发者ID:openly,项目名称:Openjuice-Package,代码行数:17,代码来源:converter.php

示例13: valid_url

 public function valid_url($url)
 {
     if (strpos($url, 'http') === 0 || strpos($url, 'mailto') === 0) {
         return $url;
     } else {
         if (strpos($url, '@') !== false) {
             return 'mailto:' . $url;
         } else {
             if (strpos($url, '/') === 0) {
                 return View::url($url);
                 //site path (not an external url)
             } else {
                 return 'http://' . $url;
             }
         }
     }
 }
开发者ID:robchenski,项目名称:ids,代码行数:17,代码来源:controller.php

示例14: printAttributeRow

function printAttributeRow($ak, $uo) {
	
	$vo = $uo->getAttributeValueObject($ak);
	$value = '';
	if (is_object($vo)) {
		$value = $vo->getValue('displaySanitized', 'display');
	}
	
	if ($value == '') {
		$text = '<div class="ccm-attribute-field-none">' . t('None') . '</div>';
	} else {
		$text = $value;
	}
	if ($ak->isAttributeKeyEditable()) { 
	$type = $ak->getAttributeType();
	
	$html = '
	<tr class="ccm-attribute-editable-field">
		<td style="white-space: nowrap; padding-right: 20px"><strong><a href="javascript:void(0)">' . $ak->getAttributeKeyDisplayHandle() . '</a></strong></td>
		<td width="100%" class="ccm-attribute-editable-field-central"><div class="ccm-attribute-editable-field-text">' . $text . '</div>
		<form method="post" action="' . View::url('/dashboard/users/search', 'edit_attribute') . '">
		<input type="hidden" name="uakID" value="' . $ak->getAttributeKeyID() . '" />
		<input type="hidden" name="uID" value="' . $uo->getUserID() . '" />
		<input type="hidden" name="task" value="update_extended_attribute" />
		<div class="ccm-attribute-editable-field-form ccm-attribute-editable-field-type-' . strtolower($type->getAttributeTypeHandle()) . '">
		' . $ak->render('form', $vo, true) . '
		</div>
		</form>
		</td>
		<td class="ccm-attribute-editable-field-save"><a href="javascript:void(0)"><img src="' . ASSETS_URL_IMAGES . '/icons/edit_small.png" width="16" height="16" class="ccm-attribute-editable-field-save-button" /></a>
		<a href="javascript:void(0)"><img src="' . ASSETS_URL_IMAGES . '/icons/close.png" width="16" height="16" class="ccm-attribute-editable-field-clear-button" /></a>
		<img src="' . ASSETS_URL_IMAGES . '/throbber_white_16.gif" width="16" height="16" class="ccm-attribute-editable-field-loading" />
		</td>
	</tr>';
	
	} else {

	$html = '
	<tr>
		<th>' . $ak->getAttributeKeyDisplayHandle() . '</th>
		<td width="100%" colspan="2">' . $text . '</td>
	</tr>';	
	}
	print $html;
}
开发者ID:rii-J,项目名称:concrete5-de,代码行数:45,代码来源:search.php

示例15: printAttributeRow

function printAttributeRow($ak, $uo, $assignment) {
	$vo = $uo->getAttributeValueObject($ak);
	$value = '';
	if (is_object($vo)) {
		$value = $vo->getValue('displaySanitized', 'display');
	}
	
	if ($value == '') {
		$text = '<div class="ccm-attribute-field-none">' . t('None') . '</div>';
	} else {
		$text = $value;
	}
	if ($ak->isAttributeKeyEditable() && in_array($ak->getAttributeKeyID(), $assignment->getAttributesAllowedArray())) { 
	$type = $ak->getAttributeType();
	
	$html = '
	<tr class="ccm-attribute-editable-field">
		<td width="250" style="vertical-align:middle;"><a style="font-weight:bold; line-height:18px;" href="javascript:void(0)">' . $ak->getAttributeKeyDisplayHandle() . '</a></td>
		<td class="ccm-attribute-editable-field-central" style="vertical-align:middle;"><div class="ccm-attribute-editable-field-text">' . $text . '</div>
		<form method="post" style="margin-bottom:0;" action="' . View::url('/dashboard/users/search', 'edit_attribute') . '">
		<input type="hidden" name="uakID" value="' . $ak->getAttributeKeyID() . '" />
		<input type="hidden" name="uID" value="' . $uo->getUserID() . '" />
		<input type="hidden" name="task" value="update_extended_attribute" />
		<div class="ccm-attribute-editable-field-form ccm-attribute-editable-field-type-' . strtolower($type->getAttributeTypeHandle()) . '">
		' . $ak->render('form', $vo, true) . '
		</div>
		</form>
		</td>
		<td class="ccm-attribute-editable-field-save" style="vertical-align:middle; text-align:center;" width="30"><a href="javascript:void(0)"><img src="' . ASSETS_URL_IMAGES . '/icons/edit_small.png" width="16" height="16" class="ccm-attribute-editable-field-save-button" /></a>
		<a href="javascript:void(0)"><img src="' . ASSETS_URL_IMAGES . '/icons/close.png" width="16" height="16" class="ccm-attribute-editable-field-clear-button" /></a>
		<img src="' . ASSETS_URL_IMAGES . '/throbber_white_16.gif" width="16" height="16" class="ccm-attribute-editable-field-loading" />
		</td>
	</tr>';
	
	} else {

	$html = '
	<tr>
		<td width="250">' . $ak->getAttributeKeyDisplayHandle() . '</th>
		<td class="ccm-attribute-editable-field-central" colspan="2">' . $text . '</td>
	</tr>';	
	}
	print $html;
}
开发者ID:nveid,项目名称:concrete5,代码行数:44,代码来源:search.php


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