18 require_once SQ_INCLUDE_PATH.
'/asset.inc';
43 $this->_ser_attrs = TRUE;
44 parent::__construct($assetid);
61 if (!parent::_preCreateCheck($link))
return FALSE;
64 $name = trim($this->
attr(
'name'));
65 if (trim($this->
attr(
'short_name')) ==
'') {
84 protected function _getName($short_name=FALSE, $contextid=NULL)
87 if ($contextid === NULL) {
88 $contextid = $GLOBALS[
'SQ_SYSTEM']->getContextId();
92 $attr = ($short_name) ?
'short_name' :
'name';
93 $values = $GLOBALS[
'SQ_SYSTEM']->am->getAttributeValuesByName($attr, $this->
type(), Array($this->
id), $contextid);
94 if (empty($values) === TRUE) {
95 return parent::_getName($short_name, $contextid);
97 return $values[$this->id];