function getDefault($className,$attName,$languageID=0) { if (!$languageID) $languageID=LPC_Language::getCurrent()->id; if (!isset(self::$currentInstance)) self::$currentInstance=new LPC_Scaffolding_default(); $sd=&self::$currentInstance; $ds=$sd->search( array('className','attName','language'), array($className,$attName,$languageID) ); if (!$ds) return ""; return $ds[0]->getAttr('defaultValue'); }
function getScaffoldingDefault($attName) { if ($this->hasAttr($attName)) return LPC_Scaffolding_default::getDefault(get_class($this),$attName,$this->i18n_langID); if (empty($this::$i18n_class)) throw new RuntimeException("Attribute $attName is not defined in this object!"); return LPC_Scaffolding_default::getDefault($this::$i18n_class,$attName,$this->i18n_langID); }