Code Duplication    Length = 14-14 lines in 2 locations

www/engine/System/Classes/Modules/Entitizer/Collection/Menuitems.php 1 location

@@ 14-27 (lines=14) @@
11
12
	use Modules\Entitizer;
13
14
	trait Menuitems {
15
16
		# Collection configuration
17
18
		protected static $order_by = ['position' => 'ASC', 'id' => 'ASC'];
19
20
		/**
21
		 * Initialize the collection
22
		 */
23
24
		protected function init() {
25
26
			$this->config->addParam('active', '', function (bool $active) {
27
28
				return ($active ? "ent.active = 1" : '');
29
			});
30
		}

www/engine/System/Classes/Modules/Entitizer/Collection/Widgets.php 1 location

@@ 14-27 (lines=14) @@
11
12
	use Modules\Entitizer;
13
14
	trait Widgets {
15
16
		# Collection configuration
17
18
		protected static $order_by = ['title' => 'ASC', 'id' => 'ASC'];
19
20
		/**
21
		 * Initialize the collection
22
		 */
23
24
		protected function init() {
25
26
			$this->config->addParam('active', '', function (bool $active) {
27
28
				return ($active ? "ent.active = 1" : '');
29
			});
30
		}