當前位置: 首頁>>代碼示例>>PHP>>正文


PHP FormItem::textarea方法代碼示例

本文整理匯總了PHP中FormItem::textarea方法的典型用法代碼示例。如果您正苦於以下問題:PHP FormItem::textarea方法的具體用法?PHP FormItem::textarea怎麽用?PHP FormItem::textarea使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在FormItem的用法示例。


在下文中一共展示了FormItem::textarea方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1:

<?php

Admin::model('App\\Teachers')->title('Наставники')->display(function () {
    $display = AdminDisplay::table();
    $display->columns([Column::string('name')->label('ФИО'), Column::datetime('created_at')->label('Дата создания'), Column::datetime('updated_at')->label('Дата изменения')]);
    return $display;
})->createAndEdit(function () {
    $form = AdminForm::form();
    $form->items([FormItem::columns()->columns([[FormItem::text('name', 'Название'), FormItem::textarea('desc', 'Описание'), FormItem::ckeditor('desc_detail', 'Подробное описание')], [FormItem::images('images', 'Фотографии')]])]);
    return $form;
});
開發者ID:ArtiResh,項目名稱:DanceStudio54,代碼行數:11,代碼來源:Teachers.php

示例2:

<?php

/**
 * Created by PhpStorm.
 * User: nursultan
 * Date: 3-Jul 15
 * Time: 22:50
 */
Admin::model(\App\Field::class)->title('Fields')->with('infrastructures', 'city', 'category', 'cover')->columns(function () {
    Column::string('name', 'Name');
    Column::string('opens', 'Opens');
    Column::string('closes', 'Closes');
    Column::string('roof', 'Roof');
    Column::string('price', 'Price');
    Column::string('phoneNumber', 'PhoneNumber');
    Column::string('address', 'Address');
    Column::string('description', 'Description');
    Column::string('longitude', 'Longitude');
    Column::string('latitude', 'Latitude');
})->form(function () {
    FormItem::text('name');
    FormItem::time('opens');
    FormItem::time('closes');
    FormItem::checkbox('roof', 'Roof');
    FormItem::textAddon('price')->addon('Сом')->placement('after');
    FormItem::text('phoneNumber');
    FormItem::text('address');
    FormItem::textarea('description');
    FormItem::text('longitude');
    FormItem::text('latitude');
});
開發者ID:nurolopher,項目名稱:findsport,代碼行數:31,代碼來源:Field.php

示例3: use

<?php

/**
 * @var \SleepingOwl\Admin\Model\ModelConfiguration
 */
$model = Admin::model(\App\Slide::class);
$model->title('Слайды');
$model->display(function () {
    $display = AdminDisplay::datatables();
    $display->with('page');
    $display->columns([Column::image('image')->label('Картинка')->orderable(false), Column::string('title')->label('Заголовок')->orderable(false), Column::string('description')->label('Описание')->orderable(false), Column::string('page.title')->label('Страница')->append(Column::filter('id')->model(\App\Page::class)->field('page_id'))->orderable(false), Column::order()->orderable(false)]);
    $display->apply(function ($query) {
        $query->orderBy('sort', 'asc');
    });
    return $display;
});
$model->createAndEdit(function ($id) use($model) {
    $model->title($id ? 'Редактировать слайд' : 'Создать слайд');
    $form = AdminForm::form();
    $form->items([FormItem::columns()->columns([[FormItem::text('title', 'Заголовок')->required(), FormItem::select('page_id', 'Страница')->model(\App\Page::class)->display('title')->required(), FormItem::textarea('description', 'Описание')->rows(4)], [FormItem::image('image', 'Картинка')->required(true)]])]);
    return $form;
});
開發者ID:stcoder,項目名稱:uf-vova,代碼行數:22,代碼來源:Slide.php

示例4:

<?php

Admin::model('App\\Events')->title('События')->display(function () {
    $display = AdminDisplay::table();
    $display->columns([Column::string('name')->label('Название'), Column::datetime('event_date')->label('Дата события'), Column::datetime('created_at')->label('Дата создания'), Column::datetime('updated_at')->label('Дата изменения')]);
    return $display;
})->createAndEdit(function () {
    $form = AdminForm::form();
    $form->items([FormItem::columns()->columns([[FormItem::text('name', 'Название'), FormItem::date('event_date', 'Дата события')]]), FormItem::columns()->columns([[FormItem::textarea('desc', 'Описание для главной')], [FormItem::ckeditor('desc_full', 'Подробное описание')]]), FormItem::columns()->columns([[FormItem::images('images', 'Фотографии для главной')]])]);
    return $form;
});
開發者ID:ArtiResh,項目名稱:DanceStudio54,代碼行數:11,代碼來源:Events.php

示例5:

<?php

Admin::model(App\ColorOrden::class)->title('Orden de colores')->with()->filters(function () {
})->columns(function () {
    Column::string('id', 'Id');
    Column::string('codigo', 'Codigo');
})->form(function () {
    FormItem::text('id', 'Id')->attributes(["readonly" => "readonly"]);
    FormItem::text('codigo', 'Codigo');
    FormItem::textarea('ordenes', 'Ordenes');
});
開發者ID:ateszki,項目名稱:nh,代碼行數:11,代碼來源:ColorOrden.php

示例6:

<?php

\Admin::model('App\\Product')->title('Products')->alias('products')->display(function () {
    $display = AdminDisplay::datatablesAsync();
    $display->columns([Column::checkbox(), Column::string('id')->label('#'), Column::string('title')->label('Загаловок'), Column::string('active_status')->label('Статус'), Column::string('publish')->label('Опубликован')]);
    return $display;
})->createAndEdit(function () {
    $form = AdminForm::tabbed();
    $form->items(['Main' => [FormItem::columns()->columns([[FormItem::text('title', 'Загаловок')->required()->unique(), FormItem::textarea('description', 'Описание')->required(), FormItem::timestamp('publish', 'Дата и время публикации')->defaultValue(Carbon\Carbon::now()), FormItem::icheckbox('active', 'Статус')->defaultValue(true), FormItem::text('rest', 'Остаток'), FormItem::text('price', 'Цена')], [FormItem::text('sort', 'сортировка'), FormItem::bsselect('user_id', 'Пользователь')->model('App\\User')->defaultValue(Sentinel::check()->id)->display('email'), FormItem::bsselect('catalog_id', 'Категоря')->model('App\\Catalog')->display('level_label')->disableSort()->required()]])], 'content' => [FormItem::markdown('content', 'Контент')], 'images' => [FormItem::images('gallery', 'Картинки')], 'files' => [FormItem::view('suroviy.soa_addon::admin.elfinder')]]);
    return $form;
});
開發者ID:larabox,項目名稱:larabox,代碼行數:11,代碼來源:Product.php

示例7: view

<?php

Admin::model('App\\Form')->title('Form Items')->display(function () {
    $display = AdminDisplay::table();
    $display->columns([Column::string('id')->label('ID'), Column::string('title')->label('String'), Column::datetime('created_at')->label('Created At')->format('d.m.Y H:i:s')]);
    return $display;
})->createAndEdit(function () {
    $form = AdminForm::form();
    $form->items([FormItem::columns()->columns([[FormItem::text('title', 'FormItem::text')->defaultValue('default value')->required(), FormItem::textaddon('textaddon', 'FormItem::textaddon')->addon('$')->placement('after'), FormItem::checkbox('checkbox', 'FormItem::checkbox'), FormItem::date('date', 'FormItem::date')->format('d.m.Y'), FormItem::time('time', 'FormItem::time')->format('H:i:s')->seconds(true), FormItem::timestamp('timestamp', 'FormItem::timestamp')->format('d.m.Y g:i A')], [FormItem::select('select', 'FormItem::select')->options([1 => 'First', 2 => 'Second', 3 => 'Third'])->nullable(), FormItem::custom()->display(function ($instance) {
        return view('custom_form_item', compact('instance'));
    })->callback(function ($instance) {
        $instance->custom = \Carbon\Carbon::now();
    })], [FormItem::image('image', 'FormItem::image'), FormItem::images('images', 'FormItem::images')]]), FormItem::columns()->columns([[FormItem::textarea('textarea', 'FormItem::textarea')], [FormItem::ckeditor('ckeditor', 'FormItem::ckeditor')]])]);
    return $form;
});
開發者ID:ntamvl,項目名稱:admin-3-demo,代碼行數:15,代碼來源:Form.php

示例8: base_path

<?php

\Admin::model('App\\LandingBlocks')->title('Landing blocks')->alias('landing-blocks')->display(function () {
    $display = AdminDisplay::table();
    $display->apply(function ($query) {
        $query->orderBy('order', 'ASC');
    });
    $display->columns([Column::checkbox(), Column::string('id')->label('#'), Column::string('label')->label('Загаловок'), Column::order()]);
    return $display;
})->edit(function ($id) {
    $form = AdminForm::tabbed();
    $fields = [];
    $fields['Main'] = [FormItem::columns()->columns([[FormItem::text('label', 'Загаловок')->required()->unique(), FormItem::textarea('description', 'Описание'), FormItem::text('class', 'Класс'), FormItem::icheckbox('active', 'Статус')->defaultValue(true)], [FormItem::text('name', 'Имя блока')->required(), FormItem::text('landing_id', 'Landing')]])];
    $model = App\LandingBlocks::find($id);
    if ($model) {
        $path = base_path('App' . DIRECTORY_SEPARATOR . 'AdminLanding' . DIRECTORY_SEPARATOR . str_replace('.', DIRECTORY_SEPARATOR, $model->name) . '.php');
        if (is_file($path)) {
            $fields2 = (require_once $path);
            $fields = array_merge($fields, $fields2);
        }
    }
    $form->items($fields);
    return $form;
})->create(function ($id) {
    $form = AdminForm::tabbed();
    $fields = [];
    $fields['Main'] = [FormItem::columns()->columns([[FormItem::text('label', 'Загаловок')->required()->unique(), FormItem::textarea('description', 'Описание')->required(), FormItem::text('class', 'Класс'), FormItem::icheckbox('active', 'Статус')->defaultValue(true)], [FormItem::text('name', 'Имя блока')->required(), FormItem::text('landing_id', 'Landing')]])];
    $form->items($fields);
    return $form;
});
開發者ID:larabox,項目名稱:larabox,代碼行數:30,代碼來源:LandingBlocks.php

示例9: use

<?php

/**
 * @var \SleepingOwl\Admin\Model\ModelConfiguration
 */
$model = Admin::model(\App\Page::class);
$model->title('Страницы');
$model->display(function () {
    $display = AdminDisplay::datatables();
    $display->filters([Filter::field('id')->title(function ($value) {
        return 'Выбрана страница с идентификатором: ' . $value;
    })]);
    $display->columns([Column::string('title')->label('Заголовок'), Column::published('published')->label('Опубликован')->orderable(false), Column::datetime('created_at')->label('Создан')->format('d.m.Y в H:i')]);
    $display->columnFilters([null, ColumnFilter::select()->options(['нет' => 'Нет', 'да' => 'Да'])->filter_field('published')]);
    return $display;
})->createAndEdit(function ($id) use($model) {
    $model->title($id ? 'Редактировать страницу' : 'Создать страницу');
    $form = AdminForm::tabbed();
    $form->items(['Основное' => [FormItem::text('title', 'Заголовок')->required(), FormItem::checkbox('published', 'Опубликовать'), FormItem::ckeditor('content', 'Содержимое')], 'Мета данные' => [FormItem::textarea('meta_keywords', 'Ключевые слова')->rows(2), FormItem::textarea('meta_description', 'Описание страницы')->rows(4), FormItem::textarea('meta_others', 'Другая мета информация')->rows(7)]]);
    return $form;
});
開發者ID:stcoder,項目名稱:uf-vova,代碼行數:21,代碼來源:Page.php

示例10:

<?php

Admin::model(\App\Noticia::class)->title('Noticias')->with()->filters(function () {
})->columns(function () {
    Column::string('titulo', 'Titulo');
    Column::string('habilitado', 'Habilitado');
    Column::string('orden', 'Orden');
})->form(function () {
    FormItem::text('titulo', 'Titulo');
    FormItem::textarea('bajada', 'Bajada');
    FormItem::ckeditor('texto', 'Texto');
    FormItem::checkbox('habilitado', 'Habilitado');
    FormItem::select('orden', 'Orden')->enum([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])->nullable();
    FormItem::CustomImagenNoticia();
});
開發者ID:ateszki,項目名稱:caesoweb,代碼行數:15,代碼來源:Noticia.php

示例11:

<?php

\Admin::model('App\\Post')->title('Posts')->alias('posts')->display(function () {
    $display = AdminDisplay::table();
    $display->columns([Column::checkbox(), Column::string('id')->label('#'), Column::string('title')->label('Загаловок'), Column::string('active_status')->label('Статус'), Column::string('publish')->label('Опубликован')]);
    return $display;
})->createAndEdit(function () {
    $form = AdminForm::tabbed();
    $form->items(['Main' => [FormItem::columns()->columns([[FormItem::text('title', 'Загаловок')->required()->unique(), FormItem::textarea('description', 'Описание')->required(), FormItem::timestamp('publish', 'Дата и время публикации')->defaultValue(Carbon\Carbon::now()), FormItem::icheckbox('active', 'Статус')->defaultValue(true)], [FormItem::text('alias', 'Алиас')->unique(), FormItem::bsselect('user_id', 'Пользователь')->model('App\\User')->defaultValue(Sentinel::check()->id)->display('email'), FormItem::bsselect('category_id', 'Категоря')->model('App\\Category')->display('level_label')->disableSort()->required(), FormItem::image('image', 'Картинка')]])], 'content' => [FormItem::markdown('content', 'Контент')]]);
    return $form;
});
開發者ID:larabox,項目名稱:larabox,代碼行數:11,代碼來源:Post.php

示例12:

<?php

Admin::model(App\Accesorio::class)->title('Accesorios')->with()->filters(function () {
})->columns(function () {
    Column::string('codigo', 'Código');
    Column::string('nombre', 'Nombre');
    Column::string('categoria', 'Categoría');
    Column::string('tipo', 'Tipo');
})->form(function () {
    FormItem::text('codigo', 'Código');
    FormItem::text('nombre', 'Nombre');
    FormItem::textarea('descripcion', 'Descripcion');
    FormItem::CustomAccesorioCategoria();
    FormItem::CustomAccesorioTipo();
});
開發者ID:ateszki,項目名稱:nh,代碼行數:15,代碼來源:Accesorio.php

示例13: base_path

<?php

\Admin::model('App\\Landing')->title('Landing')->alias('landing')->display(function () {
    $display = AdminDisplay::table();
    $display->with('blocks');
    $display->columns([Column::checkbox(), Column::string('id')->label('#'), Column::string('title')->label('Загаловок'), Column::string('active_status')->label('Статус'), Column::custom()->label('Блоки')->callback(function ($instance) {
        return '<a href="/admin/landing-blocks?landing_id=' . $instance->id . '">Редактировать</a>';
    })]);
    return $display;
})->edit(function ($id) {
    $form = AdminForm::tabbed();
    $fields = [];
    $fields['Main'] = [FormItem::columns()->columns([[FormItem::text('title', 'Загаловок')->required()->unique(), FormItem::textarea('description', 'Описание')->required(), FormItem::timestamp('publish', 'Дата и время публикации')->defaultValue(Carbon\Carbon::now()), FormItem::timestamp('publish_end', 'Дата и время олкончания публикация')->defaultValue(Carbon\Carbon::now()), FormItem::text('redirect', 'Редирект'), FormItem::icheckbox('active', 'Статус')->defaultValue(true)], [FormItem::text('alias', 'Алиас')->unique(), FormItem::text('name', 'Название')->required()->unique(), FormItem::image('image', 'Картинка')]])];
    $model = App\Landing::find($id);
    if ($model) {
        $path = base_path('App/AdminLanding/' . $model->name . '.php');
        if (is_file($path)) {
            $fields2 = (require_once $path);
            $fields = array_merge($fields, $fields2);
        }
    }
    $form->items($fields);
    return $form;
})->create(function ($id) {
    $form = AdminForm::tabbed();
    $fields = [];
    $fields['Main'] = [FormItem::columns()->columns([[FormItem::text('title', 'Загаловок')->required()->unique(), FormItem::textarea('description', 'Описание')->required(), FormItem::timestamp('publish', 'Дата и время публикации')->defaultValue(Carbon\Carbon::now()), FormItem::timestamp('publish_end', 'Дата и время олкончания публикация')->defaultValue(Carbon\Carbon::now()), FormItem::text('redirect', 'Редирект'), FormItem::icheckbox('active', 'Статус')->defaultValue(true)], [FormItem::text('alias', 'Алиас')->unique(), FormItem::text('name', 'Название')->required()->unique(), FormItem::image('image', 'Картинка')]])];
    $form->items($fields);
    return $form;
});
開發者ID:larabox,項目名稱:larabox,代碼行數:30,代碼來源:Landeng.php

示例14: use

<?php

Admin::model('App\\Contact3')->title('Contact')->alias('contacts3')->display(function () {
    $display = AdminDisplay::table();
    $display->with('country', 'companies');
    $display->filters([Filter::related('country_id')->model('App\\Country')]);
    $display->columns([Column::image('photo')->label('Photo'), Column::string('fullName')->label('Name'), Column::datetime('birthday')->label('Birthday')->format('d.m.Y'), Column::string('country.title')->label('Country')->append(Column::filter('country_id')), Column::lists('companies.title')->label('Companies')]);
    return $display;
})->createAndEdit(function ($id) {
    $display = AdminDisplay::tabbed();
    $display->tabs(function () use($id) {
        $tabs = [];
        $form = AdminForm::form();
        $form->items([FormItem::columns()->columns([[FormItem::text('firstName', 'First Name')->required(), FormItem::text('lastName', 'Last Name')->required(), FormItem::text('phone', 'Phone'), FormItem::text('address', 'Address')], [FormItem::image('photo', 'Photo'), FormItem::date('birthday', 'Birthday')->format('d.m.Y')], [FormItem::select('country_id', 'Country')->model('App\\Country')->display('title'), FormItem::textarea('comment', 'Comment')]])]);
        $tabs[] = AdminDisplay::tab($form)->label('Main Form')->active(true);
        if (!is_null($id)) {
            $instance = App\Contact::find($id);
            if ($instance->country_id) {
                $country = Admin::model('App\\Country')->fullEdit($instance->country_id);
                $tabs[] = AdminDisplay::tab($country)->label('Form from Related Model (Country)');
            }
            $companies = Admin::model('App\\Company')->display();
            $companies->scope('withContact', $id);
            $companies->parameters(['contact_id' => $id]);
            $tabs[] = AdminDisplay::tab($companies)->label('Display from Related Model (Companies)');
        }
        return $tabs;
    });
    return $display;
})->delete(null);
開發者ID:ntamvl,項目名稱:admin-3-demo,代碼行數:30,代碼來源:Contact3.php

示例15:

<?php

Admin::model('App\\Models\\Advert')->title('Рекламные блоки')->display(function () {
    $display = AdminDisplay::datatables();
    $display->with();
    $display->filters([Filter::field('active')->title('Вкл')->alias('ddddd')]);
    $display->columns([Column::string('id')->label('Id'), Column::string('name')->label('Название'), Column::string('place')->label('Место'), Column::string('active')->label('Включен'), Column::image('img')->label('Img')]);
    return $display;
})->createAndEdit(function () {
    $form = AdminForm::form();
    $form->items([FormItem::columns()->columns([[FormItem::text('name', 'Название (только для админа)')], [FormItem::checkbox('active', 'Включен')]]), FormItem::columns()->columns([[FormItem::select('place', 'Место посадки')->enum(['top1', 'aside1', 'aside2', 'recipie_step', 'foot_script'])], []]), FormItem::columns()->columns([[FormItem::text('title', 'Заголовок')], [FormItem::checkbox('show_title', 'Показывать')]]), FormItem::columns()->columns([[FormItem::image('img', 'Изображение')], [FormItem::checkbox('show_img', 'Показывать'), FormItem::text('imglink', 'Ссылка')]]), FormItem::columns()->columns([[FormItem::textarea('text', 'Содержимое')], [FormItem::checkbox('show_text', 'Показывать')]])]);
    return $form;
});
開發者ID:AngryGantz,項目名稱:cms-cookbook,代碼行數:13,代碼來源:Advert.php


注:本文中的FormItem::textarea方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。