18 require_once SQ_INCLUDE_PATH.
'/asset.inc';
43 parent::__construct($assetid);
60 if (!parent::_preCreateCheck($link))
return FALSE;
62 $name = trim($this->
attr(
'name'));
64 trigger_localised_error(
'CORE0083', E_USER_WARNING, $GLOBALS[
'SQ_SYSTEM']->am->getTypeInfo($this->type(),
'name'));
69 if (trim($this->
attr(
'short_name')) ==
'') {
90 if (!parent::_createAdditional($link))
return FALSE;
106 $allowed = parent::_getAllowedLinks();
107 $allowed[SQ_LINK_TYPE_1][
'page'] = Array(
'card' =>
'M',
'exclusive' => FALSE);
108 $allowed[SQ_LINK_TYPE_1][
'file'] = Array(
'card' =>
'M',
'exclusive' => FALSE);
109 $allowed[SQ_LINK_TYPE_1][
'folder'] = Array(
'card' =>
'M',
'exclusive' => FALSE);
110 $allowed[SQ_LINK_TYPE_1][
'data_source'] = Array(
'card' =>
'M',
'exclusive' => FALSE);
111 $allowed[SQ_LINK_TYPE_1][
'link'] = Array(
'card' =>
'M',
'exclusive' => FALSE);
113 $allowed[SQ_LINK_TYPE_2][
'page'] = Array(
'card' =>
'M',
'exclusive' => FALSE);
114 $allowed[SQ_LINK_TYPE_2][
'file'] = Array(
'card' =>
'M',
'exclusive' => FALSE);
115 $allowed[SQ_LINK_TYPE_2][
'folder'] = Array(
'card' =>
'M',
'exclusive' => FALSE);
116 $allowed[SQ_LINK_TYPE_2][
'data_source'] = Array(
'card' =>
'M',
'exclusive' => FALSE);
117 $allowed[SQ_LINK_TYPE_2][
'link'] = Array(
'card' =>
'M',
'exclusive' => FALSE);
119 $allowed[SQ_LINK_TYPE_3][
'page'] = Array(
'card' =>
'M',
'exclusive' => FALSE);
121 $allowed[SQ_LINK_NOTICE][
'page'] = Array(
'card' =>
'M',
'exclusive' => FALSE);
122 $allowed[SQ_LINK_NOTICE][
'link'] = Array(
'card' =>
'M',
'exclusive' => FALSE);
154 $am = $GLOBALS[
'SQ_SYSTEM']->am;
155 $attr_name = ($short_name === TRUE) ?
'short_name' :
'name';
156 $values = $am->getAttributeValuesByName($attr_name, $this->
type(), Array($this->
id), 0);
157 if (empty($values) === TRUE) {
158 return parent::_getName($short_name);
160 return $values[$this->id];