Пример #1
0
echo $form->textAreaRow($model, 'description', array('class' => 'span6', 'rows' => 5));
?>
	<?php 
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'));
Пример #2
0
 /**
  * @return string the price text display for the current business
  */
 public function getPriceText()
 {
     $priceOptions = CHtml::listData(PriceType::model()->findAll(), 'id', 'name');
     return isset($priceOptions[$this->price]) ? $priceOptions[$this->price] : "-";
 }