本文整理汇总了PHP中Apartment::getImagesDependency方法的典型用法代码示例。如果您正苦于以下问题:PHP Apartment::getImagesDependency方法的具体用法?PHP Apartment::getImagesDependency怎么用?PHP Apartment::getImagesDependency使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Apartment
的用法示例。
在下文中一共展示了Apartment::getImagesDependency方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getSimilarAds
public function getSimilarAds($inCriteria = null)
{
if ($inCriteria === null) {
$criteria = new CDbCriteria();
$criteria->addCondition('active = ' . Apartment::STATUS_ACTIVE);
if (param('useUserads')) {
$criteria->addCondition('owner_active = ' . Apartment::STATUS_ACTIVE);
}
$criteria->order = $this->getTableAlias() . '.id ASC';
} else {
$criteria = $inCriteria;
}
Yii::import('application.modules.apartments.helpers.apartmentsHelper');
$similarAds = array();
$similarAds['apartments'] = Apartment::model()->cache(param('cachingTime', 1209600), Apartment::getImagesDependency())->with(array('images'))->findAll($criteria);
return is_array($similarAds['apartments']) && count($similarAds['apartments']) ? $similarAds['apartments'] : '';
}
示例2: findAllWithCache
public static function findAllWithCache($criteria)
{
return Apartment::model()->cache(param('cachingTime', 1209600), Apartment::getImagesDependency())->with(array('images', 'objType'))->findAll($criteria);
}