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


PHP include_partial函数代码示例

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


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

示例1: render_form_row

/**
 * Converts a mardown string into HTML
 *
 * sfWidgetFormTextarea
 * sfWidgetFormInput
 * sfWidgetFormInputCheckbox
 * 
 * @package    Reditype
 * @subpackage helper
 * @author     Piers Warmers <piers@wranglers.com.au>
 * @param      sfFormField $widget
 * @param      array $options
 * @return     string
 */
function render_form_row(sfFormField $widget, $options = array())
{
    $options['wide'] = isset($options['wide']) ? $options['wide'] : true;
    $options['space'] = isset($options['space']) ? $options['wide'] : false;
    $options['class'] = isset($options['class']) ? $options['class'] : 'rt-form-row';
    $options['markdown'] = isset($options['markdown']) ? $options['markdown'] : false;
    $content = '';
    if ($options['markdown']) {
        ob_start();
        include_partial('rtSearch/ajaxForm', array('form' => new rtSearchForm(), 'targetId' => 'rt_wiki_page_en_content'));
        $content = ob_get_contents();
        ob_end_clean();
    }
    $html = '';
    $widget->renderHelp();
    $help = $widget->getParent()->getWidget()->getHelp($widget->getName());
    if (get_class($widget->getWidget()) === 'sfWidgetFormInputCheckbox') {
        $html = sprintf('<tr class="%1$s checkbox"><th><label for="%6$s">%2$s</label></th><td>%4$s <div class="help">%5$s</div> %3$s</td></tr>', $options['class'], $widget->renderLabelName(), $widget->hasError() ? $widget->renderError() : '', $widget->render(), $help, $widget->renderId());
    } elseif (in_array(get_class($widget->getWidget()), array('sfWidgetFormChoice', 'sfWidgetFormDate', 'sfWidgetFormDateTime'))) {
        $html = sprintf('<tr class="%1$s checkbox"><th><label>%2$s</label></th><td>%4$s <div class="help">%5$s</div> %3$s</td></tr>', $options['class'], $widget->renderLabelName(), $widget->hasError() ? $widget->renderError() : '', $widget->render(), $help);
    } else {
        $html = sprintf('<tr class="%1$s standard"><th><label for="%2$s">%3$s</label></th><td>%4$s %5$s <div class="help">%6$s</div>%7$s</tr>', $options['class'], $widget->renderId(), $widget->renderLabelName(), $widget->hasError() ? '<span class="error">' . $widget->renderError() . '</span>' : '', $widget->render(), $help, $content);
    }
    return $html . "\n";
}
开发者ID:pierswarmers,项目名称:rtCorePlugin,代码行数:39,代码来源:rtFormHelper.php

示例2: render

 public function render()
 {
     sfContext::getInstance()->getConfiguration()->loadHelpers('Partial');
     $text = 'Which is most important?';
     include_partial('criterion_prioritization', array('decision' => $this->decision, 'text' => $text));
     parent::render();
 }
开发者ID:sensorsix,项目名称:app,代码行数:7,代码来源:CriterionPairwiseComparisonMeasurement.class.php

示例3: executeUserBar

 public function executeUserBar(sfWebRequest $request)
 {
     if (!$this->getUser()->isAuthenticated()) {
         include_component('user', 'userBarLogIn');
     } else {
         include_partial('user/userBarInfo');
     }
 }
开发者ID:robinkanters,项目名称:dnsleergemeenschap,代码行数:8,代码来源:components.class.php

示例4: include_partial

function include_partial($partial, $i = NULL)
{
    global $CONF;
    if (file_exists($partial)) {
        include $partial;
    } else {
        echo '<h1>Mmm... no encontrado</h1><p>A ver si te vale algo de esto:</p>';
        include_partial("inicio.html");
    }
}
开发者ID:alvarobp,项目名称:mapmyfavs,代码行数:10,代码来源:_functions.php

示例5: display_page_header

function display_page_header($module, $document, $id, $metadata, $current_version, $options = array())
{
    $is_archive = $document->isArchive();
    $mobile_version = c2cTools::mobileVersion();
    $content_class = $module . '_content';
    $lang = $document->getCulture();
    $version = $is_archive ? $document->getVersion() : NULL;
    $slug = '';
    $prepend = _option($options, 'prepend', '');
    $separator = _option($options, 'separator', '');
    $nav_options = _option($options, 'nav_options');
    $item_type = _option($options, 'item_type', '');
    $nb_comments = _option($options, 'nb_comments');
    $creator_id = _option($options, 'creator_id');
    if (!$is_archive) {
        if ($module != 'users') {
            $slug = get_slug($document);
            $url = "@document_by_id_lang_slug?module={$module}&id={$id}&lang={$lang}&slug={$slug}";
        } else {
            $url = "@document_by_id_lang?module={$module}&id={$id}&lang={$lang}";
        }
    } else {
        $url = "@document_by_id_lang_version?module={$module}&id={$id}&lang={$lang}&version={$version}";
    }
    if (!empty($prepend)) {
        $prepend .= $separator;
    }
    echo display_title($prepend . $document->get('name'), $module, true, 'default_nav', $url);
    if (!$mobile_version) {
        echo '<div id="nav_space">&nbsp;</div>';
        sfLoader::loadHelpers('WikiTabs');
        $tabs = tabs_list_tag($id, $lang, $document->isAvailable(), 'view', $version, $slug, $nb_comments);
        echo $tabs;
        // liens internes vers les sections repliables du document
        if ($nav_options == null) {
            include_partial("{$module}/nav_anchor");
        } else {
            include_partial("{$module}/nav_anchor", array('section_list' => $nav_options));
        }
        // boutons vers des fonctions annexes et de gestion du document
        include_partial("{$module}/nav", isset($creator_id) ? array('id' => $id, 'document' => $document, 'creator_id' => $creator_id) : array('id' => $id, 'document' => $document));
        if ($module != 'users') {
            sfLoader::loadHelpers('Button');
            echo '<div id="nav_share" class="nav_box">' . button_share() . '</div>';
        }
    }
    echo display_content_top('doc_content', $item_type);
    echo start_content_tag($content_class);
    if ($merged_into = $document->get('redirects_to')) {
        include_partial('documents/merged_warning', array('merged_into' => $merged_into));
    }
    if ($is_archive) {
        include_partial('documents/versions_browser', array('id' => $id, 'document' => $document, 'metadata' => $metadata, 'current_version' => $current_version));
    }
}
开发者ID:snouhaud,项目名称:camptocamp.org,代码行数:55,代码来源:ViewerHelper.php

示例6: loadServicesPartials_old

 public static function loadServicesPartials_old(EtvaServer $etva_server)
 {
     $server_services = $etva_server->getEtvaServices();
     $module_agent = strtolower($etva_server->getAgentTmpl());
     $directory = sfContext::getInstance()->getConfiguration()->getTemplateDir(strtolower($etva_server->getAgentTmpl()), 'viewSuccess.php');
     $services_data = self::listDir($directory, '/_ETVOIP_([^_]+)\\.php/');
     die;
     foreach ($server_services as $service) {
         $tmpl = $etva_server->getAgentTmpl() . '_' . $service->getNameTmpl();
         $service_path = sfContext::getInstance()->getConfiguration()->getTemplateDir($module_agent, '_' . $tmpl . '.php');
         if ($service_path) {
             include_partial($module_agent . '/' . $tmpl, array('etva_server' => $etva_server, 'etva_service' => $service));
         }
     }
 }
开发者ID:ketheriel,项目名称:ETVA,代码行数:15,代码来源:Etva.class.php

示例7: render

 public function render($name, $value = null, $attributes = array(), $errors = array())
 {
     $default_buttons = array('add_file' => 'Add files...', 'upload' => 'Start upload', 'cancel' => 'Cancel upload');
     $buttons = $this->getOption('buttons') + $default_buttons;
     $module_partial = $this->getOption('module_partial');
     if ($module_partial) {
         sfApplicationConfiguration::getActive()->loadHelpers('Partial');
         include_partial($module_partial, array('widget' => $this, 'name' => $name, 'value' => $value, 'attributes' => $attributes, 'errors' => $errors, 'buttons' => $buttons));
     } else {
         $context = sfContext::getInstance();
         $view = new sfPartialView($context, '', '', '');
         $plugin_path = sfConfig::get('sf_plugins_dir') . DIRECTORY_SEPARATOR . 'laWidgetFileUploadPlugin';
         $view->setTemplate($plugin_path . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR . '_upload_widget.php');
         $view->setPartialVars(array('widget' => $this, 'buttons' => $buttons));
         echo $view->render();
     }
 }
开发者ID:sensorsix,项目名称:app,代码行数:17,代码来源:laWidgetFileUpload.class.php

示例8: _loadJsOamTools

function _loadJsOamTools()
{
    $debug = sfContext::getInstance()->getRequest()->getParameter('debug', false);
    $async_map = sfConfig::get('app_async_map', false);
    $lang = sfContext::getInstance()->getUser()->getCulture();
    if ($debug) {
        include_partial('documents/map_lib_include_debug');
    } else {
        use_stylesheet('/static/css/carto_base.css', 'custom');
        use_stylesheet('/static/css/popup.css', 'custom');
        if (!$async_map) {
            use_javascript('/static/js/carto/build/carto.min.js', 'maps');
        }
    }
    use_stylesheet('/static/css/carto.css', 'custom');
    if (!$async_map || $debug) {
        use_javascript("/static/js/carto/build/lang-{$lang}.min.js", 'maps');
        use_javascript('/static/js/popup.js', 'maps');
        use_javascript('/static/js/carto/embedded.js', 'maps');
    }
}
开发者ID:snouhaud,项目名称:camptocamp.org,代码行数:21,代码来源:OamMapHelper.php

示例9: slot

<?php slot('sidebar') ?>
  <?php include_partial('dsRegistration/sidebar') ?>  
<?php end_slot() ?>


<?php use_helper('Date', 'I18N') ?>
  <?php include_partial('global/flashes') ?>  
    
  <h2><?php echo __('Registrations / Inbox', array(), 'messages') ?></h2>


  <div class="form-container">
    <?php include_partial('dsRegistration/list', array('pager' => $pager, 'helper' => $helper)) ?>
    <div class="actions">


    </div>
  </div>
开发者ID:romankallweit,项目名称:swingmachine,代码行数:18,代码来源:indexSuccess.php

示例10: use_helper

<?php

use_helper('Object', 'Validation');
echo form_remote_tag(array('url' => 'job_category/update', 'update' => 'content', 'script' => 'true', 'name' => 'edit_form', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"));
echo include_partial('global/tab2', array('modules' => $modules, 'actions2' => $actions2));
echo include_partial('global/title4', array('actions' => $actions, 'subtitle' => $subtitle . ($sf_request->hasErrors() ? '<div class=form_error>* ' . __('_FORM_HAS_ERROR_') . '</div>' : ''), 'type' => $type, 'title' => __('Kategori Menu')));
echo object_input_hidden_tag($job_category, 'getId');
echo input_hidden_tag('action_type', '');
?>
<table class="form">
<tr><td class="form">
	<table class="form_content" width="100%">
	<tbody>
		<tr>
           <td class='first' width="15%" style="vertical-align:middle;"><label><?php 
echo __('Code');
?>
</label></td>
           <td class="first" width="2%" style="text-align:center; vertical-align:middle;">:</td>
		   <td class="first" style="vertical-align:middle;">
			<?php 
echo object_input_tag($job_category, 'getCode', array('size' => 40, 'maxlength' => 64));
?>
			<?php 
echo form_error('code');
?>
           </td>         
        </tr>
        <tr>
           <td style="vertical-align:middle;"><label><?php 
echo __('Name');
开发者ID:taryono,项目名称:school,代码行数:31,代码来源:editSuccess.php

示例11: include_partial

<?php

// auto-generated by sfPropelCrud
// date: 2008/01/06 22:48:10
echo include_partial('global/title', array('actions' => $actions, 'type' => 'detail', 'subtitle' => $subtitle, 'title' => __('ClassGroup')));
?>
<table class="detail">
<tr><td class="detail">
		<table class="detail_content">
			<tbody>
				<tr><td class='first'>
					<label ><?php 
echo __('Code');
?>
</label><br/>
					<p class="detail"><?php 
echo $class_group->getCode();
?>
</p>
				</td></tr>
				<tr>
					<td >
						<label ><?php 
echo __('Parent');
?>
</label>
						<br/>
						<p class="detail"><?php 
echo $class_group->getParent() ? link_to_remote($class_group->getParentName(), array('url' => 'class_group/show?id=' . $class_group->getParent(), 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'white')) : '-';
?>
</p>
开发者ID:taryono,项目名称:school,代码行数:31,代码来源:showSuccess.php

示例12: foreach

      </thead>
      <tbody>
        <?php 
foreach ($activities as $activity) {
    ?>
          <?php 
    if (!$activity->getDeal()) {
        continue;
    }
    ?>
        <tr>
          <td><?php 
    echo $activity->getDeal()->getMotivationTitle();
    ?>
</td>
          <td><?php 
    echo $activity->getDeal()->getMotivationText();
    ?>
</td>
          <td><?php 
    include_partial("profile/coupon_" . $activity->getDeal()->getCouponType(), array("activity" => $activity));
    ?>
</td>
        </tr>
        <?php 
}
?>
      </tbody>
    </table>
  </div>
</div>
开发者ID:42medien,项目名称:spreadly,代码行数:31,代码来源:indexSuccess.php

示例13: use_helper

<?php

use_helper('Object', 'myHelper');
?>

<?php 
foreach ($students as $student) {
    echo include_partial('global/printCover');
    ?>
                    <!-- Tingkat TK -->
                    <?php 
    if ($academic_calendar->getDepartment()->getCourseModel() == Department::CM_TK) {
        ?>

                                
                                            <table width="100%" border="0" style="page-break-after: always;">
                                                <tr>
                                                    <td width="40%">
                                                        <div style="border: 4px solid black; width: 100%; height: 530px;"></div>
                                                    </td>
                                                    <td align="center">
                                                        <table border="0" width="100%"> 
                                                             <tr><td height="10px"></td></tr>
                                                             <tr><td align="center"><img  src='<?php 
        echo image_path('logo_ypi.jpg', true);
        ?>
' border=0 ></td></tr>
                                                             <tr><td height="10px"</tr>
                                                             
                                                             <!-- Kelompok Bermain -->
                                                            <?php 
开发者ID:taryono,项目名称:school,代码行数:31,代码来源:printCoverSuccess.php

示例14: include_partial

</div>
</div>
</div>
-->

<?php 
include_partial('default/bmenu0');
?>
<div id="footer">
<div id="footerInner">
<div id="footerInner2">
<?php 
include_partial('default/bmenu1', array('menu' => $menu));
include_partial('default/copy');
?>
</div>
<div id="counters"><?php 
include_partial('default/counters');
?>
</div>
<div id="flogo"><?php 
include_partial('default/logo1');
?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
开发者ID:serg-smirnoff,项目名称:symfony-pposter,代码行数:31,代码来源:indexSuccess.php

示例15: include_partial

<?php

if ($sf_user->hasFlash('notice')) {
    ?>
  <div class="ui-widget">
      <div class="ui-state-highlight ui-corner-all" style="margin-top: 20px; padding: 0 .7em;">
        <p><span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>
        <?php 
    echo $sf_user->getFlash('notice');
    ?>
</p>
      </div>
  </div>
<?php 
}
?>
<h1>Editar Categoria</h1>

<?php 
include_partial('form', array('form' => $form));
开发者ID:recchia,项目名称:solmed,代码行数:20,代码来源:editSuccess.php


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