/**
  * We only admit one
  */
 function canCreate($member = null)
 {
     if (ContactPage::get()->Count() > 1) {
         return false;
     } else {
         return true;
     }
 }
 /**
  * Create a unique email link that is connected with the Contact Form
  * 
  * @return string get the link to the contact page
  */
 public function EmailLink()
 {
     if (!empty($this->Email)) {
         $page = ContactPage::get()->first();
         if ($page) {
             return $page->Link() . "staff/{$this->ID}";
         }
     }
     return false;
 }
Esempio n. 3
0
 public function getContactPage()
 {
     return ContactPage::get()->First();
 }