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'));
85 if (!parent::_createAdditional($link))
return FALSE;
101 $allowed_links = parent::_getAllowedLinks();
103 $allowed_links[SQ_LINK_TYPE_1][
'paypal_business_account'] = Array(
'card' =>
'M',
'exclusive' => FALSE);
104 $allowed_links[SQ_LINK_TYPE_2][
'paypal_business_account'] = Array(
'card' =>
'M',
'exclusive' => FALSE);
105 $allowed_links[SQ_LINK_TYPE_1][
'paypal_payment_button'] = Array(
'card' =>
'M',
'exclusive' => FALSE);
106 $allowed_links[SQ_LINK_TYPE_2][
'paypal_payment_button'] = Array(
'card' =>
'M',
'exclusive' => FALSE);
107 $allowed_links[SQ_LINK_TYPE_1][
'paypal_ipn_receiver'] = Array(
'card' =>
'M',
'exclusive' => FALSE);
108 $allowed_links[SQ_LINK_TYPE_2][
'paypal_ipn_receiver'] = Array(
'card' =>
'M',
'exclusive' => FALSE);
110 return $allowed_links;
125 protected function _getName($short_name=FALSE, $contextid=NULL)
128 if ($contextid === NULL) {
129 $contextid = $GLOBALS[
'SQ_SYSTEM']->getContextId();
133 $values = $GLOBALS[
'SQ_SYSTEM']->am->getAttributeValuesByName(
'name', $this->
type(), Array($this->
id), $contextid);
134 if (empty($values) === TRUE) {
135 return parent::_getName($short_name, $contextid);
137 return $values[$this->id];