-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
22 changed files
with
440 additions
and
320 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
<?php | ||
/** | ||
* @file | ||
* Class for private messages. | ||
*/ | ||
|
||
/** | ||
* Defines the private messages class. | ||
*/ | ||
class PrivatemsgMessage extends Entity { | ||
|
||
/** | ||
* The message ID. | ||
* | ||
* @var integer | ||
*/ | ||
public $mid; | ||
|
||
/** | ||
* The message type (bundle). | ||
* | ||
* @var string | ||
*/ | ||
public $type; | ||
|
||
|
||
/** | ||
* The uid of the user who is associated with the private message. | ||
* | ||
* @var integer | ||
*/ | ||
public $author; | ||
|
||
/** | ||
* The message subject. | ||
* | ||
* @var string | ||
*/ | ||
public $subject; | ||
|
||
/** | ||
* Constructor for private message entities. | ||
*/ | ||
public function __construct(array $values = array()) { | ||
parent::__construct($values); | ||
} | ||
|
||
/** | ||
* Implements EntityInterface::id(). | ||
*/ | ||
public function id() { | ||
return isset($this->mid) ? $this->mid : NULL; | ||
} | ||
|
||
/** | ||
* Implements EntityInterface::entityType(). | ||
*/ | ||
public function entityType() { | ||
return 'privatemsg_message'; | ||
} | ||
|
||
/** | ||
* Implements EntityInterface::bundle(). | ||
*/ | ||
public function bundle() { | ||
return $this->entityType(); | ||
} | ||
|
||
/** | ||
* Implements EntityInterface::label(). | ||
*/ | ||
public function label() { | ||
return $this->subject; | ||
} | ||
|
||
/** | ||
* Implements EntityInterface::uri(). | ||
*/ | ||
public function uri() { | ||
return array( | ||
'path' => 'messages/view/' . $this->mid, | ||
'options' => array(), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.