Elgg  Version master
ElggIcon.php
Go to the documentation of this file.
1 <?php
2 
3 use Elgg\Exceptions\LogicException as ElggLogicException;
4 
8 class ElggIcon extends ElggFile {
9 
13  protected function initializeAttributes() {
14  parent::initializeAttributes();
15 
16  $this->attributes['subtype'] = 'icon';
17  }
18 
24  public function save(): bool {
25  throw new ElggLogicException(__CLASS__ . ' instances exist as placeholders and can not be upgraded to entities');
26  }
27 }
Entity icon class.
Definition: ElggIcon.php:8
initializeAttributes()
{Set subtype to 'file'.void}
Definition: ElggIcon.php:13
save()
{Save this data to the appropriate database table.bool}
Definition: ElggIcon.php:24
Exception that represents error in the program logic.