Ferreteria/v0.3/class/cPortalRow storage

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
< Ferreteria‎ | v0.3‎ | class
Revision as of 20:20, 28 December 2018 by Woozle (talk | contribs) (Created page with "{{page/code/class|ferreteria}} <source lang=php> class cPortalRow_storage extends cPortalRow implements ifLoadableRows { use tLoadableRow; // lets DB store its resource-...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
class cPortalRow_storage extends cPortalRow implements ifLoadableRows {
    use tLoadableRow;   // lets DB store its resource-blob

    protected function GetPortalType() {
        return cIOField::ksPortalStorage;
    }
    protected function SetPortals_fromFields(array $arFields) {
        if (count($arFields) == 0) {
            throw new \exception('Attempting to set Portals with an empty field-list.');
        } else {
            foreach ($arFields as $sKey => $oField) {
                $oPortal = $oField->MakePortal($this->GetPortalType());
                $this->arPortals[$sKey] = $oPortal;
            }
        }
    }
}