当前位置: 首页>>代码示例>>PHP>>正文


PHP FormItem::images方法代码示例

本文整理汇总了PHP中FormItem::images方法的典型用法代码示例。如果您正苦于以下问题:PHP FormItem::images方法的具体用法?PHP FormItem::images怎么用?PHP FormItem::images使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FormItem的用法示例。


在下文中一共展示了FormItem::images方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1:

<?php

Admin::model('App\\Directions')->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::ckeditor('desc', 'Описание'), FormItem::ckeditor('desc_detail', 'Описание'), FormItem::text('video', 'Видео')], [FormItem::images('images', 'Картинки')]])]);
    return $form;
});
开发者ID:ArtiResh,项目名称:DanceStudio54,代码行数:11,代码来源:directions.php

示例2:

<?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

示例3:

<?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

示例4:

<?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

示例5: function

            };
            break;
        case 'last_name':
            return function () {
                InlineEditItem::text('last_name', NULL)->validationRule('required|regex:/^[a-zA-Z0-9_@]{3,100}$/');
            };
            break;
        default:
            return function () {
            };
            break;
    }
})->form(function () {
    FormItem::text('name', 'Name')->validationRule('required')->group('general');
    FormItem::text('second_name', 'Second Name')->validationRule('required')->group('general');
    FormItem::text('last_name', 'Last Name')->validationRule('required')->group('general');
    FormItem::email('email', 'Email')->validationRule('required|email')->group('general');
    FormItem::text('phone', 'Phone')->validationRule('required')->group('general');
    if (!preg_match('/edit$/', Request::url()) && !preg_match('/update$/', Request::url())) {
        FormItem::text('login', 'Login')->validationRule('required')->group('general');
        FormItem::text('password', 'Password')->validationRule('required')->group('general');
    }
    FormItem::images()->type('model')->modelMethod('photos')->group('photos');
    FormGroup::create('general', 'General')->setDisplayType(FormGroup::DISPLAY_TYPE_FULL);
    FormGroup::create('photos', 'Photos')->setDisplayType(FormGroup::DISPLAY_TYPE_FULL);
})->viewFilters(function () {
    ViewFilter::text('name', 'Name');
    ViewFilter::text('second_name', 'Second Name');
    ViewFilter::text('last_name', 'Last Name');
    ViewFilter::text('email', 'Email');
});
开发者ID:procoders,项目名称:printrock,代码行数:31,代码来源:Customer.php

示例6: 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

示例7:

<?php

Admin::model('App\\Product')->title('Productos')->display(function () {
    $display = AdminDisplay::datatables();
    $display->with('colors');
    // $display->filters([
    // ]);
    $display->columns([Column::image('thumbnail')->label('Miniatura'), Column::string('title')->label('Título'), Column::lists('colors.name')]);
    return $display;
})->createAndEdit(function () {
    $form = AdminForm::tabbed();
    $form->items(['General' => [FormItem::text('title', 'Título'), FormItem::text('subtitle', 'Subtítulo'), FormItem::multiselect('colors', 'Colores')->model('App\\Color')->display('name'), FormItem::select('category_id', 'Categoria')->model('App\\Category')->display('name'), FormItem::text('tags', 'Serie')], 'Extra' => [FormItem::ckeditor('description', 'Descripcion'), FormItem::jsonField('specs', 'Especificaciones'), FormItem::ckeditor('details', 'Detalles')], 'Media' => [FormItem::image('thumbnail', 'Miniatura'), FormItem::images('images', 'Imagenes')], 'Venta' => [FormItem::text('price', 'Precio'), FormItem::text('link', 'Link a tienda nube')]]);
    return $form;
});
开发者ID:avilaj,项目名称:ocsport,代码行数:14,代码来源:Product.php

示例8:

<?php

Admin::model('App\\Albums')->title('Альбомы')->display(function () {
    $display = AdminDisplay::table();
    $display->columns([Column::string('events.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::select('events_id', 'Событие')->model('App\\Events')->display('name')]]), FormItem::columns()->columns([[FormItem::images('images', 'Фотографии')]])]);
    return $form;
});
开发者ID:ArtiResh,项目名称:DanceStudio54,代码行数:11,代码来源:Albums.php

示例9: array

        return $instance->active ? '&check;' : '-';
    })]);
    return $display;
})->create(function ($id) {
    $form = AdminForm::form();
    $form->ajax_validation(true);
    $form->horizontal(true);
    $form->label_size('col-sm-offset-4 col-sm-1');
    $form->field_size('col-sm-3');
    $form->items([FormItem::text('title', 'Title')->validationRules('unique:pages,title,' . $id), FormItem::text('alias', 'Alias')->validationRules('unique:pages,alias,' . $id . ',id,context,' . Request::get('context', '')), FormItem::select('context', 'Context')->enum(config('jetcms.models.context')), FormItem::bsselect('user_id', 'User')->model('App\\User')->display('email|id')->defaultValue(Sentinel::check()->id)->nullable()]);
    return $form;
})->edit(function ($id) {
    $model = App\Page::find($id);
    $form = AdminForm::tabbed();
    $form->ajax_validation(true);
    $form->items(array('Main' => array(FormItem::columns()->columns([[FormItem::text('title', 'Title')->validationRules('unique:pages,title,' . $id), FormItem::text('alias', 'Alias')->validationRules('unique:pages,alias,' . $id . ',id,context,' . Request::get('context', '')), FormItem::textarea('description', 'Description'), FormItem::chosen('tag', 'Tag')->model('App\\Tag')->display('lable')->multi(true)->nullable(), FormItem::icheckbox('active')->label('Active')->skin('flat')], [FormItem::bsselect('menu_id', 'Menu id')->options(App\Menu::getNestedList('level_lable'))->disableSort()->nullable(), FormItem::select('context', 'Context')->enum(config('jetcms.models.context')), FormItem::select('template', 'Template')->enum(config('jetcms.models.template.' . $model->context, []))->nullable()->disableSort(), FormItem::select('policies', 'Policies')->enum(config('jetcms.models.policies.' . $model->context, []))->nullable()->disableSort(), FormItem::bsselect('user_id', 'User')->model('App\\User')->display('email|id')->defaultValue(Sentinel::check()->id)->nullable(), FormItem::image('image', 'Image')]]), FormItem::images('gallery', 'Gallery')), 'Content' => [FormItem::ckeditor('content', 'Text')], 'Fields' => value(function () use($id, $model) {
        //if (!$model) {return array();}
        return [FormItem::custom()->display(function ($instance) use($model) {
            $str = null;
            foreach (config('jetcms.models.fields.' . $instance->context, array()) as $val) {
                $type = $val['type'];
                $input = FormItem::$type('field_array.' . $val['name'] . '', $val['lable']);
                $input->defaultValue($instance->field($val['name']));
                $str .= $input;
            }
            return $str;
        })->callback(function ($instance) {
            $instance->fieldArray = Request::input('field_array');
        })];
    }), 'Action' => [FormItem::custom()->display(function ($instance) {
        $str = null;
开发者ID:jetcms,项目名称:models,代码行数:31,代码来源:JetCmsModels.php


注:本文中的FormItem::images方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。