Ferreteria/v0.3/class/cPortalRow storage: Difference between revisions
< Ferreteria | v0.3 | class
Jump to navigation
Jump to search
(Created page with "{{page/code/class|ferreteria}} <source lang=php> class cPortalRow_storage extends cPortalRow implements ifLoadableRows { use tLoadableRow; // lets DB store its resource-...") |
(extenders) |
||
Line 23: | Line 23: | ||
* '''implements''': {{l/ferreteria/class|ifLoadableRows}} | * '''implements''': {{l/ferreteria/class|ifLoadableRows}} | ||
* '''uses''': {{l/ferreteria/class|tLoadableRow}} | * '''uses''': {{l/ferreteria/class|tLoadableRow}} | ||
* '''extenders''': {{l/ferreteria/class|cPortalRow_database}} |
Revision as of 20:47, 28 December 2018
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;
}
}
}
}
- file: Template:L/ferreteria/file
- extends: Template:L/ferreteria/class
- implements: Template:L/ferreteria/class
- uses: Template:L/ferreteria/class
- extenders: Template:L/ferreteria/class