本文整理匯總了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;
}