public function loadBlockColumns()
    {
        $blockColumns = [];
        $parentModelName = static::$parentModel;

        if ($parentModelName) {
            /** @var BaseModel $parentModel */
            $parentModelNameSpace = "\\PhalconRest\\Models\\" . $parentModelName;
            $parentModel = new $parentModelNameSpace();
            $blockColumns = $parentModel->getBlockColumns();

            // the parent model may return null, let's catch and change to an empty array
            // thus indicated that block columns have been "loaded" even if they are blank
            if ($blockColumns == null) {
                $blockColumns = [];
            }
        }
        $this->setBlockColumns($blockColumns, true);
    }
public function loadBlockColumns()
    {
        $blockColumns = [];
        $parentModelName = static::$parentModel;

        if ($parentModelName) {
            /** @var BaseModel $parentModel */
            $parentModelNameSpace = "\\PhalconRest\\Models\\" . $parentModelName;
            $parentModel = new $parentModelNameSpace();
            $blockColumns = $parentModel->getBlockColumns();

            // the parent model may return null, let's catch and change to an empty array
            // thus indicated that block columns have been "loaded" even if they are blank
            if ($blockColumns == null) {
                $blockColumns = [];
            }
        }
        $this->setBlockColumns($blockColumns, true);
    }
public function loadBlockColumns ( ) { $ blockColumns = [ ] ; $ parentModelName = static :: $ parentModel ; if ( $ parentModelName ) { /** @var BaseModel $parentModel */ $ parentModelNameSpace = "\\PhalconRest\\Models\\" . $ parentModelName ; $ parentModel = new $ parentModelNameSpace ( ) ; $ blockColumns = $ parentModel -> getBlockColumns ( ) ; // the parent model may return null, let's catch and change to an empty array // thus indicated that block columns have been "loaded" even if they are blank if ( $ blockColumns == null ) { $ blockColumns = [ ] ; } } $ this -> setBlockColumns ( $ blockColumns , true ) ; }
a hook to be run when initializing a model
write logic here to block columns

could be a static list or something more dynamic
a hook to be run when initializing a model write logic here to block columns