/** * Close a field group * * @return string */ public function closeGroup() { $closing = ''; if (Group::$opened && isset(Group::$openGroup)) { $closing = Group::$openGroup->close(); } // Close custom group Group::$opened = false; // Reset custom group reference Group::$openGroup = null; return $closing; }
/** * Dispatch a call over to Group * * @param string $method The method called * @param array $parameters Its parameters * * @return Group */ public function toGroup($method, $parameters) { // Disregards if the method isn't "group" if ($method != 'group') { return false; } // Create opener $group = new Form\Group($this->app, array_get($parameters, 0, null), array_get($parameters, 1, null)); // Set custom group as true Form\Group::$opened = true; // Set custom group reference Form\Group::$openGroup = $group; return $group; }