ILIAS
Release_4_4_x_branch Revision 61816
|
Public Member Functions | |
__construct ($a_obj_id, $a_type="") | |
Creates a new ilPreview. | |
exists () | |
Determines whether the preview exists or not. | |
create ($a_obj, $a_force=false) | |
Creates the preview. | |
delete () | |
Deletes the preview. | |
getImages () | |
Gets an array of preview images. | |
save () | |
Saves the preview data to the database. | |
getObjId () | |
Gets the id of the object the preview is for. | |
getObjType () | |
Gets the type of the object the preview is for. | |
getStoragePath () | |
Gets the path where the previews are stored relative to the web directory. | |
getAbsoluteStoragePath () | |
Gets the absolute path where the previews are stored. | |
getFilePathFormat () | |
Gets the absolute file path for preview images that contains a placeholder in the file name ('%02d') to be formatted with the preview number (use 'sprintf' for that). | |
getRenderDate () | |
Gets the date when the preview was rendered. | |
setRenderDate ($a_date) | |
Sets the date when the preview was rendered. | |
getRenderStatus () | |
Gets the status of the rendering process. | |
setRenderStatus ($a_status) | |
Sets the status of the rendering process. | |
getStorage () | |
Gets the storage object for the preview. |
Static Public Member Functions | |
static | createPreview ($a_obj, $a_force=false) |
Creates the preview for the object with the specified id. | |
static | deletePreview ($a_obj_id) |
Deletes the preview for the object with the specified id. | |
static | copyPreviews ($a_src_id, $a_dest_id) |
Copies the preview images from one preview to a new preview object. | |
static | hasPreview ($a_obj_id, $a_type="") |
Determines whether the object with the specified reference id has a preview. | |
static | lookupRenderStatus ($a_obj_id) |
Gets the render status for the object with the specified id. |
Data Fields | |
const | RENDER_STATUS_NONE = "none" |
const | RENDER_STATUS_PENDING = "pending" |
const | RENDER_STATUS_CREATED = "created" |
const | RENDER_STATUS_FAILED = "failed" |
const | FILENAME_FORMAT = "preview_%02d.jpg" |
Protected Member Functions | |
doCreate () | |
Create entry in database. | |
doRead () | |
Read data from database. | |
doUpdate () | |
Update data in database. | |
doDelete () | |
Delete data from database. |
Private Member Functions | |
init () | |
Initializes the preview object. |
Private Attributes | |
$obj_id = null | |
$obj_type = null | |
$storage = null | |
$exists = false | |
$render_date = false | |
$render_status = self::RENDER_STATUS_NONE |
Definition at line 17 of file class.ilPreview.php.
ilPreview::__construct | ( | $a_obj_id, | |
$a_type = "" |
|||
) |
Creates a new ilPreview.
int | $a_obj_id | The object id. |
int | $a_type | The type of the object. |
Definition at line 69 of file class.ilPreview.php.
References init().
|
static |
Copies the preview images from one preview to a new preview object.
int | $a_src_id | The id of the object to copy from. |
int | $a_dest_id | The id of the object to copy to. |
Definition at line 107 of file class.ilPreview.php.
References ilPreviewSettings\isPreviewEnabled(), and ilUtil\rCopy().
Referenced by ilObjFile\doCloneObject().
ilPreview::create | ( | $a_obj, | |
$a_force = false |
|||
) |
Creates the preview.
ilObject | $a_obj | The object to create the preview for. |
bool | $a_force | true, to force the creation of the preview; false, to create the preview only if needed. |
Definition at line 193 of file class.ilPreview.php.
References getRenderDate(), ilRendererFactory\getRenderer(), getRenderStatus(), getStorage(), ilPreviewSettings\isPreviewEnabled(), and save().
|
static |
Creates the preview for the object with the specified id.
ilObject | $a_obj | The object to create the preview for. |
bool | $a_force | true, to force the creation of the preview; false, to create the preview only if needed. |
Definition at line 84 of file class.ilPreview.php.
References $preview.
ilPreview::delete | ( | ) |
Deletes the preview.
Definition at line 234 of file class.ilPreview.php.
References doDelete(), exists(), getStorage(), and RENDER_STATUS_NONE.
|
static |
|
protected |
Create entry in database.
Definition at line 312 of file class.ilPreview.php.
References exists(), getObjId(), getRenderDate(), and getRenderStatus().
Referenced by save().
|
protected |
Delete data from database.
Definition at line 367 of file class.ilPreview.php.
References getObjId().
Referenced by delete().
|
protected |
Read data from database.
Definition at line 330 of file class.ilPreview.php.
References exists(), getObjId(), setRenderDate(), and setRenderStatus().
Referenced by init().
|
protected |
Update data in database.
Definition at line 350 of file class.ilPreview.php.
References getObjId(), getRenderDate(), and getRenderStatus().
Referenced by save().
ilPreview::exists | ( | ) |
Determines whether the preview exists or not.
Definition at line 181 of file class.ilPreview.php.
References $exists.
Referenced by delete(), doCreate(), doRead(), and save().
ilPreview::getAbsoluteStoragePath | ( | ) |
Gets the absolute path where the previews are stored.
Definition at line 416 of file class.ilPreview.php.
References getStorage(), and ILIAS_ABSOLUTE_PATH.
Referenced by getFilePathFormat().
ilPreview::getFilePathFormat | ( | ) |
Gets the absolute file path for preview images that contains a placeholder in the file name ('%02d') to be formatted with the preview number (use 'sprintf' for that).
Definition at line 427 of file class.ilPreview.php.
References $path, FILENAME_FORMAT, getAbsoluteStoragePath(), and ilUtil\removeTrailingPathSeparators().
ilPreview::getImages | ( | ) |
Gets an array of preview images.
Definition at line 255 of file class.ilPreview.php.
References $file, $path, $size, ilUtil\getHtmlPath(), getRenderStatus(), and getStoragePath().
ilPreview::getObjId | ( | ) |
Gets the id of the object the preview is for.
Definition at line 382 of file class.ilPreview.php.
References $obj_id.
Referenced by doCreate(), doDelete(), doRead(), doUpdate(), and getObjType().
ilPreview::getObjType | ( | ) |
Gets the type of the object the preview is for.
Definition at line 392 of file class.ilPreview.php.
References $obj_type, ilObject\_lookupType(), and getObjId().
ilPreview::getRenderDate | ( | ) |
Gets the date when the preview was rendered.
Definition at line 438 of file class.ilPreview.php.
References $render_date.
Referenced by create(), doCreate(), and doUpdate().
ilPreview::getRenderStatus | ( | ) |
Gets the status of the rendering process.
Definition at line 458 of file class.ilPreview.php.
References $render_status.
Referenced by create(), doCreate(), doUpdate(), and getImages().
ilPreview::getStorage | ( | ) |
Gets the storage object for the preview.
Definition at line 478 of file class.ilPreview.php.
References $storage.
Referenced by create(), delete(), getAbsoluteStoragePath(), and getStoragePath().
ilPreview::getStoragePath | ( | ) |
Gets the path where the previews are stored relative to the web directory.
Definition at line 406 of file class.ilPreview.php.
References getStorage().
Referenced by getImages().
|
static |
Determines whether the object with the specified reference id has a preview.
int | $a_obj_id | The id of the object to check. |
string | $a_type | The type of the object to check. |
Definition at line 149 of file class.ilPreview.php.
References $preview, ilRendererFactory\getRenderer(), and ilPreviewSettings\isPreviewEnabled().
Referenced by ilObjFileGUI\infoScreenForward(), and ilObjectListGUI\insertTitle().
|
private |
Initializes the preview object.
Definition at line 489 of file class.ilPreview.php.
References doRead().
Referenced by __construct().
|
static |
Gets the render status for the object with the specified id.
int | $a_obj_id | The id of the object to get the status for. |
Definition at line 170 of file class.ilPreview.php.
References $preview.
Referenced by ilObjectListGUI\insertTitle().
ilPreview::save | ( | ) |
Saves the preview data to the database.
Definition at line 301 of file class.ilPreview.php.
References doCreate(), doUpdate(), and exists().
Referenced by create().
ilPreview::setRenderDate | ( | $a_date | ) |
Sets the date when the preview was rendered.
datetime | $a_status | The date when the preview was rendered. |
Definition at line 448 of file class.ilPreview.php.
Referenced by doRead().
ilPreview::setRenderStatus | ( | $a_status | ) |
Sets the status of the rendering process.
string | $a_status | The status to set. |
Definition at line 468 of file class.ilPreview.php.
Referenced by doRead().
|
private |
Definition at line 49 of file class.ilPreview.php.
Referenced by exists().
|
private |
Definition at line 31 of file class.ilPreview.php.
Referenced by getObjId().
|
private |
Definition at line 37 of file class.ilPreview.php.
Referenced by getObjType().
|
private |
Definition at line 55 of file class.ilPreview.php.
Referenced by getRenderDate().
|
private |
Definition at line 61 of file class.ilPreview.php.
Referenced by getRenderStatus().
|
private |
Definition at line 43 of file class.ilPreview.php.
Referenced by getStorage().
const ilPreview::FILENAME_FORMAT = "preview_%02d.jpg" |
Definition at line 25 of file class.ilPreview.php.
Referenced by getFilePathFormat().
const ilPreview::RENDER_STATUS_CREATED = "created" |
Definition at line 22 of file class.ilPreview.php.
Referenced by ilPreviewGUI\getInlineHTML(), and ilPreviewRenderer\render().
const ilPreview::RENDER_STATUS_FAILED = "failed" |
Definition at line 23 of file class.ilPreview.php.
Referenced by ilPreviewGUI\getInlineHTML(), ilPreviewGUI\getPreviewHTML(), and ilPreviewRenderer\render().
const ilPreview::RENDER_STATUS_NONE = "none" |
Definition at line 20 of file class.ilPreview.php.
Referenced by delete(), ilPreviewGUI\getInlineHTML(), ilPreviewGUI\getJSCall(), and ilObjectListGUI\insertTitle().
const ilPreview::RENDER_STATUS_PENDING = "pending" |
Definition at line 21 of file class.ilPreview.php.
Referenced by ilPreviewGUI\getPreviewHTML(), and ilPreviewRenderer\render().