LFT
  • Namespace
  • Class
  • Tree

Namespaces

  • Docoflow
    • Contracts
    • Entity
    • Facades
    • Models
    • Traits
  • Docolight
    • Agno
      • Traits
    • Container
    • Http
      • Contracts
    • Rest
      • Handler
      • Http
    • Support
      • Debug
      • Traits
  • Docotory
    • Traits
  • None

Classes

  • Docoflow
  • Flo

Class Flo

Workflow fetcher. It helps you to manage your workflow, such as get the verificators, groups, step, etc.

Docolight\Support\Fluent implements ArrayAccess, JsonSerializable, Docolight\Http\Contracts\Arrayable
Extended by Docoflow\Flo implements Docoflow\Contracts\ValidationStatus
Namespace: Docoflow
Author: Krisan Alfa Timur krisanalfa@docotel.co.id
Located at Docoflow/Flo.php

Methods summary

public
# __construct( integer $id )

Flo constructor

Flo constructor

Parameters

$id
Workflow id in database.

Overrides

Docolight\Support\Fluent::__construct
protected
# makeInternalSteps( )
protected
# makeInternalGroups( )
protected
# makeInternalVerificators( )
public static Docoflow\Flo
# fetch( integer $id )

Statically create new Flo implementation

Statically create new Flo implementation

Parameters

$id
Workflow id in database

Returns

Docoflow\Flo
public array|Docoflow\Entity\Step
# steps( )

Get all steps in current workflow. Return an empty array if there's no step in it.

Get all steps in current workflow. Return an empty array if there's no step in it.

Returns

array|Docoflow\Entity\Step
public null|Docoflow\Models\WorkflowStep
# step( integer $step )

Get a single step. Let's say you have 4 steps in this workflow. You can call the 4th step entity by call:

Get a single step. Let's say you have 4 steps in this workflow. You can call the 4th step entity by call:

Flo::fetch($id)->step(4);

Parameters

$step
Step you want to return

Returns

null|Docoflow\Models\WorkflowStep
public array|Docoflow\Entity\Group
# groups( )

Get current group entities. Return an empty array if there's no group in it.

Get current group entities. Return an empty array if there's no group in it.

Returns

array|Docoflow\Entity\Group
public array|Docoflow\Entity\Group
# groupsInStep( integer $step )

Get group based on your step. If you have 4 steps in current workflow, and you want to get a group only in the second step, you may call:

Get group based on your step. If you have 4 steps in current workflow, and you want to get a group only in the second step, you may call:

Flo::fetch(1)->groupsInStep(2);

Parameters

$step
Step you want to return.

Returns

array|Docoflow\Entity\Group
public array|Docoflow\Entity\Verificator
# verificators( )

Get all verificators in your workflow. Will return empty array if there's no verificator in your current workflow.

Get all verificators in your workflow. Will return empty array if there's no verificator in your current workflow.

Returns

array|Docoflow\Entity\Verificator
public array|Docoflow\Entity\Verificator
# verificatorsInStep( integer $step )

Get verificators in certain step. If you have 4 steps in your workflow, and you want to get a list of verificators only in 3rd step:

Get verificators in certain step. If you have 4 steps in your workflow, and you want to get a list of verificators only in 3rd step:

Flo::fetch(1)->verificatorsInStep(3);

Parameters

$step
Step you want to return

Returns

array|Docoflow\Entity\Verificator
public array|Docolight\Support\Collection
# toArray( boolean $returnModel = false )

Convert this implementation to a standard PHP array.

Convert this implementation to a standard PHP array.

Parameters

$returnModel
Set to true if you want to return an object, instead of array.

Returns

array|Docolight\Support\Collection

Overrides

Docolight\Support\Fluent::toArray
public null|Carbon\Carbon
# validUntil( )

Get workflow date validity.

Get workflow date validity.

Returns

null|Carbon\Carbon
public boolean
# valid( )

Determine if workflow stil valid to be validated.

Determine if workflow stil valid to be validated.

Returns

boolean
public Docoflow\Flo
# reset( )

Reset workflow, also all of it's steps and verificators status.

Reset workflow, also all of it's steps and verificators status.

Returns

Docoflow\Flo
public Docoflow\Flo
# resetIf( )

Reset workflow, also all of it's steps and verificators status if only it's not expired.

Reset workflow, also all of it's steps and verificators status if only it's not expired.

Returns

Docoflow\Flo
public Docoflow\Flo
# reject( )

Reject workflow, also all of it's steps and verificators status.

Reject workflow, also all of it's steps and verificators status.

Returns

Docoflow\Flo
public Docoflow\Flo
# rejectIf( )

Reject workflow, also all of it's steps and verificators status if only it's not expired.

Reject workflow, also all of it's steps and verificators status if only it's not expired.

Returns

Docoflow\Flo
public Docoflow\Flo
# approve( )

Approve workflow, also all of it's steps and verificators status.

Approve workflow, also all of it's steps and verificators status.

Returns

Docoflow\Flo
public Docoflow\Flo
# approveIf( )

Approve workflow, also all of it's steps and verificators status if only it's not expired.

Approve workflow, also all of it's steps and verificators status if only it's not expired.

Returns

Docoflow\Flo
public
# save( )

Save all data in workflow, include all of it's steps, groups, and verificators.

Save all data in workflow, include all of it's steps, groups, and verificators.

Methods inherited from Docolight\Support\Fluent

__get(), __isset(), __set(), __toString(), __unset(), attributes(), castToArray(), clear(), except(), fill(), get(), has(), jsonSerialize(), make(), nuke(), offsetExists(), offsetGet(), offsetSet(), offsetUnset(), only(), remove(), set(), toJson()

Constants summary

Constants inherited from Docoflow\Contracts\ValidationStatus

APPROVED, INVALID, PARTIAL, REJECTED, UNPROCESSED

Properties summary

protected Carbon\Carbon $validUntil

Workflow date validity.

Workflow date validity.

#
protected Docoflow\Models\Workflow $workflow

Workflow Model

Workflow Model

#
protected Docoflow\Entity\Step $steps

Step entities

Step entities

#
protected array $jsonAble

Array that frendly with json representation.

Array that frendly with json representation.

#
protected Docoflow\Entity\Group $groups

Group entities

Group entities

#
protected Docoflow\Entity\Verificator $verificators

Verificator entities

Verificator entities

#
protected array $groupedVerificators

A 'cache' to store grouped verificators based on their step

A 'cache' to store grouped verificators based on their step

#
protected array $bootstrapped

Boostrapped entities

Boostrapped entities

#

Properties inherited from Docolight\Support\Fluent

$attributes

LFT API documentation generated by ApiGen