src/Queue/TaskFinder.php
public function allAppAndPluginTasks() {
		if ($this->tasks !== null) {
			return $this->tasks;
		}

		$paths = App::path('Shell/Task');
		$this->tasks = [];

		foreach ($paths as $path) {
			$Folder = new Folder($path);
			$this->tasks = $this->getAppPaths($Folder);
		}
		$plugins = Plugin::loaded();
		foreach ($plugins as $plugin) {
			$pluginPaths = App::path('Shell/Task', $plugin);
			foreach ($pluginPaths as $pluginPath) {
				$Folder = new Folder($pluginPath);
				$pluginTasks = $this->getPluginPaths($Folder, $plugin);
				$this->tasks = array_merge($this->tasks, $pluginTasks);
			}
		}

		return $this->tasks;
	}
public function allAppAndPluginTasks() {
		if ($this->tasks !== null) {
			return $this->tasks;
		}

		$paths = App::path('Shell/Task');
		$this->tasks = [];

		foreach ($paths as $path) {
			$Folder = new Folder($path);
			$this->tasks = $this->getAppPaths($Folder);
		}
		$plugins = Plugin::loaded();
		foreach ($plugins as $plugin) {
			$pluginPaths = App::path('Shell/Task', $plugin);
			foreach ($pluginPaths as $pluginPath) {
				$Folder = new Folder($pluginPath);
				$pluginTasks = $this->getPluginPaths($Folder, $plugin);
				$this->tasks = array_merge($this->tasks, $pluginTasks);
			}
		}

		return $this->tasks;
	}
public function allAppAndPluginTasks ( ) { if ( $ this -> tasks !== null ) { return $ this -> tasks ; } $ paths = App :: path ( 'Shell/Task' ) ; $ this -> tasks = [ ] ; foreach ( $ paths as $ path ) { $ Folder = new Folder ( $ path ) ; $ this -> tasks = $ this -> getAppPaths ( $ Folder ) ; } $ plugins = Plugin :: loaded ( ) ; foreach ( $ plugins as $ plugin ) { $ pluginPaths = App :: path ( 'Shell/Task' , $ plugin ) ; foreach ( $ pluginPaths as $ pluginPath ) { $ Folder = new Folder ( $ pluginPath ) ; $ pluginTasks = $ this -> getPluginPaths ( $ Folder , $ plugin ) ; $ this -> tasks = array_merge ( $ this -> tasks , $ pluginTasks ) ; } } return $ this -> tasks ; }
Returns all possible Queue tasks.

Makes sure that app tasks are prioritized over plugin ones.

@return array
Returns all possible Queue tasks .