public function save() { if (!$this->getMailKey()) { $this->setMailKey(Filesystem::readRandomCharacters(20)); } return parent::save(); }
protected function getConfiguration() { return array(self::CONFIG_AUX_PHID => true, self::CONFIG_COLUMN_SCHEMA => array('name' => 'text', 'alias' => 'sort64?', 'longURL' => 'text', 'description' => 'text'), self::CONFIG_KEY_SCHEMA => array('key_instance' => array('columns' => array('alias'), 'unique' => true), 'key_author' => array('columns' => array('authorPHID')))) + parent::getConfiguration(); }