Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

Public Member Functions | Static Public Member Functions | Public Attributes | Private Member Functions | List of all members
eZArticle Class Reference

## Public Member Functions
| __construct ( $id="")
| store ()
| get ( $id="")
| fill ( $article_array)
| delete ()
| id ()
| name ( $asHTML=true)
& | importID ()
& | contents ()
& | authorText ( $asHTML=true)
& | authorEmail ( $asHTML=true)
& | linkText ( $asHTML=true)
& | author ( $as_object=true)
& | pageCount ()
& | created ()
& | modified ()
| keywords ()
| discuss ()
& | published ()
| isPublished ()
& | startDate ( $as_object=true)
& | stopDate ( $as_object=true)
| setName ( $value)
| setImportID ( $value)
| setContents ( $value)
| setAuthorText ( $value)
| setAuthorEmail ( $value)
| setLinkText ( $value)
| setAuthor ( $user)
| setPageCount ( $value)
| setKeywords ( $keywords)
| setDiscuss ( $discuss)
| setManualKeywords ( $keywords, $toLower=true)
| setStartDate (&$date)
| setStopDate (&$date)
& | manualKeywords ( $as_array=false)
| setContentsWriter ( $author)
| contentsWriter ( $returnObject=true)
| setTopic ( $topic)
| topic ( $as_object=true)
| setIsPublished ( $value, $user=false, $as_script=false)
| categories ( $as_object=true)
| removeFromCategories ()
| addImage ( $value, $placement=false)
| deleteImage ( $value)
| images ( $asObject=true, $OrderBy="Created")
| moveImageUp ( $id)
| moveImageDown ( $id)
| setThumbnailImage ( $image)
| thumbnailImage ( $as_object=true)
| addMedia ( $value)
| deleteMedia ( $value)
| media ( $asObject=true)
| addFile ( $value)
| deleteFile ( $value)
| files ( $as_object=true)
| deleteAttribute ( $value)
| attributes ( $as_object=true)
| deleteAttributesByType ( $type)
| types ( $as_object=true)
| hasType ( $type)
| existsInCategory ( $category)
& | search (&$queryText, $sortMode=time, $fetchPublished=false, $offset=0, $limit=10, $params=array(), &$SearchTotalCount=false)
& | searchTitle (&$queryText, $fetchPublished=false, &$SearchTotalCount=false, $categoryID=false)
| articleCount ( $fetchNonPublished=true, $excludeFromSearch=false)
& | articles ( $sortMode="time", $fetchNonPublished=true, $offset=0, $limit=50)
| setCategoryDefinition ( $value)
| categoryDefinition ( $as_object=true)
| GetCategory ( $articleSectionID=0)
| createForum ()
| forum ( $as_object=true)
| addLog ( $message, $user=false)
| deleteForms ()
| addForm ( $form)
| forms ( $as_object=true)
| logMessages ()
& | getAll ()
& | getAllValid ( $isPublished=false)
& | getAllUnValid ( $isPublished=true)

## Static Public Member Functions
static & | getByName ( $name)
static & | getByImportID ( $name)
static & | keywordFirstLetters ()
static & | manualKeywordIndex ( $firstLetter=false)
static & | searchByShortContent ( $short_content, $keywords, $offset=0, $max=-1, $as_object=true)
static | categoryDefinitionStatic ( $id)
static | isAuthor ( $user, $articleID)
static | articleIDFromForum ( $ForumID)
static | authorList ( $offset=0, $limit=-1, $sort=false)
static | authorArticleList ( $authorid, $offset=0, $limit=-1, $sort=false)
static | authorArticleCount ( $authorid)

## Public Attributes
| $ID
| $AuthorID
| $ContentsWriterID
| $Name
| $Contents
| $LinkText
| $Modified
| $Created
| $Published
| $PublishedOverride
| $Keywords
| $Discuss
| $TopicID
| $StartDate
| $StopDate
| $ImportID
| $IsPublished
| $PageCount
| $AuthorText
| $AuthorEmail

## Private Member Functions
| createIndex ()
| sendPendingMail ()

## Detailed Description

! eZArticle eZArticle handles articles.

Example code:

$category = new eZArticleCategory();
$category->setName( "Programming" );
$category->setDescription( "Lots of programming articles" );
$category->store();
$article = new eZArticle( );
$article->setName( "C++" );
$article->setContents( "An article about the fine art of C++ .... .... ... ... .... ... " );
$article->setAuthorText( "B�rd Farstad" );
$article->setLinkText( "Read the article" );
$article->store();
$category->addArticle( $article );
$category
if( $Action=="Edit") $category
Definition: adedit.php:378
$article
$article
Definition: articlelog.php:45
eZArticleCategory
Definition: ezarticlecategory.php:45
eZArticle
Definition: ezarticle.php:82

See also
  eZArticleCategory

TODO Add delayed fetching of the article contents.

Definition at line 81 of file ezarticle.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZArticle::__construct | ( |  | $id = `""` | ) |

Constructs a new eZArticle object.

If $id is set the object's values are fetched from the database.

Definition at line 89 of file ezarticle.php.

References $ID, $id, and fill().

## Member Function Documentation

## ◆ addFile()

eZArticle::addFile | ( |  | $value | ) |

Adds an file to the article. $value can either be a eZVirtualFile or an ID

Definition at line 1686 of file ezarticle.php.

References $db, $res, and eZDB\globalDatabase().

## ◆ addForm()

eZArticle::addForm | ( |  | $form | ) |

Adds a form to the article.

Definition at line 2921 of file ezarticle.php.

References $ArticleID, $db, $form, $ID, $query, $res, and eZDB\globalDatabase().

## ◆ addImage()

eZArticle::addImage | ( |  | $value,
|  |  | $placement = `false`
| ) |  |

Adds an image to the article, unless the image is allready added for this article.

Definition at line 1335 of file ezarticle.php.

References $db, $i, $res, and eZDB\globalDatabase().

## ◆ addLog()

eZArticle::addLog | ( |  | $message,
|  |  | $user = `false`
| ) |  |

Adds a log message to the article.

Definition at line 2867 of file ezarticle.php.

References $db, $query, $res, $user, $userID, eZUser\currentUser(), and eZDB\globalDatabase().

## ◆ addMedia()

eZArticle::addMedia | ( |  | $value | ) |

Adds an media to the article, unless the media is allready added for this article.

Definition at line 1609 of file ezarticle.php.

References $db, $res, and eZDB\globalDatabase().

## ◆ articleCount()

eZArticle::articleCount | ( |  | $fetchNonPublished = `true`,
|  |  | $excludeFromSearch = `false`
| ) |  |

Returns the number of articles available, for the current user.

Definition at line 2236 of file ezarticle.php.

References $currentUserID, $db, $group, $groups, $ini, $OrderBy, $query, $user, eZUser\currentUser(), and eZDB\globalDatabase().

## ◆ articleIDFromForum()

static eZArticle::articleIDFromForum | ( |  | $ForumID | ) |
| static

Returns the article which a forum is connected to.

Definition at line 2689 of file ezarticle.php.

References $ArticleID, $db, $result, and eZDB\globalDatabase().

## ◆ articles()

& eZArticle::articles | ( |  | $sortMode = `"time"`,
|  |  | $fetchNonPublished = `true`,
|  |  | $offset = `0`,
|  |  | $limit = `50`
| ) |  |

Returns every article in every category sorted by time.

Definition at line 2352 of file ezarticle.php.

References $currentUserID, $db, $group, $groups, $i, $ini, $limit, $offset, $OrderBy, $query, $user, eZUser\currentUser(), and eZDB\globalDatabase().

## ◆ attributes()

eZArticle::attributes | ( |  | $as_object = `true` | ) |

Returns every attribute belonging to an article as an array of eZArticleAttribute objects.

Definition at line 1775 of file ezarticle.php.

References $db, $i, $id, and eZDB\globalDatabase().

## ◆ author()

& eZArticle::author | ( |  | $as_object = `true` | ) |

Returns the author as a eZUser object.

Definition at line 543 of file ezarticle.php.

References $author, and $AuthorID.

## ◆ authorArticleCount()

static eZArticle::authorArticleCount | ( |  | $authorid | ) |
| static

Returns the number of articles this author has written that the user is allowed to see.

Definition at line 2823 of file ezarticle.php.

References $currentUserID, $db, $group, $groups, $query, $user, eZUser\currentUser(), and eZDB\globalDatabase().

## ◆ authorArticleList()

static eZArticle::authorArticleList | ( |  | $authorid,
|  |  | $offset = `0`,
|  |  | $limit = `-1`,
|  |  | $sort = `false`
| ) |  |
| static

Returns a all articles an author has written that currentuser is allowed to see.

Definition at line 2747 of file ezarticle.php.

References $currentUserID, $db, $group, $groups, $limit, $offset, $query, $sort, $user, eZUser\currentUser(), and eZDB\globalDatabase().

## ◆ authorEmail()

& eZArticle::authorEmail | ( |  | $asHTML = `true` | ) |

Returns the author email contents.

Definition at line 520 of file ezarticle.php.

References $author.

## ◆ authorList()

static eZArticle::authorList | ( |  | $offset = `0`,
|  |  | $limit = `-1`,
|  |  | $sort = `false`
| ) |  |
| static

Returns a list of authors and their article count.

Definition at line 2710 of file ezarticle.php.

References $db, $limit, $offset, $sort, and eZDB\globalDatabase().

## ◆ authorText()

& eZArticle::authorText | ( |  | $asHTML = `true` | ) |

Returns the author text contents.

Definition at line 508 of file ezarticle.php.

References $author, and eZTextTool\fixhtmlentities().

## ◆ categories()

eZArticle::categories | ( |  | $as_object = `true` | ) |

Returns the categories an article is assigned to.

The categories are returned as an array of eZArticleCategory objects.

Definition at line 1297 of file ezarticle.php.

References $category, $category_array, $db, $ret, and eZDB\globalDatabase().

## ◆ categoryDefinition()

eZArticle::categoryDefinition | ( |  | $as_object = `true` | ) |

Returns the article's definition category.

Definition at line 2512 of file ezarticle.php.

References $category, $db, $id, $res, and eZDB\globalDatabase().

Referenced by sendPendingMail(), and setIsPublished().

## ◆ categoryDefinitionStatic()

static eZArticle::categoryDefinitionStatic | ( |  | $id | ) |
| static

Returns the article definition id to the corresponding article id.

false is returned if no article was found.

Definition at line 2541 of file ezarticle.php.

References $db, $res, and eZDB\globalDatabase().

## ◆ contents()

& eZArticle::contents | ( |  | ) |

Returns the article contents.

The contents is internally stored as XML.

Definition at line 498 of file ezarticle.php.

References $Contents, $db, and eZDB\globalDatabase().

## ◆ contentsWriter()

eZArticle::contentsWriter | ( |  | $returnObject = `true` | ) |

Returns the contentswriter of the article.

Definition at line 1127 of file ezarticle.php.

References $ContentsWriterID.

Referenced by sendPendingMail().

## ◆ created()

& eZArticle::created | ( |  | ) |

Returns the creation time of the article.

The time is returned as a eZDateTime object.

Definition at line 565 of file ezarticle.php.

References $dateTime.

## ◆ createForum()

eZArticle::createForum | ( |  | ) |

Creates a discussion forum for the article.

Definition at line 2600 of file ezarticle.php.

## ◆ createIndex()

eZArticle::createIndex | ( |  | ) |
| private

will index the article keywords (fetched from Contents) and name for fulltext search.

Definition at line 753 of file ezarticle.php.

References $articleCount, $Contents, $contents, $count, $db, $Name, $query, $ret, eZDB\finish(), eZDB\globalDatabase(), and manualKeywords().

Referenced by store().

## ◆ delete()

eZArticle::delete | ( |  | ) |

Deletes a eZArticle object from the database.

Definition at line 421 of file ezarticle.php.

References $db, $file, $fileList, $forum, $image, $imageList, $res, files(), forum(), eZDB\globalDatabase(), and images().

## ◆ deleteAttribute()

eZArticle::deleteAttribute | ( |  | $value | ) |

Deletes an attribute from an article.

Definition at line 1760 of file ezarticle.php.

References $db, and eZDB\globalDatabase().

## ◆ deleteAttributesByType()

eZArticle::deleteAttributesByType | ( |  | $type | ) |

Deletes all attributes defined for this article which belongs to a certain type.

Definition at line 1798 of file ezarticle.php.

References $db, $i, $ret, $type, and eZDB\globalDatabase().

## ◆ deleteFile()

eZArticle::deleteFile | ( |  | $value | ) |

Deletes an file from the article. $value can either be a eZVirtualFile or an ID

NOTE: the file does not get deleted from the file catalogue.

Definition at line 1722 of file ezarticle.php.

References $db, and eZDB\globalDatabase().

## ◆ deleteForms()

eZArticle::deleteForms | ( |  | ) |

Adds a form to the article.

Definition at line 2905 of file ezarticle.php.

References $ArticleID, $db, $ID, $query, and eZDB\globalDatabase().

## ◆ deleteImage()

eZArticle::deleteImage | ( |  | $value | ) |

Deletes an image from the article.

NOTE: the image does not get deleted from the image catalogue.

Definition at line 1389 of file ezarticle.php.

References $db, and eZDB\globalDatabase().

## ◆ deleteMedia()

eZArticle::deleteMedia | ( |  | $value | ) |

Deletes an media from the article.

NOTE: the media does not get deleted from the media catalogue.

Definition at line 1645 of file ezarticle.php.

References $db, and eZDB\globalDatabase().

## ◆ discuss()

eZArticle::discuss | ( |  | ) |

Returns the discuss value of an article.

Definition at line 598 of file ezarticle.php.

References $ret.

## ◆ existsInCategory()

eZArticle::existsInCategory | ( |  | $category | ) |

Returns true if the article is assigned to the category given as argument. False if not.

Definition at line 1875 of file ezarticle.php.

References $category, $db, $ret, and eZDB\globalDatabase().

## ◆ files()

eZArticle::files | ( |  | $as_object = `true` | ) |

Returns every file to a article as a array of eZFile objects.

Definition at line 1739 of file ezarticle.php.

References $db, $i, $id, and eZDB\globalDatabase().

Referenced by delete().

## ◆ fill()

eZArticle::fill | ( |  | $article_array | ) |

Definition at line 340 of file ezarticle.php.

References $db, eZDB\globalDatabase(), and Name.

Referenced by __construct(), and get().

## ◆ forms()

eZArticle::forms | ( |  | $as_object = `true` | ) |

Returns an array of the forms for the current article.

Definition at line 2955 of file ezarticle.php.

References $ArticleID, $count, $db, $i, $ID, $id, $query, and eZDB\globalDatabase().

## ◆ forum()

eZArticle::forum | ( |  | $as_object = `true` | ) |

Returns the forum for the article.

Definition at line 2608 of file ezarticle.php.

References $db, $forum, $ini, $RequireUserLogin, $res, and eZDB\globalDatabase().

Referenced by delete(), and setThumbnailImage().

## ◆ get()

eZArticle::get | ( |  | $id = `""` | ) |

Fetches the object information from the database.

Definition at line 319 of file ezarticle.php.

References $db, $id, $ret, fill(), and eZDB\globalDatabase().

## ◆ getAll()

& eZArticle::getAll | ( |  | ) |

Returns all the articles in the database.

The articles are returned as an array of eZArticle objects.

Definition at line 3008 of file ezarticle.php.

References $db, $i, and eZDB\globalDatabase().

## ◆ getAllUnValid()

& eZArticle::getAllUnValid | ( |  | $isPublished = `true` | ) |

Returns all the articles that is not valid now.

The articles are returned as an array of eZArticle objects.

Definition at line 3116 of file ezarticle.php.

References $db, $i, $now, and eZDB\globalDatabase().

## ◆ getAllValid()

& eZArticle::getAllValid | ( |  | $isPublished = `false` | ) |

Returns all the articles that is valid now.

The articles are returned as an array of eZArticle objects.

Definition at line 3034 of file ezarticle.php.

References $db, $i, $now, and eZDB\globalDatabase().

## ◆ getByImportID()

static& eZArticle::getByImportID | ( |  | $name | ) |
| static

Returns the one, and only if one exists, article with the import id

Returns an object of eZArticle.

Definition at line 396 of file ezarticle.php.

References $db, $name, $topic, and eZDB\globalDatabase().

## ◆ getByName()

static& eZArticle::getByName | ( |  | $name | ) |
| static

Returns the one, and only if one exists, article with the name

Returns an object of eZArticle.

Definition at line 370 of file ezarticle.php.

References $db, $name, $topic, and eZDB\globalDatabase().

## ◆ GetCategory()

eZArticle::GetCategory | ( |  | $articleSectionID = `0` | ) |

Returns the ID of a category

Definition at line 2558 of file ezarticle.php.

References $category_array, $db, and eZDB\globalDatabase().

## ◆ hasType()

eZArticle::hasType | ( |  | $type | ) |

Returns true if the type given exists for this article.

Definition at line 1849 of file ezarticle.php.

References $db, $ret, and eZDB\globalDatabase().

## ◆ id()

eZArticle::id | ( |  | ) |

Returns the object ID.

Definition at line 467 of file ezarticle.php.

References $ID.

## ◆ images()

eZArticle::images | ( |  | $asObject = `true`,
|  |  | $OrderBy = `"Created"`
| ) |  |

Returns every image to a article as a array of eZImage objects.

Definition at line 1408 of file ezarticle.php.

References $db, $i, and eZDB\globalDatabase().

Referenced by delete().

## ◆ importID()

& eZArticle::importID | ( |  | ) |

Returns the article import id.

Definition at line 488 of file ezarticle.php.

References $ImportID.

## ◆ isAuthor()

static eZArticle::isAuthor | ( |  | $user,
|  |  | $articleID
| ) |  |
| static

\Static Returns true if the given user is the author of the given object. $user is either a userID or an eZUser. $article is the articleID

Definition at line 2672 of file ezarticle.php.

References $db, $res, $user, and eZDB\globalDatabase().

Referenced by eZBulkMail\send().

## ◆ isPublished()

eZArticle::isPublished | ( |  | ) |

Returns true if the article is published false if not.

Definition at line 625 of file ezarticle.php.

References $ret.

## ◆ keywordFirstLetters()

static& eZArticle::keywordFirstLetters | ( |  | ) |
| static

Returns an array of letters which is the unique first character of all keywords.

Definition at line 982 of file ezarticle.php.

References $db, and eZDB\globalDatabase().

## ◆ keywords()

eZArticle::keywords | ( |  | ) |

Returns the keywords of an article.

Definition at line 589 of file ezarticle.php.

References $Keywords.

## ◆ linkText()

& eZArticle::linkText | ( |  | $asHTML = `true` | ) |

Returns the link text.

Definition at line 533 of file ezarticle.php.

References $LinkText, and eZTextTool\fixhtmlentities().

## ◆ logMessages()

eZArticle::logMessages | ( |  | ) |

Returns an array of the logg messages for the current article.

The messages are returned as : array( date, message ).

Definition at line 2984 of file ezarticle.php.

References $db, $query, $ret, and eZDB\globalDatabase().

## ◆ manualKeywordIndex()

static& eZArticle::manualKeywordIndex | ( |  | $firstLetter = `false` | ) |
| static

Returns an index of keywords found in all articles. It returns an array of unique keywords. If $firstLetter is set only the keywords with this first letter are returned.

Definition at line 1064 of file ezarticle.php.

References $currentUserID, $db, $group, $groups, $i, $user, eZUser\currentUser(), and eZDB\globalDatabase().

## ◆ manualKeywords()

& eZArticle::manualKeywords | ( |  | $as_array = `false` | ) |

Returns the manual keywords for an article. It is either returned as an array or as a comma separated string.

Definition at line 1043 of file ezarticle.php.

References $db, $ret, and eZDB\globalDatabase().

Referenced by createIndex().

## ◆ media()

eZArticle::media | ( |  | $asObject = `true` | ) |

Returns every media to a article as a array of eZMedia objects.

Definition at line 1664 of file ezarticle.php.

References $db, $i, and eZDB\globalDatabase().

## ◆ modified()

& eZArticle::modified | ( |  | ) |

Returns the modification time of the article.

The time is returned as a eZDateTime object.

Definition at line 578 of file ezarticle.php.

References $dateTime.

## ◆ moveImageDown()

eZArticle::moveImageDown | ( |  | $id | ) |

Moves the Image placement with the given ID down.

Definition at line 1484 of file ezarticle.php.

References $db, and eZDB\globalDatabase().

## ◆ moveImageUp()

eZArticle::moveImageUp | ( |  | $id | ) |

Moves the image placement with the given ID up.

Definition at line 1448 of file ezarticle.php.

References $db, and eZDB\globalDatabase().

## ◆ name()

eZArticle::name | ( |  | $asHTML = `true` | ) |

Returns the article name / title.

Definition at line 475 of file ezarticle.php.

References $Name, $name, eZTextTool\fixhtmlentities(), and Name.

## ◆ pageCount()

& eZArticle::pageCount | ( |  | ) |

Returns the number of pages in the article.

Definition at line 555 of file ezarticle.php.

## ◆ published()

& eZArticle::published | ( |  | ) |

Returns the last time the article was published.

The time is returned as a eZDateTime object.

Definition at line 614 of file ezarticle.php.

References $dateTime.

## ◆ removeFromCategories()

eZArticle::removeFromCategories | ( |  | ) |

Removes every category assignments from the current article.

Definition at line 1325 of file ezarticle.php.

References $db, and eZDB\globalDatabase().

## ◆ search()

& eZArticle::search | ( | & | $queryText,
|  |  | $sortMode = `time`,
|  |  | $fetchPublished = `false`,
|  |  | $offset = `0`,
|  |  | $limit = `10`,
|  |  | $params = `array()`,
|  | & | $SearchTotalCount = `false`
| ) |  |

Does a search in the article archive. queryText is the text to search for sortMode is the way the result is sorted. fetchnonPublished can be either true or false. offset, limit are self explanatory.

params is an associative array that can contain the following items FromDate an eZDate object. ToDate an eZDate object. Categories an array of Category ID's Type AuthorID the ID of the author writing the article PhotographerID a photographer that has contributed to the article

if SearchExcludedArticles is set to "true" articles which is set non searchable will also be searched. $SearchTotalCount will return the total number of items found in the search

Definition at line 1912 of file ezarticle.php.

References $author, $cat, $count, $currentUserID, $db, $group, $groups, $i, $ini, $limit, $offset, $OrderBy, $query, $type, $user, eZUser\currentUser(), and eZDB\globalDatabase().

## ◆ searchByShortContent()

static& eZArticle::searchByShortContent | ( |  | $short_content,
|  |  | $keywords,
|  |  | $offset = `0`,
|  |  | $max = `-1`,
|  |  | $as_object = `true`
| ) |  |
| static

Returns an array of articles which match short contents and the keywords.

Definition at line 1159 of file ezarticle.php.

References $content, $contents, $currentUserID, $db, $group, $groups, $i, $offset, $ret, $user, eZUser\currentUser(), and eZDB\globalDatabase().

## ◆ searchTitle()

& eZArticle::searchTitle | ( | & | $queryText,
|  |  | $fetchPublished = `false`,
|  | & | $SearchTotalCount = `false`,
|  |  | $categoryID = `false`
| ) |  |

Does a search for titles in the article archive. queryText is the text to search for fetchnonPublished can be either true or false.

$SearchTotalCount will return the total number of items found in the search

Definition at line 2193 of file ezarticle.php.

References $categoryID, $db, $i, $OrderBy, $query, $user, eZUser\currentUser(), and eZDB\globalDatabase().

## ◆ sendPendingMail()

eZArticle::sendPendingMail | ( |  | ) |
| private

Send mail to the editors that will tell them that a new article is ready to be published.

Definition at line 3068 of file ezarticle.php.

References $author, $index, $ini, $Language, $mail, $name, $users, $wwwDir, categoryDefinition(), and contentsWriter().

Referenced by setIsPublished().

## ◆ setAuthor()

eZArticle::setAuthor | ( |  | $user | ) |

Sets the author of the article.

Definition at line 720 of file ezarticle.php.

References $user.

## ◆ setAuthorEmail()

eZArticle::setAuthorEmail | ( |  | $value | ) |

Sets the author email.

Definition at line 704 of file ezarticle.php.

## ◆ setAuthorText()

eZArticle::setAuthorText | ( |  | $value | ) |

Sets the author text.

Definition at line 696 of file ezarticle.php.

## ◆ setCategoryDefinition()

eZArticle::setCategoryDefinition | ( |  | $value | ) |

Set's the articles defined category. This is the main category for the article. Additional categories can be added with eZArticleCategory::addArticle();

Definition at line 2472 of file ezarticle.php.

References $categoryID, $db, $query, $res, and eZDB\globalDatabase().

## ◆ setContents()

eZArticle::setContents | ( |  | $value | ) |

Sets the contents name.

Definition at line 688 of file ezarticle.php.

## ◆ setContentsWriter()

eZArticle::setContentsWriter | ( |  | $author | ) |

Sets the contents author.

Definition at line 1116 of file ezarticle.php.

References $author.

## ◆ setDiscuss()

eZArticle::setDiscuss | ( |  | $discuss | ) |

Sets the discuss value to an article.

Definition at line 887 of file ezarticle.php.

## ◆ setImportID()

eZArticle::setImportID | ( |  | $value | ) |

Sets the article import id.

Definition at line 680 of file ezarticle.php.

## ◆ setIsPublished()

eZArticle::setIsPublished | ( |  | $value,
|  |  | $user = `false`,
|  |  | $as_script = `false`
| ) |  |

Sets the article to published or not.

Definition at line 1251 of file ezarticle.php.

References $category, $group, $user, categoryDefinition(), eZUser\currentUser(), and sendPendingMail().

## ◆ setKeywords()

eZArticle::setKeywords | ( |  | $keywords | ) |

Sets the keywords to an article. Theese words are used in the search.

Definition at line 739 of file ezarticle.php.

## ◆ setLinkText()

eZArticle::setLinkText | ( |  | $value | ) |

Sets the link text.

Definition at line 712 of file ezarticle.php.

## ◆ setManualKeywords()

eZArticle::setManualKeywords | ( |  | $keywords,
|  |  | $toLower = `true`
| ) |  |

Sets the manual keywords to an article. Theese words are used in the search and for the keyword index.

Definition at line 898 of file ezarticle.php.

References $db, $res, and eZDB\globalDatabase().

## ◆ setName()

eZArticle::setName | ( |  | $value | ) |

Sets the article name.

Definition at line 672 of file ezarticle.php.

References Name.

## ◆ setPageCount()

eZArticle::setPageCount | ( |  | $value | ) |

Sets the number of pages in the article.

Definition at line 731 of file ezarticle.php.

## ◆ setStartDate()

eZArticle::setStartDate | ( | & | $date | ) |

Sets the start date for the article.

Definition at line 1004 of file ezarticle.php.

References $date, and $now.

## ◆ setStopDate()

eZArticle::setStopDate | ( | & | $date | ) |

Sets the start date for the article.

Definition at line 1031 of file ezarticle.php.

References $date.

## ◆ setThumbnailImage()

eZArticle::setThumbnailImage | ( |  | $image | ) |

Sets the thumbnail image for the article.

The argument must be an eZImage object, or false to unset the thumbnail image.

Definition at line 1521 of file ezarticle.php.

References $db, $image, $query, $res, forum(), and eZDB\globalDatabase().

## ◆ setTopic()

eZArticle::setTopic | ( |  | $topic | ) |

Sets the topic.

Definition at line 1139 of file ezarticle.php.

References $topic.

## ◆ startDate()

& eZArticle::startDate | ( |  | $as_object = `true` | ) |

Returns the start date of the article.

Definition at line 642 of file ezarticle.php.

References $ret, and $StartDate.

## ◆ stopDate()

& eZArticle::stopDate | ( |  | $as_object = `true` | ) |

Returns the stop date of the article.

Definition at line 657 of file ezarticle.php.

References $ret, and $StopDate.

## ◆ store()

eZArticle::store | ( |  | ) |

Stores a product to the database.

Definition at line 114 of file ezarticle.php.

References $contents, $db, $name, $Published, $PublishedOverride, $res, $ret, $StartDate, $StopDate, createIndex(), eZDB\globalDatabase(), and Name.

## ◆ thumbnailImage()

eZArticle::thumbnailImage | ( |  | $as_object = `true` | ) |

Returns the thumbnail image of the article as a eZImage object.

Definition at line 1582 of file ezarticle.php.

References $db, $id, $query, $ret, and eZDB\globalDatabase().

## ◆ topic()

eZArticle::topic | ( |  | $as_object = `true` | ) |

Returns the topic.

If there is no topic selected for the article false is returned.

Definition at line 1149 of file ezarticle.php.

References $TopicID.

## ◆ types()

eZArticle::types | ( |  | $as_object = `true` | ) |

Returns every attribute type belonging to an article as an array of eZArticleType objects.

Definition at line 1828 of file ezarticle.php.

References $db, $i, $id, and eZDB\globalDatabase().

## Member Data Documentation

## ◆ $AuthorEmail

eZArticle::$AuthorEmail

Definition at line 3173 of file ezarticle.php.

## ◆ $AuthorID

eZArticle::$AuthorID

Definition at line 3148 of file ezarticle.php.

Referenced by author().

## ◆ $AuthorText

eZArticle::$AuthorText

Definition at line 3172 of file ezarticle.php.

## ◆ $Contents

eZArticle::$Contents

Definition at line 3151 of file ezarticle.php.

Referenced by contents(), and createIndex().

## ◆ $ContentsWriterID

eZArticle::$ContentsWriterID

Definition at line 3149 of file ezarticle.php.

Referenced by contentsWriter().

## ◆ $Created

eZArticle::$Created

Definition at line 3154 of file ezarticle.php.

## ◆ $Discuss

eZArticle::$Discuss

Definition at line 3159 of file ezarticle.php.

## ◆ $ID

eZArticle::$ID

Definition at line 3147 of file ezarticle.php.

Referenced by __construct(), addForm(), deleteForms(), forms(), and id().

## ◆ $ImportID

eZArticle::$ImportID

Definition at line 3163 of file ezarticle.php.

Referenced by importID().

## ◆ $IsPublished

eZArticle::$IsPublished

Definition at line 3166 of file ezarticle.php.

## ◆ $Keywords

eZArticle::$Keywords

Definition at line 3158 of file ezarticle.php.

Referenced by keywords().

## ◆ $LinkText

eZArticle::$LinkText

Definition at line 3152 of file ezarticle.php.

Referenced by linkText().

## ◆ $Modified

eZArticle::$Modified

Definition at line 3153 of file ezarticle.php.

## ◆ $Name

eZArticle::$Name

Definition at line 3150 of file ezarticle.php.

Referenced by createIndex(), and name().

## ◆ $PageCount

eZArticle::$PageCount

Definition at line 3169 of file ezarticle.php.

## ◆ $Published

eZArticle::$Published

Definition at line 3155 of file ezarticle.php.

Referenced by store().

## ◆ $PublishedOverride

eZArticle::$PublishedOverride

Definition at line 3157 of file ezarticle.php.

Referenced by store().

## ◆ $StartDate

eZArticle::$StartDate

Definition at line 3161 of file ezarticle.php.

Referenced by startDate(), and store().

## ◆ $StopDate

eZArticle::$StopDate

Definition at line 3162 of file ezarticle.php.

Referenced by stopDate(), and store().

## ◆ $TopicID

eZArticle::$TopicID

Definition at line 3160 of file ezarticle.php.

Referenced by topic().

The documentation for this class was generated from the following file:

- ezarticle.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.