Story
+ Inheritance diagram for Story:

Description

Public Properties

final const TYPE = 'story'
 
- Public Properties inherited from AbstractEntity
const TYPE = ''
 All entity classes must redeclare this to match their resource_type. More...
 

Protected Properties

final const DIR = 'stories'
 
const MAP
 
- Protected Properties inherited from AbstractEntity
const DIR = ''
 All entity classes must redeclare this to match their REST directory. More...
 
const OPT_FIELDS = []
 
- Protected Properties inherited from Data
readonly Api Api $api
 
array array self[] AbstractEntity[] $data = []
 
array bool[] $diff = []
 
const MAP = []
 

Public Methods

magic string getCreatedAt ()
 RFC3339x. More...
 
magic null User getCreatedBy ()
 This will be null if Asana produced the story. More...
 
array< string, null|string > getKeyValue ()
 Key-value pair of custom field change. More...
 
magic int getNumLikes ()
 
magic string getResourceSubtype ()
 See the subtype constants. More...
 
magic string getSource ()
 web|api More...
 
magic Task getTarget ()
 
magic string getText ()
 
bool isEdited ()
 
bool isPinned ()
 
magic bool ofAddedToProject ()
 
magic bool ofAddedToTag ()
 
magic bool ofAllDependenciesMarkedComplete ()
 
magic bool ofAssigned ()
 
magic bool ofAttachmentAdded ()
 
magic bool ofCommentAdded ()
 
magic bool ofCommentLiked ()
 
magic bool ofDependencyAdded ()
 Task has a new dependency. More...
 
magic bool ofDependencyMarkedComplete ()
 
magic bool ofDependencyMarkedIncomplete ()
 
magic bool ofDependentAdded ()
 Task became a dependency. More...
 
magic bool ofDueDateChanged ()
 
magic bool ofDueToday ()
 
magic bool ofDuplicated ()
 Task was created via duplication. More...
 
magic bool ofEnumCustomFieldChanged ()
 
magic bool ofFollowerAdded ()
 
magic bool ofLiked ()
 Task itself was liked. More...
 
magic bool ofMarkedComplete ()
 
magic bool ofMarkedIncomplete ()
 
magic bool ofMentioned ()
 Task was mentioned in another task. More...
 
magic bool ofNameChanged ()
 
magic bool ofNotesChanged ()
 
magic bool ofNumberCustomFieldChanged ()
 
magic bool ofRemovedFromProject ()
 
magic bool ofRemovedFromTag ()
 
magic bool ofSectionChanged ()
 
magic bool ofTextCustomFieldChanged ()
 
magic bool ofUnassigned ()
 
$this setPinned (bool $pinned)
 
magic $this setText (string $text)
 
- Public Methods inherited from AbstractEntity
string __toString ()
 The entity's canonical REST path. More...
 
null string getGid ()
 
bool hasGid ()
 
$this reload ()
 Fully reloads the entity from Asana. More...
 
- Public Methods inherited from Data
mixed __call (string $method, array $args)
 Magic method handler. More...
 
 __construct (Api|self $caller, array $data=[])
 
array __serialize ()
 
void __unserialize (array $data)
 
bool isDiff ()
 Whether the instance has changes. More...
 
array jsonSerialize ()
 
bool offsetExists (mixed $offset)
 
mixed offsetGet (mixed $offset)
 
void offsetSet (mixed $offset, mixed $value)
 
void offsetUnset (mixed $offset)
 
array toArray (bool $diff=false)
 Dehydrated data. More...
 
- Public Methods inherited from ImmutableArrayTrait
void offsetSet (mixed $offset, mixed $value)
 Throws unless overridden. More...
 
- Public Methods inherited from CreateTrait
$this create ()
 Creates the new entity in Asana. More...
 
- Public Methods inherited from UpdateTrait
$this update ()
 PUT the data diff to Asana, if there is one. More...
 
- Public Methods inherited from DeleteTrait
void delete ()
 Deletes the entity from Asana. More...
 
- Public Methods inherited from DateTimeTrait
null DateTimeInterface _getDateTime ()
 Returns a date-time field as an immutable object. More...
 
- Public Methods inherited from LikesTrait
magic Like[] getLikes ()
 
magic bool hasLikes ()
 
magic bool isLiked ()
 Whether you like this. More...
 
magic Like[] selectLikes (callable $filter)
 fn( Like $like ): bool More...
 
magic $this setLiked (bool $liked)
 Sets whether you like this. More...
 

Protected Methods

Task _getParentNode ()
 
void _setData (array $data)
 
- Protected Methods inherited from AbstractEntity
mixed _get (string $field)
 Lazy-loads missing fields. More...
 
void _reload (string $field)
 
- Protected Methods inherited from Data
bool _has (string $field)
 Magic method: hasField() More...
 
_hydrate (string $class, $item)
 Sub-data factory that draws from the entity pool. More...
 
bool _is (string $field)
 Magic method: isField() More...
 
bool _of (string $resourceSubtype)
 Magic method: ofResourceSubtypeValue() More...
 
array _select (string|iterable $subject, callable $filter,... $args)
 Magic method: selectField(callable $filter) More...
 
$this _set (string $field, $value)
 Magic method: setField(mixed $value) More...
 
void _setField (string $field, $value)
 Sets a value, hydrating if mapped, and clears the diff. More...
 

Properties

◆ MAP

const MAP
protected
Initial value:
= [
'created_by' => User::class,
'likes' => [Like::class],
'target' => Task::class
]

Methods

◆ _getParentNode()

Task _getParentNode ( )
finalprotected
Returns
Task

Reimplemented from CreateTrait.

◆ _setData()

void _setData ( array  $data)
protected
Parameters
array$data
Returns
void

Reimplemented from AbstractEntity.

◆ getCreatedAt()

magic string getCreatedAt ( )

RFC3339x.

Returns
string

◆ getCreatedBy()

magic null User getCreatedBy ( )

This will be null if Asana produced the story.

Returns
null|User

◆ getKeyValue()

array<string,null|string> getKeyValue ( )

Key-value pair of custom field change.

The key is the field name, not its GID.

Returns
array<string,null|string>

◆ getNumLikes()

magic int getNumLikes ( )
Returns
int

Reimplemented from LikesTrait.

◆ getResourceSubtype()

magic string getResourceSubtype ( )

See the subtype constants.

Returns
string

◆ getSource()

magic string getSource ( )

web|api

Returns
string

◆ getTarget()

magic Task getTarget ( )
Returns
Task

◆ getText()

magic string getText ( )
Returns
string

◆ isEdited()

bool isEdited ( )
final
Returns
bool

◆ isPinned()

bool isPinned ( )
final
Returns
bool

◆ ofAddedToProject()

magic bool ofAddedToProject ( )
Returns
bool

◆ ofAddedToTag()

magic bool ofAddedToTag ( )
Returns
bool

◆ ofAllDependenciesMarkedComplete()

magic bool ofAllDependenciesMarkedComplete ( )
Returns
bool

◆ ofAssigned()

magic bool ofAssigned ( )
Returns
bool

◆ ofAttachmentAdded()

magic bool ofAttachmentAdded ( )
Returns
bool

◆ ofCommentAdded()

magic bool ofCommentAdded ( )
Returns
bool

◆ ofCommentLiked()

magic bool ofCommentLiked ( )
Returns
bool

◆ ofDependencyAdded()

magic bool ofDependencyAdded ( )

Task has a new dependency.

Returns
bool

◆ ofDependencyMarkedComplete()

magic bool ofDependencyMarkedComplete ( )
Returns
bool

◆ ofDependencyMarkedIncomplete()

magic bool ofDependencyMarkedIncomplete ( )
Returns
bool

◆ ofDependentAdded()

magic bool ofDependentAdded ( )

Task became a dependency.

Returns
bool

◆ ofDueDateChanged()

magic bool ofDueDateChanged ( )
Returns
bool

◆ ofDueToday()

magic bool ofDueToday ( )
Returns
bool

◆ ofDuplicated()

magic bool ofDuplicated ( )

Task was created via duplication.

Returns
bool

◆ ofEnumCustomFieldChanged()

magic bool ofEnumCustomFieldChanged ( )
Returns
bool

◆ ofFollowerAdded()

magic bool ofFollowerAdded ( )
Returns
bool

◆ ofLiked()

magic bool ofLiked ( )

Task itself was liked.

Returns
bool

◆ ofMarkedComplete()

magic bool ofMarkedComplete ( )
Returns
bool

◆ ofMarkedIncomplete()

magic bool ofMarkedIncomplete ( )
Returns
bool

◆ ofMentioned()

magic bool ofMentioned ( )

Task was mentioned in another task.

Returns
bool

◆ ofNameChanged()

magic bool ofNameChanged ( )
Returns
bool

◆ ofNotesChanged()

magic bool ofNotesChanged ( )
Returns
bool

◆ ofNumberCustomFieldChanged()

magic bool ofNumberCustomFieldChanged ( )
Returns
bool

◆ ofRemovedFromProject()

magic bool ofRemovedFromProject ( )
Returns
bool

◆ ofRemovedFromTag()

magic bool ofRemovedFromTag ( )
Returns
bool

◆ ofSectionChanged()

magic bool ofSectionChanged ( )
Returns
bool

◆ ofTextCustomFieldChanged()

magic bool ofTextCustomFieldChanged ( )
Returns
bool

◆ ofUnassigned()

magic bool ofUnassigned ( )
Returns
bool

◆ setPinned()

$this setPinned ( bool  $pinned)
final
Parameters
bool$pinned
Returns
$this

◆ setText()

magic $this setText ( string  $text)
Depends:
create-only, comments only
Returns
$this