示例#1
0
 private function getContactType()
 {
     $viewModel = $this->renderer->viewModel()->getCurrent();
     $viewModelChildren = $viewModel->getChildren();
     $pageModel = $viewModelChildren[0];
     $company = $pageModel->getVariable('company');
     if ($company !== null) {
         return ContactEntry::TYPE_COMPANY;
     }
     $person = $pageModel->getVariable('person');
     if ($person !== null) {
         return ContactEntry::TYPE_PERSON;
     }
     return ContactEntry::TYPE_UNKNOWN;
 }
示例#2
0
 private function getContact()
 {
     $viewModel = $this->renderer->viewModel()->getCurrent();
     $viewModelChildren = $viewModel->getChildren();
     $pageModel = $viewModelChildren[0];
     $company = $pageModel->getVariable('company');
     if ($company !== null) {
         return $company;
     }
     $person = $pageModel->getVariable('person');
     if ($person !== null) {
         return $person;
     }
     return null;
 }