Abstract.php
9 years ago
Capability.php
9 years ago
Contact.php
9 years ago
Extension.php
9 years ago
LoginRedirect.php
9 years ago
Menu.php
9 years ago
Metabox.php
9 years ago
Post.php
9 years ago
Redirect.php
9 years ago
Role.php
9 years ago
Security.php
9 years ago
Teaser.php
9 years ago
User.php
9 years ago
Utility.php
9 years ago
Contact.php
57 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * ====================================================================== |
| 5 | * LICENSE: This file is subject to the terms and conditions defined in * |
| 6 | * file 'license.txt', which is part of this source code package. * |
| 7 | * ====================================================================== |
| 8 | */ |
| 9 | |
| 10 | /** |
| 11 | * Backend contact/hire manager |
| 12 | * |
| 13 | * @package AAM |
| 14 | * @author Vasyl Martyniuk <vasyl@vasyltech.com> |
| 15 | */ |
| 16 | class AAM_Backend_Feature_Contact extends AAM_Backend_Feature_Abstract { |
| 17 | |
| 18 | /** |
| 19 | * @inheritdoc |
| 20 | */ |
| 21 | public static function getAccessOption() { |
| 22 | return 'feature.contact.capability'; |
| 23 | } |
| 24 | |
| 25 | /** |
| 26 | * @inheritdoc |
| 27 | */ |
| 28 | public static function getTemplate() { |
| 29 | return 'contact.phtml'; |
| 30 | } |
| 31 | |
| 32 | /** |
| 33 | * Register Contact/Hire feature |
| 34 | * |
| 35 | * @return void |
| 36 | * |
| 37 | * @access public |
| 38 | */ |
| 39 | public static function register() { |
| 40 | $cap = AAM_Core_Config::get(self::getAccessOption(), 'administrator'); |
| 41 | |
| 42 | AAM_Backend_Feature::registerFeature((object) array( |
| 43 | 'uid' => 'contact', |
| 44 | 'position' => 9999, |
| 45 | 'title' => __('Contact Us', AAM_KEY), |
| 46 | 'capability' => $cap, |
| 47 | 'subjects' => array( |
| 48 | 'AAM_Core_Subject_Role', |
| 49 | 'AAM_Core_Subject_User', |
| 50 | 'AAM_Core_Subject_Visitor', |
| 51 | 'AAM_Core_Subject_Default' |
| 52 | ), |
| 53 | 'view' => __CLASS__ |
| 54 | )); |
| 55 | } |
| 56 | |
| 57 | } |