public function loadElement($type, $key)
    {
        $json = $this->load();
        $fields = array();
        $columns = $json[$type]["elements"][$key]["columns"];

        //Check if it is an array before trying to count it
        if (is_array($columns) && count($columns) > 0) {
            foreach ($columns as $fieldName) {
                $fields[$fieldName] = $json[$type]["tca"][$fieldName];
            }
        }
        if (count($fields) > 0) {
            $json[$type]["elements"][$key]["tca"] = $fields;
        }
        return $json[$type]["elements"][$key];
    }
public function loadElement($type, $key)
    {
        $json = $this->load();
        $fields = array();
        $columns = $json[$type]["elements"][$key]["columns"];

        //Check if it is an array before trying to count it
        if (is_array($columns) && count($columns) > 0) {
            foreach ($columns as $fieldName) {
                $fields[$fieldName] = $json[$type]["tca"][$fieldName];
            }
        }
        if (count($fields) > 0) {
            $json[$type]["elements"][$key]["tca"] = $fields;
        }
        return $json[$type]["elements"][$key];
    }
public function loadElement ( $ type , $ key ) { $ json = $ this -> load ( ) ; $ fields = array ( ) ; $ columns = $ json [ $ type ] [ "elements" ] [ $ key ] [ "columns" ] ; //Check if it is an array before trying to count it if ( is_array ( $ columns ) && count ( $ columns ) > 0 ) { foreach ( $ columns as $ fieldName ) { $ fields [ $ fieldName ] = $ json [ $ type ] [ "tca" ] [ $ fieldName ] ; } } if ( count ( $ fields ) > 0 ) { $ json [ $ type ] [ "elements" ] [ $ key ] [ "tca" ] = $ fields ; } return $ json [ $ type ] [ "elements" ] [ $ key ] ; }
Load Element with all the field configurations

@return array
Load Element with all the field configurations