Exemple #1
0
 /**
  * callFormMethod
  *
  * @param string $method Class method to call
  * @param array  $args   Call arguments OPTIONAL
  *
  * @return mixed
  */
 protected function callFormMethod($method, array $args = array())
 {
     $form = \XLite\View\Model\AModel::getCurrentForm();
     return $form ? call_user_func_array(array($form, $method), $args) : null;
 }
Exemple #2
0
 /**
  * Return current form reference
  *
  * @return \XLite\View\Model\AModel
  */
 protected function getCurrentForm()
 {
     return \XLite\View\Model\AModel::getCurrentForm() ?: $this->getModelForm();
 }