PHP Class ApprovalsDispatcher

Inheritance: extends Dispatcher
显示文件 Open project: silverstripe/deploynaut Class Usage Examples

Protected Properties

Property Type Description
$environment DNEnvironment
$project DNProject

Public Methods

Method Description
Link ( string $action = '' ) : string
approve ( SS_HTTPRequest $request ) : SS_HTTPResponse
can_approve ( DNEnvironment $environment, Member $member = null ) : boolean
can_bypass_approval ( DNEnvironment $environment, Member $member = null ) : boolean
cancel ( SS_HTTPRequest $request ) : SS_HTTPResponse
getModel ( string $name = '' ) : array
init ( )
reject ( SS_HTTPRequest $request ) : SS_HTTPResponse
submit ( SS_HTTPRequest $request ) : SS_HTTPResponse

Protected Methods

Method Description
validateDeployment ( DNDeployment $deployment ) : null | SS_HTTPResponse Check if a DNDeployment exists and do permission checks on it. If there is something wrong it will return an APIResponse with the error, otherwise null.

Method Details

approve() public method

public approve ( SS_HTTPRequest $request ) : SS_HTTPResponse
$request SS_HTTPRequest
return SS_HTTPResponse

can_approve() public static method

public static can_approve ( DNEnvironment $environment, Member $member = null ) : boolean
$environment DNEnvironment
$member Member
return boolean

can_bypass_approval() public static method

public static can_bypass_approval ( DNEnvironment $environment, Member $member = null ) : boolean
$environment DNEnvironment
$member Member
return boolean

cancel() public method

public cancel ( SS_HTTPRequest $request ) : SS_HTTPResponse
$request SS_HTTPRequest
return SS_HTTPResponse

getModel() public method

public getModel ( string $name = '' ) : array
$name string
return array

init() public method

public init ( )

reject() public method

public reject ( SS_HTTPRequest $request ) : SS_HTTPResponse
$request SS_HTTPRequest
return SS_HTTPResponse

submit() public method

public submit ( SS_HTTPRequest $request ) : SS_HTTPResponse
$request SS_HTTPRequest
return SS_HTTPResponse

validateDeployment() protected method

Check if a DNDeployment exists and do permission checks on it. If there is something wrong it will return an APIResponse with the error, otherwise null.
protected validateDeployment ( DNDeployment $deployment ) : null | SS_HTTPResponse
$deployment DNDeployment
return null | SS_HTTPResponse

Property Details

$environment protected_oe property

protected DNEnvironment $environment
return DNEnvironment

$project protected_oe property

protected DNProject $project
return DNProject