コード例 #1
0
ファイル: Form.php プロジェクト: zingular/forms
 /**
  * @param \Zingular\Forms\Component\Context\Context $context
  * @throws FormException
  */
 public function setContext(Context $context)
 {
     parent::setContext($context);
     if (!$context instanceof FormContext) {
         throw new FormException("Cannot set form context: context for form should be instance of FormContext!");
     }
     $this->services = $context->getServices();
 }