Completed
Push — master ( 8545cb...05e72b )
by Jean-Christophe
01:22
created

UbiquityMyAdminData::getUpdateManyToManyInForm()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
namespace micro\controllers\admin;
3
use micro\orm\DAO;
4
use micro\orm\OrmUtils;
5
6
/**
7
 * The base class for displaying datas in UbiquityMyAdminController
8
 * @author jc
9
 *
10
 */
11
class UbiquityMyAdminData {
12
13
	/**
14
	 * Returns the table names to display in the left menu
15
	 */
16
	public function getTableNames(){
17
		return DAO::$db->getTablesName();
18
	}
19
20
	/**
21
	 * Returns the fields to display in the showTable action for $model
22
	 * @param string $model
23
	 */
24
	public function getFieldNames($model){
25
		return OrmUtils::getSerializableFields($model);
26
	}
27
28
	public function getFormFieldNames($model){
29
		return OrmUtils::getSerializableFields($model);
30
	}
31
32
	public function getManyToManyDatas($fkClass,$instance,$member){
2 ignored issues
show
Unused Code introduced by
The parameter $instance is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $member is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
33
		return DAO::getAll($fkClass);
34
	}
35
36
	public function getUpdateOneToManyInForm() {
37
		return false;
38
	}
39
40
	public function getUpdateManyToManyInForm() {
41
		return true;
42
	}
43
44
	public function getUpdateManyToOneInForm() {
45
		return true;
46
	}
47
}
48