ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
ilMDCopyrightSelectionEntry Class Reference
+ Collaboration diagram for ilMDCopyrightSelectionEntry:

Public Member Functions

 __construct (int $a_entry_id)
 
 getUsage ()
 
 getEntryId ()
 
 getIsDefault ()
 Get if the entry is default No setter for this. More...
 
 setOutdated (bool $a_value)
 
 getOutdated ()
 
 setTitle (string $a_title)
 
 getTitle ()
 
 setDescription (string $a_desc)
 
 getDescription ()
 
 getCopyrightData ()
 
 setCopyrightData (string $full_name, ?URI $link, ?URI $image_link, string $alt_text)
 
 setCopyright (string $a_copyright)
 
 getCopyright ()
 
 setCosts (bool $a_costs)
 
 getCosts ()
 
 setLanguage (string $a_lang_key)
 
 getLanguage ()
 
 setCopyrightAndOtherRestrictions (bool $a_status)
 
 getCopyrightAndOtherRestrictions ()
 
 setOrderPosition (int $a_position)
 
 getOrderPosition ()
 
 add ()
 
 update ()
 
 delete ()
 
 validate ()
 

Static Public Member Functions

static _getEntries ()
 
static lookupCopyyrightTitle (string $a_cp_string)
 
static _lookupCopyright (string $a_cp_string)
 
static _lookupCopyrightForExport (string $a_cp_string)
 
static lookupCopyrightFromImport (string $copyright_text)
 
static _extractEntryId (string $a_cp_string)
 
static isEntry ($a_cp_string)
 
static getDefault ()
 
static createIdentifier (int $a_entry_id)
 

Protected Member Functions

 getNextOrderPosition ()
 

Static Protected Member Functions

static getCopyrightDataFromRow (stdClass $row)
 
static renderCopyrightFromRow (stdClass $row)
 

Protected Attributes

ilLogger $logger
 
ilDBInterface $db
 
bool $outdated = false
 
int $order_position = 0
 
CopyrightDataInterface $copyright_data
 

Private Member Functions

 read ()
 

Private Attributes

int $entry_id
 
string $title = ''
 
string $description = ''
 
string $copyright = ''
 
bool $costs = false
 
string $language = ''
 
bool $copyright_and_other_restrictions = true
 
int $usage = 0
 

Detailed Description

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

Definition at line 32 of file class.ilMDCopyrightSelectionEntry.php.

Constructor & Destructor Documentation

◆ __construct()

ilMDCopyrightSelectionEntry::__construct ( int  $a_entry_id)

Definition at line 52 of file class.ilMDCopyrightSelectionEntry.php.

References $DIC, ILIAS\Repository\logger(), and read().

53  {
54  global $DIC;
55 
56  $this->logger = $DIC->logger()->meta();
57  $this->db = $DIC->database();
58  $this->entry_id = $a_entry_id;
59  $this->read();
60  }
global $DIC
Definition: feed.php:28
+ Here is the call graph for this function:

Member Function Documentation

◆ _extractEntryId()

static ilMDCopyrightSelectionEntry::_extractEntryId ( string  $a_cp_string)
static

Definition at line 195 of file class.ilMDCopyrightSelectionEntry.php.

References IL_INST_ID.

Referenced by ilMDCopyrightSelectionGUI\fillTemplate(), ilMDKeywordExposer\getContentModification(), and ilMDEditorGUI\listQuickEditCopyright().

195  : int
196  {
197  if (!preg_match('/il_copyright_entry__([0-9]+)__([0-9]+)/', $a_cp_string, $matches)) {
198  return 0;
199  }
200  if ($matches[1] != IL_INST_ID) {
201  return 0;
202  }
203  return (int) ($matches[2] ?? 0);
204  }
const IL_INST_ID
Definition: constants.php:40
+ Here is the caller graph for this function:

◆ _getEntries()

static ilMDCopyrightSelectionEntry::_getEntries ( )
static
Returns
ilMDCopyrightSelectionEntry[]

Definition at line 65 of file class.ilMDCopyrightSelectionEntry.php.

References $DIC, $ilDB, $query, and $res.

Referenced by ilCronOerHarvester\addCustomSettingsToForm(), ilMDCopyrightSelectionGUI\fillTemplate(), ilContainerFilterUtil\getContainerRecordTitle(), ilMDEditorGUI\listQuickEditCopyright(), and ilMDCopyrightTableGUI\parseSelections().

65  : array
66  {
67  global $DIC;
68 
69  $ilDB = $DIC->database();
70 
71  $query = "SELECT entry_id FROM il_md_cpr_selections ORDER BY is_default DESC, position ASC";
72  $res = $ilDB->query($query);
73 
74  $entries = [];
75  while ($row = $ilDB->fetchObject($res)) {
76  $entries[] = new ilMDCopyrightSelectionEntry((int) $row->entry_id);
77  }
78  return $entries;
79  }
$res
Definition: ltiservices.php:69
global $DIC
Definition: feed.php:28
$query
+ Here is the caller graph for this function:

◆ _lookupCopyright()

static ilMDCopyrightSelectionEntry::_lookupCopyright ( string  $a_cp_string)
static

Definition at line 121 of file class.ilMDCopyrightSelectionEntry.php.

References $DIC, $ilDB, $query, $res, and ilDBConstants\T_INTEGER.

Referenced by ilMDUtils\_parseCopyright().

121  : string
122  {
123  global $DIC;
124 
125  $ilDB = $DIC->database();
126 
127  if (!$entry_id = self::_extractEntryId($a_cp_string)) {
128  return $a_cp_string;
129  }
130 
131  $query = "SELECT full_name, link, image_link, alt_text FROM il_md_cpr_selections " .
132  "WHERE entry_id = " . $ilDB->quote($entry_id, ilDBConstants::T_INTEGER) . " ";
133  $res = $ilDB->query($query);
134  $row = $ilDB->fetchObject($res);
135 
136  return self::renderCopyrightFromRow($row);
137  }
$res
Definition: ltiservices.php:69
global $DIC
Definition: feed.php:28
$query
+ Here is the caller graph for this function:

◆ _lookupCopyrightForExport()

static ilMDCopyrightSelectionEntry::_lookupCopyrightForExport ( string  $a_cp_string)
static

Definition at line 139 of file class.ilMDCopyrightSelectionEntry.php.

References $data, $DIC, $ilDB, $query, $res, and ilDBConstants\T_INTEGER.

Referenced by ilMDRights\toXML().

139  : string
140  {
141  global $DIC;
142 
143  $ilDB = $DIC->database();
144 
145  if (!$entry_id = self::_extractEntryId($a_cp_string)) {
146  return $a_cp_string;
147  }
148 
149  $query = "SELECT full_name, link, image_link, alt_text FROM il_md_cpr_selections " .
150  "WHERE entry_id = " . $ilDB->quote($entry_id, ilDBConstants::T_INTEGER) . " ";
151  $res = $ilDB->query($query);
152  $row = $ilDB->fetchObject($res);
153 
154  $data = self::getCopyrightDataFromRow($row);
155 
156  return (string) ($data->link() ?? $data->fullName());
157  }
$res
Definition: ltiservices.php:69
global $DIC
Definition: feed.php:28
$query
+ Here is the caller graph for this function:

◆ add()

ilMDCopyrightSelectionEntry::add ( )

Definition at line 365 of file class.ilMDCopyrightSelectionEntry.php.

References getCopyrightAndOtherRestrictions(), getCopyrightData(), getCosts(), getDescription(), getLanguage(), getNextOrderPosition(), and getTitle().

365  : bool
366  {
367  $next_id = $this->db->nextId('il_md_cpr_selections');
368 
369  $this->db->insert('il_md_cpr_selections', array(
370  'entry_id' => array('integer', $next_id),
371  'title' => array('text', $this->getTitle()),
372  'description' => array('clob', $this->getDescription()),
373  'full_name' => array('clob', $this->getCopyrightData()->fullName()),
374  'link' => array('clob', (string) $this->getCopyrightData()->link()),
375  'image_link' => array('clob', (string) $this->getCopyrightData()->imageLink()),
376  'alt_text' => array('clob', $this->getCopyrightData()->altText()),
377  'language' => array('text', $this->getLanguage()),
378  'costs' => array('integer', $this->getCosts()),
379  'cpr_restrictions' => array('integer', $this->getCopyrightAndOtherRestrictions()),
380  'position' => array('integer', $this->getNextOrderPosition())
381  ));
382  $this->entry_id = $next_id;
383  return true;
384  }
+ Here is the call graph for this function:

◆ createIdentifier()

static ilMDCopyrightSelectionEntry::createIdentifier ( int  $a_entry_id)
static

Definition at line 457 of file class.ilMDCopyrightSelectionEntry.php.

References IL_INST_ID.

Referenced by ilMDUtils\_getDefaultCopyright(), ilContainer\filterObjIdsByCopyright(), and ilMDRights\parseDescriptionFromImport().

457  : string
458  {
459  return 'il_copyright_entry__' . IL_INST_ID . '__' . $a_entry_id;
460  }
const IL_INST_ID
Definition: constants.php:40
+ Here is the caller graph for this function:

◆ delete()

ilMDCopyrightSelectionEntry::delete ( )

Definition at line 406 of file class.ilMDCopyrightSelectionEntry.php.

References $query, $res, and getEntryId().

Referenced by ilObjMDSettingsGUI\deleteEntries().

406  : void
407  {
408  $query = "DELETE FROM il_md_cpr_selections " .
409  "WHERE entry_id = " . $this->db->quote($this->getEntryId(), 'integer') . " ";
410  $res = $this->db->manipulate($query);
411  }
$res
Definition: ltiservices.php:69
$query
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCopyright()

ilMDCopyrightSelectionEntry::getCopyright ( )

Definition at line 311 of file class.ilMDCopyrightSelectionEntry.php.

References $copyright.

311  : string
312  {
313  return $this->copyright;
314  }

◆ getCopyrightAndOtherRestrictions()

ilMDCopyrightSelectionEntry::getCopyrightAndOtherRestrictions ( )

Definition at line 341 of file class.ilMDCopyrightSelectionEntry.php.

References $copyright_and_other_restrictions.

Referenced by add(), and update().

341  : bool
342  {
344  }
+ Here is the caller graph for this function:

◆ getCopyrightData()

ilMDCopyrightSelectionEntry::getCopyrightData ( )

Definition at line 284 of file class.ilMDCopyrightSelectionEntry.php.

References $copyright_data.

Referenced by add(), and update().

+ Here is the caller graph for this function:

◆ getCopyrightDataFromRow()

static ilMDCopyrightSelectionEntry::getCopyrightDataFromRow ( stdClass  $row)
staticprotected

Definition at line 98 of file class.ilMDCopyrightSelectionEntry.php.

99  {
100  return new CopyrightData(
101  $row->full_name ?? '',
102  !empty($row->link ?? '') ? new URI($row->link) : null,
103  !empty($row->image_link ?? '') ? new URI($row->image_link) : null,
104  $row->alt_text ?? ''
105  );
106  }
The scope of this class is split ilias-conform URI's into components.
Definition: URI.php:34

◆ getCosts()

ilMDCopyrightSelectionEntry::getCosts ( )

Definition at line 321 of file class.ilMDCopyrightSelectionEntry.php.

References $costs.

Referenced by add(), and update().

321  : bool
322  {
323  return $this->costs;
324  }
+ Here is the caller graph for this function:

◆ getDefault()

static ilMDCopyrightSelectionEntry::getDefault ( )
static

Definition at line 249 of file class.ilMDCopyrightSelectionEntry.php.

References $DIC, $query, $res, ilDBInterface\fetchAssoc(), ilDBInterface\query(), and ilDBInterface\quote().

Referenced by ilMDUtils\_getDefaultCopyright(), ilContainer\filterObjIdsByCopyright(), and ilMDEditorGUI\listQuickEditCopyright().

249  : int
250  {
251  global $DIC;
252 
253  $db = $DIC->database();
254 
255  $query = "SELECT entry_id FROM il_md_cpr_selections " .
256  "WHERE is_default = " . $db->quote(1, 'integer');
257 
258  $res = $db->query($query);
259  $row = $db->fetchAssoc($res);
260 
261  return (int) $row['entry_id'];
262  }
$res
Definition: ltiservices.php:69
fetchAssoc(ilDBStatement $statement)
quote($value, string $type)
global $DIC
Definition: feed.php:28
query(string $query)
Run a (read-only) Query on the database.
$query
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getDescription()

ilMDCopyrightSelectionEntry::getDescription ( )

Definition at line 279 of file class.ilMDCopyrightSelectionEntry.php.

References $description.

Referenced by add(), and update().

279  : string
280  {
281  return $this->description;
282  }
+ Here is the caller graph for this function:

◆ getEntryId()

ilMDCopyrightSelectionEntry::getEntryId ( )

Definition at line 219 of file class.ilMDCopyrightSelectionEntry.php.

References $entry_id.

Referenced by delete(), read(), and update().

219  : int
220  {
221  return $this->entry_id;
222  }
+ Here is the caller graph for this function:

◆ getIsDefault()

ilMDCopyrightSelectionEntry::getIsDefault ( )

Get if the entry is default No setter for this.

Definition at line 228 of file class.ilMDCopyrightSelectionEntry.php.

References $query, and $res.

228  : bool
229  {
230  $query = "SELECT is_default FROM il_md_cpr_selections " .
231  "WHERE entry_id = " . $this->db->quote($this->entry_id, 'integer');
232 
233  $res = $this->db->query($query);
234  $row = $this->db->fetchAssoc($res);
235 
236  return (bool) ($row['is_default'] ?? false);
237  }
$res
Definition: ltiservices.php:69
$query

◆ getLanguage()

ilMDCopyrightSelectionEntry::getLanguage ( )

Definition at line 331 of file class.ilMDCopyrightSelectionEntry.php.

References $language.

Referenced by add(), and update().

331  : string
332  {
333  return $this->language;
334  }
+ Here is the caller graph for this function:

◆ getNextOrderPosition()

ilMDCopyrightSelectionEntry::getNextOrderPosition ( )
protected

Definition at line 356 of file class.ilMDCopyrightSelectionEntry.php.

References $query, and $res.

Referenced by add().

356  : int
357  {
358  $query = "SELECT count(entry_id) total FROM il_md_cpr_selections";
359  $res = $this->db->query($query);
360  $row = $this->db->fetchAssoc($res);
361 
362  return $row['total'] + 1;
363  }
$res
Definition: ltiservices.php:69
$query
+ Here is the caller graph for this function:

◆ getOrderPosition()

ilMDCopyrightSelectionEntry::getOrderPosition ( )

Definition at line 351 of file class.ilMDCopyrightSelectionEntry.php.

References $order_position.

Referenced by update().

351  : int
352  {
353  return $this->order_position;
354  }
+ Here is the caller graph for this function:

◆ getOutdated()

ilMDCopyrightSelectionEntry::getOutdated ( )

Definition at line 244 of file class.ilMDCopyrightSelectionEntry.php.

References $outdated.

Referenced by update().

244  : bool
245  {
246  return $this->outdated;
247  }
+ Here is the caller graph for this function:

◆ getTitle()

ilMDCopyrightSelectionEntry::getTitle ( )

Definition at line 269 of file class.ilMDCopyrightSelectionEntry.php.

References $title.

Referenced by add(), ilObjMDSettingsGUI\confirmDeleteEntries(), update(), and validate().

269  : string
270  {
271  return $this->title;
272  }
+ Here is the caller graph for this function:

◆ getUsage()

ilMDCopyrightSelectionEntry::getUsage ( )

Definition at line 214 of file class.ilMDCopyrightSelectionEntry.php.

References $usage.

214  : int
215  {
216  return $this->usage;
217  }

◆ isEntry()

static ilMDCopyrightSelectionEntry::isEntry (   $a_cp_string)
static

Definition at line 206 of file class.ilMDCopyrightSelectionEntry.php.

Referenced by ilMDUtils\_parseCopyright().

206  : bool
207  {
208  if (!preg_match('/il_copyright_entry__([0-9]+)__([0-9]+)/', $a_cp_string)) {
209  return false;
210  }
211  return true;
212  }
+ Here is the caller graph for this function:

◆ lookupCopyrightFromImport()

static ilMDCopyrightSelectionEntry::lookupCopyrightFromImport ( string  $copyright_text)
static

Definition at line 159 of file class.ilMDCopyrightSelectionEntry.php.

References $data, $DIC, $entry_id, $query, $res, ilDBInterface\fetchObject(), ILIAS\Repository\int(), and ilDBInterface\query().

Referenced by ilMDRights\parseDescriptionFromImport().

159  : int
160  {
161  global $DIC;
162 
163  $db = $DIC->database();
164 
165  // url should be made to match regardless of scheme
166  $normalized_copyright = str_replace('https://', 'http://', $copyright_text);
167  $matches_by_name = null;
168 
169  $query = 'SELECT entry_id, full_name, link, image_link, alt_text FROM il_md_cpr_selections';
170  $res = $db->query($query);
171  while ($row = $db->fetchObject($res)) {
172  $entry_id = (int) $row->entry_id;
173  $data = self::getCopyrightDataFromRow($row);
174 
175  $entry_link = (string) $data->link();
176  $normalized_link = str_replace('https://', 'http://', $entry_link);
177  if ($normalized_link !== '' && str_contains($normalized_copyright, $normalized_link)) {
178  return $entry_id;
179  }
180 
181  if (
182  is_null($matches_by_name) &&
183  trim($copyright_text) === trim($data->fullName())
184  ) {
185  $matches_by_name = $entry_id;
186  }
187  }
188 
189  if (!is_null($matches_by_name)) {
190  return $matches_by_name;
191  }
192  return 0;
193  }
$res
Definition: ltiservices.php:69
global $DIC
Definition: feed.php:28
fetchObject(ilDBStatement $query_result)
query(string $query)
Run a (read-only) Query on the database.
$query
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ lookupCopyyrightTitle()

static ilMDCopyrightSelectionEntry::lookupCopyyrightTitle ( string  $a_cp_string)
static

Definition at line 81 of file class.ilMDCopyrightSelectionEntry.php.

References $DIC, $ilDB, $query, $res, and ilDBConstants\T_INTEGER.

81  : string
82  {
83  global $DIC;
84 
85  $ilDB = $DIC->database();
86 
87  if (!$entry_id = self::_extractEntryId($a_cp_string)) {
88  return $a_cp_string;
89  }
90 
91  $query = "SELECT title FROM il_md_cpr_selections " .
92  "WHERE entry_id = " . $ilDB->quote($entry_id, ilDBConstants::T_INTEGER) . " ";
93  $res = $ilDB->query($query);
94  $row = $ilDB->fetchObject($res);
95  return $row->title ?? '';
96  }
$res
Definition: ltiservices.php:69
global $DIC
Definition: feed.php:28
$query

◆ read()

ilMDCopyrightSelectionEntry::read ( )
private

Definition at line 418 of file class.ilMDCopyrightSelectionEntry.php.

References $data, $query, $res, getEntryId(), IL_INST_ID, ILIAS\Repository\int(), setCopyright(), setCopyrightAndOtherRestrictions(), setCopyrightData(), setCosts(), setDescription(), setLanguage(), setOrderPosition(), setOutdated(), and setTitle().

Referenced by __construct().

418  : void
419  {
420  $query = "SELECT * FROM il_md_cpr_selections " .
421  "WHERE entry_id = " . $this->db->quote($this->entry_id, 'integer') . " " .
422  "ORDER BY is_default DESC, position ASC ";
423 
424  $res = $this->db->query($query);
425  while ($row = $this->db->fetchObject($res)) {
426  $this->setTitle($row->title ?? '');
427  $this->setDescription($row->description ?? '');
428 
429  $data = self::getCopyrightDataFromRow($row);
430  $this->setCopyrightData(
431  $data->fullName(),
432  $data->link(),
433  $data->imageLink(),
434  $data->altText()
435  );
436  $this->setCopyright(self::renderCopyrightFromRow($row));
437 
438  $this->setLanguage($row->language);
439  $this->setCosts((bool) $row->costs);
440  $this->setOutdated((bool) $row->outdated);
441  $this->setOrderPosition((int) $row->position);
442  // Fixed
444  }
445 
446  $query = "SELECT count(meta_rights_id) used FROM il_meta_rights " .
447  "WHERE description = " . $this->db->quote(
448  'il_copyright_entry__' . IL_INST_ID . '__' . $this->getEntryId(),
449  'text'
450  );
451 
452  $res = $this->db->query($query);
453  $row = $this->db->fetchObject($res);
454  $this->usage = (int) ($row->used ?? 0);
455  }
$res
Definition: ltiservices.php:69
const IL_INST_ID
Definition: constants.php:40
setCopyrightData(string $full_name, ?URI $link, ?URI $image_link, string $alt_text)
$query
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderCopyrightFromRow()

static ilMDCopyrightSelectionEntry::renderCopyrightFromRow ( stdClass  $row)
staticprotected

Definition at line 108 of file class.ilMDCopyrightSelectionEntry.php.

References $data, and $DIC.

108  : string
109  {
110  global $DIC;
111 
112  $renderer = new Renderer(
113  $DIC->ui()->factory()
114  );
115  $ui_renderer = $DIC->ui()->renderer();
116 
117  $data = self::getCopyrightDataFromRow($row);
118  return $ui_renderer->render($renderer->toUIComponents($data));
119  }
global $DIC
Definition: feed.php:28

◆ setCopyright()

ilMDCopyrightSelectionEntry::setCopyright ( string  $a_copyright)

Definition at line 306 of file class.ilMDCopyrightSelectionEntry.php.

Referenced by read().

306  : void
307  {
308  $this->copyright = $a_copyright;
309  }
+ Here is the caller graph for this function:

◆ setCopyrightAndOtherRestrictions()

ilMDCopyrightSelectionEntry::setCopyrightAndOtherRestrictions ( bool  $a_status)

Definition at line 336 of file class.ilMDCopyrightSelectionEntry.php.

Referenced by read().

336  : void
337  {
338  $this->copyright_and_other_restrictions = $a_status;
339  }
+ Here is the caller graph for this function:

◆ setCopyrightData()

ilMDCopyrightSelectionEntry::setCopyrightData ( string  $full_name,
?URI  $link,
?URI  $image_link,
string  $alt_text 
)

Definition at line 292 of file class.ilMDCopyrightSelectionEntry.php.

Referenced by read().

297  : void {
298  $this->copyright_data = new CopyrightData(
299  $full_name,
300  $link,
301  $image_link,
302  $alt_text
303  );
304  }
+ Here is the caller graph for this function:

◆ setCosts()

ilMDCopyrightSelectionEntry::setCosts ( bool  $a_costs)

Definition at line 316 of file class.ilMDCopyrightSelectionEntry.php.

Referenced by read().

316  : void
317  {
318  $this->costs = $a_costs;
319  }
+ Here is the caller graph for this function:

◆ setDescription()

ilMDCopyrightSelectionEntry::setDescription ( string  $a_desc)

Definition at line 274 of file class.ilMDCopyrightSelectionEntry.php.

Referenced by read().

274  : void
275  {
276  $this->description = $a_desc;
277  }
+ Here is the caller graph for this function:

◆ setLanguage()

ilMDCopyrightSelectionEntry::setLanguage ( string  $a_lang_key)

Definition at line 326 of file class.ilMDCopyrightSelectionEntry.php.

References ILIAS\UI\examples\Symbol\Glyph\Language\language().

Referenced by read().

326  : void
327  {
328  $this->language = $a_lang_key;
329  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setOrderPosition()

ilMDCopyrightSelectionEntry::setOrderPosition ( int  $a_position)

Definition at line 346 of file class.ilMDCopyrightSelectionEntry.php.

Referenced by read().

346  : void
347  {
348  $this->order_position = $a_position;
349  }
+ Here is the caller graph for this function:

◆ setOutdated()

ilMDCopyrightSelectionEntry::setOutdated ( bool  $a_value)

Definition at line 239 of file class.ilMDCopyrightSelectionEntry.php.

Referenced by read().

239  : void
240  {
241  $this->outdated = $a_value;
242  }
+ Here is the caller graph for this function:

◆ setTitle()

ilMDCopyrightSelectionEntry::setTitle ( string  $a_title)

Definition at line 264 of file class.ilMDCopyrightSelectionEntry.php.

Referenced by read().

264  : void
265  {
266  $this->title = $a_title;
267  }
+ Here is the caller graph for this function:

◆ update()

ilMDCopyrightSelectionEntry::update ( )

Definition at line 386 of file class.ilMDCopyrightSelectionEntry.php.

References getCopyrightAndOtherRestrictions(), getCopyrightData(), getCosts(), getDescription(), getEntryId(), getLanguage(), getOrderPosition(), getOutdated(), and getTitle().

386  : bool
387  {
388  $this->db->update('il_md_cpr_selections', array(
389  'title' => array('text', $this->getTitle()),
390  'description' => array('clob', $this->getDescription()),
391  'full_name' => array('clob', $this->getCopyrightData()->fullName()),
392  'link' => array('clob', (string) $this->getCopyrightData()->link()),
393  'image_link' => array('clob', (string) $this->getCopyrightData()->imageLink()),
394  'alt_text' => array('clob', $this->getCopyrightData()->altText()),
395  'language' => array('text', $this->getLanguage()),
396  'costs' => array('integer', $this->getCosts()),
397  'cpr_restrictions' => array('integer', $this->getCopyrightAndOtherRestrictions()),
398  'outdated' => array('integer', $this->getOutdated()),
399  'position' => array('integer', $this->getOrderPosition())
400  ), array(
401  'entry_id' => array('integer', $this->getEntryId())
402  ));
403  return true;
404  }
+ Here is the call graph for this function:

◆ validate()

ilMDCopyrightSelectionEntry::validate ( )

Definition at line 413 of file class.ilMDCopyrightSelectionEntry.php.

References getTitle().

413  : bool
414  {
415  return $this->getTitle() !== '';
416  }
+ Here is the call graph for this function:

Field Documentation

◆ $copyright

string ilMDCopyrightSelectionEntry::$copyright = ''
private

Definition at line 40 of file class.ilMDCopyrightSelectionEntry.php.

Referenced by getCopyright().

◆ $copyright_and_other_restrictions

bool ilMDCopyrightSelectionEntry::$copyright_and_other_restrictions = true
private

◆ $copyright_data

CopyrightDataInterface ilMDCopyrightSelectionEntry::$copyright_data
protected

Definition at line 50 of file class.ilMDCopyrightSelectionEntry.php.

Referenced by getCopyrightData().

◆ $costs

bool ilMDCopyrightSelectionEntry::$costs = false
private

Definition at line 41 of file class.ilMDCopyrightSelectionEntry.php.

Referenced by getCosts().

◆ $db

ilDBInterface ilMDCopyrightSelectionEntry::$db
protected

Definition at line 35 of file class.ilMDCopyrightSelectionEntry.php.

◆ $description

string ilMDCopyrightSelectionEntry::$description = ''
private

Definition at line 39 of file class.ilMDCopyrightSelectionEntry.php.

Referenced by getDescription().

◆ $entry_id

int ilMDCopyrightSelectionEntry::$entry_id
private

Definition at line 37 of file class.ilMDCopyrightSelectionEntry.php.

Referenced by getEntryId(), and lookupCopyrightFromImport().

◆ $language

string ilMDCopyrightSelectionEntry::$language = ''
private

Definition at line 42 of file class.ilMDCopyrightSelectionEntry.php.

Referenced by getLanguage().

◆ $logger

ilLogger ilMDCopyrightSelectionEntry::$logger
protected

Definition at line 34 of file class.ilMDCopyrightSelectionEntry.php.

◆ $order_position

int ilMDCopyrightSelectionEntry::$order_position = 0
protected

Definition at line 48 of file class.ilMDCopyrightSelectionEntry.php.

Referenced by getOrderPosition().

◆ $outdated

bool ilMDCopyrightSelectionEntry::$outdated = false
protected

Definition at line 46 of file class.ilMDCopyrightSelectionEntry.php.

Referenced by getOutdated().

◆ $title

string ilMDCopyrightSelectionEntry::$title = ''
private

Definition at line 38 of file class.ilMDCopyrightSelectionEntry.php.

Referenced by getTitle().

◆ $usage

int ilMDCopyrightSelectionEntry::$usage = 0
private

Definition at line 44 of file class.ilMDCopyrightSelectionEntry.php.

Referenced by getUsage().


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