本文整理汇总了PHP中Apartment::excerpt方法的典型用法代码示例。如果您正苦于以下问题:PHP Apartment::excerpt方法的具体用法?PHP Apartment::excerpt怎么用?PHP Apartment::excerpt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Apartment
的用法示例。
在下文中一共展示了Apartment::excerpt方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
<div class="boxList">
<?php
$this->pageTitle .= ' - ' . Yii::t('common', 'Apartment search');
if ($filterName) {
$this->breadcrumbs = array(Yii::t('common', 'Apartment search') => array('/quicksearch/main/mainsearch'), tt('all_by_filter', 'apartments') . ' "' . $filterName . '"');
$this->widget('application.modules.apartments.components.ApartmentsWidget', array('criteria' => $criteria, 'widgetTitle' => tt('all_by_filter', 'apartments') . ' "' . $filterName . '"'));
} else {
$this->breadcrumbs = array(Yii::t('common', 'Apartment search'));
$wTitle = null;
if (issetModule('rss')) {
$wTitle = '<a target="_blank" title="' . tt('rss_subscribe', 'rss') . '" class="rss-icon" href="' . $this->createUrl('mainsearch', CMap::mergeArray($_GET, array('rss' => 1))) . '"><img alt="' . tt('rss_subscribe', 'rss') . '" src="' . Yii::app()->request->baseUrl . '/images/feed-icon-28x28.png" /></a>' . Yii::t('module_apartments', 'Apartments list');
}
$subLocation = (int) Yii::app()->request->getParam('sublocation_id');
$region = (int) Yii::app()->request->getParam('region_id');
if (!empty($region)) {
echo '<div id=\'location_description\'>';
$content = Region::model()->findByPk($region)->content;
$content = Apartment::excerpt($content);
echo $content;
echo '</div>';
echo '<div style=\'display: none;\' id=\'f_location_description\'>';
echo Region::model()->findByPk($region)->content;
echo '</div>';
echo '<a href=\'#\' id=\'show_f_desc\'>Показать</a>';
}
$this->widget('application.modules.apartments.components.ApartmentsWidget', array('criteria' => $criteria, 'count' => $apCount, 'widgetTitle' => $wTitle));
}
?>
</div>
<?php
Yii::app()->clientScript->registerScript('testscript', "\nvar showDescIsShow = false;\n\$('#show_f_desc').on('click', function(){\n if (!showDescIsShow)\n {\n \$(this).text('Скрыть');\n \$('#location_description').hide();\n \$('#f_location_description').show();\n showDescIsShow = true;\n }\n else\n {\n \$(this).text('Показать');\n \$('#f_location_description').hide();\n \$('#location_description').show();\n showDescIsShow = false;\n }\n return false;\n});\n", CClientScript::POS_READY);