Esempio n. 1
0
 /**
  * (non-PHPdoc)
  * @see \Light\Controller\Crud::prepareForm()
  */
 protected function prepareForm(Form $form, EntityInterface $item)
 {
     $classes = $item->getClasses();
     if ($classes) {
         $form->classes->setValue(explode(',', $classes));
     }
     $form->statusId->setValue("");
     $form->statusDate->setValue("");
     $form->statusNote->setValue("");
     $form->price->setValue("");
     if ($item->getId() && $item->getCountryId()) {
         $countriesModel = new Countries();
         $country = $countriesModel->find((int) $item->getCountryId());
         if ($country) {
             $form->price->setValue($country['price']);
         }
     }
 }