AbstractAcaModule Class Reference

class d'appel des module aca More...

Inherits page.

Inherited by account, categorieModule, checkout_process, contentModule, generic, home, listingModule, order_total, payment, productModule, and shipping.

List of all members.

Public Member Functions

  • __call ($method, $attrs)
    Appel magic.
  • ret_modules ($class='')
    retourne la liste des modules actifs ou l'object de l'un d'eux
  • get_header_js ($action='')
    Allows modules to write something in header (javascript for example).
  • get_header ($action='')
    Appel des element dans le block d'appel header du constructeur central Ex: header_tags.
  • draw_ele_modules ($class='')
    Affiche module elemnt html cheche methode draw_html_xxx.
  • check_action ($class='', $actions='')
    Execute les actions des modules.
  • after_check_action ($class='', $actions)
    Execute les after_check_action des modules.
  • obj_db_values ($cID, $class='')
    return object
  • return_db_min ($cID, $class='')
    return_db_min module display_view mini

Static Public Member Functions

  • static initialise_type ($cst, $folder_base)
    init class modules for value config , for type module

Detailed Description

class d'appel des module aca

Definition at line 19 of file AbstractAcaModule.php.


Member Function Documentation

AbstractAcaModule::__call ( method,
attrs 
)

Appel magic.

Parameters:
$method string
$attrs array

control presence method

Definition at line 60 of file AbstractAcaModule.php.

00060                                           {
00061     $r=array();
00062     foreach ($this->modules as $key=>$module) {
00063       if (method_exists($module, $method )) 
00064         $r[]=$this->modules[$key]->$method($attrs);
00065     }
00066 
00067     return $r;
00068   }

AbstractAcaModule::after_check_action ( class = '',
actions 
)

Execute les after_check_action des modules.

Parameters:
$class string le nom de la class appelé, ou vide pour toutes les class enfants
$actions string $actions['action']

Definition at line 163 of file AbstractAcaModule.php.

00163                                                         {
00164     $s='';
00165     if (!empty($class)) {
00166       if (isset($this->modules[$class]) && $this->modules[$class]->enabled and (method_exists($class, 'after_check_action' ))){
00167         return $this->modules[$class]->after_check_action($actions);
00168       }
00169     } else {
00170       if(isset($this->modules) && is_array($this->modules))
00171       foreach ($this->modules as $key=>$module) {
00172         if ($module->enabled && method_exists($module, 'after_check_action' )) {
00173           $s.= $this->modules[$key]->after_check_action($class,$actions);
00174         }
00175       }
00176     }
00177     return $s;
00178   }

AbstractAcaModule::check_action ( class = '',
actions = '' 
)

Execute les actions des modules.

Parameters:
$class string class le nom de la class appelé, ou vide pour toutes les class enfants
$actions string class le nom de la class appelé, ou vide pour toutes les class enfants

Definition at line 140 of file AbstractAcaModule.php.

00140                                                       {
00141     $s='';
00142     if (!empty($class)) {
00143       if (isset($this->modules[$class]) && $this->modules[$class]->enabled and (method_exists($class, 'check_action' ))){
00144         return $this->modules[$class]->check_action($actions);
00145       }
00146     } else {
00147       if(isset($this->modules) && is_array($this->modules))
00148       foreach ($this->modules as $key=>$module) {
00149         if ($module->enabled && method_exists($module, 'check_action' )) {
00150           $s.= $this->modules[$key]->check_action($actions);
00151         }
00152       }
00153     }
00154     return $s;
00155   }

AbstractAcaModule::draw_ele_modules ( class = ''  ) 

Affiche module elemnt html cheche methode draw_html_xxx.

Parameters:
$class 

Definition at line 117 of file AbstractAcaModule.php.

00117                                              {
00118     global  $page;
00119     if (!empty($class)) {
00120       if (isset($this->modules[$class]) && $this->modules[$class]->enabled){
00121         $funct='draw_html_'.$class;
00122         return $this->modules[$class]->$funct();
00123       }
00124     } else {
00125       foreach ($this->modules as $key=>$module) {
00126         if (($module->enabled)  and (method_exists($module, 'draw_html_'.$key ))) {
00127           $funct='draw_html_'.$key;
00128           return $this->modules[$key]->$funct();
00129         }
00130       }
00131     }
00132   }

AbstractAcaModule::get_header ( action = ''  ) 

Appel des element dans le block d'appel header du constructeur central Ex: header_tags.

Parameters:
$action string

Definition at line 101 of file AbstractAcaModule.php.

00101                                          {
00102     $tmp=array();
00103     if(!isset($this->modules)) return false;
00104     foreach ($this->modules as $key=>$module){
00105       if (($module->enabled)  and (method_exists($module, 'get_header' )))
00106         $tmp[]= $this->modules[$key]->get_header($action);
00107     }
00108     return $tmp;
00109   }

AbstractAcaModule::get_header_js ( action = ''  ) 

Allows modules to write something in header (javascript for example).

Parameters:
$action 

Definition at line 86 of file AbstractAcaModule.php.

00086                                              {
00087     $tmp=array();
00088     if(isset($this->modules) && is_array($this->modules))
00089     foreach ($this->modules as $key=>$module) {
00090       if (($module->enabled)  and (method_exists($module, 'get_header_js' ))) {
00091         $tmp[]= $this->modules[$key]->get_header_js($action);
00092       }
00093     }
00094   }

AbstractAcaModule::initialise_type ( cst,
folder_base 
) [static]

init class modules for value config , for type module

Parameters:
$cst string la constante de ce type de module
$cst string
Returns:
Ambigous <string, multitype:>

module dans leur propre sous rep

Definition at line 29 of file AbstractAcaModule.php.

00029                                                             {
00030     global $page,$language,$messageStack;
00031     $list_mod=array();
00032     if(defined($cst)){
00033       $files_array=explode (';',str_replace(';;',';',constant($cst)));
00034       if (tep_not_null($files_array[0])) {
00035         reset ($files_array);
00036         while (list ($key, $file) = each ($files_array)) {
00037           $class=substr($file,0, strlen($file)-4 );
00038           $folder=$folder_base;
00040           if(is_dir(DIR_WS_MODULES . $folder.'/'.$class)) {
00041             $folder .= '/' . $class;
00042           }
00043           if (!empty($class)) {
00044             if(($path=parent::fix_file(DIR_WS_INCLUDES .'languages/'. $language . '/modules/'. $folder.'/' . $file,true)) !=false) $page->pile_file_lang($path);
00045             if(!class_exists($class) && ( ($pathclass=parent::fix_file(DIR_WS_MODULES . $folder.'/' . $file)) != false ) )include($pathclass);
00046             if(!class_exists($class)) trigger_error(sprintf(__CLASS__.' Could not load class %s', $class), E_USER_ERROR);
00047             else $list_mod[]=$class;
00048           }
00049         }
00050       }
00051     }
00052     return $list_mod;
00053   }

AbstractAcaModule::obj_db_values ( cID,
class = '' 
)

return object

Returns:
Retourne le resultat sous forme d'objet
Parameters:
$cID int
$class string

Definition at line 187 of file AbstractAcaModule.php.

00187                                                {
00188     global  $page;
00189     if (!empty($class)) {
00190       if (isset($this->modules[$class]) && $this->modules[$class]->enabled and (method_exists($class, 'obj_db_values' ))){
00191         return $this->modules[$class]->obj_db_values($cID);
00192       }
00193     } else {
00194        $c=array();
00195       foreach ($this->modules as $key=>$module) {
00196         if (($module->enabled)  and (method_exists($module, 'obj_db_values' ))) {
00197           $c[]=$this->modules[$key]->obj_db_values($cID);
00198         }
00199       }
00200       return new objectInfo($c);
00201     }
00202   }

AbstractAcaModule::ret_modules ( class = ''  ) 

retourne la liste des modules actifs ou l'object de l'un d'eux

Parameters:
$class 
Returns:
object

Reimplemented in checkout_process.

Definition at line 76 of file AbstractAcaModule.php.

00076                                         {
00077     if(!empty($class) && isset($this->modules[$class]))  return $this->modules[$class];
00078     return $this->modules;
00079   }

AbstractAcaModule::return_db_min ( cID,
class = '' 
)

return_db_min module display_view mini

Parameters:
$cID int le Id du customers
$class string le nom de la class appelé, ou vide pour toutes les class enfants

Reimplemented in listingModule.

Definition at line 210 of file AbstractAcaModule.php.

00210                                                {
00211     global  $page;
00212     if (!empty($class)) {
00213       if (isset($this->modules[$class]) && $this->modules[$class]->enabled and (method_exists($module, 'return_db_min' ))){
00214         $this->modules[$class]->load_db_values($cID);
00215         return $this->modules[$class]->return_db_min($cID);
00216       }
00217     } else {
00218        $c=array();
00219       foreach ($this->modules as $key=>$module) {
00220         if (($module->enabled)  and (method_exists($module, 'return_db_min' ))) {
00221           $this->modules[$key]->load_db_values($cID);
00222           $c[$key]=$this->modules[$key]->return_db_min($cID);
00223         }
00224       }
00225       return $c;
00226     }
00227   }


The documentation for this class was generated from the following file: