getElements($section); foreach ($sectionElements as $element) { try { $handler = $this->getHandler($element); } catch (Exception $e) { throw new Exception($e->getMessage()); } $data = $handler->handle($element); if($data){ $result[] = $handler->handle($element); } } } if (count($result) > 0) { return $result; } return; } }