create() public static method

public static create ( Gitlab\Client $client, string $name, array $params = [] ) : Project
$client Gitlab\Client
$name string
$params array
return Project
コード例 #1
0
 /**
  * Create new project from ['gitlab']['project-name']
  * @return boolean
  */
 public function createProject()
 {
     $project = new Project();
     if ($this->idgroup) {
         $project->create($this->client, $this->config['gitlab']['project-name'], array('description' => 'Mikrotik RouterOS backup files.', 'namespace_id' => $this->getGroupID(), 'issues_enabled' => false));
         return $this->checkProjectName();
     }
     $project->create($this->client, $this->config['gitlab']['project-name'], array('description' => 'Mikrotik RouterOS backup files.', 'issues_enabled' => false));
     return $this->checkProjectName();
 }
コード例 #2
0
ファイル: GitLabAPI.php プロジェクト: spirit-dev/dbox-portal
 /**
  * @param Project $project
  * @return array|\Gitlab\Model\Project|null
  */
 public function createProject(Project $project)
 {
     // Fast Return in case of server stopped
     if (!$this->isServerAvailable()) {
         return null;
     }
     // Creating project
     $gitLabProject = \Gitlab\Model\Project::create($this->gitLabClient, $project->getName(), array('description' => $project->getDescription(), 'issue_enabled' => $project->isGitLabIssueEnabled(), 'wiki_enabled' => $project->isGitLabWikiEnabled(), 'snippets_enabled' => $project->isGitLabSnippetsEnabled(), 'builds_enabled' => false));
     // returning created object
     return $gitLabProject;
 }