Gentics Portal.Node PHP API
 All Classes Namespaces Functions Variables Pages
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
ApalinesMM Class Reference
Inheritance diagram for ApalinesMM:
APAActiveRecord

Public Member Functions

 tableName ()
 rules ()
 relations ()
 attributeLabels ()
 search ()
 deleteFiles ()
 beforeDelete ()

Static Public Member Functions

static model ($className=__CLASS__)

Public Attributes

const IMAGE = 0
const VIDEO = 1

Additional Inherited Members

- Protected Member Functions inherited from APAActiveRecord
 beforeSave ()

Detailed Description

Definition at line 25 of file ApalinesMM.php.

Member Function Documentation

ApalinesMM::attributeLabels ( )
Returns
array customized attribute labels (name=>label)

Definition at line 81 of file ApalinesMM.php.

{
return array(
'id' => 'ID',
'title' => 'Title',
'ndate' => 'Ndate',
'channel' => 'Channel',
'docid' => 'Docid',
'related_maindoc_id' => 'Related Maindoc',
'place' => 'Place',
'source' => 'Source',
'filename' => 'Filename',
'author' => 'Author',
'keywords' => 'Keywords',
'xml_filename' => 'Xml Filename',
'deleted' => 'Deleted',
'created' => 'Created',
'updated' => 'Updated',
'type' => 'Type',
'apa_id' => 'APA id'
);
}
ApalinesMM::beforeDelete ( )

Function removes files before record is deleted

Reimplemented from APAActiveRecord.

Definition at line 150 of file ApalinesMM.php.

References deleteFiles().

{
$this->deleteFiles();
}
ApalinesMM::deleteFiles ( )

Function removes multimedia records and files

Definition at line 140 of file ApalinesMM.php.

Referenced by beforeDelete().

{
if (isset($this->files)) {
foreach ($this->files as $file) {
$file->delete();
}
}
}
static ApalinesMM::model (   $className = __CLASS__)
static

Returns the static model of the specified AR class.

Parameters
string$classNameactive record class name.
Returns
ApalinesMM the static model class

Definition at line 35 of file ApalinesMM.php.

Referenced by Channel\checkMMParents(), Channel\makeRelations(), Channel\processBild(), and Channel\processRemoval().

{
return parent::model($className);
}
ApalinesMM::relations ( )
Returns
array relational rules.

Definition at line 69 of file ApalinesMM.php.

{
// NOTE: you may need to adjust the relation name and the related
// class name for the relations automatically generated below.
return array(
'files'=>array(self::HAS_MANY, 'ApalinesFile', 'parent_id'),
);
}
ApalinesMM::rules ( )
Returns
array validation rules for model attributes.

Definition at line 51 of file ApalinesMM.php.

{
// NOTE: you should only define rules for those attributes that
// will receive user inputs.
return array(
array('ndate, related_maindoc_id, deleted, created, updated, type', 'numerical', 'integerOnly'=>true),
array('title, channel, docid, place, source, author, xml_filename, apa_id', 'length', 'max'=>255),
array('filename', 'length', 'max'=>64),
array('keywords', 'safe'),
// The following rule is used by search().
// Please remove those attributes that should not be searched.
array('id, title, ndate, channel, docid, related_maindoc_id, place, source, filename, author, keywords, xml_filename, deleted, created, updated, type', 'safe', 'on'=>'search'),
);
}
ApalinesMM::search ( )

Retrieves a list of models based on the current search/filter conditions.

Returns
CActiveDataProvider the data provider that can return the models based on the search/filter conditions.

Definition at line 108 of file ApalinesMM.php.

{
// Warning: Please modify the following code to remove attributes that
// should not be searched.
$criteria=new CDbCriteria;
$criteria->compare('id',$this->id);
$criteria->compare('title',$this->title,true);
$criteria->compare('ndate',$this->ndate);
$criteria->compare('channel',$this->channel,true);
$criteria->compare('docid',$this->docid,true);
$criteria->compare('related_maindoc_id',$this->related_maindoc_id);
$criteria->compare('place',$this->place,true);
$criteria->compare('source',$this->source,true);
$criteria->compare('filename',$this->filename,true);
$criteria->compare('author',$this->author,true);
$criteria->compare('keywords',$this->keywords,true);
$criteria->compare('xml_filename',$this->xml_filename,true);
$criteria->compare('deleted',$this->deleted);
$criteria->compare('created',$this->created);
$criteria->compare('updated',$this->updated);
$criteria->compare('type',$this->type);
$criteria->compare('apa_id',$this->apa_id, true);
return new CActiveDataProvider($this, array(
'criteria'=>$criteria,
));
}
ApalinesMM::tableName ( )
Returns
string the associated database table name

Definition at line 43 of file ApalinesMM.php.

{
return 'gportal_apalines_mm';
}

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