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


PHP get_partial函数代码示例

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


在下文中一共展示了get_partial函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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('maakler@lkm.ee' => '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


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