class LargoController extendsLargoController

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.

Response
save(Request$request,int$id)

Save changes of an Largo session for a volume.

Collection
getAvailableLabelTrees(User$user,Volume$volume)

Get label trees of projects that the user and the volume have in common.

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

inLargoControllerat line20
protected validateLargoInput(Request$request)

Validates the input for saving an Largo session.

Parameters

Request $request

inLargoControllerat 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

inLargoControllerat 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

inLargoControllerat 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

inLargoControllerat 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'

inLargoControllerat 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

inLargoControllerat 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

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

Attach annotation labels that were chosen in a Largo session.

Parameters

User $user
array $changed

at line48
Response save(Request$request,int$id)

Save changes of an Largo session for a volume.

Parameters

Request $request
int $id Volume ID

Return Value

Response

at line107
protectedCollection getAvailableLabelTrees(User$user,Volume$volume)

Get label trees of projects that the user and the volume have in common.

Parameters

User $user
Volume $volume

Return Value

Collection