Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private function prepare_collection(&$coleccion, $text, $id=0) {
- $idproperty = strtolower(get_class($coleccion[0])) . "_id";
- foreach($coleccion as &$obj) {
- $obj->value = $obj->$idproperty;
- $obj->text = $obj->$text;
- $obj->extras = ($obj->value == $id) ? ' selected' : '';
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement