3
* Data class for profile attributes
10
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
11
* @link http://status.net/
13
* Copyright (C) 2010 Bayle Shanks.
15
* This program is free software: you can redistribute it and/or modify
16
* it under the terms of the GNU Affero General Public License as published by
17
* the Free Software Foundation, either version 3 of the License, or
18
* (at your option) any later version.
20
* This program is distributed in the hope that it will be useful,
21
* but WITHOUT ANY WARRANTY; without even the implied warranty of
22
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23
* GNU Affero General Public License for more details.
25
* You should have received a copy of the GNU Affero General Public License
26
* along with this program. If not, see <http://www.gnu.org/licenses/>.
29
if (!defined('STATUSNET')) {
33
class User_attribute_permissions extends Attribute_tables {
34
public $__table = 'user_attribute_permissions'; // table name
36
static function getAllAttributeItems($user_id, $attribute) {
37
return parent::getAllAttributeItems('User_attribute_permissions', $user_id, $attribute);}
40
static function getAllAttributeItemsSorted($user_id, $attribute) {
41
return parent::getAllAttributeItemsSorted('User_attribute_permissions', $user_id, $attribute);}
44
static function newinit($user_id, $attribute, $value, $type) {
45
return parent::newinit('User_attribute_permissions', $user_id, $attribute, $value, $type);
49
static function newInitInsert($user_id, $attribute, $value, $type) {
50
return parent::newInitInsert('User_attribute_permissions', $user_id, $attribute, $value, $type);
54
static function addToAttribute($user_id, $attribute, $value, $type) {
55
return parent::addToAttribute('User_attribute_permissions', $user_id, $attribute, $value, $type);
59
static function deleteAttribute($user_id, $attribute, $value, $type) {
60
return parent::deleteAttribute('User_attribute_permissions', $user_id, $attribute, $value, $type);
63
static function deleteAllAttributeValues($classname, $user_id, $attribute) {
64
parent::deleteAllAttributeValues('User_attribute_permissions', $user_id, $attribute);
67
static function replaceAllAttributeValues($user_id, $attribute, $type, $newValue=null) {
68
return parent::replaceAllAttributeValues('User_attribute_permissions', $user_id, $attribute, $type, $newValue);
71
static function isIn($user_id, $attribute, $type, $value) {
72
return parent::isIn('User_attribute_permissions', $user_id, $attribute, $type, $value);
75
static function getAllUserItems($user_id) {
76
return parent::getAllUserItems('User_attribute_permissions', $user_id);
79
static function getAllUserItemsSorted($user_id)
80
{return parent::getAllUserItemsSorted('User_attribute_permissions', $user_id);}