classes/ControlLibrary.php
public function listControls($returnGrouped = true)
    {
        if ($this->groupedControls !== null) {
            return $returnGrouped ? $this->groupedControls : $this->controls;
        }

        $this->groupedControls = [
            $this->resolveControlGroupName(self::GROUP_STANDARD) => [],
            $this->resolveControlGroupName(self::GROUP_WIDGETS) => []
        ];

        Event::fire('pages.builder.registerControls', [$this]);

        foreach ($this->controls as $controlType=>$controlInfo) {
            $controlGroup = $this->resolveControlGroupName($controlInfo['group']);

            if (!array_key_exists($controlGroup, $this->groupedControls)) {
                $this->groupedControls[$controlGroup] = [];
            }

            $this->groupedControls[$controlGroup][$controlType] = $controlInfo;
        }

        return $returnGrouped ? $this->groupedControls : $this->controls;
    }
public function listControls($returnGrouped = true)
    {
        if ($this->groupedControls !== null) {
            return $returnGrouped ? $this->groupedControls : $this->controls;
        }

        $this->groupedControls = [
            $this->resolveControlGroupName(self::GROUP_STANDARD) => [],
            $this->resolveControlGroupName(self::GROUP_WIDGETS) => []
        ];

        Event::fire('pages.builder.registerControls', [$this]);

        foreach ($this->controls as $controlType=>$controlInfo) {
            $controlGroup = $this->resolveControlGroupName($controlInfo['group']);

            if (!array_key_exists($controlGroup, $this->groupedControls)) {
                $this->groupedControls[$controlGroup] = [];
            }

            $this->groupedControls[$controlGroup][$controlType] = $controlInfo;
        }

        return $returnGrouped ? $this->groupedControls : $this->controls;
    }
public function listControls ( $ returnGrouped = true ) { if ( $ this -> groupedControls !== null ) { return $ returnGrouped ? $ this -> groupedControls : $ this -> controls ; } $ this -> groupedControls = [ $ this -> resolveControlGroupName ( self :: GROUP_STANDARD ) => [ ] , $ this -> resolveControlGroupName ( self :: GROUP_WIDGETS ) => [ ] ] ; Event :: fire ( 'pages.builder.registerControls' , [ $ this ] ) ; foreach ( $ this -> controls as $ controlType => $ controlInfo ) { $ controlGroup = $ this -> resolveControlGroupName ( $ controlInfo [ 'group' ] ) ; if ( ! array_key_exists ( $ controlGroup , $ this -> groupedControls ) ) { $ this -> groupedControls [ $ controlGroup ] = [ ] ; } $ this -> groupedControls [ $ controlGroup ] [ $ controlType ] = $ controlInfo ; } return $ returnGrouped ? $ this -> groupedControls : $ this -> controls ; }
Returns a list of all known form controls grouped by control groups.
@param boolean $returnGrouped Indicates whether controls should be grouped in the result.
@return array
Returns a list of all known form controls grouped by control groups .