21 require_once SQ_INCLUDE_PATH.
'/asset.inc';
46 parent::__construct($assetid);
61 protected function _getName($short_name=FALSE, $contextid=NULL)
64 if ($contextid === NULL) {
65 $contextid = $GLOBALS[
'SQ_SYSTEM']->getContextId();
69 $attr = ($short_name) ?
'short_name' :
'name';
70 $values = $GLOBALS[
'SQ_SYSTEM']->am->getAttributeValuesByName($attr, $this->
type(), Array($this->
id), $contextid);
71 if (empty($values) === TRUE) {
72 return parent::_getName($short_name, $contextid);
74 return $values[$this->id];
92 if (!parent::_preCreateCheck($link))
return FALSE;
94 $name = trim($this->
attr(
'name'));
96 trigger_localised_error(
'CORE0083', E_USER_WARNING, $GLOBALS[
'SQ_SYSTEM']->am->getTypeInfo($this->type(),
'name'));
101 if (trim($this->
attr(
'short_name')) ==
'') {