ILIAS
Release_4_0_x_branch Revision 61816
|
Class ilMediaItem. More...
Public Member Functions | |
ilMediaItem ($a_id=0) | |
setId ($a_id) | |
set media item id | |
getId () | |
get media item id | |
setMobId ($a_mob_id) | |
set id of parent media object | |
getMobId () | |
get id of parent media object | |
setNr ($a_nr) | |
set number of media item within media object | |
getNr () | |
setTextRepresentation ($a_val) | |
Set text representation. | |
getTextRepresentation () | |
Get text representation. | |
create () | |
create persistent media item | |
update () | |
update media item data (without map areas!) | |
read () | |
read media item data (item id or (mob_id and nr) must be set) | |
writeThumbTried ($a_tried) | |
write thumbnail creation try data ("y"/"n") | |
_getMediaItemsOfMObId ($a_mobId, $a_purpose) | |
_getMediaItemsOfMOb (&$a_mob) | |
read media items into media objects (static) | |
deleteAllItemsOfMob ($a_mob_id) | |
static | |
setPurpose ($a_purpose) | |
getPurpose () | |
setLocation ($a_location) | |
getLocation () | |
setLocationType ($a_type) | |
getLocationType () | |
setFormat ($a_format) | |
getFormat () | |
setThumbTried ($a_tried) | |
getThumbTried () | |
addMapArea (&$a_map_area) | |
deleteMapArea ($nr) | |
delete map area | |
& | getMapArea ($nr) |
get map area | |
getMapAreas () | |
get map areas | |
getWidth () | |
get width | |
setWidth ($a_width) | |
set width | |
getHeight () | |
get height | |
setHeight ($a_height) | |
set height | |
getOriginalSize () | |
get original size | |
setCaption ($a_caption) | |
set caption | |
getCaption () | |
get caption | |
setHAlign ($a_halign) | |
set horizontal align | |
getHAlign () | |
get horizontal align | |
setParameter ($a_name, $a_value) | |
set parameter | |
resetParameters () | |
reset parameters | |
setParameters ($a_par) | |
set alle parameters via parameter string (format: par1="value1", par2="value2", ...) | |
getParameters () | |
get all parameters (in array) | |
getParameterString () | |
get all parameters (as string) | |
getParameter ($a_name) | |
get a single parameter | |
getWorkDirectory () | |
get work directory for image map editing | |
createWorkDirectory () | |
create work directory for image map editing | |
getSuffix () | |
get location suffix | |
getMapWorkCopyType () | |
get image type of image map work copy | |
getMapWorkCopyName ($a_reference_copy=false) | |
Get name of image map work copy file. | |
getDirectory () | |
get media file directory | |
getThumbnailDirectory ($a_mode="filesystem") | |
get media file directory | |
getThumbnailTarget ($a_size="") | |
get thumbnail target | |
copyOriginal () | |
Copy the orginal file. | |
makeMapWorkCopy ($a_area_nr=0, $a_exclude=false) | |
make map work copy of image | |
addAreaToMapWorkCopy ($a_shape, $a_coords) | |
draw a new area in work image | |
outputMapWorkCopy () | |
output raw map work copy file | |
buildMapWorkImage () | |
build image map work image | |
saveMapWorkImage () | |
save image map work image | |
& | getMapWorkImage () |
get image map work image | |
getMapAreasXML ($a_insert_inst=false, $a_inst=0) | |
get xml code of media items' areas | |
_resolveMapAreaLinks ($a_mob_id) | |
resolve internal links of all media items of a media object | |
_getMapAreasIntLinks ($a_mob_id) | |
get all internal links of map areas of a mob | |
extractUrlParameters () | |
Extract parameters of special external references to parameter array. |
Static Public Member Functions | |
static | _lookupLocationForMobId ($a_mob_id, $a_purpose) |
Lookup location for mob id. | |
static | _lookupMobId ($a_med_id) |
Lookup Mob ID. |
Data Fields | |
$id | |
$purpose | |
$location | |
$location_type | |
$format | |
$width | |
$height | |
$caption | |
$halign | |
$parameters | |
$mob_id | |
$nr | |
$mapareas | |
$map_cnt | |
$map_image | |
$color1 | |
$color2 |
Class ilMediaItem.
Media Item, component of a media object (file or reference)
Definition at line 16 of file class.ilMediaItem.php.
ilMediaItem::_getMapAreasIntLinks | ( | $a_mob_id | ) |
get all internal links of map areas of a mob
int | $a_mob_id | media object id |
Definition at line 1105 of file class.ilMediaItem.php.
References $ilDB, $key, $query, and ilMapArea\_getIntLinks().
Referenced by ilPageObjectGUI\displayMediaFullscreen(), ilPageObject\getInternalLinks(), ilLMPresentationGUI\ilMedia(), ilGlossaryPresentationGUI\media(), and ilObjMediaPoolGUI\showMedia().
ilMediaItem::_getMediaItemsOfMOb | ( | & | $a_mob | ) |
read media items into media objects (static)
object | $a_mob | media object |
Definition at line 355 of file class.ilMediaItem.php.
References $ilDB, $query, ilMapArea\_getMaxNr(), and ilMediaItem().
Referenced by ilObjMediaObject\read().
ilMediaItem::_getMediaItemsOfMObId | ( | $a_mobId, | |
$a_purpose | |||
) |
Definition at line 333 of file class.ilMediaItem.php.
Referenced by ilObjectFeedWriter\ilObjectFeedWriter().
|
static |
Lookup location for mob id.
int | $a_mob_id | media object id |
string | $a_purpose | purpose |
Definition at line 289 of file class.ilMediaItem.php.
Referenced by ilObjMediaObject\_lookupItemPath().
|
static |
Lookup Mob ID.
int | $a_med_id | media item id |
Definition at line 311 of file class.ilMediaItem.php.
Referenced by ilMapArea\_getMobsForTarget().
ilMediaItem::_resolveMapAreaLinks | ( | $a_mob_id | ) |
resolve internal links of all media items of a media object
int | $a_mob_id | media object id |
Definition at line 1084 of file class.ilMediaItem.php.
References $ilDB, $query, and ilMapArea\_resolveIntLinks().
Referenced by ilContObjParser\processPagesToParse(), and ilPageObject\resolveIntLinks().
ilMediaItem::addAreaToMapWorkCopy | ( | $a_shape, | |
$a_coords | |||
) |
draw a new area in work image
string | $a_shape | shape |
string | $a_coords | coordinates string |
Definition at line 923 of file class.ilMediaItem.php.
References $size, buildMapWorkImage(), getHeight(), getMapWorkCopyName(), getMapWorkImage(), getWidth(), and saveMapWorkImage().
ilMediaItem::addMapArea | ( | & | $a_map_area | ) |
Definition at line 483 of file class.ilMediaItem.php.
References $map_cnt.
Referenced by read().
ilMediaItem::buildMapWorkImage | ( | ) |
build image map work image
Definition at line 968 of file class.ilMediaItem.php.
References getMapWorkCopyName(), and getMapWorkCopyType().
Referenced by addAreaToMapWorkCopy(), and makeMapWorkCopy().
ilMediaItem::copyOriginal | ( | ) |
Copy the orginal file.
Definition at line 823 of file class.ilMediaItem.php.
References $lng, ilUtil\convertImage(), createWorkDirectory(), getDirectory(), getLocation(), getLocationType(), getMapWorkCopyName(), getMapWorkCopyType(), and ilUtil\sendFailure().
Referenced by makeMapWorkCopy().
ilMediaItem::create | ( | ) |
create persistent media item
Definition at line 125 of file class.ilMediaItem.php.
References $ilDB, $name, $params, $query, getCaption(), getFormat(), getHAlign(), getHeight(), getId(), getLocation(), getLocationType(), getMobId(), getNr(), getParameters(), getPurpose(), getTextRepresentation(), getWidth(), and setId().
ilMediaItem::createWorkDirectory | ( | ) |
create work directory for image map editing
Definition at line 693 of file class.ilMediaItem.php.
References ilUtil\createDirectory(), ilUtil\getDataDir(), and getWorkDirectory().
Referenced by copyOriginal().
ilMediaItem::deleteAllItemsOfMob | ( | $a_mob_id | ) |
static
Definition at line 406 of file class.ilMediaItem.php.
Referenced by ilObjMediaObject\delete(), and ilObjMediaObject\update().
ilMediaItem::deleteMapArea | ( | $nr | ) |
delete map area
Definition at line 492 of file class.ilMediaItem.php.
ilMediaItem::extractUrlParameters | ( | ) |
Extract parameters of special external references to parameter array.
Definition at line 1129 of file class.ilMediaItem.php.
References getLocation(), getParameters(), and setParameter().
ilMediaItem::getCaption | ( | ) |
get caption
Definition at line 596 of file class.ilMediaItem.php.
References $caption.
Referenced by create(), and update().
ilMediaItem::getDirectory | ( | ) |
get media file directory
Definition at line 750 of file class.ilMediaItem.php.
References ilObjMediaObject\_getDirectory(), and getMobId().
Referenced by copyOriginal(), and getThumbnailTarget().
ilMediaItem::getFormat | ( | ) |
Definition at line 468 of file class.ilMediaItem.php.
References $format.
Referenced by create(), getOriginalSize(), getThumbnailTarget(), and update().
ilMediaItem::getHAlign | ( | ) |
get horizontal align
Definition at line 612 of file class.ilMediaItem.php.
References $halign.
Referenced by create(), and update().
ilMediaItem::getHeight | ( | ) |
get height
Definition at line 544 of file class.ilMediaItem.php.
References $height.
Referenced by addAreaToMapWorkCopy(), create(), makeMapWorkCopy(), and update().
ilMediaItem::getId | ( | ) |
get media item id
Definition at line 64 of file class.ilMediaItem.php.
References $id.
Referenced by create(), getWorkDirectory(), read(), update(), and writeThumbTried().
ilMediaItem::getLocation | ( | ) |
Definition at line 448 of file class.ilMediaItem.php.
References $location.
Referenced by copyOriginal(), create(), extractUrlParameters(), getMapWorkCopyName(), getOriginalSize(), getSuffix(), getThumbnailTarget(), and update().
ilMediaItem::getLocationType | ( | ) |
Definition at line 458 of file class.ilMediaItem.php.
References $location_type.
Referenced by copyOriginal(), create(), getOriginalSize(), getThumbnailTarget(), and update().
& ilMediaItem::getMapArea | ( | $nr | ) |
ilMediaItem::getMapAreas | ( | ) |
ilMediaItem::getMapAreasXML | ( | $a_insert_inst = false , |
|
$a_inst = 0 |
|||
) |
get xml code of media items' areas
Definition at line 1038 of file class.ilMediaItem.php.
References IL_INT_LINK.
ilMediaItem::getMapWorkCopyName | ( | $a_reference_copy = false | ) |
Get name of image map work copy file.
string | Get name, for copy of external referenced image |
Definition at line 729 of file class.ilMediaItem.php.
References $file, getLocation(), getMapWorkCopyType(), and getWorkDirectory().
Referenced by addAreaToMapWorkCopy(), buildMapWorkImage(), copyOriginal(), makeMapWorkCopy(), outputMapWorkCopy(), and saveMapWorkImage().
ilMediaItem::getMapWorkCopyType | ( | ) |
get image type of image map work copy
Definition at line 719 of file class.ilMediaItem.php.
References ilUtil\getGDSupportedImageType(), and getSuffix().
Referenced by buildMapWorkImage(), copyOriginal(), getMapWorkCopyName(), outputMapWorkCopy(), and saveMapWorkImage().
& ilMediaItem::getMapWorkImage | ( | ) |
get image map work image
Definition at line 1029 of file class.ilMediaItem.php.
References $map_image.
Referenced by addAreaToMapWorkCopy(), and makeMapWorkCopy().
ilMediaItem::getMobId | ( | ) |
get id of parent media object
Definition at line 84 of file class.ilMediaItem.php.
References $mob_id.
Referenced by create(), getDirectory(), getOriginalSize(), getThumbnailDirectory(), getThumbnailTarget(), read(), and update().
ilMediaItem::getNr | ( | ) |
ilMediaItem::getOriginalSize | ( | ) |
get original size
Definition at line 560 of file class.ilMediaItem.php.
References $size, ilObjMediaObject\_getDirectory(), ilUtil\deducibleSize(), getFormat(), getLocation(), getLocationType(), and getMobId().
ilMediaItem::getParameter | ( | $a_name | ) |
get a single parameter
Definition at line 677 of file class.ilMediaItem.php.
ilMediaItem::getParameters | ( | ) |
get all parameters (in array)
Definition at line 659 of file class.ilMediaItem.php.
References $parameters.
Referenced by create(), extractUrlParameters(), and update().
ilMediaItem::getParameterString | ( | ) |
get all parameters (as string)
Definition at line 668 of file class.ilMediaItem.php.
References ilUtil\assembleParameterString().
ilMediaItem::getPurpose | ( | ) |
Definition at line 438 of file class.ilMediaItem.php.
References $purpose.
Referenced by create(), getThumbnailTarget(), and update().
ilMediaItem::getSuffix | ( | ) |
get location suffix
Definition at line 709 of file class.ilMediaItem.php.
References getLocation().
Referenced by getMapWorkCopyType().
ilMediaItem::getTextRepresentation | ( | ) |
Get text representation.
Definition at line 117 of file class.ilMediaItem.php.
Referenced by create(), and update().
ilMediaItem::getThumbnailDirectory | ( | $a_mode = "filesystem" | ) |
get media file directory
Definition at line 758 of file class.ilMediaItem.php.
References ilObjMediaObject\_getThumbnailDirectory(), and getMobId().
Referenced by getThumbnailTarget().
ilMediaItem::getThumbnailTarget | ( | $a_size = "" | ) |
get thumbnail target
Definition at line 766 of file class.ilMediaItem.php.
References ilObjMediaObject\_createThumbnailDirectory(), ilUtil\convertImage(), getDirectory(), getFormat(), getLocation(), getLocationType(), getMobId(), getPurpose(), getThumbnailDirectory(), getThumbTried(), and writeThumbTried().
ilMediaItem::getThumbTried | ( | ) |
Definition at line 478 of file class.ilMediaItem.php.
Referenced by getThumbnailTarget().
ilMediaItem::getWidth | ( | ) |
get width
Definition at line 528 of file class.ilMediaItem.php.
References $width.
Referenced by addAreaToMapWorkCopy(), create(), makeMapWorkCopy(), and update().
ilMediaItem::getWorkDirectory | ( | ) |
get work directory for image map editing
Definition at line 685 of file class.ilMediaItem.php.
References ilUtil\getDataDir(), and getId().
Referenced by createWorkDirectory(), and getMapWorkCopyName().
ilMediaItem::ilMediaItem | ( | $a_id = 0 | ) |
Definition at line 36 of file class.ilMediaItem.php.
References read(), and setId().
Referenced by _getMediaItemsOfMOb().
ilMediaItem::makeMapWorkCopy | ( | $a_area_nr = 0 , |
|
$a_exclude = false |
|||
) |
make map work copy of image
int | $a_area_nr | draw area $a_area_nr only |
boolean | $a_exclude | true: draw all areas but area $a_area_nr |
Definition at line 874 of file class.ilMediaItem.php.
References $lng, $size, buildMapWorkImage(), copyOriginal(), getHeight(), getMapWorkCopyName(), getMapWorkImage(), getWidth(), and saveMapWorkImage().
ilMediaItem::outputMapWorkCopy | ( | ) |
output raw map work copy file
Definition at line 953 of file class.ilMediaItem.php.
References exit, getMapWorkCopyName(), and getMapWorkCopyType().
ilMediaItem::read | ( | ) |
read media item data (item id or (mob_id and nr) must be set)
Definition at line 211 of file class.ilMediaItem.php.
References $ilDB, $mob_id, $nr, $query, ilMapArea\_getMaxNr(), addMapArea(), getId(), getMobId(), getNr(), setCaption(), setFormat(), setHAlign(), setHeight(), setId(), setLocation(), setLocationType(), setMobId(), setNr(), setParameter(), setPurpose(), setTextRepresentation(), setThumbTried(), and setWidth().
Referenced by ilMediaItem().
ilMediaItem::resetParameters | ( | ) |
reset parameters
Definition at line 632 of file class.ilMediaItem.php.
Referenced by setParameters().
ilMediaItem::saveMapWorkImage | ( | ) |
save image map work image
Definition at line 1003 of file class.ilMediaItem.php.
References getMapWorkCopyName(), and getMapWorkCopyType().
Referenced by addAreaToMapWorkCopy(), and makeMapWorkCopy().
ilMediaItem::setCaption | ( | $a_caption | ) |
set caption
Definition at line 588 of file class.ilMediaItem.php.
Referenced by read().
ilMediaItem::setFormat | ( | $a_format | ) |
Definition at line 463 of file class.ilMediaItem.php.
Referenced by read().
ilMediaItem::setHAlign | ( | $a_halign | ) |
set horizontal align
Definition at line 604 of file class.ilMediaItem.php.
Referenced by read().
ilMediaItem::setHeight | ( | $a_height | ) |
set height
Definition at line 552 of file class.ilMediaItem.php.
Referenced by read().
ilMediaItem::setId | ( | $a_id | ) |
set media item id
int | $a_id | media item id |
Definition at line 54 of file class.ilMediaItem.php.
Referenced by create(), ilMediaItem(), and read().
ilMediaItem::setLocation | ( | $a_location | ) |
Definition at line 443 of file class.ilMediaItem.php.
Referenced by read().
ilMediaItem::setLocationType | ( | $a_type | ) |
Definition at line 453 of file class.ilMediaItem.php.
Referenced by read().
ilMediaItem::setMobId | ( | $a_mob_id | ) |
set id of parent media object
int | $a_mob_id | media object id |
Definition at line 74 of file class.ilMediaItem.php.
Referenced by read().
ilMediaItem::setNr | ( | $a_nr | ) |
set number of media item within media object
Definition at line 92 of file class.ilMediaItem.php.
Referenced by read().
ilMediaItem::setParameter | ( | $a_name, | |
$a_value | |||
) |
set parameter
string | $a_name | parameter name |
string | $a_value | parameter value |
Definition at line 624 of file class.ilMediaItem.php.
Referenced by extractUrlParameters(), read(), and setParameters().
ilMediaItem::setParameters | ( | $a_par | ) |
set alle parameters via parameter string (format: par1="value1", par2="value2", ...)
string | $a_par | parameter string |
Definition at line 642 of file class.ilMediaItem.php.
References ilUtil\extractParameterString(), resetParameters(), and setParameter().
ilMediaItem::setPurpose | ( | $a_purpose | ) |
Definition at line 433 of file class.ilMediaItem.php.
Referenced by read().
ilMediaItem::setTextRepresentation | ( | $a_val | ) |
Set text representation.
string | text representation |
Definition at line 107 of file class.ilMediaItem.php.
Referenced by read().
ilMediaItem::setThumbTried | ( | $a_tried | ) |
Definition at line 473 of file class.ilMediaItem.php.
Referenced by read().
ilMediaItem::setWidth | ( | $a_width | ) |
set width
Definition at line 536 of file class.ilMediaItem.php.
Referenced by read().
ilMediaItem::update | ( | ) |
update media item data (without map areas!)
Definition at line 173 of file class.ilMediaItem.php.
References $ilDB, $name, $params, $query, getCaption(), getFormat(), getHAlign(), getHeight(), getId(), getLocation(), getLocationType(), getMobId(), getNr(), getParameters(), getPurpose(), getTextRepresentation(), and getWidth().
ilMediaItem::writeThumbTried | ( | $a_tried | ) |
write thumbnail creation try data ("y"/"n")
Definition at line 272 of file class.ilMediaItem.php.
References $ilDB, $q, and getId().
Referenced by getThumbnailTarget().
ilMediaItem::$caption |
Definition at line 25 of file class.ilMediaItem.php.
Referenced by getCaption().
ilMediaItem::$color1 |
Definition at line 33 of file class.ilMediaItem.php.
ilMediaItem::$color2 |
Definition at line 34 of file class.ilMediaItem.php.
ilMediaItem::$format |
Definition at line 22 of file class.ilMediaItem.php.
Referenced by getFormat().
ilMediaItem::$halign |
Definition at line 26 of file class.ilMediaItem.php.
Referenced by getHAlign().
ilMediaItem::$height |
Definition at line 24 of file class.ilMediaItem.php.
Referenced by getHeight().
ilMediaItem::$id |
Definition at line 18 of file class.ilMediaItem.php.
Referenced by getId().
ilMediaItem::$location |
Definition at line 20 of file class.ilMediaItem.php.
Referenced by getLocation().
ilMediaItem::$location_type |
Definition at line 21 of file class.ilMediaItem.php.
Referenced by getLocationType().
ilMediaItem::$map_cnt |
Definition at line 31 of file class.ilMediaItem.php.
Referenced by addMapArea(), and deleteMapArea().
ilMediaItem::$map_image |
Definition at line 32 of file class.ilMediaItem.php.
Referenced by getMapWorkImage().
ilMediaItem::$mapareas |
Definition at line 30 of file class.ilMediaItem.php.
Referenced by getMapAreas().
ilMediaItem::$mob_id |
Definition at line 28 of file class.ilMediaItem.php.
Referenced by getMobId(), and read().
ilMediaItem::$nr |
Definition at line 29 of file class.ilMediaItem.php.
Referenced by deleteMapArea(), getMapArea(), getNr(), and read().
ilMediaItem::$parameters |
Definition at line 27 of file class.ilMediaItem.php.
Referenced by getParameters().
ilMediaItem::$purpose |
Definition at line 19 of file class.ilMediaItem.php.
Referenced by getPurpose().
ilMediaItem::$width |
Definition at line 23 of file class.ilMediaItem.php.
Referenced by getWidth().