ILIAS
trunk Revision v11.0_alpha-1831-g8615d53dadb
|
Class ilMediaItem Media Item, component of a media object (file or reference) More...
Public Member Functions | |
__construct (int $a_id=0) | |
setId (int $a_id) | |
set media item id More... | |
getId () | |
setMobId (int $a_mob_id) | |
set id of parent media object More... | |
getMobId () | |
setNr (int $a_nr) | |
set number of media item within media object More... | |
getNr () | |
setDuration (int $a_val) | |
getDuration () | |
setTextRepresentation (string $a_val) | |
getTextRepresentation () | |
setUploadHash (string $a_val) | |
getUploadHash () | |
create () | |
update () | |
writeParameter (string $a_name, string $a_value) | |
read () | |
read media item data (item id or (mob_id and nr) must be set) More... | |
writeThumbTried (string $a_tried) | |
write thumbnail creation try data ("y"/"n") More... | |
setPurpose (string $a_purpose) | |
getPurpose () | |
setLocation (string $a_location) | |
getLocation () | |
setLocationType (string $a_type) | |
getLocationType () | |
setFormat (string $a_format) | |
getFormat () | |
setThumbTried (string $a_tried) | |
getThumbTried () | |
addMapArea (ilMapArea $a_map_area) | |
deleteMapArea (int $nr) | |
getMapArea (int $nr) | |
getMapAreas () | |
getWidth () | |
setWidth (string $a_width) | |
getHeight () | |
setHeight (string $a_height) | |
getOriginalSize () | |
setCaption (string $a_caption) | |
getCaption () | |
setHAlign (string $a_halign) | |
set horizontal align More... | |
getHAlign () | |
setParameter (string $a_name, string $a_value) | |
resetParameters () | |
setParameters (string $a_par) | |
set all parameters via parameter string (format: par1="value1", par2="value2", ...) More... | |
getParameters () | |
getParameterString () | |
getParameter (string $a_name) | |
getSuffix () | |
get location suffix More... | |
getMapWorkCopyType () | |
get image type of image map work copy More... | |
getDirectory () | |
get media file directory More... | |
getOriginalSource () | |
makeMapWorkCopy (int $a_area_nr=0, bool $a_exclude=false) | |
make map work copy of image More... | |
addAreaToMapWorkCopy (string $a_shape, string $a_coords) | |
draw a new area in work image More... | |
outputMapWorkCopy () | |
output raw map work copy file More... | |
buildMapWorkImage () | |
build image map work image More... | |
outputWorkImage () | |
getMapWorkImage () | |
getMapAreasXML (bool $a_insert_inst=false, int $a_inst=0) | |
get xml code of media items' areas More... | |
extractUrlParameters () | |
Extract parameters of special external references to parameter array. More... | |
determineDuration () | |
getLocationSrc (bool $autoplay=false) | |
getLocationStream () | |
Static Public Member Functions | |
static | _lookupLocationForMobId (int $a_mob_id, string $a_purpose) |
static | _lookupMobId (int $a_med_id) |
static | _getMediaItemsOfMObId (int $a_mobId, string $a_purpose) |
read media item with specific purpose and mobId More... | |
static | _getMediaItemsOfMOb (ilObjMediaObject $a_mob) |
Read media items into(!) media object (static) More... | |
static | deleteAllItemsOfMob (int $a_mob_id) |
static | checkParameter (string $a_par, string $a_val) |
Check parameter (filter javascript related and other unsafe parameters/values) More... | |
static | _resolveMapAreaLinks (int $a_mob_id) |
resolve internal links of all media items of a media object More... | |
static | _getMapAreasIntLinks (int $a_mob_id) |
get all internal links of map areas of a mob More... | |
static | getMediaItemsForUploadHash (string $a_hash) |
Get media items for upload hash. More... | |
Data Fields | |
int | $id = 0 |
string | $purpose = "" |
string | $location = "" |
string | $location_type = "" |
string | $format = "" |
string | $width = "" |
string | $height = "" |
string | $caption = "" |
string | $halign = "" |
array | $parameters = [] |
int | $mob_id = 0 |
int | $nr = 0 |
array | $mapareas = [] |
int | $map_cnt = 0 |
$map_image = null | |
int | $color1 |
int | $color2 |
Protected Attributes | |
ILIAS MediaObjects MediaObjectManager | $mob_manager |
string | $tried_thumb = "" |
string | $text_representation = "" |
ilDBInterface | $db |
ilLanguage | $lng |
ILIAS Filesystem Util Convert LegacyImages | $image_converter |
int | $duration = 0 |
string | $upload_hash = '' |
Static Private Member Functions | |
static | getGDSupportedImageType (string $a_desired_type) |
returns the best supported image type by this PHP build More... | |
Class ilMediaItem Media Item, component of a media object (file or reference)
Definition at line 26 of file class.ilMediaItem.php.
ilMediaItem::__construct | ( | int | $a_id = 0 | ) |
Definition at line 58 of file class.ilMediaItem.php.
References $DIC, ILIAS\Repository\lng(), ILIAS\UI\examples\Prompt\Standard\parameters(), read(), and setId().
|
static |
get all internal links of map areas of a mob
int | $a_mob_id | media object id |
Definition at line 991 of file class.ilMediaItem.php.
References $DIC, $ilDB, and ilMapArea\_getIntLinks().
Referenced by ilPageObjectGUI\displayMedia(), ilCOPageHTMLExport\exportHTMLMOB(), ILIAS\Data\Link\LinkManager\getDefaultMediaCollector(), ilLMPresentationGUI\ilMedia(), and ilGlossaryPresentationGUI\media().
|
static |
Read media items into(!) media object (static)
Definition at line 437 of file class.ilMediaItem.php.
References $DIC, $ilDB, ilMapArea\_getMaxNr(), ilObjMediaObject\addMediaItem(), and ilObject\getId().
Referenced by ilObjMediaObject\read().
|
static |
read media item with specific purpose and mobId
int | $a_mobId | |
string | $a_purpose |
Definition at line 414 of file class.ilMediaItem.php.
References $DIC, $ilDB, and null.
Referenced by ilObjectFeedWriter\__construct().
|
static |
Definition at line 370 of file class.ilMediaItem.php.
Referenced by ilObjMediaObject\_lookupItemPath().
|
static |
Definition at line 390 of file class.ilMediaItem.php.
Referenced by ilMapArea\_getMobsForTarget().
|
static |
resolve internal links of all media items of a media object
int | $a_mob_id | media object id |
Definition at line 969 of file class.ilMediaItem.php.
References $DIC, $ilDB, and ilMapArea\_resolveIntLinks().
Referenced by ilQuestionPageParser\processPagesToParse(), and ILIAS\Data\Link\LinkManager\resolveIntLinks().
ilMediaItem::addAreaToMapWorkCopy | ( | string | $a_shape, |
string | $a_coords | ||
) |
draw a new area in work image
string | $a_shape | shape |
string | $a_coords | coordinates string |
Definition at line 808 of file class.ilMediaItem.php.
References getHeight(), getMapWorkImage(), getOriginalSource(), and getWidth().
ilMediaItem::addMapArea | ( | ilMapArea | $a_map_area | ) |
Definition at line 565 of file class.ilMediaItem.php.
References $map_cnt.
Referenced by read().
ilMediaItem::buildMapWorkImage | ( | ) |
build image map work image
Definition at line 856 of file class.ilMediaItem.php.
References getMapWorkCopyType(), and getOriginalSource().
Referenced by makeMapWorkCopy(), and ilMediaAliasItem\makeMapWorkCopy().
|
static |
Check parameter (filter javascript related and other unsafe parameters/values)
Definition at line 682 of file class.ilMediaItem.php.
Referenced by ilMediaAliasItem\setParameters().
ilMediaItem::create | ( | ) |
Definition at line 202 of file class.ilMediaItem.php.
References $db, $ilDB, $params, getCaption(), getDuration(), getFormat(), getHAlign(), getHeight(), getId(), getLocation(), getLocationType(), getMobId(), getNr(), getParameters(), getPurpose(), getTextRepresentation(), getUploadHash(), getWidth(), and setId().
|
static |
Definition at line 487 of file class.ilMediaItem.php.
Referenced by ilObjMediaObject\delete(), and ilObjMediaObject\update().
ilMediaItem::deleteMapArea | ( | int | $nr | ) |
ilMediaItem::determineDuration | ( | ) |
Definition at line 1027 of file class.ilMediaItem.php.
References Vendor\Package\$e, ilExternalMediaAnalyzer\extractVimeoParameters(), getLocation(), getLocationSrc(), ilExternalMediaAnalyzer\getVimeoMetadata(), ilFileUtils\ilTempnam(), ilExternalMediaAnalyzer\isVimeo(), ilFileUtils\makeDir(), and setDuration().
Referenced by ilObjMediaCastGUI\getDuration().
ilMediaItem::extractUrlParameters | ( | ) |
Extract parameters of special external references to parameter array.
Definition at line 1016 of file class.ilMediaItem.php.
References ilExternalMediaAnalyzer\extractUrlParameters(), getLocation(), getParameters(), and setParameter().
ilMediaItem::getCaption | ( | ) |
Definition at line 633 of file class.ilMediaItem.php.
References $caption.
Referenced by create(), and update().
ilMediaItem::getDirectory | ( | ) |
get media file directory
Definition at line 745 of file class.ilMediaItem.php.
References ilObjMediaObject\_getDirectory(), and getMobId().
ilMediaItem::getDuration | ( | ) |
Definition at line 177 of file class.ilMediaItem.php.
References $duration.
Referenced by create(), ilObjMediaCastGUI\getDuration(), and update().
ilMediaItem::getFormat | ( | ) |
Definition at line 550 of file class.ilMediaItem.php.
References $format.
Referenced by create(), getLocationSrc(), getOriginalSize(), and update().
|
staticprivate |
returns the best supported image type by this PHP build
string | $a_desired_type |
Definition at line 123 of file class.ilMediaItem.php.
ilMediaItem::getHAlign | ( | ) |
Definition at line 646 of file class.ilMediaItem.php.
References $halign.
Referenced by create(), and update().
ilMediaItem::getHeight | ( | ) |
Definition at line 605 of file class.ilMediaItem.php.
References $height.
Referenced by addAreaToMapWorkCopy(), create(), makeMapWorkCopy(), ilMediaAliasItem\makeMapWorkCopy(), and update().
ilMediaItem::getId | ( | ) |
Definition at line 85 of file class.ilMediaItem.php.
References $id.
Referenced by create(), read(), update(), writeParameter(), and writeThumbTried().
ilMediaItem::getLocation | ( | ) |
Definition at line 530 of file class.ilMediaItem.php.
References $location.
Referenced by create(), determineDuration(), extractUrlParameters(), getLocationSrc(), getLocationStream(), getOriginalSource(), getSuffix(), update(), and ilObjMediaCastGUI\updateMediaItem().
ilMediaItem::getLocationSrc | ( | bool | $autoplay = false | ) |
Definition at line 1071 of file class.ilMediaItem.php.
References $params, ilExternalMediaAnalyzer\extractVimeoParameters(), ilExternalMediaAnalyzer\extractYouTubeParameters(), getFormat(), getLocation(), getLocationType(), and getMobId().
Referenced by determineDuration().
ilMediaItem::getLocationStream | ( | ) |
Definition at line 1100 of file class.ilMediaItem.php.
References getLocation(), and getMobId().
ilMediaItem::getLocationType | ( | ) |
Definition at line 540 of file class.ilMediaItem.php.
References $location_type.
Referenced by create(), getLocationSrc(), getOriginalSource(), update(), and ilObjMediaCastGUI\updateMediaItem().
ilMediaItem::getMapArea | ( | int | $nr | ) |
Definition at line 585 of file class.ilMediaItem.php.
References null.
ilMediaItem::getMapAreas | ( | ) |
ilMediaItem::getMapAreasXML | ( | bool | $a_insert_inst = false , |
int | $a_inst = 0 |
||
) |
get xml code of media items' areas
Definition at line 917 of file class.ilMediaItem.php.
References IL_INT_LINK.
ilMediaItem::getMapWorkCopyType | ( | ) |
get image type of image map work copy
Definition at line 737 of file class.ilMediaItem.php.
References getSuffix().
Referenced by buildMapWorkImage(), outputMapWorkCopy(), and outputWorkImage().
ilMediaItem::getMapWorkImage | ( | ) |
Definition at line 909 of file class.ilMediaItem.php.
References $map_image.
Referenced by addAreaToMapWorkCopy(), makeMapWorkCopy(), and ilMediaAliasItem\makeMapWorkCopy().
|
static |
Get media items for upload hash.
string | $a_hash | upload hash |
Definition at line 1113 of file class.ilMediaItem.php.
References $DIC, ilDBInterface\fetchAssoc(), and ilDBInterface\queryF().
Referenced by ilMediaCreationGUI\editTitlesAndDescriptions(), ilObjMediaPoolGUI\editTitlesAndDescriptions(), ilMediaCreationGUI\saveTitlesAndDescriptions(), and ilObjMediaPoolGUI\saveTitlesAndDescriptions().
ilMediaItem::getMobId | ( | ) |
Definition at line 98 of file class.ilMediaItem.php.
References $mob_id.
Referenced by create(), getDirectory(), getLocationSrc(), getLocationStream(), getOriginalSource(), read(), and update().
ilMediaItem::getNr | ( | ) |
ilMediaItem::getOriginalSize | ( | ) |
Definition at line 615 of file class.ilMediaItem.php.
References ilUtil\deducibleSize(), getFormat(), ilMediaImageUtil\getImageSize(), getOriginalSource(), and null.
ilMediaItem::getOriginalSource | ( | ) |
Definition at line 751 of file class.ilMediaItem.php.
References getLocation(), getLocationType(), and getMobId().
Referenced by addAreaToMapWorkCopy(), buildMapWorkImage(), getOriginalSize(), makeMapWorkCopy(), and ilMediaAliasItem\makeMapWorkCopy().
ilMediaItem::getParameter | ( | string | $a_name | ) |
Definition at line 719 of file class.ilMediaItem.php.
References ILIAS\UI\examples\Prompt\Standard\parameters().
ilMediaItem::getParameters | ( | ) |
Definition at line 702 of file class.ilMediaItem.php.
References $parameters.
Referenced by create(), extractUrlParameters(), and update().
ilMediaItem::getParameterString | ( | ) |
Definition at line 707 of file class.ilMediaItem.php.
References ILIAS\UI\examples\Prompt\Standard\parameters().
ilMediaItem::getPurpose | ( | ) |
Definition at line 520 of file class.ilMediaItem.php.
References $purpose.
Referenced by create(), update(), and ilObjMediaCastGUI\updateMediaItem().
ilMediaItem::getSuffix | ( | ) |
get location suffix
Definition at line 727 of file class.ilMediaItem.php.
References getLocation().
Referenced by getMapWorkCopyType().
ilMediaItem::getTextRepresentation | ( | ) |
Definition at line 187 of file class.ilMediaItem.php.
References $text_representation.
Referenced by create(), and update().
ilMediaItem::getThumbTried | ( | ) |
ilMediaItem::getUploadHash | ( | ) |
Definition at line 197 of file class.ilMediaItem.php.
References $upload_hash.
Referenced by create(), and update().
ilMediaItem::getWidth | ( | ) |
Definition at line 595 of file class.ilMediaItem.php.
References $width.
Referenced by addAreaToMapWorkCopy(), create(), makeMapWorkCopy(), ilMediaAliasItem\makeMapWorkCopy(), and update().
ilMediaItem::makeMapWorkCopy | ( | int | $a_area_nr = 0 , |
bool | $a_exclude = false |
||
) |
make map work copy of image
int | $a_area_nr | draw area $a_area_nr only |
bool | $a_exclude | true: draw all areas but area $a_area_nr |
Definition at line 767 of file class.ilMediaItem.php.
References buildMapWorkImage(), getHeight(), getMapWorkImage(), getOriginalSource(), and getWidth().
Referenced by ilImageMapEditorGUI\makeMapWorkCopy().
ilMediaItem::outputMapWorkCopy | ( | ) |
output raw map work copy file
Definition at line 842 of file class.ilMediaItem.php.
References exit, getMapWorkCopyType(), ILIAS\UI\examples\Symbol\Glyph\Header\header(), and outputWorkImage().
ilMediaItem::outputWorkImage | ( | ) |
Definition at line 885 of file class.ilMediaItem.php.
References getMapWorkCopyType().
Referenced by outputMapWorkCopy().
ilMediaItem::read | ( | ) |
read media item data (item id or (mob_id and nr) must be set)
Definition at line 303 of file class.ilMediaItem.php.
References $db, $ilDB, ilMapArea\_getMaxNr(), addMapArea(), getId(), getMobId(), getNr(), setCaption(), setDuration(), setFormat(), setHAlign(), setHeight(), setId(), setLocation(), setLocationType(), setMobId(), setNr(), setParameter(), setPurpose(), setTextRepresentation(), setThumbTried(), setUploadHash(), and setWidth().
Referenced by __construct().
ilMediaItem::resetParameters | ( | ) |
Definition at line 660 of file class.ilMediaItem.php.
References ILIAS\UI\examples\Prompt\Standard\parameters().
Referenced by setParameters().
ilMediaItem::setCaption | ( | string | $a_caption | ) |
Definition at line 628 of file class.ilMediaItem.php.
Referenced by read().
ilMediaItem::setDuration | ( | int | $a_val | ) |
Definition at line 172 of file class.ilMediaItem.php.
Referenced by determineDuration(), and read().
ilMediaItem::setFormat | ( | string | $a_format | ) |
Definition at line 545 of file class.ilMediaItem.php.
Referenced by read(), and ilObjMediaCastGUI\updateMediaItem().
ilMediaItem::setHAlign | ( | string | $a_halign | ) |
set horizontal align
Definition at line 641 of file class.ilMediaItem.php.
Referenced by read(), and ilObjMediaCastGUI\updateMediaItem().
ilMediaItem::setHeight | ( | string | $a_height | ) |
Definition at line 610 of file class.ilMediaItem.php.
Referenced by read(), and ilObjMediaCastGUI\updateMediaItem().
ilMediaItem::setId | ( | int | $a_id | ) |
set media item id
Definition at line 80 of file class.ilMediaItem.php.
Referenced by __construct(), create(), and read().
ilMediaItem::setLocation | ( | string | $a_location | ) |
Definition at line 525 of file class.ilMediaItem.php.
Referenced by read(), and ilObjMediaCastGUI\updateMediaItem().
ilMediaItem::setLocationType | ( | string | $a_type | ) |
Definition at line 535 of file class.ilMediaItem.php.
Referenced by read(), and ilObjMediaCastGUI\updateMediaItem().
ilMediaItem::setMobId | ( | int | $a_mob_id | ) |
set id of parent media object
Definition at line 93 of file class.ilMediaItem.php.
Referenced by read().
ilMediaItem::setNr | ( | int | $a_nr | ) |
set number of media item within media object
Definition at line 106 of file class.ilMediaItem.php.
Referenced by read().
ilMediaItem::setParameter | ( | string | $a_name, |
string | $a_value | ||
) |
Definition at line 651 of file class.ilMediaItem.php.
References ILIAS\UI\examples\Prompt\Standard\parameters().
Referenced by extractUrlParameters(), read(), and setParameters().
ilMediaItem::setParameters | ( | string | $a_par | ) |
set all parameters via parameter string (format: par1="value1", par2="value2", ...)
Definition at line 668 of file class.ilMediaItem.php.
References ilUtil\extractParameterString(), resetParameters(), and setParameter().
ilMediaItem::setPurpose | ( | string | $a_purpose | ) |
Definition at line 515 of file class.ilMediaItem.php.
Referenced by read().
ilMediaItem::setTextRepresentation | ( | string | $a_val | ) |
Definition at line 182 of file class.ilMediaItem.php.
Referenced by read().
ilMediaItem::setThumbTried | ( | string | $a_tried | ) |
Definition at line 555 of file class.ilMediaItem.php.
Referenced by read().
ilMediaItem::setUploadHash | ( | string | $a_val | ) |
Definition at line 192 of file class.ilMediaItem.php.
Referenced by read().
ilMediaItem::setWidth | ( | string | $a_width | ) |
Definition at line 600 of file class.ilMediaItem.php.
Referenced by read().
ilMediaItem::update | ( | ) |
Definition at line 250 of file class.ilMediaItem.php.
References $db, $ilDB, $params, getCaption(), getDuration(), getFormat(), getHAlign(), getHeight(), getId(), getLocation(), getLocationType(), getMobId(), getNr(), getParameters(), getPurpose(), getTextRepresentation(), getUploadHash(), and getWidth().
ilMediaItem::writeParameter | ( | string | $a_name, |
string | $a_value | ||
) |
Definition at line 287 of file class.ilMediaItem.php.
References $db, $ilDB, and getId().
ilMediaItem::writeThumbTried | ( | string | $a_tried | ) |
string ilMediaItem::$caption = "" |
Definition at line 42 of file class.ilMediaItem.php.
Referenced by getCaption().
int ilMediaItem::$color1 |
Definition at line 53 of file class.ilMediaItem.php.
int ilMediaItem::$color2 |
Definition at line 54 of file class.ilMediaItem.php.
|
protected |
Definition at line 31 of file class.ilMediaItem.php.
Referenced by create(), read(), update(), writeParameter(), and writeThumbTried().
|
protected |
Definition at line 55 of file class.ilMediaItem.php.
Referenced by getDuration().
string ilMediaItem::$format = "" |
Definition at line 39 of file class.ilMediaItem.php.
Referenced by getFormat().
string ilMediaItem::$halign = "" |
Definition at line 43 of file class.ilMediaItem.php.
Referenced by getHAlign().
string ilMediaItem::$height = "" |
Definition at line 41 of file class.ilMediaItem.php.
Referenced by getHeight().
int ilMediaItem::$id = 0 |
Definition at line 35 of file class.ilMediaItem.php.
Referenced by getId().
|
protected |
Definition at line 33 of file class.ilMediaItem.php.
|
protected |
Definition at line 32 of file class.ilMediaItem.php.
string ilMediaItem::$location = "" |
Definition at line 37 of file class.ilMediaItem.php.
Referenced by getLocation().
string ilMediaItem::$location_type = "" |
Definition at line 38 of file class.ilMediaItem.php.
Referenced by getLocationType().
int ilMediaItem::$map_cnt = 0 |
Definition at line 48 of file class.ilMediaItem.php.
Referenced by addMapArea(), and deleteMapArea().
ilMediaItem::$map_image = null |
Definition at line 52 of file class.ilMediaItem.php.
Referenced by getMapWorkImage().
array ilMediaItem::$mapareas = [] |
Definition at line 47 of file class.ilMediaItem.php.
Referenced by getMapAreas().
int ilMediaItem::$mob_id = 0 |
Definition at line 45 of file class.ilMediaItem.php.
Referenced by getMobId().
|
protected |
Definition at line 28 of file class.ilMediaItem.php.
int ilMediaItem::$nr = 0 |
Definition at line 46 of file class.ilMediaItem.php.
Referenced by getNr().
array ilMediaItem::$parameters = [] |
Definition at line 44 of file class.ilMediaItem.php.
Referenced by getParameters().
string ilMediaItem::$purpose = "" |
Definition at line 36 of file class.ilMediaItem.php.
Referenced by getPurpose().
|
protected |
Definition at line 30 of file class.ilMediaItem.php.
Referenced by getTextRepresentation().
|
protected |
Definition at line 29 of file class.ilMediaItem.php.
Referenced by getThumbTried().
|
protected |
Definition at line 56 of file class.ilMediaItem.php.
Referenced by getUploadHash().
string ilMediaItem::$width = "" |
Definition at line 40 of file class.ilMediaItem.php.
Referenced by getWidth().