本文整理汇总了PHP中Type::add方法的典型用法代码示例。如果您正苦于以下问题:PHP Type::add方法的具体用法?PHP Type::add怎么用?PHP Type::add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Type
的用法示例。
在下文中一共展示了Type::add方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: admin_add_type
public function admin_add_type()
{
if (!Visitor::current()->group->can("add_type")) {
show_403(__("Access Denied"), __("You do not have sufficient privileges to add types.", "extend"));
}
Type::add($_POST['name'], $_POST['description'], $_POST['color']);
Flash::notice(__("Type added.", "extend"), "/admin/?action=manage_types");
}
示例2: call
public static function call()
{
$task = $_POST['task'];
if ($task == 'getContent' && isset($_POST['title'])) {
include_once 'Content.php';
Content::getFromTitle();
} else {
if ($task == 'getContent') {
include_once 'Content.php';
Content::get();
} else {
if ($task == 'addContent') {
include_once 'Content.php';
Content::add();
} else {
if ($task == 'editContent') {
include_once 'Content.php';
Content::edit();
} else {
if ($task == 'deleteContent') {
include_once 'Content.php';
Content::remove();
} else {
if ($task == 'getType') {
include_once 'Type.php';
Type::get();
} else {
if ($task == 'addType') {
include_once 'Type.php';
Type::add();
} else {
if ($task == 'editType') {
include_once 'Type.php';
Type::edit();
} else {
if ($task == 'deleteType') {
include_once 'Type.php';
Type::remove();
} else {
if ($task == 'getContentOnUser') {
include_once 'ContentOnUser.php';
ContentOnUser::get();
} else {
if ($task == 'addContentToUser') {
include_once 'ContentOnUser.php';
ContentOnUser::add();
} else {
if ($task == 'editContentOnUser') {
include_once 'ContentOnUser.php';
ContentOnUser::edit();
} else {
if ($task == 'removeContentFromUser') {
include_once 'ContentOnUser.php';
ContentOnUser::remove();
} else {
if ($task == 'useContentOnUser') {
include_once 'ContentOnUser.php';
ContentOnUser::useContentOnUser();
} else {
if ($task == 'getUser') {
include_once 'User.php';
User::get();
} else {
echo "Task not recognized.<br>";
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
示例3: actionAdd
public function actionAdd()
{
$model = new Type();
$status = $model->add($_GET);
echo $status;
}