1 | <?php |
||
37 | abstract class AbstractOverwriteElement |
||
38 | { |
||
39 | /** |
||
40 | * @param integer $protectedUid |
||
41 | * @param string $tableName |
||
42 | * @return boolean |
||
43 | */ |
||
44 | protected function hasOverwriteProtection($protectedUid, $tableName) |
||
45 | { |
||
46 | if (false === is_numeric($protectedUid)) { |
||
47 | return false; |
||
48 | } |
||
49 | |||
50 | $countOverwriteProtections = $this->getOverwriteProtectionRepository() |
||
51 | ->findByProtectedUidAndTableName($protectedUid, $tableName) |
||
52 | ->count(); |
||
53 | return ($countOverwriteProtections > 0); |
||
54 | } |
||
55 | |||
56 | /** |
||
57 | * @param integer $protectedUid |
||
58 | * @param string $tableName |
||
59 | * @return OverwriteProtection |
||
60 | */ |
||
61 | protected function getOverwriteProtection($protectedUid, $tableName) |
||
62 | { |
||
63 | return $this->getOverwriteProtectionRepository() |
||
64 | ->findByProtectedUidAndTableName($protectedUid, $tableName) |
||
65 | ->getFirst(); |
||
66 | } |
||
67 | |||
68 | /** |
||
69 | * @return LanguageService |
||
70 | * @codeCoverageIgnore |
||
71 | */ |
||
72 | protected function getLanguageService() |
||
76 | |||
77 | /** |
||
78 | * @return NodeFactory |
||
79 | * @codeCoverageIgnore |
||
80 | */ |
||
81 | protected function getNodeFactory() |
||
85 | |||
86 | /** |
||
87 | * @return OverwriteProtectionRepository |
||
88 | * @codeCoverageIgnore |
||
89 | */ |
||
90 | protected function getOverwriteProtectionRepository() |
||
95 | } |
||
96 |