public function getInTableColumns($postType)
    {
        $inTableColumnsSlugs = [];
        $fields = PostType::getFields($postType);

        // default columns
        foreach(Post::$defaultListColumns as $key => $label){
            if(substr($label, 0, 2) == '__') {
                $label = __(substr($label, 2));
            }

            $inTableColumnsSlugs[$key] = $label;
        }

        // post type columns
        foreach($fields as $field){
            if($field->inTable) {
                $inTableColumnsSlugs[$field->slug] = $field->name;
            }
        }

        // custom events columns
        $customListColumms = Event::fire('post:table_list_columns', [$postType]);
        foreach($customListColumms as $customList){
            if(is_array($customList)) {
                foreach ($customList as $key => $value) {
                    $inTableColumnsSlugs[$key] = $value;
                }
            }
        }
        return $inTableColumnsSlugs;
    }
public function getInTableColumns($postType)
    {
        $inTableColumnsSlugs = [];
        $fields = PostType::getFields($postType);

        // default columns
        foreach(Post::$defaultListColumns as $key => $label){
            if(substr($label, 0, 2) == '__') {
                $label = __(substr($label, 2));
            }

            $inTableColumnsSlugs[$key] = $label;
        }

        // post type columns
        foreach($fields as $field){
            if($field->inTable) {
                $inTableColumnsSlugs[$field->slug] = $field->name;
            }
        }

        // custom events columns
        $customListColumms = Event::fire('post:table_list_columns', [$postType]);
        foreach($customListColumms as $customList){
            if(is_array($customList)) {
                foreach ($customList as $key => $value) {
                    $inTableColumnsSlugs[$key] = $value;
                }
            }
        }
        return $inTableColumnsSlugs;
    }
public function getInTableColumns ( $ postType ) { $ inTableColumnsSlugs = [ ] ; $ fields = PostType :: getFields ( $ postType ) ; // default columns foreach ( Post :: $ defaultListColumns as $ key => $ label ) { if ( substr ( $ label , 0 , 2 ) == '__' ) { $ label = __ ( substr ( $ label , 2 ) ) ; } $ inTableColumnsSlugs [ $ key ] = $ label ; } // post type columns foreach ( $ fields as $ field ) { if ( $ field -> inTable ) { $ inTableColumnsSlugs [ $ field -> slug ] = $ field -> name ; } } // custom events columns $ customListColumms = Event :: fire ( 'post:table_list_columns' , [ $ postType ] ) ; foreach ( $ customListColumms as $ customList ) { if ( is_array ( $ customList ) ) { foreach ( $ customList as $ key => $ value ) { $ inTableColumnsSlugs [ $ key ] = $ value ; } } } return $ inTableColumnsSlugs ; }
Get columns list that will be used only in post list table.
Used to add extra columns in post list table.

@param  $postType
@return array
@throws \Exception
Get columns list that will be used only in post list table . Used to add extra columns in post list table .