This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Returns the attribute of the related HAS_MANY models as a string | |
| * @param object $model->relation | |
| * @param string attribute you want to return | |
| * @param string $break The way you want to seperate the values [comma|enter|array] | |
| * array returns a CHtml::listData array | |
| * @return mixed string or array | |
| */ | |
| public function getRelValues($relatedModels, $attribute, $break='comma') | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| MODEL | |
| public function getActieveKanalen($id) | |
| { | |
| $var = $this->kanalen( array("condition"=>"id=".$id) ); | |
| $var = array_pop($var); | |
| if(isset($var)) | |
| return "Yes"; | |
| else | |
| return "No"; |
NewerOlder