public function getListDepartments($includeBlock = true) {
		$fields = [
			$this->alias . '.id',
			$this->alias . '.value',
		];
		$conditions = [];
		$blockExists = $this->hasField('block');
		if (!$includeBlock && $blockExists) {
			$conditions[$this->alias . '.block'] = false;
		}
		$order = [$this->alias . '.value' => 'asc'];
		$this->recursive = -1;

		return $this->find('list', compact('fields', 'conditions', 'order'));
	}
public function getListDepartments($includeBlock = true) {
		$fields = [
			$this->alias . '.id',
			$this->alias . '.value',
		];
		$conditions = [];
		$blockExists = $this->hasField('block');
		if (!$includeBlock && $blockExists) {
			$conditions[$this->alias . '.block'] = false;
		}
		$order = [$this->alias . '.value' => 'asc'];
		$this->recursive = -1;

		return $this->find('list', compact('fields', 'conditions', 'order'));
	}
public function getListDepartments ( $ includeBlock = true ) { $ fields = [ $ this -> alias . '.id' , $ this -> alias . '.value' , ] ; $ conditions = [ ] ; $ blockExists = $ this -> hasField ( 'block' ) ; if ( ! $ includeBlock && $ blockExists ) { $ conditions [ $ this -> alias . '.block' ] = false ; } $ order = [ $ this -> alias . '.value' => 'asc' ] ; $ this -> recursive = - 1 ; return $ this -> find ( 'list' , compact ( 'fields' , 'conditions' , 'order' ) ) ; }
Return List of departments

@param bool $includeBlock Flag of inclusion in result the blocked
departments (if True).
@return array List of departments
Return List of departments