summaryrefslogtreecommitdiff
path: root/includes/classes/ContactBusiness.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/classes/ContactBusiness.php')
-rw-r--r--includes/classes/ContactBusiness.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/includes/classes/ContactBusiness.php b/includes/classes/ContactBusiness.php
new file mode 100644
index 0000000..1b75b0e
--- /dev/null
+++ b/includes/classes/ContactBusiness.php
@@ -0,0 +1,28 @@
+<?php
+/**
+ * Business contact — extends Contact with content_type_guid='contactbusiness'.
+ *
+ * Business-specific xref types ($02+ subtypes) are registered at the 'contactbusiness'
+ * level; shared contact fields live at the 'contact' package level.
+ *
+ * @package contact
+ */
+namespace Bitweaver\Contact;
+
+class ContactBusiness extends Contact {
+
+ public function __construct( $pContactId = NULL, $pContentId = NULL ) {
+ parent::__construct( $pContactId, $pContentId );
+ $this->mContentTypeGuid = CONTACTBUSINESS_CONTENT_TYPE_GUID;
+ $this->registerContentType( CONTACTBUSINESS_CONTENT_TYPE_GUID, [
+ 'content_type_guid' => CONTACTBUSINESS_CONTENT_TYPE_GUID,
+ 'content_name' => 'Business Contact',
+ 'handler_class' => 'ContactBusiness',
+ 'handler_package' => 'contact',
+ 'handler_file' => 'ContactBusiness.php',
+ 'maintainer_url' => 'http://lsces.co.uk',
+ ] );
+ // mPackageGuid='contact' is set automatically by registerContentType()
+ // because handler_package('contact') != content_type_guid('contactbusiness').
+ }
+}