Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
import_tool_converter_word.inc
1 <?php
18 require_once SQ_PACKAGES_PATH.'/import_tools/converters/import_tool_converter/import_tool_converter.inc';
19 
32 {
33 
34 
41  function Import_Tool_Converter_Word($assetid=0)
42  {
43  $this->Import_Tool_Converter($assetid);
44 
45  }//end constructor
46 
47 
58  function _preCreateCheck(&$link)
59  {
60  if (!parent::_preCreateCheck($link)) return FALSE;
61 
62  $name = trim($this->attr('name'));
63  if ($name == '') {
64  trigger_localised_error('CORE0083', E_USER_WARNING, $GLOBALS['SQ_SYSTEM']->am->getTypeInfo($this->type(), 'name'));
65  return FALSE;
66  }
67 
68  return TRUE;
69 
70  }//end _preCreateCheck()
71 
72 
83  function _createAdditional(&$link)
84  {
85  if (!parent::_createAdditional($link)) return FALSE;
86 
87  // set a web path if we are linking this folder somewhere
88  // NOTE: the main time we wont want to do this is if we are creating
89  // the root folder as it is not linked anywhere
90  if (!empty($link)) {
91  // set an initial web path
92  $initial_path = strtolower($this->attr('name'));
93  require_once SQ_INCLUDE_PATH.'/general_occasional.inc';
94  $valid_paths = make_valid_web_paths(Array($initial_path));
95  $good_paths = $GLOBALS['SQ_SYSTEM']->am->webPathsInUse($link['asset'], $valid_paths, $this->id, TRUE);
96  if (!$this->saveWebPaths($good_paths)) return FALSE;
97  }
98  return TRUE;
99 
100  }//end _createAdditional()
101 
102 
112  function _getName($short_name=FALSE)
113  {
114  return $this->attr('name');
115 
116  }//end _getName()
117 
118 
126  function _getAllowedLinks()
127  {
128 
129  return Array(
130  SQ_LINK_TYPE_1 => Array(
131  'file' => Array(
132  'card' => 'M',
133  'exclusive' => FALSE,
134  ),
135  ),
136  SQ_LINK_TYPE_2 => Array(
137  'file' => Array(
138  'card' => 'M',
139  'exclusive' => FALSE,
140  ),
141  ),
142  );
143 
144  }//end _getAllowedLinks()
145 
146 
147 }//end class
148 ?>