<?php
 namespace Engine\Form\Container; class Columns extends \Engine\Form\Container\GeneralAbstract { public $class = "columns"; public function getTemplateParams($templateClass = null, $parentElement = null) { $params = parent::getTemplateParams($templateClass, $parentElement); $params['totalColumns'] = count(array_filter($this->getChilds(), function($child) { return $child->isContainer(); })); return $params; } } 