Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
content_type_image.inc
1 <?php
18 require_once SQ_CORE_PACKAGE_PATH.'/content_type/content_type.inc';
19 
32 {
33 
34 
41  function __construct($assetid=0)
42  {
43  $this->_ser_attrs = TRUE;
44  parent::__construct($assetid);
45 
46  }//end constructor
47 
48 
56  function _getAllowedLinks()
57  {
58  $page_links = parent::_getAllowedLinks();
59  $page_links[SQ_LINK_NOTICE]['image'] = Array('card' => 'M', 'exclusive' => FALSE);
60  $page_links[SQ_LINK_NOTICE]['image_variety'] = Array('card' => 'M', 'exclusive' => FALSE);
61  return $page_links;
62 
63  }//end _getAllowedLinks()
64 
65 
75  function morph($new_type_code)
76  {
77  $current_link = $GLOBALS['SQ_SYSTEM']->am->getLink($this->id, SQ_LINK_NOTICE, '', FALSE, 'image_link');
78  if (!empty($current_link)) {
79  $GLOBALS['SQ_SYSTEM']->am->deleteAssetLink($current_link['linkid']);
80  }
81  return parent::morph($new_type_code);
82 
83  }//end morph()
84 
85 
86 }//end class
87 
88 ?>