• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP get_partial函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: printRelatorioHTMLPDF

 private function printRelatorioHTMLPDF($html)
 {
     $this->getContext()->getConfiguration()->loadHelpers('Partial');
     $mpdf = new mPDF('', 'A4', '', '', 5, 5, 37, 37, 3, 3);
     $mpdf->useOnlyCoreFonts = true;
     // false is default
     $mpdf->SetWatermarkText("PÉROLA NEGRA");
     $mpdf->showWatermarkText = true;
     $mpdf->watermark_font = 'DejaVuSansCondensed';
     $mpdf->watermarkTextAlpha = 0.1;
     $mpdf->SetDisplayMode('fullpage');
     $stylesheet = file_get_contents('css/relatorios.css');
     $mpdf->WriteHTML($stylesheet, 1);
     $mpdf->SetHTMLHeader(utf8_encode(get_partial('header')));
     $mpdf->SetHTMLFooter(utf8_encode(get_partial('footer')));
     $mpdf->SetMargins(0, 0, 65);
     $mpdf->WriteHTML(utf8_encode($html));
     $mpdf->Output();
 }
开发者ID:robertcosta,项目名称:symfony-condomino,代码行数:19,代码来源:actions.class.php


示例2: render

 public function render($options)
 {
     $options = $this->getOptions($options);
     $renderers = sfConfig::get('app_sympal_gallery_gallery_renderers');
     $partial = $renderers[$options['renderer'] ? $options['renderer'] : 'simple'];
     return get_partial($partial, array('gallery' => $this, 'options' => $options));
 }
开发者ID:phiamo,项目名称:sfSympalGalleryPlugin,代码行数:7,代码来源:PluginsfSympalGallery.class.php


示例3: sendSlotReachedMail

    public function sendSlotReachedMail() {
        $sf_i18n = sfContext::getInstance()->getI18N();
        $sf_i18n->setCulture($this->userSettings->userSettings['language']);
        $content['workflow'] = sfContext::getInstance()->getI18N()->__('Workflow' ,null,'slotreachedemail') . ' ' . $this->workflowTemplateSettings['name'];
        $content['currentslot'][0] = sfContext::getInstance()->getI18N()->__('The Slot' ,null,'slotreachedemail');
        $content['currentslot'][1] = $this->currentSlot['name'];
        $content['currentslot'][2] = sfContext::getInstance()->getI18N()->__('has been completed' ,null,'slotreachedemail');

        $content['nextSlot'][0] = sfContext::getInstance()->getI18N()->__('The new Slot' ,null,'slotreachedemail');
        $content['nextSlot'][1] = $this->nextSlot['name'];
        $content['nextSlot'][2] = sfContext::getInstance()->getI18N()->__('has been reached' ,null,'slotreachedemail');
        $subject = sfContext::getInstance()->getI18N()->__('CuteFlow: slot' ,null,'slotreachedemail') . ' ' . $this->nextSlot['name'] . ' ' . sfContext::getInstance()->getI18N()->__('reached' ,null,'slotreachedemail');
        $linkTo = sfContext::getInstance()->getI18N()->__('Direct link to workflow' ,null,'slotreachedemail');
        $this->setSender($this->userSettings->userSettings['systemreplyaddress']);
        $this->setReceiver(array ($this->userSettings->userData['email'] => $this->userSettings->userData['firstname'] . ' ' . $this->userSettings->userData['lastname']));
        $this->setSubject($subject);
        $this->setContentType('text/' . $this->userSettings->userSettings['emailformat']);
        $bodyData = array('text' => $content,
                          'userid' => $this->userSettings->userData['user_id'],
                          'workflowverion' => $this->workflowVersionId,
                          'workflow' => $this->workflowTemplateSettings['id'],
                          'linkto'  => $linkTo
                  );
        $this->setBody(get_partial('workflowdetail/' . $this->userSettings->userSettings['emailformat'] . 'SendSlotReached', $bodyData));
        $this->sendEmail();
    }
开发者ID:rlauenroth,项目名称:cuteflow_v3,代码行数:26,代码来源:SendSlotReachedEmail.class.php


示例4: sendEmailToStation

    /**
     * Send mail, plain or html only values
     */
    public function sendEmailToStation() {
        $sf_i18n = $this->data->context->getI18N();
        $sf_i18n->setCulture($this->data->userSettings->userSettings['language']);
        
        $subject = $this->data->context->getI18N()->__('CuteFlow: values to' ,null,'sendstationmail') . ' ' . $this->data->workflowDetailsData['workflow'];
        $linkTo = $this->data->context->getI18N()->__('Direct link to workflow' ,null,'sendstationmail');
        
        $content['workflow'][0] = $this->data->context->getI18N()->__('You have received values for the workflow' ,null,'sendstationmail');
        $content['workflow'][1] = $this->data->workflowDetailsData['workflow'];
        $content['workflow'][2] = $this->data->context->getI18N()->__('Slot' ,null,'sendstationmail');
        $content['workflow'][3] = $this->data->context->getI18N()->__('Yes' ,null,'sendstationmail');
        $content['workflow'][4] = $this->data->context->getI18N()->__('No' ,null,'sendstationmail');
        $content['workflow'][5] = $this->data->context->getI18N()->__('Field' ,null,'sendstationmail');
        $content['workflow'][6] = $this->data->context->getI18N()->__('Value' ,null,'sendstationmail');



        $this->setSender($this->data->userSettings->userSettings['systemreplyaddress']);
        $this->setReceiver(array ($this->data->userSettings->userData['email'] => $this->data->userSettings->userData['firstname'] . ' ' . $this->data->userSettings->userData['lastname']));
        $this->setSubject($subject);
        $this->setContentType('text/' . $this->data->userSettings->userSettings['emailformat']);
        $bodyData = array('text' => $content,
                          'userid' => $this->data->userSettings->userData['user_id'],
                          'workflowverion' => $this->data->versionId,
                          'workflow' => $this->data->templateId,
                          'slots' => $this->data->slots,
                          'serverPath' => $this->data->serverUrl,
                          'linkto'  => $linkTo
                  );
        
        
        $this->setBody(get_partial('sendreminderemail/' . $this->data->userSettings->userSettings['emailformat'] . 'SendValuesToStation', $bodyData));
        $this->setAttachments($this->data->attachments);
        $this->sendEmail();
    }
开发者ID:rlauenroth,项目名称:cuteflow_v3,代码行数:38,代码来源:PlainHtmlWithValues.class.php


示例5: authenticateUserRequest

 public function authenticateUserRequest()
 {
     $authResult = $this->authenticateKey($this->request->getParameter('_key'));
     switch ($authResult) {
         case self::AUTH_FAIL_KEY:
             $this->response->setStatusCode(401);
             sfLoader::loadHelpers('Partial');
             $partial = get_partial('global/401');
             $this->response->setContent($partial);
             $this->response->setHttpHeader('WWW-Authenticate', 'Your request must include a query parameter named "_key" with a valid API key value. To obtain an API key, visit http://api.littlesis.org/register');
             $this->response->sendHttpHeaders();
             $this->response->sendContent();
             throw new sfStopException();
             break;
         case self::AUTH_FAIL_LIMIT:
             $this->response = sfContext::getInstance()->getResponse();
             $this->response->setStatusCode(403);
             $user = Doctrine::getTable('ApiUser')->findOneByApiKey($this->request->getParameter('_key'));
             sfLoader::loadHelpers('Partial');
             $partial = get_partial('global/403', array('request_limit' => $user->request_limit));
             $this->response->setContent($partial);
             $this->response->sendHttpHeaders();
             $this->response->sendContent();
             throw new sfStopException();
             break;
         case self::AUTH_SUCCESS:
             break;
         default:
             throw new Exception("Invalid return value from LsApi::autheticate()");
     }
 }
开发者ID:silky,项目名称:littlesis,代码行数:31,代码来源:LsApiRequestFilter.class.php


示例6: updateTimeline

 public function updateTimeline($request)
 {
     $newObject = new ActivityData();
     $newObject->setMemberId($this->getUser()->getMemberId());
     $this->form = new TimelineDataForm($newObject);
     $params = $request->getParameter('activity_data');
     $this->form->bind($params);
     if ($this->form->isValid()) {
         $this->form->save();
         if ($request->isXmlHttpRequest()) {
             $this->getContext()->getConfiguration()->loadHelpers('Partial');
             return $this->renderText(get_partial('default/activityRecord', array('activity' => $this->form->getObject())));
         } else {
             $this->redirect($params['next_uri']);
         }
     } else {
         if ($request->isXmlHttpRequest()) {
             $this->getResponse()->setStatusCode(500);
         } else {
             $this->getUser()->setFlash('error', 'Failed to post %activity%.');
             if (isset($params['next_uri'])) {
                 $this->redirect($params['next_uri']);
             }
             $this->redirect('@homepage');
         }
     }
 }
开发者ID:aso,项目名称:opTimelinePlugin,代码行数:27,代码来源:opTimelineAction.class.php


示例7: execute

 protected function execute($arguments = array(), $options = array())
 {
     // initialize the database connection
     $databaseManager = new sfDatabaseManager($this->configuration);
     $connection = $databaseManager->getDatabase($options['connection'])->getConnection();
     $users = UserTable::getInstance()->findAllUnlocked();
     foreach ($users as $user) {
         if (false == TimeLogItemTable::getInstance()->updateMissedBookings(time(), $user)) {
             if ($user->Setting->reminder == true && $this->isWorkingDay(date('N'), $user)) {
                 $mailer = $this->getMailer();
                 $mailserver = sfConfig::get('app_system_email');
                 $context = sfContext::createInstance($this->configuration);
                 $this->configuration->loadHelpers('Partial');
                 $i18n = $this->getI18N($user->Setting->culture);
                 $subject = 'TimeHive - ' . $i18n->__('Missing Booking');
                 $body = get_partial('global/missingBookings', array('user' => $user, 'i18n' => $i18n));
                 $message = $mailer->compose($mailserver['from'], $user->email, $subject);
                 $message->setBody($body, 'text/html');
                 try {
                     $mailer->send($message);
                 } catch (Exception $e) {
                     $this->log($e->getMessage());
                 }
             }
         }
     }
 }
开发者ID:newZinc,项目名称:timehive,代码行数:27,代码来源:timehiveCheckmissingbookingsTask.class.php


示例8: executeIndex

 /**
  * Executes index action
  *
  * @param sfRequest $request A request object
  */
 public function executeIndex(sfWebRequest $request)
 {
     $this->user = $this->getUser();
     //$user_id = $_SESSION['symfony/user/sfUser/attributes']['symfony/user/sfUser/attributes']['user_id'];
     $user = $this->getUser()->getRaykuUser();
     if ($user) {
         $user_id = $user->getId();
     }
     if (!$user_id) {
         $this->forward('/dashboard');
     }
     $this->setVar('user_id', $user_id);
     //Form submitted
     if (sfWebRequest::POST == $this->getRequest()->getMethod()) {
         $emails = $this->getRequestParameter('emails');
         $ref = $this->getRequestParameter('ref');
         if (!$emails) {
             echo "Invalid emails";
             return false;
         }
         $mail = Mailman::createMailer();
         $mail->setContentType('text/html');
         $mail->addAddress($emails);
         $mail->setSubject('Invitation');
         sfProjectConfiguration::getActive()->loadHelpers(array('Asset', 'Url', 'Partial'));
         $mail->setBody(get_partial('invitationEmailHtml', array('ref' => $ref, 'user' => $user)));
         $mail->send();
         //$this->forward('referrals', 'invitesSent');
     }
 }
开发者ID:rayku,项目名称:rayku,代码行数:35,代码来源:actions.class.php


示例9: render

 public function render($name, $value = null, $attributes = array(), $errors = array())
 {
     sfContext::getInstance()->getConfiguration()->loadHelpers(array('Partial'));
     $default_parameters = array('form' => $this->getOption('form'), 'value' => $value, 'name' => $name);
     $parameters = array_merge($this->getOption('parameters'), $default_parameters);
     return get_partial($this->getOption('module') . '/' . $this->getOption('partial'), $parameters);
 }
开发者ID:nvidela,项目名称:kimkelen,代码行数:7,代码来源:mtWidgetFormPartial.class.php


示例10: sendInvoice

 public static function sendInvoice($booking, $sendto)
 {
     sfContext::getInstance()->getConfiguration()->loadHelpers('Partial');
     $mailer = sfContext::getInstance()->getMailer();
     $message = $mailer->compose(array('[email protected]' => 'lkm.ee'), $sendto, 'Invoice');
     $message->setBody(get_partial('Payment/invoice_email', array('booking' => $booking)), 'text/html');
     $mailer->send($message);
 }
开发者ID:sensorsix,项目名称:app,代码行数:8,代码来源:PaymentMailer.php


示例11: formatHelp

 /**
  * @param string $help
  *
  * @return string
  */
 public function formatHelp($help)
 {
     if (!$help) {
         return '';
     }
     use_helper('Partial');
     return get_partial('help/link-modal', array('name' => 'jenkins/addBuild/parameter-description', 'title' => "Parameter", 'params' => array('help' => $help)));
 }
开发者ID:xfifix,项目名称:Jenkins-Khan,代码行数:13,代码来源:sfWidgetFormSchemaFormatterJobParameter.class.php


示例12: buildDisplay

 /**
  * Method for building display of an item on pagination lists.
  * Currently just calles symfony template after building up some
  * parameters to pass along.  Might not be most effecient method.
  * I think building an html string would be better on resources,
  * but a pain to construct, even as a HEREDOC.
  * @param Array $part, passed by reference for updating/appending
  * @param Array $specs_preview_fields, the fields most relevant for the current part category
  */
 public function buildDisplay(&$part, $specs_preview_fields)
 {
     // load 'Partial' helper from symfony library
     sfProjectConfiguration::getActive()->loadHelpers('Partial');
     //$cat_singular = LWS::getCategoryName($part['cat_slug'], true);
     $part['anchor_text'] = "{$part['part_no']}";
     // might want to change it for seo reasons, etc.
     $part['layout'] = get_partial('toolkit/basicListDisplay', array('part' => $part, 'display' => $part['display'], 'specs_preview_fields' => $specs_preview_fields));
 }
开发者ID:morganney,项目名称:livewire,代码行数:18,代码来源:BasicPartListDisplayDecorator.class.php


示例13: get_sympal_comments

function get_sympal_comments($content)
{
    $approvedComments = array();
    foreach ($content->getComments() as $comment) {
        if ($comment->isApproved()) {
            $approvedComments[] = $comment;
        }
    }
    return get_partial('sympal_comments/for_content', array('content' => $content, 'comments' => $approvedComments, 'form' => get_sympal_new_comment_form($content)));
}
开发者ID:slemoigne,项目名称:sympal,代码行数:10,代码来源:CommentsHelper.php


示例14: configure

 public function configure()
 {
     $target = $this->getOption('target');
     $options = array('file_src' => '', 'is_image' => true, 'with_delete' => false, 'label' => sfInflector::humanize($target));
     sfContext::getInstance()->getConfiguration()->loadHelpers('Partial');
     $options['template'] = get_partial('opSkinClassicPlugin/formEditImage', array('target' => $target));
     $this->setWidget('image', new sfWidgetFormInputFileEditable($options, array('size' => 10)));
     $this->setValidator('image', new opValidatorImageFile(array('required' => true)));
     $this->widgetSchema->setNameFormat('image[' . $target . '][%s]');
 }
开发者ID:kawahara,项目名称:OpenPNE3,代码行数:10,代码来源:opSkinClassicImageForm.class.php


示例15: returnJSON

 public function returnJSON($data)
 {
     $json = json_encode($data);
     if (sfConfig::get('sf_debug') && !$this->getRequest()->isXmlHttpRequest()) {
         $this->getContext()->getConfiguration()->loadHelpers('Partial');
         $this->renderText(get_partial('sfVkontakteFetch/jsonDebug', array('data' => $data, 'json' => $json)));
     } else {
         $this->getResponse()->setHttpHeader('Content-type', 'application/json');
         $this->renderText($json);
     }
     return sfView::NONE;
 }
开发者ID:vkapp,项目名称:sfVkontaktePlugin,代码行数:12,代码来源:sfVkontakteActions.class.php


示例16: executeCompute

 public function executeCompute(sfWebRequest $request)
 {
     sfContext::getInstance()->getConfiguration()->loadHelpers('Partial');
     //       $heroId = $request->getParameter('heroId');
     $heroLevel = $request->getParameter('heroLevel');
     //       $itemIds = $request->getParameter('itemIds');
     $heroId = 1;
     $itemIds = array(1, 2);
     echo json_encode(array('html' => get_partial('main/stats', array('data' => DotaResourceData::getInstance()->getData($heroId, $heroLevel, $itemIds)))));
     $this->getResponse()->setContentType('text/json');
     exit;
 }
开发者ID:nashlesigon,项目名称:project-dota,代码行数:12,代码来源:actions.class.php


示例17: render

 /**
  * Renders the widget.
  *
  * @param  string $name        The element name
  * @param  string $value       The value displayed in this widget
  * @param  array  $attributes  An array of HTML attributes to be merged with the default HTML attributes
  * @param  array  $errors      An array of errors for the field
  *
  * @return string An HTML tag string
  *
  * @see sfWidgetForm
  */
 public function render($name, $value = null, $attributes = array(), $errors = array())
 {
     sfContext::getInstance()->getConfiguration()->loadHelpers(array('Partial'));
     $fields = $this->getParent()->getFields();
     $options = is_array($this->getOption('params')) ? $this->getOption('params') : array($this->getOption('params'));
     $partial = get_partial($this->getOption('partial'), array_merge(compact('value', 'name', 'attributes', 'errors'), $options));
     if (false !== $this->getOption('has_hidden')) {
         $hiddenInput = new sfWidgetFormInputHidden();
         return $partial . $hiddenInput->render($name, $value, $attributes, $errors);
     }
     return $partial;
 }
开发者ID:nova76,项目名称:nova-plugins,代码行数:24,代码来源:sfWidgetFormPartial.class.php


示例18: setPhoto

 public function setPhoto()
 {
     $options = array('file_src' => '', 'is_image' => true, 'with_delete' => false, 'label' => 'CoverImage', 'edit_mode' => !$this->isNew());
     if (!$this->isNew() && $this->getObject()->getFileId()) {
         sfContext::getInstance()->getConfiguration()->loadHelpers('Partial');
         $options['template'] = get_partial('album/formEditImage', array('image' => $this->getObject()));
         $options['with_delete'] = true;
         $this->setValidator('file_id_delete', new sfValidatorBoolean(array('required' => false)));
     }
     $this->setWidget('file_id', new sfWidgetFormInputFileEditable($options, array('size' => 40)));
     $this->setValidator('file_id', new opValidatorImageFile(array('required' => false)));
 }
开发者ID:balibali,项目名称:opAlbumPlugin,代码行数:12,代码来源:PluginAlbumForm.class.php


示例19: render

 /**
  * Render the image browser widget
  *
  * @param string $name
  * @param mixed $value
  * @param array $attributes
  * @param array $errors
  * @return string Widget HTML
  */
 public function render($name, $value = null, $attributes = array(), $errors = array())
 {
     sfContext::getInstance()->getConfiguration()->loadHelpers(array('Partial'));
     $object = $this->getOption('object');
     $per_page = sfConfig::get('app_sf_image_pool_chooser_per_page', 24);
     $tag = $object->getTagRestriction();
     if ($tag) {
         $tag = implode(',', $tag);
     }
     // Because we use this for image upload
     $vars = array('pager' => sfImagePoolImageTable::getInstance()->getPager($per_page, 1, $object), 'name' => $name, 'object' => $object, 'per_page' => $per_page, 'images' => $object->getPoolImages(), 'multiple' => (bool) $object->allowSelectMultiple(), 'tag' => $tag);
     return get_partial('sfImagePoolAdmin/widget', $vars);
 }
开发者ID:nixilla,项目名称:sfImagePoolPlugin,代码行数:22,代码来源:sfWidgetFormImagePoolChooser.class.php


示例20: sendConfirmationEmail

 private function sendConfirmationEmail(User $user, $question)
 {
     $mail = Mailman::createMailer();
     $mail->setContentType('text/html');
     $mail->addAddress($user->getEmail());
     $mail->setSubject('Activate your new account');
     sfProjectConfiguration::getActive()->loadHelpers(array('Asset', 'Url', 'Partial'));
     $confirmationCode = array('code' => $user->getConfirmationCode(), 'question' => $question);
     $confirmationCode = base64_encode(serialize($confirmationCode));
     $mail->setBody(get_partial('activationEmail', array('confirmationCode' => $confirmationCode, 'user' => $user)));
     $mail->setAltBody(get_partial('activationEmailHtml', array('confirmationCode' => url_for('@register_confirm?code=' . $confirmationCode, true), 'user' => $user)));
     $mail->send();
 }
开发者ID:rayku,项目名称:rayku,代码行数:13,代码来源:actions.class.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_passage函数代码示例发布时间:2022-05-15
下一篇:
PHP get_parent_post_rel_link函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap