MetaFox

Photo
in package

Class Photo.

Table of Contents

Methods

createPhoto()  : array<string|int, int>
isVideoAllow()  : bool
repository()  : PhotoRepository|PhotoRepositoryInterface
transformDataForFeed()  : array<string|int, mixed>
handlePhotoFiles()  : array<string, mixed>
$data sample [ ... , 'photo_files' => [ ['id' => 1, 'type' => 'photo', 'status' => 'new'], ['id' => 2, 'type' => 'photo', 'status' => 'new'], ['id' => 3, 'type' => 'photo', 'status' => 'remove'], ['id' => 4, 'type' => 'photo', 'status' => 'remove'], ... ], ].

Methods

createPhoto()

public createPhoto(User $context, User $owner, array<string, mixed> $attributes[, int $contextType = Album::TIMELINE_ALBUM ]) : array<string|int, int>
Parameters
$context : User
$owner : User
$attributes : array<string, mixed>
  • [array categories, array files, int privacy, array list, string location_name, numeric location_latitude, numeric location_longitude]
$contextType : int = Album::TIMELINE_ALBUM
Tags
throws
AuthorizationException
Return values
array<string|int, int>

isVideoAllow()

public isVideoAllow() : bool
Return values
bool

transformDataForFeed()

public transformDataForFeed(array<string|int, mixed> $params) : array<string|int, mixed>
Parameters
$params : array<string|int, mixed>
Return values
array<string|int, mixed>

handlePhotoFiles()

$data sample [ ... , 'photo_files' => [ ['id' => 1, 'type' => 'photo', 'status' => 'new'], ['id' => 2, 'type' => 'photo', 'status' => 'new'], ['id' => 3, 'type' => 'photo', 'status' => 'remove'], ['id' => 4, 'type' => 'photo', 'status' => 'remove'], ... ], ].

protected handlePhotoFiles(array<string, mixed> $data) : array<string, mixed>
Parameters
$data : array<string, mixed>
Return values
array<string, mixed>

        
On this page

Search results