public function getVisibilityAffectingFieldsByTable($table)
    {
        if (isset($this->visibilityAffectingFields[$table])) {
            return $this->visibilityAffectingFields[$table];
        }

        // we always want to get the uid and pid although they do not affect visibility
        $fields = ['uid', 'pid'];
        if (isset($this->tca[$table]['ctrl']['enablecolumns'])) {
            $fields = array_merge($fields, $this->tca[$table]['ctrl']['enablecolumns']);
        }

        if (isset($this->tca[$table]['ctrl']['delete'])) {
            $fields[] = $this->tca[$table]['ctrl']['delete'];
        }

        if ($table === 'pages') {
            $fields[] = 'no_search';
            $fields[] = 'doktype';
        }

        $this->visibilityAffectingFields[$table] = implode(', ', $fields);

        return $this->visibilityAffectingFields[$table];
    }
public function getVisibilityAffectingFieldsByTable($table)
    {
        if (isset($this->visibilityAffectingFields[$table])) {
            return $this->visibilityAffectingFields[$table];
        }

        // we always want to get the uid and pid although they do not affect visibility
        $fields = ['uid', 'pid'];
        if (isset($this->tca[$table]['ctrl']['enablecolumns'])) {
            $fields = array_merge($fields, $this->tca[$table]['ctrl']['enablecolumns']);
        }

        if (isset($this->tca[$table]['ctrl']['delete'])) {
            $fields[] = $this->tca[$table]['ctrl']['delete'];
        }

        if ($table === 'pages') {
            $fields[] = 'no_search';
            $fields[] = 'doktype';
        }

        $this->visibilityAffectingFields[$table] = implode(', ', $fields);

        return $this->visibilityAffectingFields[$table];
    }
public function getVisibilityAffectingFieldsByTable ( $ table ) { if ( isset ( $ this -> visibilityAffectingFields [ $ table ] ) ) { return $ this -> visibilityAffectingFields [ $ table ] ; } // we always want to get the uid and pid although they do not affect visibility $ fields = [ 'uid' , 'pid' ] ; if ( isset ( $ this -> tca [ $ table ] [ 'ctrl' ] [ 'enablecolumns' ] ) ) { $ fields = array_merge ( $ fields , $ this -> tca [ $ table ] [ 'ctrl' ] [ 'enablecolumns' ] ) ; } if ( isset ( $ this -> tca [ $ table ] [ 'ctrl' ] [ 'delete' ] ) ) { $ fields [ ] = $ this -> tca [ $ table ] [ 'ctrl' ] [ 'delete' ] ; } if ( $ table === 'pages' ) { $ fields [ ] = 'no_search' ; $ fields [ ] = 'doktype' ; } $ this -> visibilityAffectingFields [ $ table ] = implode ( ', ' , $ fields ) ; return $ this -> visibilityAffectingFields [ $ table ] ; }
Compiles a list of visibility affecting fields of a table so that it can
be used in SQL queries.

@param string $table Table name to retrieve visibility affecting fields for
@return string Comma separated list of field names that affect the visibility of a record on the website
Compiles a list of visibility affecting fields of a table so that it can be used in SQL queries .