Set all name value pair collections to extend from generic class
This commit is contained in:
parent
196850f7b6
commit
034386aa59
3 changed files with 3 additions and 48 deletions
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
namespace App\Ramcar;
|
namespace App\Ramcar;
|
||||||
|
|
||||||
class ServiceType
|
class ServiceType extends NameValue
|
||||||
{
|
{
|
||||||
const BATTERY_REPLACEMENT_NEW = 'battery_new';
|
const BATTERY_REPLACEMENT_NEW = 'battery_new';
|
||||||
const BATTERY_REPLACEMENT_WARRANTY = 'battery_warranty';
|
const BATTERY_REPLACEMENT_WARRANTY = 'battery_warranty';
|
||||||
|
|
@ -17,19 +17,4 @@ class ServiceType
|
||||||
'overheat' => 'Overheat Assistance',
|
'overheat' => 'Overheat Assistance',
|
||||||
'fuel' => 'Emergency Refuel',
|
'fuel' => 'Emergency Refuel',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
static public function getCollection()
|
|
||||||
{
|
|
||||||
return self::COLLECTION;
|
|
||||||
}
|
|
||||||
|
|
||||||
static public function validate($type_text)
|
|
||||||
{
|
|
||||||
if (isset(self::COLLECTION[$type_text]))
|
|
||||||
return true;
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
namespace App\Ramcar;
|
namespace App\Ramcar;
|
||||||
|
|
||||||
class TicketStatus
|
class TicketStatus extends NameValue
|
||||||
{
|
{
|
||||||
const FILED = 'filed';
|
const FILED = 'filed';
|
||||||
const ACKNOWLEDGED = 'acknowledged';
|
const ACKNOWLEDGED = 'acknowledged';
|
||||||
|
|
@ -13,19 +13,4 @@ class TicketStatus
|
||||||
'acknowledged' => 'Acknowledged',
|
'acknowledged' => 'Acknowledged',
|
||||||
'closed' => 'Closed',
|
'closed' => 'Closed',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
static public function getCollection()
|
|
||||||
{
|
|
||||||
return self::COLLECTION;
|
|
||||||
}
|
|
||||||
|
|
||||||
static public function validate($type_text)
|
|
||||||
{
|
|
||||||
if (isset(self::COLLECTION[$type_text]))
|
|
||||||
return true;
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
namespace App\Ramcar;
|
namespace App\Ramcar;
|
||||||
|
|
||||||
class TicketType
|
class TicketType extends NameValue
|
||||||
{
|
{
|
||||||
const COMPLAINT = 'complaint';
|
const COMPLAINT = 'complaint';
|
||||||
const QUESTION = 'question';
|
const QUESTION = 'question';
|
||||||
|
|
@ -17,19 +17,4 @@ class TicketType
|
||||||
'billing' => 'Billing',
|
'billing' => 'Billing',
|
||||||
'other' => 'Other',
|
'other' => 'Other',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
static public function getCollection()
|
|
||||||
{
|
|
||||||
return self::COLLECTION;
|
|
||||||
}
|
|
||||||
|
|
||||||
static public function validate($type_text)
|
|
||||||
{
|
|
||||||
if (isset(self::COLLECTION[$type_text]))
|
|
||||||
return true;
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue