diff --git a/Classes/Domain/Model/Phone.php b/Classes/Domain/Model/Phone.php index 2fa2017..7db4a3f 100755 --- a/Classes/Domain/Model/Phone.php +++ b/Classes/Domain/Model/Phone.php @@ -23,6 +23,11 @@ class Phone extends AbstractEntity */ protected $number = ''; + /** + * @var int + */ + protected $sorting = 0; + /** * @param string $type * @throws \InvalidArgumentException @@ -78,4 +83,20 @@ public function getNumber() { return $this->number; } + + /** + * @return int + */ + public function getSorting() + { + return $this->sorting; + } + + /** + * @param int $sorting + */ + public function setSorting(int $sorting) + { + $this->sorting = $sorting; + } } diff --git a/Configuration/TCA/tx_contacts_domain_model_company.php b/Configuration/TCA/tx_contacts_domain_model_company.php index f4777ff..2110a0a 100755 --- a/Configuration/TCA/tx_contacts_domain_model_company.php +++ b/Configuration/TCA/tx_contacts_domain_model_company.php @@ -349,6 +349,7 @@ 'type' => 'inline', 'foreign_table' => 'tx_contacts_domain_model_phone', 'foreign_field' => 'company', + 'foreign_sortby' => 'sorting', 'maxitems' => 9999, 'appearance' => [ 'collapseAll' => 1, diff --git a/Configuration/TCA/tx_contacts_domain_model_contact.php b/Configuration/TCA/tx_contacts_domain_model_contact.php index 8c4c81d..e7899ec 100755 --- a/Configuration/TCA/tx_contacts_domain_model_contact.php +++ b/Configuration/TCA/tx_contacts_domain_model_contact.php @@ -287,6 +287,7 @@ 'type' => 'inline', 'foreign_table' => 'tx_contacts_domain_model_phone', 'foreign_field' => 'contact', + 'foreign_sortby' => 'sorting', 'maxitems' => 9999, 'appearance' => [ 'collapseAll' => 1, diff --git a/Configuration/TCA/tx_contacts_domain_model_phone.php b/Configuration/TCA/tx_contacts_domain_model_phone.php index cd69c6c..0fab0ac 100755 --- a/Configuration/TCA/tx_contacts_domain_model_phone.php +++ b/Configuration/TCA/tx_contacts_domain_model_phone.php @@ -133,6 +133,12 @@ ], ], ], + 'sorting' => [ + 'label' => 'sorting', + 'config' => [ + 'type' => 'passthrough', + ], + ], 'type' => [ 'exclude' => 0, 'label' => $_LLL_db . ':tx_contacts_domain_model_phone.type',