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


PHP app_url_for函数代码示例

本文整理汇总了PHP中app_url_for函数的典型用法代码示例。如果您正苦于以下问题:PHP app_url_for函数的具体用法?PHP app_url_for怎么用?PHP app_url_for使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: getRequestToken

 public function getRequestToken()
 {
     $api = new opCalendarApi($this->consumer, null, opCalendarApiHandler::GET, self::REQUEST_TOKEN_ENDPOINT, array('oauth_callback' => app_url_for('pc_frontend', '@calendar_api_callback', true), 'scope' => self::SCOPE));
     $api->setIsUseAuthorizedHeader(false);
     $handler = new opCalendarApiHandler($api, new opCalendarApiResultsStr());
     return $handler->execute();
 }
开发者ID:nise-nabe,项目名称:opCalendarPlugin,代码行数:7,代码来源:opCalendarOAuth.php

示例2: createEntryByInstance

 public function createEntryByInstance(Doctrine_Record $diary, SimpleXMLElement $entry = null)
 {
     $entry = parent::createEntryByInstance($diary, $entry);
     sfContext::getInstance()->getConfiguration()->loadHelpers(array('Url', 'opUtil'));
     $entry->setTitle($diary->getTitle());
     $entry->setContent($diary->getBody());
     $entry->setAuthorByMember($diary->getMember());
     $entry->setLink(app_url_for('pc_frontend', '@diary_show?id=' . $diary->getId(), true), 'self', 'alternate');
     $entry->setLink(app_url_for('mobile_frontend', '@diary_show?id=' . $diary->getId(), true), 'self', 'alternate');
     return $entry;
 }
开发者ID:kiwpon,项目名称:opWebAPIPlugin,代码行数:11,代码来源:opAPIDiary.class.php

示例3: get_auther_name

/**
 * opCalendarHelper
 *
 * @package    OpenPNE
 * @subpackage helper
 * @author     Shinichi Urabe <urabe@tejimaya.com>
 */
function get_auther_name($schedule_resource, $link_profile_page = false)
{
    if ($schedule_resource->member_id) {
        $member = $schedule_resource->Member;
        $value = $link_profile_page ? link_to($member->name, app_url_for('pc_frontend', '@member_profile?id=' . $member->id), array('target' => '_blank')) : $member->name;
        return sprintf('[user] %s', $value);
    }
    if ($schedule_resource->admin_user_id) {
        return sprintf('[admin] %s', $schedule_resource->AdminUser->username);
    }
    return '';
}
开发者ID:nise-nabe,项目名称:opCalendarPlugin,代码行数:19,代码来源:opCalendarHelper.php

示例4: op_api_community

function op_api_community($community)
{
    $viewMemberId = sfContext::getInstance()->getUser()->getMemberId();
    $communityUrl = app_url_for('pc_frontend', array('sf_route' => 'community_home', 'id' => $community->getId()), true);
    $communityImageFileName = $community->getImageFileName();
    if (!$communityImageFileName) {
        $communityImage = op_image_path('no_image.gif', true);
    } else {
        $communityImage = sf_image_path($communityImageFileName, array('size' => '48x48'), true);
    }
    $communityMember = Doctrine::getTable('CommunityMember')->retrieveByMemberIdAndCommunityId($viewMemberId, $community->getId());
    return array('id' => $community->getId(), 'name' => $community->getName(), 'category' => $community->getCommunityCategory() ? $community->getCommunityCategory()->getName() : null, 'community_url' => $communityUrl, 'community_image_url' => $communityImage, 'joining' => $communityMember ? !$communityMember->getIsPre() : false, 'admin' => $communityMember ? $communityMember->hasPosition('admin') : false, 'sub_admin' => $communityMember ? $communityMember->hasPosition('sub_admin') : false, 'created_at' => op_api_date($community->getCreatedAt()), 'admin_member' => op_api_member($community->getAdminMember()), 'member_count' => $community->countCommunityMembers(), 'public_flag' => $community->getConfig('public_flag'), 'register_policy' => $community->getConfig('register_policy'), 'description' => $community->getConfig('description'));
}
开发者ID:te-koyama,项目名称:openpne,代码行数:13,代码来源:opJsonApiHelper.php

示例5: createEntryByInstance

 public function createEntryByInstance(Doctrine_Record $event, SimpleXMLElement $entry = null)
 {
     $entry = parent::createEntryByInstance($event, $entry);
     sfContext::getInstance()->getConfiguration()->loadHelpers(array('Url', 'opUtil'));
     $entry->setTitle($event->getName());
     $entry->setContent($event->getBody());
     $entry->setAuthorByMember($event->getMember());
     $this->addWhenElement($entry->getElements(), date('c', strtotime($event->getOpenDate())));
     $this->addWhereElement($entry->getElements(), $event->getArea());
     $entry->setLink(url_for('@feeds_community_event_retrieve_resource_normal?model=communityEvent&id=' . $event->getId()), 'self', 'application/atom+xml');
     $entry->setLink(app_url_for('pc_frontend', 'communityEvent/detail?id=' . $event->getId(), true), 'alternate', 'text/html');
     $entry->setLink(app_url_for('mobile_frontend', 'communityEvent/detail?id=' . $event->getId(), true), 'alternate');
     return $entry;
 }
开发者ID:kiwpon,项目名称:opWebAPIPlugin,代码行数:14,代码来源:opAPICommunityEvent.class.php

示例6: op_timeline_plugin_screen_name

function op_timeline_plugin_screen_name($body, $options = array())
{
    preg_match_all('/(@+)([-_0-9A-Za-z]+)/', $body, $matches);
    if ($matches) {
        $i = 0;
        foreach ($matches[2] as $screenName) {
            $member = Doctrine::getTable('MemberConfig')->findOneByNameAndValue('op_screen_name', $screenName);
            if ($member) {
                $memberId = $member->getMemberId();
                $link = link_to('@' . $screenName, app_url_for('pc_frontend', array('sf_route' => 'obj_member_profile', 'id' => $memberId), true), array('target' => '_blank'));
                $mention = '/' . $matches[0][$i] . '/';
                $body = preg_replace($mention, $link, $body);
            }
            $i++;
        }
    }
    return $body;
}
开发者ID:meruto,项目名称:opTimelinePlugin,代码行数:18,代码来源:opTimelineHelper.php

示例7: createEntryByInstance

 public function createEntryByInstance(Doctrine_Record $communityMember, SimpleXMLElement $entry = null)
 {
     $member = $communityMember->getMember();
     $entry = parent::createEntryByInstance($communityMember, $entry);
     sfContext::getInstance()->getConfiguration()->loadHelpers(array('Url', 'opUtil'));
     $entry->setTitle($member->getName());
     $content = $entry->getElements()->addChild('content');
     $content->addAttribute('type', 'xhtml');
     $profiles = $content->addChild('div');
     $profiles->addAttribute('xmlns', 'http://www.w3.org/1999/xhtml');
     foreach ($member->getProfiles() as $profile) {
         $value = (string) $profile;
         $child = $profiles->addChild('div', $value);
         $child->addAttribute('id', $profile->getName());
     }
     $entry->setLink(url_for('@feeds_member_retrieve_resource_normal?model=community&id=' . $member->getId()), 'self', 'application/atom+xml');
     $entry->setLink(app_url_for('pc_frontend', 'member/profile?id=' . $member->getId(), true), 'alternate', 'text/html');
     $entry->setLink(app_url_for('mobile_frontend', 'member/profile?id=' . $member->getId(), true), 'alternate');
     return $entry;
 }
开发者ID:kiwpon,项目名称:opWebAPIPlugin,代码行数:20,代码来源:opAPICommunityMember.class.php

示例8: sendNotificationMail

 public static function sendNotificationMail(Community $community, $id, $type, $nickname, $subject, $body)
 {
     if (version_compare(OPENPNE_VERSION, '3.6beta1-dev', '<')) {
         return null;
     }
     sfContext::getInstance()->getConfiguration()->loadHelpers(array('opUtil'));
     $params = array('community_name' => $community->getName(), 'wiki_name' => $subject, 'nickname' => $nickname, 'body' => $body);
     $rs = Doctrine::getTable('CommunityMember')->createQuery()->where('community_id = ?', array($community->getId()))->andWhere('is_receive_mail_pc = ? OR is_receive_mail_mobile = ?', array(true, true))->execute(array(), Doctrine::HYDRATE_ON_DEMAND);
     foreach ($rs as $r) {
         $member = $r->getMember();
         $memberPcAddress = $member->getConfig('pc_address');
         $memberMobileAddress = $member->getConfig('mobile_address');
         $from = self::getPostMailAddress('mail_community_' . $type . '_comment_create', array('id' => $id, 'hash' => $member->getMailAddressHash()));
         if ($r->getIsReceiveMailPc() && $memberPcAddress) {
             $params['url'] = app_url_for('pc_frontend', '@community' . ucfirst($type) . '_show?id=' . $id, true);
             opMailSend::sendTemplateMail('notifyCommunityPosting', $memberPcAddress, $from, $params);
         }
         if ($r->getIsReceiveMailMobile() && $memberMobileAddress) {
             $params['url'] = app_url_for('mobile_frontend', '@community' . ucfirst($type) . '_show?id=' . $id, true);
             opMailSend::sendTemplateMail('notifyCommunityPosting', $memberMobileAddress, $from, $params);
         }
     }
 }
开发者ID:hiroyaxxx,项目名称:opCommunityWikiPlugin,代码行数:23,代码来源:opCommunityWikiToolKit.class.php

示例9: __

<?php

echo __('When mobile information registration is done from following URL, the member registration is completed.');
?>

<?php 
echo app_url_for('mobile_frontend', 'member/registerMobileToRegisterEnd?token=' . $token . '&id=' . $id, true);
开发者ID:te-koyama,项目名称:openpne,代码行数:7,代码来源:_registerMobileMail.php

示例10: __

if (!$sf_user->isAuthenticated()) {
    ?>
 class="insecure"<?php 
}
?>
>
<div id="wrap">
<div id="contents" class="clearfix">

<div id="header">
<h1><?php 
echo __('%sns% Administration', array('%sns%' => $op_config['sns_name']));
?>
</h1>
<span id="visit-site"><a href="<?php 
echo app_url_for('pc_frontend', '@homepage', true);
?>
" target="_blank"><?php 
echo __('Visit Site');
?>
</a></span>
</div>

<?php 
if ($sf_user->isAuthenticated()) {
    ?>
<div id="menu">
<ul>
<li><?php 
    echo link_to(__('Top page'), '@homepage');
    ?>
开发者ID:shotaatago,项目名称:OpenPNE3,代码行数:31,代码来源:layout.php

示例11: __

<?php

echo __('We accepted your recovering password request.');
?>

<?php 
echo __('Please click the following URL and complete password recovery process.');
?>

<?php 
echo app_url_for('pc_frontend', 'opAuthMailAddress/passwordRecoveryComplete?token=' . $token . '&id=' . $id, true);
开发者ID:te-koyama,项目名称:openpne,代码行数:11,代码来源:_passwordRecovery.php

示例12: getOAuthConsumerKey

 /**
  * get consumer key for RSA-SHA1
  *
  * @return OAuthConsumer
  */
 public static function getOAuthConsumerKey()
 {
     sfContext::getInstance()->getConfiguration()->loadHelpers(array('opUtil'));
     $baseUrl = sfConfig::get('op_base_url');
     if ('/' === substr($baseUrl, -1)) {
         $baseUrl = substr($baseUrl, 0, strlen($baseUrl) - 1);
     }
     return $baseUrl . app_url_for('pc_frontend', '@opensocial_certificates');
 }
开发者ID:niryuu,项目名称:opOpenSocialPlugin,代码行数:14,代码来源:opOpenSocialToolKit.class.php

示例13: include_http_metas

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<head>
<?php 
include_http_metas();
include_metas();
include_title();
op_smt_use_stylesheet('bootstrap');
op_smt_use_stylesheet('smt_main');
op_smt_include_stylesheets();
?>
<meta name="viewport" content="width=320px,user-scalable=no" />
<?php 
if (opConfig::get('enable_jsonapi') && opToolkit::isSecurePage()) {
    $jsonData = array('apiKey' => opToolkit::isSecurePage() ? $sf_user->getMemberApiKey() : '', 'apiBase' => app_url_for('api', 'homepage'));
    $json = defined('JSON_PRETTY_PRINT') ? json_encode($jsonData, JSON_PRETTY_PRINT) : json_encode($jsonData);
    echo javascript_tag('
var openpne = ' . $json . ';
');
}
op_smt_use_javascript('jquery.min.js');
op_smt_use_javascript('jquery.tmpl.min.js');
op_smt_use_javascript('smt_main');
op_smt_use_javascript('smt_notify');
op_smt_use_javascript('smt_tosaka');
op_smt_use_javascript('smt_menu');
op_smt_include_javascripts();
?>
</head>
<body id="<?php 
开发者ID:nise-nabe,项目名称:ppcon-sns,代码行数:30,代码来源:smtLayoutSns.php

示例14: include_http_metas

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<head>
<?php 
include_http_metas();
include_metas();
include_title();
op_smt_use_stylesheet('bootstrap');
op_smt_use_stylesheet('smt_main');
op_smt_include_stylesheets();
?>
<meta name="viewport" content="width=320px,user-scalable=no" />
<?php 
if (opConfig::get('enable_jsonapi') && opToolkit::isSecurePage()) {
    $jsonData = array('apiKey' => opToolkit::isSecurePage() ? $sf_user->getMemberApiKey() : '', 'apiBase' => app_url_for('api', 'homepage'), 'baseUrl' => $sf_request->getRelativeUrlRoot() . '/');
    echo javascript_tag('
var openpne = ' . json_encode($jsonData) . ';
');
}
op_smt_use_javascript('jquery.min.js');
op_smt_use_javascript('jquery.tmpl.min.js');
op_smt_use_javascript('smt_main');
op_smt_use_javascript('smt_notify');
op_smt_use_javascript('smt_tosaka');
op_smt_use_javascript('smt_menu');
op_smt_include_javascripts();
?>
</head>
<body id="<?php 
printf('page_%s_%s', $this->getModuleName(), $this->getActionName());
开发者ID:te-koyama,项目名称:openpne,代码行数:30,代码来源:smtLayoutSns.php

示例15: __

?>

<?php 
echo __('We suggest you to send birthday message to your friend.');
?>


<?php 
echo __('Birthday');
?>
 : <?php 
echo op_format_date(strtotime($birthMember->getProfile('op_preset_birthday')), 'XShortDateJa');
?>

<?php 
echo __('%nickname%', array('%nickname%' => $op_term['nickname']->titleize()));
?>
 : <?php 
echo $birthMember->name;
?>

<?php 
echo __('URL');
?>
 : <?php 
echo sfConfig::get('op_base_url') . app_url_for('pc_frontend', 'member/profile?id=' . $birthMember->id);
?>


<?php 
echo __('We hope that using %1% is useful for your future.', array('%1%' => $op_config['sns_name']));
开发者ID:phenom,项目名称:OpenPNE3,代码行数:31,代码来源:_birthday.php


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