Esempio n. 1
0
 /**
  * Check is any elements present in form
  *
  * @param Form $form
  * @return bool
  */
 protected function _isFormEmpty($form)
 {
     $isEmpty = true;
     /** @var  $elements \Magento\Framework\Data\Form\Element\Collection */
     $elements = $form->getElements();
     foreach ($elements as $element) {
         if ($element->getElements()->count()) {
             $isEmpty = false;
             break;
         }
     }
     return $isEmpty;
 }