Beispiel #1
0
echo $form->dropDownListRow($model, 'type', CHtml::listData(BusinessType::model()->findAll(), 'id', 'name'), array('empty' => 'Select a type'));
?>
	<?php 
echo $form->textFieldRow($model, 'address', array('class' => 'span6', 'size' => 60, 'maxlength' => 255));
?>
	<?php 
echo $form->textFieldRow($model, 'zipcode', array('class' => 'span6', 'size' => 60, 'maxlength' => 6));
?>
	<?php 
echo $form->textFieldRow($model, 'phone', array('class' => 'span6', 'size' => 60, 'maxlength' => 8));
?>
	<?php 
echo $form->dropDownListRow($model, 'price', CHtml::listData(PriceType::model()->findAll(), 'id', 'name'), array('empty' => 'Select a type'));
?>
	<?php 
echo $form->dropDownListRow($model, 'category', CHtml::listData(CategoryType::model()->findAll(), 'id', 'name'), array('empty' => 'Select a category'));
?>
	<?php 
echo $form->dropDownListRow($model, 'cuisine', CHtml::listData(CuisineType::model()->findAll(), 'id', 'name'), array('empty' => 'Select a cuisine type'));
?>
	<?php 
echo $form->textFieldRow($model, 'opening_hours', array('class' => 'span6', 'size' => 60, 'maxlength' => 100));
?>
	<?php 
echo $form->checkBoxListRow($model, 'payment', $paymentMethods);
?>
	<?php 
echo $form->dropDownListRow($model, 'attire', CHtml::listData(AttireType::model()->findAll(), 'id', 'name'), array('empty' => 'Select an attire type'));
?>
	<?php 
echo $form->dropDownListRow($model, 'ambience', CHtml::listData(AmbienceType::model()->findAll(), 'id', 'name'), array('empty' => 'Select an ambience type'));
Beispiel #2
0
 /**
  * @return string the category text display for the current business
  */
 public function getCategoryText()
 {
     $categoryOptions = CHtml::listData(CategoryType::model()->findAll(), 'id', 'name');
     return isset($categoryOptions[$this->category]) ? $categoryOptions[$this->category] : "-";
 }