static function getAllWebpageTypesInfo() { $types = WebpageTypes::findAll(); $result = array(); foreach ($types as $type) { $result[] = array('id' => $type->getId(), 'code' => $type->getName(), 'name' => lang($type->getName())); } return $result; }