Exemple #1
0
 /**
  * Initializes the class and stores the selected person to be shown
  * The argument should be a MidgardPerson object. In the future DM
  * Array format will also be supported.
  *
  * @param mixed $person Person to display either as MidgardPerson or Datamanager array
  */
 public function __construct($person = null)
 {
     parent::__construct();
     if (null === self::$_contacts_url) {
         $siteconfig = org_openpsa_core_siteconfig::get_instance();
         self::$_contacts_url = $siteconfig->get_node_full_url('org.openpsa.contacts');
     }
     // Read properties of provided person object/DM array
     // TODO: Handle groups as well
     if (is_object($person)) {
         $this->_data_read_ok = $this->read_object($person);
     } else {
         if (is_array($person)) {
             $this->_data_read_ok = $this->read_array($person);
         }
     }
 }