REBELinBLUE\Deployer\Contracts\Repositories\CommandRepositoryInterface::getForDeployStep PHP Method

getForDeployStep() public method

public getForDeployStep ( integer $target_id, string $target, integer $step ) : Illuminate\Database\Eloquent\Collection
$target_id integer
$target string
$step integer
return Illuminate\Database\Eloquent\Collection
    public function getForDeployStep($target_id, $target, $step);

Usage Example

 /**
  * Display a listing of before/after commands for the supplied stage.
  *
  * @param int $target_id
  * @param int $action
  *
  * @return \Illuminate\View\View
  */
 public function listing($target_id, $action)
 {
     $types = ['clone' => Command::DO_CLONE, 'install' => Command::DO_INSTALL, 'activate' => Command::DO_ACTIVATE, 'purge' => Command::DO_PURGE];
     $template = $this->templateRepository->getById($target_id);
     $target = 'template';
     $breadcrumb = [['url' => route('admin.templates.index'), 'label' => Lang::get('templates.label')], ['url' => route('admin.templates.show', ['templates' => $template->id]), 'label' => $template->name]];
     return view('commands.listing', ['breadcrumb' => $breadcrumb, 'title' => Lang::get('commands.' . strtolower($action)), 'subtitle' => $template->name, 'project' => $template, 'target_type' => $target, 'target_id' => $template->id, 'action' => $types[$action], 'commands' => $this->repository->getForDeployStep($template->id, $target, $types[$action])]);
 }