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


PHP FRoute::search方法代码示例

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


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

示例1: onDisplay

 /**
  * Responsible to output the html codes that is displayed to
  * a user when their profile is viewed.
  *
  * @since	1.0
  * @access	public
  */
 public function onDisplay($user)
 {
     $value = $this->value;
     if (!$value) {
         return;
     }
     if (!$this->allowedPrivacy($user)) {
         return;
     }
     // If there's no http:// or https:// , automatically append http://
     if (stristr($value, 'http://') === false && stristr($value, 'https://') === false) {
         $value = 'http://' . $value;
     }
     // Push vars to the theme
     $this->set('value', $this->escape($value));
     // linkage to advanced search page.
     $field = $this->field;
     if ($field->searchable) {
         $params = array('layout' => 'advanced');
         $params['criterias[]'] = $field->unique_key . '|' . $field->element;
         $params['operators[]'] = 'contain';
         $params['conditions[]'] = $this->escape($this->value);
         $advsearchLink = FRoute::search($params);
         $this->set('advancedsearchlink', $advsearchLink);
     }
     return $this->display();
 }
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:34,代码来源:url.php

示例2: onDisplay

 /**
  * Responsible to output the html codes that is displayed to
  * a user when their profile is viewed.
  *
  * @since	1.0
  * @access	public
  */
 public function onDisplay($user)
 {
     $value = $this->value;
     if ($value == '') {
         return;
     }
     if (!$this->allowedPrivacy($user)) {
         return;
     }
     // linkage to advanced search page.
     $field = $this->field;
     if ($field->searchable) {
         $params = array('layout' => 'advanced');
         $params['criterias[]'] = $field->unique_key . '|' . $field->element;
         $params['operators[]'] = 'equal';
         $params['conditions[]'] = $this->value;
         $advsearchLink = FRoute::search($params);
         $this->set('advancedsearchlink', $advsearchLink);
     }
     // Push variables into theme.
     $this->set('value', $value);
     return $this->display();
 }
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:30,代码来源:boolean.php

示例3: profileHeaderA

 /**
  * Displays the gender in the position profileHeaderA
  *
  * @since	1.0
  * @access	public
  * @param	string
  * @return
  */
 public function profileHeaderA($key, $user, $field)
 {
     $dateString = '';
     $theme = FD::themes();
     $regDate = FD::date($user->registerDate);
     // linkage to advanced search page.
     if ($field->searchable) {
         $date = $regDate->toFormat('Y-m-d');
         $params = array('layout' => 'advanced');
         $params['criterias[]'] = $field->unique_key . '|' . $field->element;
         $params['operators[]'] = 'between';
         $params['conditions[]'] = $date . ' 00:00:00' . '|' . $date . ' 23:59:59';
         $advsearchLink = FRoute::search($params);
         $theme->set('advancedsearchlink', $advsearchLink);
     }
     $fieldParams = $field->getParams();
     $format = 'd M Y';
     switch ($fieldParams->get('date_format')) {
         case 2:
         case '2':
             $format = 'M d Y';
             break;
         case 3:
         case '3':
             $format = 'Y d M';
             break;
         case 4:
         case '4':
             $format = 'Y M d';
             break;
     }
     $dateString = $regDate->toFormat($format);
     $dateString = JText::sprintf('PLG_FIELDS_JOOMLA_JOINDATE_WIDGETS_MEMBER_SINCE', $dateString);
     $theme->set('value', $dateString);
     echo $theme->output('fields/user/joomla_joindate/widgets/display');
 }
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:44,代码来源:view.html.php

示例4: profileHeaderA

 /**
  * Displays the gender in the position profileHeaderA
  *
  * @since	1.0
  * @access	public
  * @param	string
  * @return
  */
 public function profileHeaderA($key, $user, $field)
 {
     $dateString = '';
     $theme = FD::themes();
     if ($user->lastvisitDate == '' || $user->lastvisitDate == '0000-00-00 00:00:00') {
         $dateString = JText::_('PLG_FIELDS_JOOMLA_LASTLOGIN_WIDGETS_NEVER_LOGGED_IN');
     } else {
         $llDate = FD::date($user->lastvisitDate);
         // linkage to advanced search page.
         if ($field->searchable) {
             $date = $llDate->toFormat('Y-m-d');
             $params = array('layout' => 'advanced');
             $params['criterias[]'] = $field->unique_key . '|' . $field->element;
             $params['operators[]'] = 'between';
             $params['conditions[]'] = $date . ' 00:00:00' . '|' . $date . ' 23:59:59';
             $advsearchLink = FRoute::search($params);
             $theme->set('advancedsearchlink', $advsearchLink);
         }
         $dateString = $llDate->toLapsed();
         $dateString = JText::sprintf('PLG_FIELDS_JOOMLA_LASTLOGIN_WIDGETS_LAST_LOGGED_IN', $dateString);
     }
     $theme->set('value', $dateString);
     echo $theme->output('fields/user/joomla_lastlogin/widgets/display');
 }
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:32,代码来源:view.html.php

示例5:

<li class="custom-filter<?php 
echo $fid == $filter->id ? ' active' : '';
?>
"
	data-sidebar-menu
	data-sidebar-item
	data-id="<?php 
echo $filter->id;
?>
"
	data-search-filter-<?php 
echo $filter->id;
?>
>
	<a href="<?php 
echo FRoute::search(array('layout' => 'advanced', 'fid' => $filter->getAlias()));
?>
"
		data-type="custom"
		data-search-filter-item
		data-id="<?php 
echo $filter->id;
?>
"
		data-title="<?php 
echo $this->html('string.escape', $filter->title);
?>
"
	>
		<i class="ies-list mr-5"></i> <?php 
echo $this->html('string.escape', $filter->title);
开发者ID:knigherrant,项目名称:decopatio,代码行数:31,代码来源:sidebar.filter.item.php

示例6: onDisplay

 /**
  * Responsible to output the html codes that is displayed to
  * a user when their profile is viewed.
  *
  * @since	1.0
  * @access	public
  */
 public function onDisplay($user)
 {
     $value = $this->value;
     if (!$value) {
         return;
     }
     if (!$this->allowedPrivacy($user)) {
         return;
     }
     $option = FD::table('fieldoptions');
     $option->load(array('parent_id' => $this->field->id, 'key' => 'items', 'value' => $value));
     $field = $this->field;
     if ($field->searchable) {
         $params = array('layout' => 'advanced');
         $params['criterias[]'] = $field->unique_key . '|' . $field->element;
         $params['operators[]'] = 'equal';
         $params['conditions[]'] = $this->value;
         $advsearchLink = FRoute::search($params);
         $this->set('advancedsearchlink', $advsearchLink);
     }
     // Push variables into theme.
     $this->set('option', $option);
     $this->set('value', $value);
     return $this->display();
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:32,代码来源:dropdown.php

示例7: onDisplay

 public function onDisplay($user)
 {
     $regDate = FD::date($user->registerDate);
     $format = 'd M Y';
     switch ($this->params->get('date_format')) {
         case 2:
         case '2':
             $format = 'M d Y';
             break;
         case 3:
         case '3':
             $format = 'Y d M';
             break;
         case 4:
         case '4':
             $format = 'Y M d';
             break;
     }
     // linkage to advanced search page.
     // place the code here so that the timezone wont kick in. we search the date using GMT value.
     $field = $this->field;
     if ($field->searchable) {
         $date = $regDate->toFormat('Y-m-d');
         $params = array('layout' => 'advanced');
         $params['criterias[]'] = $field->unique_key . '|' . $field->element;
         $params['operators[]'] = 'between';
         $params['conditions[]'] = $date . ' 00:00:00' . '|' . $date . ' 23:59:59';
         $advsearchLink = FRoute::search($params);
         $this->set('advancedsearchlink', $advsearchLink);
     }
     $this->set('date', $regDate->toFormat($format));
     return $this->display();
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:33,代码来源:joomla_joindate.php

示例8: onDisplay

 public function onDisplay($user)
 {
     if ($user->lastvisitDate == '' || $user->lastvisitDate == '0000-00-00 00:00:00') {
         $this->set('date', JText::_('PLG_FIELDS_JOOMLA_LASTLOGIN_WIDGETS_NEVER_LOGGED_IN'));
     }
     $llDate = FD::date($user->lastvisitDate);
     $format = 'd M Y';
     switch ($this->params->get('date_format')) {
         case 2:
         case '2':
             $format = 'M d Y';
             break;
         case 3:
         case '3':
             $format = 'Y d M';
             break;
         case 4:
         case '4':
             $format = 'Y M d';
             break;
     }
     $format .= ' H:i:s';
     // linkage to advanced search page.
     // place the code here so that the timezone wont kick in. we search the date using GMT value.
     $field = $this->field;
     if ($field->searchable) {
         $date = $llDate->toFormat('Y-m-d');
         $params = array('layout' => 'advanced');
         $params['criterias[]'] = $field->unique_key . '|' . $field->element;
         $params['operators[]'] = 'between';
         $params['conditions[]'] = $date . ' 00:00:00' . '|' . $date . ' 23:59:59';
         $advsearchLink = FRoute::search($params);
         $this->set('advancedsearchlink', $advsearchLink);
     }
     $this->set('date', $llDate->toFormat($format));
     return $this->display();
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:37,代码来源:joomla_lastlogin.php

示例9: onDisplay

 public function onDisplay($user)
 {
     if (!$this->allowedPrivacy($user)) {
         return;
     }
     $model = $this->model('relations');
     $relation = $model->getActorRelationship($user->id);
     if (!$relation) {
         return;
     }
     // linkage to advanced search page.
     $field = $this->field;
     if ($field->searchable) {
         $params = array('layout' => 'advanced');
         $params['criterias[]'] = $field->unique_key . '|' . $field->element;
         $params['operators[]'] = 'equal';
         $params['conditions[]'] = $relation->getType()->value;
         $advsearchLink = FRoute::search($params);
         $this->set('advancedsearchlink', $advsearchLink);
     }
     $this->set('relation', $relation);
     return $this->display();
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:23,代码来源:relationship.php

示例10: onDisplay

 public function onDisplay($user)
 {
     $value = $this->value;
     if (!$value) {
         return;
     }
     $value = FD::makeObject($value);
     if (!$this->allowedPrivacy($user)) {
         return;
     }
     $field = $this->field;
     $options = array();
     foreach ($value as $v) {
         $option = FD::table('fieldoptions');
         $option->load(array('parent_id' => $this->field->id, 'key' => 'items', 'value' => $v));
         if ($field->searchable) {
             $params = array('layout' => 'advanced');
             $params['criterias[]'] = $field->unique_key . '|' . $field->element;
             $params['operators[]'] = 'contain';
             $params['conditions[]'] = $v;
             $advsearchLink = FRoute::search($params);
             $option->advancedsearchlink = $advsearchLink;
         }
         $options[] = $option;
     }
     // echo '<pre>';print_r( $value );echo '</pre>';
     $this->set('options', $options);
     return $this->display();
 }
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:29,代码来源:checkbox.php

示例11: formatMini

 public function formatMini($results, $q, $highlight = true)
 {
     $config = FD::config();
     $data = array();
     if ($results) {
         $searchRegex = '';
         $hlword = $q;
         if ($hlword) {
             $searchRegex = '#(';
             $searchRegex .= preg_quote($hlword, '#');
             $searchRegex .= '(?!(?>[^<]*(?:<(?!/?a\\b)[^<]*)*)</a>))#iu';
         }
         foreach ($results as $row) {
             $obj = new SocialSearchItem();
             $obj->link = FRoute::search(array('q' => urlencode($row)));
             //lets process the content and title highlight
             $title = $row;
             if ($highlight) {
                 if ($title) {
                     $title = preg_replace($searchRegex, '<span class="highlight">\\0</span>', $title);
                 }
             }
             $obj->title = $title;
             $data[] = $obj;
         }
     }
     return $data;
 }
开发者ID:ppantilla,项目名称:bbninja,代码行数:28,代码来源:search.php

示例12: defined

*/
defined('_JEXEC') or die('Unauthorized Access');
?>
<ul class="list-unstyled">
<?php 
foreach ($value as $v) {
    ?>
	<li>
        <?php 
    $advsearchLink = '';
    if (isset($field) && $field->searchable && $v) {
        $params = array('layout' => 'advanced');
        $params['criterias[]'] = $field->unique_key . '|' . $field->element;
        $params['operators[]'] = 'contain';
        $params['conditions[]'] = $v;
        $advsearchLink = FRoute::search($params);
    }
    ?>
        <?php 
    echo isset($advsearchLink) && $advsearchLink ? '<a href="' . $advsearchLink . '">' : '';
    ?>
        <?php 
    echo $v;
    ?>
        <?php 
    echo isset($advsearchLink) && $advsearchLink ? '</a>' : '';
    ?>
    </li>
<?php 
}
?>
开发者ID:knigherrant,项目名称:decopatio,代码行数:31,代码来源:display_content.php

示例13: onDisplay

 public function onDisplay($user)
 {
     if (empty($this->value)) {
         return;
     }
     if (!$this->allowedPrivacy($user)) {
         return;
     }
     $json = FD::json();
     $result = $json->decode($this->value);
     if (!is_array($result) || empty($result)) {
         return;
     }
     $field = $this->field;
     $values = array();
     foreach ($result as $r) {
         $r = trim($r);
         if (empty($r)) {
             continue;
         }
         $option = Foundry::table('fieldoptions');
         $option->load(array('parent_id' => $this->field->id, 'key' => 'items', 'value' => $r));
         if ($field->searchable) {
             $params = array('layout' => 'advanced');
             $params['criterias[]'] = $field->unique_key . '|' . $field->element;
             $params['operators[]'] = 'contain';
             $params['conditions[]'] = $v;
             $advsearchLink = FRoute::search($params);
             $option->advancedsearchlink = $advsearchLink;
         }
         $values[] = $option;
     }
     if (empty($values)) {
         return;
     }
     $this->set('values', $values);
     return $this->display();
 }
开发者ID:ppantilla,项目名称:bbninja,代码行数:38,代码来源:multidropdown.php

示例14:

    echo JText::_('COM_EASYSOCIAL_SEARCH_VIEW_ALL_RESULTS');
    ?>
			</a>
		</div>
		<div class="text-center fd-small">
			<?php 
    echo JText::sprintf('COM_EASYSOCIAL_ADVANCED_SEARCH_TRY_ADVANCED_SEARCH', FRoute::search(array('layout' => 'advanced')));
    ?>
		</div>
	</div>

<?php 
} else {
    ?>
		<div class="search-empty text-center">
			<?php 
    echo JText::_('COM_EASYSOCIAL_SEARCH_NO_RECORDS_FOUND');
    ?>

			<div class="fd-small">
			<?php 
    echo JText::sprintf('COM_EASYSOCIAL_ADVANCED_SEARCH_TRY_ADVANCED_SEARCH', FRoute::search(array('layout' => 'advanced')));
    ?>
		</div>
		</div>

<?php 
}
?>
</div>
开发者ID:ppantilla,项目名称:bbninja,代码行数:30,代码来源:default.list.mini.php

示例15: onDisplay

 public function onDisplay($user)
 {
     $value = $this->value;
     if (!$value) {
         return;
     }
     $value = FD::makeArray($value);
     if (!$this->allowedPrivacy($user)) {
         return;
     }
     $field = $this->field;
     $countries = array();
     $aslink = array();
     foreach ($value as $v) {
         $country = SocialFieldsUserCountryHelper::getCountryName($v);
         if ($country) {
             if ($field->searchable) {
                 $params = array('layout' => 'advanced');
                 $params['criterias[]'] = $field->unique_key . '|' . $field->element;
                 $params['operators[]'] = 'equal';
                 $params['conditions[]'] = $v;
                 $advsearchLink = FRoute::search($params);
                 $aslink[] = $advsearchLink;
             } else {
                 $aslink[] = '';
                 // give empty value so that the array tally with the countries size.
             }
             $countries[] = $country;
         }
     }
     if (count($countries) === 0) {
         return;
     }
     $this->set('advancedsearchlinks', $aslink);
     $this->set('countries', $countries);
     return $this->display();
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:37,代码来源:country.php


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