Exemple #1
0
 /**
  * The files module will use this function.
  */
 public function buildFilesPath()
 {
     $new_folder_name = \GO\Base\Fs\Base::stripInvalidChars($this->name) . ' (' . $this->id . ')';
     $new_path = $this->addressbook->buildFilesPath() . '/companies';
     $char = \GO\Addressbook\Utils::getIndexChar($new_folder_name);
     $new_path .= '/' . $char . '/' . $new_folder_name;
     return $new_path;
 }
Exemple #2
0
 /**
  * The files module will use this function.
  */
 public function buildFilesPath()
 {
     if (!$this->addressbook) {
         return false;
     }
     $new_folder_name = \GO\Base\Fs\Base::stripInvalidChars($this->name) . ' (' . $this->id . ')';
     $last_part = empty($this->last_name) ? '' : \GO\Addressbook\Utils::getIndexChar($this->last_name);
     $new_path = $this->addressbook->buildFilesPath() . '/contacts';
     if (!empty($last_part)) {
         $new_path .= '/' . $last_part;
     } else {
         $new_path .= '/0 no last name';
     }
     $new_path .= '/' . $new_folder_name;
     return $new_path;
 }