Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
design_area_password_change_form_edit_fns.inc
1 <?php
18 require_once SQ_CORE_PACKAGE_PATH.'/designs/design_area/design_area_edit_fns.inc';
19 
33 {
34 
35 
40  function __construct()
41  {
42  parent::__construct();
43 
44  }//end constructor
45 
46 
56  public function _processContents(Design_Area_Password_Change_Form $asset, Array &$contents)
57  {
58  $all_contents = Array();
59 
60  // see if our page element has any sub's in it
61  foreach ($contents as $index => $element) {
62  if ($element['_type'] != 'TAG') continue;
63  if ($element['operation'] != 'password_change_section') {
64  $all_contents[] = $element;
65  continue;
66  }
67 
68  // if there is some contents then save it to our arrays
69  if (!$element['self_terminating'] && !empty($element['contents'])) {
70  $all_contents = array_merge($all_contents, $element['contents']);
71  if (!$asset->setAttrValue('password_change_contents', $element['contents'])) {
72  return FALSE;
73  }
74  }
75 
76  }//end foreach
77 
78  $asset->setAttrValue('contents', $contents);
79 
80  $GLOBALS['SQ_PROCESSED_DESIGN_AREAS'][$asset->attr('id_name')] = TRUE;
81  if (!$this->_setVariables($asset, $all_contents)) {
82  return FALSE;
83  }
84  return $asset->saveAttributes();
85 
86  }//end _processContents()
87 
88 
89 }//end class
90 ?>