if($encode){
return CHtml::encode(implode($sep, $locationArray));
}
if($encode){
array_walk($locationArray,
function (&$item) {
$item = CHtml::encode($item);
}
);
}
public static function getLocationString(Apartment $model, $sep = ', ', $withAddress = false, $encode = true)
public static function getLocationString(Apartment $model, $sep = ', ', $withAddress = false, $encode = true)
public static function checkAllowShowAddress()
{
if (Yii::app()->user->isGuest) {
$defaultTariffInfo = TariffPlans::getFullTariffInfoById(TariffPlans::DEFAULT_TARIFF_PLAN_ID);
return $defaultTariffInfo['showAddress'];
}
if (Yii::app()->user->checkAccess('apartments_admin')) {
return true;
}
if ($tariffInfo = self::getTariffInfoByUserId(Yii::app()->user->id)) {
return $tariffInfo['showAddress'];
}
return false;
}
Users browsing this forum: No registered users and 10 guests