class LargoController extendsController

Traits

AuthorizesRequests
ValidatesRequests

Methods

bool
isAutomatedRequest(Request$request =null)

Determines if the request was done by an automated script (with API token or ajax).

RedirectResponse
fuzzyRedirect()

Redirects to the _redirect URL, to a route or else back.

validateLargoInput(Request$request)

Validates the input for saving an Largo session.

array
getAffectedAnnotations(array$dismissed,array$changed)

Get a list of unique annotation IDs that are either dismissed or changed.

bool
anotationsBelongToVolumes(array$annotations,array$volumes)

Check if all given annotations belong to the given volumes.

array
getRequiredLabelTrees(array$changed)

Returns the IDs of all label trees that must be available to apply the changes.

array
ignoreDeletedLabels(array$dismissed,array$changed)

Removes changes to annotations that should get a new label which no longer exists.

applySave(User$user,array$dismissed,array$changed,bool$force =false)

Apply the changes of an Largo session.

applyDismissedLabels(User$user,array$dismissed,bool$force)

Detach annotation labels that were dismissed in a Largo session.

applyChangedLabels(User$user,array$changed)

Attach annotation labels that were chosen in a Largo session.

Details

inControllerat line21
bool isAutomatedRequest(Request$request =null)

Determines if the request was done by an automated script (with API token or ajax).

Parameters

Request $request

Return Value

bool

inControllerat line15
protectedRedirectResponse fuzzyRedirect()

Redirects to the _redirect URL, to a route or else back.

Return Value

RedirectResponse

at line20
protected validateLargoInput(Request$request)

Validates the input for saving an Largo session.

Parameters

Request $request

at line37
protectedarray getAffectedAnnotations(array$dismissed,array$changed)

Get a list of unique annotation IDs that are either dismissed or changed.

Parameters

array $dismissed Array of all dismissed annotation IDs for each label
array $changed Array of all changed annotation IDs for each label

Return Value

array

at line58
protectedbool anotationsBelongToVolumes(array$annotations,array$volumes)

Check if all given annotations belong to the given volumes.

Parameters

array $annotations Annotation IDs
array $volumes Volume IDs

Return Value

bool

at line73
protectedarray getRequiredLabelTrees(array$changed)

Returns the IDs of all label trees that must be available to apply the changes.

Parameters

array $changed Array of all changed annotation IDs for each label

Return Value

array

at line88
protectedarray ignoreDeletedLabels(array$dismissed,array$changed)

Removes changes to annotations that should get a new label which no longer exists.

Parameters

array $dismissed
array $changed

Return Value

array Containing 'dismissed' and 'changed'

at line128
protected applySave(User$user,array$dismissed,array$changed,bool$force =false)

Apply the changes of an Largo session.

Removes the dismissed annotation labels and creates the changed annotation labels.

Parameters

User $user
array $dismissed Array of all dismissed annotation IDs for each label
array $changed Array of all changed annotation IDs for each label
bool $force Dismiss labels even if they were created by other users

at line146
protected applyDismissedLabels(User$user,array$dismissed,bool$force)

Detach annotation labels that were dismissed in a Largo session.

Parameters

User $user
array $dismissed
bool $force

at line164
protected applyChangedLabels(User$user,array$changed)

Attach annotation labels that were chosen in a Largo session.

Parameters

User $user
array $changed