|
array | $attachments = array() |
| attachments to this entry
|
|
string | $author |
| optional author (only if different to feed author)
|
|
mixed | $content |
| main content of the entry. More...
|
|
string | $id |
| entry id - something like forumpost6, must be unique to the feed
|
|
array | $links = array() |
| links from this entry to other entries
|
|
int | $published |
| published date (ctime) - unix timestamp
|
|
string | $summary |
| summary - for split long content
|
|
string | $title |
| title of the entry
|
|
string | $type |
| leap2a entry type
|
|
int | $updated |
| updated date - unix timestamp
|
|
◆ __construct()
portfolio_format_leap2a_entry::__construct |
( |
|
$id, |
|
|
|
$title, |
|
|
|
$type, |
|
|
|
$content = null |
|
) |
| |
Constructor.
All arguments are required (and will be validated) http://wiki.cetis.ac.uk/2009-03/LEAP2A_types
- Parameters
-
string | $id | unique id of this entry. could be something like forumpost6 for example. This must be unique to the entire feed. |
string | $title | title of the entry. This is pure atom. |
string | $type | the leap type of this entry. |
mixed | $content | the content of the entry. string (xhtml/html/text) |
◆ __set()
portfolio_format_leap2a_entry::__set |
( |
|
$field, |
|
|
|
$value |
|
) |
| |
Override __set to do proper dispatching for different things.
Only allows the optional and required leap2a entry fields to be set
- Parameters
-
string | $field | property's name |
mixed | $value | property's value |
- Return values
-
◆ add_category()
portfolio_format_leap2a_entry::add_category |
( |
|
$term, |
|
|
|
$scheme = null , |
|
|
|
$label = null |
|
) |
| |
Add a category to this entry http://wiki.cetis.ac.uk/2009-03/LEAP2A_categories "tags" should just pass a term here and no scheme or label.
They will be automatically normalised if they have spaces.
- Parameters
-
string | $term | eg 'Offline' |
string | $scheme | (optional) eg resource_type |
string | $label | (optional) eg File |
◆ add_extra_links()
portfolio_format_leap2a_entry::add_extra_links |
( |
|
$dom, |
|
|
|
$entry |
|
) |
| |
|
protected |
Hook function for subclasses to add extra links (like for files)
- Parameters
-
DomDocument | $dom | feed object |
DomDocument | $entry | feed added link |
Reimplemented in portfolio_format_leap2a_file.
◆ add_link()
portfolio_format_leap2a_entry::add_link |
( |
|
$otherentry, |
|
|
|
$reltype, |
|
|
|
$displayorder = null |
|
) |
| |
Add a link from this entry to another one.
These will be collated at the end of the export (during to_xml) and validated at that point. This function does no validation http://wiki.cetis.ac.uk/2009-03/LEAP2A_relationships
- Parameters
-
- Return values
-
portfolio_format_leap2a_entry | the current entry object. This is so that these calls can be chained eg $entry->add_link('something6', 'has_part')->add_link('something7', 'has_part'); |
◆ to_dom()
portfolio_format_leap2a_entry::to_dom |
( |
DomDocument |
$dom, |
|
|
|
$feedauthor |
|
) |
| |
Create an entry element and append all the children And return it rather than adding it to the dom.
This is handled by the main writer object.
- Parameters
-
DomDocument | $dom | use this to create elements |
stdClass | $feedauthor | object of author(user) info |
- Return values
-
◆ validate()
portfolio_format_leap2a_entry::validate |
( |
| ) |
|
Validate this entry.
At the moment this just makes sure required fields exist but it could also check things against a list, for example
- Todo:
- MDL-31303 - add category with a scheme 'selection_type'
◆ $content
mixed portfolio_format_leap2a_entry::$content |
The documentation for this class was generated from the following file:
- lib/portfolio/formats/leap2a/lib.php