Passed
Push — master ( 93ee71...8ec6bb )
by Aimeos
07:32 queued 05:06
created

Laravel::getTable()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
/**
4
 * @license LGPLv3, http://opensource.org/licenses/LGPL-3.0
5
 * @copyright Aimeos (aimeos.org), 2015-2024
6
 * @package MShop
7
 * @subpackage Customer
8
 */
9
10
11
namespace Aimeos\MShop\Customer\Manager\Address;
12
13
14
/**
15
 * Laravel implementation of the customer address class.
16
 *
17
 * @package MShop
18
 * @subpackage Customer
19
 */
20
class Laravel
21
	extends \Aimeos\MShop\Customer\Manager\Address\Standard
22
{
23
	/**
24
	 * Returns the attributes that can be used for searching.
25
	 *
26
	 * @param bool $withsub Return also attributes of sub-managers if true
27
	 * @return \Aimeos\Base\Criteria\Attribute\Iface[] List of search attribute items
28
	 */
29
	public function getSearchAttributes( bool $withsub = true ) : array
30
	{
31
		return array_replace( parent::getSearchAttributes( $withsub ), $this->createAttributes( [
32
			'customer.address.id' => [
33
				'label' => 'Customer address ID',
34
				'internalcode' => 'id',
35
				'internaldeps' => ['LEFT JOIN "users_address" AS mcusad ON ( mcus."id" = mcusad."parentid" )'],
36
				'type' => 'int',
37
				'public' => false,
38
			]
39
		] ) );
40
	}
41
42
43
	/**
44
	 * Returns the config path for retrieving the configuration values.
45
	 *
46
	 * @return string Configuration path
47
	 */
48
	protected function getConfigPath() : string
49
	{
50
		return 'mshop/customer/manager/address/laravel/';
51
	}
52
53
	/**
54
	 * Returns the name of the used table
55
	 *
56
	 * @return string Table name
57
	 */
58
	protected function getTable() : string
59
	{
60
		return 'users_address';
61
	}
62
}
63