query
stringlengths
7
5.25k
document
stringlengths
15
1.06M
metadata
dict
negatives
sequencelengths
3
101
negative_scores
sequencelengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Bootstrap any application services.
public function boot() { Paginator::useBootstrap(); view()->composer("*", function($view){ $acc_id=Auth::guard('customer')->id(); if(!Auth::guard('customer')->check()){ $tt=0; }else{ $ttq = Cart::where('customer_id',$acc_id)->get(); $tt=0; foreach($ttq as $key => $item){ $tt += $item['quantity']; } } $count = Favorite::where('customer_id',$acc_id)->count(); $view->with(compact('tt','count')); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function bootstrap(): void\n {\n if (! $this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrappers());\n }\n\n $this->app->loadDeferredProviders();\n }", "public function boot()\n {\n // Boot here application\n }", "public function bootstrap()\n {\n if (!$this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrapperList);\n }\n\n $this->app->loadDeferredProviders();\n }", "public function boot()\r\n {\r\n // Publishing is only necessary when using the CLI.\r\n if ($this->app->runningInConsole()) {\r\n $this->bootForConsole();\r\n }\r\n }", "public function boot()\n {\n $this->app->bind(IUserService::class, UserService::class);\n $this->app->bind(ISeminarService::class, SeminarService::class);\n $this->app->bind(IOrganizationService::class, OrganizationService::class);\n $this->app->bind(ISocialActivityService::class, SocialActivityService::class);\n }", "public function boot()\n {\n if ($this->booted) {\n return;\n }\n\n array_walk($this->loadedServices, function ($s) {\n $this->bootService($s);\n });\n\n $this->booted = true;\n }", "public function boot()\n {\n\n $this->app->bind(FileUploaderServiceInterface::class,FileUploaderService::class);\n $this->app->bind(ShopServiceInterface::class,ShopService::class);\n $this->app->bind(CategoryServiceInterface::class,CategoryService::class);\n $this->app->bind(ProductServiceInterface::class,ProductService::class);\n $this->app->bind(ShopSettingsServiceInterface::class,ShopSettingsService::class);\n $this->app->bind(FeedbackServiceInterface::class,FeedbackService::class);\n $this->app->bind(UserServiceInterface::class,UserService::class);\n $this->app->bind(ShoppingCartServiceInterface::class,ShoppingCartService::class);\n $this->app->bind(WishlistServiceInterface::class,WishlistService::class);\n $this->app->bind(NewPostApiServiceInterface::class,NewPostApiService::class);\n $this->app->bind(DeliveryAddressServiceInterface::class,DeliveryAddressService::class);\n $this->app->bind(StripeServiceInterface::class,StripeService::class);\n $this->app->bind(OrderServiceInterface::class,OrderService::class);\n $this->app->bind(MailSenderServiceInterface::class,MailSenderSenderService::class);\n }", "public function boot()\n {\n $this->setupConfig('delta_service');\n $this->setupMigrations();\n $this->setupConnection('delta_service', 'delta_service.connection');\n }", "public function boot()\n {\n $configuration = [];\n\n if (file_exists($file = getcwd() . '/kaleo.config.php')) {\n $configuration = include_once $file;\n }\n\n $this->app->singleton('kaleo', function () use ($configuration) {\n return new KaleoService($configuration);\n });\n }", "public function boot()\n {\n $this->shareResources();\n $this->mergeConfigFrom(self::CONFIG_PATH, 'amocrm-api');\n }", "public function boot(): void\n {\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "public function boot()\n {\n // Ports\n $this->app->bind(\n IAuthenticationService::class,\n AuthenticationService::class\n );\n $this->app->bind(\n IBeerService::class,\n BeerService::class\n );\n\n // Adapters\n $this->app->bind(\n IUserRepository::class,\n UserEloquentRepository::class\n );\n $this->app->bind(\n IBeerRepository::class,\n BeerEloquentRepository::class\n );\n }", "public function boot()\n {\n $this->setupConfig($this->app);\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->loadMigrations();\n }\n if(config($this->vendorNamespace. '::config.enabled')){\n Livewire::component($this->vendorNamespace . '::login-form', LoginForm::class);\n $this->loadRoutes();\n $this->loadViews();\n $this->loadMiddlewares();\n $this->loadTranslations();\n }\n }", "public function boot()\n {\n $source = dirname(__DIR__, 3) . '/config/config.php';\n\n if ($this->app instanceof LaravelApplication && $this->app->runningInConsole()) {\n $this->publishes([$source => config_path('dubbo_cli.php')]);\n } elseif ($this->app instanceof LumenApplication) {\n $this->app->configure('dubbo_cli');\n }\n\n $this->mergeConfigFrom($source, 'dubbo_cli');\n }", "public function boot()\n {\n $this->package('domain/app');\n\n $this->setApplication();\n }", "public function boot()\n {\n $this->setUpConfig();\n $this->setUpConsoleCommands();\n }", "public function boot()\n {\n $this->strapRoutes();\n $this->strapViews();\n $this->strapMigrations();\n $this->strapCommands();\n\n $this->registerPolicies();\n }", "public function boot()\n {\n $this->app->singleton('LaraCurlService', function ($app) {\n return new LaraCurlService();\n });\n\n $this->loadRoutesFrom(__DIR__.'/routes/web.php');\n }", "public function boot()\n {\n $providers = $this->make('config')->get('app.console_providers', array());\n foreach ($providers as $provider) {\n $provider = $this->make($provider);\n if ($provider && method_exists($provider, 'boot')) {\n $provider->boot();\n }\n }\n }", "public function boot()\n {\n foreach (glob(app_path('/Api/config/*.php')) as $path) {\n $path = realpath($path);\n $this->mergeConfigFrom($path, basename($path, '.php'));\n }\n\n // 引入自定义函数\n foreach (glob(app_path('/Helpers/*.php')) as $helper) {\n require_once $helper;\n }\n // 引入 api 版本路由\n $this->loadRoutesFrom(app_path('/Api/Routes/base.php'));\n\n }", "public function bootstrap()\n {\n if (!$this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrappers());\n }\n\n //$this->app->loadDeferredProviders();\n\n if (!$this->commandsLoaded) {\n //$this->commands();\n\n $this->commandsLoaded = true;\n }\n }", "protected function boot()\n\t{\n\t\tforeach ($this->serviceProviders as $provider)\n\t\t{\n\t\t\t$provider->boot($this);\n\t\t}\n\n\t\t$this->booted = true;\n\t}", "public function boot()\n {\n $this->setupConfig();\n //register rotating daily monolog provider\n $this->app->register(MonologProvider::class);\n $this->app->register(CircuitBreakerServiceProvider::class);\n $this->app->register(CurlServiceProvider::class);\n }", "public function boot(): void\n {\n if ($this->booted) {\n return;\n }\n\n array_walk($this->services, function ($service) {\n $this->bootServices($service);\n });\n\n $this->booted = true;\n }", "public static function boot() {\n\t\tstatic::container()->boot();\n\t}", "public function boot()\n {\n include_once('ComposerDependancies\\Global.php');\n //---------------------------------------------\n include_once('ComposerDependancies\\League.php');\n include_once('ComposerDependancies\\Team.php');\n include_once('ComposerDependancies\\Matchup.php');\n include_once('ComposerDependancies\\Player.php');\n include_once('ComposerDependancies\\Trade.php');\n include_once('ComposerDependancies\\Draft.php');\n include_once('ComposerDependancies\\Message.php');\n include_once('ComposerDependancies\\Poll.php');\n include_once('ComposerDependancies\\Chat.php');\n include_once('ComposerDependancies\\Rule.php');\n\n \n include_once('ComposerDependancies\\Admin\\Users.php');\n\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n if ($this->app instanceof LaravelApplication) {\n $this->publishes([\n __DIR__.'/../config/state-machine.php' => config_path('state-machine.php'),\n ], 'config');\n } elseif ($this->app instanceof LumenApplication) {\n $this->app->configure('state-machine');\n }\n }\n }", "public function boot()\n {\n $this->bootEvents();\n\n $this->bootPublishes();\n\n $this->bootTypes();\n\n $this->bootSchemas();\n\n $this->bootRouter();\n\n $this->bootViews();\n \n $this->bootSecurity();\n }", "public function boot()\n {\n //\n Configuration::environment(\"sandbox\");\n Configuration::merchantId(\"cmpss9trsxsr4538\");\n Configuration::publicKey(\"zy3x5mb5jwkcrxgr\");\n Configuration::privateKey(\"4d63c8b2c340daaa353be453b46f6ac2\");\n\n\n $modules = Directory::listDirectories(app_path('Modules'));\n\n foreach ($modules as $module)\n {\n $routesPath = app_path('Modules/' . $module . '/routes.php');\n $viewsPath = app_path('Modules/' . $module . '/Views');\n\n if (file_exists($routesPath))\n {\n require $routesPath;\n }\n\n if (file_exists($viewsPath))\n {\n $this->app->view->addLocation($viewsPath);\n }\n }\n }", "public function boot()\n {\n resolve(EngineManager::class)->extend('elastic', function () {\n return new ElasticScoutEngine(\n ElasticBuilder::create()\n ->setHosts(config('scout.elastic.hosts'))\n ->build()\n );\n });\n }", "public function boot(): void\n {\n try {\n // Just check if we have DB connection! This is to avoid\n // exceptions on new projects before configuring database options\n // @TODO: refcator the whole accessareas retrieval to be file-based, instead of db based\n DB::connection()->getPdo();\n\n if (Schema::hasTable(config('cortex.foundation.tables.accessareas'))) {\n // Register accessareas into service container, early before booting any module service providers!\n $this->app->singleton('accessareas', fn () => app('cortex.foundation.accessarea')->where('is_active', true)->get());\n }\n } catch (Exception $e) {\n // Be quiet! Do not do or say anything!!\n }\n\n $this->bootstrapModules();\n }", "public function boot()\n {\n $this->app->register(UserServiceProvider::class);\n $this->app->register(DashboardServiceProvider::class);\n $this->app->register(CoreServiceProvider::class);\n $this->app->register(InstitutionalVideoServiceProvider::class);\n $this->app->register(InstitutionalServiceProvider::class);\n $this->app->register(TrainingServiceProvider::class);\n $this->app->register(CompanyServiceProvider::class);\n $this->app->register(LearningUnitServiceProvider::class);\n $this->app->register(PublicationServiceProvider::class);\n }", "public function boot()\n {\n Schema::defaultStringLength(191);\n\n $this->app->bindMethod([SendMailPasswordReset::class, 'handle'], function ($job, $app) {\n return $job->handle($app->make(MailService::class));\n });\n\n $this->app->bindMethod([ClearTokenPasswordReset::class, 'handle'], function ($job, $app) {\n return $job->handle($app->make(PasswordResetRepository::class));\n });\n\n $this->app->bind(AuthService::class, function ($app) {\n return new AuthService($app->make(HttpService::class));\n });\n }", "public function boot()\n {\n $this->makeRepositories();\n }", "public function boot(): void\n {\n $this->loadMiddlewares();\n }", "public function boot()\n {\n $this->app->when(ChatAPIChannel::class)\n ->needs(ChatAPI::class)\n ->give(function () {\n $config = config('services.chatapi');\n return new ChatAPI(\n $config['token'],\n $config['api_url']\n );\n });\n }", "public function boot() {\r\n\t\t$hosting_service = HostResolver::get_host_service();\r\n\r\n\t\tif ( ! empty( $hosting_service ) ) {\r\n\t\t\t$this->provides[] = $hosting_service;\r\n\t\t}\r\n\t}", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n require(__DIR__ . '/../routes/console.php');\n } else {\n // Menus for BPM are done through middleware. \n Route::pushMiddlewareToGroup('web', AddToMenus::class);\n \n // Assigning to the web middleware will ensure all other middleware assigned to 'web'\n // will execute. If you wish to extend the user interface, you'll use the web middleware\n Route::middleware('web')\n ->namespace($this->namespace)\n ->group(__DIR__ . '/../routes/web.php');\n \n // If you wish to extend the api, be sure to utilize the api middleware. In your api \n // Routes file, you should prefix your routes with api/1.0\n Route::middleware('api')\n ->namespace($this->namespace)\n ->prefix('api/1.0')\n ->group(__DIR__ . '/../routes/api.php');\n \n Event::listen(ScreenBuilderStarting::class, function($event) {\n $event->manager->addScript(mix('js/screen-builder-extend.js', 'vendor/api-connector'));\n $event->manager->addScript(mix('js/screen-renderer-extend.js', 'vendor/api-connector'));\n });\n }\n\n // load migrations\n $this->loadMigrationsFrom(__DIR__.'/../database/migrations');\n\n // Load our views\n $this->loadViewsFrom(__DIR__.'/../resources/views/', 'api-connector');\n\n // Load our translations\n $this->loadTranslationsFrom(__DIR__.'/../lang', 'api-connector');\n\n $this->publishes([\n __DIR__.'/../public' => public_path('vendor/api-connector'),\n ], 'api-connector');\n\n $this->publishes([\n __DIR__ . '/../database/seeds' => database_path('seeds'),\n ], 'api-connector');\n\n $this->app['events']->listen(PackageEvent::class, PackageListener::class);\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->bindCommands();\n $this->registerCommands();\n $this->app->bind(InstallerContract::class, Installer::class);\n\n $this->publishes([\n __DIR__.'/../config/exceptionlive.php' => base_path('config/exceptionlive.php'),\n ], 'config');\n }\n\n $this->registerMacros();\n }", "public function boot(){\r\n $this->app->configure('sdk');\r\n $this->publishes([\r\n __DIR__.'/../../resources/config/sdk.php' => config_path('sdk.php')\r\n ]);\r\n $this->mergeConfigFrom(__DIR__.'/../../resources/config/sdk.php','sdk');\r\n\r\n $api = config('sdk.api');\r\n foreach($api as $key => $value){\r\n $this->app->singleton($key,$value);\r\n }\r\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n EnvironmentCommand::class,\n EventGenerateCommand::class,\n EventMakeCommand::class,\n JobMakeCommand::class,\n KeyGenerateCommand::class,\n MailMakeCommand::class,\n ModelMakeCommand::class,\n NotificationMakeCommand::class,\n PolicyMakeCommand::class,\n ProviderMakeCommand::class,\n RequestMakeCommand::class,\n ResourceMakeCommand::class,\n RuleMakeCommand::class,\n ServeCommand::class,\n StorageLinkCommand::class,\n TestMakeCommand::class,\n ]);\n }\n }", "public function boot()\n {\n $this->app->bind(WeatherInterface::class, OpenWeatherMapService::class);\n $this->app->bind(OrderRepositoryInterface::class, EloquentOrderRepository::class);\n $this->app->bind(NotifyInterface::class, EmailNotifyService::class);\n }", "public function boot()\n {\n $this->app->bind(DateService::class,DateServiceImpl::class);\n $this->app->bind(DisasterEventQueryBuilder::class,DisasterEventQueryBuilderImpl::class);\n $this->app->bind(MedicalFacilityQueryBuilder::class,MedicalFacilityQueryBuilderImpl::class);\n $this->app->bind(RefugeCampQueryBuilder::class,RefugeCampQueryBuilderImpl::class);\n $this->app->bind(VictimQueryBuilder::class,VictimQueryBuilderImpl::class);\n $this->app->bind(VillageQueryBuilder::class,VillageQueryBuilderImpl::class);\n }", "public function boot()\n {\n\t\tif ( $this->app->runningInConsole() ) {\n\t\t\t$this->loadMigrationsFrom(__DIR__.'/migrations');\n\n//\t\t\t$this->publishes([\n//\t\t\t\t__DIR__.'/config/scheduler.php' => config_path('scheduler.php'),\n//\t\t\t\t__DIR__.'/console/CronTasksList.php' => app_path('Console/CronTasksList.php'),\n//\t\t\t\t__DIR__.'/views' => resource_path('views/vendor/scheduler'),\n//\t\t\t]);\n\n//\t\t\tapp('Revolta77\\ScheduleMonitor\\Conntroller\\CreateController')->index();\n\n//\t\t\t$this->commands([\n//\t\t\t\tConsole\\Commands\\CreateController::class,\n//\t\t\t]);\n\t\t}\n\t\t$this->loadRoutesFrom(__DIR__.'/routes/web.php');\n }", "public function boot()\n {\n $this->bootPackages();\n }", "public function boot(): void\n {\n if ($this->app->runningInConsole()) {\n $this->commands($this->load(__DIR__.'/../Console', Command::class));\n }\n }", "public function boot(): void\n {\n $this->publishes(\n [\n __DIR__ . '/../config/laravel_entity_services.php' =>\n $this->app->make('path.config') . DIRECTORY_SEPARATOR . 'laravel_entity_services.php',\n ],\n 'laravel_repositories'\n );\n $this->mergeConfigFrom(__DIR__ . '/../config/laravel_entity_services.php', 'laravel_entity_services');\n\n $this->registerCustomBindings();\n }", "public function boot()\n {\n // DEFAULT STRING LENGTH\n Schema::defaultStringLength(191);\n\n // PASSPORT\n Passport::routes(function (RouteRegistrar $router)\n {\n $router->forAccessTokens();\n });\n Passport::tokensExpireIn(now()->addDays(1));\n\n // SERVICES, REPOSITORIES, CONTRACTS BINDING\n $this->app->bind('App\\Contracts\\IUser', 'App\\Repositories\\UserRepository');\n $this->app->bind('App\\Contracts\\IUserType', 'App\\Repositories\\UserTypeRepository');\n $this->app->bind('App\\Contracts\\IApiToken', 'App\\Services\\ApiTokenService');\n $this->app->bind('App\\Contracts\\IModule', 'App\\Repositories\\ModuleRepository');\n $this->app->bind('App\\Contracts\\IModuleAction', 'App\\Repositories\\ModuleActionRepository');\n }", "public function bootstrap(): void\n {\n $globalConfigurationBuilder = (new GlobalConfigurationBuilder())->withEnvironmentVariables()\n ->withPhpFileConfigurationSource(__DIR__ . '/../config.php');\n (new BootstrapperCollection())->addMany([\n new DotEnvBootstrapper(__DIR__ . '/../.env'),\n new ConfigurationBootstrapper($globalConfigurationBuilder),\n new GlobalExceptionHandlerBootstrapper($this->container)\n ])->bootstrapAll();\n }", "public function boot()\n {\n // $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'deniskisel');\n // $this->loadViewsFrom(__DIR__.'/../resources/views', 'deniskisel');\n// $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');\n // $this->loadRoutesFrom(__DIR__.'/routes.php');\n\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "public function boot()\n {\n $this->bootingDomain();\n\n $this->registerCommands();\n $this->registerListeners();\n $this->registerPolicies();\n $this->registerRoutes();\n $this->registerBladeComponents();\n $this->registerLivewireComponents();\n $this->registerSpotlightCommands();\n\n $this->bootedDomain();\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->registerMigrations();\n $this->registerMigrationFolder();\n $this->registerConfig();\n }\n }", "public function boot()\n {\n $this->bootModulesMenu();\n $this->bootSkinComposer();\n $this->bootCustomBladeDirectives();\n }", "public function boot(): void\n {\n $this->app->bind(Telegram::class, static function () {\n return new Telegram(\n config('services.telegram-bot-api.token'),\n new HttpClient()\n );\n });\n }", "public function boot()\n {\n\n if (! config('app.installed')) {\n return;\n }\n\n $this->loadRoutesFrom(__DIR__ . '/Routes/admin.php');\n $this->loadRoutesFrom(__DIR__ . '/Routes/public.php');\n\n $this->loadMigrationsFrom(__DIR__ . '/Database/Migrations');\n\n// $this->loadViewsFrom(__DIR__ . '/Resources/Views', 'portfolio');\n\n $this->loadTranslationsFrom(__DIR__ . '/Resources/Lang/', 'contact');\n\n //Add menu to admin panel\n $this->adminMenu();\n\n }", "public function boot()\n {\n if (! config('app.installed')) {\n return;\n }\n\n $this->app['config']->set([\n 'scout' => [\n 'driver' => setting('search_engine', 'mysql'),\n 'algolia' => [\n 'id' => setting('algolia_app_id'),\n 'secret' => setting('algolia_secret'),\n ],\n ],\n ]);\n }", "protected function bootServiceProviders()\n {\n foreach($this->activeProviders as $provider)\n {\n // check if the service provider has a boot method.\n if (method_exists($provider, 'boot')) {\n $provider->boot();\n }\n }\n }", "public function boot(): void\n {\n // $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'imc');\n $this->loadMigrationsFrom(__DIR__.'/../database/migrations');\n $this->loadViewsFrom(__DIR__.'/../resources/views', 'imc');\n $this->registerPackageRoutes();\n\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "public function boot()\n {\n // Larapex Livewire\n $this->mergeConfigFrom(__DIR__ . '/../configs/larapex-livewire.php', 'larapex-livewire');\n\n $this->loadViewsFrom(__DIR__ . '/../resources/views', 'larapex-livewire');\n\n $this->registerBladeDirectives();\n\n if ($this->app->runningInConsole()) {\n $this->registerCommands();\n $this->publishResources();\n }\n }", "public function boot()\n {\n // Bootstrap code here.\n $this->app->singleton(L9SmsApiChannel::class, function () {\n $config = config('l9smsapi');\n if (empty($config['token']) || empty($config['service'])) {\n throw new \\Exception('L9SmsApi missing token and service in config');\n }\n\n return new L9SmsApiChannel($config['token'], $config['service']);\n });\n\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__.'/../config/l9smsapi.php' => config_path('l9smsapi.php'),\n ], 'config');\n }\n }", "public function boot()\n\t{\n\t\t$this->bindRepositories();\n\t}", "public function boot()\n {\n if (!$this->app->runningInConsole()) {\n return;\n }\n\n $this->commands([\n ListenCommand::class,\n InstallCommand::class,\n EventsListCommand::class,\n ObserverMakeCommand::class,\n ]);\n\n foreach ($this->listen as $event => $listeners) {\n foreach ($listeners as $listener) {\n RabbitEvents::listen($event, $listener);\n }\n }\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n MultiAuthInstallCommand::class,\n ]);\n }\n }", "public function boot() {\n\n\t\t$this->registerProviders();\n\t\t$this->bootProviders();\n\t\t$this->registerProxies();\n\t}", "public function boot(): void\n {\n // routes\n $this->loadRoutes();\n // assets\n $this->loadAssets('assets');\n // configuration\n $this->loadConfig('configs');\n // views\n $this->loadViews('views');\n // view extends\n $this->extendViews();\n // translations\n $this->loadTranslates('views');\n // adminer\n $this->loadAdminer('adminer');\n // commands\n $this->loadCommands();\n // gates\n $this->registerGates();\n // listeners\n $this->registerListeners();\n // settings\n $this->applySettings();\n }", "public function boot()\n {\n $this->setupFacades();\n $this->setupViews();\n $this->setupBlades();\n }", "public function boot()\n {\n\n $this->app->translate_manager->addTranslateProvider(TranslateMenu::class);\n\n\n\n $this->loadRoutesFrom(__DIR__ . '/../routes/api.php');\n $this->loadMigrationsFrom(__DIR__ . '/../migrations/');\n\n\n\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__ . '/../config/larkeauth-rbac-model.conf' => config_path('larkeauth-rbac-model.conf.larkeauth'),\n __DIR__ . '/../config/larkeauth.php' => config_path('larkeauth.php.larkeauth')\n ], 'larke-auth-config');\n\n $this->commands([\n Commands\\Install::class,\n Commands\\GroupAdd::class,\n Commands\\PolicyAdd::class,\n Commands\\RoleAssign::class,\n ]);\n }\n\n $this->mergeConfigFrom(__DIR__ . '/../config/larkeauth.php', 'larkeauth');\n\n $this->bootObserver();\n }", "public function boot(): void\n {\n $this->app\n ->when(RocketChatWebhookChannel::class)\n ->needs(RocketChat::class)\n ->give(function () {\n return new RocketChat(\n new HttpClient(),\n Config::get('services.rocketchat.url'),\n Config::get('services.rocketchat.token'),\n Config::get('services.rocketchat.channel')\n );\n });\n }", "public function boot()\n {\n if ($this->booted) {\n return;\n }\n\n $this->app->registerConfiguredProvidersInRequest();\n\n $this->fireAppCallbacks($this->bootingCallbacks);\n\n /** array_walk\n * If when a provider booting, it reg some other providers,\n * then the new providers added to $this->serviceProviders\n * then array_walk will loop the new ones and boot them. // pingpong/modules 2.0 use this feature\n */\n array_walk($this->serviceProviders, function ($p) {\n $this->bootProvider($p);\n });\n\n $this->booted = true;\n\n $this->fireAppCallbacks($this->bootedCallbacks);\n }", "public function boot()\n {\n $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');\n\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "public function boot()\n\t{\n\t\t$this->package('atlantis/admin');\n\n\t\t#i: Set the locale\n\t\t$this->setLocale();\n\n $this->registerServiceAdminValidator();\n $this->registerServiceAdminFactory();\n $this->registerServiceAdminDataTable();\n $this->registerServiceModules();\n\n\t\t#i: Include our filters, view composers, and routes\n\t\tinclude __DIR__.'/../../filters.php';\n\t\tinclude __DIR__.'/../../views.php';\n\t\tinclude __DIR__.'/../../routes.php';\n\n\t\t$this->app['events']->fire('admin.ready');\n\t}", "public function boot()\n {\n $this->app->booted(function () {\n $this->callMethodIfExists('jobs');\n });\n }", "public function boot()\n {\n $this->bootSetTimeLocale();\n $this->bootBladeHotelRole();\n $this->bootBladeHotelGuest();\n $this->bootBladeIcon();\n }", "public function boot(): void\n {\n $this->registerRoutes();\n $this->registerResources();\n $this->registerMixins();\n\n if ($this->app->runningInConsole()) {\n $this->offerPublishing();\n $this->registerMigrations();\n }\n }", "public function boot()\n {\n $this->dispatch(new SetCoreConnection());\n $this->dispatch(new ConfigureCommandBus());\n $this->dispatch(new ConfigureTranslator());\n $this->dispatch(new LoadStreamsConfiguration());\n\n $this->dispatch(new InitializeApplication());\n $this->dispatch(new AutoloadEntryModels());\n $this->dispatch(new AddAssetNamespaces());\n $this->dispatch(new AddImageNamespaces());\n $this->dispatch(new AddViewNamespaces());\n $this->dispatch(new AddTwigExtensions());\n $this->dispatch(new RegisterAddons());\n }", "public function boot(): void\n {\n $this->loadViews();\n $this->loadTranslations();\n\n if ($this->app->runningInConsole()) {\n $this->publishMultipleConfig();\n $this->publishViews(false);\n $this->publishTranslations(false);\n }\n }", "public function boot()\n {\n $this->bootForConsole();\n $this->loadRoutesFrom(__DIR__ . '/routes/web.php');\n $this->loadViewsFrom(__DIR__ . '/./../resources/views', 'bakerysoft');\n }", "public function boot()\n {\n $this->app->booted(function () {\n $this->defineRoutes();\n });\n $this->defineResources();\n $this->registerDependencies();\n }", "public function boot()\n {\n $this->app->bind(CustomersRepositoryInterface::class, CustomersRepository::class);\n $this->app->bind(CountryToCodeMapperInterface::class, CountryToCodeMapper::class);\n $this->app->bind(PhoneNumbersValidatorInterface::class, PhoneNumbersRegexValidator::class);\n $this->app->bind(CustomersFilterServiceInterface::class, CustomersFilterService::class);\n $this->app->bind(CacheInterface::class, CacheAdapter::class);\n\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->publishes([$this->configPath() => config_path('oauth.php')], 'oauth');\n }\n\n app()->bind(ClientToken::class, function () {\n return new ClientToken();\n });\n\n app()->bind(TokenParser::class, function () {\n return new TokenParser(\n app()->get(Request::class)\n );\n });\n\n app()->bind(OAuthClient::class, function () {\n return new OAuthClient(\n app()->get(Request::class),\n app()->get(ClientToken::class)\n );\n });\n\n app()->bind(AccountService::class, function () {\n return new AccountService(app()->get(OAuthClient::class));\n });\n }", "public function boot()\n {\n Client::observe(ClientObserver::class);\n $this->app->bind(ClientRepositoryInterface::class, function ($app) {\n return new ClientRepository(Client::class);\n });\n $this->app->bind(UserRepositoryInterface::class, function ($app) {\n return new UserRepository(User::class);\n });\n }", "public function boot()\n {\n $this->setupFacades(); \n //$this->setupConfigs(); \n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n //\n }\n\n $this->loadRoutesFrom(__DIR__ . '/routes.php');\n }", "public function boot()\n {\n $path = __DIR__.'/../..';\n\n $this->package('clumsy/cms', 'clumsy', $path);\n\n $this->registerAuthRoutes();\n $this->registerBackEndRoutes();\n\n require $path.'/helpers.php';\n require $path.'/errors.php';\n require $path.'/filters.php';\n\n if ($this->app->runningInConsole()) {\n $this->app->make('Clumsy\\CMS\\Clumsy');\n }\n\n }", "public function boot()\n {\n $this->mergeConfigFrom(__DIR__ . '/../../config/bs4.php', 'bs4');\n $this->loadViewsFrom(__DIR__ . '/../../resources/views', 'bs');\n $this->loadTranslationsFrom(__DIR__ . '/../../resources/lang', 'bs');\n\n if ($this->app->runningInConsole())\n {\n $this->publishes([\n __DIR__ . '/../../resources/views' => resource_path('views/vendor/bs'),\n ], 'views');\n\n $this->publishes([\n __DIR__ . '/../../resources/lang' => resource_path('lang/vendor/bs'),\n ], 'lang');\n\n $this->publishes([\n __DIR__ . '/../../config' => config_path(),\n ], 'config');\n }\n }", "public function boot()\n {\n $this->client = new HttpClient([\n 'base_uri' => 'https://api.ipfinder.io/v1/',\n 'headers' => [\n 'User-Agent' => 'Laravel-GeoIP-Torann',\n ],\n 'query' => [\n 'token' => $this->config('key'),\n ],\n ]);\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n Check::class,\n Clear::class,\n Fix::class,\n Fresh::class,\n Foo::class,\n Ide::class,\n MakeDatabase::class,\n Ping::class,\n Version::class,\n ]);\n }\n }", "public function boot()\n {\n $app = $this->app;\n\n if (!$app->runningInConsole()) {\n return;\n }\n\n $source = realpath(__DIR__ . '/config/config.php');\n\n if (class_exists('Illuminate\\Foundation\\Application', false)) {\n // L5\n $this->publishes([$source => config_path('sniffer-rules.php')]);\n $this->mergeConfigFrom($source, 'sniffer-rules');\n } elseif (class_exists('Laravel\\Lumen\\Application', false)) {\n // Lumen\n $app->configure('sniffer-rules');\n $this->mergeConfigFrom($source, 'sniffer-rules');\n } else {\n // L4\n $this->package('chefsplate/sniffer-rules', null, __DIR__);\n }\n }", "public function boot()\r\n\t{\r\n\t\t$this->package('estey/hipsupport');\r\n\t\t$this->registerHipSupport();\r\n\t\t$this->registerHipSupportOnlineCommand();\r\n\t\t$this->registerHipSupportOfflineCommand();\r\n\r\n\t\t$this->registerCommands();\r\n\t}", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n ControllerMakeCommand::class,\n ServiceMakeCommand::class,\n RepositoryMakeCommand::class,\n ModelMakeCommand::class,\n RequestRuleMakeCommand::class,\n ]);\n }\n }", "public function boot() {\n $srcDir = __DIR__ . '/../';\n \n $this->package('baseline/baseline', 'baseline', $srcDir);\n \n include $srcDir . 'Http/routes.php';\n include $srcDir . 'Http/filters.php';\n }", "public function boot()\n {\n $this->app->bind('App\\Services\\ProviderAccountService', function() {\n return new ProviderAccountService;\n });\n }", "public function boot()\n {\n $this->loadViewsFrom(__DIR__ . '/resources/views', 'Counters');\n\n $this->loadTranslationsFrom(__DIR__ . '/resources/lang', 'Counters');\n\n\n //To load migration files directly from the package\n// $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');\n\n\n $this->app->booted(function () {\n $loader = AliasLoader::getInstance();\n $loader->alias('Counters', Counters::class);\n\n });\n\n $this->publishes([\n __DIR__ . '/../config/counter.php' => config_path('counter.php'),\n ], 'config');\n\n\n\n $this->publishes([\n __DIR__.'/../database/migrations/0000_00_00_000000_create_counters_tables.php' => $this->app->databasePath().\"/migrations/0000_00_00_000000_create_counters_tables.php\",\n ], 'migrations');\n\n\n if ($this->app->runningInConsole()) {\n $this->commands([\\Maher\\Counters\\Commands\\MakeCounter::class]);\n }\n\n\n }", "public function boot(Application $app)\n {\n\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }" ]
[ "0.7344842", "0.7212776", "0.7207748", "0.7123287", "0.7109729", "0.70822036", "0.7076881", "0.70718396", "0.7051853", "0.7025475", "0.7011949", "0.70043486", "0.6955807", "0.69322443", "0.69319373", "0.69272774", "0.6911386", "0.69069713", "0.6898877", "0.6898432", "0.6896597", "0.6889767", "0.6886577", "0.6880688", "0.6875815", "0.6874972", "0.68696195", "0.6864291", "0.6864246", "0.68631536", "0.68599164", "0.6857919", "0.685537", "0.68552583", "0.68522125", "0.6839775", "0.683261", "0.6831196", "0.68272495", "0.68250644", "0.68241394", "0.68181944", "0.68132496", "0.68117976", "0.6811785", "0.6808445", "0.68066794", "0.680175", "0.68005246", "0.67994386", "0.67969066", "0.67912513", "0.67884964", "0.678574", "0.678558", "0.6783794", "0.67782456", "0.6773669", "0.6766658", "0.6766194", "0.67617613", "0.67611295", "0.6758855", "0.6756636", "0.6754412", "0.6751842", "0.6747439", "0.6744991", "0.67441815", "0.6743506", "0.67400324", "0.6739403", "0.6738356", "0.6738189", "0.6731425", "0.6730627", "0.67293024", "0.6726232", "0.67261064", "0.67192256", "0.6716676", "0.6716229", "0.671442", "0.6713091", "0.6702467", "0.66990495", "0.66913867", "0.6689953", "0.66861963", "0.66840357", "0.66826946", "0.6681548", "0.6680455", "0.6676407", "0.6675645", "0.6672465", "0.66722375", "0.66722375", "0.66722375", "0.66722375", "0.66722375" ]
0.0
-1
sg_map_meta_cap function to add Meta Capability Handling.
public function sg_map_meta_cap( $caps, $cap, $user_id, $args ) { $capability_type = 'small_group'; if ( 'edit_' . $capability_type == $cap || 'delete_' . $capability_type == $cap || 'read_' . $capability_type == $cap ) { $post = get_post( $args[0] ); $post_type = get_post_type_object( $post->post_type ); /* Set an empty array for the caps. */ $caps = array( ); } /* If editing a help note, assign the required capability. */ if ( "edit_{$capability_type}" == $cap ) { if( $user_id == $post->post_author ) $caps[] = $post_type->cap->edit_posts; else $caps[] = $post_type->cap->edit_others_posts; } /* If deleting a help note, assign the required capability. */ elseif( "delete_{$capability_type}" == $cap ) { if( isset( $post->post_author ) && $user_id == $post->post_author && isset( $post_type->cap->delete_posts ) ) $caps[] = $post_type->cap->delete_posts; elseif ( isset( $post_type->cap->delete_others_posts ) ) $caps[] = $post_type->cap->delete_others_posts; } /* If reading a private help note, assign the required capability. */ elseif( "read_{$capability_type}" == $cap ) { if( 'private' != $post->post_status ) $caps[] = 'read'; elseif ( $user_id == $post->post_author ) $caps[] = 'read'; else $caps[] = $post_type->cap->read_private_posts; } /* Return the capabilities required by the user. */ return $caps; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setMapMetaCap($metaCap = true){\n\t\t$this->mapMetaCap = $metaCap;\n\t}", "function map_meta_cap($cap, $user_id, ...$args)\n {\n }", "function erp_map_meta_caps( $caps = array(), $cap = '', $user_id = 0, $args = array() ) {\n return apply_filters( 'erp_map_meta_caps', $caps, $cap, $user_id, $args );\n}", "function my_map_meta_cap( $caps, $cap, $user_id, $args ) {\n\tif ( 'edit_game' == $cap || 'delete_game' == $cap || 'read_game' == $cap ) {\n\t\t$post = get_post( $args[0] );\n\t\t$post_type = get_post_type_object( $post->post_type );\n\n\t\t/* Set an empty array for the caps. */\n\t\t$caps = array();\n\t}\n\t\n\t/* If editing, deleting, or reading a resource, get the post and post type object. */\n\tif ( 'edit_resouce' == $cap || 'delete_resource' == $cap || 'read_resouce' == $cap ) {\n\t\t$post = get_post( $args[0] );\n\t\t$post_type = get_post_type_object( $post->post_type );\n\n\t\t/* Set an empty array for the caps. */\n\t\t$caps = array();\n\t}\n\t\n\tif ( 'edit_person' == $cap || 'delete_person' == $cap || 'read_person' == $cap ) {\n\t\t$post = get_post( $args[0] );\n\t\t$post_type = get_post_type_object( $post->post_type );\n\n\t\t/* Set an empty array for the caps. */\n\t\t$caps = array();\n\t}\n\n\t/* If editing a game, assign the required capability. */\n\tif ( 'edit_game' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->edit_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->edit_others_posts;\n\t}\n\t\n\n\t\n\t/* If editing a resource, assign the required capability. */\n\tif ( 'edit_resource' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->edit_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->edit_others_posts;\n\t}\n\t\n\n\t\n\tif ( 'edit_person' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->edit_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->edit_others_posts;\n\t}\n\n\t/* If deleting a game, assign the required capability. */\n\telseif ( 'delete_game' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->delete_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->delete_others_posts;\n\t}\n\t\n\t/* If deleting a resource, assign the required capability. */\n\telseif ( 'delete_resouce' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->delete_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->delete_others_posts;\n\t}\n\t\n\telseif ( 'delete_person' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->delete_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->delete_others_posts;\n\t}\n\n\t/* If reading a private game, assign the required capability. */\n\telseif ( 'read_game' == $cap ) {\n\n\t\tif ( 'private' != $post->post_status )\n\t\t\t$caps[] = 'read';\n\t\telseif ( $user_id == $post->post_author )\n\t\t\t$caps[] = 'read';\n\t\telse\n\t\t\t$caps[] = $post_type->cap->read_private_posts;\n\t}\n\t\n\t/* If reading a private resource, assign the required capability. */\n\telseif ( 'read_resouce' == $cap ) {\n\n\t\tif ( 'private' != $post->post_status )\n\t\t\t$caps[] = 'read';\n\t\telseif ( $user_id == $post->post_author )\n\t\t\t$caps[] = 'read';\n\t\telse\n\t\t\t$caps[] = $post_type->cap->read_private_posts;\n\t}\n\t\n\telseif ( 'read_person' == $cap ) {\n\n\t\tif ( 'private' != $post->post_status )\n\t\t\t$caps[] = 'read';\n\t\telseif ( $user_id == $post->post_author )\n\t\t\t$caps[] = 'read';\n\t\telse\n\t\t\t$caps[] = $post_type->cap->read_private_posts;\n\t}\n\n\t/* Return the capabilities required by the user. */\n\treturn $caps;\n}", "public function mapMetaCaps($caps, $cap, $user_id, $args) {\n global $post;\n\n $objectId = (isset($args[0]) ? $args[0] : null);\n\n // First of all delete all artificial capabilities from the $caps\n foreach($caps as $i => $capability) {\n if (strpos($capability, 'aam|') === 0) {\n // Remove this capability from the mapped array and let WP Core\n // handle the correct mapping\n $capability = null; \n }\n\n if (in_array($capability, AAM_Backend_Feature_Main_Capability::$groups['aam'], true)) {\n if (!AAM_Core_API::capabilityExists($capability)) {\n $capability = AAM_Core_Config::get(\n 'page.capability', 'administrator'\n );\n }\n }\n\n if ($capability === null) {\n unset($caps[$i]);\n } else {\n $caps[$i] = $capability;\n }\n }\n\n switch($cap) {\n case 'edit_user':\n case 'delete_user':\n // Some plugins or themes simply do not provide the the user ID for\n // these capabilities. I did not find in WP core any place were they\n // violate this rule\n if (!empty($objectId)) {\n $caps = $this->authorizeUserUpdate($caps, $objectId);\n }\n break;\n \n case 'install_plugins':\n case 'delete_plugins':\n case 'edit_plugins':\n case 'update_plugins':\n $action = explode('_', $cap);\n $caps = $this->checkPluginsAction($action[0], $caps, $cap);\n break;\n \n case 'activate_plugin':\n case 'deactivate_plugin':\n $action = explode('_', $cap);\n $caps = $this->checkPluginAction($objectId, $action[0], $caps, $cap);\n break;\n\n // This part needs to stay to cover scenarios where WP_Post_Type->cap->...\n // is not used but rather the hardcoded capability \n case 'edit_post':\n $caps = $this->authorizePostEdit($caps, $objectId);\n break;\n \n case 'delete_post':\n $caps = $this->authorizePostDelete($caps, $objectId);\n break;\n \n case 'read_post':\n $caps = $this->authorizePostRead($caps, $objectId);\n break;\n \n \n case 'publish_post':\n case 'publish_posts':\n case 'publish_pages':\n // There is a bug in WP core that instead of checking if user has\n // ability to publish_post, it checks for edit_post. That is why\n // user has to be on the edit\n if (is_a($post, 'WP_Post')) {\n $caps = $this->authorizePublishPost($caps, $post->ID);\n }\n break;\n \n default:\n if (strpos($cap, 'aam|') === 0) {\n if (!$this->skipMetaCheck) {\n $this->skipMetaCheck = true;\n $caps = $this->checkPostTypePermission($caps, $cap, $objectId);\n $this->skipMetaCheck = false;\n }\n } else {\n $caps = apply_filters('aam-map-meta-caps-filter', $caps, $cap, $args);\n }\n break;\n }\n \n return $caps;\n }", "function map_meta_cap( $caps, $cap, $user_id, $args ){\n\n switch( $cap ){\n case 'edit_user':\n case 'remove_user':\n case 'promote_user':\n if( isset($args[0]) && $args[0] == $user_id )\n break;\n elseif( !isset($args[0]) )\n $caps[] = 'do_not_allow';\n $other = new WP_User( absint($args[0]) );\n if( $other->has_cap( 'administrator' ) ){\n if(!current_user_can('administrator')){\n $caps[] = 'do_not_allow';\n }\n }\n break;\n case 'delete_user':\n case 'delete_users':\n if( !isset($args[0]) )\n break;\n $other = new WP_User( absint($args[0]) );\n if( $other->has_cap( 'administrator' ) ){\n if(!current_user_can('administrator')){\n $caps[] = 'do_not_allow';\n }\n }\n break;\n default:\n break;\n }\n return $caps;\n }", "function servicio_meta_cap( $caps, $cap, $user_id, $args ) {\n\tif ( 'edit_servicio' == $cap || 'delete_servicio' == $cap || 'read_servicio' == $cap ) {\n\t\t$post = get_post( $args[0] );\n\t\t$post_type = get_post_type_object( $post->post_type );\n\n\t\t/* Set an empty array for the caps. */\n\t\t$caps = array();\n\t}\n\n\t/* If editing a servicio, assign the required capability. */\n\tif ( 'edit_servicio' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->edit_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->edit_others_posts;\n\t}\n\n\t/* If deleting a servicio, assign the required capability. */\n\telseif ( 'delete_servicio' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->delete_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->delete_others_posts;\n\t}\n\n\t/* If reading a private servicio, assign the required capability. */\n\telseif ( 'read_servicio' == $cap ) {\n\n\t\tif ( 'private' != $post->post_status )\n\t\t\t$caps[] = 'read';\n\t\telseif ( $user_id == $post->post_author )\n\t\t\t$caps[] = 'read';\n\t\telse\n\t\t\t$caps[] = $post_type->cap->read_private_posts;\n\t}\n\n\t/* Return the capabilities required by the user. */\n\treturn $caps;\n}", "function _post_type_meta_capabilities($capabilities = \\null)\n {\n }", "public function map_meta_cap($caps, $cap, $user_id, $args)\n {\n switch ($cap) {\n case 'edit_user':\n case 'remove_user':\n case 'promote_user':\n if (isset($args[0]) && $args[0] == $user_id) {\n break;\n } elseif (!isset($args[0])) {\n $caps[] = 'do_not_allow';\n }\n\n $other = new WP_User(absint($args[0]));\n if ($other->has_cap('administrator')) {\n if (!current_user_can('administrator')) {\n $caps[] = 'do_not_allow';\n }\n }\n break;\n case 'delete_user':\n case 'delete_users':\n if (!isset($args[0])) {\n break;\n }\n\n $other = new WP_User(absint($args[0]));\n if ($other->has_cap('administrator')) {\n if (!current_user_can('administrator')) {\n $caps[] = 'do_not_allow';\n }\n }\n break;\n default:\n break;\n }\n return $caps;\n }", "function wck_add_meta(){\n\t\tparent::wck_add_meta();\n\t}", "function convocatoria_meta_cap( $caps, $cap, $user_id, $args ) {\n\tif ( 'edit_convocatoria' == $cap || 'delete_convocatoria' == $cap || 'read_convocatoria' == $cap ) {\n\t\t$post = get_post( $args[0] );\n\t\t$post_type = get_post_type_object( $post->post_type );\n\n\t\t/* Set an empty array for the caps. */\n\t\t$caps = array();\n\t}\n\n\t/* If editing a convocatoria, assign the required capability. */\n\tif ( 'edit_convocatoria' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->edit_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->edit_others_posts;\n\t}\n\n\t/* If deleting a convocatoria, assign the required capability. */\n\telseif ( 'delete_convocatoria' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->delete_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->delete_others_posts;\n\t}\n\n\t/* If reading a private convocatoria, assign the required capability. */\n\telseif ( 'read_convocatoria' == $cap ) {\n\n\t\tif ( 'private' != $post->post_status )\n\t\t\t$caps[] = 'read';\n\t\telseif ( $user_id == $post->post_author )\n\t\t\t$caps[] = 'read';\n\t\telse\n\t\t\t$caps[] = $post_type->cap->read_private_posts;\n\t}\n\n\t/* Return the capabilities required by the user. */\n\treturn $caps;\n}", "function banner_meta_cap( $caps, $cap, $user_id, $args ) {\n\tif ( 'edit_banner' == $cap || 'delete_banner' == $cap || 'read_banner' == $cap ) {\n\t\t$post = get_post( $args[0] );\n\t\t$post_type = get_post_type_object( $post->post_type );\n\n\t\t/* Set an empty array for the caps. */\n\t\t$caps = array();\n\t}\n\n\t/* If editing a banner, assign the required capability. */\n\tif ( 'edit_banner' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->edit_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->edit_others_posts;\n\t}\n\n\t/* If deleting a banner, assign the required capability. */\n\telseif ( 'delete_banner' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->delete_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->delete_others_posts;\n\t}\n\n\t/* If reading a private banner, assign the required capability. */\n\telseif ( 'read_banner' == $cap ) {\n\n\t\tif ( 'private' != $post->post_status )\n\t\t\t$caps[] = 'read';\n\t\telseif ( $user_id == $post->post_author )\n\t\t\t$caps[] = 'read';\n\t\telse\n\t\t\t$caps[] = $post_type->cap->read_private_posts;\n\t}\n\n\t/* Return the capabilities required by the user. */\n\treturn $caps;\n}", "function producto_meta_cap( $caps, $cap, $user_id, $args ) {\n\tif ( 'edit_producto' == $cap || 'delete_producto' == $cap || 'read_producto' == $cap ) {\n\t\t$post = get_post( $args[0] );\n\t\t$post_type = get_post_type_object( $post->post_type );\n\n\t\t/* Set an empty array for the caps. */\n\t\t$caps = array();\n\t}\n\n\t/* If editing a producto, assign the required capability. */\n\tif ( 'edit_producto' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->edit_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->edit_others_posts;\n\t}\n\n\t/* If deleting a producto, assign the required capability. */\n\telseif ( 'delete_producto' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->delete_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->delete_others_posts;\n\t}\n\n\t/* If reading a private producto, assign the required capability. */\n\telseif ( 'read_producto' == $cap ) {\n\n\t\tif ( 'private' != $post->post_status )\n\t\t\t$caps[] = 'read';\n\t\telseif ( $user_id == $post->post_author )\n\t\t\t$caps[] = 'read';\n\t\telse\n\t\t\t$caps[] = $post_type->cap->read_private_posts;\n\t}\n\n\t/* Return the capabilities required by the user. */\n\treturn $caps;\n}", "public function add_meta( &$object, $meta );", "function directorio_meta_cap( $caps, $cap, $user_id, $args ) {\n\tif ( 'edit_directorio' == $cap || 'delete_directorio' == $cap || 'read_directorio' == $cap ) {\n\t\t$post = get_post( $args[0] );\n\t\t$post_type = get_post_type_object( $post->post_type );\n\n\t\t/* Set an empty array for the caps. */\n\t\t$caps = array();\n\t}\n\n\t/* If editing a directorio, assign the required capability. */\n\tif ( 'edit_directorio' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->edit_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->edit_others_posts;\n\t}\n\n\t/* If deleting a directorio, assign the required capability. */\n\telseif ( 'delete_directorio' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->delete_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->delete_others_posts;\n\t}\n\n\t/* If reading a private directorio, assign the required capability. */\n\telseif ( 'read_directorio' == $cap ) {\n\n\t\tif ( 'private' != $post->post_status )\n\t\t\t$caps[] = 'read';\n\t\telseif ( $user_id == $post->post_author )\n\t\t\t$caps[] = 'read';\n\t\telse\n\t\t\t$caps[] = $post_type->cap->read_private_posts;\n\t}\n\n\t/* Return the capabilities required by the user. */\n\treturn $caps;\n}", "private static function map_capability($role, $role_info, $existing_cap, $new_cap) {\n if (isset($role_info['capabilities'][$new_cap])) {\n // Already has new cap…\n if (!self::has_capability($role_info, $existing_cap)) {\n // But shouldn't have it!\n $role->remove_cap($new_cap);\n }\n }\n else {\n // Doesn't have new cap…\n if (self::has_capability($role_info, $existing_cap)) {\n // But should have it!\n $role->add_cap($new_cap);\n }\n }\n }", "public function addMeta(Meta $meta) {\n $this->meta[$meta->getName()] = $meta;\n }", "public function add_meta( &$object, $meta ) {\n\t\t}", "protected function set_meta( $meta ) {\n\t\t$this->meta = wp_parse_args( $meta, $this->meta );\n\t}", "function documento_meta_cap( $caps, $cap, $user_id, $args ) {\n\tif ( 'edit_documento' == $cap || 'delete_documento' == $cap || 'read_documento' == $cap ) {\n\t\t$post = get_post( $args[0] );\n\t\t$post_type = get_post_type_object( $post->post_type );\n\n\t\t/* Set an empty array for the caps. */\n\t\t$caps = array();\n\t}\n\n\t/* If editing a documento, assign the required capability. */\n\tif ( 'edit_documento' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->edit_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->edit_others_posts;\n\t}\n\n\t/* If deleting a documento, assign the required capability. */\n\telseif ( 'delete_documento' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->delete_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->delete_others_posts;\n\t}\n\n\t/* If reading a private documento, assign the required capability. */\n\telseif ( 'read_documento' == $cap ) {\n\n\t\tif ( 'private' != $post->post_status )\n\t\t\t$caps[] = 'read';\n\t\telseif ( $user_id == $post->post_author )\n\t\t\t$caps[] = 'read';\n\t\telse\n\t\t\t$caps[] = $post_type->cap->read_private_posts;\n\t}\n\n\t/* Return the capabilities required by the user. */\n\treturn $caps;\n}", "protected function save_meta() {}", "public function add_meta( &$object, $meta ) {\n\t\t// TODO: Implement add_meta() method.\n\t}", "protected function add_VcMap($params, $name='', $shortcode='', $show_settings=true){\n\t\t// \t$name = str_replace($namespace. '\\\\','', get_class($this) );\n if(!$name) $name = 'Magiccart ' . ucfirst($this->_class);\n \tif(!$shortcode) $shortcode = 'magiccart_' . strtolower($this->_class);\n // $html_template = plugin_dir_path(__DIR__) . 'Magiccart/Composer/view/frontend/templates/vc_template.php';\n \t$this->_vcSetting = array(\n \t\t\t'name' => $name,\n \t\t\t'base' => $shortcode,\n \t\t\t'category' => __( 'Magiccart', 'alothemes' ),\n 'is_container' => false,\n \t\t\t'params'\t => $params,\n 'icon' => get_template_directory_uri() . \"/images/logo.png\",\n 'show_settings_on_create' => $show_settings,\n // 'html_template' => locate_template('templates/vc_row-header.php') ,\n\n \t);\n \n vc_map($this->_vcSetting);\n }", "function add_metadata($meta_type, $object_id, $meta_key, $meta_value, $unique = \\false)\n {\n }", "public static function set_meta($meta,$movabl_type,$movabl_guid) {\n global $mvs_db;\n\n $sanitized_meta = self::sanitize_data('meta',$meta);\n $sanitized_guid = $mvs_db->real_escape_string($movabl_guid);\n $sanitized_type = $mvs_db->real_escape_string($movabl_type);\n\n foreach ($sanitized_meta as $k => $v)\n Movabls_Data::data_query(\"REPLACE INTO `mvs_meta` (`movabls_GUID`,`movabls_type`,`key`,`value`) VALUES ('$sanitized_guid','$sanitized_type','$k','$v')\");\n\n \n return true;\n\n }", "public function setCAPMedico($cap) {\n $this->_CAP = $cap;\n }", "protected function addMeta() {\n foreach ($this->meta_info as $key => $meta) {\n $this->header.=\"<meta name='\" . $key . \"' content='\" . $meta . \"' /> \\n\";\n }\n }", "function mars_video_meta() {}", "function addMeta() {\n\t\n\tif( class_exists('acf') ) {\n\n\t$meta_description = get_field('meta_description', 'option');\n\t$meta_keywords = get_field('meta_keywords', 'option');\n\t$meta_author = get_field('meta_author', 'option');\n\t$meta_og_image = get_field('meta_og_img', 'option');\n\t$meta_img_full = $meta_og_image['url'];\n\n\t}\n\n\tif ( $meta_description ) {\n\t\techo '<meta name=\"description\" content=\"'.$meta_description.'\">'; \n\t}\n\n\tif ( $meta_keywords ) {\n\t\techo '<meta name=\"keywords\" content=\"'.$meta_keywords.'\">'; \n\t}\n\n\tif ( $meta_author ) {\n\t\techo '<meta name=\"author\" content=\"'.$meta_author.'\">'; \n\t}\n\n\tif ( $meta_og_image ) {\n\t\techo '<meta name=\"twitter:card\" content=\"summary\" />';\n\t\techo '<meta property=\"og:image\" content=\"'.$meta_img_full.'\" />';\n\t}\n\n}", "public function add_meta() {\n\t\techo \"\\n<meta data-plugin='a04_vertical_button' name='description' content='a sample meta description for this website'/>\\n\\n\";\n\t}", "public function add_meta( $key, $value, $unique = false );", "public function setMeta($var)\n {\n $arr = GPBUtil::checkMapField($var, \\Google\\Protobuf\\Internal\\GPBType::STRING, \\Google\\Protobuf\\Internal\\GPBType::STRING);\n $this->Meta = $arr;\n\n return $this;\n }", "public function onMetaParsed(&$meta)\n {\n $meta['tags'] = PicoTags::parseTags($meta['tags']);\n $meta['filter'] = PicoTags::parseTags($meta['filter']);\n }", "public function addMeta(string $key, $value): void\n {\n $this->addMetaHook(function (RequestDetails $requestDetails) use ($key, $value) {\n return [\n 'key' => $key,\n 'value' => $value,\n ];\n });\n }", "public function initializeByMeta($meta)\n {\n }", "public function setMeta(array $meta): Mapping\n {\n return $this->setParam('_meta', $meta);\n }", "function mpfy_shortcode_custom_mapping($atts, $content) {\n\tglobal $mpfy_footer_scripts;\n\tstatic $mpfy_instances = -1;\n\t$mpfy_instances ++;\n\n\tif (!defined('MPFY_LOAD_ASSETS')) {\n\t\tdefine('MPFY_LOAD_ASSETS', true);\n\t}\n\n\textract( shortcode_atts( array(\n\t\t'width'=>0,\n\t\t'height'=>300,\n\t\t'map_id'=>0,\n\t), $atts));\n\n\tif (!stristr($width, '%')) {\n\t\t$width = intval($width);\n\t\t$width = ($width < 1) ? 0 : $width . 'px';\n\t}\n\n\tif (!stristr($height, '%')) {\n\t\t$height = intval($height);\n\t\t$height = ($height < 1) ? 300 : $height . 'px';\n\t}\n\n\tif ($map_id == 0) {\n\t\t$map_id = Mpfy_Map::get_first_map_id();\n\t}\n\n\t$map = get_post(intval($map_id));\n\tif (!$map || is_wp_error($map) || $map->post_type != 'map') {\n\t\treturn 'Invalid or no map_id specified.';\n\t}\n\n\t$map = new Mpfy_Map($map->ID);\n\n\t$template = include('templates/map.php');\n\t$mpfy_footer_scripts .= $template['script'];\n\treturn $template['html'];\n}", "public function add_cap($cap, $grant = \\true)\n {\n }", "public function add_cap($cap, $grant = \\true)\n {\n }", "public function add_custom_capabilities(){\n\t\t$roles = array( 'editor', 'administrator' );\n\t\t// Loop through each role and assign capabilities\n\t\tforeach($roles as $the_role) { \n\t\t\t$role = get_role($the_role);\n\t\t\t// Post Type\n\t\t\t$role->add_cap( 'edit_person' );\n\t\t\t$role->add_cap( 'read_person' );\n\t\t\t$role->add_cap( 'delete_person' );\n\t\t\t$role->add_cap( 'edit_people' );\n\t\t\t$role->add_cap( 'edit_others_people' );\n\t\t\t$role->add_cap( 'publish_people' );\n\t\t\t$role->add_cap( 'read_private_people' );\n\t\t\t// Taxonomy\n\t\t\t$role->add_cap( 'manage_person_roles' );\n\t\t}\n\t}", "function htheme_map_shortcode( $atts ) {\r\n\r\n\t\t#SETUP CONTENT CLASS\r\n\t\t$htheme_data = $this->htheme_content->htheme_get_map($atts);\r\n\r\n\t\t#RETURN DATA/HTML\r\n\t\treturn $htheme_data;\r\n\r\n\t}", "function ps_imagemanager_add_capabilities($caps) {\n\tunset($caps[array_search('ImageManager Upload', $caps)]);\n\tunset($caps[array_search('ImageManager MkDir', $caps)]);\n\n\t// add role\n\t$upload_files = array_search('upload_files', $caps); //Prior to PHP 4.2.0, array_search() returns NULL on failure instead of FALSE.\n\tif ($upload_files == FALSE || $upload_files == NULL) {\n\t\t$caps[] = 'upload_files';\n\t}\n\t$make_directory = array_search('make_directory', $caps);\n\tif ($make_directory == FALSE || $make_directory == NULL) {\n\t\t$caps[] = 'make_directory';\n\t}\n\t$edit_image = array_search('edit_image', $caps);\n\tif ($edit_image == FALSE || $edit_image == NULL) {\n\t\t$caps[] = 'edit_image';\n\t}\t\n\t$delete_image = array_search('delete_image', $caps);\n\tif ($delete_image == FALSE || $delete_image == NULL) {\n\t\t$caps[] = 'delete_image';\n\t}\n\treturn $caps;\n}", "protected function applyMeta(): void\n {\n $this->state->mergeIntoArray('tca.meta', $this->cache->get(static::TCA_META_CACHE_KEY, []));\n }", "protected function processMeta($control, $meta)\n\t {\n\t\tif($control instanceof TextInput && isset($meta['length'])) {\n\t\t $control->maxLenght = $meta['length'];\n\t\t}\n\t }", "public function addMeta($key, $value)\n {\n $this->meta[$key] = $value;\n }", "public function addMetaTag($name,$desc){\n $this->_metaTags[$name] = $desc;\n }", "public function setMeta($meta)\n {\n $this->setValue('meta', $meta);\n }", "public function setMeta($meta)\n {\n $this->setValue('meta', $meta);\n }", "function add_capability( $capabilities ) {\n\n $capabilities[ self::$capability ] = __( 'Manage Admin Tools', 'wpp' );\n\n return $capabilities;\n }", "function is_site_meta_supported()\n {\n }", "private function import_metas() {\n\t\tWPSEO_Meta::replace_meta( '_aioseop_description', WPSEO_Meta::$meta_prefix . 'metadesc', $this->replace );\n\t\tWPSEO_Meta::replace_meta( '_aioseop_keywords', WPSEO_Meta::$meta_prefix . 'metakeywords', $this->replace );\n\t\tWPSEO_Meta::replace_meta( '_aioseop_title', WPSEO_Meta::$meta_prefix . 'title', $this->replace );\n\t}", "protected function _init_caps($cap_key = '')\n {\n }", "private function import_metas() {\n\t\tWPSEO_Meta::replace_meta( '_aioseop_description', WPSEO_Meta::$meta_prefix . 'metadesc', false );\n\t\tWPSEO_Meta::replace_meta( '_aioseop_keywords', WPSEO_Meta::$meta_prefix . 'metakeywords', false );\n\t\tWPSEO_Meta::replace_meta( '_aioseop_title', WPSEO_Meta::$meta_prefix . 'title', false );\n\t}", "function construction_realestate_posttype_cs_custom_meta() {\n add_meta_box( 'cs_meta', __( 'Settings', 'construction-realestate-posttype' ), 'construction_realestate_posttype_cs_meta_callback' , 'agents');\n}", "public function add_capabilties_to_roles()\n {\n $post_type_object = get_post_type_object($this->name);\n global $wp_roles;\n $roles = array('administrator');\n foreach( (array)$post_type_object->cap as $capability ){\n foreach( $roles as $role_name ){\n $role = get_role($role_name);\n $role->add_cap($capability);\n }\n }\n }", "protected function update_attribute_meta( $meta_key, $meta_value ) {\n\t\tif ( $attribute = $this->get_mapping_attribute( $meta_key ) ) {\n\t\t\t$this->set_attribute( $attribute, $meta_value );\n\t\t}\n\t}", "public function setMetas($meta)\n {\n if (empty($meta)) {\n return;\n }\n\n foreach ($meta as $key => $value) {\n if (is_callable($value) && !is_string($value)) {\n $value = $value($this);\n }\n\n $this->setMeta($key, $value);\n }\n }", "public function setMetaAttribute($name, $value)\n {\n $this->metaAttributes[$name] = $value;\n }", "public function add_cap( $cap, $grant = true ) {\n\t\t$this->capabilities[ $cap ] = $grant;\n\t\twp_roles()->add_cap( $this->name, $cap, $grant );\n\t}", "function the_meta()\n {\n }", "public function setMeta($key, $value)\n {\n }", "function add_meta($post_id)\n {\n }", "function wp_ajax_add_meta()\n {\n }", "protected function saveMeta($meta){\r\n\t//System::dump($meta);\r\n\t\r\n\tforeach($meta as $item){\r\n\t\t\r\n\t\tif((string)$item->row->attributes()->system_type=='bool'){\r\n\t\t\t$postvalue = !isset($this->sourceData['meta_value_'.(string)$item->row->name]) ? 0: 1;\r\n\t\t}elseif((string)$item->row->attributes()->system_type=='text' || ( (string)$item->row->attributes()->system_type=='blob' && (string)$item->row->attributes()->cleanup==1 ) ){\r\n\t\t\t$postvalue = Filter::makeSafeString($this->sourceData['meta_value_'.(string)$item->row->name]);\r\n\t\t}else{\r\n\t\t\t$postvalue = $this->sourceData['meta_value_'.(string)$item->row->name];\r\n\t\t}\r\n\t\t\r\n\t\t$value = DataValidator::saveData($postvalue, (string)$item->row->attributes()->system_type);\r\n\t\t\r\n\t\t$metaEx = $this->metaRowExists((int)$item->row->name);\r\n\r\n\t\tif($this->id==0 || $metaEx==0){\r\n\t\t\t$id_connect = $this->id==0 ? (int)$this->lastInsert: (int)$this->id;\r\n\t\t\t$q = \"INSERT INTO \"._SQLPREFIX_.$this->metaDataTableName.\" (\".$this->metaConnectId.\", id_meta, \".(string)$item->row->attributes()->system_type.\"_value ) VALUES (\";\r\n\t\t\t$q .= \"'\".Db::escapeField($id_connect).\"', '\".(int)$item->row->name.\"'\".\", '\".Db::escapeField($value).\"')\";\r\n\t\t\r\n\t\t}else{\r\n\t\t\t$id_connect = (int)$this->id;\r\n\t\t\t$q = \"UPDATE \"._SQLPREFIX_.$this->metaDataTableName.\" SET \";\r\n\t\t\t$q .= (string)$item->row->attributes()->system_type.\"_value = '\".Db::escapeField($value).\"' WHERE \".$this->metaConnectId.\" = '\".$id_connect.\"' AND id_meta = '\".(string)$item->row->name.\"'\";\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//echo $q.'<br />'; \r\n\t\tDb::query($q);\r\n\t}\r\n}", "function setMeta($meta, $key, $value, $ignoreExistingKey = false)\n{\n if (!$meta)\n $meta = (object) array();\n\n //Ignore existing key\n if ($ignoreExistingKey) {\n if (isset($meta->{$key}))\n return $meta;\n }\n\n\n $meta->{$key} = $value;\n return $meta;\n}", "public function addMetaHook($callback): void\n {\n $this->metaHooks[] = $callback;\n }", "public function createMediaMeta($bind)\n{\n\n $this->create(\"tbl_mediameta\", [\n\n 'media_id' => $bind['media_id'],\n 'meta_key' => $bind['meta_key'],\n 'meta_value' => $bind['meta_value']\n\n ]);\n\n}", "public function options_capability( $cap ) {\n \treturn 'manage_fonts';\n\t}", "function m_custom_meta() {\r\n add_meta_box( 'sm_meta', __( 'Featured Posts', 'sm-textdomain' ), 'sm_meta_callback', 'post' );\r\n add_meta_box( 'mm_meta', __( 'Main Posts', 'sm-textdomain' ), 'mm_meta_callback', 'post' );\r\n\r\n}", "protected function setMeta(array $meta)\n\t{\n\t\t$this->meta = $meta;\n\n\t\tforeach ($this->meta as $key => $value)\n\t\t{\n\t\t\t$this->router->setGlobal(sprintf('route_%d_%s', $this->index, $key), $value);\n\t\t}\n\t}", "protected function saveMeta() {\n if (empty($this->_metaModified)) {\n // no dirty attributes, nothing to deal with\n return;\n }\n\n $owner = static::tableName();\n $owner_id = $this->{static::meta_id_field()};\n $metaBatchInsert = [];\n\n $mpLen = strlen(static::meta_prefix());\n\n foreach ($this->_metaModified as $key => $mode) {\n // get key without prefix\n $db_key = substr($key, $mpLen);\n\n switch ($mode) {\n case self::META_ADDED:\n $attrs = [\n 'owner' => $owner,\n 'owner_id' => $owner_id,\n 'meta_key' => $db_key,\n 'meta_value' => (string)$this->_meta->$key\n ];\n // the code below is very slow\n $um = new Meta($attrs);\n if ($um->validate()) {\n $metaBatchInsert[] = $attrs;\n } else {\n throw new Exception('Failed to save invalid meta key: ' . $db_key . ' ' . json_encode($um->getFirstErrors(),\n JSON_PRETTY_PRINT));\n }\n// $um->insert();\n break;\n case self::META_MODIFIED:\n Meta::updateAll(\n [\n 'meta_value' => (string)$this->_meta->$key\n ],\n [\n 'owner' => $owner,\n 'owner_id' => $owner_id,\n 'meta_key' => $db_key\n ]);\n break;\n case self::META_UNSET:\n Meta::deleteAll([\n 'owner' => $owner,\n 'owner_id' => $owner_id,\n 'meta_key' => $db_key\n ]);\n break;\n }\n }\n\n if (!empty($metaBatchInsert)) {\n Meta::getDb()->createCommand()->batchInsert(Meta::tableName(),\n ['owner', 'owner_id', 'meta_key', 'meta_value'], $metaBatchInsert)->execute();\n }\n\n $this->_metaModified = [];\n\n $this->trigger(self::EVENT_META_SAVE);\n }", "function add_site_meta($site_id, $meta_key, $meta_value, $unique = \\false)\n {\n }", "protected function initMeta($attr)\n {\n if (isset($attr[\"id\"])) {\n $this->meta[\"id\"] = $attr[\"id\"];\n }\n\n if (isset($attr[\"class\"])) {\n $this->meta[\"class\"] = $attr[\"class\"];\n }\n\n if (isset($attr[\"html\"])) {\n $this->meta[\"html\"] = $attr[\"html\"];\n }\n\n if (isset($attr[\"properties\"])) {\n $this->meta[\"properties\"] = $attr[\"properties\"];\n if (is_array($this->meta[\"properties\"])) {\n foreach ($this->meta[\"properties\"] as $att => $val) {\n $this->meta[\"prop\"] .= \" {$att} = '{$val}'\";\n }\n }\n }\n\n }", "public function vc_map_shortcode() {\n\t\t\tvc_map( array(\n\t\t\t\t'name' => _x( 'Social Icons', 'backend', 'vc-elements-pt' ),\n\t\t\t\t'base' => $this->shortcode_name(),\n\t\t\t\t'category' => _x( 'Content', 'backend', 'vc-elements-pt' ),\n\t\t\t\t'icon' => get_template_directory_uri() . '/vendor/proteusthemes/visual-composer-elements/assets/images/pt.svg',\n\t\t\t\t'as_parent' => array( 'only' => 'pt_vc_social_icon' ),\n\t\t\t\t'content_element' => true,\n\t\t\t\t'js_view' => 'VcColumnView',\n\t\t\t\t'params' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'heading' => _x( 'Open link in new tab', 'backend', 'vc-elements-pt' ),\n\t\t\t\t\t\t'param_name' => 'new_tab',\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t) );\n\t\t}", "function vw_hospital_cs_savecustom_meta() {\n add_meta_box( 'cs_meta', __( 'Settings', 'vw-hospital' ), 'w_hospital_cs_appoint_callback' , 'Appointment','normal', 'high' ); \n}", "public function addMeta($name, $content) {\n\t\t\n\t\t\t$newMeta = new StdClass();\n\t\t\t$newMeta->name = $name;\n\t\t\t$newMeta->content = $content;\n\t\t\t\n\t\t\tforeach ($this->_meta as $meta) {\n\t\t\t\tif ($meta->name == $name) {\n\t\t\t\t\t$meta->content = $content;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$this->_meta[] = $newMeta;\n\t\t\t\n\t\t}", "function carton_add_order_item_meta( $item_id, $meta_key, $meta_value, $unique = false ){\n\treturn add_metadata( 'order_item', $item_id, $meta_key, $meta_value, $unique );\n}", "function _display_maps_meta( $post ) {\n\t\tinclude( 'includes/metaboxes/maps.php' );\n\t}", "function ahr_add_meta_box() {\r\n \r\n add_meta_box( 'ahr', 'Advaned https redirect', 'ahr_render_meta_box', null, 'normal', 'high', null );\r\n \r\n}", "public function add_caps() {\n global $wp_roles;\n\n // TODO: see easy-digital-downloads plugin source codes for example implementation.\n }", "public function add_meta($name, $content = null)\n {\n if (is_array($name))\n {\n foreach ($name as $key => $val)\n {\n $key = htmlspecialchars($key, ENT_QUOTES, 'UTF-8');\n $val = htmlspecialchars($val, ENT_QUOTES, 'UTF-8');\n $this->metatag[$key] = $val;\n }\n }\n else\n {\n $name = htmlspecialchars($name, ENT_QUOTES, 'UTF-8');\n $content = htmlspecialchars($content, ENT_QUOTES, 'UTF-8');\n $this->metatag[$name] = $content;\n }\n return $this;\n }", "public function addMeta(array $metas, string $outputPath): void;", "public function setMeta($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Protobuf\\Any::class);\n $this->meta = $var;\n\n return $this;\n }", "function fiorello_mikado_user_scalable_meta() {\n\t\t//is responsiveness option is chosen?\n\t\tif ( fiorello_mikado_is_responsive_on() ) { ?>\n\t\t\t<meta name=\"viewport\" content=\"width=device-width,initial-scale=1,user-scalable=yes\">\n\t\t<?php } else { ?>\n\t\t\t<meta name=\"viewport\" content=\"width=1200,user-scalable=yes\">\n\t\t<?php }\n\t}", "public function render_screen_meta()\n {\n }", "public static function meta();", "public function register_meta() {\r\n\t\t\tforeach($this->customFields as $customField){\r\n\t\t\t\tadd_meta_box( 'ecf-'.$customField['name'], __( $customField['title'], 'exlist' ), $customField['callback'], $postTypes , 'advanced', 'high', $type = array($customField['name'], $customField['title'], $customField['type']) );\r\n\t\t\t}\r\n }", "public function do_meta_tags() {\n\t\tglobal $posts;\n\t\t$post = null;\n\t\tif ( ! is_array( $posts ) || ! isset( $posts[0] ) || ! is_a( $posts[0], 'WP_Post' ) ) {\n\t\t\treturn;\n\t\t}\n\t\t$post = $posts[0];\n\n\t\t$options = $this->get_saved_options();\n\t\t$site_wide_meta = '';\n\t\tif ( isset( $options['site_wide_meta'] ) ) {\n\t\t\t$site_wide_meta = $options['site_wide_meta'];\n\t\t}\n\n\t\t$cmpvalues = $this->get_enabled_singular_options( $post->post_type );\n\t\t$metatags = array();\n\n\t\t// Add META tags to Singular pages.\n\t\tif ( is_singular() ) {\n\t\t\tif ( ! in_array( '1', $cmpvalues, true ) && ! empty( $options['site_wide_meta'] ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$mt_seo_title = (string) get_post_meta( $post->ID, 'mt_seo_title', true );\n\t\t\t$mt_seo_description = (string) get_post_meta( $post->ID, 'mt_seo_description', true );\n\t\t\t$mt_seo_keywords = (string) get_post_meta( $post->ID, 'mt_seo_keywords', true );\n\t\t\t$mt_seo_google_news_meta = (string) get_post_meta( $post->ID, 'mt_seo_google_news_meta', true );\n\t\t\t$mt_seo_meta = (string) get_post_meta( $post->ID, 'mt_seo_meta', true );\n\n\t\t\tif ( '' === $mt_seo_title ) {\n\t\t\t\t$mt_seo_title = (string) get_post_meta( $post->ID, '_yoast_wpseo_title', true );\n\t\t\t}\n\n\t\t\tif ( '' === $mt_seo_description ) {\n\t\t\t\t$mt_seo_description = (string) get_post_meta( $post->ID, '_yoast_wpseo_metadesc', true );\n\t\t\t}\n\n\t\t\t/*\n\t\t\tDescription. Order of preference:\n\t\t\t1. The post meta value for 'mt_seo_description'\n\t\t\t2. The post excerpt\n\t\t\t*/\n\t\t\tif ( '1' === $cmpvalues['mt_seo_description'] ) {\n\t\t\t\t$meta_description = '';\n\n\t\t\t\tif ( ! empty( $mt_seo_description ) ) {\n\t\t\t\t\t$meta_description = $mt_seo_description;\n\t\t\t\t} elseif ( is_single() ) {\n\t\t\t\t\t$meta_description = $this->get_the_excerpt( $post );\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * Filter the description for a singular post.\n\t\t\t\t *\n\t\t\t\t * @param string Contents of the post description field.\n\t\t\t\t */\n\t\t\t\t$meta_description = apply_filters( 'amt_meta_description', $meta_description );\n\n\t\t\t\tif ( ! empty( $meta_description ) ) {\n\t\t\t\t\t$metatags['description'] = $meta_description;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Custom Meta Tags. This is a fully-rendered META tag, so no need to build it up.\n\t\t\tif ( ! empty( $mt_seo_meta ) && '1' === $cmpvalues['mt_seo_meta'] ) {\n\t\t\t\t// This is a potential difference; no escaping was done on this value in previous versions.\n\t\t\t\t$metatags['custom'] = $mt_seo_meta;\n\t\t\t}\n\n\t\t\t// Google News Meta. From post meta field \"mt-seo-google-news-meta.\n\t\t\tif ( ! empty( $mt_seo_google_news_meta ) && '1' === $cmpvalues['mt_seo_google_news_meta'] ) {\n\t\t\t\t$metatags['news_keywords'] = $mt_seo_google_news_meta;\n\t\t\t}\n\n\t\t\t/*\n\t\t\tTitle is handled using filters\n\t\t\t*/\n\n\t\t\t/*\n\t\t\tKeywords. Created in the following order\n\t\t\t1. The post meta value for 'mt_seo_keywords'\n\t\t\t2. The post's categories and tags.\n\t\t\t*/\n\t\t\tif ( '1' === $cmpvalues['mt_seo_keywords'] ) {\n\t\t\t\tif ( ( self::INCLUDE_KEYWORDS_IN_SINGLE_POSTS && is_single() ) || is_page() ) {\n\t\t\t\t\tif ( ! empty( $mt_seo_keywords ) ) {\n\t\t\t\t\t\t// If there is a custom field, use it.\n\t\t\t\t\t\tif ( is_single() ) {\n\t\t\t\t\t\t\t// For single posts, the %cat% tag is replaced by the post's categories.\n\t\t\t\t\t\t\t$mt_seo_keywords = str_replace( '%cats%', $this->get_post_categories(), $mt_seo_keywords );\n\t\t\t\t\t\t\t// Also, the %tags% tag is replaced by the post's tags.\n\t\t\t\t\t\t\t$mt_seo_keywords = str_replace( '%tags%', $this->get_post_tags(), $mt_seo_keywords );\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$metatags['keywords'] = $mt_seo_keywords;\n\t\t\t\t\t} elseif ( is_single() ) {\n\t\t\t\t\t\t// Add categories and tags for keywords.\n\t\t\t\t\t\t$post_keywords = strtolower( $this->get_post_categories() );\n\t\t\t\t\t\t$post_tags = strtolower( $this->get_post_tags() );\n\n\t\t\t\t\t\t$metatags['keywords'] = $post_keywords . ', ' . $post_tags;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} elseif ( is_home() ) {\n\t\t\t// Add META tags to Home Page.\n\t\t\t// Get set values.\n\t\t\t$site_description = $options['site_description'];\n\t\t\t$site_keywords = $options['site_keywords'];\n\n\t\t\t/*\n\t\t\tDescription\n\t\t\t*/\n\t\t\tif ( empty( $site_description ) ) {\n\t\t\t\t// If $site_description is empty, then use the blog description from the options.\n\t\t\t\t$metatags['description'] = get_bloginfo( 'description' );\n\t\t\t} else {\n\t\t\t\t// If $site_description has been set, then use it in the description meta-tag.\n\t\t\t\t$metatags['description'] = $site_description;\n\t\t\t}\n\n\t\t\t// Keywords.\n\t\t\tif ( empty( $site_keywords ) ) {\n\t\t\t\t// If $site_keywords is empty, then all the blog's categories are added as keywords.\n\t\t\t\t$metatags['keywords'] = $this->get_site_categories();\n\t\t\t} else {\n\t\t\t\t// If $site_keywords has been set, then these keywords are used.\n\t\t\t\t$metatags['keywords'] = $site_keywords;\n\t\t\t}\n\t\t} elseif ( is_tax() || is_tag() || is_category() ) {\n\t\t\t// taxonomy archive page.\n\t\t\t$term_desc = term_description();\n\t\t\tif ( $term_desc ) {\n\t\t\t\t$metatags['description'] = $term_desc;\n\t\t\t}\n\n\t\t\t// The keyword is the term name.\n\t\t\t$term_name = single_term_title( '', false );\n\t\t\tif ( $term_name ) {\n\t\t\t\t$metatags['keywords'] = $term_name;\n\t\t\t}\n\t\t}\n\n\t\tif ( $site_wide_meta ) {\n\t\t\t$metatags['site_wide'] = $site_wide_meta;\n\t\t}\n\n\t\t/**\n\t\t * Filter the generated meta tags. New filter to allow for easier use by passing an array\n\t\t * instead of a string.\n\t\t *\n\t\t * @param array $metatags Contains metatag key->value pairs.\n\t\t */\n\t\t$metatags = apply_filters( 'amt_metatags_array', $metatags );\n\n\t\tif ( is_array( $metatags ) && ! empty( $metatags ) ) {\n\t\t\t$actual_metatags = $this->create_metatags( $metatags );\n\t\t\t$metatags_as_string = implode( PHP_EOL, $actual_metatags );\n\n\t\t\t/**\n\t\t\t * Filter the generated meta tags. Preserved filter from old code that sends the metatags\n\t\t\t * as a string.\n\t\t\t *\n\t\t\t * @param array $metatags_as_string Contains each derived metatag as a return-separated string.\n\t\t\t */\n\t\t\t$metatags_as_string = apply_filters( 'amt_metatags', $metatags_as_string );\n\n\t\t\tif ( is_string( $metatags_as_string ) ) {\n\t\t\t\techo wp_kses( $metatags_as_string . PHP_EOL, $this->get_kses_valid_tags__metatags() );\n\t\t\t}\n\t\t}\n\t}", "public function modifyMeta(array $meta)\n {\n $this->meta = $meta;\n $this->addCustomFieldset();\n\n return $this->meta;\n }", "function fiorello_mikado_meta_boxes_map_after_setup_theme() {\n\t\tdo_action( 'fiorello_mikado_action_before_meta_boxes_map' );\n\t\t\n\t\tforeach ( glob( MIKADO_FRAMEWORK_ROOT_DIR . '/admin/meta-boxes/*/map.php' ) as $meta_box_load ) {\n\t\t\tinclude_once $meta_box_load;\n\t\t}\n\t\t\n\t\tdo_action( 'fiorello_mikado_action_meta_boxes_map' );\n\t\t\n\t\tdo_action( 'fiorello_mikado_action_after_meta_boxes_map' );\n\t}", "function custom_capabilities( $allcaps ) {\n\t// If you can manage options, you can use SST.\n\tif ( ! empty( $allcaps['manage_options'] ) ) {\n\t\t$allcaps['authenticate_sst'] = true;\n\t}\n\n\treturn $allcaps;\n}", "public function get_capability($cap) {\n\n $cap = strtoupper($cap);\n\n /*\n * Supported capability?\n */\n if (!in_array($cap, $this->imap_capabilities)) {\n /*\n * Not found!\n */\n return FALSE;\n } elseif (is_array($this->imap_capabilities[$cap]) && count($this->imap_capabilities[$cap]) > 0) {\n /*\n * Key / value pairs found: return supported capability properties\n */\n return $this->imap_capabilities[$cap];\n } else {\n /*\n * Supported\n */\n return TRUE;\n }\n }", "function metaInit () {\n $this->imageMeta = new ImageMeta($this->getImagePath());\n $this->imageMeta->getMeta();\n }", "function list_meta($meta)\n {\n }", "public function setMeta(array $meta=null) {\n\t\t$this->meta = $meta;\n\t}", "function AP_Meta_Box_Setup() {\n\tadd_action('add_meta_boxes','AP_Meta_Box_Add');\n\n\tadd_action( 'save_post', 'AP_Meta_Box_Save', 10, 2 );\n}", "public function handleShortcodes($attr, $content)\r\n {\r\n $this->mapNum++;\r\n $mapInfo = $this->getMapDetails($attr, $content);\r\n if (function_exists('json_encode')) {\r\n \t$json = json_encode($mapInfo);\r\n } else {\r\n\t\t\trequire_once('json_encode.php');\r\n \t$json = Zend_Json_Encoder::encode($mapInfo);\r\n\t\t}\r\n\r\n return <<<mapCode\r\n<div id='map_{$this->mapNum}' style='width:{$mapInfo->width}; height:{$mapInfo->height};' class='googleMap'></div>\r\n<div id='dir_{$this->mapNum}'></div>\r\n<script type=\"text/javascript\">\r\n//<![CDATA[\r\nif (GBrowserIsCompatible()) {\r\n wpGMaps.wpNewMap({$this->mapNum}, {$json});\r\n}\r\n//]]>\r\n</script>\r\nmapCode;\r\n }", "public function apb_add_meta_boxes() {\r\n\t}", "private function parseMeta( $data ) {\n $regex = $this->regex;\n \n // Extract\n preg_match($regex['meta'], $data, $match);\n \n // Save the raw data.\n $this->raw = $raw = $match[0];\n \n // Remove data boundaries, and create a basic array from the data.\n $raw = preg_split($regex['break'], trim(preg_replace($regex['bound'], '', $raw)));\n \n // Interpret the raw data.\n $raw = array_map(function($pair) use ($regex){\n \n $array = array_map('trim', preg_split($regex['data'], $pair, 2));\n\n return $array;\n \n }, array_filter($raw, function($item){\n \n return isset($item);\n \n }));\n \n // Format the raw data.\n foreach( $raw as &$meta ) { \n \n $meta[1] = $this->formatMeta( $meta[1] );\n \n }\n \n // Reduce the raw data.\n for( $i = count($raw) - 1; $i > -1; $i-- ) { \n \n $meta = $raw[$i];\n \n $raw[$meta[0]] = $meta[1];\n \n unset($raw[$i]);\n \n }\n\n // Return the real meta data.\n return array_merge( $raw );\n \n }", "public function addMeta($name, $content)\n\t{\n\t\t$this->meta[$name] = '<META name=\"' . $name . '\" content=\"'. $content .'\">' . PHP_EOL;\n\t}" ]
[ "0.7113233", "0.68950325", "0.68331647", "0.6664682", "0.6118787", "0.6091864", "0.5811714", "0.58066976", "0.5763529", "0.56482375", "0.56384635", "0.55844116", "0.5581189", "0.55544406", "0.55460584", "0.5411758", "0.5384209", "0.5345685", "0.51998556", "0.5140477", "0.5113", "0.50718355", "0.5050998", "0.50498456", "0.50450104", "0.50308925", "0.5025702", "0.5025236", "0.50238335", "0.5016762", "0.5006111", "0.49913162", "0.49803284", "0.49747914", "0.49743465", "0.49665195", "0.49570587", "0.49538136", "0.49538136", "0.4953636", "0.4935872", "0.4931291", "0.49252367", "0.49175173", "0.48655346", "0.48614365", "0.48227575", "0.48227575", "0.48172048", "0.48139763", "0.48042884", "0.47980604", "0.4784453", "0.47796887", "0.47723404", "0.47705042", "0.47501418", "0.47420278", "0.47419277", "0.47387823", "0.47320595", "0.47254887", "0.47230995", "0.4715082", "0.47128803", "0.4686677", "0.46800196", "0.46783733", "0.4671121", "0.46700782", "0.46651977", "0.46591923", "0.46587166", "0.46548703", "0.4652047", "0.46499768", "0.46485126", "0.46472883", "0.4639253", "0.4625807", "0.46187752", "0.4614877", "0.46145403", "0.46072423", "0.45991036", "0.459864", "0.45931524", "0.45919487", "0.4591288", "0.45900947", "0.4590002", "0.45871124", "0.4586391", "0.45828557", "0.4578823", "0.4576898", "0.45698863", "0.45671302", "0.45663923", "0.45634013" ]
0.7116632
0
Run the database seeds.
public function run() { // obtenemos los roles... $role_administrador = Role::where('nombre', 'Administrador')->first(); $role_recepcionista = Role::where('nombre','Recepcionista')->first(); $role_medico = Role::where('nombre', 'Médico')->first(); /* // creamos 10 recepcionistas factory(User::class, 10) ->create() ->each(function ($u) use ($role_recepcionista) { $u->role()->associate($role_recepcionista); $u->save(); }); */ // me creo como administrador User::create([ 'nombre' => 'Mariano César', 'apellido' => "D'Angelo", 'email' => '[email protected]', 'telefono' => '2901-606964', 'role_id' => $role_administrador->id, 'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm' //secret ]); // por si acaso... User::create([ 'nombre' => 'Mariano César', 'apellido' => "D'Angelo", 'email' => '[email protected]', 'telefono' => '2901-606964', 'role_id' => $role_administrador->id, 'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm' //secret ]); // y como recepcionista User::create([ 'nombre' => 'Mariano César', 'apellido' => "D'Angelo", 'email' => '[email protected]', 'telefono' => '2901-606964', 'role_id' => $role_recepcionista->id, 'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm' //secret ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }", "public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => '[email protected]', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"[email protected]\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }", "public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }", "public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }", "public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }", "public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }", "public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => '[email protected]',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }", "public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> '[email protected]',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }", "public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }", "public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }", "public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }", "public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }", "public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }", "public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }", "public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }", "public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n }", "public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}", "public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }", "public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}", "public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }", "public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }", "public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }", "public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }", "public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }", "public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }", "public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}", "public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }", "public function run()\n {\n //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }", "public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }", "public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }", "public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => '[email protected]']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }", "public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'[email protected]',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','[email protected]')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => '[email protected]']);\n\n factory(Category::class, 5)->create();\n }", "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }", "public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }", "public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }", "public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }", "public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }", "public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => '[email protected]',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Paul'\n ]);\n }", "public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }", "public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }", "public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}", "public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }", "public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }", "public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }", "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }", "public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }", "public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'sab',\n\n ]\n );\n }", "public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }", "public function run()\n {\n //Acá se define lo que el seeder va a hacer.\n //insert() para insertar datos.\n //Array asociativo. La llave es el nombre de la columna.\n// DB::table('users')->insert([\n// //Para un solo usuario.\n// 'name' => 'Pedrito Perez',\n// 'email' => '[email protected]',\n// 'password' => bcrypt('123456')\n// ]);//Se indica el nombre de la tabla.\n\n //Crea 50 usuarios (sin probar)\n// factory(App\\User::class, 50)->create()->each(function($u) {\n// $u->posts()->save(factory(App\\Post::class)->make());\n// });\n\n factory(App\\User::class, 10)->create(); //Así se ejecuta el model factory creado en ModelFactory.php\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'[email protected]', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'[email protected]', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }", "public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }" ]
[ "0.8013876", "0.79804534", "0.7976992", "0.79542726", "0.79511505", "0.7949612", "0.794459", "0.7942486", "0.7938189", "0.79368967", "0.79337025", "0.78924936", "0.78811055", "0.78790957", "0.78787595", "0.787547", "0.7871811", "0.78701615", "0.7851422", "0.7850352", "0.7841468", "0.7834583", "0.7827792", "0.7819104", "0.78088796", "0.7802872", "0.7802348", "0.78006834", "0.77989215", "0.7795819", "0.77903426", "0.77884805", "0.77862066", "0.7778816", "0.7777486", "0.7765202", "0.7762492", "0.77623445", "0.77621746", "0.7761383", "0.77606887", "0.77596676", "0.7757001", "0.7753607", "0.7749522", "0.7749292", "0.77466977", "0.7729947", "0.77289546", "0.772796", "0.77167094", "0.7714503", "0.77140456", "0.77132195", "0.771243", "0.77122366", "0.7711113", "0.77109736", "0.7710777", "0.7710086", "0.7705484", "0.770464", "0.7704354", "0.7704061", "0.77027386", "0.77020216", "0.77008796", "0.7698617", "0.76985973", "0.76973504", "0.7696405", "0.7694293", "0.7692694", "0.7691264", "0.7690576", "0.76882726", "0.7687433", "0.7686844", "0.7686498", "0.7685065", "0.7683827", "0.7679184", "0.7678287", "0.76776296", "0.76767945", "0.76726556", "0.76708084", "0.76690495", "0.766872", "0.76686716", "0.7666299", "0.76625943", "0.7662227", "0.76613766", "0.7659881", "0.7656644", "0.76539344", "0.76535016", "0.7652375", "0.7652313", "0.7652022" ]
0.0
-1
Creates a demand object from settings
public function createFromSettings(array $settings) { /** @var ReservationDemand $demand */ $demand = $this->objectManager->get(static::DEMAND_CLASS); if ($demand instanceof PeriodAwareDemandInterface) { $this->setPeriodConstraints($demand, $settings); } $this->applySettings($demand, $settings); return $demand; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createDemandFromSettings ($settings) {\n\t\t/** @var PlaceDemand $demand */\n\t\t$demand = $this->objectManager->get('DWenzel\\\\Ajaxmap\\\\Domain\\\\Model\\\\Dto\\\\PlaceDemand');\n\t\tif (isset($settings['orderBy']) && isset($settings['orderDirection'])) {\n\t\t\t$demand->setOrder($settings['orderBy'] . '|' . $settings['orderDirection']);\n\t\t}\n\t\t(isset($settings['map']))? $demand->setMap($settings['map']) : NULL;\n\t\t(isset($settings['locationTypes'])) ? $demand->setLocationTypes($settings['locationTypes']) : NULL;\n\t\t(isset($settings['placeGroups'])) ? $demand->setPlaceGroups($settings['placeGroups']) : NULL;\n\t\tif(isset($settings['constraintsConjunction']) AND $settings['constraintsConjunction'] !== '') {\n\t\t\t$demand->setConstraintsConjunction($settings['constraintsConjunction']);\n\t\t}\n\t\tif(isset($settings['placeGroupConjunction']) AND $settings['placeGroupConjunction'] !== '') {\n\t\t\t$demand->setPlaceGroupConjunction($settings['placeGroupConjunction']);\n\t\t}\n\t\t(isset($settings['limit'])) ? $demand->setLimit($settings['limit']) : NULL;\n\t\treturn $demand;\n\t}", "public function createDemandFromSettings($settings) {\n\t\t$demand = $this->objectManager->get('Webfox\\\\Placements\\\\Domain\\\\Model\\\\Dto\\\\OrganizationDemand');\n\t\t$settableProperties = \\TYPO3\\CMS\\Extbase\\Reflection\\ObjectAccess::getSettablePropertyNames($demand);\n\t\tforeach($settableProperties as $property) {\n\t\t\tif (isset($settings[$property])) {\n\t\t\t\t\\TYPO3\\CMS\\Extbase\\Reflection\\ObjectAccess::setProperty(\n\t\t\t\t\t$demand,\n\t\t\t\t\t$property,\n\t\t\t\t\t$settings[$property]);\n\t\t\t}\n\t\t}\n\t\tif(isset($settings['clientsOrganizationsOnly'])) {\n\t\t\t// we set clientOrganizationsOnly directly since Reflection ObjectAccess seem to miss boolean values (TRUE is cast to 1?)\n\t\t\t$demand->setClientsOrganizationsOnly($settings['clientsOrganizationsOnly']);\n\t\t\tif($this->accessControlService->hasLoggedInClient()) {\n\t\t\t\t$clientId = $this->accessControlService->getFrontendUser()\n\t\t\t\t\t\t\t\t\t\t->getClient()->getUid();\n\t\t\t\t$demand->setClients((string)$clientId);\n\t\t\t} else {\n\t\t\t\t$demand->setClients('');\n\t\t\t}\n\t\t}\n\t\t// @todo implement OrderDemand to get rid of this string juggling\n\t\tif((isset($settings['orderBy'])) AND (isset($settings['orderDirection']))) {\n\t\t\t$demand->setOrder($settings['orderBy'] . '|' . $settings['orderDirection']);\n\t\t}\n\t\treturn $demand;\n\t}", "public function createFromSettings(array $settings);", "function create_object_settings() {\n if (!isset($this->settings)) {\n require_once($this->addon->dir . 'include/class.widget.settings.php');\n $this->settings = new SLPWidget_Legacy_Settings( array( 'addon' => $this->addon ) );\n }\n }", "public function __construct($settings='') \n\t{\t\n\t\t$this->settings = $this->_settings(); \n\t}", "public function __construct()\n {\n $this->settings = new Settings();\n }", "public function __construct()\n {\n $this->settings = new Settings();\n }", "public function __construct()\n {\n $this->settings = new Settings();\n }", "public static function Create() {\n\t\t$s = new WP_United_Settings();\n\t\tif(!$s->load_from_wp()) {\n\t\t\treturn($s->load_from_phpbb());\n\t\t}\n\t\treturn $s;\n\t}", "public function instantiate($task);", "public function __construct()\n {\n $this->setting = new Setting();\n }", "public function __construct()\n {\n $this->branche = new Settings();\n }", "static public function factory($config) {}", "public function __construct( array $settings ) {\n\t\t$this->settings = $settings;\n\t}", "public function __construct(array $settings = array())\n {\n }", "public function run()\n { \n factory(Deputy::class, 25)->create();\n }", "public function run()\n {\n PraticalInfos::factory(1)->create();\n }", "public function initialize() {\r\n\t\tparent::initialize();\r\n\t\t$this->settings = $this->pluginSettingsDemandService->getSettings();\r\n\t}", "function __construct($settings = array()){\n\t\t$config = Configure::read('Bitly');\n\t\tif (empty($config)) {\n\t\t\t$config = array();\n\t\t}\n\n\t\t$this->_set($config);\n\t\t$this->_set($settings);\n\t}", "public function __construct(array $settings) {\n $this->settings = $settings;\n }", "public function run()\n {\n prodecyt::factory(50)->create();\n }", "private function prepare(){\r\n \r\n $autoload = &$this->settings->autoload; \r\n \r\n if(isset($autoload)){\r\n \r\n foreach($autoload AS $key => $class){\r\n \r\n $settings = &$this->settings->{$key};\r\n \r\n if(isset($settings)){\r\n\r\n $this->{$key} = new $class($settings);\r\n }\r\n }\r\n }\r\n }", "public function __construct( $settings ) {\n\t\t$this->settings = (array) $settings;\n\t}", "public function createSetting(): Setting\n {\n return Setting::create('cache://double-backup');\n }", "static public function factory($config)\n\t{\n\t\t$config = self::_parseConfig($config);\n\t\t$config = array_merge(array(\n 'stream' => null,\n 'mode' => null,\n 'timestamp' => 'Y-m-d',\n\t\t), $config);\n\n\t\tif(is_string($config['stream'])) {\n\t\t\t$config['stream'] = str_replace('%timestamp%', date($config['timestamp']), $config['stream']);\n\t\t}\n\t\t$streamOrUrl = isset($config['url']) ? $config['url'] : $config['stream'];\n\n\t\treturn new self(\n\t\t$streamOrUrl,\n\t\t$config['mode']\n\t\t);\n\t}", "public static function factory()\n {\n $class = get_called_class();\n $object = new $class();\n foreach (static::getDefaults() as $field => $value) {\n $object->{$field} = $value;\n }\n return $object;\n }", "private function __construct() {\r\n\t\t// proc will grab a different column of settings values.\r\n\t\t$testing = (int) $this->config()->testing;\r\n\t\t\r\n\t\t$sql = \"CALL settings_get($testing)\";\r\n $rs = $this->query($sql);\r\n \r\n if ($this->hasError()) {\r\n error_log($this->getError());\r\n $this->error = \"Unable to load settings\";\r\n }\r\n \r\n if ($rs->hasRecords()) {\r\n\t\t\twhile ($row = $rs->fetchArray()) {\r\n\t\t\t\t$this->{$row['label']} = $row['value'];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Handle secure cookies\r\n\t\t\tif (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']) {\r\n\t\t\t\t$this->cookiesecure = 1;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function __construct() {\n $this->settings = craft()->plugins->getPlugin('Mobi2Go')->getSettings();\n }", "protected function _make_preview_settings ($obj)\n {\n return new SHIP_RELEASE_PREVIEW_SETTINGS ($this);\n }", "public final function make(): void\n {\n if (!$this->config) {\n parent::__construct([\n 'description' => $this->description ?: $this->description(),\n 'values' => $this->values ?: $this->values()\n ]);\n $this->setInstance($this);\n }\n }", "static public function factory( $config )\n\t{\n\t\t$config = self::_parseConfig( $config );\n\t\t$config = array_merge( array(\n\t\t\t'stream' => null,\n\t\t\t'mode' => null ), $config );\n\n\t\t$streamOrUrl = isset( $config[ 'url' ] ) ? $config[ 'url' ] : $config[ 'stream' ];\n\n\t\treturn new self( $streamOrUrl, $config[ 'mode' ] );\n\t}", "public function __construct() {\r\n $this->template = new Template();\r\n $this->settingsModel = new settingsModel();\r\n $this->dbUtil = new DBUtil();\r\n $this->combovalue = $this->settingsModel->populatetypeValues();\r\n $this->logger = Logger::getLogger(\"========= Metadata Controller =========== \");\r\n }", "public function runConfig():Create {\n\n # Set config\n Config::setup();\n\n # Return instance\n return $this;\n\n }", "public function __construct()\n {\n return $this->drone = new Drone;\n }", "public static function run_on_demand()\n {\n $obj = new self();\n $obj->verbose = true;\n $obj->run(null);\n }", "public function __construct()\n {\n $this->_settings = $this->getQuickviewSettings();\n }", "public function __construct() {\n $data = Ensure::Input(func_get_args());\n return parent::_init($data, new DependsResource(array(\n array(\"term\" => \"domains\", \"plural\" => TRUE)\n )), \n new LoadsResource(\n array(\"parent\" => false, \"primary\" => \"create\", \"init\" => array(\"domainId\"), \"id\" => \"id\", \"silent\"=> TRUE)\n ), \n new SchemaResource(array(\n \"fields\" => array('id', 'name', 'description', 'applicationId', 'domainId', 'sipUri', 'enabled', 'credentials'), \n \"needs\" => array('name', 'domainId', 'credentials')\n ))\n );\n }", "public static function create() {}", "public static function create() {}", "public static function create() {}", "public function init()\n {\n $templates = $this->getConfig($this->getConfigFiles());\n $view = $this->prepare($this->getView());\n return $this->createFactory($templates, $view);\n }", "public function newInstance();", "public function newInstance();", "public function __construct($setting)\n {\n $this->setting = $setting;\n }", "public static function getInstance(string $type)\n\t{\n\t\t$instance = new static();\n\t\t$instance->type = $type;\n\t\t$instance->loadConfig();\n\t\treturn $instance;\n\t}", "public function run()\n {\n $items = [\n [ 'meta_key'=>'site_title','meta_title' => 'Hamro Jutta','meta_value'=>'Hamro Jutta'],\n [ 'meta_key'=>'site_email','meta_title' => 'email','meta_value'=>'[email protected]'],\n [ 'meta_key'=>'site_phone','meta_title' => 'phone','meta_value'=>'01-24567'],\n [ 'meta_key'=>'header_settings','meta_title' => 'header','meta_value'=>''],\n\n ];\n\n foreach ($items as $item) {\n Setting::create($item);\n }\n }", "public function make();", "protected function instantiate()\n\t{\n\t\t$class = get_class($this);\n\t\t$model = new $class(null);\n\t\treturn $model;\n\t}", "public function run()\n {\n Setting::query()->create([\n 'exp_rate' => 'x150',\n 'drop_rate' => 'x50',\n 'penyas_rate' => 'x750',\n ]);\n }", "function grab_db_settings(){\n\t\n\t\treturn new pfagos_settings();\n\t}", "public function make() {}", "public function __construct() {\n $this->config = \\Drupal::config('lesson3.settings');\n }", "public function __construct(Settings $settings)\n {\n $this->settings = $settings;\n }", "public function __construct(Settings $settings)\n {\n $this->settings = $settings;\n }", "public function __construct()\n\t{\n\t\t$codeigniter =& get_instance();\n\t\t$codeigniter->benchmark->mark('Model\\Data\\Settings_class_construct_start');\n\t\t\n\t\t// Set the cache time from the config file\n\t\t$codeigniter->config->load('ionize', TRUE);\n\t\t$this->cache_time = $codeigniter->config->config['ionize']['data_model_cache'];\n\t\t\n\t\tif($codeigniter->session->language != \"\")\n\t\t{\n\t\t\t$cache = $codeigniter->cache->file->get(md5($codeigniter->session->language).'.Settings');\n\t\t\tif($cache != FALSE)\n\t\t\t{\n\t\t\t\t$settings = unserialize($cache);\n\t\t\t\t\n\t\t\t\t// Restore datas from cached class\n\t\t\t\t$this->_data \t\t= $settings->_data;\n\t\t\t\t$this->_raw_data \t= $settings->_raw_data;\n\t\t\t\t$this->_lang_data \t= $settings->_lang_data;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$codeigniter->benchmark->mark('Model\\Data\\Settings_class_construct_end');\n\t\t\n\t\t// Generating class\n\t\t$this->initialize();\n\t\t\n\t\t// Saving instance reference\n\t\tself::$instance = $this;\n\t}", "public function __construct(Order $order)\n\t{\n\t\t$this->Order = $order;\n \t$setting = DB::table('setting')->select()->where('id',1)->get()->first();\n \t\n \t\n \tCache::forever('setting', $setting);\n \n\t}", "public function run()\n {\n TipoMedicamento::factory(7)->create();\n }", "static public function factory($config)\n {\n $config = self::_parseConfig($config);\n $config = array_merge(array(\n 'stream' => null,\n 'mode' => null,\n ), $config);\n\n $streamOrUrl = isset($config['url']) ? $config['url'] : $config['stream'];\n\n return new self(\n $streamOrUrl,\n $config['mode']\n );\n }", "static function make($type)\n {\n $scraper = null;\n\n switch ($type) {\n case 'ElAderezo':\n $scraper = new ScraperElAderezo;\n break; \n case 'GastronomiaYCia':\n $scraper = new ScraperGastronomiaYCia;\n break;\n case 'UtensiliosDeCocina':\n $scraper = new ScraperUtensiliosDeCocina;\n break;\n } \n return $scraper;\n }", "public function __construct()\n {\n $this->st = site_settings::find(1);\n $this->middleware('guest');\n }", "public function run()\n {\n Setting::create([\n 'key' => 'title',\n 'value' => [\n 'en' => 'Galaxy of Drones Online',\n ],\n ]);\n\n Setting::create([\n 'key' => 'description',\n 'value' => [\n 'en' => 'An open source multiplayer space strategy game.',\n ],\n ]);\n\n Setting::create([\n 'key' => 'author',\n 'value' => [\n 'en' => 'Koodilab',\n ],\n ]);\n }", "static function make($settings, $port = 1080) {\n return new static($settings);\n }", "public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }", "public static function &factory(array $config = array()) {\n\t\t$default = array('source' => null, 'adapter' => null);\n\t\textract($config + $default);\n\n\t\tif (!$source) {\n\t\t\tthrow new BadMethodCallException(\"No source given.\");\n\t\t}\n\t\t$name = Mime_Type::guessName($source);\n\n\t\tif (!$adapter) {\n\t\t\tif (!isset(self::$_config[$name])) {\n\t\t\t\tthrow new Exception(\"No adapter configured for media name `{$name}`.\");\n\t\t\t}\n\t\t\t$adapter = self::$_config[$name];\n\t\t}\n\n\t\t$name = ucfirst($name);\n\t\t$class = \"Media_Process_{$name}\";\n\n\t\tif (!class_exists($class)) { // Allows for injecting arbitrary classes.\n\t\t\trequire_once \"Media/Process/{$name}.php\";\n\t\t}\n\n\t\t$media = new $class(compact('source', 'adapter'));\n\t\treturn $media;\n\t}", "abstract protected function define_my_settings();", "public function create()\n {\n //\n// $demand = Demand::where('id',0)->get();\n// print_r($demand);\n// die;\n\n return view('demand.create', ['theme' => 'default']);\n }", "private function initSiteSettings($di, $config) {\n\t\t\t$di->set('siteSettings', function () use ($config) {\n\t\t\t\n\t\t\t\t$siteSettingObj = new \\SiteSettings();\n\t\t\t\t\n\t\t\t\treturn $siteSettingObj;\n\t\t\t\t\n\t\t\t}, true);\n\t\t\t\n\t\t}", "public function __construct()\n {\n $this->plan = new Plan();\n }", "abstract public function get_settings();", "public function run()\n {\n factory(CarOption::class, 5)->create();\n }", "public function create(){\r\n\treturn new $this->class();\r\n }", "public static function create($config) {\n if(isset($config['type']) && class_exists($config['type'])) {\n $item = new $config['type'];\n $item->config = $config;\n return $item;\n }\n return null;\n }", "public static function init() {\n\t\treturn Factory::get_instance( self::class );\n\t}", "public function run()\n {\n factory(Setting::class)->create(['settings_name' => 'Instagram_url']);\n factory(Setting::class)->create(['settings_name' => 'Calendar_url']);\n factory(Setting::class)->create(['settings_name' => 'Map_url']);\n factory(Setting::class)->create(['settings_name' => 'Plate_url']);\n factory(Setting::class)->create(['settings_name' => 'Rocks_url']);\n factory(Setting::class)->create(['settings_name' => 'Facebook_url']);\n factory(Setting::class)->create(['settings_name' => 'Checkbox_popup_de', 'settings_value' => 'Wenn Sie mit den Nutzungsbedingungen einverstanden sind, füllen Sie bitte die Kontrollkästchen aus']);\n factory(Setting::class)->create(['settings_name' => 'Checkbox_popup_en', 'settings_value' => 'If you agree with terms of use please fill checkboxes']);\n factory(Setting::class)->create(['settings_name' => 'Link_popup_de', 'settings_value' => \"<h2>Lorem ipsum Karotten Rabatte erhöht. Pentax Optio durch lobten die Prinzipien der Wahrheit geblendet und sie zu bezahlen.</h2>\n\t\t\t <p>Lorem ipsum dolor sitzen amet consectetur adipisicing elit. Voluptatem fugit cum dolorem suscipit molestias sapiente!</p>\n\n\t\t\t <h2>Lorem ipsum dolor sitzt amet</h2>\n\t\t\t <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatem fugit cum dolorem suscipit molestias sapiente!</p>\n\t\t\t <p>Lorem ipsum dolor sitzen amet consectetur adipisicing elit. Voluptatem fugit cum dolorem suscipit molestias sapiente!</p>\n\t\t\t <p>Lorem ipsum dolor sitzen amet consectetur adipisicing elit. Voluptatem fugit cum dolorem suscipit molestias sapiente!</p>\n\t\t\t <p>Lorem ipsum dolor sitzen amet consectetur adipisicing elit. Voluptatem fugit cum dolorem suscipit molestias sapiente!</p>\n\t\t\t <p>Lorem ipsum dolor sitzen amet consectetur adipisicing elit. Voluptatem fugit cum dolorem suscipit molestias sapiente!</p>\n\n\t\t\t <h2>Lorem Ipsum Dolor sitzen</h2>\n\t\t\t <p>Lorem ipsum dolor sitzen amet consectetur adipisicing elit. Voluptatem fugit cum dolorem suscipit molestias sapiente!</p>\n\t\t\t <p>Lorem ipsum dolor sitzen amet consectetur adipisicing elit. Voluptatem fugit cum dolorem suscipit molestias sapiente!</p>\"]);\n\n\n\n factory(Setting::class)->create(['settings_name' => 'Link_popup_en', 'settings_value' => \"<h2>Lorem ipsum dolor sit amet consectetur adipisicing elit. Optio veritatis atque pariatur obcaecati laudantium eos.</h2>\n\t\t\t <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatem fugit cum dolorem suscipit molestias sapiente!</p>\n\n\t\t\t <h2>Lorem ipsum dolor sit amet</h2>\n\t\t\t <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatem fugit cum dolorem suscipit molestias sapiente!</p>\n\t\t\t <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatem fugit cum dolorem suscipit molestias sapiente!</p>\n\t\t\t <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatem fugit cum dolorem suscipit molestias sapiente!</p>\n\t\t\t <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatem fugit cum dolorem suscipit molestias sapiente!</p>\n\t\t\t <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatem fugit cum dolorem suscipit molestias sapiente!</p>\n\n\t\t\t <h2>Lorem ipsum dolor sit</h2>\n\t\t\t <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatem fugit cum dolorem suscipit molestias sapiente!</p>\n\t\t\t <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatem fugit cum dolorem suscipit molestias sapiente!</p>\"\n ]);\n }", "public function __construct(\n\t\tSettings $settings\n )\n\t{\n\t\t$this->settings = $settings;\n\t}", "static public function factory($config)\n {\n }", "function construct() {\n if (!$this->cacheGet()) {\n $this->prepare();\n $this->build();\n $this->expand();\n $this->populate();\n }\n }", "public function newInstance($uri);", "public function newInstance(): object;", "public static function create(): Deferred {\n return new Deferred();\n }", "static public function factory($config)\n {\n return new self();\n }", "public function run()\n {\n $this->createSettings($this->settings());\n }", "public function __construct($settings) {\n\t\t$this->setting['length'] = $settings['length'];\n\t\t$this->setting['width'] = $settings['width'];\n\t\t$this->setting['height'] = $settings['height'];\n\t}", "public function make(array $config);", "public function run()\n {\n Propuestas::factory(50)->create();\n }", "function drush_dslm_new() {\n // Pull the args\n $args = drush_get_arguments();\n if (!isset($args[1])) {\n return drush_set_error('DSLM: Please provide a site destination');\n }\n else {\n $site_dest = $args[1];\n }\n\n // Bootstrap dslm, this grabs the instantiated and configured Dslm library object\n if (!$dslm = _dslm_bootstrap()) {\n return FALSE;\n }\n\n // Set the profile and core, either supplied on the CLI, set with --latest, or will prompt\n if (drush_get_option('latest', FALSE)) {\n $latest = $dslm->latestCores();\n $core = $latest['release'];\n }\n elseif (drush_get_option('dev', FALSE)) {\n $latest = $dslm->latestCores();\n $core = $latest['dev'];\n }\n else {\n $core = isset($args[2]) ? $args[2] : FALSE;\n }\n\n // If we still don't have a core string try to get on iteractively\n if (!$core) {\n $core_list = $dslm->getCores();\n $pick_core = drush_choice($core_list['all']);\n if (!$pick_core) {\n return FALSE;\n }\n $core = $core_list['all'][$pick_core];\n }\n\n if (!$res = $dslm->newSite($site_dest, $core)) {\n return drush_set_error($dslm->lastError());\n }\n else {\n drush_log(dt('Your site has been linked in !dir', array('!dir' => $site_dest)), 'ok');\n return TRUE;\n }\n}", "public function __construct($type)\n {\n $this->plant = new PlantFactory($type);\n }", "public function newInstance(): object\n {\n return $this->instantiator->instantiate($this->name);\n }", "public function run()\n {\n factory(Spare::class, 20)->create();\n }", "public static function factory() {\n\t\tstatic $instance;\n\n\t\tif ( ! $instance ) {\n\t\t\t$instance = new self();\n\t\t\t$instance->setup();\n\t\t}\n\n\t\treturn $instance;\n\t}", "function &factory($type)\n {\n $classfile = \"format/{$type}.class.php\";\n if (include_once $classfile) {\n $class = \"{$type}_format\";\n if (class_exists($class)) {\n $object = & new $class($options);\n return $object;\n } else {\n COM_errorLog(\"report.class - Unable to instantiate class $class from $classfile\");\n }\n } else {\n COM_errorLog(\"report.class - Unable to include file: $classfile\");\n }\n\n }", "public static function factory($type)\n\t{\n\t\t$class = 'MHTTPD_'.ucfirst($type);\n\t\treturn new $class;\n\t}", "function buddyexpressdesk_settings(){\n $settings = new stdClass;\n\t$GET = new BDESK_DB;\n $GET->statement('SELECT * FROM bdesk_site LIMIT 1');\n $GET->execute();\n\t$defaults = $GET->fetch();\n\tforeach ($defaults as $name => $value) {\n\t\tif (empty($paths->$name)) {\n\t\t\t$settings->$name = $value;\n\t\t}\n\t}\n\treturn $settings;\n}", "public function prepare()\n {\n $this->timeTracker = $this->getInjector()->inject('TimeTracker');\n $this->env = $this->getInjector()->inject('Environment');\n $this->env->parseFile(__DIR__.'/../environment.json');\n $this->toggleShowErrors();\n return $this;\n }", "function __construct() {\n\n\t\t$this->factory = new cftp_analytics_factory();\n\t\t$this->model = new cftp_analytics_option_model();\n\n\t\t$analytics = $this->factory->googleAnalyticsSource();\n\t\t$this->model->addSource( $analytics );\n\n\t\t$twitter = $this->factory->twitterSharesSource();\n\t\t$this->model->addSource( $twitter );\n\n\t\t//$fblikes = $this->factory->facebookLikesSource();\n\t\t//$this->model->addSource( $fblikes );\n\n\t\t$fbshares = $this->factory->facebookSharesSource();\n\t\t$this->model->addSource( $fbshares );\n\n\t\t$totalshares = $this->factory->totalSharesSource();\n\t\t$this->model->addSource( $totalshares );\n\n\t\t$decayshares = $this->factory->decaySharesSource();\n\t\t$this->model->addSource( $decayshares );\n\n\t\t$decayviews = $this->factory->decayViewsSource();\n\t\t$this->model->addSource( $decayviews );\n\n\t\t$this->popular = new cftp_analytics( $this->factory, $this->model );\n\t}", "public function make($class)\n {\n return Kant::createObject($class);\n }", "function __compatConstruct($settings) {\n\t\tif (is_array(current($settings))) {\n\t\t\t$this->_map = array_merge($this->_map, (array)$settings);\n\t\t}\n\n\t\tforeach ($this->_map as $key => $value) {\n\t\t\t$this->_directories[basename(key($value))] = key($value);\n\t\t}\n\t\tforeach (Configure::read('Media.filter') as $type) {\n\t\t\t$this->_versions += $type;\n\t\t}\n\t\t$this->_versions = array_keys($this->_versions);\n\n\t\tif (!$this->__cached = Cache::read('media_found', '_cake_core_')) {\n\t\t\t$this->__cached = array();\n\t\t}\n\t}", "public function run()\n {\n factory(Sponser::class, 5)->create();\n }", "public function __construct($settings = [])\n {\n $this->settings = \\HC\\Core::parseOptions($settings, $this->settings);\n \n spl_autoload_register('\\HCMC\\Core::autoLoader');\n \n return true;\n }", "function __construct() {\n $this->EE =& get_instance(); \n $this->EE->lang->loadfile('design');\n $this->EE->lang->loadfile('snippet_editor');\n $this->EE->db->select('settings')\n ->from('exp_modules')\n ->where('module_name', 'Snippet_editor')\n ->limit(1);\n $query = $this->EE->db->get();\n $this->settings = unserialize($query->row('settings')); \n }" ]
[ "0.7201751", "0.7110685", "0.6074803", "0.5508471", "0.53642505", "0.535256", "0.535256", "0.535256", "0.5309225", "0.5165147", "0.5156386", "0.5149077", "0.5134196", "0.5104301", "0.5065539", "0.50389946", "0.50341195", "0.502032", "0.49730998", "0.49667892", "0.4958916", "0.4929555", "0.49272177", "0.49185604", "0.49090183", "0.48914078", "0.48839906", "0.48698458", "0.48537064", "0.48432952", "0.48310953", "0.4812785", "0.48040977", "0.47910425", "0.4773527", "0.4771972", "0.47625285", "0.4758593", "0.4758593", "0.4758593", "0.47516754", "0.47407672", "0.47407672", "0.47388092", "0.4735173", "0.4727045", "0.472647", "0.47258073", "0.47250366", "0.47208664", "0.47194532", "0.47157553", "0.4713941", "0.4713941", "0.47113448", "0.47036386", "0.47001755", "0.46965635", "0.46963635", "0.46944746", "0.46934155", "0.46921602", "0.4677982", "0.4672397", "0.46720168", "0.46699026", "0.46595237", "0.465829", "0.46521306", "0.4649812", "0.46484172", "0.46461925", "0.46428156", "0.46425727", "0.46364468", "0.46360394", "0.46345332", "0.46189636", "0.4618126", "0.46063745", "0.46034133", "0.45983058", "0.4597912", "0.45964104", "0.45849773", "0.45838535", "0.4581401", "0.4578255", "0.4578077", "0.45772246", "0.45742613", "0.45741162", "0.4571913", "0.45689481", "0.45685664", "0.45672604", "0.45657045", "0.45615247", "0.45601702", "0.4556081" ]
0.714715
1
TODO: Implement deleteStatement() method.
public function deleteStatement() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract function getDeleteStatement();", "public function walkDeleteStatement(AST\\DeleteStatement $deleteStatement): void;", "public function testDeleteStmt()\n {\n $delete = $this->getConnection()\n ->delete()\n ('dummy_posts')\n ('blog_id = :id');\n return $this->assertEquals($delete, \"DELETE FROM dummy_posts WHERE blog_id = :id\");\n }", "public function delete()\n {\n $this->execute(\n $this->syntax->deleteSyntax(get_object_vars($this))\n );\n }", "abstract protected function platformDeleteStatement($table);", "public function delete()\r\n {\r\n $this->sql = 'DELETE FROM ' . $this->table .' '.$this->alias. ' '. $this->sql;\r\n $query = R::exec($this->sql, $this->params);\r\n $this->sql = null;\r\n $this->params = [];\r\n return $query;\r\n }", "public function delete() {\n\n\t\t// Database\n\t\t$db = $this->db;\n\n\t\t// SQL code for deletion\n\t\t$sql = $this->sql_for_delete();\n\n\t\t// Deletion execution\n\t\treturn $db::execute($sql);\n\t}", "public function __doDelete()\n {\n $strSQL = $this->getDeleteSql();\n $result = $this->query($strSQL);\n }", "public function delete() {\n\t\t$dbh = App::getDatabase()->connect();\n\n\t\t$query = \"DELETE FROM \".$this->getTableName();\n\n\t\t$fl = true;\n\t\tforeach($this as $column => $val) {\n\t\t\tif(in_array($column, $this->getPrimaries())) {\n\t\t\t\t$query .= \"\\n\".(($fl) ? \"WHERE\" : \"AND\").\" \".$column.\" = '\".$val.\"'\";\n\t\t\t\t$fl = false;\n\t\t\t}\n\t\t}\n\n\t\t$res = $dbh->exec($query);\n\t\t$dbh = null;\n\t\treturn $res;\n\t}", "public function delete($records = '')/*# : DeleteStatementInterface */;", "function is_delete_statement()\n {\n return $this->object->_delete_clause ? TRUE : FALSE;\n }", "public function sql_for_delete() {\n\t\t// Check if model is writable\n\t\t$this->assertModelIsWritable();\n\n\t\t// Destination model\n\t\t$model = $this->model;\n\n\t\t// Cascade deletion calculation for model $model\n\t\tforeach ($model::metaGetRelationships() as $relationshipName => $relationship) {\n\t\t\t// Nexii tuples and children tuple deletion\n\t\t\tif (\n\t\t\t\t($relationship[\"type\"] == \"OneToMany\" or $relationship[\"type\"] == \"ManyToMany\") and\n\t\t\t\tisset($relationship[\"on_master_deletion\"]) and\n\t\t\t\t$relationship[\"on_master_deletion\"] == \"delete\"\n\t\t\t) {\n\t\t\t\t$this->addRelatedModel($relationshipName);\n\t\t\t}\n\t\t}\n\n\t\t// SQL code generation\n\t\t$sqlT = \\lulo\\twig\\TwigTemplate::factoryHtmlResource(\\lulo\\query\\Query::PATH . \"/delete/query.twig.sql\");\n\t\t$sql = $sqlT->render([\"query\" => $this]);\n\n\t\t// Return DELETE statement SQL code\n\t\treturn $sql;\n\t}", "public function testDeleteFinancialStatementUsingDelete()\n {\n }", "public function delete()\n\t{\n\t\t$sql = $this->grammar->delete($this);\n\n\t\treturn $this->connection->query($sql, $this->bindings, $this->options);\n\t}", "public function delete(){\n if (isset($this->content[$this->idField])) {\n\n $sql = \"DELETE FROM {$this->table} WHERE {$this->idField} = {$this->content[$this->idField]};\";\n $delet = new \\AR\\BD\\Delete();\n $delet->ExeDelete($this->table, \"WHERE {$this->idField} = {$this->content[$this->idField]}\", \"\");\n \n }\n }", "function getDeleteStatement($model,&$args);", "function delete($table, $clause) {\t\t\r\n\t\treturn $this->query(\"delete from $table where $clause\");\r\n\t}", "function delete()\n\t{\n\t\tSQL::query(\"delete from {$this->_table} where id = {$this->_data['id']}\");\n\t}", "public function delete()\n {\n $class = strtolower(get_called_class());\n $table = self::$_table_name != null ? self::$_table_name : $class . 's';\n\n $pdo = PDOS::getInstance();\n\n $whereClause = '';\n foreach (static::$_primary_keys as $pk)\n $whereClause .= $pk . ' = :' . $pk . ' AND ';\n $whereClause = substr($whereClause, 0, -4);\n $sql = 'DELETE FROM ' . $table . ' WHERE ' . $whereClause;\n $query = $pdo->prepare($sql);\n $attributes = $this->getAttributes(new \\ReflectionClass($this));\n foreach ($attributes as $k => $v)\n {\n if (in_array($k, static::$_primary_keys))\n $query->bindValue(':' . $k, $v);\n }\n $query->execute();\n }", "protected function RetDelete() {\n\n if (!isset($this->\n tables[0])) {\n\n throw new \\Exception(\"Error: Table not properly provided in QueryHelper.\");\n }\n\n $return = \"DELETE FROM `{$this->\n tables[0]}`\";\n\n if (count($this->\n where)) {\n\n $return .= $this->\n WhereClause($this->\n where);\n }\n\n return $return . \";\";\n }", "public function testDelete()\n {\n // test data\n $this->fixture->query('INSERT INTO <http://example.com/> {\n <http://s> <http://p1> \"baz\" .\n <http://s> <http://xmlns.com/foaf/0.1/name> \"label1\" .\n }');\n\n $res = $this->fixture->query('SELECT * WHERE {?s ?p ?o.}');\n $this->assertEquals(2, \\count($res['result']['rows']));\n\n // remove graph\n $this->fixture->delete(false, 'http://example.com/');\n\n $res = $this->fixture->query('SELECT * WHERE {?s ?p ?o.}');\n $this->assertEquals(0, \\count($res['result']['rows']));\n }", "abstract public function delete();", "abstract public function delete();", "abstract public function delete();", "abstract public function delete();", "public function testWriteDeleteQuery()\n\t{\n\t\t$queryWriter = R::getWriter();\n\t\tasrt( ( $queryWriter instanceof SQLiteT ), TRUE );\n\t\tR::nuke();\n\t\t$bean = R::dispense( 'bean' );\n\t\t$bean->name = 'a';\n\t\t$id = R::store( $bean );\n\t\tasrt( R::count( 'bean' ), 1 );\n\t\t$queryWriter->deleteRecord( 'bean', array(), $addSql = ' id = :id ', $bindings = array( ':id' => $id ) );\n\t\tasrt( R::count( 'bean' ), 0 );\n\t}", "function delete () {\n\t\t$stm = DB::$pdo->prepare(\"delete from `generated_object` where `id`=:id\");\n\t\t$stm->bindParam(':id', $this->id);\n\t\t$stm->execute();\n\t}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete()\n {\n return $this->connection->delete($this->grammar->compileDelete($this));\n }", "function executeDelete($script) {\n\t\t$queryRes = mysqli_query($this->connectionString, $script);\n\t}", "function delete(){\n // Delete subclauses\n foreach($this->subClause as $clause){\n $clause->delete();\n }\n \n mysql_query(\"DELETE FROM resolution WHERE id='$this->clauseId'\") or die(mysql_error());\n }", "public function delete( ) {\n\t $query = \"DELETE FROM stat WHERE id=?\";\n\t return $this->db->execute( $query, array($this->id) ); \t\n\t }", "public function delete($id) {\r\n $sql= \"delete from bestelling where id=? limit 1\";\r\n $args=func_get_args();\r\n parent::execPreppedStmt($sql,$args);\r\n }", "function delete($condition = NULL)\n {\n $db_table = $this->model2table();\n $c2 = isset($this->id) ? \" WHERE id=\" . $this->id : \"\";\n $c = isset($condition) ? \"WHERE $condition\" : $c2;\n\n $sql = \"DELETE FROM $db_table $c\";\n\n if (!$this->getDonotLog()) {\n $this->logDeletedData(\"$db_table $c\");\n }\n\n $this->varifysql($sql);\n $stmt = $this->get_conn()\n ->prepare(\"$sql\");\n\n $this->_beforeDelete($this);\n $stmt->execute();\n $this->_afterDelete($this);\n\n return $stmt->rowCount();\n }", "public function deleteFrom($where)\n\t\t{\n\t\t\t$this->setType(self::$TYPE_DELETE);\t\t\t\n\t\t\tif(is_null($this->tables))\n\t\t\t{\n\t\t\t\t$this->tables = $where;\n\t\t\t\treturn $this;\n\t\t\t}\n\t\t\tthrow new \\Exception('Statement.deleteFrom(): This method can only be called once for a Statement.');\n\t\t}", "public final function delete() {\n\t\t$sql = \"\n\tDELETE FROM\n\t\t\" . $this->table . \"\n\tWHERE\n\t\t\" . $this->primaryField . \" = ?\n\t;\";\n\n\t\t$db = new MySQL();\n\t\t$statement = $db->prepare($sql);\n\t\t$status = $statement->execute(array($this->{$this->primaryField}));\n\t\t$statement = NULL;\n\n\t\treturn $status;\n\t}", "public function deleteQuestion()\r\n {\r\n $query_string = \"DELETE FROM questions \";\r\n $query_string .= \"WHERE questionid= :questionid\";\r\n\r\n return $query_string;\r\n}", "public function deleteQuestions()\r\n{\r\n $query_string = \"DELETE FROM questions \";\r\n $query_string .= \"WHERE quizid = :quizid\";\r\n\r\n return $query_string;\r\n}", "public function delete()\n {\n self::deleteById( $this->db, $this->id, $this->prefix );\n\n if( $this->inTransaction )\n {\n //$this->db->commit();\n $this->inTransaction = false;\n }\n }", "public function queryDelete($table, $where) : int;", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "function delete()\n {\n }", "function delete_student($studentID) {\n global $db;\n $query = 'DELETE FROM students \n WHERE studentID = :studentID';\n $statement = $db->prepare($query);\n $statement->bindValue(':studentID', $studentID);\n $statement->execute();\n $statement->closeCursor();\n }", "public function deleteBySql($table, $sql, $bind = []);", "public function DELETE() {\n\t\t$this->scriptForceHint('DELETE');\n\t}", "public function delete() {\n global $db;\n $this->_predelete();\n $result = $db->query(\"DELETE FROM \".$this->table.\" WHERE \".$this->id_field.\"=?\", array($this->{$this->id_field}));\n $this->_postdelete($result);\n return $result;\n }", "public function deleteSql(){\n\n $sql = \"DELETE FROM {$this->table} WHERE id = {$this->updateId}\";\n \n return $sql;\n }", "public abstract function delete();", "public function delete() {\n // Create query\n $query = \"DELETE FROM \" . $this->table .\n \" WHERE MID = :mid AND Spot = :spot \";\n \n // Prepare the statement\n $stmt = $this->conn->prepare($query);\n\n // Clean the query\n $this->attr[\"mid\"] = htmlspecialchars(strip_tags($this->attr[\"mid\"]));\n $this->attr[\"spot\"] = htmlspecialchars(strip_tags($this->attr[\"spot\"]));\n\n // Bind the data\n $stmt->bindValue(\":mid\", $this->attr[\"mid\"]);\n $stmt->bindValue(\":spot\", $this->attr[\"spot\"]);\n \n // Execute the prepared statement and check for errors in running it\n return $this->runPrepStmtChkErr($stmt);\n }", "public function delete(){\n\t if(!isset($this->attributes['id'])) \n\t\t\tthrow new Exception(\"Cannot delete new objects\");\n\t\t$this->do_callback(\"before_delete\");\n\t\treturn self::do_query(\"DELETE FROM \".self::table_for(get_class($this)).\n\t\t \" WHERE id=\".self::make_value($this->attributes['id']));\t\n\t}", "public function delete($conn, $where){\n\t\t$sql_where = $this->getWhereClause($conn, $where);\n\t\t$sql=\"DELETE FROM `\" . $this->table_name . \"`\";\n\t\tif ($sql_where!=\"\"){\n\t\t\t$sql = $sql . \" WHERE \" . $sql_where;\n\t\t}\n\t\treturn $conn->exec($sql);\n\t}", "public function deleteQuiz()\r\n{\r\n $query_string = \"DELETE FROM quizzes \";\r\n $query_string .= \"WHERE quizid = :quizid\";\r\n\r\n return $query_string;\r\n}", "public function delete()\n {\n $stmt = $this->_db->prepare(\"DELETE FROM score;\");\n $stmt->execute();\n }", "public function deleteRecord ($sqlString);", "function is_delete_statement()\n {\n return isset($this->object->_query_args['is_delete']) && $this->object->_query_args['is_delete'];\n }", "public function delete()\n {\n $query = $this->db->getQuery(true);\n\n $query\n ->delete($this->db->quoteName(\"#__crowdf_intentions\"))\n ->where($this->db->quoteName(\"id\") .\"=\". (int)$this->id);\n\n $this->db->setQuery($query);\n $this->db->execute();\n\n $this->reset();\n }", "function dbDelete($table, $where = null, $insertId = false){\n //$table = DB_PREFIX.'_'.$table; //para pegar o prefixo da tabela caso use\n $where = ($where) ? \" WHERE {$where}\" : null;\n $query = \"DELETE FROM {$table}{$where}\";\n return qExecute($query, $insertId);\n }", "protected function _delete()\n\t{\n\t}", "public function destroy(Statement $statement)\n {\n $statement->delete();\n\n return Redirect::back()->with('success', 'SOA deleted.');\n }", "public function delete()\n\t{\n\t \tif (!Validate::isTableOrIdentifier($this->identifier) OR !Validate::isTableOrIdentifier($this->table))\n\t \t\tdie(Tools::displayError());\n\n\t\t$this->clearCache();\n\n\t\t/* Database deletion */\n\t\t$result = Db::getInstance()->Execute('DELETE FROM `'.pSQL($this->table).'` WHERE `'.pSQL($this->identifier).'` = '.(int)($this->id));\n\t\tif (!$result)\n\t\t\treturn false;\n\t\t\n\t\treturn $result;\n\t}", "public function delete() {\n\t\tif ($this->checkDependencies() == true ) {\n\t\t\t$sql = \"DELETE FROM \".$this->tablename.\" where \".$this->idcol.\" = \".$this->page->ctrl['record'];\n\t\t\t$this->dbc->exec($sql);\n\t\t}\n\t}", "public function delete($whereCondition) \n\t{\n\t\t$sql = \"DELETE FROM `\" . $this->table . \"` \";\n\n\t\t$sql .= $this->_whereCondition($whereCondition). ';';\n\n\t\t$this->query($sql);\n\t}", "public function deleteDefinition()\r\n{\r\n $query_string = \"DELETE FROM glossary \";\r\n $query_string .= \"WHERE wordid = :wordid \";\r\n\r\n return $query_string;\r\n}", "public static function delete($id){\n $conexion = new Conexion();\n $sql = $conexion->prepare('DELETE FROM'. self::TABLA .' WHERE id = :id');\n $sql->bindValue(':id', $id);\n $sql->execute();\n return $sql; \n}", "private function Delete()\n {\n $return = false;\n $action = $this->Action();\n $table = $this->Table();\n $where = $this->Where();\n if($action && $table && Checker::isArray($where, false) && isset($where[Where::VALUES]))\n {\n $return[Where::QUERY] = \"$action FROM $table\".$where[Where::QUERY];\n $return[Where::VALUES] = $where[Where::VALUES];\n }\n return $return;\n }", "public function delete(){\n\t\tglobal $db;\n\t\t$response = array('success' => false);\n\t\t$response['success']=$db->delete($this->table, \"id = $this->id\");\n\t return $response;\n\t}", "public function deleteReply()\r\n{\r\n $query_string = \"DELETE FROM replies \";\r\n $query_string .= \"WHERE replyid = :replyid\";\r\n\r\n return $query_string;\r\n}", "public function delete()\r\n\t{\r\n\t}", "public function disableDeleteClause() {}", "public function delete($opt) {\n\t\t\t\n\t\t\t$statement = $this->buildDelete($opt);\n\t\t\t$pdoStatement = $this->prepare($statement);\n\t\t\t$this->__bindValues($pdoStatement);\n\t\t\t\n\t\t\t$pdoStatement->execute();\n\t\t\t$pdoStatement->closeCursor();\n\t\t\t$this->__reset();\n\t\t}", "public function deletePost()\r\n{\r\n $query_string = \"DELETE FROM posts \";\r\n $query_string .= \"WHERE postid= :postid\";\r\n\r\n return $query_string;\r\n}", "public static function delete() {\n\n\n\t\t}", "public function DELETE() {\n #\n }", "abstract function delete();", "function delete() ;", "function delete() ;", "public function delete( $table, $where=NULL, $order=NULL, $limit=NULL, $statementColumn=NULL )\n\t{\n\t\t/* TRUNCATE is faster, so use that if appropriate */\n\t\tif ( $where === NULL and $limit === NULL )\n\t\t{\n\t\t\t$stmt = $this->preparedQuery( \"TRUNCATE `{$this->prefix}{$table}`\", array() );\n\t\t\treturn $stmt->affected_rows;\n\t\t}\n\t\t\n\t\t/* Basic query */\n\t\t$query = \"DELETE FROM `{$this->prefix}{$table}`\";\n\n\t\t/* Is a statement? */\n\t\tif ( $where instanceof \\IPS\\Db\\Statement )\n\t\t{\n\t\t\t$query .= ' WHERE ' . $statementColumn . ' IN(' . $where->query . ')';\n\t\t\t$binds = $where->binds;\n\t\t}\n\n\t\t/* Add where clause */\n\t\telse\n\t\t{\n\t\t\t$binds = array();\n\t\t\tif ( $where !== NULL )\n\t\t\t{\n\t\t\t\t$_where = $this->compileWhereClause( $where );\n\t\t\t\t$query .= ' WHERE ' . $_where['clause'];\n\t\t\t\t$binds = $_where['binds'];\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* Order? */\n\t\tif( $order !== NULL )\n\t\t{\n\t\t\t$query .= ' ORDER BY ' . $order;\n\t\t}\n\t\t\n\t\t/* Limit */\n\t\tif( $limit !== NULL )\n\t\t{\n\t\t\t$query .= $this->compileLimitClause( $limit );\n\t\t}\n\t\t\n\t\t/* Run it */\n\t\t$stmt = $this->preparedQuery( $query, $binds );\n\t\treturn $stmt->affected_rows;\n\t}", "function delete() {\n\t\t$sqlStatements = array();\n\t\t$sqlStatements[] = \"DROP TABLE IF EXISTS tags\";\n\t\t$sqlStatements[] = \"DROP TABLE IF EXISTS siteViews\";\n\t\texecuteSqlStatements($sqlStatements);\n\t}", "public function delete()\n\t{\n\t}", "public function delete() {\n\t\t\t$query = \"DELETE FROM $this->table_name WHERE id=?\";\n\n\t\t\t// prepare biatch\n\t\t\t$stmt = $this->conn->prepare($query);\n\n\t\t\t// bind id biatch\n\t\t\t$stmt->bindParam(1, $this->id);\n\n\t\t\t// execute query\n\t\t\tif ($stmt->execute()) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "function delete() {\n $fetchPrimary = $this->mysqlConnection->query(\"SHOW INDEX FROM \".$this->table);\n $arrayIndex = $fetchPrimary->fetch(PDO::FETCH_ASSOC);\n $kolomIndex = $arrayIndex['Column_name'];\n\n\t\t\t// Delete het huidige record.\n\n\t\t\t$deleteQuery = \"DELETE FROM \".$this->table.\" WHERE \".$kolomIndex.\" = \".$this->originalValues[$kolomIndex];\n\t\t\t$this->lastQuery = $deleteQuery;\n\n $deleteTable = $this->mysqlConnection->prepare($this->lastQuery);\n $deleteTable->execute();\n\n\t\t}", "protected function delete() {\n\t}", "public final function delete() {\n }" ]
[ "0.8400239", "0.70125234", "0.6945524", "0.6887968", "0.6805836", "0.67936546", "0.6769431", "0.67364323", "0.66977626", "0.66763014", "0.6607683", "0.6605072", "0.65323144", "0.65315753", "0.64970666", "0.6473081", "0.64414334", "0.6420754", "0.64002836", "0.63570464", "0.63160414", "0.6283418", "0.6283418", "0.6283418", "0.6283418", "0.62548846", "0.6253139", "0.62503386", "0.62503386", "0.6250314", "0.62490183", "0.62453157", "0.62448746", "0.6242355", "0.6237492", "0.6232513", "0.62290674", "0.6226709", "0.6221848", "0.6220701", "0.6210764", "0.6190414", "0.6173799", "0.6158174", "0.6158174", "0.6158174", "0.6158174", "0.6158174", "0.6158174", "0.6158174", "0.6158174", "0.6158174", "0.6158174", "0.6158174", "0.6158174", "0.6158174", "0.6158174", "0.6158174", "0.6142402", "0.614088", "0.61399335", "0.6135079", "0.6133386", "0.61266977", "0.6126639", "0.6124081", "0.6123563", "0.6122761", "0.6113282", "0.6103763", "0.6101881", "0.6100214", "0.60834146", "0.6070376", "0.60676926", "0.6067599", "0.6067388", "0.606158", "0.60522515", "0.6047812", "0.60464305", "0.6043229", "0.6040812", "0.6040354", "0.60370034", "0.6035892", "0.6028996", "0.6016333", "0.60152537", "0.601292", "0.60093915", "0.6007353", "0.6007353", "0.5994368", "0.5981766", "0.59814334", "0.597376", "0.5973095", "0.5972083", "0.5971423" ]
0.8804365
0
Set passcode and secret while initialization
public function __construct($settings) { if (empty($settings)) { throw new \Exception("Empty webmoney merchant settings data"); } if (empty($settings['merchant_code'])) { throw new \Exception("merchant_code of WMService is empty"); } if (empty($settings['passcode'])) { throw new \Exception("Passcode of WMService is empty"); } if (empty($settings['secret_key'])) { throw new \Exception("Secret key of WMService is empty"); } $this->passcode = $settings['passcode']; $this->merchant_code = $settings['merchant_code']; $this->secret_key = $settings['secret_key']; $this->production_mode = !empty($settings['production_mode']); $this->is_local_test = !empty($settings['is_local_test']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function setCredentials()\n\t{\n\t\t$this->credentials['app_token'] = $this->settings_repo->getSiteSetting('facebook', 'app_token');\n\t\t$this->credentials['page_id'] = $this->settings_repo->getSiteSetting('facebook', 'page_id');\n\t}", "function set_pass($pass)\n\t{\n\t\t$this->pass =$pass;\n\t}", "public function init()\n {\n $this->accessToken = 'EAAPgIZBacbTMBAJnVjjmoOW3tjZClqcJDUP3NZB5Dbi72zA2Ix8tE5qviZAE4BF3UqluxlZCLAOnlqe0WYeTXGZBTesuyGPQXb7iPZAC2qOWnX376GvrvZAiO34bcEJ7TYyPqgqV2uLZAkvHD8DkjuPZC7OEpS91ydHnNXbEPpclLSQQZDZD';\n }", "private function set_secret($secret) {\n\t\t$this->secret = $secret;\n\t}", "public function setSecret($secret);", "public function setSecret($secret);", "private function _set_secret($secret) {\n\t\t$this->set_secret(bin2hex($secret));\n\t}", "function setPass($pwd) \n {\n\t\t\t$this->pass = $pwd;\n\t\t}", "public function _initPhpass()\n {\n $options = $this->getOptions();\n\n $iterations = isset($options['phpassIterations']) \n ? $options['phpassIterations']\n : 8;\n $phpass = new Phpass($iterations);\n AuthModel::setDefaultPhpass($phpass);\n }", "public function init_credentials()\n\t{\n\t\tif($this->get_session('admin') != null)\n\t\t{\n\t\t\t$this->credentials['admin'] \t\t\t= $this->get_session('admin');\n\t\t\t$this->credentials['grupo_admin'] \t\t= $this->get_session('admin_grupo');\n\t\t\t$this->credentials['permissoes_admin'] \t= $this->get_session('admin_permissoes');\n\t\t\t\n\t\t\t$this->credentials['workspace_id'] \t\t= $this->get_session('workspace_id');\n\t\t\t$this->credentials['workspace_nome']\t= $this->get_session('workspace_nome');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->credentials = null;\n\t\t}\n\t}", "protected function setUp(){\n $this->hashedPass = hash('sha512', Cons::USER_PASS );\n }", "public function setPass($pass)\n {\n $this->pass =$pass;\n\n \n }", "public function setPass($pass) {\n\n $this->pass = $pass;\n }", "function __construct() {\r\n $this->setPasscode(filter_input(INPUT_POST, 'passcode'));\r\n }", "public function setPassword(){\n\t}", "function initialize()\n {\n if (isset($this->key)) {\n $key = common_config('contextio', 'key');\n if (empty($key)) {\n Config::save(\n 'contextio',\n 'key',\n $this->key\n );\n }\n }\n\n if (isset($this->secret)) {\n $secret = common_config('contextio', 'secret');\n if (empty($secret)) {\n Config::save('contextio', 'secret', $this->secret);\n }\n }\n }", "function __construct()\n{\n\tglobal $pclib;\n\t\n\tparent::__construct();\n\n\t$this->app = $pclib->app;\n\n\t$this->passwordAlgo = $this->app->config['pclib.auth']['algo'];\n\t$this->secret = $this->app->config['pclib.auth']['secret'];\n}", "public function setSecret($secret)\n {\n $this->secret = $secret;\n }", "public function setSecret($secret)\n {\n $this->secret = $secret;\n }", "public function setSecret($secret)\n {\n $this->secret = $secret;\n }", "public function setSecret($secret) {\n $this->secret = $secret;\n }", "public function setSecret($secret)\n\t{\n\t\t$this->secret = $secret;\n\t}", "public function setpassword(){\n\t\t$args = $this->getArgs();\n\t\t$out = $this->getModel()->getUserDataByRenewToken(UserController::getRenewTokenHash($args[\"GET\"][\"token\"]));\n\t\tinclude 'gui/template/UserTemplate.php';\n\t}", "function set_password($string) {\r\n echo PHP_EOL;\r\n $this->action(\"setting new password of: $string\");\r\n $this->hashed_password = hash('sha256', $string . $this->vehicle_salt);\r\n $this->action(\"successfully set new password\");\r\n }", "public function setPassword() {\n\t\ttry {\n\t\t\t$data = json_decode(file_get_contents('php://input'), true);\n\t\t\t\n\t\t\tif (!isset($data['password'])) {\n\t\t\t\t$this->respondError('Missing input', 400);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t$user = $this->getUserFromAccessToken($_GET['access_token']);\n\t\t\tif ($user == null) {\n\t\t\t\tthrow new Exception(\"Invalid access token.\");\n\t\t\t}\n\t\t\t\n\t\t\t$user->setPassword($data['password']);\n\t\t\t$this->dm->persist($user);\n\t\t\t$this->dm->flush();\n\t\t}\n\t\tcatch (Exception $e) {\n\t\t\t$this->respondError($e->getMessage() . \" in \" . $e->getFile() . \" on line \" . $e->getLine() . \"\\n\" . $e->getTraceAsString());\n\t\t}\n\t}", "private function setUserPass(){\n if($this->_request->get(login_user)){\n $this->_user = $this->_request->get(login_user);\n }else{\n $this->_user = $this->getCookie();\n }\n $this->_pass = $this->_request->get('login-password');\n }", "private function setEncryptPassword(){\n // Encode the new users password\n $encrpyt = $this->get('security.password_encoder');\n $password = $encrpyt->encodePassword($this->user, $this->user->getPassword());\n $this->user->setPassword($password);\n }", "public function setCredentials($b64_user=\"\")\n\t{\t\n\t\t// It is possible to retrieve information form any user specified in here.\n\t\t// If no user is specified, the system will take the current one.\n\t\tif (empty($b64_user))\n\t\t{\n\t\t\tif (isset($_SESSION[\"USER\"]))\n\t\t\t{\n\t\t\t\t$this->curlObj->set_credentials($_SESSION[\"USER\"]);\n\t\t\t}\n\t\t} else {\n\t\t\t$this->curlObj->set_credentials($b64_user);\n\t\t}\n\t}", "public function __construct($secret_key){\n $this->secret_key = $secret_key;\n }", "public function setPass($request)\r\n {\r\n $params = [\r\n 'Password' => password_hash($request['password'], PASSWORD_DEFAULT),\r\n ];\r\n \r\n \r\n $this->primary = 'Activation';\r\n /*\r\n * Update row in user table where Activativon ==$request['activateCode'] with new password (hash code)\r\n */\r\n $this->update($request['activateCode'], $params);\r\n\r\n }", "public function setPassword() {\n if ($this->Password) {\n $this->Password = \\app\\components\\Utilities::setHashedValue($this->Password);\n }\n }", "public function setPassword($p) {\n $this->_password = $p;\n }", "public function setSandboxUserCredentials()\n {\n $userCredentials = $this->getClass('UserCredentials');\n\n $userCredentials->setUsername( 'Siteowner' );\n $userCredentials->setPassword( 'apitest1234' );\n $userCredentials->setSiteIDs( array(-99) );\n\n $this->userCredentials = $userCredentials;\n }", "public function setAuthParams()\n {\n if( $this->getUseSession() )\n {\n // FIXME Need to add session functionality\n }\n else\n {\n $this->getHttpClient()->setParameterGet( 'user', $this->getUsername() );\n $this->getHttpClient()->setParameterGet( 'password', $this->getPassword() );\n $this->getHttpClient()->setParameterGet( 'api_id', $this->getApiId() );\n }\n }", "function setAPIPassword($password)\n {\n $this->_password = $password;\n }", "private function setPasskey($passkey)\n {\n $this->passkey = $passkey;\n $this->redis->set('passkey_'.$this->token, $passkey);\n }", "function __construct($walletpass){\n\t\t \t$this->root = 'https://blockchain.info/merchant/'.$_SESSION['user']->guid;\n\t\t \t$_SESSION['walletpass'] = $walletpass;\n\t\t}", "public function create_secret() {\n\n\t\t$this->path = '/secret';\n\t}", "public function setSecret() {\r\n $rand = $this->psl['crypt/rand'];\n\n $this->secret = $rand->bytes(32);\r\n $cookieParam = session_get_cookie_params();\r\n setcookie(\r\n $this->keyCookie,\r\n base64_encode($this->secret),\r\n $cookieParam['lifetime'],\r\n $cookieParam['path'],\r\n $cookieParam['domain'],\r\n $cookieParam['secure'],\r\n $cookieParam['httponly']\r\n );\r\n return true;\r\n }", "function setAuth($user, $pass) {\n\t\t$this->authUser = $user;\n\t\t$this->authPass = $pass;\n\t}", "public function setPW($dw) {}", "public function setClientSecret($secret)\n {\n $this->sharedSecret = $secret;\n }", "public static function setAuth($accessKey, $secretKey)\n\t{\n\t\tself::$__accessKey = $accessKey;\n\t\tself::$__secretKey = $secretKey;\n\t}", "function rest_get_authenticated_app_password()\n {\n }", "protected function loadApplicationCredentials() {\n\t\t$appCredentials = AppConfigLoader::getInstance()->getConfig(ConfigLoader::CREDENTIALS,self::APP_CREDENTIALS_REQUIRED);\n\t\tif($this->isValidCredentialsConfig($appCredentials,self::APP_CREDENTIALS_REQUIRED)) {\n\t\t\t$this->assignCredentials($appCredentials);\n\t\t}\n\t}", "function set_laravel_passport_grant_client_token()\n {\n DB::table('oauth_clients')\n ->where('id', 2)\n ->update(['secret' => 'dLdsIf3nPMWJC4gOCNcsUn5pBSv5tTPSaU51Gu2F']);\n }", "public final function setUp(): void {\n\t\tparent::setUp();\n\t\t//\n\t\t$password = \"abc123\";\n\n\t\t$this->VALID_HASH = password_hash($password, PASSWORD_ARGON2I, [\"time_cost\" => 384]);\n\t\t$this->VALID_ACTIVATION = bin2hex(random_bytes(16));\n\t}", "public final function setUp() : void {\n\t\tparent::setUp();\n\n\t\t// creating hashed password and random token\n\t\t$password = \"1234abcd\";\n\t\t$this->VALID_PROFILE_HASH = password_hash($password, PASSWORD_ARGON2I, [\"time_cost\" => 384]);\n\t\t$this->VALID_ACTIVATION_TOKEN = bin2hex(random_bytes(16));\n\t}", "public function setPassword($userid, $password);", "public function setLwaClientSecret(string $lwaClientSecret): void\n {\n $this->auth->setLwaClientSecret($lwaClientSecret);\n }", "public function __construct($secretKey, $systemSalt);", "public function setPassword($value);", "function wp_set_password($password, $user_id)\n {\n }", "public function setPassword($password);", "public function setPassword($password);", "public function setPassword($password);", "public function generateSecurePassword()\n {\n\n try {\n // Generate the random salt, \n // replace byte por byte for utf8 support\n $this->_salt = strtr(base64_encode(mcrypt_create_iv(22, MCRYPT_DEV_URANDOM)), '+', '.');\n\n // generate the password with the salt\n $this->password = password_hash($this->password, PASSWORD_BCRYPT, ['salt' => $this->_salt]);\n } catch (\\Exception $ex) {\n \\kerana\\Exceptions::showError('LoginError', $ex);\n }\n }", "public function setPassword($plain){\n\t\t\n $salt = \"$2a$12$\" . uniqid() . PLAIN_PHP\\Utils::randomString(9);\n \n //force blowfish algorithm through salt\n $this->password = crypt($plain, $salt);\n R::store($this->bean);\n }", "public function initPassword() {\n\t\t$this->salt = mt_rand();\n\t\t$clearPassword = mt_rand();\n\t\t$this->password = sha1($this->salt . $clearPassword);\n\t\treturn $clearPassword;\t\n\t}", "public function set_ad_password($_ad_password)\n {\n $this->_ad_password = $_ad_password;\n }", "public function initUser($user_id, $passwd) {\n $db = $this->dbConnect();\n $req = $db->prepare('UPDATE p5_users SET USER_PASSWD = ? WHERE USER_ID = ?');\n $req->execute(array($passwd, $user_id));\n $req->closeCursor();\n }", "public function setClientSecret($client_secret) {\n\t\t$this->client_secret = $client_secret;\n\t}", "public function generateKeyAndSecret() {\n $user = user_load($this->uid);\n\n $this->app_key = str_replace(array(' ', '', '-'), '_', strtolower($this->title));\n $this->app_secret = md5($user->name . $this->time);\n }", "function init($code, $redirect, $clientid, $clientsecretid)\n{\n// Get authorization code by posting to discord's API\n$response = $GLOBALS['http']->request('POST', '/api/oauth2/token', [\n\t\t\t'form_params' => [\n\t\t\t\t'client_id' => $clientid,\n\t\t\t\t'client_secret' => $clientsecretid,\n\t\t\t\t'grant_type' => 'authorization_code',\n\t\t\t\t'code' => $code,\n\t\t\t\t'redirect_uri' => $redirect,\n\t\t\t]\n\t\t]);\n\t\t$responseBody1 = $response->getBody(true);\n\t\t$results= json_decode($responseBody1, true);\n\t\t$_SESSION['auth_token'] = $results['access_token'];\n}", "public function set_auth_code() {\n\t\t$tokens = new Token_User( '_indieauth_code_' );\n\t\t$tokens->set_user( self::$author_id );\n\t\treturn $tokens->set( static::$test_auth_code, 600 );\n\t}", "public function setAppSecret($appSecret)\n {\n $this->appSecret = $appSecret;\n }", "public function setToken()\n\t{\n\t\t $args = phpSmug::processArgs( func_get_args() );\n\t\t $this->oauth_token = $args['id'];\n\t\t $this->oauth_token_secret = $args['Secret'];\n\t}", "public function set_password()\n {\n factory(User::class)->create(['username' => 'testuser']);\n\n $cmd = $this->artisan('user:password testuser --password=testing');\n $cmd->assertExitCode(0);\n\n $cmd->execute();\n\n $user = User::query()->where('username', 'testuser')->first();\n $this->assertTrue(Hash::check('testing', $user->password));\n }", "public function setPass($u_pass) {\n\n $this->u_pass = $u_pass;\n\n }", "public function getSecret();", "public function getSecret();", "public function getSecret();", "public function getSecret();", "public function getSecret();", "public static function setPassword($val) \n { \n emailSettings::$password = $val; \n }", "public function getClientSecret();", "public function getClientSecret();", "public function InitializePasswordHash($passwd_hash) {\n if (empty($this->passwdHash)){\n $this->passwdHash = $passwd_hash;\n }\n }", "function SetPassword ( $p )\n {\n $this->username = isset( $_SESSION [ \"username\" ] ) ? sanitize_string( $_SESSION [ \"username\" ] ) : null;\n if ( !$this->username ) {\n $this->username = isset( $_COOKIE [ \"username\" ] ) ? sanitize_string( $_COOKIE [ \"username\" ] ) : null;\n }\n $this->mongo->setCollection( COLLECTION_ADMINS );\n $this->mongo->dataUpdate( array( \"username\" => $this->username ), array( '$set' => array( \"password\" => sha1( $p ) ) ) );\n }", "public function __construct()\n {\n $this->merchant = [\n 'key' => getenv('MERCHANT_KEY'),\n 'secret' => getenv('MERCHANT_SECRET')\n ];\n }", "function __construct($key, $secret) {\n $this->key = $key;\n $this->secret = $secret;\n }", "public function setPasskey($passkey) {\n $oldPasskey = $this->passkey;\n $this->passkey = $passkey;\n \n $this->tracker->updateUserPasskey($this, $oldPasskey);\n }", "public function setToken($token, $token_secret) {}", "public function setSecret(string $secret) : self\n {\n $this->initialized['secret'] = true;\n $this->secret = $secret;\n return $this;\n }", "protected function setNewEncryptionKeyAndLogOut() {}", "protected function configureSaltedPasswords() {}", "public function setAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function setPassword(string $password): void\n {\n }", "public function __construct()\n {\n parent::__construct();\n CoinGate::config([\n 'app_id' => '5507',\n 'api_key' => '8aPuGKxTwVAr9ycZ3n2zvN',\n 'api_secret' => 'lgTBcsASv7a8QjxO1kC5nyHdI0qVJmeE',\n ]);\n }", "public function withPass($pass);", "public function setClientSecret($clientSecret){\n $this->clientSecret = $clientSecret;\n }", "function secret_key_1(){\n return \"secret_key_1_password\";\n}", "protected function getConfiguredPassword() {}", "public function setAuthenticationParams() {\n }", "public function test_admin_set_password()\n {\n $this->assertTrue($this->btwServer->adminSetServerPassword('secret'));\n }", "public function test_admin_set_password()\n {\n $this->assertTrue($this->btwServer->adminSetServerPassword('secret'));\n }", "public final function setUp() : void {\nparent::setUp();\n\n$password = \"mypassword12\";\n$this->VALID_HASH = password_hash($password, PASSWORD_ARGON2I, [\"time_cost\" => 7]);\n$this->VALID_ACTIVATION = bin2hex(random_bytes(16));\n}", "function __construct($key = \"\", $secret = \"\")\n {\n $this->key = $key;\n $this->secret = $secret;\n }", "public function setPasswordAttribute($pass)\n {\n $this->attributes['password'] = app('hash')->make($pass);\n }", "public function initialize()\n {\n $this->config = new \\Configs\\Core\\PasswordResetKeys();\n\n\n }", "public function usePassword($password)\n {\n // CODE...\n }" ]
[ "0.6567301", "0.6506423", "0.6473258", "0.6420782", "0.6351151", "0.6351151", "0.6325709", "0.62705135", "0.62335616", "0.61936057", "0.61847633", "0.6176646", "0.61755073", "0.607649", "0.6067332", "0.6032113", "0.6031188", "0.60241413", "0.60241413", "0.60241413", "0.5992319", "0.59823054", "0.59701574", "0.5951572", "0.5942212", "0.5930935", "0.59126455", "0.5893986", "0.58770156", "0.5835717", "0.5818953", "0.58090425", "0.58035517", "0.5802514", "0.580136", "0.5797002", "0.57883036", "0.5782632", "0.5766014", "0.5730662", "0.5720769", "0.5711484", "0.570619", "0.5699465", "0.56896156", "0.5679207", "0.56691736", "0.56656057", "0.56558627", "0.5650694", "0.5647852", "0.5638", "0.56090325", "0.5602716", "0.5602716", "0.5602716", "0.5591524", "0.5590785", "0.5589439", "0.5584058", "0.5583489", "0.55596596", "0.55573267", "0.5557004", "0.55548483", "0.554003", "0.5531748", "0.5524596", "0.5490874", "0.54900575", "0.54900575", "0.54900575", "0.54900575", "0.54900575", "0.5489116", "0.5484892", "0.5484892", "0.5482146", "0.54744095", "0.54734135", "0.54728806", "0.5468706", "0.54662776", "0.5465266", "0.5461364", "0.54588985", "0.5458693", "0.5453511", "0.54528534", "0.5445317", "0.5442589", "0.5441013", "0.54335093", "0.5432776", "0.54232764", "0.54232764", "0.5420307", "0.5416008", "0.5406933", "0.539536", "0.5392013" ]
0.0
-1
Construct new curl object with application/json header
public function getCurl() { $curl = new Curl(); $curl->setOption(CURLOPT_HTTPHEADER, array( 'Content-Type:application/json', 'Authorization:' . $this->passcode, 'X-Forwarded-Host:' . $_SERVER['HTTP_HOST'], 'X-Forwarded-For:' . $_SERVER['SERVER_ADDR'], 'Referer:' . NetHelper::getCurrentURL(), )); $curl->setOption(CURLOPT_TIMEOUT, 200); $curl->setOption(CURLOPT_CONNECTTIMEOUT, 200); // temporarily disables SSL verifying $curl->setOption(CURLOPT_SSL_VERIFYPEER, false); return $curl; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function curlWrap($url, $json, $action)\n{\n\t$ch = curl_init();\n\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n\tcurl_setopt($ch, CURLOPT_MAXREDIRS, 10 );\n\tcurl_setopt($ch, CURLOPT_URL, ZDURL.$url);\n\tcurl_setopt($ch, CURLOPT_USERPWD, ZDUSER.\"/token:\".ZDAPIKEY);\n\tswitch($action){\n\t\tcase \"POST\":\n\t\t\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\n\t\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $json);\n\t\t\tbreak;\n\t\tcase \"GET\":\n\t\t\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\n\t\t\tbreak;\n\t\tcase \"PUT\":\n\t\t\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"PUT\");\n\t\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $json);\n\t\tdefault:\n\t\t\tbreak;\n\t}\n\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/json'));\n\tcurl_setopt($ch, CURLOPT_USERAGENT, \"MozillaXYZ/1.0\");\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\tcurl_setopt($ch, CURLOPT_TIMEOUT, 10);\n\t$output = curl_exec($ch);\n\tcurl_close($ch);\n\t$decoded = json_decode($output);\n\treturn $decoded;\n}", "function curlWrap($url, $json)\n{\n\n $ch = curl_init();\n\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($ch, CURLOPT_MAXREDIRS, 10);\n curl_setopt($ch, CURLOPT_URL, ZDURL . $url);\n curl_setopt($ch, CURLOPT_USERPWD, ZDUSER . \"/token:\" . ZDAPIKEY);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\n curl_setopt($ch, CURLOPT_HTTPHEADER, array(\n 'Content-type: application/json'\n ));\n curl_setopt($ch, CURLOPT_USERAGENT, \"MozillaXYZ/1.0\");\n curl_setopt($ch, CURLOPT_POSTFIELDS, $json);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_TIMEOUT, 10);\n\n $info = curl_getinfo($ch);\n $output = curl_exec($ch);\n curl_close($ch);\n $decoded = json_decode($output);\n return $decoded;\n\n $info = curl_getinfo($ch);\n return $info;\n\n}", "public function curlInit() {\n parent::curlInit();\n curl_setopt($this->curl, CURLOPT_HEADER, true);\n curl_setopt($this->curl, CURLOPT_ACCEPT_ENCODING, 'identity');\n }", "function init_curl()\n\t{\n\t\t$this->ch = curl_init();\n\t\t$user_agent = $this->user_agent;\n\t\t$header[] = \"Accept: application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/jpeg, application/x-ms-xbap, application/x-shockwave-flash, */*\";\n\t\t$header[] = \"Accept-Language: en-US\";\n\t\t$header[] = \"User-Agent: \" . $user_agent;\n\t\t$header[] = \"Connection: Keep-Alive\";\n\t\t$header[] = \"Pragma:\";\n\t\t$header[] = \"Expect:\";\n\t\t$header[] = \"Content-Type:\";\n\n\t\t$this->header = $header;\n\n\t\t$header2[] = \"Accept: application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/jpeg, application/x-ms-xbap, application/x-shockwave-flash, */*\";\n\t\t$header2[] = \"Accept-Language: en-US\";\n\t\t$header2[] = \"User-Agent: \" . $user_agent;\n\t\t$header2[] = \"Connection: Keep-Alive\";\n\t\t$header2[] = \"Content-Type: application/x-www-form-urlencoded\";\n\t\t$header2[] = \"Pragma:\";\n\t\t$header2[] = \"Expect:\";\n\n\t\t$this->header_post = $header2;\n\n\t\t$header3[] = \"Accept: application/json, text/javascript, */*\";\n\t\t$header3[] = \"Accept-Language: en-US\";\n\t\t$header3[] = \"User-Agent: \" . $user_agent;\n\t\t$header3[] = \"Content-Type: application/x-www-form-urlencoded\";\n\t\t$header3[] = \"x-requested-with: XMLHttpRequest\";\n\t\t$header3[] = \"Connection: Keep-Alive\";\n\t\t$header3[] = \"Pragma:\";\n\t\t$header3[] = \"Expect:\";\n\n\t\t$this->header_json = $header3;\n\n\t\t$header4[] = \"Accept: application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/jpeg, application/x-ms-xbap, application/x-shockwave-flash, */*\";\n\t\t$header4[] = \"Accept-Language: en-US\";\n\t\t$header4[] = \"User-Agent: \" . $user_agent;\n\t\t$header4[] = \"Connection: Keep-Alive\";\n\t\t$header4[] = \"Content-Type: multipart/form-data\";\n\t\t$header4[] = \"Pragma:\";\n\t\t$header4[] = \"Expect:\";\n\n\t\t$this->header_multipart = $header4;\n\n\t\tcurl_setopt($this->ch, CURLOPT_USERAGENT, $user_agent);\n\t\tcurl_setopt($this->ch, CURLOPT_COOKIEJAR, $this->opt[\"cookie_dir\"].\"/\".$this->id);\n\t\tcurl_setopt($this->ch, CURLOPT_COOKIEFILE, $this->opt[\"cookie_dir\"].\"/\".$this->id);\n\t\t//curl_setopt($this->ch, CURLOPT_ENCODING, 'gzip, deflate');\n\t\tcurl_setopt($this->ch, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($this->ch, CURLOPT_HEADER, 1);\n\t\tcurl_setopt($this->ch, CURLOPT_FOLLOWLOCATION, 1);\n\t\tcurl_setopt($this->ch, CURLOPT_VERBOSE, $this->opt[\"verbose\"]);\n\t\tcurl_setopt($this->ch, CURLOPT_TIMEOUT, $this->opt[\"timeout\"]);\n\t\tcurl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n\t\tcurl_setopt($this->ch, CURLOPT_SSL_VERIFYHOST, FALSE);\n\n\t\tif ($this->opt[\"use_proxy\"] && isset($proxy))\n\t\tcurl_setopt($this->ch, CURLOPT_PROXY, $proxy);\n\t\t//print \"Set Curl Proxy $proxy\\n\";\n\t\t//curl_setopt($this->ch, CURLOPT_PROXYUSERPWD, \"ocbeta:echo11ra\");\n\n\t\t//if ($this->opt[\"use_ips\"])\n\t\t//curl_setopt($this->ch, CURLOPT_INTERFACE, $this->get_ip());\n\t}", "public function setupCurl()\n {\n $ch = curl_init();\n curl_setopt($ch,CURLOPT_URL,\"https://jsonplaceholder.typicode.com/posts\");\n curl_setopt($ch, CURLOPT_HEADER, 0);\n curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);\n\n return $ch;\n }", "function make_curl($search_param, $url){\n \n // default header shit\n $headers = array(\"Accept: application/json\", \"Content-Type: application/json\");\n \n //step1\n $cSession = curl_init($url);\n \n //echo $search_param[\"league_name\"];\n //echo json_encode($search_param);\n\n //step2\n //curl_setopt($cSession,CURLOPT_URL, $url.\"?league_name=\".$search_param[\"league_name\"].\"&year=\".$search_param[\"year\"]);\n curl_setopt($cSession,CURLOPT_POSTFIELDS, json_encode($search_param));\n curl_setopt($cSession,CURLOPT_RETURNTRANSFER,true);\n curl_setopt($cSession,CURLOPT_HEADER, false);\n curl_setopt($cSession,CURLOPT_HTTPHEADER, $headers);\n \n //step3\n $jsonData = curl_exec($cSession);\n $err = curl_error($cSession);\n \n //step4\n curl_close($cSession);\n //echo ($jsonData);\n \n //step5\n return ($jsonData);\n}", "function restPost($url, $content) {\n\t$ch = curl_init();\n\t// Uses the URL passed in that is specific to the API used\n\tcurl_setopt($ch, CURLOPT_URL, $url);\n\t// When posting to a Fuel API, content-type has to be explicitly set to application/json\n\t$headers = [\"Content-Type: application/json\", \"User-Agent: \" . getSDKVersion()];\n\tcurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n\t// The content is the JSON payload that defines the request\n\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $content);\n\t//Need to set ReturnTransfer to True in order to store the result in a variable\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t// Disable VerifyPeer for SSL\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\t$outputJSON = curl_exec($ch);\n\t$responseObject = new \\stdClass();\n\t$responseObject->body = $outputJSON;\n\t$responseObject->httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n\treturn $responseObject;\n}", "public function init()\n {\n $this->curl = (new Curl())->setOption(\n CURLOPT_HTTPHEADER, [\n 'Authorization: Basic ' . $this->apiKey,\n 'Content-Type: application/json'\n ]\n );\n }", "protected function _curl_buildRequest($method,$url,$data) {\n\t\t$http = curl_init($url);\n\t\t$http_headers = array('Accept: application/json,text/html,text/plain,*/*') ;\n\t\tif ( is_object($data) OR is_array($data) )\n\t\t\t$data = json_encode($data);\n\n\t\tcurl_setopt($http, CURLOPT_CUSTOMREQUEST, $method);\n\n\t\tif ( $method == 'COPY') {\n\t\t\t$http_headers[] = \"Destination: $data\";\n\t\t} elseif ($data) {\n\t\t\tcurl_setopt($http, CURLOPT_POSTFIELDS, $data);\n\t\t}\n\t\tcurl_setopt($http, CURLOPT_HTTPHEADER,$http_headers);\n\t\treturn $http;\n\t}", "function simple_curl($url)\n{\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_TIMEOUT, 5);\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);\n curl_setopt($ch, CURLOPT_HEADER, false);\n curl_setopt($ch, CURLOPT_NOBODY, false);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json', 'Accept: application/json'));\n $content = curl_exec($ch);\n $contentType = curl_getinfo($ch, CURLINFO_CONTENT_TYPE);\n curl_close($ch);\n //echo $content;\n return $content;\n}", "public function curlinit($data) {\n\t\t$sweet = curl_init();\n\t\tcurl_setopt($sweet, CURLOPT_URL, $this->bkash_api_base);\n\t\tcurl_setopt($sweet, CURLOPT_POST, 1);\n\t\tcurl_setopt($sweet, CURLOPT_POSTFIELDS, http_build_query($data));\n\t\tcurl_setopt($sweet, CURLOPT_RETURNTRANSFER, true);\n\t\t$response = curl_exec($sweet);\n\t\tcurl_close($sweet);\n\t\treturn json_decode($response);\n\t}", "private function initCurl()\n {\n $this->curlObj = curl_init();\n curl_setopt_array($this->curlObj, array(\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_POST => true,\n CURLOPT_FORBID_REUSE => true,\n CURLOPT_HEADER => false,\n CURLOPT_TIMEOUT => 120,\n CURLOPT_CONNECTTIMEOUT => 2,\n CURLOPT_HTTPHEADER => [\"Connection: Keep-Alive\", \"Keep-Alive: 120\"]\n ));\n }", "protected function setCurlHeaderElement() {\n // set header for cur\n $this->header[] = 'Content-type: application/json';\n $this->header[] = 'Authorization: Bearer '.$this->accessToken;\n }", "public function __construct( JSONRequest $req, $mixed = null );", "public function __construct() {\n $this->_handle = curl_init();\n $this->_opt(CURLOPT_HEADER, false);\n $this->_opt(CURLOPT_RETURNTRANSFER, true);\n }", "public static function createWith(Array $curlInfo):CURLResponse{\r\n\t\t$ret = new self;\r\n\t\tforeach($curlInfo as $property => $value){\r\n\t\t\tif(property_exists($ret,$property)){\r\n\t\t\t\t$ret->$property = $value;\r\n\t\t\t}\r\n\t\t}\r\n return $ret;\r\n }", "function basicCurl($curlURL) {\n $url = $curlURL;\n $cURL = curl_init();\n curl_setopt($cURL, CURLOPT_URL, $url);\n curl_setopt($cURL, CURLOPT_HTTPGET, true);\n curl_setopt($cURL, CURLOPT_HTTPHEADER, array(\n 'Content-Type: application/json',\n 'Accept: application/json'\n ));\n curl_setopt($cURL, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($cURL, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($cURL, CURLOPT_USERAGENT, \"spider\");\n $result = curl_exec($cURL);\n \nif ($result === FALSE) {\n return \"cURL Error: \" . curl_error($cURL);\n} else {\n\treturn $result;\n}\n curl_close($cURL);\n \n}", "function rest_post_data($url, $data)\n{\n if (is_array($data)) {\n $data = json_encode($data);\n }\n\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));\n curl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $result = curl_exec($ch);\n curl_close($ch);\n return $result;\n}", "protected static function init($url, $httpHeaders = array())\n {\n // Create Curl resource\n $ch = curl_init();\n\n // Set URL\n curl_setopt($ch, CURLOPT_URL, $url);\n\n //Return the transfer as a string\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\n curl_setopt($ch, CURLOPT_HEADER, true);\n curl_setopt($ch, CURLOPT_USERAGENT, 'PHPClassic/PHPShopify');\n\n foreach (self::$config as $option => $value) {\n curl_setopt($ch, $option, $value);\n }\n\n $headers = array();\n foreach ($httpHeaders as $key => $value) {\n $headers[] = \"$key: $value\";\n }\n //Set HTTP Headers\n curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n\n return $ch;\n\n }", "function post_HostCreate($json){\n //Posterior se establecen los metodos: POST.\n //Se establecen lo headers.\n $peticion = curl_init('http://10.21.211.105/zabbix/api_jsonrpc.php'); \n curl_setopt($peticion, CURLOPT_CUSTOMREQUEST, \"POST\"); \n curl_setopt($peticion, CURLOPT_POSTFIELDS, $json); \n curl_setopt($peticion, CURLOPT_RETURNTRANSFER, true); \n curl_setopt($peticion, CURLOPT_HTTPHEADER, array( \n 'Content-Type: application/json', \n 'Content-Length: ' . strlen($json)) \n ); \n //Se ejecuta el curl de la peticion y se guarda la respuesta del servidor \n //en la variable response que es retornada por la funcion Post_HostCreate \n $response = curl_exec($peticion);\n return json_decode($response, true);\n}", "private function setUpCurl()\n {\n $this->curl = $this->get('app.curl.connector');\n $this->curl->setEndPointBaseUrl($this->getParameter('themoviedb_endpoint_url'));\n $this->curl->setExtraHeaders([\n CURLOPT_HEADER => false,\n CURLOPT_HTTPHEADER => [\"Accept: application/json\"],\n CURLOPT_SSL_VERIFYPEER => false\n ]);\n }", "protected function createCurlHandle()\n {\n $ch = curl_init();\n\n $bdurl = $this->request->getUrl();\n $config = $this->request->getConfig();\n\n \t$curl_opts = array(\n \t\t// request url\n \t\tCURLOPT_URL\t\t\t\t=> $this->requestUrl,\n \t\t// setup write callbacks\n \t\tCURLOPT_HEADERFUNCTION\t=> array($this, 'onWriteHeader'),\n \t\tCURLOPT_WRITEFUNCTION\t=> array($this, 'onWriteBody'),\n \t\t// buffer size\n \t\tCURLOPT_BUFFERSIZE\t\t=> $config['buffer_size'],\n \t\t// save full outgoing headers, in case someone is interested\n CURLINFO_HEADER_OUT\t\t=> true,\n CURLOPT_NOSIGNAL => 1,\n );\n\n // setup connection timeout\n\t\tif (defined('CURLOPT_CONNECTTIMEOUT_MS')) {\n\t\t\t$curl_opts[CURLOPT_CONNECTTIMEOUT_MS] = $config['connect_timeout'];\n\t\t} else {\n\t\t\t$curl_opts[CURLOPT_CONNECTTIMEOUT] = ceil($config['connect_timeout'] / 1000);\n\t\t}\n\n // setup request timeout\n\t\tif (defined('CURLOPT_TIMEOUT_MS')) {\n\t\t\t$curl_opts[CURLOPT_TIMEOUT_MS] = $config['timeout'];\n\t\t} else {\n\t\t\t$curl_opts[CURLOPT_TIMEOUT] = ceil($config['timeout'] / 1000);\n\t\t}\n\n // setup redirects\n if ($config['follow_redirects']) {\n \t$curl_opts[CURLOPT_FOLLOWLOCATION] = true;\n $curl_opts[CURLOPT_MAXREDIRS] = $config['max_redirects'];\n // limit redirects to http(s), works in 5.2.10+\n if (defined('CURLOPT_REDIR_PROTOCOLS')) {\n $curl_opts[CURLOPT_REDIR_PROTOCOLS] = CURLPROTO_HTTP | CURLPROTO_HTTPS;\n }\n // works sometime after 5.3.0, http://bugs.php.net/bug.php?id=49571\n if ($config['strict_redirects'] && defined('CURLOPT_POSTREDIR ')) {\n $curl_opts[CURLOPT_POSTREDIR] = 3;\n }\n } else {\n $curl_opts[CURLOPT_FOLLOWLOCATION] = false;\n }\n\n // set HTTP version\n switch ($config['protocol_version']) {\n case '1.0':\n $curl_opts[CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_1_0;\n break;\n case '1.1':\n $curl_opts[CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_1_1;\n }\n\n // set request method\n switch ($this->request->getMethod()) {\n case bdHttpRequest::METHOD_GET:\n $curl_opts[CURLOPT_HTTPGET] = true;\n break;\n case bdHttpRequest::METHOD_POST:\n $curl_opts[CURLOPT_POST] = true;\n break;\n case bdHttpRequest::METHOD_HEAD:\n $curl_opts[CURLOPT_NOBODY] = true;\n break;\n default:\n $curl_opts[CURLOPT_CUSTOMREQUEST] = $this->request->getMethod();\n }\n\n // set proxy, if needed\n if ($config['proxy_host']) {\n if (!$config['proxy_port']) {\n throw new bdHttpException('Proxy port not provided');\n }\n $curl_opts[CURLOPT_PROXY] = $config['proxy_host'] . ':' . $config['proxy_port'];\n if ($config['proxy_user']) {\n $curl_opts[CURLOPT_PROXYUSERPWD] = $config['proxy_user'] . ':' . $config['proxy_password'];\n switch ($config['proxy_auth_scheme']) {\n case bdHttpRequest::AUTH_BASIC:\n $curl_opts[CURLOPT_PROXYAUTH] = CURLAUTH_BASIC;\n break;\n case bdHttpRequest::AUTH_DIGEST:\n $curl_opts[CURLOPT_PROXYAUTH] = CURLAUTH_DIGEST;\n }\n }\n }\n\n // set authentication data\n $auth = $this->request->getAuth();\n if ($auth) {\n $curl_opts[CURLOPT_USERPWD] = $auth['user'] . ':' . $auth['password'];\n switch ($auth['scheme']) {\n case bdHttpRequest::AUTH_BASIC:\n $curl_opts[CURLOPT_HTTPAUTH] = CURLAUTH_BASIC;\n break;\n case bdHttpRequest::AUTH_DIGEST:\n $curl_opts[CURLOPT_HTTPAUTH] = CURLAUTH_DIGEST;\n }\n }\n\n // set SSL options\n if (0 == strcasecmp($bdurl->getScheme(), 'https')) {\n \tif (isset($config['ssl_verify_host'])) {\n \t\t$curl_opts[CURLOPT_SSL_VERIFYHOST] = $config['ssl_verify_host'] ? 2 : 0;\n \t}\n \tforeach (self::$sslContextMap as $name => $option) {\n \t\tif (isset($config[$name])) {\n \t\t\t$curl_opts[$option] = $config[$name];\n \t\t}\n \t}\n }\n\n $headers = $this->request->getHeaders();\n // make cURL automagically send proper header\n if (!isset($headers['accept-encoding'])) {\n $headers['accept-encoding'] = '';\n }\n\n // set headers having special cURL keys\n foreach (self::$headerMap as $name => $option) {\n if (isset($headers[$name])) {\n $curl_opts[$option] = $headers[$name];\n unset($headers[$name]);\n }\n }\n\n $this->calculateRequestLength($headers);\n if (isset($headers['content-length'])) {\n $this->workaroundPhpBug47204($curl_opts, $headers);\n }\n\n // set headers not having special keys\n $headersFmt = array();\n foreach ($headers as $name => $value) {\n $canonicalName = implode('-', array_map('ucfirst', explode('-', $name)));\n $headersFmt[] = $canonicalName . ': ' . $value;\n }\n $curl_opts[CURLOPT_HTTPHEADER] = $headersFmt;\n\n curl_setopt_array($ch, $curl_opts);\n\n return $ch;\n }", "private function initCurlRequest() {\n $method = strtoupper($this->method);\n\n // Construct request\n $curlRequest = curl_init($this->finalUrl);\n curl_setopt($curlRequest, CURLOPT_RETURNTRANSFER, 1); // Return contents instead of boolean on exec\n curl_setopt($curlRequest, CURLOPT_BINARYTRANSFER, 1);\n curl_setopt($curlRequest, CURLOPT_HEADER, 1); // Return headers in response\n if ($this->followRedirects)\n curl_setopt($curlRequest, CURLOPT_FOLLOWLOCATION, true); // Follow redirects\n\n // Timeouts\n if ($this->connectTimeout !== null)\n curl_setopt($curlRequest, CURLOPT_CONNECTTIMEOUT, $this->connectTimeout);\n if ($this->executeTimeout !== null)\n curl_setopt($curlRequest, CURLOPT_TIMEOUT, $this->executeTimeout);\n\n // Method-specific\n $acceptsBody = false;\n if ($method === 'POST') {\n curl_setopt($curlRequest, CURLOPT_POST, 1);\n $acceptsBody = true;\n }\n\n // BUG: curl will attempt to set \"Transfer-Encoding: chunked\" header if doing a PUT\n // the workaround is to POST, using an X-HTTP-Method-Override instead.\n // BEWARE: This also requires the server to know how to handle this header.\n if (in_array($method, array('PUT', 'PATCH'))) {\n $this->headers[] = \"X-HTTP-Method-Override: $method\";\n curl_setopt($curlRequest, CURLOPT_POST, 1);\n $acceptsBody = true;\n }\n\n if ($method === 'DELETE')\n curl_setopt($curlRequest, CURLOPT_DELETE, 1);\n\n // Body\n $sendBlankExpect = false;\n if ($acceptsBody) {\n if ($this->files !== null && count($this->files) > 0) {\n $files = [];\n foreach ($this->files as $fileKey => $localPath)\n $files[$fileKey] = '@' . $localPath;\n \n curl_setopt($curlRequest, CURLOPT_POSTFIELDS, $files);\n\n // Workaround for CURL issue where curl_exec() returns both 100/CONTINUE and 200/OK separated by\n // blank line when using multipart form data.\n $sendBlankExpect = true;\n }\n elseif ($this->body) {\n // Default content-type of POST body\n if ($this->json && count(preg_grep('/content-type:/i', $this->headers)) === 0)\n $this->headers[] = 'Content-Type: application/json';\n\n // Seems to implicitly set CURLOPT_POST=1\n curl_setopt($curlRequest, CURLOPT_POSTFIELDS, $this->body);\n }\n }\n\n // Add headers\n $headers = $this->headers;\n if (!$headers)\n $headers = [];\n\n if ($this->json && count(preg_grep('/accept:/i', $headers)) === 0)\n $headers[] = 'Accept: application/json';\n if ($sendBlankExpect)\n $headers[] = 'Expect:';\n\n if (count($headers) > 0)\n curl_setopt($curlRequest, CURLOPT_HTTPHEADER, $headers);\n\n // Authenticate request\n if ($this->username) {\n curl_setopt($curlRequest, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n curl_setopt($curlRequest, CURLOPT_USERPWD, $this->username . ':' . $this->password);\n }\n\n return $curlRequest;\n }", "public function __construct($url)\n {\n $this->url = $url;\n $this->curl = curl_init($this->url);\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLINFO_HEADER_OUT, true);\n curl_setopt($this->curl, CURLOPT_HEADER, 1);\n }", "public function __construct() {\r\n header(\"Access-Control-Allow-Orgin: *\");\r\n header(\"Access-Control-Allow-Methods: *\");\r\n header(\"Content-Type: application/json\");\r\n\r\n $this->args = [0,1];\r\n $this->endpoint = array_shift($this->args);\r\n if (array_key_exists(0, $this->args) && !is_numeric($this->args[0])) {\r\n $this->verb = array_shift($this->args);\r\n }\r\n }", "function quick_curl( $url, $user_auth = null, $rest = 'GET', $input = null, $type = 'JSON'){\n if( function_exists('curl_init') ){\n\n $ch = curl_init();\n curl_setopt( $ch, CURLOPT_URL, $url ); // The URL we're using to get/send data\n\n if( $user_auth ){\n curl_setopt( $ch, CURLOPT_USERPWD, $user_auth ); // Add the authentication\n }\n\n if( $rest == 'POST' ){\n curl_setopt( $ch, CURLOPT_POST, true ); // Send a post request to the server\n } elseif( $rest == 'PATCH' ){\n curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, 'PATCH'); // Send a patch request to the server to update the listing\n } elseif( $rest == 'PUT'){\n curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, 'PUT'); // Send a put request to the server to update the listing\n } // If POST or PATCH isn't set then we're using a GET request, which is the default\n\n curl_setopt( $ch, CURLOPT_CONNECTTIMEOUT, 15 ); // Timeout when connecting to the server\n curl_setopt( $ch, CURLOPT_TIMEOUT, 30 ); // Timeout when retrieving from the server\n curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true ); // We want to capture the data returned, so set this to true\n //curl_setopt( $ch, CURLOPT_HEADER, true ); // Get the HTTP headers sent with the data\n curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, false ); // We don't want to force SSL incase a site doesn't use it\n\n if( $rest !== 'GET' ){\n\n curl_setopt( $ch, CURLOPT_HTTPHEADER, array( 'Content-Type: ' . mime_type( $type ), 'Content-Length: ' . strlen( $input ) ) ); // Tell server to expect the right content type and the content length\n curl_setopt( $ch, CURLOPT_POSTFIELDS, $input ); // Send the actual data\n }\n\n // Get the response\n $response = curl_exec( $ch );\n\n // Check if there's an error in the header\n $httpcode = curl_getinfo( $ch, CURLINFO_HTTP_CODE );\n\n // If there's any cURL errors\n if( curl_errno( $ch ) || ( $httpcode < 200 || $httpcode >= 300 ) ){\n $data = 'error';\n } else {\n \n // Turn response into stuff we can use\n if( $type == 'JSON' ){\n $data = json_decode( $response, true );\n } elseif( $type == 'csv' ){\n $data = csv_to_array( $response );\n } else {\n $data = $response;\n }\n\n }\n\n // Close curl\n curl_close( $ch );\n \n // Send the data back to the function calling the cURL\n return $data;\n \n } else {\n \n // cURL not installed so leave\n return false;\n \n }\n\n\t\n}", "function http($url, $method, $postfields = NULL, $headers = array()) {\n $this->http_info = array();\n $ci = curl_init();\n /* Curl settings */\n curl_setopt($ci, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);\n curl_setopt($ci, CURLOPT_USERAGENT, $this->useragent);\n curl_setopt($ci, CURLOPT_CONNECTTIMEOUT, $this->connecttimeout);\n curl_setopt($ci, CURLOPT_TIMEOUT, $this->timeout);\n curl_setopt($ci, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($ci, CURLOPT_ENCODING, \"\");\n curl_setopt($ci, CURLOPT_SSL_VERIFYPEER, $this->ssl_verifypeer);\n curl_setopt($ci, CURLOPT_SSL_VERIFYHOST, 1);\n curl_setopt($ci, CURLOPT_HEADERFUNCTION, array($this, 'getHeader'));\n curl_setopt($ci, CURLOPT_HEADER, FALSE);\n switch ($method) {\n case 'POST':\n curl_setopt($ci, CURLOPT_POST, TRUE);\n if (!empty($postfields)) {\n curl_setopt($ci, CURLOPT_POSTFIELDS, $postfields);\n $this->postdata = $postfields;\n }\n break;\n case 'DELETE':\n curl_setopt($ci, CURLOPT_CUSTOMREQUEST, 'DELETE');\n if (!empty($postfields)) {\n $url = \"{$url}?{$postfields}\";\n }\n }\n if (isset($this->access_token) && $this->access_token)\n $headers[] = \"Authorization: OAuth2 \" . $this->access_token;\n if (!empty($this->remote_ip)) {\n if (defined('SAE_ACCESSKEY')) {\n $headers[] = \"SaeRemoteIP: \" . $this->remote_ip;\n } else {\n $headers[] = \"API-RemoteIP: \" . $this->remote_ip;\n }\n } else {\n if (!defined('SAE_ACCESSKEY')) {\n $headers[] = \"API-RemoteIP: \" . $_SERVER['REMOTE_ADDR'];\n }\n }\n curl_setopt($ci, CURLOPT_URL, $url);\n curl_setopt($ci, CURLOPT_HTTPHEADER, $headers);\n curl_setopt($ci, CURLINFO_HEADER_OUT, TRUE);\n $response = curl_exec($ci);\n $this->http_code = curl_getinfo($ci, CURLINFO_HTTP_CODE);\n $this->http_info = array_merge($this->http_info, curl_getinfo($ci));\n $this->url = $url;\n if ($this->debug) {\n echo \"=====post data======\\r\\n\";\n var_dump($postfields);\n echo \"=====headers======\\r\\n\";\n print_r($headers);\n echo '=====request info=====' . \"\\r\\n\";\n print_r(curl_getinfo($ci));\n echo '=====response=====' . \"\\r\\n\";\n print_r($response);\n }\n curl_close($ci);\n return $response;\n }", "public function postJsonRest($url,$json){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$client=curl_init($url);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tcurl_setopt($client, CURLOPT_POSTFIELDS, $json);\n\t\t\t\t\t\t\t\t\tcurl_setopt($client, CURLOPT_RETURNTRANSFER, true);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tcurl_setopt($client, CURLOPT_HTTPHEADER, array(\n\t\t\t\t\t\t\t\t\t'Content-Type: application/json',\n\t\t\t\t\t\t\t\t\t'Content-Length: ' . strlen($json))\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tcurl_setopt($client, CURLOPT_TIMEOUT, 5);\n\t\t\t\t\t\t\t\t\tcurl_setopt($client, CURLOPT_CONNECTTIMEOUT, 5);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$response=curl_exec($client);\n\t\t\t\t\t\t\t\t\t//$result=json_decode($response,true);\n\t\t\t\t\t\t\t//\t\tprint $response;\n\t\t\t\t\t\t\t\t\tcurl_close($client);\n\t\t\t\t\t\t\t\t\treturn $response;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}", "function https_get_header_json($token_url) {\n $timeout = 30;\n $ch = curl_init(); \n // set URL and other appropriate options\n curl_setopt($ch, CURLOPT_URL, $token_url);\n //curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n //curl_setopt($ch, CURLOPT_BINARYTRANSFER, true);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);\n $file_contents = curl_exec($ch);\n curl_close($ch);\n\n return $file_contents;\n}", "function send_requests($json_payload, $url){\n $ch = curl_init(\"$url\");\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\n curl_setopt($ch, CURLOPT_POSTFIELDS, $json_payload);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array(\n 'Content-Type: application/json',\n 'Content-Length: ' . strlen($json_payload))\n ); \n return curl_exec($ch);\n}", "function restPut($url, $content) {\n\t$ch = curl_init();\n\t// Uses the URL passed in that is specific to the API used\n\tcurl_setopt($ch, CURLOPT_URL, $url);\n\t// When posting to a Fuel API, content-type has to be explicitly set to application/json\n\t$headers = [\"Content-Type: application/json\", \"User-Agent: \" . getSDKVersion()];\n\tcurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n\t// The content is the JSON payload that defines the request\n\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $content);\n\t//Need to set ReturnTransfer to True in order to store the result in a variable\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t//Need to set the request to be a PATCH\n\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"PUT\");\n\t// Disable VerifyPeer for SSL\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\t$outputJSON = curl_exec($ch);\n\t$responseObject = new \\stdClass();\n\t$responseObject->body = $outputJSON;\n\t$responseObject->httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n\treturn $responseObject;\n}", "function post($url, $headers, $params)\n{\n $data = json_encode($params);\n\n $curl = curl_init();\n\n array_push($headers, \"Content-Type: application/json\");\n array_push($headers, \"Content-Length: \" . strlen($data));\n\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_CUSTOMREQUEST, \"POST\");\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($curl, CURLOPT_POST, true);\n curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);\n curl_setopt($curl, CURLOPT_POSTFIELDS, $data);\n\n // print_r(\"=========请求信息 start =========\\n\");\n // print_r($url . \"\\n\");\n // print_r(json_encode($headers) . \"\\n\");\n // print_r($data . \"\\n\");\n $response = curl_exec($curl);\n curl_close($curl);\n // print_r(\"==============================\\n\");\n // print_r($response);\n // print_r(\"\\n=========请求信息 end =========\\n\");\n return $response;\n}", "private function setHttpHeader($json = true)\n {\n $header = [\n \"Authorization: OAuth $this->token\",\n ];\n\n if ($json) {\n\n array_push($header, \"Content-type: application/json\");\n }\n\n curl_setopt(\n $this->curl,\n CURLOPT_HTTPHEADER,\n $header\n );\n }", "public function __construct()\n {\n $this->curl = curl_init();\n\n curl_setopt_array(\n $this->curl,\n array(\n CURLOPT_FOLLOWLOCATION => true,\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_TIMEOUT => 60,\n CURLOPT_CONNECTTIMEOUT => 10,\n CURLOPT_VERBOSE => true,\n CURLOPT_HEADERFUNCTION => array($this, 'header'),\n CURLOPT_ENCODING => 'gzip,deflate',\n CURLOPT_USERAGENT => 'doi-index/0.1 (+http://goo.gl/AejefJ)',\n CURLOPT_COOKIEFILE => '/tmp/cookies.txt',\n CURLOPT_COOKIEJAR => '/tmp/cookies.txt',\n )\n );\n }", "private function create_curl($s_url, $request_method = 'GET', $query_params = array() )\n\t{\n\t\t# Create the signed signature...\n\t\t$signed_query = Pusher::build_auth_query_string(\n\t\t\t$this->settings['auth_key'],\n\t\t\t$this->settings['secret'],\n\t\t\t$request_method,\n\t\t\t$s_url,\n\t\t\t$query_params);\n\n\t\t$full_url = $this->settings['server'] . ':' . $this->settings['port'] . $s_url . '?' . $signed_query;\n\t\t\n\t\t# Set cURL opts and execute request\n\t\t$ch = curl_init();\n\t\tif ( $ch === false )\n\t\t{\n\t\t\tthrow new PusherException('Could not initialise cURL!');\n\t\t}\n\t\t\n\t\tcurl_setopt( $ch, CURLOPT_URL, $full_url );\n\t\tcurl_setopt( $ch, CURLOPT_HTTPHEADER, array ( \"Content-Type: application/json\" ) );\n\t\tcurl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );\n\t\tcurl_setopt( $ch, CURLOPT_TIMEOUT, $this->settings['timeout'] );\n\t\t\n\t\treturn $ch;\n\t}", "public function test_json_api_upload()\n {\n\n $requestJson = <<<JSON\n {\n\t\"user\" : \"[email protected]\",\n\t\"data\" : [\n\t\t{\n\t \"event_name\" : \"Test Event1\",\n\t\t\t\"event_desc\" : \"Test Event1 Description\",\n\t\t\t\"start_date\" : \"2016-02-15 20:00:00\",\n\t\t\t\"price\" : \"20\",\n\t\t\t\"discount\" : \"2\",\n\t\t\t\"quantity\" : \"100\",\n\t\t\t\"promocode\" : \"test1promo\"\n\t\t},\n\t\t{\n\t\t \"event_name\" : \"Test Event2\",\n\t\t\t\"event_desc\" : \"Test Event2 Description\",\n\t\t\t\"start_date\" : \"2016-02-15 20:00:00\",\n\t\t\t\"price\" : \"20\",\n\t\t\t\"discount\" : \"2\",\n\t\t\t\"quantity\" : \"200\",\n\t\t\t\"promocode\" : \"test2promo\"\n\t\t}\n\t]\n\n}\nJSON;\n\n\n $curl = curl_init();\n\n curl_setopt_array($curl, array(\n CURLOPT_URL => url('/admin/api/events/create'),\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"POST\",\n CURLOPT_POSTFIELDS => $requestJson,\n CURLOPT_HTTPHEADER => array(\n \"cache-control: no-cache\",\n \"content-type: application/json\",\n \"x-authorization: c786e9e743c8ff591e5cd5de9455ebcf92ccbc55\"\n ),\n ));\n\n $response = curl_exec($curl);\n $err = curl_error($curl);\n\n curl_close($curl);\n\n $this->assertJsonStringEqualsJsonString($response, '{\"status\":\"success\"}');\n }", "function http($url, $method, $postfields = NULL, $headers = array()) {\r\n $this->http_info = array();\r\n $ci = curl_init();\r\n /* Curl settings */\r\n curl_setopt($ci, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);\r\n curl_setopt($ci, CURLOPT_USERAGENT, $this->useragent);\r\n curl_setopt($ci, CURLOPT_CONNECTTIMEOUT, $this->connecttimeout);\r\n curl_setopt($ci, CURLOPT_TIMEOUT, $this->timeout);\r\n curl_setopt($ci, CURLOPT_RETURNTRANSFER, TRUE);\r\n curl_setopt($ci, CURLOPT_ENCODING, \"\");\r\n curl_setopt($ci, CURLOPT_SSL_VERIFYPEER, $this->ssl_verifypeer);\r\n if (version_compare(phpversion(), '5.4.0', '<')) {\r\n curl_setopt($ci, CURLOPT_SSL_VERIFYHOST, 1);\r\n } else {\r\n curl_setopt($ci, CURLOPT_SSL_VERIFYHOST, 2);\r\n }\r\n curl_setopt($ci, CURLOPT_HEADERFUNCTION, array($this, 'getHeader'));\r\n curl_setopt($ci, CURLOPT_HEADER, FALSE);\r\n\r\n switch ($method) {\r\n case 'POST':\r\n curl_setopt($ci, CURLOPT_POST, TRUE);\r\n if (!empty($postfields)) {\r\n curl_setopt($ci, CURLOPT_POSTFIELDS, $postfields);\r\n $this->postdata = $postfields;\r\n }\r\n break;\r\n case 'DELETE':\r\n curl_setopt($ci, CURLOPT_CUSTOMREQUEST, 'DELETE');\r\n if (!empty($postfields)) {\r\n $url = \"{$url}?{$postfields}\";\r\n }\r\n }\r\n\r\n if ( isset($this->access_token) && $this->access_token )\r\n $headers[] = \"Authorization: OAuth2 \".$this->access_token;\r\n\r\n if ( !empty($this->remote_ip) ) {\r\n if ( defined('SAE_ACCESSKEY') ) {\r\n $headers[] = \"SaeRemoteIP: \" . $this->remote_ip;\r\n } else {\r\n $headers[] = \"API-RemoteIP: \" . $this->remote_ip;\r\n }\r\n } else {\r\n if ( !defined('SAE_ACCESSKEY') ) {\r\n $headers[] = \"API-RemoteIP: \" . $_SERVER['REMOTE_ADDR'];\r\n }\r\n }\r\n curl_setopt($ci, CURLOPT_URL, $url );\r\n curl_setopt($ci, CURLOPT_HTTPHEADER, $headers );\r\n curl_setopt($ci, CURLINFO_HEADER_OUT, TRUE );\r\n\r\n $response = curl_exec($ci);\r\n $this->http_code = curl_getinfo($ci, CURLINFO_HTTP_CODE);\r\n $this->http_info = array_merge($this->http_info, curl_getinfo($ci));\r\n $this->url = $url;\r\n\r\n if ($this->debug) {\r\n echo \"=====post data======\\r\\n\";\r\n var_dump($postfields);\r\n\r\n echo \"=====headers======\\r\\n\";\r\n print_r($headers);\r\n\r\n echo '=====request info====='.\"\\r\\n\";\r\n print_r( curl_getinfo($ci) );\r\n\r\n echo '=====response====='.\"\\r\\n\";\r\n print_r( $response );\r\n }\r\n curl_close ($ci);\r\n return $response;\r\n }", "function elastic_post($url, $data) {\n global $elasticAuth;\n\n $response = null;\n\n $ch = curl_init($url);\n $opts = [\n CURLOPT_RETURNTRANSFER => 1,\n CURLOPT_POSTFIELDS => $data,\n CURLOPT_POST => 1,\n CURLOPT_HTTPHEADER => [\n \"Authorization: Basic $elasticAuth\",\n 'Content-Type: application/x-ndjson'\n ]\n ];\n curl_setopt_array($ch, $opts);\n\n $exec = curl_exec($ch);\n\n if ($exec !== false) {\n $response = [\n 'body' => $exec,\n 'info' => curl_getinfo($ch)\n ];\n }\n\n curl_close($ch);\n\n return $response;\n\n}", "private function _JsonData() \n {\n $raw = file_get_contents('php://input', true);\n $body = json_decode($raw);\n \n $this->__new((array) $body);\n }", "function Qassim_HTTP($method, $url, $header, $data){\r\n\r\n if( $method == 1 ){\r\n $method_type = 1; // 1 = POST\r\n }else{\r\n $method_type = 0; // 0 = GET\r\n }\r\n\r\n $curl = curl_init();\r\n curl_setopt($curl, CURLOPT_URL, $url);\r\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\r\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);\r\n curl_setopt($curl, CURLOPT_HEADER, 0);\r\n\r\n if( $header !== 0 ){\r\n curl_setopt($curl, CURLOPT_HTTPHEADER, $header);\r\n }\r\n\r\n curl_setopt($curl, CURLOPT_POST, $method_type);\r\n\r\n if( $data !== 0 ){\r\n curl_setopt($curl, CURLOPT_POSTFIELDS, $data);\r\n }\r\n\r\n $response = curl_exec($curl);\r\n $json = json_decode($response, true);\r\n curl_close($curl);\r\n\r\n return $json;\r\n}", "function h_POST(string $url, $data = []) {\n // if URL doesn't start with \"http\", prepend API_URL\n if (!preg_match('/^http/', $url, $matches)) {\n $url = API_URL . $url;\n }\n\n $payload = json_encode($data);\n\n // Prepare new cURL resource\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLINFO_HEADER_OUT, true);\n curl_setopt($ch, CURLOPT_POST, true);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);\n \n // Set HTTP Header for POST request \n curl_setopt(\n $ch,\n CURLOPT_HTTPHEADER,\n [\n 'Content-Type: application/json',\n 'Content-Length: ' . strlen($payload)\n ]\n );\n \n // Submit the POST request\n $response = curl_exec($ch);\n curl_close($ch);\n\n return $response;\n}", "public function create($attributes = array())\n {\n $additionHeader['Content-Type'] = 'application/json';\n\n parent::setAdditionHeader($additionHeader) ;\n\n return parent::create($attributes);\n }", "function callAPI($method, $url, $data){\n $curl = curl_init();\n\n switch ($method){\n case \"POST\":\n curl_setopt($curl, CURLOPT_POST, 1);\n if ($data)\n curl_setopt($curl, CURLOPT_POSTFIELDS, $data);\n break;\n case \"PUT\":\n curl_setopt($curl, CURLOPT_CUSTOMREQUEST, \"PUT\");\n if ($data)\n curl_setopt($curl, CURLOPT_POSTFIELDS, $data);\n break;\n default:\n if ($data)\n $url = sprintf(\"%s?%s\", $url, http_build_query($data));\n }\n\n // OPTIONS:\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($curl, CURLOPT_HTTPHEADER, array(\n 'Content-Type: application/json'\n ));\n\n // EXECUTE:\n $result = curl_exec($curl);\n if(!$result){die(\"Connection Failure\");}\n curl_close($curl);\n return $result;\n}", "public function withJson($data)\n {\n $new = $this->withContentType('application/json');\n return $new->withContent(json_encode($data));\n }", "function zbase_remote_post_json($url, $data, $options = [])\n{\n\t$dataString = '';\n\tforeach ($data as $key => $value)\n\t{\n\t\t$dataString .= $key . '=' . $value . '&';\n\t}\n\trtrim($dataString, '&');\n\t$ch = curl_init($url);\n\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\n\tcurl_setopt($ch, CURLOPT_POST, count($data));\n\tcurl_setopt($ch, CURLOPT_COOKIEJAR, zbase_storage_path() . 'cookie.txt');\n\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $dataString);\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array(\n\t\t'Content-Type: application/json',\n\t\t'Content-Length: ' . strlen($dataString))\n\t);\n\t$result = curl_exec($ch);\n\tcurl_close($ch);\n\treturn $result;\n}", "function _curlRequest( $url, $method, $data = null, $sendAsJSON = true, $auth = true ) {\n\t$curl = curl_init();\n\tif ( $method == 'GET' && $data !== null ) {\n\t\t$url .= '?' . http_build_query( $data );\n\t}\n\tcurl_setopt( $curl, CURLOPT_URL, $url );\n\tif ( $auth ) {\n\t\tcurl_setopt( $curl, CURLOPT_USERPWD, P_SECRET );\n\t}\n\tcurl_setopt( $curl, CURLOPT_CUSTOMREQUEST, $method );\n\tif ( $method == 'POST' && $data !== null ) {\n\t\tif ( $sendAsJSON ) {\n\t\t\t$data = json_encode( $data );\n\t\t\tcurl_setopt( $curl, CURLOPT_HTTPHEADER, array( 'Content-Type: application/json', 'Content-Length: ' . strlen( $data ) ) );\n\t\t}\n\t\tcurl_setopt( $curl, CURLOPT_POSTFIELDS, $data );\n\t}\n\tcurl_setopt( $curl, CURLOPT_RETURNTRANSFER, true );\n\tcurl_setopt( $curl, CURLOPT_HEADER, false );\n\tcurl_setopt( $curl, CURLOPT_SSL_VERIFYPEER, false );\n\tcurl_setopt( $curl, CURLOPT_SSL_VERIFYHOST, false );\n\t$response = curl_exec( $curl );\n\tif ( $response === false ) {\n\t\techo curl_error( $curl );\n\t\tcurl_close( $curl );\n\n\t\treturn false;\n\t}\n\t$httpCode = curl_getinfo( $curl, CURLINFO_HTTP_CODE );\n\tif ( $httpCode >= 400 ) {\n\t\techo curl_error( $curl );\n\t\tcurl_close( $curl );\n\n\t\treturn false;\n\t}\n\tcurl_close( $curl );\n\n\treturn json_decode( $response, true );\n}", "private function build_curl_handle($url) {\n if (!function_exists('curl_init')) {\n die('the curl library is required for this client to work');\n }\n $ch = curl_init();\n if (!$ch) {\n die('could not initialize curl');\n }\n curl_setopt($ch, CURLOPT_URL, $url);\n // Method and headers can be different, but these are always the same.\n curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n curl_setopt($ch, CURLOPT_USERPWD, $this->auth_string);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n return $ch;\n }", "function rest_put_data($url, $data)\n{\n if (is_array($data)) {\n $data = json_encode($data);\n }\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $result = curl_exec($ch);\n curl_close($ch);\n return $result;\n}", "public function body($obj){\n $data = json_encode($obj);\n\n $errno = json_last_error();\n if($errno != JSON_ERROR_NONE){\n throw new Exception(\"Error encountered encoding JSON: \" . json_last_error_message());\n }\n\n curl_setopt($this->curl, CURLOPT_POSTFIELDS, $data);\n $this->headers[] = \"Content-Type: application/json\";\n return $this;\n }", "function callService($endpoint, $request)\n{\n $request_string = json_encode($request);\n\n $service = curl_init('http://studio.mdl.io/REST/'.$endpoint);\n curl_setopt($service, CURLOPT_CUSTOMREQUEST, \"POST\");\n curl_setopt($service, CURLOPT_POSTFIELDS, $request_string);\n curl_setopt($service, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($service, CURLOPT_HTTPHEADER, array(\n 'Content-Type: application/json',\n 'Content-Length: ' . strlen($request_string))\n );\n $response_string = curl_exec($service);\n\n $response = json_decode($response_string);\n return($response);\n}", "function airtableCallByCurl($url, $headers) {\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_HTTPGET, 1);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_TIMEOUT, 10);\n curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n curl_setopt($ch, CURLOPT_URL, $url);\n $entries = curl_exec($ch);\n curl_close($ch);\n $airtableResponse = json_decode($entries, TRUE);\n\n return $airtableResponse;\n}", "function display_cars()\n{\n //displays posted cars\n $url = set_url('advert');\n $url .= '?limit=10&page=1';\n $token = $_SESSION['token'];\n $cURLConnection = curl_init($url);\n curl_setopt($cURLConnection, CURLOPT_HTTPHEADER, ['Content-Type: application/json', 'Authorization: Bearer ' . $token,]);\n curl_setopt($cURLConnection, CURLOPT_RETURNTRANSFER, true);\n $apiResponse = json_decode(curl_exec($cURLConnection));\n curl_close($cURLConnection);\n print_r($apiResponse);\n exit;\n}", "function tincanlaunch_send_api_request($auth, $method, $url) {\n $options = func_num_args() === 4 ? func_get_arg(3) : array();\n\n if (!isset($options['contentType'])) {\n $options['contentType'] = 'application/json';\n }\n\n $http = array(\n // We don't expect redirects.\n 'max_redirects' => 0,\n // This is here for some proxy handling.\n 'request_fulluri' => 1,\n // Switching this to false causes non-2xx/3xx status codes to throw exceptions.\n // but we need to handle the \"error\" status codes ourselves in some cases.\n 'ignore_errors' => true,\n 'method' => $method,\n 'header' => array()\n );\n\n array_push($http['header'], 'Authorization: ' . $auth);\n\n if (($method === 'PUT' || $method === 'POST') && isset($options['content'])) {\n $http['content'] = $options['content'];\n array_push($http['header'], 'Content-length: ' . strlen($options['content']));\n array_push($http['header'], 'Content-Type: ' . $options['contentType']);\n }\n\n $context = stream_context_create(array('http' => $http));\n $fp = fopen($url, 'rb', false, $context);\n if (!$fp) {\n return array(\n \"metadata\" => null,\n \"content\" => null,\n \"status\" => 0\n );\n }\n $metadata = stream_get_meta_data($fp);\n $content = stream_get_contents($fp);\n $responsecode = (int) explode(' ', $metadata[\"wrapper_data\"][0])[1];\n\n fclose($fp);\n\n if ($options['contentType'] == 'application/json') {\n $content = json_decode($content);\n }\n\n return array(\n \"metadata\" => $metadata,\n \"content\" => $content,\n \"status\" => $responsecode\n );\n}", "function __construct() {\n\n $this->curl = curl_init();\n\n curl_setopt_array($this->curl, [\n CURLOPT_USERAGENT => 'FeedImport',\n CURLOPT_TIMEOUT => 120,\n CURLOPT_CONNECTTIMEOUT => 30,\n CURLOPT_RETURNTRANSFER => TRUE,\n CURLOPT_ENCODING => 'UTF-8'\n ]);\n\n }", "function prepare($method, $path) {\r\n\t\tcurl_setopt ( $this->handler, CURLOPT_HTTPHEADER, $this->request_headers );\r\n\t\tcurl_setopt ( $this->handler, CURLOPT_URL, $this->base_url . $path );\r\n\t\tcurl_setopt ( $this->handler, CURLOPT_CUSTOMREQUEST, $method );\r\n\t\t\r\n\t\tif ($method == 'POST' || $method == 'PUT') {\r\n\t\t\tif ($this->content_type == 'application/json') {\r\n\t\t\t\t$jsonServer = new JSON ( JSON_LOOSE_TYPE );\r\n\t\t\t\t$this->request_body_raw = json_encode( $this->request_body );\r\n\t\t\t} else {\r\n\t\t\t\t$this->request_body_raw = $this->request_body;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcurl_setopt ( $this->handler, CURLOPT_POSTFIELDS, $this->request_body_raw );\r\n\t\t}\r\n\r\n\t}", "function do_curl($url, $data_arr=NULL, $tierionHeaderArray=[])\n{\n\t$ch = curl_init($url);\n\n\t$headers = $tierionHeaderArray;\n\t// curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C)');\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n\n\tif ($data_arr != NULL) {\n\t\t$headers = array_merge(array('Content-Type: application/json'), $headers);\n\t\t$data_string = json_encode($data_arr);\n\t\tcurl_setopt($ch, CURLOPT_POST, 1);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);\n\t}\n\tcurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n\n\tob_start(); // prevent any output\n\treturn curl_exec($ch); // Execute the Curl Command\n\tob_end_clean(); // stop preventing output\n\tcurl_close($ch);\n}", "public function setHeader($header) {\n $this->gz = (is_array($header) && in_array(\"Accept-Encoding: gzip\",$header));\n\n return curl_setopt($this->ch,CURLOPT_HTTPHEADER,$header);\n }", "public function __construct(\n $data = [],\n $status = 200,\n array $headers = [],\n $encodingOptions = self::DEFAULT_JSON_FLAGS\n ) {\n $body = new Stream('php://temp', 'wb+');\n parent::__construct($body, $status, $headers);\n\n if (!empty($data)) {\n $this->setPayload($data, $encodingOptions);\n }\n\n // Ensure that application/json header is set, if Content-Type was not set before\n if (!$this->hasHeader('Content-Type')) {\n $this->headers['Content-Type'][] = 'application/json; charset=utf-8';\n $this->lowercasedHeaderNames['content-type'] = 'Content-Type';\n }\n }", "protected function json(){\n $this->before(function ($request) {\n if ($request->contentType == \"application/json; charset=utf-8\") {\n $request->data = json_decode($request->data);\n }\n });\n $this->after(function ($response) {\n $response->contentType = \"application/json; charset=utf-8\";\n if (isset($_GET['jsonp'])) {\n $response->body = $_GET['jsonp'].'('.json_encode($response->body, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES).');';\n } else {\n $response->body = json_encode($response->body, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);\n }\n });\n }", "protected function json(){\n $this->before(function ($request) {\n if ($request->contentType == \"application/json; charset=utf-8\") {\n $request->data = json_decode($request->data);\n }\n });\n $this->after(function ($response) {\n $response->contentType = \"application/json; charset=utf-8\";\n if (isset($_GET['jsonp'])) {\n $response->body = $_GET['jsonp'].'('.json_encode($response->body, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES).');';\n } else {\n $response->body = json_encode($response->body, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);\n }\n });\n }", "protected function json(){\n $this->before(function ($request) {\n if ($request->contentType == \"application/json; charset=utf-8\") {\n $request->data = json_decode($request->data);\n }\n });\n $this->after(function ($response) {\n $response->contentType = \"application/json; charset=utf-8\";\n if (isset($_GET['jsonp'])) {\n $response->body = $_GET['jsonp'].'('.json_encode($response->body, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES).');';\n } else {\n $response->body = json_encode($response->body, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);\n }\n });\n }", "function curl($url) {\n\n $ch = curl_init(); // Initialising cURL\n curl_setopt($ch, CURLOPT_URL, $url); // Setting cURL's URL option with the $url variable passed into the function\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); // Setting cURL's option to return the webpage data\n curl_setopt($ch, CURLOPT_HTTPHEADER, array(\n\t \t'Accept: application/json',\n\t \t'X-ELS-APIKey: 82b47f24bf707a447d642d170ae6e318'\n\t ));\n $data = curl_exec($ch); // Executing the cURL request and assigning the returned data to the $data variable\n curl_close($ch); // Closing cURL\n return $data; // Returning the data from the function\n }", "public function json(array $data = [], int $status = 200, array $headers = []): ResponseInterface;", "public function __construct( JSONRequest $req )\n {\n $this->setWrapperName( 'JSONResponse' );\n parent::__construct();\n $this->req = $req;\n //$this->set('serverLocalTime',time(),false);\n $this->setID( JSONMessage::generateID() );\n if( $req )\n {\n $this->setType( $req->getType() );\n $this->set('responseTo', $req->getID() );\n $this->setResult(0);\n }\n else\n {\n $this->setType( 'unknown' );\n $this->set('responseTo', null );\n }\n if(false && !$this->getCredentials() && @$_SESSION )\n {\n $ar = $_SESSION[\"credentials\"];\n if( $ar ) $this->setCredentials($ar);\n }\n //??? $this->setCredentials( $req->getCredentials() );\n }", "public function request(string $url): self\n {\n $url = 'http://' . $this->host . ':' . $this->port . '/' . $url;\n\n $data = $this->getData();\n\n $options = array(\n 'http' => array(\n 'method' => $this->method,\n 'user_agent' => $this->userAgent,\n 'follow_location' => 1,\n 'protocol_version' => 1.1,\n 'timeout' => $this->timeout,\n 'header' => '',\n )\n );\n\n $this->addHeader(\"X-HTTP-Method-Override: \" . strtoupper($this->method));\n $this->addHeader(\"Content-Type: application/json\");\n $this->addHeader(\"Accept: application/json\");\n switch (strtoupper($this->method)) {\n case 'GET':\n break;\n case 'POST';\n if ($data) {\n $this->addHeader(\"Content-Length: \" . strlen($data));\n $options['http']['content'] = $data;\n }\n break;\n case \"COPY\":\n break;\n case \"DELETE\":\n if ($data) {\n $this->addHeader(\"Content-Length: \" . strlen($data));\n $options['http']['content'] = $data;\n }\n break;\n case \"PUT\":\n if ($data) {\n $this->addHeader(\"Content-Length: \" . strlen($data));\n $options['http']['content'] = $data;\n }\n break;\n case \"HEAD\":\n break;\n }\n if (!empty($this->username) && !empty($this->password)) {\n $this->addHeader(\"Authorization: Basic \" . base64_encode($this->username . \":\" . $this->password));\n }\n foreach ($this->getHeaders() as $header) {\n $options['http']['header'] .= $header . \"\\r\\n\";\n }\n\n $context = stream_context_create($options);\n $response = @file_get_contents($url, false, $context);\n\n foreach ($http_response_header as $line) {\n $this->getHeader(NULL, $line);\n }\n\n if ($response == false) {\n $this->error = array('code' => http_response_code(), 'text' => '');\n } else {\n $this->response = $response;\n }\n\n $this->url = $url;\n\n return $this;\n }", "public function initialize()\n {\n curl_setopt($this->ch, CURLOPT_AUTOREFERER, TRUE);\n curl_setopt($this->ch, CURLOPT_FOLLOWLOCATION, TRUE);\n curl_setopt($this->ch, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($this->ch, CURLOPT_MAXREDIRS, 5);\n curl_setopt($this->ch, CURLOPT_USERAGENT, self::$USER_AGENT); \n // curl_setopt($this->ch, CURLOPT_COOKIEFILE, '/tmp/curl_client');\n // curl_setopt($this->ch, CURLOPT_COOKIEJAR, '/tmp/curl_client');\n // curl_setopt($this->ch, CURLOPT_HEADER, TRUE);\n return $this;\n }", "public function __construct()\n {\n parent::__construct();\n $this->response->type('application/json; charset=UTF-8');\n }", "private function sendQueryByCurl() {\n $this->curl = curl_init();\n\n // JSON data request\n $jsonData = $this->getJsonData();\n\n // some params\n $urlParams = $this->getParamsUrlFormat();\n\n $this->setCurlOpts($this->curl, $jsonData, $urlParams);\n $this->setResult(curl_exec($this->curl));\n $this->setHttpCode(curl_getinfo($this->curl, CURLINFO_HTTP_CODE));\n\n curl_close($this->curl);\n }", "private function init() {\n $this->_cm = curl_init();\n curl_setopt($this->_cm, CURLOPT_PROXY, $config['curl']['proxy']);\n curl_setopt($this->_cm, CURLOPT_HTTPAUTH, CURLAUTH_BASIC | CURLAUTH_DIGEST);\n curl_setopt($this->_cm, CURLOPT_SSL_VERIFYPEER, FALSE);\n curl_setopt($this->_cm, CURLOPT_SSL_VERIFYHOST, FALSE);\n curl_setopt($this->_cm, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($this->_cm, CURLOPT_TIMEOUT, $config['curl']['timeout']);\n curl_setopt($this->_cm, CURLOPT_POST, true); \n }", "function __request($verb, $uri, $query=Array(), $headers=Array(), $data=FALSE, $file=FALSE, $return_type=AS3R_CODE) {\n\t\t\t/* add x-amz-date header */\n\t\t\t$headers['x-amz-date'] = gmdate('D, d M Y H:i:s').' GMT';\n\n\t\t\t/* build signature */\n\t\t\t$headers['Authorization'] = $this->__sign_header($verb, $uri, $query, $headers);\n\n\t\t\t/* build query string */\n\t\t\t$elements = Array();\n\t\t\tforeach($query AS $s3object=>$val) {\n\t\t\t\tif (is_numeric($s3object)) $elements[] = urlencode($val);\n\t\t\t\telse if ($val === TRUE) $elements[] = urlencode($s3object);\n\t\t\t\telse $elements[] = urlencode($s3object).'='.urlencode($val);\n\t\t\t}\n\t\t\t$qstr = implode('&', $elements);\n\n\t\t\t/* add query to uri */\n\t\t\tif ($qstr) $uri .= ((strpos($uri, '?')!== FALSE)?'&':'?').$qstr;\n\n\t\t\t/* build the curl setup depending on the verb */\n\t\t\t$req = curl_init();\n\t\t\tcurl_setopt($req, CURLOPT_USERAGENT, 'AmazonS3PHPClass');\n\t\t\tcurl_setopt($req, CURLOPT_SSL_VERIFYHOST, 0);\n\t\t\tcurl_setopt($req, CURLOPT_SSL_VERIFYPEER, 0);\n\t\t\tcurl_setopt($req, CURLOPT_URL, ($this->__awshttps?'https://':'http://').$this->__awshost.$uri);\n\n\t\t\t$h = Array();\n\t\t\tforeach($headers AS $s3object=>$val) $h[]= $s3object.': '.$val;\n\t\t\tcurl_setopt($req, CURLOPT_HTTPHEADER, $h);\n\n\t\t\t/* setup the curl object depending on the verb */\n\t\t\tswitch($verb) {\n\t\t\t\tcase 'PUT':\n\t\t\t\t\tif ($data) {\n\t\t\t\t\t\tcurl_setopt($req, CURLOPT_CUSTOMREQUEST, 'PUT');\n\t\t\t\t\t\tcurl_setopt($req, CURLOPT_POSTFIELDS, $data);\n\t\t\t\t\t} else if ($file) {\n\t\t\t\t\t\tcurl_setopt($req, CURLOPT_PUT, TRUE);\n\t\t\t\t\t\tcurl_setopt($req, CURLOPT_INFILE, $file);\n\t\t\t\t\t\tcurl_setopt($req, CURLOPT_INFILESIZE, filesize($file));\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'GET':\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'DELETE':\n\t\t\t\t\tcurl_setopt($req, CURLOPT_CUSTOMREQUEST, 'DELETE');\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t/* execute via another function we can overrride */\n\t\t\tlist($code, $body, $header) = $this->__curl_exec($req);\n\t\t\tcurl_close($req);\n\n\t\t\tswitch($return_type) {\n\t\t\t\tcase AS3R_BODY:\n\t\t\t\t\treturn $body;\n\t\t\t\t\tbreak;\n\t\t\t\tcase AS3R_HEADER:\n\t\t\t\t\treturn $header;\n\t\t\t\t\tbreak;\n\t\t\t\tcase AS3R_COMBO:\n\t\t\t\t\treturn Array($code, $body, $header);\n\t\t\t\t\tbreak;\n\t\t\t\tcase AS3R_CODE:\n\t\t\t\tdefault:\n\t\t\t\t\treturn $code;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "public static function createFromJson($json);", "public static function initHttp($url = null)\n {\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n return $ch;\n }", "function __construct(array $data) {\n global $slim;\n $slim->response->headers->set('Content-Type', 'application/json');\n parent::__construct($data);\n }", "public function __construct($request) {\n header(\"Access-Control-Allow-Orgin: *\");\n header(\"Access-Control-Allow-Methods: *\");\n header(\"Content-Type: application/json\");\n\n $this->args = explode('/', rtrim($request, '/'));\n $this->endpoint = array_shift($this->args);\n\n\t/*\n if (array_key_exists(0, $this->args) && !is_numeric($this->args[0])) {\n $this->verb = array_shift($this->args);\n }\n\t*/\n\n $this->method = $_SERVER['REQUEST_METHOD'];\n if ($this->method == 'POST' && array_key_exists('HTTP_X_HTTP_METHOD', $_SERVER)) {\n if ($_SERVER['HTTP_X_HTTP_METHOD'] == 'DELETE') {\n $this->method = 'DELETE';\n } else if ($_SERVER['HTTP_X_HTTP_METHOD'] == 'PUT') {\n $this->method = 'PUT';\n } else {\n throw new Exception(\"Unexpected Header\");\n }\n }\n\n switch($this->method) {\n case 'DELETE':\n case 'POST':\n $this->request = $this->_cleanInputs($_POST);\n break;\n case 'GET':\n $this->request = $this->_cleanInputs($_GET);\n break;\n case 'PUT':\n $this->request = $this->_cleanInputs($_GET);\n $this->file = file_get_contents(\"php://input\");\n break;\n default:\n $this->_response('Invalid Method', 405);\n break;\n }\n }", "public function __construct($json) {\n if (is_null($json)) {\n $json = new \\stdClass();\n }\n\n $this->json = $json;\n }", "private function _createJson()\n {\n return new SlimBootstrap\\ResponseOutputWriter\\Json(\n $this->_request,\n $this->_response,\n $this->_headers,\n $this->_shortName\n );\n }", "private function __setHeaders($ch)\n {\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array(\n 'User-Agent: ' . $this->api->getUserAgentHeader(),\n ));\n }", "public function __construct()\n {\n $this->ch = curl_init();\n $this->initialize();\n }", "public function __construct($url, HalSerializable $resource, $responseCode = 200, array $headers = [])\n {\n $headers = $headers ?: ['content-type' => 'application/json'];\n parent::__construct($resource->halSerialize($url), $responseCode, $headers);\n }", "function makecurl($api,$data=array())\n{\n$options = array(\n);\n$ds1=array();\n$ds1['header']=\"Content-type: application/x-www-form-urlencoded\\r\\n\";\n$ds1['method']=\"POST\";\n$ds1['content']=http_build_query($data);\n$options['http']=$ds1;\n \n$context = stream_context_create($options);\n$result = file_get_contents($api, false, $context);\nif ($result === FALSE) { /* Handle error */ }\nreturn $result;\n}", "public function prepare(Request $request) :static\n {\n $this->setContent(json_encode($this->getResponse()));\n\n $this->setStatusCode($this->code);\n\n $this->headers->set('Content-Type', 'application/json');\n\n return parent::prepare($request);\n }", "function http($url, $method, $postfields = NULL, $headers = array()) {\r\n\t\t//print_r($postfields);exit;\r\n\t\t$this->http_info = array();\r\n\t\t$ci = curl_init();\r\n\t\t/* Curl settings */\r\n\t\t\r\n\t\tcurl_setopt($ci, CURLOPT_USERAGENT, 'PHP-SDK OAuth2.0');\r\n curl_setopt($ci, CURLOPT_CONNECTTIMEOUT, 3);\r\n curl_setopt($ci, CURLOPT_TIMEOUT, 3);\r\n curl_setopt($ci, CURLOPT_RETURNTRANSFER, true);\r\n curl_setopt($ci, CURLOPT_SSL_VERIFYPEER, false);\r\n curl_setopt($ci, CURLOPT_SSL_VERIFYHOST, false);\t\t\r\n\t\tcurl_setopt($ci, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);\r\n\t\tcurl_setopt($ci, CURLOPT_ENCODING, \"\");\r\n\t\tcurl_setopt($ci, CURLOPT_HEADERFUNCTION, array($this, 'getHeader'));\r\n\t\tcurl_setopt($ci, CURLOPT_HEADER, FALSE);\r\n\t\t\r\n\r\n\t\t\r\n\r\n\t\tswitch ($method) {\r\n\t\t\tcase 'POST':\r\n\t\t\t\tcurl_setopt($ci, CURLOPT_POST, TRUE);\r\n\t\t\t\tif (!empty($postfields)) {\r\n\t\t\t\t\tcurl_setopt($ci, CURLOPT_POSTFIELDS, $postfields);\r\n\t\t\t\t\t$this->postdata = $postfields;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'DELETE':\r\n\t\t\t\tcurl_setopt($ci, CURLOPT_CUSTOMREQUEST, 'DELETE');\r\n\t\t\t\tif (!empty($postfields)) {\r\n\t\t\t\t\t$url = \"{$url}?{$postfields}\";\r\n\t\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\t$headers[] = \"API-RemoteIP: \" . $_SERVER['REMOTE_ADDR'];\r\n\t\tcurl_setopt($ci, CURLOPT_URL, $url );\r\n\t\tcurl_setopt($ci, CURLOPT_HTTPHEADER, $headers );\r\n\t\tcurl_setopt($ci, CURLINFO_HEADER_OUT, TRUE );\r\n\r\n\t\t$response = curl_exec($ci);\r\n\t\t\r\n\t\t$this->http_code = curl_getinfo($ci, CURLINFO_HTTP_CODE);\r\n\t\t$this->http_info = array_merge($this->http_info, curl_getinfo($ci));\r\n\t\t$this->url = $url;\r\n\r\n\t\tif ($this->debug) {\r\n\t\t\techo \"=====post data======\\r\\n\";\r\n\t\t\tvar_dump($postfields);\r\n\r\n\t\t\techo '=====info====='.\"\\r\\n\";\r\n\t\t\tprint_r( curl_getinfo($ci) );\r\n\r\n\t\t\techo '=====$response====='.\"\\r\\n\";\r\n\t\t\tprint_r( $response );\r\n\t\t}\r\n\t\tcurl_close ($ci);\r\n\t\treturn $response;\r\n\t}", "public function __construct($business_id = null)\n {\n $this->curl = new Curl();\n $this->curl->setDefaultUserAgent();\n $this->curl->setHeader('X-Requested-With', 'XMLHttpRequest');\n $this->curl->setHeader('Accept', 'application/json');\n $this->curl->setHeader('Content-Type', 'application/json');\n $this->curl->setHeader('Content-Type', 'application/json');\n\n if ($business_id != null) {\n $this->business_id = $business_id;\n }\n }", "public function __construct($request) {\n\t\theader(\"Access-Control-Allow-Orgin: *\");\n\t\theader(\"Access-Control-Allow-Methods: *\");\n\t\theader(\"Content-Type: application/json\");\n\n\t\t$this->args = explode('/', rtrim($request, '/'));\n\t\t$this->endpoint = array_shift($this->args);\n\t\t\n\t\tif (array_key_exists(0, $this->args) && !is_numeric($this->args[0])) {\n\t\t\t$this->verb = array_shift($this->args);\n\t\t}\n\n\t\t$this->method = $_SERVER['REQUEST_METHOD'];\n\t\tif ($this->method == 'POST' && array_key_exists('HTTP_X_HTTP_METHOD', $_SERVER)) {\n\t\t\tif ($_SERVER['HTTP_X_HTTP_METHOD'] == 'DELETE') {\n\t\t\t\t$this->method = 'DELETE';\n\t\t\t} else if ($_SERVER['HTTP_X_HTTP_METHOD'] == 'PUT') {\n\t\t\t\t$this->method = 'PUT';\n\t\t\t} else {\n\t\t\t\tthrow new Exception(\"Unexpected Header\");\n\t\t\t}\n\t\t}\n\n\t\tswitch($this->method) {\n\t\tcase 'DELETE':\n\t\tcase 'POST':\n\t\t\t$this->request = $this->_cleanInputs($_POST);\n\t\t\tbreak;\n\t\tcase 'GET':\n\t\t\t$this->request = $this->_cleanInputs($_GET);\n\t\t\tbreak;\n\t\tcase 'PUT':\n\t\t\t$this->request = $this->_cleanInputs($_GET);\n\t\t\t$this->file = file_get_contents(\"php://input\");\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$this->_response('Invalid Method', 405);\n\t\t\tbreak;\n\t\t}\n\t}", "public function __construct() {\n $this->setContentType(ContentTypes::TYPE_JSON_WITH_CHARSET_UTF8);\n $this->addHeader('Access-Control-Allow-Origin', 'http://localhost:4200');\n }", "function socialtoaster_curl_to_json($url) {\n //check cURL\n if(required_functions()){\n return socialtoaster_parse_json(socialtoaster_curl($url));\n }\n }", "function apiBuildCurlRequest( $http_method, $url, $http_params='', $headers=array(), $response_format='' )\n {\n\n $curl = curl_init();\n\n curl_setopt($curl, CURLOPT_USERAGENT, 'Syndication-Client/php v1'); // Useragent string to use for request\n curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true );\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true );\n if ( $response_format=='image' )\n {\n curl_setopt($curl, CURLOPT_HEADER, false );\n curl_setopt($curl, CURLOPT_BINARYTRANSFER, true );\n }\n switch ( strtolower($http_method) )\n {\n case 'post':\n //curl_setopt( $curl, CURLOPT_POST, true );\n curl_setopt( $curl, CURLOPT_CUSTOMREQUEST, 'POST' );\n if ( !empty($http_params) )\n {\n curl_setopt( $curl, CURLOPT_POSTFIELDS, $http_params );\n }\n break;\n case 'put':\n curl_setopt( $curl, CURLOPT_CUSTOMREQUEST, 'PUT' );\n if ( !empty($http_params) )\n {\n curl_setopt( $curl, CURLOPT_POSTFIELDS, $http_params );\n }\n break;\n case 'delete':\n curl_setopt( $curl, CURLOPT_CUSTOMREQUEST, 'DELETE' );\n if ( !empty($http_params) )\n {\n curl_setopt( $curl, CURLOPT_POSTFIELDS, $http_params );\n }\n break;\n case 'get':\n default:\n curl_setopt( $curl, CURLOPT_HTTPGET, true );\n if ( !empty($http_params) )\n {\n $url .= (strpos($url,'?')===FALSE?'?':'&') . $http_params;\n }\n break;\n }\n\n curl_setopt( $curl, CURLOPT_HTTPHEADER, $headers);\n /** / // debug request output\n curl_setopt( $curl, CURLOPT_VERBOSE, 1 );\n curl_setopt( $curl, CURLOPT_STDERR, fopen('php://stdout', 'w') );\n /**/\n\n curl_setopt( $curl, CURLOPT_CONNECTTIMEOUT, 5 ); // seconds attempting to connect\n curl_setopt( $curl, CURLOPT_TIMEOUT, 10 ); // seconds cURL allowed to execute\n /** / // forces new connections\n curl_setopt( $curl, CURLOPT_FORBID_REUSE, true );\n curl_setopt( $curl, CURLOPT_FRESH_CONNECT, true );\n curl_setopt( $curl, CURLOPT_MAXCONNECTS, 1);\n /**/\n curl_setopt( $curl, CURLOPT_URL, $url );\n\n return $curl;\n }", "public function request($path, $method = \"GET\", $vars = array(), $headers = array( 'Accept' => 'application/json', 'Content-Type' => 'application/json' ) ) {\n\n $encoded = \"\";\n /*foreach($vars AS $key=>$value)\n $encoded .= \"$key=\".urlencode($value).\"&\";*/\n //$encoded = substr($encoded, 0, -1);\n $encoded = json_encode($vars);\n $tmpfile = \"\";\n $fp = null;\n \n // construct full url\n $url = \"{$this->Endpoint}/$path\";\n \n // if GET and vars, append them\n if($method == \"GET\") \n $url .= (FALSE === strpos($path, '?')?\"?\":\"&\").$encoded;\n\n // initialize a new curl object \n $curl = curl_init($url);\n \n $opts = array();\n foreach ($headers as $k => $v) $opts[CURLOPT_HTTPHEADER][] = \"$k: $v\";\n curl_setopt_array($curl, $opts);\n \n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\n \n curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);\n switch(strtoupper($method)) {\n case \"GET\":\n curl_setopt($curl, CURLOPT_HTTPGET, TRUE);\n break;\n case \"POST\":\n curl_setopt($curl, CURLOPT_POST, TRUE);\n curl_setopt($curl, CURLOPT_POSTFIELDS, $encoded);\n break;\n case \"PUT\":\n // curl_setopt($curl, CURLOPT_PUT, TRUE);\n curl_setopt($curl, CURLOPT_POSTFIELDS, $encoded);\n curl_setopt($curl, CURLOPT_CUSTOMREQUEST, \"PUT\");\n file_put_contents($tmpfile = tempnam(\"/tmp\", \"put_\"),\n $encoded);\n curl_setopt($curl, CURLOPT_INFILE, $fp = fopen($tmpfile,\n 'r'));\n curl_setopt($curl, CURLOPT_INFILESIZE, \n filesize($tmpfile));\n break;\n case \"DELETE\":\n curl_setopt($curl, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n break;\n default:\n throw(new PocketstopException(\"Unknown method $method\"));\n break;\n }\n \n // send credentials\n curl_setopt($curl, CURLOPT_USERPWD,\n $pwd = \"{$this->AccountId}:{$this->ApiKey}\");\n \n // do the request. If FALSE, then an exception occurred \n if(FALSE === ($result = curl_exec($curl)))\n throw(new PocketstopException(\n \"Curl failed with error \" . curl_error($curl)));\n \n // get result code\n $responseCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n \n // unlink tmpfiles\n if($fp)\n fclose($fp);\n if(strlen($tmpfile))\n unlink($tmpfile);\n \n return new PocketstopRestResponse($url, $result, $responseCode);\n }", "public function execute(Carerix_Api_Rest_Request $request)\n {\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $request->getUrl());\n // This constant is not available when open_basedir or safe_mode are enabled.\n// curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n // [AY] CURLOPT_VERBOSE, CURLOPT_HEADER required for capturing response headers\n curl_setopt($ch, CURLOPT_VERBOSE, 1);\n curl_setopt($ch, CURLOPT_HEADER, 1);\n curl_setopt($ch, CURLINFO_HEADER_OUT, 1); // [AY] required for capturing request headers\n curl_setopt($ch, CURLOPT_HTTPHEADER, ['Expect:']);\n curl_setopt($ch, CURLOPT_USERAGENT, __CLASS__);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n\n $proxy = $request->getProxy();\n if ($proxy) {\n $proxy = parse_url($proxy);\n curl_setopt($ch, CURLOPT_PROXY, $proxy['host']);\n if (array_key_exists('port', $proxy)) {\n curl_setopt($ch, CURLOPT_PROXYPORT, $proxy['port']);\n }\n }\n\n $username = $request->getUsername();\n $password = $request->getPassword();\n\n if ($username && $password) {\n curl_setopt($ch, CURLOPT_USERPWD, $username . ':' . $password);\n }\n\n switch ($request->getMethod()) {\n case self::POST:\n case self::PUT:\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $request->getMethod());\n switch ($request->getResponseType()) {\n case 'xml':\n $contentType = 'application/xml';\n break;\n\n case 'json':\n $contentType = 'application/json';\n break;\n\n case 'sencha':\n case 'js':\n $contentType = 'application/javascript';\n break;\n }\n curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: ' . $contentType]);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $request->getBody());\n break;\n case self::DELETE:\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');\n break;\n case self::GET:\n default:\n break;\n }\n\n $response = curl_exec($ch);\n\n $this->last_request = curl_getinfo($ch, CURLINFO_HEADER_OUT);\n $this->last_request .= $request->getBody();\n // [AY] in case of 204 No content response response is always empty\n if ($response === false) {\n $errorNumber = curl_errno($ch);\n $error = curl_error($ch);\n curl_close($ch);\n\n throw new Exception($errorNumber . ': ' . $error);\n }\n\n $response = $this->parseResponse($response);\n $this->last_response = $response;\n\n [$header, $body] = explode(\"\\r\\n\\r\\n\", $response, 2);\n\n $code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n if (!in_array($code, ['200', '201', '204'])) {\n throw new Carerix_Api_Rest_Exception($body, $code);\n }\n curl_close($ch);\n\n return $body;\n }", "function get_categories($id)\n{\n $url = set_url('categories');\n $url .= '/' . $id;\n $token = $_SESSION['token'];\n $cURLConnection = curl_init($url);\n curl_setopt($cURLConnection, CURLOPT_HTTPHEADER, ['Content-Type: application/json', 'Authorization: Bearer ' . $token,]);\n curl_setopt($cURLConnection, CURLOPT_RETURNTRANSFER, true);\n $apiResponse = curl_exec($cURLConnection);\n curl_close($cURLConnection);\n print_r($apiResponse);\n exit;\n}", "function doCurl($url) {\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $data = json_decode(curl_exec($ch), true);\n curl_close($ch);\n return $data;\n}", "public function jsonToObject(): ?ViaCepApi {\n if ($this->responseType == \"json\" && $this->response != \"[]\") {\n $this->responseType = \"object\";\n $this->response = (object) json_decode($this->response);\n }\n \n return $this; \n }", "public function __construct(){\r\n\t\t\t$this->request_vars = array();\r\n\t\t\t$this->data = '';\r\n\t\t\t$this->http_accept = (strpos($_SERVER['HTTP_ACCEPT'], 'json')) ? 'json' : 'xml';\r\n\t\t\t$this->method = 'GET';\r\n\t\t}", "private function configureCurl ()\n {\n curl_setopt_array($this->cURL, [\n CURLOPT_URL => $this->url,\n CURLOPT_RETURNTRANSFER => true\n ]);\n }", "public static function make($data = null, $status = 200, array $headers = []): JsonResponse\n {\n $instance = new static(null, $status, $headers);\n\n return $instance->setContent($data);\n }", "public static function forge(RequestInterface $request) {\n\n\t\t$headerSize = $request->getInfo(CURLINFO_HEADER_SIZE);\n\t\t$response = $request->getRawResponse();\n\t\t$content = (strlen($response) === $headerSize) ? '' : substr($response, $headerSize);\n\t\t$rawHeaders = rtrim(substr($response, 0, $headerSize));\n\t\t$headers = array();\n\n\t\tforeach (preg_split('/(\\\\r?\\\\n)/', $rawHeaders) as $header) {\n\t\t\tif ($header) {\n\t\t\t\t$headers[] = $header;\n\t\t\t} else {\n\t\t\t\t$headers = array();\n\t\t\t}\n\t\t}\n\n\t\t$headerBag = array();\n\t\t$info = $request->getInfo();\n\t\t$status = explode(' ', $headers[0]);\n\t\t$status = explode('/', $status[0]);\n\n\t\tunset($headers[0]);\n\n\t\tforeach ($headers as $header) {\n\n\t\t\tlist($key, $value) = explode(': ', $header);\n\t\t\t$headerBag[trim($key)] = trim($value);\n\t\t}\n\n\t\t$response = new static($content, $info['http_code'], $headerBag);\n\t\t$response->setProtocolVersion($status[1]);\n\t\t$response->setCharset(substr(strstr($response->headers->get('Content-Type'), '='), 1));\n\n\t\treturn $response;\n\t}", "function curl_headers(&$curl, $headers = []) {\n return $headers ? curl_option($curl, CURLOPT_HTTPHEADER, $headers) : $curl;\n}", "function airtableCallByCurlSave($url, $headers, $params) {\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_TIMEOUT, 10);\n curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($params));\n $entries = curl_exec($ch);\n curl_close($ch);\n $airtableResponse = json_decode($entries, TRUE);\n\n return $airtableResponse;\n}", "private function json() {\n if( $this->format === 'application/hal+json' ) {\n header('Content-Type: application/hal+json; charset=utf-8', TRUE, $this->status);\n $hal_response = (new Resource())\n ->setURI(\"/{$this->resource}\". (isset($this->filters['id']) ? $this->filters['id'] : ''))\n ->setLink($this->resource, new Link(\"/{$this->resource}\"))\n ->setData($this->content);\n\n $writer = new Hal\\JsonWriter(true);\n return $writer->execute($hal_response);\n } else {\n header('Content-Type: application/json; charset=utf-8', TRUE, $this->status);\n return json_encode($this->content, JSON_NUMERIC_CHECK);\n }\n }", "function getCurlJSON($url) {\n\treturn json_decode( getCurl($url) );\n}" ]
[ "0.6230993", "0.60206294", "0.60076064", "0.5906765", "0.5892303", "0.5887997", "0.5784917", "0.5750129", "0.5738976", "0.569356", "0.5627053", "0.5583021", "0.55770916", "0.55668825", "0.55457026", "0.5523307", "0.55180323", "0.54977", "0.5472187", "0.5450166", "0.544933", "0.5447407", "0.5445909", "0.5419761", "0.5380075", "0.53760463", "0.5348779", "0.53484637", "0.5342062", "0.53408504", "0.53358614", "0.53341734", "0.5313259", "0.5301441", "0.5296817", "0.5292703", "0.5288686", "0.52850896", "0.52830046", "0.52827543", "0.5276269", "0.52724236", "0.5210241", "0.5196134", "0.51960725", "0.51934654", "0.5159902", "0.5141082", "0.512886", "0.51211596", "0.51172763", "0.5113585", "0.5107447", "0.5103672", "0.5102928", "0.51003885", "0.5095169", "0.50909334", "0.5084837", "0.5084837", "0.5084837", "0.50848335", "0.5080222", "0.50769764", "0.5067951", "0.50392747", "0.50340354", "0.5019058", "0.5018897", "0.50176924", "0.5006263", "0.5001943", "0.50006235", "0.50005955", "0.49925044", "0.4988398", "0.4975849", "0.496574", "0.49587995", "0.4954765", "0.49525264", "0.49427357", "0.49422756", "0.49314198", "0.49302477", "0.491696", "0.49161643", "0.4914576", "0.49121422", "0.49100718", "0.49003515", "0.48999754", "0.48986703", "0.48942325", "0.48861334", "0.48848775", "0.48801652", "0.48788363", "0.48766765", "0.48730534" ]
0.53465617
28
Validates passcode and secret key
protected function validateCodes() { if (empty($this->passcode)) { throw new \Exception("Passcode has not been set."); } if (empty($this->merchant_code)) { throw new \Exception("merchant_code has not been set."); } if (empty($this->secret_key)) { throw new \Exception("secret_key has not been set."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function doPasskeyLoginValidate(){\n\t\t\n\t\tif(@$this->identification == \"\" | @$this->passkey == \"\"){\t\n\t\t\t$respArray = $this->makeResponse(\"ERROR\", \"Your Username and Password are required to complete this task.\", \"\");\t\t\n\t\t\techo $this->jsoncallback.\"(\".json_encode($respArray).\")\";\n\t\t\texit;\n\t\t}else{\n\t\t\t\n\t\t\t$this->basics->doPasskeyLogin(@$this->sanitize($this->identification) , @$this->obsfucate->makePass($this->sanitize($this->passkey)), $this->obsfucate->makeKey($this->sanitize($this->identification)) );\n\t\t\t\n\t\t}\n\t\t\n\t}", "function verify_secret_key($secret_key) // Colorize: green\n { // Colorize: green\n return isset($secret_key) // Colorize: green\n && // Colorize: green\n is_string($secret_key) // Colorize: green\n && // Colorize: green\n preg_match(SECRET_KEY_REGEXP, $secret_key); // Colorize: green\n }", "public function validateAuthKey($authKey){\n }", "public function validateAuthKey($authKey)\n {}", "public function validateAuthKey($authKey) {\n }", "public function is_valid_app_key_secret( $app_key = null, $app_secret = null ) {\n\n\t\t// Log that we are going to validate the app key and secret.\n\t\t$this->log_debug( __METHOD__ . '(): Beginning validation of app key and secret.' );\n\n\t\t// If app secret is an array, retrieve the app key and secret from plugin settings.\n\t\tif ( is_array( $app_secret ) ) {\n\n\t\t\t$app_key = $this->get_app_key();\n\t\t\t$app_secret = $this->get_app_secret();\n\n\t\t} else {\n\n\t\t\t// If app key is empty, get from setting.\n\t\t\tif ( rgblank( $app_key ) ) {\n\t\t\t\t$app_key = $this->get_app_key();\n\t\t\t}\n\n\t\t\t// If app secret is empty, get from setting.\n\t\t\tif ( rgblank( $app_secret ) ) {\n\t\t\t\t$app_secret = $this->get_app_secret();\n\t\t\t}\n\n\t\t}\n\n\t\t// If app key or secret are empty, return null.\n\t\tif ( rgblank( $app_key ) || rgblank( $app_secret ) ) {\n\t\t\t$this->log_debug( __METHOD__ . '(): App key or secret is missing. Ending validation.' );\n\t\t\treturn null;\n\t\t}\n\n\t\t// Get Dropbox authentication URL.\n\t\t$auth_url = $this->get_auth_url( $app_key, $app_secret );\n\n\t\t// Make a request to the web auth URL.\n\t\t$auth_request = wp_remote_get( $auth_url );\n\n\t\t// Return result based on response code.\n\t\tif ( ! is_wp_error( $auth_request ) && 200 === $auth_request['response']['code'] ) {\n\t\t\t$this->log_debug( __METHOD__ . '(): App key and secret are valid.' );\n\t\t\treturn true;\n\t\t} else {\n\t\t\t$this->log_error( __METHOD__ . '(): App key and/or secret are invalid.' );\n\t\t\treturn false;\n\t\t}\n\n\t}", "public function validateAuthKey($authKey)\n {\n }", "public function validateAuthKey($authKey)\n {\n }", "public function validateAuthKey($authKey)\n {\n }", "public function validateAuthKey($authKey)\n {\n }", "public function validateAuthKey($authKey)\n {\n }", "public function validateAuthKey($authKey)\n {\n }", "function doSecureAuthValidate(){\n\t\n\t\tif(\t@$this->loginKey == \"\" || @$this->identification == \"\"){\n\t\t\t\n\t\t\t$respArray = $this->makeResponse(\"ERROR\", \"You need to login to access this service \", \"localStorage.clear(); window.location='index.html'; \");\n\t\t\t\n\t\t\techo $this->jsoncallback.\"(\".json_encode($respArray).\")\";\n\t\t\texit;\n\t\t\t\n\t\t}else{\n\t\t\t\n\t\t\t$this->basics->doSecureAuth(@$this->loginKey, @$this->obsfucate->makeKey($this->sanitize( $this->identification )) );\n\t\t\t\t\t\n\t\t}\n\t\t\n\t}", "public function ajax_is_valid_app_key_secret() {\n\n\t\t// Set initial auth URL.\n\t\t$auth_url = null;\n\n\t\t// Get app key and secret from request.\n\t\t$app_key = sanitize_text_field( rgget( 'app_key' ) );\n\t\t$app_secret = sanitize_text_field( rgget( 'app_secret' ) );\n\n\t\t// Test app key and secret validity.\n\t\t$is_valid = $this->is_valid_app_key_secret( $app_key, $app_secret );\n\n\t\t// If app key and secret are valid, save and get authentication URL.\n\t\tif ( $is_valid ) {\n\n\t\t\t// Get plugin settings.\n\t\t\t$settings = $this->get_plugin_settings();\n\n\t\t\t// Set app key and secret.\n\t\t\t$settings['customAppKey'] = $app_key;\n\t\t\t$settings['customAppSecret'] = $app_secret;\n\n\t\t\t// Save plugin settings.\n\t\t\t$this->update_plugin_settings( $settings );\n\n\t\t\t// Get authentication URL.\n\t\t\t$auth_url = $this->get_auth_url( $app_key, $app_secret );\n\n\t\t}\n\n\t\techo json_encode( array( 'valid_app_key' => $is_valid, 'auth_url' => $auth_url ) );\n\t\tdie();\n\n\t}", "public function validateAuthKey($authKey): bool {\n }", "function validate_app_secret_key($link, $data, $app_id, $secret_key) // Colorize: green\n { // Colorize: green\n // Ignore PhpAlignmentVerifier [BEGIN] // Colorize: green\n $sql = \"SELECT\" // Colorize: green\n . \" secret_key\" // Colorize: green\n . \" FROM \" . DB_TABLE_APPS // Colorize: green\n . \" WHERE id = '\" . $link->real_escape_string($app_id) . \"'\"; // Colorize: green\n // Ignore PhpAlignmentVerifier [END] // Colorize: green\n // Colorize: green\n // Colorize: green\n // Colorize: green\n $result = $link->query($sql); // Colorize: green\n die_if_sql_failed($result, $link, $data, $sql); // Colorize: green\n // Colorize: green\n // Colorize: green\n // Colorize: green\n if ($result->num_rows == 1) // Colorize: green\n { // Colorize: green\n $app_secret_key = $result->fetch_row()[0]; // Colorize: green\n $result->close(); // Colorize: green\n // Colorize: green\n // Colorize: green\n // Colorize: green\n if ($secret_key != $app_secret_key) // Colorize: green\n { // Colorize: green\n $error_details = \"Access violation\"; // Colorize: green\n error_log($error_details); // Colorize: green\n // Colorize: green\n db_disconnect($link); // Colorize: green\n // Colorize: green\n $data[\"message\"] = \"Access error\"; // Colorize: green\n $data[\"details\"] = $error_details; // Colorize: green\n // Colorize: green\n die(json_encode($data)); // Colorize: green\n } // Colorize: green\n } // Colorize: green\n else // Colorize: green\n { // Colorize: green\n $result->close(); // Colorize: green\n // Colorize: green\n // Colorize: green\n // Colorize: green\n $error_details = \"Access violation\"; // Colorize: green\n error_log($error_details); // Colorize: green\n // Colorize: green\n db_disconnect($link); // Colorize: green\n // Colorize: green\n $data[\"message\"] = \"Access error\"; // Colorize: green\n $data[\"details\"] = $error_details; // Colorize: green\n // Colorize: green\n die(json_encode($data)); // Colorize: green\n } // Colorize: green\n }", "public static function validatePasskey( $key ) {\n\t\t$pk = self::getPasskey( $key );\n\n\t\tif ( ( $pk == 'false' ) || ( $pk === false ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t/*\n\t\tif ( empty( $pk->active ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( empty( $pk->type_def['valid'] ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( $pk->trials <= 0 ) {\n\t\t\treturn false;\n\t\t}\n\t\t*/\n\n\t\treturn true;\n\t}", "public function validateAuthKey($authKey): bool;", "public function disable_testValidateTryWithWrongSecret()\n {\n $this->callMigration(); \n \n $credentials = [ \n\n 'email' => '[email protected]',\n 'password' => 'failed'\n ];\n \n $this->assertFalse(\\Auth::validate($credentials)); \n }", "private function validateData() {\r\n\r\n $requiredFields = array(\"v_code\" => \"Verification code not supplied\",\r\n \"psw1\" => \"Password field is empty\",\r\n \"psw2\" => \"Password field is empty\",);\r\n\r\n\r\n //0 means there is no error\r\n $error_status = \\VAL_NO_ERROR;\r\n\r\n /*\r\n Initialize error object that will be returned by this function\r\n */\r\n $error_obj = new stdClass();\r\n $error_obj->msg = \"\";\r\n $error_obj->field = \"\";\r\n $error_obj->code = 0;\r\n $error_obj->type = \\VAL_NO_ERROR;\r\n\r\n //check if required variables are defined\r\n foreach ($requiredFields as $key => $value) {\r\n $value = $this->request->request->get($key);\r\n if (empty( $value )) {\r\n $error_obj->field = $key;\r\n $error_obj->msg = $requiredFields[$key];\r\n $error_obj->type = \\VAL_FIELD_ERROR;\r\n\r\n //return after each field that is found wrong\r\n return $error_obj;\r\n }\r\n }\r\n\r\n $pass_1 = $this->request->request->get('psw1');\r\n $pass_2 = $this->request->request->get('psw2');\r\n\r\n //Check if emails match\r\n if (strcmp($pass_1, $pass_2) != 0) {\r\n $error_obj->field = \"psw2\";\r\n $error_obj->msg = \"Passwords are different\";\r\n $error_obj->type = \\VAL_FIELD_ERROR;\r\n\r\n return $error_obj;\r\n }\r\n\r\n /*\r\n Only check one password. If both passwords are thesame, we only need to check one of them.\r\n */\r\n if (!preg_match('/^(?=.*\\d)(?=.*[a-z])(?=.*[A-Z]).{6,}$/', $pass_1)) {\r\n $error_obj->field = \"psw1\";\r\n $error_obj->msg = \"Password must have a digit, lower and upper case charters. Min lenght is 6\";\r\n $error_obj->type = \\VAL_FIELD_ERROR;\r\n\r\n return $error_obj;\r\n }\r\n\r\n return $error_obj;\r\n }", "private function check_key_valid() {\n $license = get_transient('wcis_license');\n\n // if key doesn't exist, abort\n if(!isset($license['key']) ) { return false; }\n\n // if valid, return success\n if(isset($license['valid']) && $license['valid'] === true) {\n $msg = __('API Connected!', 'wcis');\n $this->form_fields['key']['description'] = '<span style=\"color: #4caf50;\">' . $msg . '</span>';\n }\n else {\n $msg = __('Invalid API Key. Is there empty space before / after it?', 'wcis');\n $this->form_fields['key']['description'] = '<span style=\"color:#f44336;\">' . $msg . '</span>';\n }\n\n return $license['valid'];\n }", "protected function validCredentials(){\n $valid_credentials = !empty($this->consumerKey);\n $valid_credentials = ($valid_credentials && !empty($this->consumerSecret));\n $valid_credentials = ($valid_credentials && $this->consumerKey === variable_get('ebs_consumer_key', '')); \n $valid_credentials = ($valid_credentials && $this->consumerSecret === variable_get('ebs_consumer_secret', ''));\n \n return $valid_credentials;\n }", "function validate_this_server($link, $data, $secret_key) // Colorize: green\n { // Colorize: green\n if (get_secret_key($link, $data) != $secret_key) // Colorize: green\n { // Colorize: green\n $error_details = \"Access violation\"; // Colorize: green\n error_log($error_details); // Colorize: green\n // Colorize: green\n db_disconnect($link); // Colorize: green\n // Colorize: green\n $data[\"message\"] = \"Access error\"; // Colorize: green\n $data[\"details\"] = $error_details; // Colorize: green\n // Colorize: green\n die(json_encode($data)); // Colorize: green\n } // Colorize: green\n }", "function eve_api_enter_api_form_validate($form, &$form_state) {\n $key_id = (int) $form_state['values']['keyID'];\n $v_code = (string) $form_state['values']['vCode'];\n\n if (empty($key_id) || empty($v_code) || preg_match('/[^a-z0-9]/i', $v_code) || preg_match('/[^0-9]/', $key_id) || strlen($key_id) > 15 || strlen($v_code) > 64 || strlen($v_code) < 20) {\n form_set_error('keyID', t('Invalid input, please try again.'));\n form_set_error('vCode');\n return;\n }\n\n $result = db_query('SELECT apiID FROM {eve_api_keys} WHERE keyID = :keyID AND vCode =:vCode', array(\n ':keyID' => $key_id,\n ':vCode' => $v_code,\n ));\n\n if ($result->rowCount()) {\n form_set_error('keyID', t('API Key already exists!'));\n form_set_error('vCode');\n return;\n }\n\n $query = array(\n 'keyID' => $key_id,\n 'vCode' => $v_code,\n );\n\n $characters = eve_api_get_api_key_info_api($query);\n\n if (isset($characters['error'])) {\n form_set_error('keyID', t('There was an error with the API.'));\n form_set_error('vCode');\n }\n else {\n $whitelist = array();\n\n if (!empty($characters)) {\n foreach ($characters['characters'] as $character) {\n $whitelist[] = (int) $character['characterID'];\n }\n }\n\n $result = db_query('SELECT characterID FROM {eve_api_whitelist} WHERE characterID IN (:characterIDs)', array(\n ':characterIDs' => $whitelist,\n ));\n\n $allow_expires = variable_get('eve_api_require_expires', FALSE) ? FALSE : !empty($characters['expires']);\n $allow_type = variable_get('eve_api_require_type', TRUE) ? $characters['type'] != 'Account' : FALSE;\n\n if ($result->rowCount()) {\n if ($allow_expires || ($characters['accessMask'] & 8388680) != 8388680) {\n form_set_error('keyID', t('Your account has been whitelisted, please ensure that the \"Type\" drop down box is set to \"Character\", and that the \"No Expiry\" checkbox is ticked. Only (Public Information -> (Characterinfo and FacWarStats), (Private Information) -> (CharacterSheet)) are required.'));\n form_set_error('vCode');\n }\n }\n else {\n if ($allow_expires || $allow_type || ($characters['accessMask'] & variable_get('eve_api_access_mask', 268435455)) != variable_get('eve_api_access_mask', 268435455)) {\n form_set_error('keyID', t('Please ensure that all boxes are highlighted and selected for the API, the \"Character\" drop down box is set to \"All\", the \"Type\" drop down box is set to \"Character\", and that the \"No Expiry\" checkbox is ticked.'));\n form_set_error('vCode');\n }\n }\n\n if (!eve_api_verify_blue($characters) && !variable_get('eve_api_require_blue', FALSE)) {\n form_set_error('keyID', t('No characters associated with your key are currently blue to this alliance.'));\n form_set_error('vCode');\n }\n\n if ($chars = eve_api_characters_exist($characters)) {\n form_set_error('keyID', t('Characters on this key have already been registered. Characters registered: @chars', array('@chars' => implode(\", \", $chars))));\n form_set_error('vCode');\n }\n }\n}", "private function check_auth() {\n if (empty($this->user_id) || empty($this->privatekey)) {\n $this->send_error('AUTH_FAIL');\n exit;\n } elseif ($this->users_model->validate_privatekey($this->user_id, $this->privatekey)) {\n return true;\n }\n }", "function wp_validate_application_password($input_user)\n {\n }", "function twitter_auth_account_form_validate($form, &$form_state) {\n $key = variable_get('twitter_consumer_key', '');\n $secret = variable_get('twitter_consumer_secret', '');\n if ($key == '' || $secret == '') {\n form_set_error('', t('Please configure your consumer key and secret key at ' .\n '<a href=\"!url\">Twitter settings</a>.', array( '!url' => url('admin/config/services/twitter'),\n )));\n }\n}", "function _eventbrite_sboc_config_form_validate($form, &$form_state){\n $eventbrite_api_key = $form_state['values']['eventbrite_api_key'];\n $eventbrite_api_user_key = $form_state['values']['eventbrite_api_user_key'];\n \n if (empty($eventbrite_app_key) || empty($eventbrite_api_user_key)) {\n\t form_set_error('API Credentials', t('Eventbrite API Key and API Usere Keys are required.'));\n } \n }", "function m_verifyEditPass()\n\t{\n\t\t$this->errMsg=MSG_HEAD.\"<br>\";\n\t\tif(empty($this->request['password']))\n\t\t{\n\t\t\t$this->err=1;\n\t\t\t$this->errMsg.=MSG_PASS_EMPTY.\"<br>\";\n\t\t}\n\t\tif(empty($this->request['verify_pw']))\n\t\t{\n\t\t\t$this->err=1;\n\t\t\t$this->errMsg.=MSG_VERIFYPASS_EMPTY.\"<br>\";\n\t\t}\n\t\tif($this->request['password']!=$this->request['verify_pw'])\n\t\t{\n\t\t\t$this->err=1;\n\t\t\t$this->errMsg.=MSG_PASS_NOTMATCHED.\"<br>\";\n\t\t}\n\t\treturn $this->err;\n\t}", "public function verifyCode($secret, $code)\n {\n if (strlen($code) != 6) {\n return false;\n }\n return ($this->getCode($secret) == $code) ? true : false;\n }", "function _cek_password($str)\n{\n if ($str!=\"\") {\n if (pass_decrypt(profile(\"token\"),$str,profile(\"password\"))) {\n return true;\n }else {\n $this->form_validation->set_message('_cek_password', '* Password Salah');\n return false;\n }\n }else {\n return true;\n }\n}", "function validPass($pass)\n{\n\t\n\treturn hasTriplet($pass) & allLegalLetters($pass) & hasPairs($pass);\n\t\n}", "public function getClientSecret();", "public function getClientSecret();", "protected function _verifySecretKey()\n {\n $sCronSecretkeyParameter = $this->_getSecretKey();\n $sCronSecretkey = $this->_getContainer()->getConfig()->getConfigParam('sAmazonCronSecretKey');\n\n if ($sCronSecretkeyParameter === false || $sCronSecretkey !== $sCronSecretkeyParameter) {\n $this->setViewData(array(\n 'sError' => 'Wrong Secret Key given.'\n ));\n\n return false;\n }\n\n return true;\n }", "function valid_production_credentials($api_url, $api_username, $api_password) {\n\tif (!empty($api_url) \n\t\t\t&& !empty($api_username) \n\t\t\t&& !empty($api_password)) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "private function checkPresharedkeyForm(){\n\t\tif(!isset($_POST['services_ipsec_key_pskey'])){\n\t\t\tErrorHandler::addError('formerror','services_ipsec_key_pskey');\n\t\t}\n\t\t\n\t\tif(ErrorHandler::errorCount() > 0){\n\t\t\tthrow new Exception('There is invalid form input');\n\t\t}\n\t}", "public function passwordEntryIsValid() {\r\n \r\n //todo put logic here (same as email)\r\n // also check if it matches confirmpassword\r\n // set the var equal to function call of getpassword\r\n $password = $this->getPassword();\r\n // If the fields empty\r\n if ( empty($password) ) {\r\n // Will send it to errors as username and display the message to user\r\n $this->errors[\"password\"] = \"Password is missing.\";\r\n } \r\n // Calls the password function above and if its not equal to the orgincal password returns error\r\n else if ( $this->getConfirmpassword() !== $this->getPassword() ){\r\n // Message displayed to user\r\n $this->errors[\"password\"] = \"Password does not match confirmation password.\";\r\n }\r\n // Also goes test the password against the password is valid function in the validator class\r\n else if ( !Validator::passwordIsValid($this->getPassword()) ) {\r\n $this->errors[\"password\"] = \"Password is not valid.\"; \r\n }\r\n //Will return if its empty and whether any errors are contained\r\n return ( empty($this->errors[\"password\"]) ? true : false ) ;\r\n }", "public function authenticationWithValidAlphaCharClassPassword() {}", "public function authenticationWithValidAlphaCharClassPassword() {}", "public function authenticationWithValidAlphaCharClassPassword() {}", "function lti_verify_key_and_secret($key, $secret) {\n if ( ! ($key && $secret) ) return array(\"Missing key or secret\", \"\");\n $store = new DbTrivialOAuthDataStore();\n $store->add_consumer($key, $secret);\n\n $server = new OAuthServer($store);\n\n $method = new OAuthSignatureMethod_HMAC_SHA1();\n $server->add_signature_method($method);\n $request = OAuthRequest::from_request();\n\n $basestring = $request->get_signature_base_string();\n\n try {\n $server->verify_request($request);\n return true;\n } catch (Exception $e) {\n return array($e->getMessage(), $basestring);\n }\n}", "public function validateAuthKey($authKey)\n {\n // TODO: Implement validateAuthKey() method.\n }", "public function validateAuthKey($authKey)\n {\n // TODO: Implement validateAuthKey() method.\n }", "public function validateAuthKey($authKey)\n {\n // TODO: Implement validateAuthKey() method.\n }", "function passwordValid($password) {\n\treturn true;\n}", "public function validateAuthKey($authKey)\n {\n return false;\n }", "public function testThatClientSecretIsRequired()\n {\n $env = self::getEnv();\n $api = new Authentication($env['DOMAIN'], $env['APP_CLIENT_ID'], $env['APP_CLIENT_SECRET']);\n\n try {\n $api->refresh_token( uniqid(), [ 'client_secret' => '' ] );\n $caught_exception = false;\n } catch (ApiException $e) {\n $caught_exception = $this->errorHasString( $e, 'client_secret is mandatory' );\n }\n\n $this->assertTrue( $caught_exception );\n }", "function verify_password($username,$password) {\r\n\r\n\t/* MODIFY THIS FOR YOUR INSTITUTION! */\r\n\tif ($username == 'dssadmin' && password == 'dssadmin') return 1;\r\n\telse return 0;\r\n\r\n}", "private function hash_validation() { //check hash\n\n\t\t$testMode = getRequest('ik_pw_via');\n\n\t\tif(isset($testMode) && $testMode == 'test_interkassa_test_xts'){\n\t\t\t$secretKey = $this->object->test_key;\n\t\t} else {\n\t\t\t$secretKey = $this->object->secret_key;\n\t\t}\n\n\t\t$data = array();\n\n\t\tforeach ($_REQUEST as $key => $value) {\n if (!preg_match('/ik_/', $key)) continue;\n $data[$key] = $value;\n }\n\n\t\t$ik_sign = $data['ik_sign'];\n\t\t$sign = $this->createSign($data,$secretKey);\n\n\t\t$this->wrlog(\"hash: \".$sign);\n\t\t$this->wrlog(\"ik_sign: \".$ik_sign);\n\t\treturn $sign == $ik_sign ? true : false;\n\t}", "private function ensureSafePassword(string $plainPassword): bool\n\t{\n\t\t$zxcvbn = new Zxcvbn();\n\t\t$passwordData = $zxcvbn->passwordStrength($plainPassword);\n\t\t\n\t\tif ($passwordData['score'] < 2 && $this->app_env !== 'dev')\n\t\t{\n\t\t\t$errorText = \"Password is too weak. {$passwordData['feedback']['warning']}.\";\n\t\t\tthrow new ApiBadRequestException($errorText);\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "static function isValidPass($pass) {\n $pattern = \"/^[a-zA-Z0-9]{8,32}$/\";\n if(preg_match($pattern, $pass)) {\n return true;\n } else {\n return false;\n }\n }", "function secret_key_1(){\n return \"secret_key_1_password\";\n}", "function validateApiCredentials() { \n if( $this->options['api_type'] == \"\" || $this->options['api_path'] == \"\" ) {\n $this->error_handler( 'Repository url not valid' );\n } elseif($this->options['username'] == \"\") {\n $this->error_handler( 'Username Required' );\n } else if($this->options['password'] == \"\") {\n $this->error_handler( 'Password Required' );\n }\n }", "function validate_key($key)\n{\n if ($key == 'PhEUT5R251')\n return true;\n else\n return false;\n}", "function password($pass)\n\t{\n\t\tif (strcmp($pass, AUCTION_PASSWORD))\n\t\t\texit(\"Wrong password\");\n\t}", "public function validate()\n {\n // generate Token String\n $idTokenString = $this->getTokenString($this->_key);\n return ($idTokenString == $this->_tokenString);\n }", "abstract protected function getConfirmationSecret();", "public function validateApiKey()\n {\n $request = $this->call('GET', 'helper/ping');\n return !empty($request);\n }", "public static function verifyCode(string $secretKey, string $code) : bool\n {\n $time = time();\n $result = 0;\n\n // Timing attack safe iteration and code comparison\n for ($i = -1; $i <= 1; $i++) {\n $timeSlice = floor($time / self::TIME_WINDOW + $i);\n $result = hash_equals(self::getCode($secretKey, $timeSlice), $code) ? $timeSlice : $result;\n }\n\n return ($result > 0);\n }", "function check_password($password)\n{\n if (strlen($password) < 8) {\n throw new Exception(\"password_short.\", 1);\n return false;\n }\n if (!preg_match(\"/[0-9]{1,}/\", $password) || !preg_match(\"/[A-Z]{1,}/\", $password)) {\n throw new Exception(\"password_bad\", 1);\n return false;\n }\n return true;\n}", "private function randomKey($length = 10) {\n $chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890\";\n $key = \"\";\n for ($i = 0; $i < $length; $i++) {\n $key .= $chars{rand(0, strlen($chars) - 1)};\n }\n return $key;\n }\n\n /**\n * Changes a user's password, providing the current password is known\n * @param string $username\n * @param string $currpass\n * @param string $newpass\n * @param string $verifynewpass\n * @return boolean\n */\n function changePass($username, $currpass, $newpass, $verifynewpass) {\n if (strlen($username) == 0) {\n $auth_error[] = $this->lang['changepass_username_empty'];\n } elseif (strlen($username) > MAX_USERNAME_LENGTH) {\n $auth_error[] = $this->lang['changepass_username_long'];\n } elseif (strlen($username) < MIN_USERNAME_LENGTH) {\n $auth_error[] = $this->lang['changepass_username_short'];\n }\n if (strlen($currpass) == 0) {\n $auth_error[] = $this->lang['changepass_currpass_empty'];\n } elseif (strlen($currpass) < MIN_PASSWORD_LENGTH) {\n $auth_error[] = $this->lang['changepass_currpass_short'];\n } elseif (strlen($currpass) > MAX_PASSWORD_LENGTH) {\n $auth_error[] = $this->lang['changepass_currpass_long'];\n }\n if (strlen($newpass) == 0) {\n $auth_error[] = $this->lang['changepass_newpass_empty'];\n } elseif (strlen($newpass) < MIN_PASSWORD_LENGTH) {\n $auth_error[] = $this->lang['changepass_newpass_short'];\n } elseif (strlen($newpass) > MAX_PASSWORD_LENGTH) {\n $auth_error[] = $this->lang['changepass_newpass_long'];\n } elseif (strstr($newpass, $username)) {\n $auth_error[] = $this->lang['changepass_password_username'];\n } elseif ($newpass !== $verifynewpass) {\n $auth_error[] = $this->lang['changepass_password_nomatch'];\n }\n if (count($auth_error) == 0) {\n //$currpass = $this->hashPass($currpass);\n $newpass = $this->hashPass($newpass);\n $query = $this->db->select(\"SELECT password FROM \".PREFIX.\"users WHERE username=:username\", array(':username' => $username));\n $count = count($query);\n if ($count == 0) {\n $this->logActivity(\"UNKNOWN\", \"AUTH_CHANGEPASS_FAIL\", \"Username Incorrect ({$username})\");\n $auth_error[] = $this->lang['changepass_username_incorrect'];\n return false;\n } else {\n $db_currpass = $query[0]->password;\n $verify_password = \\Helpers\\Password::verify($currpass, $db_currpass);\n if ($verify_password) {\n $this->db->update(PREFIX.'users', array('password' => $newpass), array('username' => $username));\n $this->logActivity($username, \"AUTH_CHANGEPASS_SUCCESS\", \"Password changed\");\n $this->success[] = $this->lang['changepass_success'];\n return true;\n } else {\n $this->logActivity($username, \"AUTH_CHANGEPASS_FAIL\", \"Current Password Incorrect ( DB : {$db_currpass} / Given : {$currpass} )\");\n $auth_error[] = $this->lang['changepass_currpass_incorrect'];\n return false;\n }\n }\n } else {\n return false;\n }\n }\n\n /**\n * Changes the stored email address based on username\n * @param string $username\n * @param string $email\n * @return boolean\n */\n function changeEmail($userID, $password, $email) {\n\t\t// Get Current Password From Database\n\t\t$query = $this->db->select(\"SELECT password FROM \".PREFIX.\"users WHERE userID=:userID\", array(':userID' => $userID));\n\t\t$db_currpass = $query[0]->password;\n\t\t// Verify Current Password With Database Password\n\t\t$verify_password = \\Helpers\\Password::verify($password, $db_currpass);\n\t\techo $verify_password;\n\t\t// Make sure Password is good to go.\n if (strlen($password) == 0) {\n $auth_error[] = $this->lang['changepass_currpass_empty'];\n } elseif (strlen($password) < MIN_PASSWORD_LENGTH) {\n $auth_error[] = $this->lang['changepass_currpass_short'];\n } elseif (strlen($password) > MAX_PASSWORD_LENGTH) {\n $auth_error[] = $this->lang['changepass_currpass_long'];\n } elseif (!$verify_password){\n\t\t\t$auth_error[] = $this->lang['changepass_currpass_incorrect'];\n\t\t}\n\t\t// Make sure Email is good\n if (strlen($email) == 0) {\n $auth_error[] = $this->lang['changeemail_email_empty'];\n } elseif (strlen($email) > MAX_EMAIL_LENGTH) {\n $auth_error[] = $this->lang['changeemail_email_long'];\n } elseif (strlen($email) < MIN_EMAIL_LENGTH) {\n $auth_error[] = $this->lang['changeemail_email_short'];\n } elseif (!filter_var($email, FILTER_VALIDATE_EMAIL)) {\n $auth_error[] = $this->lang['changeemail_email_invalid'];\n }\n\n\t\t// Everything looks good. Let user update their password\n if (count($auth_error) == 0) {\n $query = $this->db->select(\"SELECT email FROM \".PREFIX.\"users WHERE userID=:userID\", array(':userID' => $userID));\n $count = count($query);\n if ($count == 0) {\n $this->logActivity(\"UNKNOWN\", \"AUTH_CHANGEEMAIL_FAIL\", \"Username Incorrect ({$userID})\");\n $auth_error[] = $this->lang['changeemail_username_incorrect'];\n return false;\n } else {\n $db_email = $query[0]->email;\n if ($email == $db_email) {\n $this->logActivity($username, \"AUTH_CHANGEEMAIL_FAIL\", \"Old and new email matched ({$email})\");\n $auth_error[] = $this->lang['changeemail_email_match'];\n return false;\n } else {\n $this->db->update(PREFIX.'users', array('email' => $email), array('userID' => $userID));\n $this->logActivity($username, \"AUTH_CHANGEEMAIL_SUCCESS\", \"Email changed from {$db_email} to {$email}\");\n $this->success[] = $this->lang['changeemail_success'];\n return true;\n }\n }\n } else {\n return false;\n }\n }\n\n /**\n * Give the user the ability to change their password if the current password is forgotten\n * by sending email to the email address associated to that user\n * @param string $email\n * @param string $username\n * @param string $key\n * @param string $newpass\n * @param string $verifynewpass\n * @return boolean\n */\n function resetPass($email = '0', $username = '0', $key = '0', $newpass = '0', $verifynewpass = '0') {\n $attcount = $this->getAttempt($_SERVER['REMOTE_ADDR']);\n if ($attcount[0]->count >= MAX_ATTEMPTS) {\n $auth_error[] = $this->lang['resetpass_lockedout'];\n $auth_error[] = sprintf($this->lang['resetpass_wait'], WAIT_TIME);\n return false;\n } else {\n if ($username == '0' && $key == '0') {\n if (strlen($email) == 0) {\n $auth_error[] = $this->lang['resetpass_email_empty'];\n } elseif (strlen($email) > MAX_EMAIL_LENGTH) {\n $auth_error[] = $this->lang['resetpass_email_long'];\n } elseif (strlen($email) < MIN_EMAIL_LENGTH) {\n $auth_error[] = $this->lang['resetpass_email_short'];\n } elseif (!filter_var($email, FILTER_VALIDATE_EMAIL)) {\n $auth_error[] = $this->lang['resetpass_email_invalid'];\n }\n\n $query = $this->db->select(\"SELECT username FROM \".PREFIX.\"users WHERE email=:email\", array(':email' => $email));\n $count = count($query);\n if ($count == 0) {\n $auth_error[] = $this->lang['resetpass_email_incorrect'];\n $attcount[0]->count = $attcount[0]->count + 1;\n $remaincount = (int) MAX_ATTEMPTS - $attcount[0]->count;\n $this->logActivity(\"UNKNOWN\", \"AUTH_RESETPASS_FAIL\", \"Email incorrect ({$email})\");\n $auth_error[] = sprintf($this->lang['resetpass_attempts_remaining'], $remaincount);\n $this->addAttempt($_SERVER['REMOTE_ADDR']);\n return false;\n } else {\n $resetkey = $this->randomKey(RANDOM_KEY_LENGTH);\n $username = $query[0]->username;\n $this->db->update(PREFIX.'users', array('resetkey' => $resetkey), array('username' => $username));\n\n //EMAIL MESSAGE USING PHPMAILER\n $mail = new \\Helpers\\PhpMailer\\Mail();\n $mail->setFrom(EMAIL_FROM);\n $mail->addAddress($email);\n $subject = \" \" . SITE_NAME . \" - Password Reset Request\";\n\t\t\t\t\t$mail->subject($subject);\n $body = \"Hello {$username}<br/><br/>\";\n $body .= \"You recently requested a password reset on \" . SITE_NAME . \"<br/>\";\n $body .= \"To proceed with the password reset, please click the following link :<br/><br/>\";\n $body .= \"<b><a href=\\\"\" . DIR . RESET_PASSWORD_ROUTE . \"?username={$username}&key={$resetkey}\\\">Reset My Password</a></b>\";\n\t\t\t\t\t$body .= \"<br><br> You May Copy and Paste this URL in your Browser Address Bar: <br>\";\n\t\t\t\t\t$body .= \" \" . DIR . RESET_PASSWORD_ROUTE . \"?username={$username}&key={$resetkey}\";\n $mail->body($body);\n $mail->send();\n $this->logActivity($username, \"AUTH_RESETPASS_SUCCESS\", \"Reset pass request sent to {$email} ( Key : {$resetkey} )\");\n $this->success[] = $this->lang['resetpass_email_sent'];\n return true;\n }\n } else {\n // if username, key and newpass are provided\n // Reset Password\n if (strlen($key) == 0) {\n $auth_error[] = $this->lang['resetpass_key_empty'];\n } elseif (strlen($key) < RANDOM_KEY_LENGTH) {\n $auth_error[] = $this->lang['resetpass_key_short'];\n } elseif (strlen($key) > RANDOM_KEY_LENGTH) {\n $auth_error[] = $this->lang['resetpass_key_long'];\n }\n if (strlen($newpass) == 0) {\n $auth_error[] = $this->lang['resetpass_newpass_empty'];\n } elseif (strlen($newpass) > MAX_PASSWORD_LENGTH) {\n $auth_error[] = $this->lang['resetpass_newpass_long'];\n } elseif (strlen($newpass) < MIN_PASSWORD_LENGTH) {\n $auth_error[] = $this->lang['resetpass_newpass_short'];\n } elseif (strstr($newpass, $username)) {\n $auth_error[] = $this->lang['resetpass_newpass_username'];\n } elseif ($newpass !== $verifynewpass) {\n $auth_error[] = $this->lang['resetpass_newpass_nomatch'];\n }\n if (count($auth_error) == 0) {\n $query = $this->db->select(\"SELECT resetkey FROM \".PREFIX.\"users WHERE username=:username\", array(':username' => $username));\n $count = count($query);\n if ($count == 0) {\n $auth_error[] = $this->lang['resetpass_username_incorrect'];\n $attcount[0]->count = $attcount[0]->count + 1;\n $remaincount = (int) MAX_ATTEMPTS - $attcount[0]->count;\n $this->logActivity(\"UNKNOWN\", \"AUTH_RESETPASS_FAIL\", \"Username incorrect ({$username})\");\n $auth_error[] = sprintf($this->lang['resetpass_attempts_remaining'], $remaincount);\n $this->addAttempt($_SERVER['REMOTE_ADDR']);\n return false;\n } else {\n $db_key = $query[0]->resetkey;\n if ($key == $db_key) {\n //if reset key ok update pass\n $newpass = $this->hashpass($newpass);\n $resetkey = '0';\n $this->db->update(PREFIX.'users', array('password' => $newpass, 'resetkey' => $resetkey), array('username' => $username));\n $this->logActivity($username, \"AUTH_RESETPASS_SUCCESS\", \"Password reset - Key reset\");\n $this->success[] = $this->lang['resetpass_success'];\n return true;\n } else {\n $auth_error[] = $this->lang['resetpass_key_incorrect'];\n $attcount[0]->count = $attcount[0]->count + 1;\n $remaincount = (int) MAX_ATTEMPTS - $attcount[0]->count;\n $this->logActivity($username, \"AUTH_RESETPASS_FAIL\", \"Key Incorrect ( DB : {$db_key} / Given : {$key} )\");\n $auth_error[] = sprintf($this->lang['resetpass_attempts_remaining'], $remaincount);\n $this->addAttempt($_SERVER['REMOTE_ADDR']);\n return false;\n }\n }\n } else {\n return false;\n }\n }\n }\n }\n\n /**\n * Checks if the reset key is correct for provided username\n * @param string $username\n * @param string $key\n * @return boolean\n */\n function checkResetKey($username, $key) {\n $attcount = $this->getAttempt($_SERVER['REMOTE_ADDR']);\n if ($attcount[0]->count >= MAX_ATTEMPTS) {\n $auth_error[] = $this->lang['resetpass_lockedout'];\n $auth_error[] = sprintf($this->lang['resetpass_wait'], WAIT_TIME);\n return false;\n } else {\n if (strlen($username) == 0) {\n return false;\n } elseif (strlen($username) > MAX_USERNAME_LENGTH) {\n return false;\n } elseif (strlen($username) < MIN_USERNAME_LENGTH) {\n return false;\n } elseif (strlen($key) == 0) {\n return false;\n } elseif (strlen($key) < RANDOM_KEY_LENGTH) {\n return false;\n } elseif (strlen($key) > RANDOM_KEY_LENGTH) {\n return false;\n } else {\n $query = $this->db->select(\"SELECT resetkey FROM \".PREFIX.\"users WHERE username=:username\", array(':username' => $username));\n $count = count($query);\n if ($count == 0) {\n $this->logActivity(\"UNKNOWN\", \"AUTH_CHECKRESETKEY_FAIL\", \"Username doesn't exist ({$username})\");\n $this->addAttempt($_SERVER['REMOTE_ADDR']);\n $auth_error[] = $this->lang['checkresetkey_username_incorrect'];\n $attcount[0]->count = $attcount[0]->count + 1;\n $remaincount = (int) MAX_ATTEMPTS - $attcount[0]->count;\n $auth_error[] = sprintf($this->lang['checkresetkey_attempts_remaining'], $remaincount);\n return false;\n } else {\n $db_key = $query[0]->resetkey;\n if ($key == $db_key) {\n return true;\n } else {\n $this->logActivity($username, \"AUTH_CHECKRESETKEY_FAIL\", \"Key provided is different to DB key ( DB : {$db_key} / Given : {$key} )\");\n $this->addAttempt($_SERVER['REMOTE_ADDR']);\n $auth_error[] = $this->lang['checkresetkey_key_incorrect'];\n $attcount[0]->count = $attcount[0]->count + 1;\n $remaincount = (int) MAX_ATTEMPTS - $attcount[0]->count;\n $auth_error[] = sprintf($this->lang['checkresetkey_attempts_remaining'], $remaincount);\n return false;\n }\n }\n }\n }\n }\n\n /**\n * Deletes a user's account. Requires user's password\n * @param string $username\n * @param string $password\n * @return boolean\n */\n function deleteAccount($username, $password) {\n if (strlen($username) == 0) {\n $auth_error[] = $this->lang['deleteaccount_username_empty'];\n } elseif (strlen($username) > MAX_USERNAME_LENGTH) {\n $auth_error[] = $this->lang['deleteaccount_username_long'];\n } elseif (strlen($username) < MIN_USERNAME_LENGTH) {\n $auth_error[] = $this->lang['deleteaccount_username_short'];\n }\n if (strlen($password) == 0) {\n $auth_error[] = $this->lang['deleteaccount_password_empty'];\n } elseif (strlen($password) > MAX_PASSWORD_LENGTH) {\n $auth_error[] = $this->lang['deleteaccount_password_long'];\n } elseif (strlen($password) < MIN_PASSWORD_LENGTH) {\n $auth_error[] = $this->lang['deleteaccount_password_short'];\n }\n if (count($auth_error) == 0) {\n\n $query = $this->db->select(\"SELECT password FROM \".PREFIX.\"users WHERE username=:username\", array(':username' => $username));\n $count = count($query);\n if ($count == 0) {\n $this->logActivity(\"UNKNOWN\", \"AUTH_DELETEACCOUNT_FAIL\", \"Username Incorrect ({$username})\");\n $auth_error[] = $this->lang['deleteaccount_username_incorrect'];\n return false;\n } else {\n $db_password = $query[0]->password;\n $verify_password = \\Helpers\\Password::verify($password, $db_password);\n if ($verify_password) {\n $this->db->delete(PREFIX.'users', array('username' => $username));\n $this->db->delete(PREFIX.'sessions', array('username' => $username));\n $this->logActivity($username, \"AUTH_DELETEACCOUNT_SUCCESS\", \"Account deleted - Cookies deleted\");\n $this->success[] = $this->lang['deleteaccount_success'];\n return true;\n } else {\n $this->logActivity($username, \"AUTH_DELETEACCOUNT_FAIL\", \"Password incorrect ( DB : {$db_password} / Given : {$password} )\");\n $auth_error[] = $this->lang['deleteaccount_password_incorrect'];\n return false;\n }\n }\n } else {\n return false;\n }\n }\n\n\n public function resendActivation($email) {\n if (!Cookie::get('auth_cookie')) {\n // Input Verification :\n if (strlen($email) == 0) {\n $auth_error[] = $this->lang['register_email_empty'];\n } elseif (strlen($email) > MAX_EMAIL_LENGTH) {\n $auth_error[] = $this->lang['register_email_long'];\n } elseif (strlen($email) < MIN_EMAIL_LENGTH) {\n $auth_error[] = $this->lang['register_email_short'];\n } elseif (!filter_var($email, FILTER_VALIDATE_EMAIL)) {\n $auth_error[] = $this->lang['register_email_invalid'];\n }\n if (count($auth_error) == 0) {\n // Input is valid\n\t\t\t\t// Check DataBase to see if email user is activated\n $query = $this->db->select(\"SELECT * FROM \".PREFIX.\"users WHERE email=:email AND isactive=0\", array(':email' => $email));\n $count = count($query);\n if ($count != 0) {\n\t\t\t\t\t// User Account Is not yet active. Lets get data to resend their activation with new key\n\t\t\t\t\t$username = $query[0]->username;\n\t\t\t\t\t$activekey = $this->randomKey(RANDOM_KEY_LENGTH);\n\t\t\t\t\t// Store the new key in the user's database\n\t\t\t\t\t $this->db->update(PREFIX.'users', array('activekey' => $activekey), array('username' => $username));\n\t\t\t\t\t//EMAIL MESSAGE USING PHPMAILER\n\t\t\t\t\t$mail = new \\Helpers\\PhpMailer\\Mail();\n\t\t\t\t\t$mail->setFrom(EMAIL_FROM);\n\t\t\t\t\t$mail->addAddress($email);\n\t\t\t\t\t$subject = \" \" . SITE_NAME . \" - Account Activation Link\";\n\t\t\t\t\t$mail->subject($subject);\n\t\t\t\t\t$body = \"Hello {$username}<br/><br/>\";\n\t\t\t\t\t$body .= \"You recently registered a new account on \" . SITE_NAME . \"<br/>\";\n\t\t\t\t\t$body .= \"To activate your account please click the following link<br/><br/>\";\n\t\t\t\t\t$body .= \"<b><a href=\\\"\" . DIR . ACTIVATION_ROUTE . \"?username={$username}&key={$activekey}\\\">Activate my account</a></b>\";\n\t\t\t\t\t$body .= \"<br><br> You May Copy and Paste this URL in your Browser Address Bar: <br>\";\n\t\t\t\t\t$body .= \" \" . DIR . ACTIVATION_ROUTE . \"?username={$username}&key={$activekey}\";\n\t\t\t\t\t$body .= \"<br><br> You Requested to have this email resent to your email.\";\n\t\t\t\t\t$mail->body($body);\n\t\t\t\t\t$mail->send();\n\t\t\t\t\t$this->logActivity($username, \"AUTH_REGISTER_SUCCESS\", \"Account created and activation email sent\");\n\t\t\t\t\t$this->success[] = $this->lang['register_success'];\n\t\t\t\t\treturn true;\n }else{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n } else {\n //some error\n return false;\n }\n } else {\n // User is logged in\n $auth_error[] = $this->lang['register_email_loggedin'];\n return false;\n }\n }\n\n\n\t/**\n\t * Get current user's ID\n\t */\n\tpublic function getID($username){\n\t\t$data = $this->db->select(\"SELECT userID FROM \".PREFIX.\"users WHERE username = :username\",\n\t\t\tarray(':username' => $username));\n\t\treturn $data[0]->userID;\n\t}\n\n\t/**\n\t * Get username attached to email\n\t */\n\tpublic function getUserNameFromEmail($email){\n\t\t$data = $this->db->select(\"SELECT username FROM \".PREFIX.\"users WHERE email = :email\",\n\t\t\tarray(':email' => $email));\n\t\treturn $data[0]->username;\n\t}\n\n\t/**\n\t * Check to see if email exists in users database\n\t */\n\tpublic function checkIfEmail($email){\n\t\t$query = $this->db->select(\"SELECT * FROM \".PREFIX.\"users WHERE email=:email\", array(':email' => $email));\n\t\t$count = count($query);\n\t\tif ($count != 0) {\n\t\t\t// Email Exists\n\t\t\treturn true;\n\t\t}else{\n\t\t\t// Email Does not exists\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t/**\n\t * Update given field in users table\n\t */\n\tpublic function updateUser($data,$where){\n\t\t$this->db->update(PREFIX.\"users\",$data,$where);\n\t}\n\n\t/**\n\t * Get Current Session Data\n\t */\n public function user_info(){\n return $this->currentCookieInfo()['uid'];\n }\n\n /**\n \t * Check to see if Current User is Admin\n * @param int $where_id (current user's userID)\n * @return boolean (true/false)\n \t */\n \tpublic function checkIsAdmin($where_id){\n $user_groups = $this->db->select(\"\n SELECT\n groupID\n FROM\n \".PREFIX.\"users_groups\n WHERE\n userID = :userID\n \",\n array(':userID' => $where_id));\n // Make sure user is logged in\n if(isset($where_id)){\n \t// Get user's group status\n \tforeach($user_groups as $user_group_data){\n \t\t$cu_groupID[] = $user_group_data->groupID;\n \t}\n }else{\n $cu_groupID[] = \"0\";\n }\n // Set which group(s) are admin (4)\n if(in_array(4,$cu_groupID)){\n // User is Admin\n return true;\n }else{\n // User Not Admin\n return false;\n }\n \t}\n\n /**\n \t * Check to see if Current User is Admin\n * @param int $where_id (current user's userID)\n * @return boolean (true/false)\n \t */\n \tpublic function checkIsMod($where_id){\n $user_groups = $this->db->select(\"\n SELECT\n groupID\n FROM\n \".PREFIX.\"users_groups\n WHERE\n userID = :userID\n \",\n array(':userID' => $where_id));\n // Make sure user is logged in\n if(isset($where_id)){\n \t// Get user's group status\n \tforeach($user_groups as $user_group_data){\n \t\t$cu_groupID[] = $user_group_data->groupID;\n \t}\n }else{\n $cu_groupID[] = \"0\";\n }\n // Set which group(s) are admin (4)\n if(in_array(3,$cu_groupID)){\n // User is Admin\n return true;\n }else{\n // User Not Admin\n return false;\n }\n \t}\n\n /**\n \t * Check to see if Current User is New User\n * @param int $where_id (current user's userID)\n * @return boolean (true/false)\n \t */\n \tpublic function checkIsNewUser($where_id){\n $user_groups = $this->db->select(\"\n SELECT\n groupID\n FROM\n \".PREFIX.\"users_groups\n WHERE\n userID = :userID\n \",\n array(':userID' => $where_id));\n // Make sure user is logged in\n if(isset($where_id)){\n \t// Get user's group status\n \tforeach($user_groups as $user_group_data){\n \t\t$cu_groupID[] = $user_group_data->groupID;\n \t}\n }else{\n $cu_groupID[] = \"0\";\n }\n // Set which group(s) are admin (4)\n if(in_array(1,$cu_groupID)){\n // User is Admin\n return true;\n }else{\n // User Not Admin\n return false;\n }\n \t}\n\n}", "protected function authorizationKeyNotValid()\n {\n return !session()->has('EAPISessionKey.' . $this->clientCode . '.' . $this->username . '') ||\n !session()->has('EAPISessionKeyExpires.' . $this->clientCode . '.' . $this->username . '') ||\n session()->get('EAPISessionKeyExpires.' . $this->clientCode . '.' . $this->username . '') < time();\n }", "function valid_pass($password)\n {\n $r2 = '/[A-z]/'; //lowercase\n $r3 = '/[0-9]/'; //numbers\n $r4 = '/[~!@#$%^&*()\\-_=+{};:<,.>?]/'; // special char\n\n /*if (preg_match_all($r1, $candidate, $o) < 1) {\n $msg = \"密码必须包含至少一个大写字母,请返回修改!\";\n return FALSE;\n }*/\n if (preg_match_all($r2, $password, $o) < 1) {\n $msg = \"密码必须包含至少一个字母,请返回修改!\";\n return ['code' => -1, 'msg' => $msg];\n }\n if (preg_match_all($r3, $password, $o) < 1) {\n $msg = \"密码必须包含至少一个数字,请返回修改!\";\n return ['code' => -1, 'msg' => $msg];\n }\n /*if (preg_match_all($r4, $candidate, $o) < 1) {\n $msg = \"密码必须包含至少一个特殊符号:[~!@#$%^&*()\\-_=+{};:<,.>?],请返回修改!\";\n return FALSE;\n }*/\n if (strlen($password) < 8) {\n $msg = \"密码必须包含至少含有8个字符,请返回修改!\";\n return ['code' => -1, 'msg' => $msg];\n }\n return ['code' => 0, 'msg' => 'success'];\n }", "public function verify($password, $securePass);", "function validate_server($link, $data, $address, $secret_key) // Colorize: green\n { // Colorize: green\n if (get_server_secret_key($link, $data, $address) != $secret_key) // Colorize: green\n { // Colorize: green\n $error_details = \"Access violation\"; // Colorize: green\n error_log($error_details); // Colorize: green\n // Colorize: green\n db_disconnect($link); // Colorize: green\n // Colorize: green\n $data[\"message\"] = \"Access error\"; // Colorize: green\n $data[\"details\"] = $error_details; // Colorize: green\n // Colorize: green\n die(json_encode($data)); // Colorize: green\n } // Colorize: green\n }", "protected function checkClientCredentials($client_id, $client_secret = NULL) {\n\n\t}", "protected function validateRequest()\n {\n if ( ! isset($_POST['purchase_code']) || ! is_string($_POST['purchase_code'])) {\n wp_send_json(array(\n 'type' => 'error',\n 'message' => __('Bad request', 'quform')\n ));\n }\n\n if ($_POST['purchase_code'] === '') {\n wp_send_json(array(\n 'type' => 'error',\n 'message' => __('Please enter a license key', 'quform')\n ));\n }\n\n if ( ! current_user_can('quform_settings')) {\n wp_send_json(array(\n 'type' => 'error',\n 'message' => __('Insufficient permissions', 'quform')\n ));\n }\n\n if ( ! check_ajax_referer('quform_verify_purchase_code', false, false)) {\n wp_send_json(array(\n 'type' => 'error',\n 'message' => __('Nonce check failed', 'quform')\n ));\n }\n }", "function is_validated($username = null, $password = null){\n return validate_cred($username, $password);\n}", "function validate($firstpw, $secondpw) {\n\tif(strcmp($firstpw, $secondpw) == 0) {\n\t\t// Booleans to check password complexity - if true, then firstpw is ok\n\t\t$uppercase = preg_match('@[A-Z]@', $firstpw);\n\t\t$lowercase = preg_match('@[a-z]@', $firstpw);\n\t\t$number = preg_match('@[0-9]@', $firstpw);\n\t\tif($uppercase && $lowercase && $number && strlen($firstpw) > 8) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}", "public function getAppSecret(): string;", "function validateActivationToken($token,$lostpass=NULL)\r\n{\r\n\tglobal $db,$db_table_prefix;\r\n\t\r\n\tif($lostpass == NULL) $sql = \"SELECT ActivationToken FROM \".$db_table_prefix.\"Users WHERE Active = 0 AND ActivationToken ='\".$db->sql_escape(trim($token)).\"' LIMIT 1\";\r\n\telse \t\t\t $sql = \"SELECT ActivationToken FROM \".$db_table_prefix.\"Users WHERE Active = 1 AND ActivationToken ='\".$db->sql_escape(trim($token)).\"' AND LostPasswordRequest = 1 LIMIT 1\";\r\n\t\r\n\tif(returns_result($sql) > 0)\r\n\t\treturn true;\r\n\telse\r\n\t\treturn false;\r\n}", "public function isPasswordValid($encoded, $raw, $salt)\n {\n\n }", "public function validate_config_on_save($host) {\n\t\t\tif($host->free_shipping_enabled && !strlen($host->free_shipping_min_amount))\n\t\t\t\t$host->validation->setError('Please specify minimum order amount for free shipping or disable the free shipping option', 'free_shipping_min_amount', true);\n\t\t\t\t\n\t\t\t$hash_value = trim($host->api_key_password); \n\t\t\t\n\t\t\tif(!strlen($hash_value)) { \n\t\t\t\tif(!isset($host->fetched_data['api_key_password']) || !strlen($host->fetched_data['api_key_password'])) \n\t\t\t\t\t$host->validation->setError('Please enter your API key password', 'api_key_password', true); \n\n\t\t\t\t$host->api_key_password = $host->fetched_data['api_key_password']; \n\t\t\t}\n\t\t}", "public function validation($data)\n {\n \t$this->load->library('encrypt');\n\t\t$user = $this->db->select('email, password, status_register')->where('email', $data['email'])->get('ec_client')->result_array();\n if (count($user) > 0) {\n\t\t\t\t$password_decode = $this->encrypt->decode($user[0]['password']);\n\t\t\t\t\tif ($password_decode == $data['password']) {\n\t\t\t\t\t\tif ($user[0]['status_register'] == 0) {\n return 2;\n }\n return 1;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn 0; # Usuario o clave de acceso incorrectos\n\t\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn 0; # Usuario o clave de acceso incorrectos\n\t\t\t}\n }", "function isValidPass($p) {\r\n global $passes;\r\n $i = 0;\r\n foreach ($passes as $password) {\r\n if($passes[$i]==$p) {\r\n return true;\r\n }\r\n $i++;\r\n }\r\n }", "private function valid_password() {\n return (strlen($this->password) == 6);\n }", "function error_password($pass, $pass_bis)\n{\n $error = array();\n if (strlen($pass) < 8 || strlen($pass) >= 255)\n array_push($error, \"error password must be longer than 8 and shorter than 255 \");\n if ($pass !== $pass_bis)\n array_push($error, \"password do not match\");\n if (!preg_match(\"/.*[0-9].*/\", $pass))\n array_push($error, \"password must have at least a number in it\");\n return ($error);\n}", "function validate_key($key,$mobile){\n $apiEncrypter = new ApiEncrypter();\n $d_key = $apiEncrypter->decrypt($key);\n return $d_key == $mobile ? true : false;\n}", "public static function validate_pass($pass, $rpass){\n\t\tif(!empty($pass) && $pass===$rpass && md5($pass)===md5($rpass)) return true;\n\t\telse return false;\n\t}", "private function passwordValidation($pass, $passC)\n {\n if ($pass != $passC) {\n array_push($this->errorArray, \"Your passwords do not match!\");\n return;\n }\n\n //checks to make sure password only contains numbers and letters\n if (preg_match('/[^A-Za-z0-9]/', $pass)) {\n array_push($this->errorArray, \"Your password must only contain numbers and letters.\");\n return;\n }\n\n //Cehcks length\n if (strlen($pass) > 50) {\n array_push($this->errorArray, \"Please make your password less than 50 characters.\");\n return;\n } if (strlen($pass) < 5) {\n array_push($this->errorArray, \"Please make your password longer than 6 characters.\");\n return;\n }\n\n }", "public function authenticationWithValidNumericCharClassPassword() {}", "public function authenticationWithValidNumericCharClassPassword() {}", "public function authenticationWithValidNumericCharClassPassword() {}", "protected function validateCode(string|int $code): bool\n {\n return $this->twoFactorAuth->validateCode($code);\n }", "public function isPasswordValid(string $encoded, string $raw);", "private function isValidKey($key) {\n\n\t\t// Check key length\n\t\t$len = strlen($key);\n\n\t\tif ($len < 1) {\n\t\t\tthrow new FlintstoneException('No key has been set');\n\t\t}\n\n\t\tif ($len > 50) {\n\t\t\tthrow new FlintstoneException('Maximum key length is 50 characters');\n\t\t}\n\n\t\t// Check valid characters in key\n\t\tif (!preg_match(\"/^[A-Za-z0-9_\\-]+$/\", $key)) {\n\t\t\tthrow new FlintstoneException('Invalid characters in key');\n\t\t}\n\n\t\treturn true;\n\t}", "public function checkPass()\n {\n $pass = sha1($_POST['pass']);\n $pass2 = sha1($_POST['confirmation_pass']);\n if (!empty($_POST['pass']) &&\n !empty($_POST['confirmation_pass'])) {\n if ($pass == $pass2) {\n return true;\n } else {\n return $message = 'Vos mots de passes ne correspondent pas';\n }\n } else {\n return $message = 'Tous les champs ne sont pas complétés';\n }\n }", "function verify () {\n// $aop->alipayrsaPublicKey='MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAjUzhXrdJ7GDsgJ59fMLlk7hyYrXkkeGwnYD/eO2HBZh39Y9gTfLJ61Yogc7keOn2uAnZY/zBlw3n+T6mb6/5JYFgvXQi8Qzeh6BkBrNnROu+k4PjhmSbORJFoLrrIxDnsYkQ995kYYhpbS0yf2Al++55v4SrD3/YoVBhWPcRg4xI0QD94FLwhCmcCkft/ILRtUxQk2QeVPLSesvMx2mmUK2L2x2hFA8ewRoGmUdG2Fu9YFIxk//16RI+H7KI8LaoXoVDqHobPae9p0ACE7k9G5vs/cYuikSMKu+lnxghte1jNO+CqrvTP4Pes/mW4e7CEMCTAmEnsXLUrQ6FpfKMcQIDAQAB';\n return $this->aop->rsaCheckV1($_POST, NULL, \"RSA2\");\n }", "function validPassword($password){\t\r\n \tglobal $API;\r\n return $API->userValidatePassword($this->username,$password); \r\n }", "public function getSecret();", "public function getSecret();", "public function getSecret();", "public function getSecret();", "public function getSecret();", "public function valid(): bool\n {\n return !empty($this->clientId) || !empty($this->clientSecret);\n }", "function validate() {\n\t\t\t$email = htmlspecialchars($_POST['email']);\n\t\t\t$ad = Admin::auth($email);\n\t\t\t$pass = $_POST['pass']; \n\t\t\tif ($pass== $ad['contrasenia']) {\n\t\t\t\t$_SESSION['admin'] = $ad;\n\t\t\t\theader(\"Location: ../../contenido/principal/\");\n\t\t\t}else {\n\t\t\t\theader(\"Location: ../../login/\");\n\t\t\t}\n\n\t\t}", "public function settings_verify()\n {\n $method = rcube_utils::get_input_value('_method', rcube_utils::INPUT_POST);\n $timestamp = intval(rcube_utils::get_input_value('_timestamp', rcube_utils::INPUT_POST));\n $success = false;\n\n if ($driver = $this->get_driver($method)) {\n $data = @json_decode(rcube_utils::get_input_value('_data', rcube_utils::INPUT_POST), true);\n if (is_array($data)) {\n foreach ($data as $key => $value) {\n if ($value !== '******') {\n $driver->$key = $value;\n }\n }\n }\n\n $success = $driver->verify(rcube_utils::get_input_value('_code', rcube_utils::INPUT_POST), $timestamp);\n $method = $driver->method;\n }\n\n // put session into high-security mode\n if ($success && !empty($_POST['_session'])) {\n $_SESSION['kolab_2fa_secure_mode'] = time();\n }\n\n $this->api->output->command('plugin.verify_response', array(\n 'method' => $method,\n 'success' => $success,\n 'message' => str_replace('$method', $this->gettext($method),\n $this->gettext($success ? 'codeverificationpassed' : 'codeverificationfailed'))\n ));\n\n $this->api->output->send();\n }", "private function validateRequest()\n {\n //verify there is a valid access token and it matches our config. Bail if not present\n $incoming_access_token = $this->request->token();\n if ($incoming_access_token !== $this->config->access_token && ! empty($this->config->access_token)) {\n $msg = 'Access denied due to invalid token.';\n syslog(LOG_DEBUG, $msg);\n header('HTTP/1.1 403 Access Denied.');\n exit();\n }\n\n //verify we have a valid request\n if (! $this->request->isValid()) {\n $msg = 'Invalid package received.';\n syslog(LOG_DEBUG, $msg);\n header('HTTP/1.1 400 Bad Request');\n exit($msg);\n }\n }", "public function verifyPurchaseCode()\n {\n $this->validateRequest();\n\n $response = $this->api->post('/verify', array(\n 'site_url' => Quform::base64UrlEncode(site_url()),\n 'purchase_code' => $_POST['purchase_code']\n ));\n\n if (is_array($response)) {\n if (isset($response['type'])) {\n if ($response['type'] == 'success') {\n $this->setKey($response['license_key']);\n\n delete_transient('quform_latest_version_info');\n delete_site_transient('update_plugins');\n\n wp_send_json(array(\n 'type' => 'success',\n 'status' => $this->getStatus(),\n 'message' => __('License key successfully verified', 'quform')\n ));\n } else if ($response['type'] == 'error') {\n $this->revoke();\n\n delete_transient('quform_latest_version_info');\n delete_site_transient('update_plugins');\n\n wp_send_json(array(\n 'type' => 'error',\n 'status' => $this->getStatus(),\n 'message' => __('Invalid license key', 'quform')\n ));\n }\n } else if (isset($response['code'])) {\n switch ($response['code']) {\n case 'rest_invalid_param':\n $this->revoke();\n\n delete_transient('quform_latest_version_info');\n delete_site_transient('update_plugins');\n\n wp_send_json(array(\n 'type' => 'error',\n 'status' => $this->getStatus(),\n 'message' => __('Invalid license key', 'quform')\n ));\n break;\n }\n }\n }\n\n wp_send_json(array(\n 'type' => 'error',\n 'message' => wp_kses(sprintf(\n __('An error occurred verifying the license key, please try again. If this problem persists, see %sthis page%s.', 'quform'),\n '<a href=\"http://support.themecatcher.net/quform-wordpress-v2/troubleshooting/common-problems/an-error-occurred-verifying-the-license-key\">',\n '</a>'\n ), array('a' => array('href' => array())))\n ));\n }" ]
[ "0.69811463", "0.6426371", "0.6420528", "0.62968606", "0.62725306", "0.6259516", "0.6234196", "0.6234196", "0.6234196", "0.6234196", "0.6234196", "0.6234196", "0.6224626", "0.6211366", "0.6175029", "0.6048249", "0.60013", "0.5985303", "0.59244883", "0.5834638", "0.5827106", "0.58213115", "0.58162004", "0.5789816", "0.5772753", "0.5742175", "0.5729214", "0.57190025", "0.57067406", "0.5687611", "0.5639221", "0.5631257", "0.56265205", "0.56265205", "0.5615206", "0.56073606", "0.56041586", "0.5591176", "0.5580782", "0.5580782", "0.5580782", "0.5577578", "0.55530757", "0.55530757", "0.55530757", "0.5546869", "0.5537938", "0.5528155", "0.55205333", "0.5508082", "0.55035883", "0.5501872", "0.55016595", "0.54805154", "0.54795814", "0.5465967", "0.5465763", "0.5455829", "0.54513216", "0.5448694", "0.54485434", "0.5443513", "0.54397637", "0.5430821", "0.54262406", "0.5425872", "0.54257566", "0.54197466", "0.54106176", "0.54075235", "0.54019445", "0.5398211", "0.5392559", "0.53796303", "0.537557", "0.5374539", "0.53744483", "0.53713673", "0.5370391", "0.53589565", "0.5352407", "0.5348245", "0.5348245", "0.5348245", "0.5345561", "0.53353786", "0.53336424", "0.53187513", "0.5316007", "0.5313181", "0.52953446", "0.52953446", "0.52953446", "0.52953446", "0.52953446", "0.5294152", "0.52919227", "0.52829933", "0.5282195", "0.5282053" ]
0.6364201
3
Get status code from code list
public static function getStatusCode($code) { $codes = self::statusCodes(); if (!empty($codes[$code])) { return $codes[$code]; } throw new Exception("Invalid status code: " . $code); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _requestStatus($code) {\n $status = array( \n 200 => 'OK',\n 404 => 'Not Found', \n 405 => 'Method Not Allowed',\n 500 => 'Internal Server Error',\n ); \n return ($status[$code]) ? $status[$code] : $status[500]; \n }", "private function _requestStatus($code) {\n $status = array( \n 200 => 'OK',\n 404 => 'Not Found', \n 405 => 'Method Not Allowed',\n 500 => 'Internal Server Error',\n \t); \n return ($status[$code])?$status[$code]:$status[500]; \n }", "public function status(int $code);", "private function codes()\n {\n $a_http_status_codes = array(\n 100 => 'Continue', 102 => 'Processing',\n 200 => 'OK', 201 => 'Created', 202 => 'Accepted', 203 => 'Non-Authoritative Information', 204 => 'No Content',\n 205 => 'Reset Content', 206 => 'Partial Content', 207 => 'Multi-Status', 208 => 'Already Reported',\n 226 => 'IM Used', 300 => 'Multiple Choices', 301 => 'Moved Permanently', 302 => 'Found', 303 => 'See Other',\n 304 => 'Not Modified', 305 => 'Use Proxy', 307 => 'Temporary Redirect', 308 => 'Permanent Redirect',\n 400 => 'Bad Request', 401 => 'Unauthorized', 402 => 'Payment Required', 403 => 'Forbidden', 404 => 'Not Found',\n 405 => 'Method Not Allowed', 406 => 'Not Acceptable', 407 => 'Proxy Authentication Required', 408 => 'Request Timeout',\n 409 => 'Conflict', 410 => 'Gone', 411 => 'Length Required', 412 => 'Precondition Failed',\n 413 => 'Request Entity Too Large', 414 => 'Request-URI Too Long', 415 => 'Unsupported Media Type',\n 416 => 'Requested Range Not Satisfiable', 417 => 'Expectation Failed', 421 => 'Misdirected Request',\n 422 => 'Unprocessable Entity', 423 => 'Locked', 424 => 'Failed Dependency', 426 => 'Upgrade Required',\n 428 => 'Precondition Required', 429 => 'Too Many Requests', 431 => 'Request Header Fields Too Large',\n 451 => 'Unavailable For Legal Reasons', 500 => 'Internal Server Error', 501 => 'Not Implemented',\n 502 => 'Bad Gateway', 503 => 'Service Unavailable', 504 => 'Gateway Timeout', 505 => 'HTTP Version Not Supported',\n 506 => 'Variant Also Negotiates', 507 => 'Insufficient Storage', 508 => 'Loop Detected',\n 510 => 'Not Extended', 511 => 'Network Authentication Required'\n );\n return $a_http_status_codes;\n }", "public function get_status_code() {\n\n\t\treturn $this->get_status_info()->code;\n\t}", "private function __requestStatus( $code )\n {\n $status = array( \n 200 => 'OK',\n 201 => 'Created',\n 202 => 'Accepted',\n 402 => 'Request Limit Reached',\n 404 => 'Not Found', \n 405 => 'Method Not Allowed',\n 500 => 'Internal Server Error',\n ); \n return ( $status[$code] ) ? $status[$code] : $status[500]; \n }", "protected function requestStatus(int $code)\n {\n $status = array(\n 200 => 'OK',\n 201 => 'Created',\n 202 => 'Accepted',\n 204 => 'No Content',\n 400 => 'Bad Request',\n 401 => 'Unauthorized',\n 404 => 'Not Found',\n 405 => 'Method Not Allowed',\n 409 => 'Conflict',\n 412 => 'Precondition Failed',\n 500 => 'Internal Server Error',\n 503 => 'Service Unavailable',\n );\n\n return ($status[$code]) ?? $status[500];\n }", "public function getCode()\n\t{\n\t\treturn (int)$this->statusCode;\n\t}", "public function httpCodes($code = null) {\n\t\tif (empty($code)) {\n\t\t\treturn $this->_statusCodes;\n\t\t}\n\t\tif (is_array($code)) {\n\t\t\t$codes = array_keys($code);\n\t\t\t$min = min($codes);\n\t\t\tif (!is_int($min) || $min < 100 || max($codes) > 999) {\n\t\t\t\tthrow new CakeException(__d('cake_dev', 'Invalid status code'));\n\t\t\t}\n\t\t\t$this->_statusCodes = $code + $this->_statusCodes;\n\t\t\treturn true;\n\t\t}\n\t\tif (!isset($this->_statusCodes[$code])) {\n\t\t\treturn null;\n\t\t}\n\t\treturn array($code => $this->_statusCodes[$code]);\n\t}", "function getStatusCode();", "public function status()\n {\n $statuses = collect([\n \"1\" => \"secondary\",\n \"2\" => \"success\",\n \"3\" => \"info\",\n \"4\" => \"warning\",\n \"5\" => \"danger\",\n ]);\n\n $group = substr($this->code, 0, 1);\n\n return $statuses->get($group, \"warning\");\n }", "static public function getCodes(){\n return array(\n 200 => 'OK',\n 201 => 'Created',\n 202 => 'Accepted',\n 300 => 'Multiple Choices',\n 301 => 'Moved Permanently',\n 302 => 'Moved Temporarily',\n 307 => 'Temporary Redirect',\n 310 => 'Too many Redirects',\n 400 => 'Bad Request',\n 401 => 'Unauthorized',\n 402 => 'Payment Required',\n 403 => 'Forbidden',\n 404 => 'Not Found',\n 405 => 'Method Not',\n 406 => 'Not Acceptable',\n 407 => 'Proxy Authentication Required',\n 408 => 'Request Time-out',\n 409 => 'Conflict',\n 410 => 'Gone',\n 411 => 'Length Required',\n 412 => 'Precondition Failed',\n 413 => 'Request Entity Too Large',\n 414 => 'Request-URI Too Long',\n 415 => 'Unsupported Media Type',\n 416 => 'Requested range unsatisfiable',\n 417 => 'Expectation failed',\n 500 => 'Internal Server Error',\n 501 => 'Not Implemented',\n 502 => 'Bad Gateway',\n 503 => 'Service Unavailable',\n 504 => 'Gateway Time-out',\n 508 => 'Loop detected',\n );\n }", "protected function _getCode()\n {\n // filter code from response\n return (int)substr($this->_getServerResponse(), 0, 3);\n }", "public function getStatusCode() {\n\t\treturn $this->status['code'];\n\t}", "private function _getStatusCodeMessage($status)\n{\n // via parse_ini_file()... however, this will suffice\n // for an example\n $codes = Array(\n 200 => 'OK',\n 400 => 'Bad Request',\n 401 => 'Unauthorized',\n 402 => 'Payment Required',\n 403 => 'Forbidden',\n 404 => 'Not Found',\n 500 => 'Internal Server Error',\n\n 501 => 'Not Implemented',\n );\n return (isset($codes[$status])) ? $codes[$status] : '';\n}", "public function getCode()\n {\n return $this->response_code;\n }", "public static function getStatusCode(): int;", "public function getStatusCode();", "public function getStatusCode();", "public function getStatusCode();", "public function getStatusCode();", "public function getStatusCode();", "public function getStatusCode();", "public function getStatusCode();", "public function getStatusCode();", "public function getStatusCode();", "public function getStatusCode();", "public static function getStatusCodeMessage($status)\n\t\t{\n\t\t\t// via parse_ini_file()... however, this will suffice\n\t\t\t// for an example\n\t\t\t$codes = Array(\n\t\t\t\t100 => 'Continue',\n\t\t\t\t101 => 'Switching Protocols',\n\t\t\t\t200 => 'OK',\n\t\t\t\t201 => 'Created',\n\t\t\t\t202 => 'Accepted',\n\t\t\t\t203 => 'Non-Authoritative Information',\n\t\t\t\t204 => 'No Content',\n\t\t\t\t205 => 'Reset Content',\n\t\t\t\t206 => 'Partial Content',\n\t\t\t\t300 => 'Multiple Choices',\n\t\t\t\t301 => 'Moved Permanently',\n\t\t\t\t302 => 'Found',\n\t\t\t\t303 => 'See Other',\n\t\t\t\t304 => 'Not Modified',\n\t\t\t\t305 => 'Use Proxy',\n\t\t\t\t306 => '(Unused)',\n\t\t\t\t307 => 'Temporary Redirect',\n\t\t\t\t400 => 'Bad Request',\n\t\t\t\t401 => 'Unauthorized',\n\t\t\t\t402 => 'Payment Required',\n\t\t\t\t403 => 'Forbidden',\n\t\t\t\t404 => 'Not Found',\n\t\t\t\t405 => 'Method Not Allowed',\n\t\t\t\t406 => 'Not Acceptable',\n\t\t\t\t407 => 'Proxy Authentication Required',\n\t\t\t\t408 => 'Request Timeout',\n\t\t\t\t409 => 'Conflict',\n\t\t\t\t410 => 'Gone',\n\t\t\t\t411 => 'Length Required',\n\t\t\t\t412 => 'Precondition Failed',\n\t\t\t\t413 => 'Request Entity Too Large',\n\t\t\t\t414 => 'Request-URI Too Long',\n\t\t\t\t415 => 'Unsupported Media Type',\n\t\t\t\t416 => 'Requested Range Not Satisfiable',\n\t\t\t\t417 => 'Expectation Failed',\n\t\t\t\t500 => 'Internal Server Error',\n\t\t\t\t501 => 'Not Implemented',\n\t\t\t\t502 => 'Bad Gateway',\n\t\t\t\t503 => 'Service Unavailable',\n\t\t\t\t504 => 'Gateway Timeout',\n\t\t\t\t505 => 'HTTP Version Not Supported',\n\t\t\t\t600 => 'OK',\n\t\t\t\t601 => 'Bad request',\n\t\t\t\t602 => 'You must be authorized to view this page.',\n\t\t\t\t603 => 'The requested URL ' . $_SERVER['REQUEST_URI'] . ' was not found.',\n\t\t\t\t604 => 'The server encountered an error processing your request.',\n\t\t\t\t605 => 'The requested method is not implemented.',\n\t\t\t\t606 => 'You have exceeded api call limit for the hour',\n\t\t\t\t607 => 'You have exceeded api call limit for the day'\n\t\t\t);\n\t\n\t\t\treturn (isset($codes[$status])) ? $codes[$status] : '';\n\t\t}", "public function getStatusCode(): int\n {\n return $this->code ;\n }", "public function code() {\n return $this->info['http_code'];\n }", "public function getCode()\n {\n return curl_getinfo($this->handler)['http_code'];\n }", "public static function get_status_code_message($status)\n {\n $codes = array(\n 200 => 'OK',\n 201 => 'Created',\n 202 => 'Accepted',\n 301 => 'Moved Permanently',\n 400 => 'Bad Request',\n 401 => 'Unauthorized',\n 403 => 'Forbidden',\n 404 => 'Not Found',\n 405 => 'Method Not Allowed',\n 500 => 'Internal Server Error',\n 501 => 'Not Implemented',\n 502 => 'Bad Gateway',\n 503 => 'Service Unavailable',\n );\n\n return (isset($codes[$status])) ? $codes[$status] : '';\n }", "private function _getStatusCodeMessage($status){\n\t\t// via parse_ini_file()... however, this will suffice\n\t\t// for an example\n\t\t$codes = Array(\n\t\t\t200 => 'OK',\n\t\t\t400 => 'Bad Request',\n\t\t\t401 => 'Unauthorized',\n\t\t\t402 => 'Payment Required',\n\t\t\t403 => 'Forbidden',\n\t\t\t404 => 'Not Found',\n\t\t\t500 => 'Internal Server Error',\n\t\t\t501 => 'Not Implemented',\n\t\t);\n\t\treturn (isset($codes[$status])) ? $codes[$status] : '';\n\t}", "public function getStatusCode()\n {\n preg_match(\"/(\\d\\d\\d)/\", $this->_status, $matches);\n return isset($matches[1]) ? (int) $matches[1] : 0;\n }", "public function getStatusCode() {}", "public static function getStatusCodeMessage($status)\n {\n// via parse_ini_file()... however, this will suffice\n// for an example\n $codes = Array(\n 100 => 'Continue',\n 101 => 'Switching Protocols',\n 200 => 'OK',\n 201 => 'Created',\n 202 => 'Accepted',\n 203 => 'Non-Authoritative Information',\n 204 => 'No Content',\n 205 => 'Reset Content',\n 206 => 'Partial Content',\n 300 => 'Multiple Choices',\n 301 => 'Moved Permanently',\n 302 => 'Found',\n 303 => 'See Other',\n 304 => 'Not Modified',\n 305 => 'Use Proxy',\n 306 => '(Unused)',\n 307 => 'Temporary Redirect',\n 400 => 'Bad Request',\n 401 => 'Unauthorized',\n 402 => 'Payment Required',\n 403 => 'Forbidden',\n 404 => 'Not Found',\n 405 => 'Method Not Allowed',\n 406 => 'Not Acceptable',\n 407 => 'Proxy Authentication Required',\n 408 => 'Request Timeout',\n 409 => 'Conflict',\n 410 => 'Gone',\n 411 => 'Length Required',\n 412 => 'Precondition Failed',\n 413 => 'Request Entity Too Large',\n 414 => 'Request-URI Too Long',\n 415 => 'Unsupported Media Type',\n 416 => 'Requested Range Not Satisfiable',\n 417 => 'Expectation Failed',\n 500 => 'Internal Server Error',\n 501 => 'Not Implemented',\n 502 => 'Bad Gateway',\n 503 => 'Service Unavailable',\n 504 => 'Gateway Timeout',\n 505 => 'HTTP Version Not Supported'\n );\n\n return (isset($codes[$status])) ? $codes[$status] : '';\n }", "public static function getLekabStatusText($code)\n {\n switch (intval($code)) {\n case 0:\n return \"QUEUED\";\n case 1:\n return \"SENT\";\n case 2:\n return \"DELIVERED\";\n case 3:\n return \"DELETED\";\n case 4:\n return \"EXPIRED\";\n case 5:\n return \"REJECTED\";\n case 6:\n return \"UNDELIVERABLE\";\n case 7:\n return \"ACCEPTED\";\n case 8:\n return \"ABSENT SUBSCRIBER\";\n case 9:\n return \"UNKNOWN SUBSCRIBER\";\n case 10:\n return \"INVALID DESTINATION\";\n case 11:\n return \"SUBSCRIBER ERROR\";\n case 12:\n return \"UNKNOWN\";\n case 13:\n return \"ERROR\";\n default:\n return \"(UNKNOWN CODE?)\";\n }\n }", "function get_status_header_desc($code) {\n\t$codes_to_desc = array(\n\t\t\t100 => 'Continue',\n\t\t\t101 => 'Switching Protocols',\n\t\t\t102 => 'Processing',\n\n\t\t\t200 => 'OK',\n\t\t\t201 => 'Created',\n\t\t\t202 => 'Accepted',\n\t\t\t203 => 'Non-Authoritative Information',\n\t\t\t204 => 'No Content',\n\t\t\t205 => 'Reset Content',\n\t\t\t206 => 'Partial Content',\n\t\t\t207 => 'Multi-Status',\n\t\t\t226 => 'IM Used',\n\n\t\t\t300 => 'Multiple Choices',\n\t\t\t301 => 'Moved Permanently',\n\t\t\t302 => 'Found',\n\t\t\t303 => 'See Other',\n\t\t\t304 => 'Not Modified',\n\t\t\t305 => 'Use Proxy',\n\t\t\t306 => 'Reserved',\n\t\t\t307 => 'Temporary Redirect',\n\n\t\t\t400 => 'Bad Request',\n\t\t\t401 => 'Unauthorized',\n\t\t\t402 => 'Payment Required',\n\t\t\t403 => 'Forbidden',\n\t\t\t404 => 'Not Found',\n\t\t\t405 => 'Method Not Allowed',\n\t\t\t406 => 'Not Acceptable',\n\t\t\t407 => 'Proxy Authentication Required',\n\t\t\t408 => 'Request Timeout',\n\t\t\t409 => 'Conflict',\n\t\t\t410 => 'Gone',\n\t\t\t411 => 'Length Required',\n\t\t\t412 => 'Precondition Failed',\n\t\t\t413 => 'Request Entity Too Large',\n\t\t\t414 => 'Request-URI Too Long',\n\t\t\t415 => 'Unsupported Media Type',\n\t\t\t416 => 'Requested Range Not Satisfiable',\n\t\t\t417 => 'Expectation Failed',\n\t\t\t422 => 'Unprocessable Entity',\n\t\t\t423 => 'Locked',\n\t\t\t424 => 'Failed Dependency',\n\t\t\t426 => 'Upgrade Required',\n\n\t\t\t500 => 'Internal Server Error',\n\t\t\t501 => 'Not Implemented',\n\t\t\t502 => 'Bad Gateway',\n\t\t\t503 => 'Service Unavailable',\n\t\t\t504 => 'Gateway Timeout',\n\t\t\t505 => 'HTTP Version Not Supported',\n\t\t\t506 => 'Variant Also Negotiates',\n\t\t\t507 => 'Insufficient Storage',\n\t\t\t510 => 'Not Extended'\n\t);\n\t\n\tif(check_value($codes_to_desc[$code])) {\n\t\treturn $codes_to_desc[$code];\t\n\t}\n\t\n}", "function get_status_header_desc( $code ) {\n\t\tstatic $wp_header_to_desc;\n\n\t\tif ( !isset( $wp_header_to_desc ) ) {\n\t\t\t$wp_header_to_desc = array(\n\t\t\t\t100 => 'Continue',\n\t\t\t\t101 => 'Switching Protocols',\n\t\t\t\t102 => 'Processing',\n\n\t\t\t\t200 => 'OK',\n\t\t\t\t201 => 'Created',\n\t\t\t\t202 => 'Accepted',\n\t\t\t\t203 => 'Non-Authoritative Information',\n\t\t\t\t204 => 'No Content',\n\t\t\t\t205 => 'Reset Content',\n\t\t\t\t206 => 'Partial Content',\n\t\t\t\t207 => 'Multi-Status',\n\t\t\t\t226 => 'IM Used',\n\n\t\t\t\t300 => 'Multiple Choices',\n\t\t\t\t301 => 'Moved Permanently',\n\t\t\t\t302 => 'Found',\n\t\t\t\t303 => 'See Other',\n\t\t\t\t304 => 'Not Modified',\n\t\t\t\t305 => 'Use Proxy',\n\t\t\t\t306 => 'Reserved',\n\t\t\t\t307 => 'Temporary Redirect',\n\n\t\t\t\t400 => 'Bad Request',\n\t\t\t\t401 => 'Unauthorized',\n\t\t\t\t402 => 'Payment Required',\n\t\t\t\t403 => 'Forbidden',\n\t\t\t\t404 => 'Not Found',\n\t\t\t\t405 => 'Method Not Allowed',\n\t\t\t\t406 => 'Not Acceptable',\n\t\t\t\t407 => 'Proxy Authentication Required',\n\t\t\t\t408 => 'Request Timeout',\n\t\t\t\t409 => 'Conflict',\n\t\t\t\t410 => 'Gone',\n\t\t\t\t411 => 'Length Required',\n\t\t\t\t412 => 'Precondition Failed',\n\t\t\t\t413 => 'Request Entity Too Large',\n\t\t\t\t414 => 'Request-URI Too Long',\n\t\t\t\t415 => 'Unsupported Media Type',\n\t\t\t\t416 => 'Requested Range Not Satisfiable',\n\t\t\t\t417 => 'Expectation Failed',\n\t\t\t\t422 => 'Unprocessable Entity',\n\t\t\t\t423 => 'Locked',\n\t\t\t\t424 => 'Failed Dependency',\n\t\t\t\t426 => 'Upgrade Required',\n\n\t\t\t\t500 => 'Internal Server Error',\n\t\t\t\t501 => 'Not Implemented',\n\t\t\t\t502 => 'Bad Gateway',\n\t\t\t\t503 => 'Service Unavailable',\n\t\t\t\t504 => 'Gateway Timeout',\n\t\t\t\t505 => 'HTTP Version Not Supported',\n\t\t\t\t506 => 'Variant Also Negotiates',\n\t\t\t\t507 => 'Insufficient Storage',\n\t\t\t\t510 => 'Not Extended'\n\t\t\t);\n\t\t}\n\n\t\tif ( isset( $wp_header_to_desc[$code] ) )\n\t\t\treturn $wp_header_to_desc[$code];\n\t\telse\n\t\t\treturn '';\n\t}", "private function _getStatusCodeMessage($status)\n {\n // via parse_ini_file()... however, this will suffice\n // for an example\n $codes = Array(\n 200 => 'OK',\n 400 => 'Bad Request',\n 401 => 'Unauthorized',\n 402 => 'Payment Required',\n 403 => 'Forbidden',\n 404 => 'Not Found',\n 500 => 'Internal Server Error',\n 501 => 'Not Implemented',\n );\n return (isset($codes[$status])) ? $codes[$status] : '';\n }", "public function getNewStatusCode()\n\t {\n\t\t$select = $this->_db->select() \n\t\t\t\t ->from(array('MS'=>STATUS_MASTER),array(\"MS.code_numeric\"))\n\t\t\t\t ->order('master_id DESC')\n\t\t\t\t ->limit('1');\n\t\t\t\t //echo $select->__tostring();die;\n\t\t $result = $this->getAdapter()->fetchrow($select);\n\t\t $start = substr($result['code_numeric'],0,2);\n\t\t\t\t\t\t\t $newCode = (substr($result['code_numeric'],2)+1); \n\t\t\t\t\t\t\t $newStatus = (strlen($newCode)<3) ? $start.'0'.$newCode : $start.$newCode; \n\t\t return $newStatus;\n\t }", "function status($code) {\n $reason=@constant('self::HTTP_'.$code);\n if (PHP_SAPI!='cli')\n header($_SERVER['SERVER_PROTOCOL'].' '.$code.' '.$reason);\n return $reason;\n }", "public function getStatusCode(): int;", "public function getStatusCode(): int;", "public function getStatusCode(): int;", "public function getStatusCode(): int;", "private function getStatusMessage(){\n\t\t$status = array(\n\t\t\t\t100 => 'Continue', \n\t\t\t\t101 => 'Switching Protocols', \n\t\t\t\t200 => 'OK',\n\t\t\t\t201 => 'Created', \n\t\t\t\t202 => 'Accepted', \n\t\t\t\t203 => 'Non-Authoritative Information', \n\t\t\t\t204 => 'No Content', \n\t\t\t\t205 => 'Reset Content', \n\t\t\t\t206 => 'Partial Content', \n\t\t\t\t300 => 'Multiple Choices', \n\t\t\t\t301 => 'Moved Permanently', \n\t\t\t\t302 => 'Found', \n\t\t\t\t303 => 'See Other', \n\t\t\t\t304 => 'Not Modified', \n\t\t\t\t305 => 'Use Proxy', \n\t\t\t\t306 => '(Unused)', \n\t\t\t\t307 => 'Temporary Redirect', \n\t\t\t\t400 => 'Bad Request', \n\t\t\t\t401 => 'Unauthorized', \n\t\t\t\t402 => 'Payment Required', \n\t\t\t\t403 => 'Forbidden', \n\t\t\t\t404 => 'Not Found', \n\t\t\t\t405 => 'Method Not Allowed', \n\t\t\t\t406 => 'Not Acceptable', \n\t\t\t\t407 => 'Proxy Authentication Required', \n\t\t\t\t408 => 'Request Timeout', \n\t\t\t\t409 => 'Conflict', \n\t\t\t\t410 => 'Gone', \n\t\t\t\t411 => 'Length Required', \n\t\t\t\t412 => 'Precondition Failed', \n\t\t\t\t413 => 'Request Entity Too Large', \n\t\t\t\t414 => 'Request-URI Too Long', \n\t\t\t\t415 => 'Unsupported Media Type', \n\t\t\t\t416 => 'Requested Range Not Satisfiable', \n\t\t\t\t417 => 'Expectation Failed', \n\t\t\t\t500 => 'Internal Server Error', \n\t\t\t\t501 => 'Not Implemented', \n\t\t\t\t502 => 'Bad Gateway', \n\t\t\t\t503 => 'Service Unavailable', \n\t\t\t\t504 => 'Gateway Timeout', \n\t\t\t\t505 => 'HTTP Version Not Supported');\n\t\treturn ($status[$this->_code]) ? $status[$this->_code] : $status[500];\n\t}", "function wspra_get_status_message($code=200){\n $status = array(\n 100 => 'Continue', \n 101 => 'Switching Protocols', \n 200 => 'OK',\n 201 => 'Created', \n 202 => 'Accepted', \n 203 => 'Non-Authoritative Information', \n 204 => 'No Content', \n 205 => 'Reset Content', \n 206 => 'Partial Content', \n 300 => 'Multiple Choices', \n 301 => 'Moved Permanently', \n 302 => 'Found', \n 303 => 'See Other', \n 304 => 'Not Modified', \n 305 => 'Use Proxy', \n 306 => '(Unused)', \n 307 => 'Temporary Redirect', \n 400 => 'Bad Request', \n 401 => 'Unauthorized', \n 402 => 'Payment Required', \n 403 => 'Forbidden', \n 404 => 'Not Found', \n 405 => 'Method Not Allowed', \n 406 => 'Not Acceptable', \n 407 => 'Proxy Authentication Required', \n 408 => 'Request Timeout', \n 409 => 'Conflict', \n 410 => 'Gone', \n 411 => 'Length Required', \n 412 => 'Precondition Failed', \n 413 => 'Request Entity Too Large', \n 414 => 'Request-URI Too Long', \n 415 => 'Unsupported Media Type', \n 416 => 'Requested Range Not Satisfiable', \n 417 => 'Expectation Failed', \n 500 => 'Internal Server Error', \n 501 => 'Not Implemented', \n 502 => 'Bad Gateway', \n 503 => 'Service Unavailable', \n 504 => 'Gateway Timeout', \n 505 => 'HTTP Version Not Supported',\n 1001 => 'Parameters required!',\n 1002 => 'No Results Found'\n );\n return $status[$code];\n}", "private static function _getStatusCodeMessage($status)\n {\n $codes = Array(\n 100 => 'Continue',\n 101 => 'Switching Protocols',\n 200 => 'OK',\n 201 => 'Created',\n 202 => 'Accepted',\n 203 => 'Non-Authoritative Information',\n 204 => 'No Content',\n 205 => 'Reset Content',\n 206 => 'Partial Content',\n 300 => 'Multiple Choices',\n 301 => 'Moved Permanently',\n 302 => 'Found',\n 303 => 'See Other',\n 304 => 'Not Modified',\n 305 => 'Use Proxy',\n 306 => '(Unused)',\n 307 => 'Temporary Redirect',\n 400 => 'Bad Request',\n 401 => 'Unauthorized',\n 402 => 'Payment Required',\n 403 => 'Forbidden',\n 404 => 'Not Found',\n 405 => 'Method Not Allowed',\n 406 => 'Not Acceptable',\n 407 => 'Proxy Authentication Required',\n 408 => 'Request Timeout',\n 409 => 'Conflict',\n 410 => 'Gone',\n 411 => 'Length Required',\n 412 => 'Precondition Failed',\n 413 => 'Request Entity Too Large',\n 414 => 'Request-URI Too Long',\n 415 => 'Unsupported Media Type',\n 416 => 'Requested Range Not Satisfiable',\n 417 => 'Expectation Failed',\n 500 => 'Internal Server Error',\n 501 => 'Not Implemented',\n 502 => 'Bad Gateway',\n 503 => 'Service Unavailable',\n 504 => 'Gateway Timeout',\n 505 => 'HTTP Version Not Supported'\n );\n\n return (isset($codes[$status])) ? $codes[$status] : '';\n }", "public static function findByCode($code)\n {\n if (array_key_exists($code, static::$codeCache)) {\n return static::$codeCache[$code];\n }\n\n $status = static::whereCode($code)->first();\n\n return static::$codeCache[$code] = $status;\n }", "function getOrderStatusCode($key){\n\t$order_status = getOrderStatusList();\n\tif ($order_status[$key]) {\n\t\treturn $order_status[$key]['code'];\n\t}\n\treturn null;\n}", "public function getStatusCode()\r\n\t{\r\n\t\treturn $this->m_code;\r\n\t}", "private function _getStatusCodeMessage($status = 100)\n {\n return (isset($this->codes[$status])) ? $this->codes[$status] : '';\n }", "public function _getStatusCodeMessage($status) {\n // via parse_ini_file()... however, this will suffice\n // for an example\n $codes = Array(\n 100 => 'Continue',\n 101 => 'Switching Protocols',\n 200 => 'OK',\n 201 => 'Created',\n 202 => 'Accepted',\n 203 => 'Non-Authoritative Information',\n 204 => 'No Content',\n 205 => 'Reset Content',\n 206 => 'Partial Content',\n 300 => 'Multiple Choices',\n 301 => 'Moved Permanently',\n 302 => 'Found',\n 303 => 'See Other',\n 304 => 'Not Modified',\n 305 => 'Use Proxy',\n 306 => '(Unused)',\n 307 => 'Temporary Redirect',\n 400 => 'Bad Request',\n 401 => 'Unauthorized',\n 402 => 'Payment Required',\n 403 => 'Forbidden',\n 404 => 'Oops! Something has gone wrong and the page you were looking for could not be found! Try the <a href=\"\" class=\"color-blue\">home page.</a>',\n 405 => 'Method Not Allowed',\n 406 => 'Not Acceptable',\n 407 => 'Proxy Authentication Required',\n 408 => 'Request Timeout',\n 409 => 'Conflict',\n 410 => 'Gone',\n 411 => 'Length Required',\n 412 => 'Precondition Failed',\n 413 => 'Request Entity Too Large',\n 414 => 'Request-URI Too Long',\n 415 => 'Unsupported Media Type',\n 416 => 'Requested Range Not Satisfiable',\n 417 => 'Expectation Failed',\n 500 => \"We're sorry because something went wrong, please try again!\",\n 501 => 'Not Implemented',\n 502 => 'Bad Gateway',\n 503 => 'Service Unavailable',\n 504 => 'Gateway Timeout',\n 505 => 'HTTP Version Not Supported',\n );\n return (isset($codes[$status])) ? $codes[$status] : 'Unknown Result';\n }", "public function getStatusCode()\n {\n return static::STATUS_CODE;\n }", "public function getStatusCode(): int\n {\n return $this->meta['status_code'];\n }", "function getHttpCode();", "public function getStatusCode(): int\n {\n return match ($this->status) {\n ActionResponseStatus::CLIENT_ERROR => 400,\n ActionResponseStatus::CREATED => 201,\n ActionResponseStatus::SUCCESS => 200,\n ActionResponseStatus::DELETED => 204,\n ActionResponseStatus::NOT_FOUND => 404,\n ActionResponseStatus::PERISTENCE_ERROR => 409,\n default => 500,\n };\n }", "function _getStatusMessage(){\n $status = array(\n 200 => 'Ok' ,\n 201 => 'Created' ,\n 202 => 'deleted' ,\n 204 => 'No Content' ,\n 400 => 'Bad Request',\n 404 => 'Not Found' ,\n 405 => 'Not Allowed' ,\n 406 => 'Not Acceptable',\n\n );\n return ($status[$this->CodeHTTP] ? $status[$this->CodeHTTP] : $status[500]);\n }", "public function getStatusCode()\n {\n }", "public static function GetStatusCode($result) {\n\t\t$result = json_decode($result, true);\n\t\t\n\t\treturn $result['status']['code'];\n\t}", "function HttpStatus($code) {\n $status = array(\n 200 => 'OK',\n 201 => 'Created',\n 202 => 'Accepted',\n 400 => 'Bad Request',\n 405 => 'Method Not Allowed',\n 500 => 'Internal Server Error');\n\n // If anything else, return 500\n return $status[$code] ? $status[$code] : $status[500];\n}", "public function code()\n {\n // API Response Code\n return $this->agent->code();\n }", "function get_status_header_desc($code)\n {\n }", "public function getStatus() {\n\t\t$code = $this->status['code'];\n\t\tif ($code === '0'){\n\t\t\treturn 'Closed';\n\t\t}else if($code === '1'){\n\t\t\treturn 'On Hold';\n\t\t}else if($code === '2'){\n\t\t\treturn 'Open';\n\t\t}else if($code === '3'){\n\t\t\t$openingDate = ($this->status['openingdate'] === '') ? 'soon' : date(\"j M\", strtotime($this->status['openingdate']));\n\t\t\treturn 'Opening '.$openingDate; \n\t\t}else if($code === '4'){\n\t\t\treturn 'Closed For Season'; \n\t\t}else if($code === '5'){ \n\t\t\t$updateTime = ($this->status['updatetime'] === '') ? 'No Estimate' : 'Estimated: '.date(\"g:ia\", strtotime($this->status['updatetime']));\n\t\t\treturn 'Delayed '.$updateTime; \n\t\t}\n\t}", "public function getCode()\n\t{\n\t\t$matches = array();\n\t\tif (isset($this->headers) && isset($this->headers[0]))\n\t\t\tpreg_match('|HTTP/\\d\\.\\d\\s+(\\d+)\\s+.*|', $this->headers[0], $matches);\n\t\treturn isset($matches[1]) ? (int)$matches[1] : 0;\n\t}", "public function getStatusCode()\n {\n \treturn $this->statusCode;\n }", "public function getStatusCode(): int\n {\n return $this->status;\n }", "private function getStatusCode()\n {\n return $this->statusCode;\n }", "function http_translate_code( $code ) {\n\t\t// Check the given parameters\n\t\tif( ! is_int( $code ) ) {\n\t\t\tthrow new \\InvalidArgumentException( 'Status is expected to be an integer.' );\n\t\t}\n\t\t// Return the string matching the given code.\n\t\tswitch( $code ) {\n\t\t\tcase 100: return 'Continue'; break;\n\t\t\tcase 101: return 'Switching Protocols'; break;\n\t\t\tcase 200: return 'OK'; break;\n\t\t\tcase 201: return 'Created'; break;\n\t\t\tcase 202: return 'Accepted'; break;\n\t\t\tcase 203: return 'Non-Authoritative Information'; break;\n\t\t\tcase 204: return 'No Content'; break;\n\t\t\tcase 205: return 'Reset Content'; break;\n\t\t\tcase 206: return 'Partial Content'; break;\n\t\t\tcase 300: return 'Multiple Choices'; break;\n\t\t\tcase 301: return 'Moved Permanently'; break;\n\t\t\tcase 302: return 'Moved Temporarily'; break;\n\t\t\tcase 303: return 'See Other'; break;\n\t\t\tcase 304: return 'Not Modified'; break;\n\t\t\tcase 305: return 'Use Proxy'; break;\n\t\t\tcase 400: return 'Bad Request'; break;\n\t\t\tcase 401: return 'Unauthorized'; break;\n\t\t\tcase 402: return 'Payment Required'; break;\n\t\t\tcase 403: return 'Forbidden'; break;\n\t\t\tcase 404: return 'Not Found'; break;\n\t\t\tcase 405: return 'Method Not Allowed'; break;\n\t\t\tcase 406: return 'Not Acceptable'; break;\n\t\t\tcase 407: return 'Proxy Authentication Required'; break;\n\t\t\tcase 408: return 'Request Time-out'; break;\n\t\t\tcase 409: return 'Conflict'; break;\n\t\t\tcase 410: return 'Gone'; break;\n\t\t\tcase 411: return 'Length Required'; break;\n\t\t\tcase 412: return 'Precondition Failed'; break;\n\t\t\tcase 413: return 'Request Entity Too Large'; break;\n\t\t\tcase 414: return 'Request-URI Too Large'; break;\n\t\t\tcase 415: return 'Unsupported Media Type'; break;\n\t\t\tcase 500: return 'Internal Server Error'; break;\n\t\t\tcase 501: return 'Not Implemented'; break;\n\t\t\tcase 502: return 'Bad Gateway'; break;\n\t\t\tcase 503: return 'Service Unavailable'; break;\n\t\t\tcase 504: return 'Gateway Time-out'; break;\n\t\t\tcase 505: return 'HTTP Version not supported'; break;\n\t\t}\n\t\t// Default is null\n\t\treturn null;\n\t}", "public static function getStatusMessageByCode($statusCode): string\n {\n $statusMessages = [\n 100 => 'Continue',\n 101 => 'Switching Protocols',\n 102 => 'Processing', // RFC 2518\n 200 => 'OK',\n 201 => 'Created',\n 202 => 'Accepted',\n 203 => 'Non-Authoritative Information',\n 204 => 'No Content',\n 205 => 'Reset Content',\n 206 => 'Partial Content',\n 207 => 'Multi-Status',\n 300 => 'Multiple Choices',\n 301 => 'Moved Permanently',\n 302 => 'Found',\n 303 => 'See Other',\n 304 => 'Not Modified',\n 305 => 'Use Proxy',\n 307 => 'Temporary Redirect',\n 400 => 'Bad Request',\n 401 => 'Unauthorized',\n 402 => 'Payment Required',\n 403 => 'Forbidden',\n 404 => 'Not Found',\n 405 => 'Method Not Allowed',\n 406 => 'Not Acceptable',\n 407 => 'Proxy Authentication Required',\n 408 => 'Request Timeout',\n 409 => 'Conflict',\n 410 => 'Gone',\n 411 => 'Length Required',\n 412 => 'Precondition Failed',\n 413 => 'Request Entity Too Large',\n 414 => 'Request-URI Too Long',\n 415 => 'Unsupported Media Type',\n 416 => 'Requested Range Not Satisfiable',\n 417 => 'Expectation Failed',\n 418 => 'Sono Vibiemme',\n 500 => 'Internal Server Error',\n 501 => 'Not Implemented',\n 502 => 'Bad Gateway',\n 503 => 'Service Unavailable',\n 504 => 'Gateway Timeout',\n 505 => 'HTTP Version Not Supported',\n 507 => 'Insufficient Storage',\n 509 => 'Bandwidth Limit Exceeded',\n ];\n\n return isset($statusMessages[$statusCode]) ? $statusMessages[$statusCode] : 'Unknown Status';\n }", "public function getStatus(): int\n {\n return $this->statusCode;\n }", "function getStatusList() {\n $statusList = array();\n foreach (Constants::$statusNames as $id => $name) {\n $statusList[$id] = \"$id - $name\";\n }\n return $statusList;\n}", "public function getStatusCodes(): array\n {\n $rep = $this->em->getRepository(StatusCodes::class)->findAll();\n $arr = [];\n foreach ($rep as $item)\n {\n $arr[] = ['code' => $item->getScode(), 'title' => $item->getTitle()];\n }\n return $arr;\n }", "public static function getStatusDetail($status_code = null){\n $_items = array(\n self::STATUS_INACTIVE => array('heading'=>Yum::t(\"Account Inactive\"), 'message'=>Yum::t(\"This account is Inactive.\")),\n self::STATUS_ACTIVE => array('heading'=>Yum::t(\"Account Active\"), 'message'=>Yum::t(\"This account is Active.\")),\n self::STATUS_APPROVAL_PENDING => array('heading'=>Yum::t(\"Account is waiting for Approval\"), 'message'=>Yum::t(\"This account is listed for approval and will be Active after Approval only. An Activation Confirmation mail will be sent at the registered email address as soon as account is approved.\")),\n self::STATUS_FORWARDED=> array('heading'=>Yum::t(\"Forwarded For Approval\"), 'message'=>Yum::t(\"This account is forwarded for Approval.\")),\n self::STATUS_REJECTED => array('heading'=>Yum::t(\"Account Rejected\"), 'message'=>Yum::t(\"This account is Disapproved.\")),\n self::STATUS_VERIFICATION_PENDING => array('heading'=>Yum::t(\"Email Verification Pending\"), 'message'=>Yum::t(\"An Email ID Varification mail is sent at the registered email address. User is requested to check his/her email account and click on the activation link. Account will be considered for further Activation Process after Email ID Verification only.\")),\n self::STATUS_BANNED => array('heading'=>Yum::t(\"Account Banned\"), 'message'=>Yum::t(\"This account is Banned.\")),\n self::STATUS_REMOVED => array('heading'=>Yum::t(\"Account Deleted\"), 'message'=>Yum::t(\"This account is Deleted.\")),\n );\n \n if (isset($status_code))\n return isset($_items[$status_code]) ? $_items[$status_code] : false;\n else\n return isset($_items) ? $_items : false;\n \n }", "public function getCode(): int\n\t{\n\t\treturn $this->err->getCode();\n\t}", "public function getResponseCode();", "public function getResponseCode();", "public function getHttpCode()\n {\n return $this->information[ self::INFORMATION_HTTP_CODE ];\n }", "public function get_status_code(): int {\n if (empty($this->status_code)) {\n throw new RuntimeException(\"HTTP Response is missing a status code\");\n }\n\n return $this->status_code;\n }", "public static function getStatus($type) {\n\n \treturn self::$zip_status_codes[$type] ?? '';\n\n }", "public function statusCode($code = null) {\n\t\tif ($code === null) {\n\t\t\treturn $this->_status;\n\t\t}\n\t\tif (!isset($this->_statusCodes[$code])) {\n\t\t\tthrow new CakeException(__d('cake_dev', 'Unknown status code'));\n\t\t}\n\t\treturn $this->_status = $code;\n\t}", "public static function getHttpStatusCode(array $errorCode): int\n {\n return $errorCode['status'];\n }", "function getOrderStatusText($code)\n{\n\tforeach (getOrderStatusList() as $status) {\n\t\tif ($status['code'] == $code) {\n\t\t\treturn $status['text'];\n\t\t}\n\t}\n\treturn null;\n}", "public function getCustomStatusCode()\n {\n return $this->customStatusCode;\n }", "protected static function statusCode($code=null) {\r\n\t\tstatic $current_status;\r\n\t\t\r\n\t\tif ($code) {\r\n $protocol = isset($_SERVER['SERVER_PROTOCOL']) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0';\r\n\t\t\t$current_status = $code;\r\n\t\t\theader($protocol. ' ' . static::$messages[$code]);\r\n\t\t}\r\n\t\treturn $current_status?:200;\r\n\t}", "abstract public static function getStatuses();", "public static function translateStatus($code, $status) {\n\t\tif ($code === -1) {\n\t\t\treturn 'Waiting..';\n\t\t} else {\n\t\t\treturn $status;\n\t\t}\n\t}", "public function statusCode()\n {\n return $this->code;\n }", "public function getHttpCode()\n {\n return $this->code;\n }", "protected function getStatus()\n {\n switch (true) {\n case ($this->code >= self::HTTP_OK and $this->code < self::HTTP_MULTIPLE_CHOICES):\n $status = 'success';\n break;\n case ($this->code >= self::HTTP_BAD_REQUEST and $this->code < self::HTTP_INTERNAL_SERVER_ERROR):\n $status = 'fail';\n break;\n default:\n $status = 'error';\n break;\n }\n\n return $status;\n }", "protected function getHttpResponseCodes() {\n return array (\n 100 => 'Continue',\n 101 => 'Switching Protocols',\n 102 => 'Processing',\n 200 => 'OK',\n 201 => 'Created',\n 202 => 'Accepted',\n 203 => 'Non-Authoritative Information',\n 204 => 'No Content',\n 205 => 'Reset Content',\n 206 => 'Partial Content',\n 207 => 'Multi-Status',\n 300 => 'Multiple Choices',\n 301 => 'Moved Permanently',\n 302 => 'Found',\n 303 => 'See Other',\n 304 => 'Not Modified',\n 305 => 'Use Proxy',\n 306 => 'Switch Proxy',\n 307 => 'Temporary Redirect',\n 400 => 'Bad Request',\n 401 => 'Unauthorized',\n 402 => 'Payment Required',\n 403 => 'Forbidden',\n 404 => 'Not Found',\n 405 => 'Method Not Allowed',\n 406 => 'Not Acceptable',\n 407 => 'Proxy Authentication Required',\n 408 => 'Request Timeout',\n 409 => 'Conflict',\n 410 => 'Gone',\n 411 => 'Length Required',\n 412 => 'Precondition Failed',\n 413 => 'Request Entity Too Large',\n 414 => 'Request-URI Too Long',\n 415 => 'Unsupported Media Type',\n 416 => 'Requested Range Not Satisfiable',\n 417 => 'Expectation Failed',\n 418 => 'I\\'m a teapot',\n 422 => 'Unprocessable Entity',\n 423 => 'Locked',\n 424 => 'Failed Dependency',\n 425 => 'Unordered Collection',\n 426 => 'Upgrade Required',\n 449 => 'Retry With',\n 450 => 'Blocked by Windows Parental Controls',\n 500 => 'Internal Server Error',\n 501 => 'Not Implemented',\n 502 => 'Bad Gateway',\n 503 => 'Service Unavailable',\n 504 => 'Gateway Timeout',\n 505 => 'HTTP Version Not Supported',\n 506 => 'Variant Also Negotiates',\n 507 => 'Insufficient Storage',\n 509 => 'Bandwidth Limit Exceeded',\n 510 => 'Not Extended'\n );\n }", "function getOrderStatusCodes(...$keys){\n\t$order_status = getOrderStatusList();\n\t$codes = [];\n\tforeach($keys as $key){\n\t\tif (isset($order_status[$key])) {\n\t\t\tarray_push($codes, $order_status[$key]['code']);\n\t\t}\n\t}\n\treturn $codes;\n}", "public static function getStatusList() {\r\n return [\r\n self::STATUS_ACTIVE => 'Active',\r\n self::STATUS_RETIRED => 'Retired'\r\n ];\r\n }", "private function _status_parse( $header, $code ) {\n\t\tif ( $code == 201 ) {\n\t\t\treturn 'H';\n\t\t}\n\n\t\tif ( stripos( $header, 'X-Litespeed-Cache-Control: no-cache' ) !== false ) {\n\t\t\treturn 'N'; // Blacklist\n\t\t}\n\n\t\t$_cache_headers = array(\n\t\t\t'x-litespeed-cache',\n\t\t\t'x-lsadc-cache',\n\t\t\t'x-qc-cache',\n\t\t);\n\n\t\tforeach ( $_cache_headers as $_header ) {\n\t\t\tif ( stripos( $header, $_header ) !== false ) {\n\t\t\t\tif ( stripos( $header, $_header . ': miss' ) !== false ) {\n\t\t\t\t\treturn 'M'; // Miss\n\t\t\t\t}\n\t\t\t\treturn 'H'; // Hit\n\t\t\t}\n\t\t}\n\n\t\treturn 'B'; // Blacklist\n\t}", "function getHttpStatus();", "public function getStatusCode()\n {\n // TODO: Implement getStatusCode() method.\n }", "public function getStatusCode()\n {\n return $this->status;\n }", "public function getStatusCode() {\n\n return $this->result->status_code;\n }", "function get_status_header_desc($code) {\n global $output_header_to_desc;\n\n $code = abs(intval($code));\n\n if (!isset ($output_header_to_desc)) {\n $output_header_to_desc = [\n 100 => 'Continue',\n 101 => 'Switching Protocols',\n 102 => 'Processing',\n 200 => 'OK',\n 201 => 'Created',\n 202 => 'Accepted',\n 203 => 'Non-Authoritative Information',\n 204 => 'No Content',\n 205 => 'Reset Content',\n 206 => 'Partial Content',\n 207 => 'Multi-Status',\n 226 => 'IM Used',\n 300 => 'Multiple Choices',\n 301 => 'Moved Permanently',\n 302 => 'Found',\n 303 => 'See Other',\n 304 => 'Not Modified',\n 305 => 'Use Proxy',\n 306 => 'Reserved',\n 307 => 'Temporary Redirect',\n 400 => 'Bad Request',\n 401 => 'Unauthorized',\n 402 => 'Payment Required',\n 403 => 'Forbidden',\n 404 => 'Page Not Found',\n 405 => 'Method Not Allowed',\n 406 => 'Not Acceptable',\n 407 => 'Proxy Authentication Required',\n 408 => 'Request Timeout',\n 409 => 'Conflict',\n 410 => 'Gone',\n 411 => 'Length Required',\n 412 => 'Precondition Failed',\n 413 => 'Request Entity Too Large',\n 414 => 'Request-URI Too Long',\n 415 => 'Unsupported Media Type',\n 416 => 'Requested Range Not Satisfiable',\n 417 => 'Expectation Failed',\n 422 => 'Unprocessable Entity',\n 423 => 'Locked',\n 424 => 'Failed Dependency',\n 426 => 'Upgrade Required',\n 500 => 'Internal Server Error',\n 501 => 'Not Implemented',\n 502 => 'Bad Gateway',\n 503 => 'Service Unavailable',\n 504 => 'Gateway Timeout',\n 505 => 'HTTP Version Not Supported',\n 506 => 'Variant Also Negotiates',\n 507 => 'Insufficient Storage',\n 510 => 'Not Extended'\n ];\n }\n if (isset ($output_header_to_desc [ $code ])) {\n return $output_header_to_desc [ $code ];\n } else {\n return '';\n }\n}" ]
[ "0.7016233", "0.6983833", "0.6980347", "0.69282967", "0.68979484", "0.6894529", "0.6873282", "0.6856017", "0.6817893", "0.6700735", "0.6660813", "0.663219", "0.6577447", "0.6554962", "0.6548249", "0.65004635", "0.6490911", "0.64885116", "0.64885116", "0.64885116", "0.64885116", "0.64885116", "0.64885116", "0.64885116", "0.64885116", "0.64885116", "0.64885116", "0.6481969", "0.6467749", "0.646286", "0.64422035", "0.643634", "0.6433113", "0.6427193", "0.6387661", "0.6380798", "0.6363061", "0.6358075", "0.63216466", "0.63174236", "0.63144445", "0.63102156", "0.62961704", "0.62961704", "0.62961704", "0.62961704", "0.62794864", "0.6260387", "0.62584484", "0.62557244", "0.6245756", "0.6228105", "0.6219497", "0.62163633", "0.6193675", "0.6189904", "0.6162794", "0.6150808", "0.613945", "0.61359966", "0.613467", "0.61254036", "0.61143064", "0.60936975", "0.6093399", "0.6090742", "0.6089593", "0.60541403", "0.60526663", "0.6046994", "0.60412574", "0.6029041", "0.6028146", "0.6026938", "0.60265064", "0.60236406", "0.60187674", "0.60187674", "0.6016005", "0.6015566", "0.5998208", "0.5997624", "0.59912026", "0.5989533", "0.5983282", "0.59811985", "0.5981185", "0.5975168", "0.597292", "0.5971493", "0.5965255", "0.5961668", "0.59546965", "0.5939555", "0.59271467", "0.5926153", "0.591951", "0.5918666", "0.5918479", "0.5917616" ]
0.6749368
9
Create target API URL
public function createURL($action) { var mode = 'payment' $host = $this->is_local_test ? self::WMMERCHANT_HOST_TEST : self::WMMERCHANT_HOST; if ($this->is_local_test) mode = "sandbox"; return $host .'/'. mode. '/' . $action; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function generateUrl() : string\n {\n return $this->apiUrl.$this->ownerRepo.$this->branchPath.$this->branch;\n }", "public function buildApiUrl($api) {\n return $this->endpointSettings['endpoint'] . $api;\n }", "function generate_api_url(){\n\t\t$parameters = array(\n\t\t\t'uid' \t\t => $this->uid,\n\t\t\t'pswd' \t\t => $this->pswd,\n\t\t\t'api' \t\t => $this->api,\n\t\t\t'apiversion' => $this->apiversion\t\t\t\n\t\t);\n\t\t\n\t\tif(!empty($this->sid) && !empty($this->encrypted_pswd)){\n\t\t\t$parameters['sid'] = $this->sid;\n\t\t\t$parameters['pswd'] = $this->encrypted_pswd;\n\t\t}\n\t\t\n\t\t//var_dump($parameters);\n\t\t\n\t\treturn self::api_end_point . '?' . http_build_query($parameters);\n\t}", "final private function constructApiUrl()\r\n {\r\n\t\trequire_once 'bset.php';\r\n $this->apiUrl = 'https://api.telegram.org/bot' . BOT_TOKEN;\r\n }", "function create_url( $args ) {\n\tglobal $base_url;\n\t\n\t$base_url = add_query_arg( 'wc-api', 'software-api', $base_url );\n\t\n\treturn $base_url . '&' . http_build_query( $args );\n}", "protected function getUrl(){\n\t\treturn $this->apiUrl . $this->apiVersion . '/';\n\t}", "protected function _build_url() {\n\n $params = array_filter([\n 'name' => $this->_names,\n 'country_id' => $this->_country_id,\n 'language_id' => $this->_language_id,\n ], function($v) {\n if (!is_array($v)) {\n return strlen(trim($v)) > 0;\n } else {\n return $v;\n }\n });\n //Only pass apikey if there is one set\n if ($api_key = $this->get_api_key()) {\n $params['apikey'] = trim($api_key);\n }\n\n return self::BASE . '?' . http_build_query($params);\n }", "protected function get_endpoint_url() {\n\n\t\t$args = http_build_query( array( 'apikey' => $this->api_key ) );\n\t\t$base = $this->route . $this->app_id;\n\t\t$url = \"$base?$args\";\n\n\t\treturn $url;\n\t}", "public function getApiUrl() {\n if(in_array($this->getType(), array('presentation', 'document'))) {\n return SERVER_PROTOCOL .'://'. SERVER_ADDRESS .':'.SERVER_PORT . SERVER_ROOT .'/api/'. $this->getType() .'/'. $this->getId() .'/';\n } else {\n return SERVER_PROTOCOL .'://'. SERVER_ADDRESS .':'.SERVER_PORT . SERVER_ROOT .'/api/file/'. $this->getId() .'/';\n }\n }", "public function generate_url()\n {\n }", "protected function get_url()\n {\n return $this->base_url + $this->api_version; \n }", "protected function prepareUrl()\n {\n return 'http://'.$this->_host.'/service/v'.$this->_apiVersion.'/rest.php';\n }", "function _build_url() {\n\t\t// Add transaction ID for better detecting double requests in AUTH server\n\t\tif($GLOBALS['config']['application']['tid'] == '') $GLOBALS['config']['application']['tid'] = rand(0, 10000);\n\n\t\t$url = $this->url.'&action='.$this->action.'&tid='.$GLOBALS['config']['application']['tid'];\n\t\t\n\t\treturn $url;\n\t}", "private function constructApiUrl($action)\n {\n return $this->url . '/gwprocessor2.php?a=' . $action;\n }", "protected function buildRequestUrl($action = \"url\"){\n return \"https://{$this->host}/urlshortener/{$this->version}/{$action}?key={$this->token}\";\n }", "public function getApiUrl()\n {\n $defaultUrl = $this->getTestMode()\n ? $this->testApiHost\n : $this->prodApiHost;\n\n return $this->parameters->get('apiUrl', $defaultUrl);\n }", "final private function constructApiUrl(): TgLog\n {\n $this->apiUrl = self::TELEGRAM_BASE_URL . 'bot' . $this->botToken . '/';\n $this->logger->debug('Built up the API URL');\n return $this;\n }", "protected function generateApiUrl(&$parameters, $currentOptions) {\n // Set Api's url based on passed api type\n if($this->options['api_type'] == 'github') {\n $opt_url = $this->options['github_url'];\n //Initialize description variable based on selected Api\n if(isset($parameters['desc'])) {\n $parameters['body'] = $parameters['desc'];\n unset($parameters['desc']);\n }\n } else if($this->options['api_type'] == 'bitbucket') {\n $opt_url = $this->options['bitbucket_url'];\n //Initialize description variable based on selected Api\n if(isset($parameters['desc'])) {\n $parameters['content'] = $parameters['desc'];\n unset($parameters['desc']);\n }\n } else {\n $this->error_handler( 'Method Not Allowed', (int)$headers['http_code'] );\n }\n\n // Set Api's full url along with path and format\n $url = strtr( $opt_url, array(\n ':protocol' => $this->options['protocol'],\n ':path' => trim(implode( \"/\", array_map( 'urlencode', explode( \"/\", $this->options['api_path'] ) ) ), '/') . (substr($this->options['api_path'], -1) == '/' ? '/' : ''),\n ':format' => $currentOptions['format']\n ) );\n return $url;\n }", "function generate_rapi_endpoint($api_url, $api_key, $addition = \"\", $page_limit = false, $params = \"\") {\n $qparams['q'] = $params;\n if ($page_limit) {\n $qparams['page_limit'] = $page_limit;\n }\n $qparams['apikey'] = $api_key;\n $endpoint = $api_url . $addition . '?' . http_build_query($qparams);\n return $endpoint;\n}", "function buildRESTAPIUrl($SiteURL, $APILink, $ObjectType, $ObjectIdentifier){\n\t\t//TODO: add ability to remove double slashes\n\t\t$url = $SiteURL . $APILink . \"/\" . $ObjectIdentifier . $ObjectType;\n\t\treturn $url;\n\t}", "public function buildFrontendUri() {}", "function salmon_generate_api_url($salmon_for_type=null,$id=null) {\n $url = get_base_url();\n $url .= \"/data_custom/salmon.php\";\n\n if (!is_null($salmon_for_type)) {\n $url .= \"&type=\".$salmon_for_type;\n }\n if (!is_null($id)) {\n $url .= \"&id=\".$id;\n }\n\n return $url;\n}", "public function buildBackendUri() {}", "public function getApiUrl() \n {\n return ( $this->getSSL() ? 'https://' : 'http://' ) . $this->_api_url;\n }", "function generateUrl($api, $params = array(), $key = null){\n\t\t$url = $this->baseUri . $api . \"?\";\n\t\t$params += $this->_authenticateParams();\n\n\t\tif (isset($params['_key']) && $key === null) {\n\t\t\t$key = $params['_key'];\n\t\t\tunset($params['_key']);\n\t\t}\n\t\t$url .= $this->_generateQuery($params, $key);\n\t\treturn $url;\n\t}", "public function getURL(): string\n {\n return $this->url.$this->apiVersion.'/';\n }", "function get_http_api_url()\n\t{\n\t\treturn str_replace('https:', 'http:', $this->api_url);\n\t}", "public function getApiUrl()\n {\n return $this->fullApiUrl;\n }", "private function _buildUrl() {\n $url = OPENDIGI_API_ENDPOINT;\n $url .= '?Vcollection=' . implode('+', $this->_collections);\n if ($this->_languages)\n $url .= '&Vlanguages=' . implode('+', $this->_languages);\n if ($this->_subjectIds)\n $url .= '&Vsubjectids=' . implode('+', $this->_subjectIds);\n\n return $url;\n }", "public function getApiUrl ()\n {\n return \"https://api.paymill.com/v2/\";\n }", "protected function getApiUrl($action)\n {\n return self::API_BASE_URL.$action;\n }", "protected function buildUrl()\n {\n $basePath = env('SLACK_API_HOST');\n $postUri = \"chat.postMessage\";\n $this->url = $basePath . $postUri;\n }", "public function createUrl(){\n\t\t$urlObj [\"id\"] =KuaiDi100Conf_pub::APPKEY;// $this->appid; //WxPayConf_pub::APPID;\n\t\t$urlObj [\"com\"] = $this->typeCom;\n\t\t$urlObj [\"typeNu\"] = $this->typeNu;\n\t\t$urlObj [\"show\"] = KuaiDi100Conf_pub::SHOW;\n\t\t$urlObj[\"muti\"] = KuaiDi100Conf_pub::MUTI;\n\t\t$urlObj[\"order\"] = KuaiDi100Conf_pub::ORDER;\n\t\t$bizString = $this->formatBizQueryParaMap ( $urlObj, false );\n\t\treturn KuaiDi100Conf_pub::URL . $bizString;\n\t}", "private function _makeApiUrl(string $command): string\n {\n if (strpos($command, '/') === 0) {\n $command = substr($command, 1);\n }\n\n return self::API_URL .\n (strpos($command, self::API_URL_PREFIX) !== 0 ? self::API_URL_PREFIX : '') .\n $command;\n }", "protected function getApiUrl(): string\n {\n return preg_replace($this->regexPattern,$this->currencyDate,$this->apiEndpoint);\n }", "public function getApiUrl()\n {\n return $this->api;\n }", "public static function getBaseApiUrl()\n {\n if (Configuration::get(self::TEST_MODE)) {\n return self::TEST_API;\n }\n\n return self::API;\n }", "private function _generateApiUrl() {\n $this->_detectUserLanguage();\n echo '<script type=\"text/javascript\" src=\"' . self::$apiUrl . '?hl=' . $this->defaultLanguage . '\"></script>';\n }", "function makeUrlFromPostvars($target)\n{\n\tglobal $ATK_VARS;\n\n\tif(count($ATK_VARS ))\n\t{\n\t\t$url = $target.\"?\";\n\t\tforeach ($ATK_VARS as $key => $val)\n\t\t{\n\t\t\t$url .= $key.\"=\".rawurlencode($val).\"&\";\n\t\t}\n\t\treturn $url;\n\t}\n\treturn \"\";\n}", "public abstract function getApiUrl($url);", "private function __apiURL($api = 'conversions') {\n\n switch ($api) {\n\n case 'conversions':\n return $this->__apiBaseUrl.$this->__apiVersion.'/conversions';\n break;\n\n case 'leads':\n return $this->__apiBaseUrl.$this->__apiVersion.'/leads/'.$this->__leadEmail;\n break;\n\n case 'tags':\n return $this->__apiBaseUrl.$this->__apiVersion.'/leads/'.$this->__leadEmail.'/tags';\n break;\n\n case 'generic':\n return $this->__apiBaseUrl.$this->__apiVersion.'/services/'.$this->__apiPrivateToken.'/generic';\n break;\n\n default:\n throw new \\Exception('Unsupported API!');\n break;\n }\n }", "public function getApiUrl()\n\t{\n\t\treturn $this->api_url;\n\t}", "public function getApiUrl(): string\n {\n return $this->apiUrl;\n }", "protected function getDefaultBaseApiUrl()\n {\n return new Uri('https://api.soundcloud.com/');\n }", "protected function apiUrl()\n {\n return '/api/reviews/create';\n }", "public function getUrl()\n {\n return $this->apiUrl;\n }", "function api_url( $path = '' ) {\n\n\treturn home_url( 'api/' . $path );\n\n}", "public function getApiUrl()\n {\n switch ($this->getApiMode()) {\n case Carrier::MODE_PRODUCTION:\n return $this->scopeConfig->getValue(self::XML_PATH_PRODUCTION_API_URL, ScopeInterface::SCOPE_WEBSITES);\n default:\n return $this->scopeConfig->getValue(self::XML_PATH_TESTING_API_URL, ScopeInterface::SCOPE_WEBSITES);\n }\n }", "function DUrl($target, $package = '') {\n return DSettings::$paths['httpUrl'] . (($target == false || $target == null) ? str_replace('.', '/', $package) . '/' : (($package === null || empty($package)) ? '?action=' : str_replace('.', '/', $package) . '/') . $target);\n}", "protected function _getUrl() {\n\t\t\t$this->_url =\timplode('/', array(\n\t\t\t\t$this->_baseUrlSegment,\n\t\t\t\t$this->_apiSegment,\n\t\t\t\timplode('_', array(\n\t\t\t\t\t$this->_type,\n\t\t\t\t\t$this->_language,\n\t\t\t\t\t$this->_locale,\n\t\t\t\t)),\n\t\t\t\t$this->_apiVersionSegment,\n\t\t\t\t$this->controller,\n\t\t\t\t$this->function\t\n\t\t\t));\n\n\t\t\tempty($this->_getFields) ?: $this->_url .= '?' . http_build_query($this->_getFields);\n\t\t}", "function setApiUrl($value)\n {\n $this->_props['ApiUrl'] = $value;\n }", "public function getURL() {\n return $this->apiURL . $this->endPoint . $this->storeID . $this->jsonFile;\n }", "private function genURL($moduleName = null){\n return Yii::app()->params['urlBTAMPAPI'].$moduleName;\n }", "public function buildUrl(string $ip_address, string $req_for) : string\n {\n $url = self::API_BASE_URL;\n $url .= \"/\".$req_for.\"?ip=$ip_address\";\n\n return $url;\n }", "public function testCreateShortUrlWithApiKey()\n {\n $headers = [\n 'x-api-key' => env('API_KEY')\n ];\n\n $data = [\n \"link\" => \"https://www.misteraladin.com/hotel/indonesia/jakarta/kuningan/manhattan-hotel-jakarta?hotel_id=560\"\n ];\n\n $response = $this->json('POST', '/api/shortener-url/create', $data, $headers);\n $response->assertStatus(201)\n ->assertJsonStructure([\n 'shortened_url'\n ]);\n }", "public static function createUrl($end_point, $url_params)\n {\n $url = $end_point . \"?\";\n\n foreach ($url_params as $param => $value) {\n\n $url = $url . $param . \"=\" . $value . \"&\";\n\n }\n\n $url = $url . \"api_key=\" . Config::$api_key;\n\n return $url;\n }", "private function buildUrl(array $config)\n {\n if (!isset($config['resource'])) {\n throw new BadRequestException('Missing resource on JIPAApiComponent->get() method');\n }\n\n $url = $this->apiUrl . $config['resource'] . '/';\n\n if (isset($config['id'])) {\n $url .= $config['id'];\n }\n\n $url .= '?';\n\n if (isset($config['select'])) {\n $url .= 'select=';\n\n foreach ($config['select'] as $key => $value) {\n if ($key != 0) {\n $url .= '%20';\n }\n\n $url .= $value;\n }\n\n $url .= '&';\n }\n\n if (isset($config['filter'])) {\n foreach ($config['filter'] as $key => $value) {\n $url .= $key . '=' . $value;\n }\n\n $url .= '&';\n }\n\n if (isset($config['populate'])) {\n $url .= 'populate=' . $config['populate'];\n }\n\n return $url;\n }", "protected function getApiUrl() {\n\t\treturn $this->_apiurl;\n\t}", "public function createUrl($postfix)\n {\n if(isset($_SERVER['REQUEST_URI'])) {\n $urlPart = explode(\"/\", $_SERVER['REQUEST_URI']);\n array_pop($urlPart);\n $url = 'http://' . $_SERVER['HTTP_HOST'] . implode(\"/\", $urlPart) . \"/api.php\";\n }\n else\n $url = $this::absoluteUrl;\n\n return $url . $postfix;\n }", "abstract protected function buildSpecificRequestUri();", "function permly_api($api_key=''){\n\t\t$this->api_key = $api_key;\n\t\t$this->url = $this->api_server_protocol.\"://\".$this->api_server.\"/?remote_service=rs_external_api&key=1&interface=eai_permly&version=\".$this->api_version;\n\t}", "protected function getBaseApiUrl()\n {\n $customApiUrl = $this->configModel->get('github_frontend_api_url');\n\n if (! empty($customApiUrl)) {\n if (substr($customApiUrl, -1) !== '/') {\n return $customApiUrl.'/';\n }\n\n return $customApiUrl;\n }\n\n return self::DEFAULT_API_URL;\n }", "private function setUrl()\n {\n curl_setopt($this->curl, CURLOPT_URL, $this->server);\n }", "public function getApiUrl()\n {\n return $this->apiUrl;\n }", "public function getApiUrl()\n {\n return $this->apiUrl;\n }", "public function getApiUrl()\n {\n return $this->apiUrl;\n }", "private function getApiUrl()\n {\n if (!empty($this->options['api-url'])) {\n return $this->options['api-url'];\n }\n if (!empty(getenv('WPC_API_URL'))) {\n return getenv('WPC_API_URL');\n }\n return '';\n }", "public static function getApiUrl($type = null)\n {\n $protocol = self::config('protocol');\n $port = self::config('port');\n\n switch ($type) {\n case self::T_API_SCRIPT:\n $hostKey = 'scriptApiHost';\n $versionKey = 'scriptApiVersion';\n break;\n case self::T_API_COMMON:\n default:\n $hostKey = 'apiHost';\n $versionKey = 'apiVersion';\n break;\n }\n $apiHost = self::config($hostKey);\n $apiVersion = self::config($versionKey);\n\n if (($protocol == 'http' && $port == 80) ||\n ($protocol == 'https' && $port == 443)) {\n $port = null;\n }\n\n $url = $protocol . '://' . $apiHost;\n if ($port !== null) {\n $url .= ':' . $port;\n }\n $url .= '/' . $apiVersion . '/';\n return $url;\n }", "protected function apiUrl()\n {\n return '/api/bookings';\n }", "public function getUrl()\n {\n return $this->api\n . '?method='\n . $this->getMethod()\n . '&api_key='\n . $this->getApiKey()\n . '&tags='\n . $this->getTag()\n . '&per_page='\n . $this->getPerPage()\n . '&page='\n . $this->getPage()\n . '&format='\n . $this->getFormat()\n . '&photo_id='\n . $this->getPhotoId()\n . '&nojsoncallback=1';\n }", "private function getBaseUrl(): string\n {\n return $this->agentUrl . self::OPA_API_VER . \"/\";\n }", "public function getRealTargetUri(): string\n {\n }", "private function generateUrl(string $append): string\n {\n return $this->baseUrl . '/services/data/' . $this->clientConfig->getVersion() . '/' . $append;\n }", "function writeUrl() {\n\n }", "function constructURL($object);", "public static function getApiUrl()\n {\n return self::$apiUrl;\n }", "function api_baseurl() {\n if ($_SERVER['SERVER_NAME'] === \"localhost\") {\n $base = \"http://localhost/websites/bop-trips-api/\";\n return $base;\n } else {\n $base = \"http://boptrips.com/api/\";\n return $base;\n }\n}", "public function buildApiUrl($segment = '')\n {\n $this->checkIfEndpointsSet();\n $url = $this->apiEndpoint;\n\n if(!empty($segment)) {\n if(substr($segment, 0, 1) === '/') {\n $url .= $segment;\n } else {\n $url = $url . '/' . $segment;\n }\n }\n\n return $url;\n }", "function generateAPIUrl() {\n return \"https://www.googleapis.com/calendar/v3/calendars/\". calendarId .\"/events?singleEvents=true&timeMax=\". timeMax .\"&timeMin=\". timeMin .\"&key=\". API_KEY;\n}", "public function requestUrl($path) {\n \treturn config('params.server-api') . $path ;\n\t}", "public function getApiUrl() {\n return is_null( $this->_apiUrl ) ? self::API_URL : $this->_apiUrl;\n }", "public static function generateURL()\n {\n return $_SERVER['REQUEST_SCHEME'].'://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];\n }", "public function getApiUrl()\n {\n $return = $this->baseUrl .\n '/' . $this->apiNamespace .\n '/' . $this->apiVersion .\n '/profile?' .\n $this->getPersonalityInsightsQueryVariables();\n\n return $return;\n }", "public function getApiEndpoint();", "function getApiUrl()\n {\n return $this->_props['ApiUrl'];\n }", "public function buildUrl($resource)\n {\n return $this->baseUrl.$resource.'/'.$this->method;\n }", "public function doAPI($url)\n {\n return $url;\n }", "public function getUrl() {\n\t\t$url = $this->getBaseUrl().$this->getBasePath().$this->getOperation();\n\t\t$params = http_build_query($this->getUrlParameters());\n\t\tif ($params) {\n\t\t\t$url .= '?'.$params;\n\t\t}\n\t\treturn $url;\n\t}", "private function buildBaseUrl()\n {\n return $this->scheme() . $this->host;\n }", "public function __construct()\r\n {\r\n $this->constructApiUrl();\r\n }", "protected function changeBaseApi() {\n $domain = $this->language.'.'.$this->engine_supported[$this->engine];\n $this->base_api = sprintf('http://%s/w/api.php?format=json&rawcontinue=1&', $domain);\n }", "function apiURL($rtm_method, $args = array(), $require_sig = true)\n\t{\n\t\t$api_url = 'http://api.rememberthemilk.com/services/rest/';\n\t\t$api_url .= '?method=rtm.' . $rtm_method . '&api_key=' . $this->apikey;\n\t\tif (is_array($args) && count($args) > 0) {\n\t\t\t$api_url .= '&' . http_build_query($args);\n\t\t}\n\t\tif ($require_sig) {\n\t\t\t$api_sig = $this->api_sig($rtm_method,$args);\n\t\t\t$api_sig = md5($api_sig);\n\t\t\t$api_url .= '&api_sig='.$api_sig;\n\t\t}\n\t\treturn $api_url;\n\t}", "private static function assemble_url() {\n\t\t$nerdpress_options = get_option( 'blog_tutor_support_settings' );\n\t\t$cloudflare_zone = $nerdpress_options['cloudflare_zone'];\n\t\tif ( $cloudflare_zone === 'dns1' ) {\n\t\t\tself::$cloudflare_zone = 'cc0e675a7bd4f65889c85ec3134dd6f3';\n\t\t} elseif ( $cloudflare_zone === 'dns2' ) {\n\t\t\tself::$cloudflare_zone = 'c14d1ac2b0e38a6d49d466ae32b1a6d7';\n\t\t} elseif ( $cloudflare_zone === 'dns3' ) {\n\t\t\tself::$cloudflare_zone = '2f9485f19471fe4fa78fb51590513297';\n\t\t} else {\n\t\t\treturn;\n\t\t}\n\t\treturn self::$cloudflare_api_url . self::$cloudflare_api_version . self::$cloudflare_zones_directory . self::$cloudflare_zone . '/';\n\t}", "protected function initiateUrl()\n\t{\n\t\t// base url\n\t\tif($this->app->config->has('app.url'))\n\t\t\t$this->setBase($this->app->config->get('app.url'));\n\n\t\t// asset url\n\t\tif($this->app->config->has('asset.url'))\n\t\t\t$this->setAsset($this->app->config->get('asset.url'));\n\t}", "private function getMedialabApiURL(string $api_method): string {\n\t\treturn $this->api_url . $api_method;\n\t}", "function http_build_url($url = null, $parts = null, $flags = null, ?array &$new_url = null) {}", "public function getUrl(){\n return $this->server->getUrl() . \"/\" . $this->name;\n \n }", "function _request_url($action, $params = null, $format = 'xml') {\n\t\treturn 'http://ws.audioscrobbler.com/1.0/'.$this->_type.'/'.$this->_encode($this->artist).'/'.$this->_encode($this->name).'/'.$action.'.'.$format;\n\n\t}", "public function testBuildURL(){\n $this->assertEquals($this->object\n ->buildURL('get-product-categories',\n array(\n 'type'=>'categorie-name',\n 'search'=>'android'\n )),'http://api.kactoos.com/br/api/products/get-product-categories/format/xml/appname/jaydson/apikey/8f14e45fceea167a5a36dedd4bea2543/type/categorie-name/search/android');\n }", "protected function getDefaultBaseApiUrl()\n {\n return new Uri('https://api.instagram.com/v1/');\n }" ]
[ "0.7228964", "0.71141094", "0.7075931", "0.7009556", "0.6971671", "0.6932797", "0.67965037", "0.6765249", "0.6740785", "0.66934013", "0.66514313", "0.65746", "0.652567", "0.64761025", "0.64601934", "0.6459889", "0.6455813", "0.6418593", "0.6407407", "0.64048755", "0.638533", "0.63819146", "0.6378977", "0.6352699", "0.63490963", "0.63442594", "0.6322704", "0.6305739", "0.6288169", "0.62731814", "0.62705195", "0.6267683", "0.62117064", "0.6208067", "0.6199492", "0.6182959", "0.6161665", "0.615517", "0.61376077", "0.61217105", "0.6117244", "0.60878205", "0.6087725", "0.60562396", "0.6043633", "0.60247195", "0.6016988", "0.60142964", "0.601037", "0.6009057", "0.60087836", "0.6000566", "0.5992961", "0.59446084", "0.59445417", "0.5942036", "0.59165215", "0.5907297", "0.5903481", "0.5893287", "0.5885812", "0.58765215", "0.5875228", "0.58613145", "0.58613145", "0.58613145", "0.5859341", "0.58489424", "0.5847435", "0.5844648", "0.5843135", "0.58408797", "0.58290577", "0.5823266", "0.5822575", "0.5820841", "0.58111703", "0.58052313", "0.58030313", "0.579937", "0.57774127", "0.5772474", "0.57694817", "0.57606065", "0.57590437", "0.5758946", "0.5751127", "0.57493997", "0.57300466", "0.57272017", "0.5722657", "0.571301", "0.5709342", "0.5707171", "0.5706073", "0.5691537", "0.5686893", "0.5679728", "0.56796527", "0.56784296" ]
0.5959884
53
Parse transaction redirect result URL
public function validateResultURL($status) { $this->validateCodes(); if (empty($_GET['transaction_id'])) { return 'Empty transaction id'; } if (empty($_GET['checksum'])) { return 'Empty checksum'; } $text = $_GET['transaction_id'] . $status . $this->merchant_code . $this->passcode; $hash = Security::hashChecksum($text, $this->secret_key); if ($hash !== $_GET['checksum']) { return 'Invalid checksum.'; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function parseURLRequest() {\n\t\t# Redirects the user upon success and redirects to following error-messages upon errors:\n\t\t# 201 - Missing url-entry for the given ID\n\n\t\t$this->parseCustomURL();\t# Let's see if there's an custom-url we gotten our hands on\n\n\t\t$urlID = $this->baseToInt($_GET['u']);\n\t\t$this->verifyID($urlID);\n\n\t\t# assuming everything's good, moving on.\n\t\t\n\t\t$query = $this->db->prepare(\"SELECT `url` FROM urls WHERE `id` = :id\");\n\t\t$query->bindParam(\":id\", $urlID);\n\t\t$query->execute();\n\t\t\n\t\t$data = $query->fetch();\n\t\t\n\t\tif(!isset($data['url'])) {\n\t\t\t$this->debugLog(\"The database did not return any URL for ID {$_GET['u']}\");\n\t\t\theader(\"Location:{$this->siteURL}error/201\");\n\t\t\tdie;\n\t\t}\n\t\telse {\n\t\t\t$this->debugLog(\"Redirecting to {$data['url']}\");\n\t\t\t$this->logUrlClick($urlID);\n\t\t\theader(\"HTTP/1.1 301 Moved Permanently\");\n\t\t\theader(\"Location: {$data['url']}\"); # Should we use URL-encode here?\n\t\t\tdie;\n\t\t}\n\t}", "public function getRedirectUrl();", "public function getRedirectUrl();", "public function getRedirectUrl();", "public function getRedirectUrl();", "public function getRedirectUrl();", "public function getRedirectUrl(): string;", "public function getSuccessUrl();", "abstract protected function getRedirectUrl(): Url;", "public function GetRedirect ();", "protected function getRedirectUrl()\n {\n $sBaseUrl = Registry::getConfig()->getCurrentShopUrl().'index.php?cl=order&fnc=handleMollieReturn';\n\n return $sBaseUrl.$this->mollieGetAdditionalParameters();\n }", "public function getRedirectUrl()\n {\n }", "public function getRedirectUri();", "public function getRedirectUri();", "public function getRedirectUrl()\r\n\t{\r\n\t\treturn $this->payment->links[1]->getHref();\r\n\t}", "public function getRedirectUri(): string;", "public function getRedirects();", "function get_final_url($url){\n\t\t$redirects = get_all_redirects($url);\n\t\tif (count($redirects)>0){\n\t\t\treturn array_pop($redirects);\n\t\t} else {\n\t\t\treturn $url;\n\t\t}\n\t}", "public function RedirectURL(){\n //echo Director::baseURL();exit(); \n return urlencode(Director::baseURL().$this->request->getURL(true));\n }", "function get_final_url($url){\n\t$redirects = get_all_redirects($url);\n\tif (count($redirects)>0){\n\t\treturn array_pop($redirects);\n\t} else {\n\t\treturn $url;\n\t}\n}", "private function resolveURLResults($url_results) {\r\n\t\tif (!isset($url_results) || count($url_results) < 1) return null;\r\n\r\n\t\t$ok_url_result = $fail_url_result = $redirect_url_result = null;\r\n\r\n\t\tforeach (array_reverse($url_results) as $url_result) {\r\n\t\t\tif ($url_result->hasSuccessHTTPStatus()) {\r\n\t\t\t\tif ( ! $ok_url_result) \r\n\t\t\t\t\t$ok_url_result = $url_result;\t\t\t\t\r\n\t\t\t}\r\n\t\t\t# If the URL had a redirect status, then we set that result type\r\n\t\t\telse if ($url_result->hasRedirectHTTPStatus()) {\r\n\t\t\t\tif (!$redirect_url_result) \r\n\t\t\t\t\t$redirect_url_result = $url_result;\r\n\t\t\t}\r\n\t\t\t# Only set a failure result if it didn't have success or redirect status code\r\n\t\t\telse if (!$fail_url_result)\r\n\t\t\t\t$fail_url_result = $url_result;\r\n\t\t}\r\n\r\n\t\t# Start with the result from our initial url\r\n\t\t$return_url = $url_results[0];\r\n\r\n\t\t# Following that, we will take any status=200 link\r\n\t\tif (isset($ok_url_result))\r\n\t\t\t$return_url = $ok_url_result;\r\n\t\t# Better to end in an HTTP failure than a redirect\r\n\t\telse if (isset($fail_url_result)) \r\n\t\t\t$return_url = $fail_url_result;\r\n\t\t# We will still take the deepest redirect found if needed\r\n\t\telse if (isset($redirect_url_result))\r\n\t\t\t$return_url = $redirect_url_result;\r\n\t\t# Reset everything so that we start with a clean slate, cookie jar, etc. next time\r\n\t\t$this->closeCurl();\r\n\r\n\t\tif ($this->is_debug)\r\n\t\t\tprint ' |> ' . $return_url->getURL() . ' ' . $return_url->debugStatus() . \"\\n\\n\";\r\n\r\n\t\treturn $return_url;\r\n\t}", "public function getUrl() {\n return $this->_gatewayRedirect->getUrl ();\n }", "protected function processRedirect() {}", "function get_final_url($xid){\n\t$base_url = 'http://www.swarthmore.edu/';\n\t$url = $base_url . $xid; \n\t$ch = curl_init();\n\tcurl_setopt($ch, CURLOPT_URL, $url);\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n\tcurl_setopt($ch, CURLOPT_HEADER, 0);\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\tcurl_setopt($ch, CURLOPT_AUTOREFERER, 1);\n\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n\tcurl_setopt($ch, CURLOPT_MAXREDIRS, 5);\n\tcurl_setopt($ch, CURLOPT_TIMEOUT, 30);\n\tcurl_exec ($ch);\n\treturn str_replace($base_url, '', curl_getinfo($ch, CURLINFO_EFFECTIVE_URL));\n}", "public function getRedirectUrl()\n {\n return $this->request->getTestMode()\n ? 'https://sslpayment.cathaybkdev.com.tw/EPOSService/Payment/OrderInitial.aspx'\n : 'https://sslpayment.uwccb.com.tw/EPOSService/Payment/OrderInitial.aspx';\n }", "protected function getRedirectUrl()\n\t{\n if ($customURL = $this->input->getBase64('returnurl', ''))\n {\n $customURL = base64_decode($customURL);\n }\n\n $url = !empty($customURL) ? $customURL : 'index.php?option='\n . $this->container->componentName\n . '&view='\n . $this->container->inflector->pluralize($this->view)\n . $this->getItemidURLSuffix(); // e.g. '&Itemid=123' or an empty string if no Itemid\n\n return $url;\n }", "private function getRedirectUrl()\n {\n return $this->getConfigData('url');\n }", "abstract protected function get_redirect_page();", "public function validateSuccessURL() {\r\n return $this->validateResultURL(self::SUCCESS_STATUS);\r\n }", "function getReturnURL() {\n\t\t$data = $this->getAll();\n\t\t$returnURL = array();\n\t\tforeach($data as $key => $value) {\n\t\t\tif(stripos($key, 'return') === 0 && !empty($value) && $value != '/') {\n\t\t\t\tif($key == 'returnsearch_params' && $value == '\"\"') continue;\n\t\t\t\t$newKey = str_replace('return','',$key);\n\t\t\t\t$returnURL[$newKey] = $value;\n\t\t\t}\n\t\t}\n\t\treturn http_build_query($returnURL);\n\t}", "static function get_final_url($url)\n\t\t{\n\t\t\t$redirects = CUtils::get_all_redirects($url);\n\t\t\tif (count($redirects)>0)\n\t\t\t{\n\t\t\t\treturn array_pop($redirects);\n\t\t\t} \n\t\t\telse \n\t\t\t{\n\t\t\t\treturn $url;\n\t\t\t}\n\t\t}", "public function getRedirectUrl() {\n return (string) $this->getValue('redirect_url');\n }", "function getRedirectUrl()\r\n\t{\r\n\t\treturn $this->redirect_url;\r\n\t}", "private function getIdFromRedirectedUrl(): string\n {\n $url = $this->getResponse()\n ->getHeader('Location')\n ->getFieldValue();\n $pattern = '!/id/(.*?)/!';\n $result = preg_match($pattern, $url, $matches);\n\n return $result ? $matches[1] : '';\n }", "function get_redirect_url($url){\n\t\t$redirect_url = null; \n\t \n\t\t$url_parts = @parse_url($url);\n\t\tif (!$url_parts) return false;\n\t\tif (!isset($url_parts['host'])) return false; //can't process relative URLs\n\t\tif (!isset($url_parts['path'])) $url_parts['path'] = '/';\n\t \n\t\t$sock = fsockopen($url_parts['host'], (isset($url_parts['port']) ? (int)$url_parts['port'] : 80), $errno, $errstr, 30);\n\t\tif (!$sock) return false;\n\t \n\t\t$request = \"HEAD \" . $url_parts['path'] . (isset($url_parts['query']) ? '?'.$url_parts['query'] : '') . \" HTTP/1.1\\r\\n\"; \n\t\t$request .= 'Host: ' . $url_parts['host'] . \"\\r\\n\"; \n\t\t$request .= \"Connection: Close\\r\\n\\r\\n\"; \n\t\tfwrite($sock, $request);\n\t\t$response = '';\n\t\twhile(!feof($sock)) $response .= fread($sock, 8192);\n\t\tfclose($sock);\n\t \n\t\tif (preg_match('/^Location: (.+?)$/m', $response, $matches)){\n\t\t\tif ( substr($matches[1], 0, 1) == \"/\" )\n\t\t\t\treturn $url_parts['scheme'] . \"://\" . $url_parts['host'] . trim($matches[1]);\n\t\t\telse\n\t\t\t\treturn trim($matches[1]);\n\t \n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t \n\t}", "function RedirectLoanprofileurl() {\n\t$RequestUrl = $_SERVER['REQUEST_URI'];\n\t$parsedurl = parse_url($RequestUrl);\n\tif(isset($parsedurl['query'])) {\n\t\tparse_str($parsedurl['query'], $qryStr); \n\t\tif(isset($qryStr['p']) && $qryStr['p']==14 && isset($qryStr['u']) && isset($qryStr['l'])) {\n\t\t\t$loanprurl = getLoanprofileUrl($qryStr['u'], $qryStr['l']);\n\t\t\tunset($qryStr['p']);\n\t\t\tunset($qryStr['u']);\n\t\t\tunset($qryStr['l']);\n\t\t\t$qrystrToAppnd = http_build_query($qryStr);\n\t\t\tif(!empty($qrystrToAppnd)) {\n\t\t\t\t$urlMovedto = SITE_URL.$loanprurl.\"?\".$qrystrToAppnd;\n\t\t\t}else {\n\t\t\t\t$urlMovedto = SITE_URL.$loanprurl;\n\t\t\t}\n\t\t\theader(\"HTTP/1.1 301 Moved Permanently\");\n\t\t\theader(\"Location: \".$urlMovedto);\n\t\t\texit;\n\t\t}\n\t}\n}", "abstract public function getRawRequestUrl();", "function _url_final_redirect( $url ) {\n\t\treturn IMFORZA_Utils::url_final_redirect( $url );\n\t}", "public function getRedirectUrl()\n {\n\n if ($brandCode = $this->getBrandCode()) {\n return 'https://test.adyen.com/hpp/skipDetails.shtml';\n } else {\n return 'https://test.adyen.com/hpp/pay.shtml';\n }\n }", "public function getRedirectURL()\n {\n return $this->redirectURL;\n }", "abstract protected function getTokenUrl();", "public function getRedirectUrl(): string\n {\n return $this->redirectUrl;\n }", "public function getRedirectUrl()\r\n {\r\n return \"{$this->data['redirect_url']}?session={$this->data['session']}\";\r\n }", "abstract public function getPaymentPageUrl();", "public function getRedirect()\n {\n return $this->secureInput($_GET['redirect']);\n }", "public function getRedirectUrl() {\n return $this->redirectUrl;\n }", "function parseUrl($origin) {\n preg_match('<http.+/post/\\d+>', $origin, $new);\n\n return $new[0];\n}", "public function getReturnUrl()\n {\n return $this->_getUrl(self::URL_REDIRECT);\n }", "public function parseURL()\n {\n if (isset($_GET['url'])) {\n $url = rtrim($_GET['url'], '/'); //menghapus tanda / di akhir url\n $url = filter_var($url, FILTER_SANITIZE_URL);//memfilter url dari karakter aneh (hack)\n $url = explode('/', $url); //memecah url yang diinput dengan delimiter / dan menjadikannya array\n return $url;\n }\n }", "public function getOrderPlaceRedirectUrl()\n {\n return Mage::getUrl('postfinancecheckout/transaction/redirect', array(\n '_secure' => true\n ));\n }", "public function getRedirectUrl()\n {\n return $this->redirectUrl;\n }", "public function getRedirectUrl()\n {\n return $this->redirectUrl;\n }", "public function getRedirectUrl()\n {\n return $this->redirectUrl;\n }", "public function transactionFormGetActionURI ();", "public function getRedirectURI() {\n return $this->request->query->get(\"redirect_uri\") != NULL ? $this->request->query->get(\"redirect_uri\") : ($this->request->query->get(\"state\") != NULL ? $this->request->query->get(\"state\") : \"\");\n }", "function get_url_redirected($url)\n{\n $url_list = array();\n $url_list[] = $url;\n\n $ch = curl_init();\n if (false === $ch) {\n curl_close($ch);\n throw new Exception(\"Bad request url in get_url: $url\", 1);\n }\n\n for ($redirects = 0; follow_redirects($ch, $url_list); ++$redirects) {}\n $url = end($url_list);\n\n curl_close($ch);\n\n return $url;\n}", "function get_redirect_url($url){\n global $cookie;\n\t$redirect_url = null; \n \n\t$url_parts = @parse_url($url);\n\tif (!$url_parts) return false;\n\tif (!isset($url_parts['host'])) return false; //can't process relative URLs\n\tif (!isset($url_parts['path'])) $url_parts['path'] = '/';\n \n\t$sock = fsockopen($url_parts['host'], (isset($url_parts['port']) ? (int)$url_parts['port'] : 80), $errno, $errstr, 30);\n\tif (!$sock) return false;\n \n\t$request = \"HEAD \" . $url_parts['path'] . (isset($url_parts['query']) ? '?'.$url_parts['query'] : '') . \" HTTP/1.1\\r\\n\"; \n\t$request .= 'Host: ' . $url_parts['host'] . \"\\r\\n\"; \n\t$request .= 'Cookie: ' . $cookie . \"\\r\\n\"; \n\t$request .= \"Connection: Close\\r\\n\\r\\n\"; \n\tfwrite($sock, $request);\n\t$response = '';\n\twhile(!feof($sock)) $response .= fread($sock, 8192);\n\tfclose($sock);\n\n\tif (preg_match('/^Location: (.+?)$/m', $response, $matches)){\n\t\tif ( substr($matches[1], 0, 1) == \"/\" )\n\t\t\treturn $url_parts['scheme'] . \"://\" . $url_parts['host'] . trim($matches[1]);\n\t\telse\n\t\t\treturn trim($matches[1]);\n \n\t} else {\n\t\treturn $url;\n\t}\n \n}", "public function getRedirectUrl()\n {\n return $this->_redirectUrl;\n }", "public function getRedirectUrl()\n {\n return $this->_redirectUrl;\n }", "public function getRedirectUrl()\n {\n return $this->_redirectUrl;\n }", "protected function getRedirectUrl()\n {\n return null;\n }", "public function generateRedirectResponse();", "public function getResultUrl(){\n return $this->viewUrl;\n }", "protected function getRedirectUrl(): string\n\t{\n\t\tif($this->input === null)\n\t\t{\n\t\t\treturn $this->urlBuilder->current();\n\t\t}\n\n\t\treturn $this->input->getRedirectUrl();\n\t}", "public function getOrderPlaceRedirectUrl()\n {\n $info = $this->getInfoInstance();\n\n return $info->getAdditionalInformation(self::REDIRECT_URL_KEY);\n }", "public function getRedirectUrl() : string\n {\n return '';\n }", "abstract protected function token_url();", "abstract public function getAuthUrlComponents();", "function RedirectUserprofileurl() {\n\t$reqUrl = $_SERVER['REQUEST_URI'];\n\t$parsedurl = parse_url($reqUrl);\n\t\tif(isset($parsedurl['query'])) {\n\t\tparse_str($parsedurl['query'], $qryStr); \n\t\tif(isset($qryStr['p']) && $qryStr['p']==12 && isset($qryStr['u'])) {\n\t\t\t$prurl = getUserProfileUrl($qryStr['u']);\n\t\t\tunset($qryStr['p']);\n\t\t\tunset($qryStr['u']);\n\t\t\t$qrystrToAppnd = http_build_query($qryStr);\n\t\t\tif(!empty($qrystrToAppnd)) {\n\t\t\t\t$urlMovedto = SITE_URL.$prurl.\"?\".$qrystrToAppnd;\n\t\t\t}else {\n\t\t\t\t$urlMovedto = SITE_URL.$prurl;\n\t\t\t}\n\t\t\theader(\"HTTP/1.1 301 Moved Permanently\");\n\t\t\theader(\"Location: \".$urlMovedto);\n\t\t\texit;\n\t\t}\n\t}\n}", "public function getOrderPlaceRedirectUrl()\r\n {\r\n \t$result = false;\r\n \t$session = Mage::getSingleton('checkout/session');\r\n \t$nVersion = $this->getVersion();\r\n \t$mode = $this->getConfigData('mode');\r\n \t\r\n \tif($session->getMd() &&\r\n \t\t$session->getAcsurl() &&\r\n \t\t$session->getPareq())\r\n \t{\r\n \t\t// Direct (API) for 3D Secure payments\r\n \t\tif($nVersion >= 1410)\r\n\t \t{\r\n\t\t \t// need to re-add the ordered item quantity to stock as per not completed 3DS transaction\r\n\t\t \tif($mode != Paymentsense_Paymentsensegateway_Model_Source_PaymentMode::PAYMENT_MODE_TRANSPARENT_REDIRECT)\r\n\t\t \t{\r\n\t\t \t\t$order = Mage::getModel('sales/order')->load(Mage::getSingleton('checkout/session')->getLastOrderId());\r\n\t\t \t\t$this->addOrderedItemsToStock($order);\r\n\t\t \t}\r\n\t \t}\r\n \t\t\r\n \t\t$result = Mage::getUrl('paymentsensegateway/payment/threedsecure', array('_secure' => true));\r\n \t}\r\n \tif($session->getHashdigest())\r\n \t{\r\n \t\t// Hosted Payment Form and Transparent Redirect payments\r\n \t\tif($nVersion >= 1410)\r\n\t \t{\r\n\t\t \t// need to re-add the ordered item quantity to stock as per not completed 3DS transaction\r\n\t\t \tif(!Mage::getSingleton('checkout/session')->getPares())\r\n\t\t \t{\r\n\t\t \t\t$order = Mage::getModel('sales/order')->load(Mage::getSingleton('checkout/session')->getLastOrderId());\r\n\t\t \t\t$this->addOrderedItemsToStock($order);\r\n\t\t \t}\r\n\t \t}\r\n \t\r\n \t\t$result = Mage::getUrl('paymentsensegateway/payment/redirect', array('_secure' => true));\r\n \t}\r\n \r\n return $result;\r\n }", "public function getOrderPlaceRedirectUrl()\n\t{\n return Mage::getUrl('hostedpayments/processing/pay');\n\t}", "public function redirecturl()\n\t\t\t{\n\t\t\t\tif($this->fields_arr['pcakey'])\n\t\t\t\t Redirect2URL($_SESSION['pcakey'][$this->fields_arr['pcakey']]);\n\t\t\t}", "function getRedirectLocation($response){\n\tif(preg_match(\"~Location: (.+)\\r\\n~\", $response, $match)){\n\t\treturn $match[1];\n\t}\n\n\t_log(\"getRedirectLocation: unparsable HTTP headers\", true);\n\treturn false;\n}", "protected function followRedirect()\n\t\t{\n\t\t\tif (!$this->followRedirect)\n\t\t\t\treturn false; /* disabled */\n\t\t\tif (!isset($this->responseHeaders['Location']) || !is_string($this->responseHeaders['Location'])) {\n\t\t\t\tSERIA_Base::debug('HTTP protocol violation: No location header with response code: '.$this->responseCode);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$redirectPoint = $this->url;\n\t\t\t$location = $this->responseHeaders['Location'];\n\n\t\t\tif(strpos($location, '://')===false)\n\t\t\t{ // handling illegal redirects (Location: /path)\n\t\t\t\t$pi = parse_url($this->url);\n\t\t\t\t$location = $pi['scheme'].'://'.$pi['host'].$location;\n\t\t\t}\n\n\t\t\tif ($this->responseCode == 301 || $this->responseCode == 307) {\n\t\t\t\t/*\n\t\t\t\t * Check whether this is a post request:\n\t\t\t\t */\n\t\t\t\tif (isset($this->currentRequest['postFields']) && $this->currentRequest['postFields'])\n\t\t\t\t\t$post = $this->currentRequest['postFields'];\n\t\t\t\telse {\n\t\t\t\t\tif (isset($this->currentRequest['postFiles']) && $this->currentRequest['postFiles'])\n\t\t\t\t\t\t$post = true;\n\t\t\t\t\telse\n\t\t\t\t\t\t$post = false;\n\t\t\t\t}\n\t\t\t\tif (isset($this->currentRequest['postFiles']) && $this->currentRequest['postFiles'])\n\t\t\t\t\t$postFiles = $this->currentRequest['postFiles'];\n\t\t\t\telse\n\t\t\t\t\t$postFiles = array();\n\t\t\t} else {\n\t\t\t\t$post = false;\n\t\t\t\t$postFiles = array();\n\t\t\t}\n\t\t\t$connectToHost = false;\n\t\t\t$port = false;\n\t\t\t$from = parse_url($redirectPoint);\n\t\t\t$to = parse_url($location);\n\t\t\tif ($from['scheme'] == $to['scheme'] && $from['host'] == $to['host'] && $from['port'] == $to['port']) {\n\t\t\t\tif (isset($this->currentRequest['connectToHost']))\n\t\t\t\t\t$connectToHost = $this->currentRequest['connectToHost'];\n\t\t\t\t$port = $this->currentRequest['port'];\n\t\t\t}\n\t\t\t$this->navigateTo($location, $post, $connectToHost, $port);\n\t\t\tforeach ($postFiles as $name => $file)\n\t\t\t\t$this->postFile($name, $file);\n\t\t\tif ($this->responseCode == 301)\n\t\t\t\t$this->movedPermanently[$redirectPoint] = $location;\n\t\t\treturn true;\n\t\t}", "abstract public function getCallUrl();", "function redirectURL()\n{\n\t$redirect = '';\n\t$loc = Configuration::get('LoginRadius_redirect');\n\tif ($loc == 'profile')\n\t\t$redirect = 'my-account.php';\n\telseif ($loc == 'url')\n\t{\n\t\t$custom_url = Configuration::get('redirecturl');\n\t\t$redirect = !empty($custom_url) ? $custom_url : 'my-account.php';\n\t}\n\telse\n\t{\n\t\tif (Tools::getValue('back'))\n\t\t{\n\t\t\tif (_PS_VERSION_ >= 1.6)\n\t\t\t{\n\t\t\t\t$loc = $_SERVER['REQUEST_URI'];\n\t\t\t\t$redirect_location = explode('back=', $loc);\n\t\t\t\t$redirect = $redirect_location['1'];\n\t\t\t}\n\t\t\telse\n\t\t\t\t$redirect = Tools::getValue('back');\n\t\t}\n\t\telseif (empty($redirect))\n\t\t{\n\t\t\t$http = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'Off' && !empty($_SERVER['HTTPS'])) ? 'https://' : 'http://');\n\t\t\t$redirect = urldecode($http.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);\n\t\t}\n\t}\n\treturn $redirect;\n}", "public function get_redirects()\n\t{\n\t\treturn $this->db->get($this->_table['redirects'])->result();\n\t}", "protected function fetchRedirectUrl ($mProductId) {\n return \"http://www.klarna.com\";\n }", "public function getOrderPlaceRedirectUrl()\n {\n return Mage::getUrl('pagseguro/payment/request');\n }", "public function get_redirect_to() {\n\t\treturn empty( $this->data['redirect_to'] ) ? '' : $this->data['redirect_to'];\n\t}", "public function redirect_get($account, $redirect){\n\t\t$app = $this->app;\n\t\t$app->response->headers->set('Content-Type', 'text/html; charset=UTF-8');\n\t\t$app->response->headers->set('Cache-Control', 'no-cache, must-revalidate');\n\t\t$app->response->headers->set('Expires', 'Fri, 12 Aug 2011 14:57:00 GMT');\n\t\t$url = base64_decode($redirect).'?wechat_account='.$account.'&wechat_response='.base64_encode(json_encode($_GET));\n\t\techo '\n\t\t\t<script>\n\t\t\t\twindow.location.href = \"'.$url.'\";\n\t\t\t</script>\n\t\t';\n\t\treturn true;\n\t}", "public function parseUrl(){\n\n if(isset($_GET['url'])){\n //echo $_GET['url'];\n\n return $url = explode('/',filter_var(rtrim($_GET['url'], '/'), FILTER_SANITIZE_URL));\n }\n }", "public function parseURL()\n {\n $url = $_GET['url']; // localhost/HornyMVC/admin/erfds/sd/ds -> $url = admin/erfds/sd/ds\n\n $url = explode('/', trim($url));\n\n $url = array_slice($url, array_search(\"HornyMVC\", $url) ? array_search(\"HornyMVC\", $url) + 1 : 0);\n\n return $url;\n }", "public function GetRedirect () {\n\t\treturn $this->redirect;\n\t}", "protected function getSuccessLocation() {\n\t\treturn $_SERVER['HTTP_REFERER'];\n\t}", "public function parse($url) {\r\n\t\tif ($params = parent::parse($url)) {\r\n\t\t\t$this->options += array(\r\n\t\t\t\t'permanent' => true,\r\n\t\t\t);\r\n\t\t\t$this->redirect($params);\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public function getOrderPlaceRedirectUrl()\n {\n return Mage::getUrl('paynovapayment/processing/payment');\n }", "public function successResponse($response)\n {\n // $response = 'https://phpdark.com/payment/success/id=4/?merchant=683002007104225&order_id=EBSXGJ5OYQCRO7D&payment_ref_id=MTEyOTAwMjY1NDMxNi42ODMwMDIwMDcxMDQyMjUuRUJTWEdKNU9ZUUNSTzdELmExODVkYWE4MDAyMDEyM2ZlYzRl&status=Success&status_code=00_0000_000&message=Successful%20Transaction&payment_dt=20201129002747&issuer_payment_ref=MTEyOTAwMjY1NDMxNi42ODMwMDIwMDcxMDQyMjUuRUJTWEdKNU9ZUUNSTzdELmExODVkYWE4MDAyMDEyM2ZlYzRl';\n $parts = parse_url($response);\n parse_str($parts['query'], $query);\n return $query;\n }", "function get_effective_url()\n\t{\n\t\t//最后一个有效的url地址\n\t\treturn curl_getinfo($this->ch, CURLINFO_EFFECTIVE_URL);\n\t}", "public function getLastPageUrl();", "function fn_assist_get_payment_url($processor_data)\n{\n return filter_var(\n trim(\n $processor_data['processor_params']['mode'] === 'L'\n ? $processor_data['processor_params']['payment_url_live']\n : $processor_data['processor_params']['payment_url_test'],\n \" \\t\\n\\r\\0\\x0B/\"\n ),\n FILTER_VALIDATE_URL,\n array('options' => array('default' => 'https://payments.demo.paysecure.ru'))\n );\n}", "public function getResponseFromInitialPaymentCall($response){\n\n\n if (!empty($response)) {\n $status = $response->status;\n\n if(!$status->isSuccess){ // check if response return any error.\n\n $error=$status->statusMessage;\n Mage::throwException(\"$error\");\n }\n if(($response->status->errorNumber == 0) && (!empty($response->url))){\n return $response->url;\n }\n }\n }", "public function getFailureUrl();", "public function returnUrl(): string\n {\n return Request::url() . '?' . http_build_query([\n 'return' => 'return',\n 'oc-mall_payment_id' => $this->getPaymentId(),\n ]);\n }", "public function processUrl(){\n\t\t\n\t\tif (isset($_GET['url'])) {\n\t\t\treturn $url = explode('/',filter_var(rtrim($_GET['url'],'/'),FILTER_SANITIZE_URL));//what we're doing here is attempting to filter the url to make it clean and easy to use in our case we're going to explode the url into an array.\n\t\t}\n\n\n\t}", "public function getExecuteUrl()\r\n\t{\r\n\t\treturn $this->payment->links[2]->getHref();\r\n\t}", "public function getRedirect()\n {\n $url = null;\n $campaigns = $this->getCampaigns();\n\n if (!empty($campaigns) && $campaigns->hasRedirect()) {\n $url = $campaigns->getRedirectUrl();\n }\n\n return $url;\n }", "function get_location($url) {\r\n $config = $this->config;\r\n $my_ch = curl_init();\r\n if ($config['multipleIPs'] === true) {\r\n curl_setopt($my_ch, CURLOPT_INTERFACE, $this->outgoing_ip);\r\n }\r\n curl_setopt($my_ch, CURLOPT_URL, $url);\r\n curl_setopt($my_ch, CURLOPT_HEADER, true);\r\n curl_setopt($my_ch, CURLOPT_NOBODY, true);\r\n curl_setopt($my_ch, CURLOPT_RETURNTRANSFER, true);\r\n curl_setopt($my_ch, CURLOPT_TIMEOUT, 10);\r\n $r = curl_exec($my_ch);\r\n foreach (explode(\"\\n\", $r) as $header) {\r\n if (strpos($header, 'Location: ') === 0) {\r\n return trim(substr($header, 10));\r\n }\r\n }\r\n return '';\r\n }", "public function getCheckoutRedirectUrl()\n {\n return Mage::getUrl('radial_paypal_express/checkout/start');\n }", "function follow_redirects(&$ch, &$url_array)\n{\n if (!is_array($url_array)) {\n throw new Exception('follow_redirects array required', 1);\n }\n $last_url = end($url_array);\n if (false === $last_url) {\n throw new Exception('follow_redirects empty array', 1);\n }\n\n $options = array(\n CURLOPT_URL => $last_url,\n CURLOPT_CONNECTTIMEOUT => 120,\n //CURLOPT_COOKIEFILE => $this->cookie_jar_path, /* make sure you provide FULL PATH to cookie files*/\n CURLOPT_FOLLOWLOCATION => false, // We want to just get redirect url but not to follow it.\n CURLOPT_HEADER => true, // We'll parse redirect url from header.\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_TIMEOUT => 120,\n CURLOPT_NOBODY => true, //exclude the body from the output\n );\n $allswell = curl_setopt_array($ch, $options);\n if (false === $allswell) {\n throw new Exception('follow_redirects failed to set curl options', 1);\n }\n $response = curl_exec($ch);\n\n preg_match_all('/^Location:(.*)$/mi', $response, $matches);\n if (empty($matches[1])) {\n $redirected = false;\n } else {\n $redirected = true;\n $url_array[] = trim($matches[1][0]); // append the url redirected to to the array\n }\n\n return $redirected;\n}" ]
[ "0.61955774", "0.6188728", "0.6188728", "0.6188728", "0.6188728", "0.6188728", "0.60653955", "0.5990395", "0.5975536", "0.59262735", "0.5919954", "0.59146416", "0.5910312", "0.5910312", "0.5889769", "0.5808984", "0.5751311", "0.56851184", "0.5658237", "0.56554747", "0.56363785", "0.5632753", "0.5624743", "0.5613444", "0.5609477", "0.56040484", "0.5565387", "0.5554116", "0.55403924", "0.5498481", "0.5485148", "0.548444", "0.5446545", "0.54449284", "0.5440549", "0.5432675", "0.54205817", "0.5404805", "0.5392218", "0.53895706", "0.5379366", "0.53720164", "0.53670114", "0.53409797", "0.5336439", "0.53344476", "0.533325", "0.53159195", "0.53157777", "0.5314514", "0.5302", "0.5302", "0.5290067", "0.5278002", "0.527757", "0.5274026", "0.5271477", "0.5264965", "0.5264965", "0.5264965", "0.5263753", "0.5262481", "0.5258917", "0.52556217", "0.5250301", "0.52476966", "0.52452266", "0.5236278", "0.52253145", "0.5205271", "0.5192265", "0.5183842", "0.5173238", "0.5163721", "0.5162367", "0.5154852", "0.5136631", "0.5128299", "0.5121852", "0.51148045", "0.5113704", "0.51073486", "0.51063764", "0.50961894", "0.50898236", "0.5087109", "0.50858825", "0.50837046", "0.5082863", "0.5081587", "0.5077555", "0.5066646", "0.50637656", "0.5061587", "0.5059413", "0.5056522", "0.5045551", "0.5038066", "0.50367844", "0.50279194" ]
0.530772
50
Parse transaction redirect success URL
public function validateSuccessURL() { return $this->validateResultURL(self::SUCCESS_STATUS); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSuccessUrl();", "public function getRedirectUrl();", "public function getRedirectUrl();", "public function getRedirectUrl();", "public function getRedirectUrl();", "public function getRedirectUrl();", "protected function getSuccessLocation() {\n\t\treturn $_SERVER['HTTP_REFERER'];\n\t}", "public function getRedirectUrl()\r\n\t{\r\n\t\treturn $this->payment->links[1]->getHref();\r\n\t}", "public function getRedirectUrl(): string;", "private function parseURLRequest() {\n\t\t# Redirects the user upon success and redirects to following error-messages upon errors:\n\t\t# 201 - Missing url-entry for the given ID\n\n\t\t$this->parseCustomURL();\t# Let's see if there's an custom-url we gotten our hands on\n\n\t\t$urlID = $this->baseToInt($_GET['u']);\n\t\t$this->verifyID($urlID);\n\n\t\t# assuming everything's good, moving on.\n\t\t\n\t\t$query = $this->db->prepare(\"SELECT `url` FROM urls WHERE `id` = :id\");\n\t\t$query->bindParam(\":id\", $urlID);\n\t\t$query->execute();\n\t\t\n\t\t$data = $query->fetch();\n\t\t\n\t\tif(!isset($data['url'])) {\n\t\t\t$this->debugLog(\"The database did not return any URL for ID {$_GET['u']}\");\n\t\t\theader(\"Location:{$this->siteURL}error/201\");\n\t\t\tdie;\n\t\t}\n\t\telse {\n\t\t\t$this->debugLog(\"Redirecting to {$data['url']}\");\n\t\t\t$this->logUrlClick($urlID);\n\t\t\theader(\"HTTP/1.1 301 Moved Permanently\");\n\t\t\theader(\"Location: {$data['url']}\"); # Should we use URL-encode here?\n\t\t\tdie;\n\t\t}\n\t}", "public function getRedirectUrl()\n {\n }", "public function GetRedirect ();", "public function getRedirectUrl()\n {\n return $this->request->getTestMode()\n ? 'https://sslpayment.cathaybkdev.com.tw/EPOSService/Payment/OrderInitial.aspx'\n : 'https://sslpayment.uwccb.com.tw/EPOSService/Payment/OrderInitial.aspx';\n }", "private function getDefaultSuccessPageUrl()\n {\n\t\tif(\\Cart2Quote\\License\\Model\\License::getInstance()->isValid()) {\n\t\t\treturn $this->urlBuilder->getUrl('quotation/quote/success/');\n\t\t}\n\t}", "public function RedirectURL(){\n //echo Director::baseURL();exit(); \n return urlencode(Director::baseURL().$this->request->getURL(true));\n }", "function _url_final_redirect( $url ) {\n\t\treturn IMFORZA_Utils::url_final_redirect( $url );\n\t}", "protected function getRedirectUrl()\n {\n $sBaseUrl = Registry::getConfig()->getCurrentShopUrl().'index.php?cl=order&fnc=handleMollieReturn';\n\n return $sBaseUrl.$this->mollieGetAdditionalParameters();\n }", "public function getRedirectUri();", "public function getRedirectUri();", "abstract protected function getRedirectUrl(): Url;", "public function getRedirectUri(): string;", "public static function get_redirect_on_success($values, $args) {\n\n if (!empty($values['next-zone']) && !empty($values['next-transect']))\n return $args['redirect_on_success'] . '?' . data_entry_helper::array_to_query_string(array(\n 'table' => 'sample',\n 'id'=>$values['sample:parent_id'],\n 'zone'=>$values['next-zone'],\n 'transect'=>$values['next-transect']\n ));\n else\n return $args['front_page_path'];\n }", "protected function processRedirect() {}", "protected function defaultSuccessUrl()\n {\n return $this->user->getReturnUrl();\n }", "function getRedirectUrl()\r\n\t{\r\n\t\treturn $this->redirect_url;\r\n\t}", "public function getRedirectUrl()\r\n {\r\n return \"{$this->data['redirect_url']}?session={$this->data['session']}\";\r\n }", "abstract protected function get_redirect_page();", "function get_final_url($url){\n\t\t$redirects = get_all_redirects($url);\n\t\tif (count($redirects)>0){\n\t\t\treturn array_pop($redirects);\n\t\t} else {\n\t\t\treturn $url;\n\t\t}\n\t}", "public function getOrderPlaceRedirectUrl()\n {\n return Mage::getUrl('postfinancecheckout/transaction/redirect', array(\n '_secure' => true\n ));\n }", "function RedirectLoanprofileurl() {\n\t$RequestUrl = $_SERVER['REQUEST_URI'];\n\t$parsedurl = parse_url($RequestUrl);\n\tif(isset($parsedurl['query'])) {\n\t\tparse_str($parsedurl['query'], $qryStr); \n\t\tif(isset($qryStr['p']) && $qryStr['p']==14 && isset($qryStr['u']) && isset($qryStr['l'])) {\n\t\t\t$loanprurl = getLoanprofileUrl($qryStr['u'], $qryStr['l']);\n\t\t\tunset($qryStr['p']);\n\t\t\tunset($qryStr['u']);\n\t\t\tunset($qryStr['l']);\n\t\t\t$qrystrToAppnd = http_build_query($qryStr);\n\t\t\tif(!empty($qrystrToAppnd)) {\n\t\t\t\t$urlMovedto = SITE_URL.$loanprurl.\"?\".$qrystrToAppnd;\n\t\t\t}else {\n\t\t\t\t$urlMovedto = SITE_URL.$loanprurl;\n\t\t\t}\n\t\t\theader(\"HTTP/1.1 301 Moved Permanently\");\n\t\t\theader(\"Location: \".$urlMovedto);\n\t\t\texit;\n\t\t}\n\t}\n}", "public function generateRedirectResponse();", "public function getRedirectURL()\n {\n return $this->redirectURL;\n }", "function get_final_url($url){\n\t$redirects = get_all_redirects($url);\n\tif (count($redirects)>0){\n\t\treturn array_pop($redirects);\n\t} else {\n\t\treturn $url;\n\t}\n}", "public function getRedirectUrl() {\n return (string) $this->getValue('redirect_url');\n }", "public function successResponse($response)\n {\n // $response = 'https://phpdark.com/payment/success/id=4/?merchant=683002007104225&order_id=EBSXGJ5OYQCRO7D&payment_ref_id=MTEyOTAwMjY1NDMxNi42ODMwMDIwMDcxMDQyMjUuRUJTWEdKNU9ZUUNSTzdELmExODVkYWE4MDAyMDEyM2ZlYzRl&status=Success&status_code=00_0000_000&message=Successful%20Transaction&payment_dt=20201129002747&issuer_payment_ref=MTEyOTAwMjY1NDMxNi42ODMwMDIwMDcxMDQyMjUuRUJTWEdKNU9ZUUNSTzdELmExODVkYWE4MDAyMDEyM2ZlYzRl';\n $parts = parse_url($response);\n parse_str($parts['query'], $query);\n return $query;\n }", "private function getRedirectUrl()\n {\n return $this->getConfigData('url');\n }", "protected function getRedirectUrl()\n\t{\n if ($customURL = $this->input->getBase64('returnurl', ''))\n {\n $customURL = base64_decode($customURL);\n }\n\n $url = !empty($customURL) ? $customURL : 'index.php?option='\n . $this->container->componentName\n . '&view='\n . $this->container->inflector->pluralize($this->view)\n . $this->getItemidURLSuffix(); // e.g. '&Itemid=123' or an empty string if no Itemid\n\n return $url;\n }", "public function getRedirectUrl() {\n return $this->redirectUrl;\n }", "public function redirecturl()\n\t\t\t{\n\t\t\t\tif($this->fields_arr['pcakey'])\n\t\t\t\t Redirect2URL($_SESSION['pcakey'][$this->fields_arr['pcakey']]);\n\t\t\t}", "public function getRedirectUrl()\n {\n return $this->redirectUrl;\n }", "public function getRedirectUrl()\n {\n return $this->redirectUrl;\n }", "public function getRedirectUrl() : string\n {\n return '';\n }", "public function getRedirectUrl(): string\n {\n return $this->redirectUrl;\n }", "public function getRedirectUrl()\n {\n return $this->redirectUrl;\n }", "protected function getSuccessReturnURL($record)\n {\n $sm = SessionManager::getInstance();\n $params = [];\n\n if ($this->m_node->hasFlag(Node::NF_EDITAFTERADD) && $this->m_node->allowed('edit')) {\n // forward atkpkret for newly added records\n\n $params['atkselector'] = $this->m_node->primaryKey($record);\n\n if (isset($this->m_postvars['atkpkret'])) {\n $params['atkpkret'] = $this->m_postvars['atkpkret'];\n }\n\n $url = Tools::dispatch_url($this->m_node->atkNodeUri(), 'edit', $params);\n $location = $sm->sessionUrl($url, SessionManager::SESSION_REPLACE, $this->_getSkip() - 1);\n } else {\n if ($this->m_node->hasFlag(Node::NF_ADDAFTERADD) && isset($this->m_postvars['atksaveandnext'])) {\n\n if (isset($this->m_node->m_postvars['atkfilter'])) {\n $params['atkfilter'] = $this->m_node->m_postvars['atkfilter'];\n }\n\n $url = Tools::dispatch_url($this->m_node->atkNodeUri(), $this->getAddAction(), $params);\n $location = $sm->sessionUrl($url, SessionManager::SESSION_REPLACE, $this->_getSkip() - 1);\n } else {\n // normal succesful save\n $location = $this->m_node->feedbackUrl('save', self::ACTION_SUCCESS, $record, '', $this->_getSkip());\n }\n }\n\n return $location;\n }", "public function getCheckoutRedirectUrl()\n {\n return Mage::getUrl('radial_paypal_express/checkout/start');\n }", "public function validateResultURL($status) {\r\n $this->validateCodes();\r\n\r\n if (empty($_GET['transaction_id'])) {\r\n return 'Empty transaction id';\r\n }\r\n\r\n if (empty($_GET['checksum'])) {\r\n return 'Empty checksum';\r\n }\r\n $text = $_GET['transaction_id'] . $status . $this->merchant_code . $this->passcode;\r\n $hash = Security::hashChecksum($text, $this->secret_key);\r\n if ($hash !== $_GET['checksum']) {\r\n return 'Invalid checksum.';\r\n }\r\n\r\n return true;\r\n }", "protected function followRedirect()\n\t\t{\n\t\t\tif (!$this->followRedirect)\n\t\t\t\treturn false; /* disabled */\n\t\t\tif (!isset($this->responseHeaders['Location']) || !is_string($this->responseHeaders['Location'])) {\n\t\t\t\tSERIA_Base::debug('HTTP protocol violation: No location header with response code: '.$this->responseCode);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$redirectPoint = $this->url;\n\t\t\t$location = $this->responseHeaders['Location'];\n\n\t\t\tif(strpos($location, '://')===false)\n\t\t\t{ // handling illegal redirects (Location: /path)\n\t\t\t\t$pi = parse_url($this->url);\n\t\t\t\t$location = $pi['scheme'].'://'.$pi['host'].$location;\n\t\t\t}\n\n\t\t\tif ($this->responseCode == 301 || $this->responseCode == 307) {\n\t\t\t\t/*\n\t\t\t\t * Check whether this is a post request:\n\t\t\t\t */\n\t\t\t\tif (isset($this->currentRequest['postFields']) && $this->currentRequest['postFields'])\n\t\t\t\t\t$post = $this->currentRequest['postFields'];\n\t\t\t\telse {\n\t\t\t\t\tif (isset($this->currentRequest['postFiles']) && $this->currentRequest['postFiles'])\n\t\t\t\t\t\t$post = true;\n\t\t\t\t\telse\n\t\t\t\t\t\t$post = false;\n\t\t\t\t}\n\t\t\t\tif (isset($this->currentRequest['postFiles']) && $this->currentRequest['postFiles'])\n\t\t\t\t\t$postFiles = $this->currentRequest['postFiles'];\n\t\t\t\telse\n\t\t\t\t\t$postFiles = array();\n\t\t\t} else {\n\t\t\t\t$post = false;\n\t\t\t\t$postFiles = array();\n\t\t\t}\n\t\t\t$connectToHost = false;\n\t\t\t$port = false;\n\t\t\t$from = parse_url($redirectPoint);\n\t\t\t$to = parse_url($location);\n\t\t\tif ($from['scheme'] == $to['scheme'] && $from['host'] == $to['host'] && $from['port'] == $to['port']) {\n\t\t\t\tif (isset($this->currentRequest['connectToHost']))\n\t\t\t\t\t$connectToHost = $this->currentRequest['connectToHost'];\n\t\t\t\t$port = $this->currentRequest['port'];\n\t\t\t}\n\t\t\t$this->navigateTo($location, $post, $connectToHost, $port);\n\t\t\tforeach ($postFiles as $name => $file)\n\t\t\t\t$this->postFile($name, $file);\n\t\t\tif ($this->responseCode == 301)\n\t\t\t\t$this->movedPermanently[$redirectPoint] = $location;\n\t\t\treturn true;\n\t\t}", "public function getUrl() {\n return $this->_gatewayRedirect->getUrl ();\n }", "public function getRedirectURI() {\n return $this->request->query->get(\"redirect_uri\") != NULL ? $this->request->query->get(\"redirect_uri\") : ($this->request->query->get(\"state\") != NULL ? $this->request->query->get(\"state\") : \"\");\n }", "public function getOrderPlaceRedirectUrl()\n {\n if($this->_getHelper()->isRedirectMode()) {\n $paymentUrl = Mage::getSingleton('core/session')->getPicpayPaymentUrl();\n\n if ($paymentUrl) {\n return $paymentUrl;\n }\n else {\n Mage::throwException($this->_getHelper()->__(\"Invalid payment url\"));\n }\n }\n\n $isSecure = Mage::app()->getStore()->isCurrentlySecure();\n return Mage::getUrl('checkout/onepage/success', array('_secure' => $isSecure));\n }", "protected function checkRedirect() {}", "protected function success_redirect()\n {\n tep_redirect(tep_href_link(FILENAME_CHECKOUT_SUCCESS, '', 'SSL'));\n }", "public function getRedirectUrl()\n {\n return $this->_redirectUrl;\n }", "public function getRedirectUrl()\n {\n return $this->_redirectUrl;\n }", "public function getRedirectUrl()\n {\n return $this->_redirectUrl;\n }", "public function getRedirectUrl()\n {\n\n if ($brandCode = $this->getBrandCode()) {\n return 'https://test.adyen.com/hpp/skipDetails.shtml';\n } else {\n return 'https://test.adyen.com/hpp/pay.shtml';\n }\n }", "function pms_get_register_success_url() {\r\n\r\n $settings = get_option( 'pms_general_settings' );\r\n\r\n if ( isset( $settings['register_success_page'] ) && $settings['register_success_page'] != -1 )\r\n return get_permalink( $settings['register_success_page'] );\r\n\r\n return '';\r\n }", "public function success()\r\n\t{\r\n\t\trequire_once DIR_ROOT.'/protected/vendors/pmRocketGate/LinkReader.php';\r\n\t\t\r\n\t\t// It is important to confirm that the link is coming from RocketGate.\r\n\t\t// This is done by checking the hash value in the incoming URL against\r\n\t\t// our internally computed hash value.\r\n\t\t//\r\n\t\t// First, split the incoming URL to obtain everything after the \"?\".\r\n\t\t//\r\n\t\tlist($uri_string, $values_string) = split('\\?', $_SERVER['REQUEST_URI']);\t\t\r\n\t\t\r\n\t\t//\r\n\t\t// Create a LinkReader.php class instance to check the hash\r\n\t\t// contained in the URL.\r\n\t\t//\r\n\t\t$link_reader = new LinkReader($this->rg_HashSecret);\t\t\r\n\t\t\r\n\r\n\t\t// Confirm that the incoming link is from RocketGate\r\n\t\tif($link_reader->ParseLink($values_string) != 0){\r\n\t\t //\r\n\t\t // Either this link was not made by RocketGate, or there is a\r\n\t\t // problem with the secret key\r\n\t\t //\r\n\t\t die(\"Link contains invalid hash value!!!<br/>\\n\");\r\n\t\t}\t\t\r\n\t\t\r\n\t\t\r\n\t\t//SUCCESS!!\r\n\t\t//die('SUCCESS!!');\r\n\t\t///id=18&invoiceID=18&mp=1&udf01=594835\r\n\t\t$this->id = intval($_REQUEST['id']);\r\n\t\tif (!$this->id)\r\n\t\t{\r\n\t\t\tdie('Error, wrong trn id');\r\n\t\t}\r\n\t\t\r\n $trn = self::getTransactionInfo($this->id);\r\n\t\tif (!$trn)\r\n\t\t{\r\n\t\t\tdie('Error, wrong trn');\r\n\t\t}\r\n \r\n\t\t//check duplicate calls\r\n\t\tif ($trn['status']=='completed')\r\n \treturn true;\r\n \r\n $this->user_id = $trn['user_id'];\r\n\r\n \t\t\r\n // update zom transaction id and SUBSCRIPTION_ID\r\n $sql = \"UPDATE LOW_PRIORITY `pm_rg_trn` SET `action`='approved', responce=:responce WHERE trn_id=:trn_id LIMIT 1\";\r\n\t Yii::app()->db->createCommand($sql)\r\n\t \t->bindValue(\":responce\", serialize($_REQUEST), PDO::PARAM_STR)\r\n\t\t\t->bindValue(\":trn_id\", $this->id, PDO::PARAM_INT)\r\n\t\t\t->execute(); \t\t\r\n \t\t\r\n\t\t\r\n //COMPLETE transaction\r\n $this->CompleteTransaction();\r\n \r\n $profile = new Profile($this->user_id);\r\n \r\n\t\t//UPGRADE USER TO GOLD\r\n\t\t$profile->Upgrade($this->id);\t\t\r\n\t\t\r\n\t\t\r\n\t\t$log = $_SERVER['REQUEST_URI'].\" - \".date(\"r\") . \" / \" .CHelperLocation::getIPReal().\"\\n\";\r\n\t\tCHelperLog::logFile('pm_rg_approved.log', $log);\r\n\t\t\r\n\t\treturn true;\r\n\t}", "function redirectURL()\n{\n\t$redirect = '';\n\t$loc = Configuration::get('LoginRadius_redirect');\n\tif ($loc == 'profile')\n\t\t$redirect = 'my-account.php';\n\telseif ($loc == 'url')\n\t{\n\t\t$custom_url = Configuration::get('redirecturl');\n\t\t$redirect = !empty($custom_url) ? $custom_url : 'my-account.php';\n\t}\n\telse\n\t{\n\t\tif (Tools::getValue('back'))\n\t\t{\n\t\t\tif (_PS_VERSION_ >= 1.6)\n\t\t\t{\n\t\t\t\t$loc = $_SERVER['REQUEST_URI'];\n\t\t\t\t$redirect_location = explode('back=', $loc);\n\t\t\t\t$redirect = $redirect_location['1'];\n\t\t\t}\n\t\t\telse\n\t\t\t\t$redirect = Tools::getValue('back');\n\t\t}\n\t\telseif (empty($redirect))\n\t\t{\n\t\t\t$http = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'Off' && !empty($_SERVER['HTTPS'])) ? 'https://' : 'http://');\n\t\t\t$redirect = urldecode($http.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);\n\t\t}\n\t}\n\treturn $redirect;\n}", "private function checkSuccess($expected_url, $parsed_expected, $actual_url)\n { if (array_key_exists('scheme', $parsed_expected)) {\n if (url_matches($expected_url, $actual_url)) {\n return 'Success';\n }\n return 'Error';\n }\n return '';\n }", "public function redirect_url( $feed, $submission_data, $form, $entry ) {\n\t\tif ( ! rgempty( 'gf_instamojo_return', $_GET ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t//updating lead's payment_status to Processing\n\t\t$entry['payment_status']= 'Processing' ;\n\t\t$entry['payment_method']='instamojo';\n\n\t\t// get payment amount form the product url list this should not be less than 10 RS\n\t\t$payment_amount = rgar( $submission_data, 'payment_amount' );\n\n\t\t//return after success \n\t\t$return_url = $this->return_url( $form['id'], $entry['id'] ) ; \n\n\t\t//URL that will listen to notifications from Instamoj\n\t\t$webhook_callback_url = get_bloginfo( 'url' ) . '/?page=gf_instamoj_webhook&ref='.$entry['id'] ;\n\n\t\t$request = new WP_Http();\n\t\t$meta=$feed['meta'];\n\t\t//add authentication to the insa mojo account\n\t\t$headers =['X-Api-Key'=>$meta['instamojoAPIKey'] ,'X-Auth-Token'=>$meta['instamojoAuthToken']];\n\t\t\n\t\t$payload = Array(\n\t\t 'purpose' => $meta['instamojoPaymentPurposeDescription'],\n\t\t 'amount' => $payment_amount,\n\t\t // 'phone' => '9999999999',\n\t\t 'buyer_name' => 'Customer ',\n\t\t 'redirect_url' => $return_url,\n \t\t\t// 'send_email' => true,\n\t\t 'webhook' => $webhook_callback_url,\n\t\t // 'send_sms' => true,\n\t\t // 'email' => $meta['billingInformation_email'],\n\t\t 'allow_repeated_payments' => false\n\t\t);\n\n\t\t$response = $request->post($this->_instamojo_api_url , array(\n\t\t\t'sslverify' => false, 'ssl' => true,\n\t\t\t'headers'=>$headers, 'timeout' => 20,'body'=>$payload ) );\n\n\t\t\n\t\t// try to parse josn \n\t\t$body=json_decode(rgar( $response, 'body' ));\n\t\tif ( ! is_wp_error( $response ) && $body->success ) {\n\t\t\t$url=$body->payment_request->longurl;\n\t\t $this->log_debug( __METHOD__ . \"(): Payment URL Instamoj: { $url }\" );\n\t\t // error_log( __METHOD__ . \"(): Unableto find the payment URL Instamoj: \".print_r(rgar( $response, 'body' ),true) );\n\t\t \t//update the entry status \n\t\t \t$entry['transaction_id']=$body->payment_request->id;\n\t\t\t$entry['payment_amount']=$body->payment_request->amount;\n\t\t\t$entry['payment_date']=$body->payment_request->created_at;\n\t\t} else {\n\t\t $this->log_debug( __METHOD__ . \"(): Unableto find the payment URL Instamoj: \".print_r(rgar( $response, 'body' ),true) );\n\t\t // error_log( __METHOD__ . \"(): Unableto find the payment URL Instamoj: \".print_r(rgar( $response, 'body' ),true) );\n\t\t $url='';\n\t\t}\n\t\t//update the entry \n\t\tGFAPI::update_entry($entry);\n\t\treturn $url;\n\n\t}", "public function getRedirects();", "public function getOrderPlaceRedirectUrl()\n\t{\n return Mage::getUrl('hostedpayments/processing/pay');\n\t}", "static function get_final_url($url)\n\t\t{\n\t\t\t$redirects = CUtils::get_all_redirects($url);\n\t\t\tif (count($redirects)>0)\n\t\t\t{\n\t\t\t\treturn array_pop($redirects);\n\t\t\t} \n\t\t\telse \n\t\t\t{\n\t\t\t\treturn $url;\n\t\t\t}\n\t\t}", "protected function getRedirectUrl()\n {\n return null;\n }", "public function getOrderPlaceRedirectUrl()\r\n {\r\n \t$result = false;\r\n \t$session = Mage::getSingleton('checkout/session');\r\n \t$nVersion = $this->getVersion();\r\n \t$mode = $this->getConfigData('mode');\r\n \t\r\n \tif($session->getMd() &&\r\n \t\t$session->getAcsurl() &&\r\n \t\t$session->getPareq())\r\n \t{\r\n \t\t// Direct (API) for 3D Secure payments\r\n \t\tif($nVersion >= 1410)\r\n\t \t{\r\n\t\t \t// need to re-add the ordered item quantity to stock as per not completed 3DS transaction\r\n\t\t \tif($mode != Paymentsense_Paymentsensegateway_Model_Source_PaymentMode::PAYMENT_MODE_TRANSPARENT_REDIRECT)\r\n\t\t \t{\r\n\t\t \t\t$order = Mage::getModel('sales/order')->load(Mage::getSingleton('checkout/session')->getLastOrderId());\r\n\t\t \t\t$this->addOrderedItemsToStock($order);\r\n\t\t \t}\r\n\t \t}\r\n \t\t\r\n \t\t$result = Mage::getUrl('paymentsensegateway/payment/threedsecure', array('_secure' => true));\r\n \t}\r\n \tif($session->getHashdigest())\r\n \t{\r\n \t\t// Hosted Payment Form and Transparent Redirect payments\r\n \t\tif($nVersion >= 1410)\r\n\t \t{\r\n\t\t \t// need to re-add the ordered item quantity to stock as per not completed 3DS transaction\r\n\t\t \tif(!Mage::getSingleton('checkout/session')->getPares())\r\n\t\t \t{\r\n\t\t \t\t$order = Mage::getModel('sales/order')->load(Mage::getSingleton('checkout/session')->getLastOrderId());\r\n\t\t \t\t$this->addOrderedItemsToStock($order);\r\n\t\t \t}\r\n\t \t}\r\n \t\r\n \t\t$result = Mage::getUrl('paymentsensegateway/payment/redirect', array('_secure' => true));\r\n \t}\r\n \r\n return $result;\r\n }", "abstract public function getPaymentPageUrl();", "public function get_redirect_to() {\n\t\treturn empty( $this->data['redirect_to'] ) ? '' : $this->data['redirect_to'];\n\t}", "public function get_redirect()\n {\n return $this->redirect;\n }", "public function getRedirectRoute()\n {\n return $this->afterSendRouteUrl;\n }", "public function getRedirect()\n {\n return $this->secureInput($_GET['redirect']);\n }", "public function transactionSetOkPage ($uri);", "function urlSuccess()\r\n\t{\r\n\t\t$input_def['id'] = 'urlSuccess';\r\n\t\t$input_def['name'] = 'urlSuccess';\r\n\t\t$input_def['type'] = 'text';\r\n\t\t$inputValue = '';\r\n\t\tif(isset($_POST[$input_def['name']]) && (wpklikandpay_option::getStoreConfigOption('wpklikandpay_store_urloption', $input_def['name']) == ''))\r\n\t\t{\r\n\t\t\t$inputValue = wpklikandpay_tools::varSanitizer($_POST[$input_def['name']], '');\r\n\t\t}\r\n\t\telseif(wpklikandpay_option::getStoreConfigOption('wpklikandpay_store_urloption', $input_def['name']) != '')\r\n\t\t{\r\n\t\t\t$inputValue = wpklikandpay_option::getStoreConfigOption('wpklikandpay_store_urloption', $input_def['name']);\r\n\t\t}\r\n\t\t$input_def['value'] = $inputValue;\r\n\r\n\t\techo wpklikandpay_form::check_input_type($input_def);\r\n\t}", "public function getReturnUrl()\n {\n return $this->_getUrl(self::URL_REDIRECT);\n }", "function get_redirect_url($url){\n\t\t$redirect_url = null; \n\t \n\t\t$url_parts = @parse_url($url);\n\t\tif (!$url_parts) return false;\n\t\tif (!isset($url_parts['host'])) return false; //can't process relative URLs\n\t\tif (!isset($url_parts['path'])) $url_parts['path'] = '/';\n\t \n\t\t$sock = fsockopen($url_parts['host'], (isset($url_parts['port']) ? (int)$url_parts['port'] : 80), $errno, $errstr, 30);\n\t\tif (!$sock) return false;\n\t \n\t\t$request = \"HEAD \" . $url_parts['path'] . (isset($url_parts['query']) ? '?'.$url_parts['query'] : '') . \" HTTP/1.1\\r\\n\"; \n\t\t$request .= 'Host: ' . $url_parts['host'] . \"\\r\\n\"; \n\t\t$request .= \"Connection: Close\\r\\n\\r\\n\"; \n\t\tfwrite($sock, $request);\n\t\t$response = '';\n\t\twhile(!feof($sock)) $response .= fread($sock, 8192);\n\t\tfclose($sock);\n\t \n\t\tif (preg_match('/^Location: (.+?)$/m', $response, $matches)){\n\t\t\tif ( substr($matches[1], 0, 1) == \"/\" )\n\t\t\t\treturn $url_parts['scheme'] . \"://\" . $url_parts['host'] . trim($matches[1]);\n\t\t\telse\n\t\t\t\treturn trim($matches[1]);\n\t \n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t \n\t}", "public function getOrderPlaceRedirectUrl()\n {\n return Mage::getUrl('pagseguro/payment/request');\n }", "function RedirectUserprofileurl() {\n\t$reqUrl = $_SERVER['REQUEST_URI'];\n\t$parsedurl = parse_url($reqUrl);\n\t\tif(isset($parsedurl['query'])) {\n\t\tparse_str($parsedurl['query'], $qryStr); \n\t\tif(isset($qryStr['p']) && $qryStr['p']==12 && isset($qryStr['u'])) {\n\t\t\t$prurl = getUserProfileUrl($qryStr['u']);\n\t\t\tunset($qryStr['p']);\n\t\t\tunset($qryStr['u']);\n\t\t\t$qrystrToAppnd = http_build_query($qryStr);\n\t\t\tif(!empty($qrystrToAppnd)) {\n\t\t\t\t$urlMovedto = SITE_URL.$prurl.\"?\".$qrystrToAppnd;\n\t\t\t}else {\n\t\t\t\t$urlMovedto = SITE_URL.$prurl;\n\t\t\t}\n\t\t\theader(\"HTTP/1.1 301 Moved Permanently\");\n\t\t\theader(\"Location: \".$urlMovedto);\n\t\t\texit;\n\t\t}\n\t}\n}", "public function getOrderPlaceRedirectUrl()\n {\n return Mage::getUrl('paynovapayment/processing/payment');\n }", "public function GetRedirect () {\n\t\treturn $this->redirect;\n\t}", "public function isRedirect()\r\n {\r\n return $this->isSuccessful();\r\n }", "public function getRedirect() {\n\t\treturn $this->redirect;\n\t}", "public function parse($url) {\r\n\t\tif ($params = parent::parse($url)) {\r\n\t\t\t$this->options += array(\r\n\t\t\t\t'permanent' => true,\r\n\t\t\t);\r\n\t\t\t$this->redirect($params);\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public function transactionFormGetActionURI ();", "public function handle_redirects() {\n global $CFG, $SESSION;\n require_once(__DIR__.'/../../signuplib.php');\n\n if(isset($SESSION->cancel) and $SESSION->cancel == 1) {\n $SESSION->cancel = 0;\n redirect($CFG->wwwroot);\n } elseif($this->page_number != convert_progressstring_to_progressnum($this->applicantprogress)) {\n force_signup_flow($this->page_number);\n }\n return true;\n }", "public function processPaypal(){\r\n\t// and redirect to thransaction details page\r\n\t}", "public function getOkUrl()\n {\n return $this->url('./receipt');\n }", "public function isRedirect();", "public function redirectAction()\n {\n $model = new KBariotis_NBP_Model_NBP();\n\n $redirectUrl = $model->getRedirectUrl();\n\n if ($redirectUrl)\n $this->_redirectUrl($redirectUrl);\n else\n $this->_redirectUrl(Mage::getUrl('checkout/onepage/failure'));\n }", "protected function redirectTo()\n {\n $url = Skill::checkUserStatus();\n return $url;\n }", "public function getRedirect(){\n return $this->redirect;\n }", "public function getFailureUrl();", "function get_final_url($xid){\n\t$base_url = 'http://www.swarthmore.edu/';\n\t$url = $base_url . $xid; \n\t$ch = curl_init();\n\tcurl_setopt($ch, CURLOPT_URL, $url);\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n\tcurl_setopt($ch, CURLOPT_HEADER, 0);\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\tcurl_setopt($ch, CURLOPT_AUTOREFERER, 1);\n\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n\tcurl_setopt($ch, CURLOPT_MAXREDIRS, 5);\n\tcurl_setopt($ch, CURLOPT_TIMEOUT, 30);\n\tcurl_exec ($ch);\n\treturn str_replace($base_url, '', curl_getinfo($ch, CURLINFO_EFFECTIVE_URL));\n}", "public function get_gateway_redirect() {\n\t\t$gatewayRedirect = new gateway_redirect();\n\t\tif (! empty($this->_3dSecurePostParameters)) {\n\t\t\t$connParams = $this->_getConnectionParameters('payment');\n\t\t\t$gatewayRedirect->redirect = TRUE;\n\t\t\t$gatewayRedirect->encType = 'application/x-www-form-urlencoded';\n\t\t\t$gatewayRedirect->url = $connParams['uri'];\n\t\t\t$gatewayRedirect->postParameters = $this->_3dSecurePostParameters;\n\t\t}\n\t\t\n\t\treturn $gatewayRedirect;\n\t}", "public function callbackSuccess()\n {\n $this->redirectTo();\n }", "public function sendRedirect() {}", "public function redirect();", "public function redirect();", "public function redirect();", "public function get_redirect() {\n return new \\moodle_url('/');\n }" ]
[ "0.71170336", "0.629864", "0.629864", "0.629864", "0.629864", "0.629864", "0.62781817", "0.62279457", "0.6156074", "0.61440563", "0.6119394", "0.6098481", "0.6061107", "0.60521966", "0.6027535", "0.5992193", "0.5902258", "0.5846273", "0.5846273", "0.5832094", "0.58214056", "0.58078057", "0.5790543", "0.57784694", "0.5722629", "0.57217914", "0.5717368", "0.57041806", "0.57040423", "0.5685133", "0.56748897", "0.5671563", "0.5669435", "0.5651057", "0.56415445", "0.56394726", "0.56250596", "0.5599378", "0.55943817", "0.55916", "0.55916", "0.55828357", "0.5574297", "0.556791", "0.5564896", "0.55638695", "0.5560868", "0.55605453", "0.55441415", "0.5542836", "0.5540719", "0.55368686", "0.55288583", "0.55237263", "0.55237263", "0.55237263", "0.55229604", "0.5519947", "0.55137736", "0.5504513", "0.5497583", "0.5493273", "0.5487546", "0.5471608", "0.54703814", "0.5468914", "0.54688185", "0.5465493", "0.54557115", "0.54480886", "0.54459625", "0.543787", "0.54362875", "0.54360294", "0.54347396", "0.5430644", "0.54295045", "0.54150003", "0.5412601", "0.5410373", "0.54054695", "0.5370549", "0.5369308", "0.53690803", "0.5362324", "0.5356131", "0.53396446", "0.53329015", "0.5324789", "0.5316987", "0.53142273", "0.5313888", "0.53129077", "0.5310306", "0.52920645", "0.52857876", "0.5268446", "0.5268446", "0.5268446", "0.5266172" ]
0.66811
1
Parse transaction redirect failed URL
public function validateFailedURL() { return $this->validateResultURL(self::FAILED_STATUS); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function parseURLRequest() {\n\t\t# Redirects the user upon success and redirects to following error-messages upon errors:\n\t\t# 201 - Missing url-entry for the given ID\n\n\t\t$this->parseCustomURL();\t# Let's see if there's an custom-url we gotten our hands on\n\n\t\t$urlID = $this->baseToInt($_GET['u']);\n\t\t$this->verifyID($urlID);\n\n\t\t# assuming everything's good, moving on.\n\t\t\n\t\t$query = $this->db->prepare(\"SELECT `url` FROM urls WHERE `id` = :id\");\n\t\t$query->bindParam(\":id\", $urlID);\n\t\t$query->execute();\n\t\t\n\t\t$data = $query->fetch();\n\t\t\n\t\tif(!isset($data['url'])) {\n\t\t\t$this->debugLog(\"The database did not return any URL for ID {$_GET['u']}\");\n\t\t\theader(\"Location:{$this->siteURL}error/201\");\n\t\t\tdie;\n\t\t}\n\t\telse {\n\t\t\t$this->debugLog(\"Redirecting to {$data['url']}\");\n\t\t\t$this->logUrlClick($urlID);\n\t\t\theader(\"HTTP/1.1 301 Moved Permanently\");\n\t\t\theader(\"Location: {$data['url']}\"); # Should we use URL-encode here?\n\t\t\tdie;\n\t\t}\n\t}", "public function getFailureUrl();", "function get_final_url($url){\n\t\t$redirects = get_all_redirects($url);\n\t\tif (count($redirects)>0){\n\t\t\treturn array_pop($redirects);\n\t\t} else {\n\t\t\treturn $url;\n\t\t}\n\t}", "function get_final_url($url){\n\t$redirects = get_all_redirects($url);\n\tif (count($redirects)>0){\n\t\treturn array_pop($redirects);\n\t} else {\n\t\treturn $url;\n\t}\n}", "public function getRedirectUrl();", "public function getRedirectUrl();", "public function getRedirectUrl();", "public function getRedirectUrl();", "public function getRedirectUrl();", "function get_url_redirected($url)\n{\n $url_list = array();\n $url_list[] = $url;\n\n $ch = curl_init();\n if (false === $ch) {\n curl_close($ch);\n throw new Exception(\"Bad request url in get_url: $url\", 1);\n }\n\n for ($redirects = 0; follow_redirects($ch, $url_list); ++$redirects) {}\n $url = end($url_list);\n\n curl_close($ch);\n\n return $url;\n}", "public function getRedirectUrl()\n {\n }", "abstract protected function getRedirectUrl(): Url;", "static function get_final_url($url)\n\t\t{\n\t\t\t$redirects = CUtils::get_all_redirects($url);\n\t\t\tif (count($redirects)>0)\n\t\t\t{\n\t\t\t\treturn array_pop($redirects);\n\t\t\t} \n\t\t\telse \n\t\t\t{\n\t\t\t\treturn $url;\n\t\t\t}\n\t\t}", "public function getRedirectUrl()\r\n\t{\r\n\t\treturn $this->payment->links[1]->getHref();\r\n\t}", "public function getSuccessUrl();", "public function getRedirectUrl(): string;", "function my_give_change_failed_transaction_uri( $uri ) {\n\n\t$form_id = isset( $_POST['give-form-id'] ) ? $_POST['give-form-id'] : '';\n\n\tif ( $form_id == 650 ) {\n\t\t//Return a custom permalink or URL.\n\t\treturn get_permalink( 123 );\n\t} else {\n\t\t//Always return default $uri.\n\t\treturn $uri;\n\t}\n\n}", "protected function processRedirect() {}", "function _url_final_redirect( $url ) {\n\t\treturn IMFORZA_Utils::url_final_redirect( $url );\n\t}", "public function error301($redirectURI)\n {\n }", "public function validateRedirectUrlClearsInvalidUrlInSubdirectoryDataProvider() {}", "public function validateSuccessURL() {\r\n return $this->validateResultURL(self::SUCCESS_STATUS);\r\n }", "public function validateRedirectUrlKeepsCleanUrlDataProvider() {}", "public function getRedirectUrl()\n {\n\n if ($brandCode = $this->getBrandCode()) {\n return 'https://test.adyen.com/hpp/skipDetails.shtml';\n } else {\n return 'https://test.adyen.com/hpp/pay.shtml';\n }\n }", "protected function getRedirectUrl()\n {\n $sBaseUrl = Registry::getConfig()->getCurrentShopUrl().'index.php?cl=order&fnc=handleMollieReturn';\n\n return $sBaseUrl.$this->mollieGetAdditionalParameters();\n }", "public function getRedirectUrl()\n {\n return $this->request->getTestMode()\n ? 'https://sslpayment.cathaybkdev.com.tw/EPOSService/Payment/OrderInitial.aspx'\n : 'https://sslpayment.uwccb.com.tw/EPOSService/Payment/OrderInitial.aspx';\n }", "protected function checkRedirect() {}", "protected function getRedirectUrl()\n {\n return null;\n }", "public function badRedirectProvider() {\n $badUrls = $this->badUrlProvider();\n $badRedirects = array();\n foreach($badUrls as $name => $badUrl) {\n $urlParts = parse_url(array_shift($badUrl));\n unset($urlParts['scheme']);\n\n // The redir.xpoc.pro tool is provided by sp1d3R in the HackerOne Bug Bounty program\n // If it goes away, we'll need some other way to easily generate a redirect to an internal URL\n $badRedirects[$name] = array(\"http://redir.xpoc.pro/\".implode($urlParts), array_shift($badUrl));\n }\n return $badRedirects;\n }", "public function GetRedirect ();", "public function getRedirectUri();", "public function getRedirectUri();", "protected function getRedirectUrl()\n\t{\n if ($customURL = $this->input->getBase64('returnurl', ''))\n {\n $customURL = base64_decode($customURL);\n }\n\n $url = !empty($customURL) ? $customURL : 'index.php?option='\n . $this->container->componentName\n . '&view='\n . $this->container->inflector->pluralize($this->view)\n . $this->getItemidURLSuffix(); // e.g. '&Itemid=123' or an empty string if no Itemid\n\n return $url;\n }", "abstract protected function get_redirect_page();", "function get_redirect_url($url){\n\t\t$redirect_url = null; \n\t \n\t\t$url_parts = @parse_url($url);\n\t\tif (!$url_parts) return false;\n\t\tif (!isset($url_parts['host'])) return false; //can't process relative URLs\n\t\tif (!isset($url_parts['path'])) $url_parts['path'] = '/';\n\t \n\t\t$sock = fsockopen($url_parts['host'], (isset($url_parts['port']) ? (int)$url_parts['port'] : 80), $errno, $errstr, 30);\n\t\tif (!$sock) return false;\n\t \n\t\t$request = \"HEAD \" . $url_parts['path'] . (isset($url_parts['query']) ? '?'.$url_parts['query'] : '') . \" HTTP/1.1\\r\\n\"; \n\t\t$request .= 'Host: ' . $url_parts['host'] . \"\\r\\n\"; \n\t\t$request .= \"Connection: Close\\r\\n\\r\\n\"; \n\t\tfwrite($sock, $request);\n\t\t$response = '';\n\t\twhile(!feof($sock)) $response .= fread($sock, 8192);\n\t\tfclose($sock);\n\t \n\t\tif (preg_match('/^Location: (.+?)$/m', $response, $matches)){\n\t\t\tif ( substr($matches[1], 0, 1) == \"/\" )\n\t\t\t\treturn $url_parts['scheme'] . \"://\" . $url_parts['host'] . trim($matches[1]);\n\t\t\telse\n\t\t\t\treturn trim($matches[1]);\n\t \n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t \n\t}", "public function testErrorIsThrownIfURLIsInvalid()\n {\n self::$importer->get('invalid-google-url', now()->subYear(), now()->addYear());\n }", "function check_url($url) {\r\n $http_codes = array();\r\n $urls = array();\r\n while (TRUE) {\r\n // Initialise curl and get the header\r\n $ch = curl_init($url);\r\n curl_setopt($ch, CURLOPT_HEADER, true);\r\n curl_setopt($ch, CURLOPT_NOBODY, true);\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 20);\r\n curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);\r\n $content = curl_exec($ch);\r\n $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\r\n curl_close($ch);\r\n \r\n // Add urls and http codes to the arrays\r\n array_push($urls, $url);\r\n array_push($http_codes, $http_code);\r\n \r\n if ( is_redirect_http_code($http_code) ) {\r\n // Check for redirects, if found, follow the redirected URL\r\n if ( preg_match('/(?<=Location: )[^ \\s]*/i', $content, $matches) ) {\r\n $url = $matches[0];\r\n continue;\r\n }\r\n }\r\n \r\n // We can't do anything else\r\n break;\r\n }\r\n \r\n // Contains all the http_codes and urls encountered\r\n $ret['http_codes'] = $http_codes;\r\n $ret['urls'] = $urls;\r\n // For easy access, contains the last http_code and url encountered\r\n $ret['http_code'] = $http_code;\r\n $ret['url'] = $url;\r\n return $ret;\r\n}", "function helperCheckForWrongUrl() {\n\t\t$status = array();\n\n\t\tif ($GLOBALS['TSFE']->config['config']['baseURL'] != '' || $GLOBALS['TSFE']->config['config']['absRefPrefix']) {\n\t\t\t$currentDomain = t3lib_div::getIndpEnv('TYPO3_HOST_ONLY');\n\t\t\t$linkDomain = $this->pi_getPageLink($GLOBALS['TSFE']->id);\n\n\t\t\tif ($linkDomain != '' && strpos($linkDomain, $currentDomain) === false) {\n\t\t\t\t$status['current']\t= $currentDomain;\n\t\t\t\t$status['link']\t\t\t= $linkDomain;\n\t\t\t}\n\t\t}\n\n\t\treturn $status;\n\t}", "public function getRedirectUrl() : string\n {\n return '';\n }", "private function getRedirectUrl()\n {\n return $this->getConfigData('url');\n }", "private function rescue_uri()\n\t{\n\t\t$query = $this->request->query_string;\n\n\t\tif (strpos($query, '&amp;') === false)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$query = html_entity_decode($query);\n\n\t\t$rc = parse_str($query, $this->request->params);\n\t}", "public function getUrl() {\n return $this->_gatewayRedirect->getUrl ();\n }", "public function badUrlProvider() {\n\n $badRedirects[\"ip: 127.0.0.1\"] = array(\"http://127.0.0.1\", false);\n\n // Anything that resolves to zero needs to be tested carefully due to falsiness\n $badRedirects[\"ip: 0\"] = array(\"http://0/data.json\", false);\n\n // Hex is bad\n $badRedirects[\"ip: hex\"] = array(\"http://0x7f000001/data.json\", false);\n\n // So is octal\n $badRedirects[\"ip: octal\"] = array(\"http://0123/data.json\", false);\n\n // We don't like mixed hex and octal either\n $badRedirects[\"ip: mixed hex/octal/decimal\"] = array(\"http://0x7f.0x0.0.0/data.json\", false);\n\n // We don't even like dotted-quads\n $badRedirects[\"ip: dotted-quad\"] = array(\"http://111.22.34.56/data.json\", false);\n\n // Don't you come around here with any of that IPv6 crap\n $badRedirects[\"ipv6: localhost\"] = array(\"http://[::1]\", false);\n\n // Domains that resolve to IPv4 localhost? NFW.\n $badRedirects[\"localhost.ip4\"] = array(\"https://localhost.ip4/\", [['type' => 'A', 'ip' => '127.0.0.1']]);\n\n // Domains that resolve to IPv6 localhost? Get out!\n $badRedirects[\"localhost.ip6\"] = array(\"https://localhost.ip6:443\", [['type' => 'AAAA', 'ipv6' => '::1']]);\n\n // Domains that resolve to IPv6 addresses that represent IPv4 private ranges? Not on our watch!\n $badRedirects[\"localhost2.ip6\"] = array(\"http://localhost2.ip6:80\", [['type' => 'AAAA', 'ipv6' => '::ffff:127.0.0.1']]);\n $badRedirects[\"private1.ip6\"] = array(\"https://private1.ip6:80\", [['type' => 'AAAA', 'ipv6' => '::ffff:192.168.1.18']]);\n $badRedirects[\"private2.ip6\"] = array(\"https://private2.ip6:80\", [['type' => 'AAAA', 'ipv6' => '::ffff:10.0.0.1']]);\n $badRedirects[\"private3.ip6\"] = array(\"http://private3.ip6:80\", [['type' => 'AAAA', 'ipv6' => '::ffff:127.0.0.2']]);\n\n // Domains that resolve to IPv6 link-local adddresses? Hell no!\n $badRedirects[\"linklocal.ip6\"] = array(\"https://linklocal.ip6/\", [['type' => 'AAAA', 'ipv6' => 'fe80::']]);\n\n return $badRedirects;\n }", "public function getRedirectUri(): string;", "public function getRedirects();", "function url_parts($url) {\n if (!preg_match('/^(?P<protocol_domain>(?P<protocol>https?\\:\\/+)(?P<domain>([^\\/\\W]|[\\.\\-])+))(?P<request_uri>(?P<pathname>(?P<path>\\/(.+\\/)?)?(?P<file>[^\\?\\#]+?)?)?(?P<query_string>\\?[^\\#]*)?)(\\#(?P<hash>.*))?$/',$url,$url_parts)) {\n echo debug_backtrace();\n throw new Exception(\"Invalid url: $url\");\n }\n return $url_parts;\n}", "private function resolveURLResults($url_results) {\r\n\t\tif (!isset($url_results) || count($url_results) < 1) return null;\r\n\r\n\t\t$ok_url_result = $fail_url_result = $redirect_url_result = null;\r\n\r\n\t\tforeach (array_reverse($url_results) as $url_result) {\r\n\t\t\tif ($url_result->hasSuccessHTTPStatus()) {\r\n\t\t\t\tif ( ! $ok_url_result) \r\n\t\t\t\t\t$ok_url_result = $url_result;\t\t\t\t\r\n\t\t\t}\r\n\t\t\t# If the URL had a redirect status, then we set that result type\r\n\t\t\telse if ($url_result->hasRedirectHTTPStatus()) {\r\n\t\t\t\tif (!$redirect_url_result) \r\n\t\t\t\t\t$redirect_url_result = $url_result;\r\n\t\t\t}\r\n\t\t\t# Only set a failure result if it didn't have success or redirect status code\r\n\t\t\telse if (!$fail_url_result)\r\n\t\t\t\t$fail_url_result = $url_result;\r\n\t\t}\r\n\r\n\t\t# Start with the result from our initial url\r\n\t\t$return_url = $url_results[0];\r\n\r\n\t\t# Following that, we will take any status=200 link\r\n\t\tif (isset($ok_url_result))\r\n\t\t\t$return_url = $ok_url_result;\r\n\t\t# Better to end in an HTTP failure than a redirect\r\n\t\telse if (isset($fail_url_result)) \r\n\t\t\t$return_url = $fail_url_result;\r\n\t\t# We will still take the deepest redirect found if needed\r\n\t\telse if (isset($redirect_url_result))\r\n\t\t\t$return_url = $redirect_url_result;\r\n\t\t# Reset everything so that we start with a clean slate, cookie jar, etc. next time\r\n\t\t$this->closeCurl();\r\n\r\n\t\tif ($this->is_debug)\r\n\t\t\tprint ' |> ' . $return_url->getURL() . ' ' . $return_url->debugStatus() . \"\\n\\n\";\r\n\r\n\t\treturn $return_url;\r\n\t}", "public function getLastPageUrl();", "public function RedirectURL(){\n //echo Director::baseURL();exit(); \n return urlencode(Director::baseURL().$this->request->getURL(true));\n }", "public function getOrderPlaceRedirectUrl()\n {\n return Mage::getUrl('postfinancecheckout/transaction/redirect', array(\n '_secure' => true\n ));\n }", "function url_test( $url ) {\n $timeout = 10;\n $ch = curl_init();\n curl_setopt ( $ch, CURLOPT_URL, $url );\n curl_setopt ( $ch, CURLOPT_RETURNTRANSFER, 1 );\n curl_setopt ( $ch, CURLOPT_TIMEOUT, $timeout );\n $http_respond = curl_exec($ch);\n $http_respond = trim( strip_tags( $http_respond ) );\n $http_code = curl_getinfo( $ch, CURLINFO_HTTP_CODE );\n if ( ( $http_code == \"200\" ) || ( $http_code == \"302\" ) ) {\n return true;\n } else {\n // return $http_code;, possible too\n return false;\n }\n curl_close( $ch );\n}", "public function getFailUrl(): ?string\n {\n return $this->getParameter('failUrl');\n }", "public function validateRedirectUrlClearsUrlDataProvider() {}", "function RedirectLoanprofileurl() {\n\t$RequestUrl = $_SERVER['REQUEST_URI'];\n\t$parsedurl = parse_url($RequestUrl);\n\tif(isset($parsedurl['query'])) {\n\t\tparse_str($parsedurl['query'], $qryStr); \n\t\tif(isset($qryStr['p']) && $qryStr['p']==14 && isset($qryStr['u']) && isset($qryStr['l'])) {\n\t\t\t$loanprurl = getLoanprofileUrl($qryStr['u'], $qryStr['l']);\n\t\t\tunset($qryStr['p']);\n\t\t\tunset($qryStr['u']);\n\t\t\tunset($qryStr['l']);\n\t\t\t$qrystrToAppnd = http_build_query($qryStr);\n\t\t\tif(!empty($qrystrToAppnd)) {\n\t\t\t\t$urlMovedto = SITE_URL.$loanprurl.\"?\".$qrystrToAppnd;\n\t\t\t}else {\n\t\t\t\t$urlMovedto = SITE_URL.$loanprurl;\n\t\t\t}\n\t\t\theader(\"HTTP/1.1 301 Moved Permanently\");\n\t\t\theader(\"Location: \".$urlMovedto);\n\t\t\texit;\n\t\t}\n\t}\n}", "function get_redirect_url($url){\n global $cookie;\n\t$redirect_url = null; \n \n\t$url_parts = @parse_url($url);\n\tif (!$url_parts) return false;\n\tif (!isset($url_parts['host'])) return false; //can't process relative URLs\n\tif (!isset($url_parts['path'])) $url_parts['path'] = '/';\n \n\t$sock = fsockopen($url_parts['host'], (isset($url_parts['port']) ? (int)$url_parts['port'] : 80), $errno, $errstr, 30);\n\tif (!$sock) return false;\n \n\t$request = \"HEAD \" . $url_parts['path'] . (isset($url_parts['query']) ? '?'.$url_parts['query'] : '') . \" HTTP/1.1\\r\\n\"; \n\t$request .= 'Host: ' . $url_parts['host'] . \"\\r\\n\"; \n\t$request .= 'Cookie: ' . $cookie . \"\\r\\n\"; \n\t$request .= \"Connection: Close\\r\\n\\r\\n\"; \n\tfwrite($sock, $request);\n\t$response = '';\n\twhile(!feof($sock)) $response .= fread($sock, 8192);\n\tfclose($sock);\n\n\tif (preg_match('/^Location: (.+?)$/m', $response, $matches)){\n\t\tif ( substr($matches[1], 0, 1) == \"/\" )\n\t\t\treturn $url_parts['scheme'] . \"://\" . $url_parts['host'] . trim($matches[1]);\n\t\telse\n\t\t\treturn trim($matches[1]);\n \n\t} else {\n\t\treturn $url;\n\t}\n \n}", "public function checkRedirectStringAndRedirect() {\n if($this->check404ModuleStatus() == 1) {\n $urlPart = $this->getUrlString();\n // Check if url part is empty or not,\n if (empty($urlPart)) {\n // Redirect user on root level \t\t\n $this->customRedirect('/', 'default');\n } else {\n // Get configured category suffix (we are considering that product/category/page all have same)\n $suffix = Mage::helper('catalog/category')->getCategoryUrlSuffix();\n $string = $this->trimSlash($urlPart);\n\n $plorp = substr(strrchr($string, '/'), 1);\n $string = $this->trimSlash(substr($string, 0, - strlen($plorp))) . $suffix;\n // Check string part is equal to suffix or not\n if ($string != $suffix) {\n // Redirect user according to url part\n $this->customRedirect($string, 'default');\n } else {\n // Redirect customer to base url \n $this->customRedirect('/', 'default');\n }\n }\n\t}\n }", "public function getRedirectUrl() {\n return (string) $this->getValue('redirect_url');\n }", "function getRedirectUrl()\r\n\t{\r\n\t\treturn $this->redirect_url;\r\n\t}", "public static function should_redirect_urls_provider() {\n $badurl1 = new \\moodle_url('/');\n $badparam1 = $badurl1->out();\n $badurl2 = new \\moodle_url('admin/tool/mfa/auth.php');\n $badparam2 = $badurl2->out();\n return [\n ['/', 'http://test.server', true],\n ['/admin/tool/mfa/action.php', 'http://test.server', true],\n ['/admin/tool/mfa/factor/totp/settings.php', 'http://test.server', true],\n ['/', 'http://test.server', true, ['url' => $badparam1]],\n ['/', 'http://test.server', true, ['url' => $badparam2]],\n ['/admin/tool/mfa/auth.php', 'http://test.server', false],\n ['/admin/tool/mfa/auth.php', 'http://test.server/parent/directory', false],\n ['/admin/tool/mfa/action.php', 'http://test.server/parent/directory', true],\n ['/', 'http://test.server/parent/directory', true, ['url' => $badparam1]],\n ['/', 'http://test.server/parent/directory', true, ['url' => $badparam2]],\n ['/admin/tool/securityquestions/set_responses.php', 'http://test.server', false],\n ['/admin/tool/securityquestions/set_responses.php', 'http://test.server', false, ['delete' => 1]],\n ['/admin/tool/securityquestions/randompage.php', 'http://test.server', true, ['delete' => 1]],\n ];\n }", "function get_final_url($xid){\n\t$base_url = 'http://www.swarthmore.edu/';\n\t$url = $base_url . $xid; \n\t$ch = curl_init();\n\tcurl_setopt($ch, CURLOPT_URL, $url);\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n\tcurl_setopt($ch, CURLOPT_HEADER, 0);\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\tcurl_setopt($ch, CURLOPT_AUTOREFERER, 1);\n\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n\tcurl_setopt($ch, CURLOPT_MAXREDIRS, 5);\n\tcurl_setopt($ch, CURLOPT_TIMEOUT, 30);\n\tcurl_exec ($ch);\n\treturn str_replace($base_url, '', curl_getinfo($ch, CURLINFO_EFFECTIVE_URL));\n}", "public function getRedirectUrl(): string\n {\n return $this->redirectUrl;\n }", "public function invalidUrl($url) {\n\t\t\n\t\t$this->Session->setFlash(\"Invalid URL\");\n\t\t\n\t\treturn $this->redirect($url);\n\t\t\n\t}", "function parse_url_helper($youtubeURL)\n{\n $link = parse_url($youtubeURL);\n if(!array_key_exists('query', $link))\n throw new Exception('No \\'Query\\'');\n else\n return $link;\n}", "public function validateResultURL($status) {\r\n $this->validateCodes();\r\n\r\n if (empty($_GET['transaction_id'])) {\r\n return 'Empty transaction id';\r\n }\r\n\r\n if (empty($_GET['checksum'])) {\r\n return 'Empty checksum';\r\n }\r\n $text = $_GET['transaction_id'] . $status . $this->merchant_code . $this->passcode;\r\n $hash = Security::hashChecksum($text, $this->secret_key);\r\n if ($hash !== $_GET['checksum']) {\r\n return 'Invalid checksum.';\r\n }\r\n\r\n return true;\r\n }", "function follow_redirects(&$ch, &$url_array)\n{\n if (!is_array($url_array)) {\n throw new Exception('follow_redirects array required', 1);\n }\n $last_url = end($url_array);\n if (false === $last_url) {\n throw new Exception('follow_redirects empty array', 1);\n }\n\n $options = array(\n CURLOPT_URL => $last_url,\n CURLOPT_CONNECTTIMEOUT => 120,\n //CURLOPT_COOKIEFILE => $this->cookie_jar_path, /* make sure you provide FULL PATH to cookie files*/\n CURLOPT_FOLLOWLOCATION => false, // We want to just get redirect url but not to follow it.\n CURLOPT_HEADER => true, // We'll parse redirect url from header.\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_TIMEOUT => 120,\n CURLOPT_NOBODY => true, //exclude the body from the output\n );\n $allswell = curl_setopt_array($ch, $options);\n if (false === $allswell) {\n throw new Exception('follow_redirects failed to set curl options', 1);\n }\n $response = curl_exec($ch);\n\n preg_match_all('/^Location:(.*)$/mi', $response, $matches);\n if (empty($matches[1])) {\n $redirected = false;\n } else {\n $redirected = true;\n $url_array[] = trim($matches[1][0]); // append the url redirected to to the array\n }\n\n return $redirected;\n}", "function get_effective_url()\n\t{\n\t\t//最后一个有效的url地址\n\t\treturn curl_getinfo($this->ch, CURLINFO_EFFECTIVE_URL);\n\t}", "function wp_parse_url($url, $component = -1)\n {\n }", "function getRedirectLocation($response){\n\tif(preg_match(\"~Location: (.+)\\r\\n~\", $response, $match)){\n\t\treturn $match[1];\n\t}\n\n\t_log(\"getRedirectLocation: unparsable HTTP headers\", true);\n\treturn false;\n}", "public function getRedirectURL()\n {\n return $this->redirectURL;\n }", "public function getRedirectUrl()\r\n {\r\n return \"{$this->data['redirect_url']}?session={$this->data['session']}\";\r\n }", "abstract public function getPaymentPageUrl();", "abstract public function getRawRequestUrl();", "protected function getRedirectUrl(): string\n\t{\n\t\tif($this->input === null)\n\t\t{\n\t\t\treturn $this->urlBuilder->current();\n\t\t}\n\n\t\treturn $this->input->getRedirectUrl();\n\t}", "function redirect_guess_404_permalink()\n {\n }", "function tep_redirect($url) {\n global $logger;\n\n header('Location: ' . $url);\n\n if (STORE_PAGE_PARSE_TIME == 'true') {\n if (!is_object($logger)) $logger = new logger;\n $logger->timer_stop();\n }\n\n exit;\n}", "public function getProperUrl($url)\n {\n $file = $url;\n $file_headers = @get_headers($file);\n if ($file_headers[0] == 'HTTP/1.1 404 Not Found') {\n echo \"This page does not exist!\";\n return null;\n }\n\n $ch = curl_init();\n\n curl_setopt($ch, CURLOPT_HEADER, true);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n\n curl_setopt($ch, CURLOPT_URL, $url);\n $out = curl_exec($ch);\n\n $out = str_replace(\"\\r\", \"\", $out);\n\n $headers_end = strpos($out, \"\\n\\n\");\n if ($headers_end !== false) {\n $out = substr($out, 0, $headers_end);\n }\n\n $headers = explode(\"\\n\", $out);\n\n foreach ($headers as $header) {\n if (substr($header, 0, 10) == \"Location: \") {\n $url = substr($header, 10);\n break;\n }\n }\n\n curl_close($ch);\n\n return $url; //return url if everything is ok\n }", "function redirectURL()\n{\n\t$redirect = '';\n\t$loc = Configuration::get('LoginRadius_redirect');\n\tif ($loc == 'profile')\n\t\t$redirect = 'my-account.php';\n\telseif ($loc == 'url')\n\t{\n\t\t$custom_url = Configuration::get('redirecturl');\n\t\t$redirect = !empty($custom_url) ? $custom_url : 'my-account.php';\n\t}\n\telse\n\t{\n\t\tif (Tools::getValue('back'))\n\t\t{\n\t\t\tif (_PS_VERSION_ >= 1.6)\n\t\t\t{\n\t\t\t\t$loc = $_SERVER['REQUEST_URI'];\n\t\t\t\t$redirect_location = explode('back=', $loc);\n\t\t\t\t$redirect = $redirect_location['1'];\n\t\t\t}\n\t\t\telse\n\t\t\t\t$redirect = Tools::getValue('back');\n\t\t}\n\t\telseif (empty($redirect))\n\t\t{\n\t\t\t$http = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'Off' && !empty($_SERVER['HTTPS'])) ? 'https://' : 'http://');\n\t\t\t$redirect = urldecode($http.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);\n\t\t}\n\t}\n\treturn $redirect;\n}", "public function getRedirectUrl() {\n return $this->redirectUrl;\n }", "public function getRedirectUrl()\n {\n return $this->redirectUrl;\n }", "public function getRedirectUrl()\n {\n return $this->redirectUrl;\n }", "function request_not_found(&$url, $page) {\n if(substr($url, -1) != '/') {\n $page = \\femto\\Page::resolve($url.'/');\n if($page) {\n header('Location: '.$page['url'], true, 301);\n exit();\n }\n }\n}", "protected function getSuccessLocation() {\n\t\treturn $_SERVER['HTTP_REFERER'];\n\t}", "public function getRedirectUrl()\n {\n return $this->redirectUrl;\n }", "protected function followRedirect()\n\t\t{\n\t\t\tif (!$this->followRedirect)\n\t\t\t\treturn false; /* disabled */\n\t\t\tif (!isset($this->responseHeaders['Location']) || !is_string($this->responseHeaders['Location'])) {\n\t\t\t\tSERIA_Base::debug('HTTP protocol violation: No location header with response code: '.$this->responseCode);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$redirectPoint = $this->url;\n\t\t\t$location = $this->responseHeaders['Location'];\n\n\t\t\tif(strpos($location, '://')===false)\n\t\t\t{ // handling illegal redirects (Location: /path)\n\t\t\t\t$pi = parse_url($this->url);\n\t\t\t\t$location = $pi['scheme'].'://'.$pi['host'].$location;\n\t\t\t}\n\n\t\t\tif ($this->responseCode == 301 || $this->responseCode == 307) {\n\t\t\t\t/*\n\t\t\t\t * Check whether this is a post request:\n\t\t\t\t */\n\t\t\t\tif (isset($this->currentRequest['postFields']) && $this->currentRequest['postFields'])\n\t\t\t\t\t$post = $this->currentRequest['postFields'];\n\t\t\t\telse {\n\t\t\t\t\tif (isset($this->currentRequest['postFiles']) && $this->currentRequest['postFiles'])\n\t\t\t\t\t\t$post = true;\n\t\t\t\t\telse\n\t\t\t\t\t\t$post = false;\n\t\t\t\t}\n\t\t\t\tif (isset($this->currentRequest['postFiles']) && $this->currentRequest['postFiles'])\n\t\t\t\t\t$postFiles = $this->currentRequest['postFiles'];\n\t\t\t\telse\n\t\t\t\t\t$postFiles = array();\n\t\t\t} else {\n\t\t\t\t$post = false;\n\t\t\t\t$postFiles = array();\n\t\t\t}\n\t\t\t$connectToHost = false;\n\t\t\t$port = false;\n\t\t\t$from = parse_url($redirectPoint);\n\t\t\t$to = parse_url($location);\n\t\t\tif ($from['scheme'] == $to['scheme'] && $from['host'] == $to['host'] && $from['port'] == $to['port']) {\n\t\t\t\tif (isset($this->currentRequest['connectToHost']))\n\t\t\t\t\t$connectToHost = $this->currentRequest['connectToHost'];\n\t\t\t\t$port = $this->currentRequest['port'];\n\t\t\t}\n\t\t\t$this->navigateTo($location, $post, $connectToHost, $port);\n\t\t\tforeach ($postFiles as $name => $file)\n\t\t\t\t$this->postFile($name, $file);\n\t\t\tif ($this->responseCode == 301)\n\t\t\t\t$this->movedPermanently[$redirectPoint] = $location;\n\t\t\treturn true;\n\t\t}", "private function full($url = NULL)\n\t{\n\t\ttry\n\t\t{\n\t\t\t$headers = get_headers($url,1);\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t// Some kind of error\n\t\t\t// Abandon and return original url\n\t\t\tKohana::$log->add(Log::ERROR, Kohana_Exception::text($e));\n\t\t\treturn $url;\n\t\t}\n\n\t\tif (empty($headers))\n\t\t{\n\t\t\treturn $url;\n\t\t}\n\n\t\tif ( ! isset($headers['Location']))\n\t\t{\n\t\t\treturn $url;\n\t\t}\n\t\t$url = $headers['Location'];\n\t\t\n\t\t// If an Array is returned for redirects\n\t\t// Return the last item in the array\n\t\treturn is_array($url)? end($url) : $url;\n\t}", "function get_all_redirects($url){\n\t$redirects = array();\n\twhile ($newurl = get_redirect_url($url)){\n\t\tif (in_array($newurl, $redirects)){\n\t\t\tbreak;\n\t\t}\n\t\t$redirects[] = $newurl;\n\t\t$url = $newurl;\n\t}\n\treturn $redirects;\n}", "private function getIdFromRedirectedUrl(): string\n {\n $url = $this->getResponse()\n ->getHeader('Location')\n ->getFieldValue();\n $pattern = '!/id/(.*?)/!';\n $result = preg_match($pattern, $url, $matches);\n\n return $result ? $matches[1] : '';\n }", "function sanitize_trackback_urls($to_ping)\n {\n }", "function parseUrl($origin) {\n preg_match('<http.+/post/\\d+>', $origin, $new);\n\n return $new[0];\n}", "public function getOrderPlaceRedirectUrl()\n\t{\n return Mage::getUrl('hostedpayments/processing/pay');\n\t}", "function redirect_error($code, $url = null) {\n\n global $CFG;\n\n // Set the redirect URL if it wasn't specified as a parameter\n if (!$url) {\n $url = $CFG->wwwroot;\n }\n\n // URL encode parameters to error page\n $code = urlencode($code);\n $url = urlencode($url);\n\n // Redirect user to error page with encoded parameters\n redirect($CFG->wwwroot . \"/blocks/courseprefs/error.php?error=$code\" .\n ($url ? \"&url=$url\" : ''));\n}", "public function getRedirectURI() {\n return $this->request->query->get(\"redirect_uri\") != NULL ? $this->request->query->get(\"redirect_uri\") : ($this->request->query->get(\"state\") != NULL ? $this->request->query->get(\"state\") : \"\");\n }", "public function parseURL()\n {\n if (isset($_GET['url'])) {\n $url = rtrim($_GET['url'], '/'); //menghapus tanda / di akhir url\n $url = filter_var($url, FILTER_SANITIZE_URL);//memfilter url dari karakter aneh (hack)\n $url = explode('/', $url); //memecah url yang diinput dengan delimiter / dan menjadikannya array\n return $url;\n }\n }", "function _getRedirectionURLs() {\n // old method was unreliable.\n // use 0 = path constructor lookup\n // use 1 = itemid constructor lookup\n\n $url_creat_method = 0;\n $menu =& JApplication::getMenu('site');\n $redirectURLs = array();\n\n $redirectURLs['old_membership_itemid'] = $this->params->get('redirect_old_membership');\n $redirectURLs['old_membership_item'] = $menu->getItem( $redirectURLs['old_membership_itemid'] );\n $redirectURLs['old_membership'] = JRoute::_($redirectURLs['old_membership_item']->link\n .'&Itemid='\n .$redirectURLs['old_membership_itemid'], FALSE);\n\n $redirectURLs['bad_password_itemid'] = $this->params->get('redirect_bad_password');\n $redirectURLs['bad_password_item'] = $menu->getItem( $redirectURLs['bad_password_itemid'] );\n $redirectURLs['bad_password'] = JRoute::_($redirectURLs['bad_password_item']->link\n .'&Itemid='\n .$redirectURLs['bad_password_itemid'], FALSE);\n\n $redirectURLs['no_match_itemid'] = $this->params->get('redirect_no_match');\n $redirectURLs['no_match_item'] = $menu->getItem( $redirectURLs['no_match_itemid'] );\n $redirectURLs['no_match'] = JRoute::_($redirectURLs['no_match_item']->link\n .'&Itemid='\n .$redirectURLs['no_match_itemid'], FALSE);\n\n //determine how expired redirection will be handled\n $redirectURLs['expired_method'] = $this->params->get('expired_method');\n $redirectURLs['expired_itemid'] = $this->params->get('redirect_expired_menu');\n $redirectURLs['expired_item'] = $menu->getItem( $redirectURLs['expired_itemid'] );\n $redirectURLs['expired'] = JRoute::_($redirectURLs['expired_item']->link\n .'&Itemid='\n .$redirectURLs['expired_itemid'], FALSE);\n $redirectURLs['expired_contribpageid'] = $this->params->get('redirect_expired_contribpage');\n $redirectURLs['expired_contribpage'] = 'index.php?option=com_civicrm&task=civicrm/contribute/transact&reset=1&id='\n .$redirectURLs['expired_contribpageid'];\n\n return $redirectURLs;\n }", "abstract protected function getTokenUrl();", "public function isValidUrlInvalidRessourceDataProvider() {}", "public function getReturnUrl()\n {\n return $this->_getUrl(self::URL_REDIRECT);\n }", "function get_all_redirects($url){\n\t\t$redirects = array();\n\t\twhile ($newurl = get_redirect_url($url)){\n\t\t\tif (in_array($newurl, $redirects)){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$redirects[] = $newurl;\n\t\t\t$url = $newurl;\n\t\t}\n\t\treturn $redirects;\n\t}", "public function getRedirectUrl()\n {\n return $this->_redirectUrl;\n }", "public function getRedirectUrl()\n {\n return $this->_redirectUrl;\n }" ]
[ "0.64620984", "0.6188506", "0.6073079", "0.60307777", "0.5978192", "0.5978192", "0.5978192", "0.5978192", "0.5978192", "0.59565467", "0.5854566", "0.5853595", "0.58483976", "0.58380926", "0.5820106", "0.58071005", "0.5725522", "0.56887007", "0.56564033", "0.563576", "0.55991673", "0.558122", "0.5573659", "0.557292", "0.55594635", "0.5549341", "0.55404615", "0.5536296", "0.5533961", "0.5525435", "0.5516329", "0.5516329", "0.549803", "0.54757607", "0.54743457", "0.5465437", "0.5464657", "0.5464497", "0.5452958", "0.54420066", "0.5438453", "0.54252243", "0.5414369", "0.5410317", "0.5389449", "0.5379045", "0.5366966", "0.53530264", "0.53491426", "0.53420776", "0.5337862", "0.53362024", "0.5335301", "0.5298342", "0.52963877", "0.5293407", "0.52844185", "0.52692884", "0.52635854", "0.5262772", "0.52064735", "0.5191859", "0.51875806", "0.51834464", "0.5182471", "0.5179509", "0.51676476", "0.5165754", "0.51599365", "0.5156748", "0.5153863", "0.5150467", "0.5121718", "0.5117383", "0.5114826", "0.511414", "0.5110041", "0.51047647", "0.51041025", "0.51041025", "0.51039135", "0.5103909", "0.5100125", "0.5092288", "0.5092119", "0.50898504", "0.50830436", "0.5077563", "0.506863", "0.5068159", "0.5064614", "0.5062514", "0.50593007", "0.5056064", "0.50551355", "0.5046141", "0.5046035", "0.5045137", "0.5041198", "0.5041198" ]
0.62009406
1
Parse transaction redirect canceled URL
public function validateCanceledURL() { return $this->validateResultURL(self::CANCELED_STATUS); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRedirectUrl(): string;", "public function getRedirectUrl();", "public function getRedirectUrl();", "public function getRedirectUrl();", "public function getRedirectUrl();", "public function getRedirectUrl();", "protected function getRedirectUrl()\n {\n return null;\n }", "public function cancelUrl(): string\n {\n return Request::url() . '?' . http_build_query([\n 'return' => 'cancel',\n 'oc-mall_payment_id' => $this->getPaymentId(),\n ]);\n }", "public function getOrderPlaceRedirectUrl()\n {\n return Mage::getUrl('postfinancecheckout/transaction/redirect', array(\n '_secure' => true\n ));\n }", "public function getRedirectUrl()\n {\n }", "private function parseURLRequest() {\n\t\t# Redirects the user upon success and redirects to following error-messages upon errors:\n\t\t# 201 - Missing url-entry for the given ID\n\n\t\t$this->parseCustomURL();\t# Let's see if there's an custom-url we gotten our hands on\n\n\t\t$urlID = $this->baseToInt($_GET['u']);\n\t\t$this->verifyID($urlID);\n\n\t\t# assuming everything's good, moving on.\n\t\t\n\t\t$query = $this->db->prepare(\"SELECT `url` FROM urls WHERE `id` = :id\");\n\t\t$query->bindParam(\":id\", $urlID);\n\t\t$query->execute();\n\t\t\n\t\t$data = $query->fetch();\n\t\t\n\t\tif(!isset($data['url'])) {\n\t\t\t$this->debugLog(\"The database did not return any URL for ID {$_GET['u']}\");\n\t\t\theader(\"Location:{$this->siteURL}error/201\");\n\t\t\tdie;\n\t\t}\n\t\telse {\n\t\t\t$this->debugLog(\"Redirecting to {$data['url']}\");\n\t\t\t$this->logUrlClick($urlID);\n\t\t\theader(\"HTTP/1.1 301 Moved Permanently\");\n\t\t\theader(\"Location: {$data['url']}\"); # Should we use URL-encode here?\n\t\t\tdie;\n\t\t}\n\t}", "public function getRedirectUrl()\r\n\t{\r\n\t\treturn $this->payment->links[1]->getHref();\r\n\t}", "public function GetRedirect ();", "public function getRedirectUri(): string;", "protected function processRedirect() {}", "public function getOrderPlaceRedirectUrl()\n {\n return Mage::getUrl('pagseguro/payment/request');\n }", "public function getCancelUrl() {\n return $this->getReturnUrl();\n }", "public function validateRedirectUrlClearsUrlDataProvider() {}", "abstract protected function getRedirectUrl(): Url;", "public function getOrderPlaceRedirectUrl()\n\t{\n return Mage::getUrl('hostedpayments/processing/pay');\n\t}", "public function getRedirectUri();", "public function getRedirectUri();", "public function getRedirectUrl()\n {\n return $this->request->getTestMode()\n ? 'https://sslpayment.cathaybkdev.com.tw/EPOSService/Payment/OrderInitial.aspx'\n : 'https://sslpayment.uwccb.com.tw/EPOSService/Payment/OrderInitial.aspx';\n }", "public function validateRedirectUrlKeepsCleanUrlDataProvider() {}", "public function getCheckoutRedirectUrl()\n {\n return Mage::getUrl('radial_paypal_express/checkout/start');\n }", "public function getRedirectUrl() : string\n {\n return '';\n }", "protected function getRedirectUrl()\n {\n $sBaseUrl = Registry::getConfig()->getCurrentShopUrl().'index.php?cl=order&fnc=handleMollieReturn';\n\n return $sBaseUrl.$this->mollieGetAdditionalParameters();\n }", "public function getSuccessUrl();", "public function get_cancel_url() {\n\t\t$cancel_url = add_query_arg(\n\t\t\tarray(\n\t\t\t\t'subscription' => $this->get_id(),\n\t\t\t\t'key' => $this->get_key(),\n\t\t\t\t'action' => 'cancel',\n\t\t\t), home_url()\n\t\t);\n\n\t\treturn $cancel_url;\n\t}", "function _url_final_redirect( $url ) {\n\t\treturn IMFORZA_Utils::url_final_redirect( $url );\n\t}", "public function getCancelUrl()\n {\n return Mage::getUrl('payulite/processing/cancel', array('_secure' => true, 'order' => '{{ORDER_ID}}'));\n }", "function my_give_change_failed_transaction_uri( $uri ) {\n\n\t$form_id = isset( $_POST['give-form-id'] ) ? $_POST['give-form-id'] : '';\n\n\tif ( $form_id == 650 ) {\n\t\t//Return a custom permalink or URL.\n\t\treturn get_permalink( 123 );\n\t} else {\n\t\t//Always return default $uri.\n\t\treturn $uri;\n\t}\n\n}", "public function getOrderPlaceRedirectUrl()\n {\n return Mage::getUrl('paynovapayment/processing/payment');\n }", "protected function getRedirectUrl()\n\t{\n if ($customURL = $this->input->getBase64('returnurl', ''))\n {\n $customURL = base64_decode($customURL);\n }\n\n $url = !empty($customURL) ? $customURL : 'index.php?option='\n . $this->container->componentName\n . '&view='\n . $this->container->inflector->pluralize($this->view)\n . $this->getItemidURLSuffix(); // e.g. '&Itemid=123' or an empty string if no Itemid\n\n return $url;\n }", "function get_final_url($url){\n\t\t$redirects = get_all_redirects($url);\n\t\tif (count($redirects)>0){\n\t\t\treturn array_pop($redirects);\n\t\t} else {\n\t\t\treturn $url;\n\t\t}\n\t}", "protected function checkRedirect() {}", "public function getUrl() {\n return $this->_gatewayRedirect->getUrl ();\n }", "function RedirectLoanprofileurl() {\n\t$RequestUrl = $_SERVER['REQUEST_URI'];\n\t$parsedurl = parse_url($RequestUrl);\n\tif(isset($parsedurl['query'])) {\n\t\tparse_str($parsedurl['query'], $qryStr); \n\t\tif(isset($qryStr['p']) && $qryStr['p']==14 && isset($qryStr['u']) && isset($qryStr['l'])) {\n\t\t\t$loanprurl = getLoanprofileUrl($qryStr['u'], $qryStr['l']);\n\t\t\tunset($qryStr['p']);\n\t\t\tunset($qryStr['u']);\n\t\t\tunset($qryStr['l']);\n\t\t\t$qrystrToAppnd = http_build_query($qryStr);\n\t\t\tif(!empty($qrystrToAppnd)) {\n\t\t\t\t$urlMovedto = SITE_URL.$loanprurl.\"?\".$qrystrToAppnd;\n\t\t\t}else {\n\t\t\t\t$urlMovedto = SITE_URL.$loanprurl;\n\t\t\t}\n\t\t\theader(\"HTTP/1.1 301 Moved Permanently\");\n\t\t\theader(\"Location: \".$urlMovedto);\n\t\t\texit;\n\t\t}\n\t}\n}", "abstract public function getRawRequestUrl();", "public function validateRedirectUrlClearsInvalidUrlInSubdirectoryDataProvider() {}", "public function RedirectURL(){\n //echo Director::baseURL();exit(); \n return urlencode(Director::baseURL().$this->request->getURL(true));\n }", "function get_final_url($url){\n\t$redirects = get_all_redirects($url);\n\tif (count($redirects)>0){\n\t\treturn array_pop($redirects);\n\t} else {\n\t\treturn $url;\n\t}\n}", "public function transactionFormGetActionURI ();", "function get_url_redirected($url)\n{\n $url_list = array();\n $url_list[] = $url;\n\n $ch = curl_init();\n if (false === $ch) {\n curl_close($ch);\n throw new Exception(\"Bad request url in get_url: $url\", 1);\n }\n\n for ($redirects = 0; follow_redirects($ch, $url_list); ++$redirects) {}\n $url = end($url_list);\n\n curl_close($ch);\n\n return $url;\n}", "private function get_ignore_url() {\n\t\t$arr_params = array(\n\t\t\t'frm_restart_tour' => false,\n\t\t\t'frm_ignore_tour' => '1',\n\t\t\t'nonce' => wp_create_nonce( 'frm-ignore-tour' ),\n\t\t);\n\n\t\treturn add_query_arg( $arr_params );\n\t}", "public function callbacktransparentredirectAction()\n {\n $model = Mage::getModel('paymentsensegateway/direct');\n $order = Mage::getModel('sales/order');\n $order->load(Mage::getSingleton('checkout/session')->getLastOrderId());\n $nVersion = Mage::getModel('paymentsensegateway/direct')->getVersion();\n \n \n $hmHashMethod = $model->getConfigData('hashmethod');\n $szPassword = $model->getConfigData('password');\n $szPreSharedKey = $model->getConfigData('presharedkey');\n \n $szPaREQ = $this->getRequest()->getParams('Oper');\n $szPaRES = $this->getRequest()->getParams('TotalPagado');\n $nStatusCode = $this->getRequest()->getParams('Razon');\n \n if($szPaREQ && $szPaRES != 0)\n {\n self::_paymentComplete($szPaREQ, $szPaRES, $nStatusCode);\n }\n \n else\n {\n $error = Paymentsense_Paymentsensegateway_Model_Common_GlobalErrors::ERROR_260;\n Mage::logException($exc);\n \n $orderState = 'pending_payment';\n $orderStatus = 'pys_failed_hosted_payment';\n $order->setCustomerNote(Mage::helper('paymentsensegateway')->__('Transparent Redirect Payment Failed'));\n $order->setState($orderState, $orderStatus, $nStatusCode, false);\n $order->save();\n \n \n Mage::getSingleton('core/session')->addError($error);\n \n \n $this->_clearSessionVariables();\n $this->_redirect('checkout/onepage/failure');\n }\n \n \n \n }", "static function get_final_url($url)\n\t\t{\n\t\t\t$redirects = CUtils::get_all_redirects($url);\n\t\t\tif (count($redirects)>0)\n\t\t\t{\n\t\t\t\treturn array_pop($redirects);\n\t\t\t} \n\t\t\telse \n\t\t\t{\n\t\t\t\treturn $url;\n\t\t\t}\n\t\t}", "public function getRedirectUrl()\n {\n\n if ($brandCode = $this->getBrandCode()) {\n return 'https://test.adyen.com/hpp/skipDetails.shtml';\n } else {\n return 'https://test.adyen.com/hpp/pay.shtml';\n }\n }", "public function getOrderPlaceRedirectUrl()\n {\n if (Mage::getStoreConfig('payment/bitcoin/fullscreen')) {\n if(Mage::helper(\"bitcoin\")->doesTheStoreHasSSL()){\n $target_url = Mage::getUrl(\"bitcoin/index/pay\" , array(\"_secure\" => true));\n }else{\n $target_url = Mage::getUrl(\"bitcoin/index/pay\" , array(\"_secure\" => false));\n }\n return $target_url;\n } else {\n return '';\n }\n }", "public function redirectToExternalUrl() {}", "public function getOrderPlaceRedirectUrl()\r\n {\r\n \t$result = false;\r\n \t$session = Mage::getSingleton('checkout/session');\r\n \t$nVersion = $this->getVersion();\r\n \t$mode = $this->getConfigData('mode');\r\n \t\r\n \tif($session->getMd() &&\r\n \t\t$session->getAcsurl() &&\r\n \t\t$session->getPareq())\r\n \t{\r\n \t\t// Direct (API) for 3D Secure payments\r\n \t\tif($nVersion >= 1410)\r\n\t \t{\r\n\t\t \t// need to re-add the ordered item quantity to stock as per not completed 3DS transaction\r\n\t\t \tif($mode != Paymentsense_Paymentsensegateway_Model_Source_PaymentMode::PAYMENT_MODE_TRANSPARENT_REDIRECT)\r\n\t\t \t{\r\n\t\t \t\t$order = Mage::getModel('sales/order')->load(Mage::getSingleton('checkout/session')->getLastOrderId());\r\n\t\t \t\t$this->addOrderedItemsToStock($order);\r\n\t\t \t}\r\n\t \t}\r\n \t\t\r\n \t\t$result = Mage::getUrl('paymentsensegateway/payment/threedsecure', array('_secure' => true));\r\n \t}\r\n \tif($session->getHashdigest())\r\n \t{\r\n \t\t// Hosted Payment Form and Transparent Redirect payments\r\n \t\tif($nVersion >= 1410)\r\n\t \t{\r\n\t\t \t// need to re-add the ordered item quantity to stock as per not completed 3DS transaction\r\n\t\t \tif(!Mage::getSingleton('checkout/session')->getPares())\r\n\t\t \t{\r\n\t\t \t\t$order = Mage::getModel('sales/order')->load(Mage::getSingleton('checkout/session')->getLastOrderId());\r\n\t\t \t\t$this->addOrderedItemsToStock($order);\r\n\t\t \t}\r\n\t \t}\r\n \t\r\n \t\t$result = Mage::getUrl('paymentsensegateway/payment/redirect', array('_secure' => true));\r\n \t}\r\n \r\n return $result;\r\n }", "function getRedirectUrl()\r\n\t{\r\n\t\treturn $this->redirect_url;\r\n\t}", "public function getReturnUrl()\n {\n return $this->_getUrl(self::URL_REDIRECT);\n }", "public function getRedirectURI() {\n return $this->request->query->get(\"redirect_uri\") != NULL ? $this->request->query->get(\"redirect_uri\") : ($this->request->query->get(\"state\") != NULL ? $this->request->query->get(\"state\") : \"\");\n }", "function url_test( $url ) {\n $timeout = 10;\n $ch = curl_init();\n curl_setopt ( $ch, CURLOPT_URL, $url );\n curl_setopt ( $ch, CURLOPT_RETURNTRANSFER, 1 );\n curl_setopt ( $ch, CURLOPT_TIMEOUT, $timeout );\n $http_respond = curl_exec($ch);\n $http_respond = trim( strip_tags( $http_respond ) );\n $http_code = curl_getinfo( $ch, CURLINFO_HTTP_CODE );\n if ( ( $http_code == \"200\" ) || ( $http_code == \"302\" ) ) {\n return true;\n } else {\n // return $http_code;, possible too\n return false;\n }\n curl_close( $ch );\n}", "protected function _getCancelUrl()\n {\n return $this->getUrl('*/*/cancel', array('agreement' => $this->_getBillingAgreement()->getAgreementId()));\n }", "function urlCanceled()\r\n\t{\r\n\t\t$input_def['id'] = 'urlCanceled';\r\n\t\t$input_def['name'] = 'urlCanceled';\r\n\t\t$input_def['type'] = 'text';\r\n\t\t$inputValue = '';\r\n\t\tif(isset($_POST[$input_def['name']]) && (wpklikandpay_option::getStoreConfigOption('wpklikandpay_store_urloption', $input_def['name']) == ''))\r\n\t\t{\r\n\t\t\t$inputValue = wpklikandpay_tools::varSanitizer($_POST[$input_def['name']], '');\r\n\t\t}\r\n\t\telseif(wpklikandpay_option::getStoreConfigOption('wpklikandpay_store_urloption', $input_def['name']) != '')\r\n\t\t{\r\n\t\t\t$inputValue = wpklikandpay_option::getStoreConfigOption('wpklikandpay_store_urloption', $input_def['name']);\r\n\t\t}\r\n\t\t$input_def['value'] = $inputValue;\r\n\r\n\t\techo wpklikandpay_form::check_input_type($input_def);\r\n\t}", "public function getRedirectUrl() {\n return $this->redirectUrl;\n }", "abstract public function getPaymentPageUrl();", "public function getRedirectUrl()\n {\n return $this->redirectUrl;\n }", "abstract protected function get_redirect_page();", "public function getOrderPlaceRedirectUrl()\n {\n if($this->_getHelper()->isRedirectMode()) {\n $paymentUrl = Mage::getSingleton('core/session')->getPicpayPaymentUrl();\n\n if ($paymentUrl) {\n return $paymentUrl;\n }\n else {\n Mage::throwException($this->_getHelper()->__(\"Invalid payment url\"));\n }\n }\n\n $isSecure = Mage::app()->getStore()->isCurrentlySecure();\n return Mage::getUrl('checkout/onepage/success', array('_secure' => $isSecure));\n }", "public function getRedirectURL()\n {\n return $this->redirectURL;\n }", "private function getRedirectUrl()\n {\n return $this->getConfigData('url');\n }", "private function getCallbackURL()\n\t{\n\t\t$sandbox = $this->params->get('sandbox', 0);\n\n\t\tif ($sandbox)\n\t\t{\n\t\t\treturn 'ssl://sandbox.payfast.co.za';\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn 'ssl://www.payfast.co.za';\n\t\t}\n\t}", "function cancel()\n\t{\n\t\tJRequest::checkToken() or jexit( 'Invalid Token' );\n\n\t\t// Checkin the weblink\n\t\t$model = $this->getModel('weblink');\n\t\t$model->checkin();\n\n\t\t$this->setRedirect( 'index.php?option=com_weblinks' );\n\t}", "public function getRedirectUrl()\n {\n return $this->redirectUrl;\n }", "public function getRedirectUrl()\n {\n return $this->redirectUrl;\n }", "public function getOrderPlaceRedirectUrl()\n {\n return $this->getConfig()->getPaymentRedirectUrl();\n }", "public function getRedirectUrl()\r\n {\r\n return \"{$this->data['redirect_url']}?session={$this->data['session']}\";\r\n }", "public function getRedirectUrl() {\n return (string) $this->getValue('redirect_url');\n }", "public function processPaypal(){\r\n\t// and redirect to thransaction details page\r\n\t}", "public function getOkUrl()\n {\n return $this->url('./receipt');\n }", "public function getOrderPlaceRedirectUrl()\n {\n //The form of the Payment Gateway will be displayed to him\n return Mage::getUrl('mypaymentmethod1/payment/redirect', array('_secure' => false));\n }", "public function sendRedirect() {}", "public function getCancelUrl()\n {\n // TODO: Implement getCancelUrl() method.\n }", "function sanitize_trackback_urls($to_ping)\n {\n }", "public function getOrderPlaceRedirectUrl()\n {\n $this->debugData('[INFO] In cryptomkt_Core_Model_Method_Bitcoin::getOrderPlaceRedirectUrl(): $_redirectUrl is ' . self::$_redirectUrl);\n return self::$_redirectUrl;\n }", "public function getRedirectUrl()\n {\n return $this->_redirectUrl;\n }", "public function getRedirectUrl()\n {\n return $this->_redirectUrl;\n }", "public function getRedirectUrl()\n {\n return $this->_redirectUrl;\n }", "final public static function transactionBeingRedirected()\n {\n return self::get(2053);\n }", "public function getRedirectUrl(): string\n {\n return $this->redirectUrl;\n }", "public function parse($url) {\r\n\t\tif ($params = parent::parse($url)) {\r\n\t\t\t$this->options += array(\r\n\t\t\t\t'permanent' => true,\r\n\t\t\t);\r\n\t\t\t$this->redirect($params);\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public function getOrderPlaceRedirectUrl()\n {\n $info = $this->getInfoInstance();\n\n return $info->getAdditionalInformation(self::REDIRECT_URL_KEY);\n }", "public function get_redirect_to() {\n\t\treturn empty( $this->data['redirect_to'] ) ? '' : $this->data['redirect_to'];\n\t}", "protected function getRedirectUrl()\n\t{\n\t\treturn app('Illuminate\\Routing\\UrlGenerator')->previous();\n\t}", "function tep_redirect($url) {\n global $logger;\n\n header('Location: ' . $url);\n\n if (STORE_PAGE_PARSE_TIME == 'true') {\n if (!is_object($logger)) $logger = new logger;\n $logger->timer_stop();\n }\n\n exit;\n}", "abstract protected function token_url();", "protected function getRedirectUrl(): string\n\t{\n\t\tif($this->input === null)\n\t\t{\n\t\t\treturn $this->urlBuilder->current();\n\t\t}\n\n\t\treturn $this->input->getRedirectUrl();\n\t}", "abstract protected function getTokenUrl();", "public function redirectUrl($redirectTo = null) : string;", "function get_final_url($xid){\n\t$base_url = 'http://www.swarthmore.edu/';\n\t$url = $base_url . $xid; \n\t$ch = curl_init();\n\tcurl_setopt($ch, CURLOPT_URL, $url);\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n\tcurl_setopt($ch, CURLOPT_HEADER, 0);\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\tcurl_setopt($ch, CURLOPT_AUTOREFERER, 1);\n\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n\tcurl_setopt($ch, CURLOPT_MAXREDIRS, 5);\n\tcurl_setopt($ch, CURLOPT_TIMEOUT, 30);\n\tcurl_exec ($ch);\n\treturn str_replace($base_url, '', curl_getinfo($ch, CURLINFO_EFFECTIVE_URL));\n}", "public function redirectURLCallback($params) \n {\n // code the unique code generated for this request - to be used in the token call later in the flow.\n // username the name of the Constant Contact user that is authenticating.\n if ($params['username']==$this->username) {\n $this->code = $params['code'];\n $this->tokenRequest();\n $this->addContacts(); // evrything OK => add contacts\n }\n \n }", "public function cancelTransaction(){\n \n return Redirect::route('dashboard')\n\t\t\t \t->with('alertError', 'EWAY Transaction cancelled by user');\n }", "function get_trackback_url()\n {\n }", "public function redirect() {\n\n if (isset($_GET['view'])) {\n $view = \"view=\" . $_GET['view'];\n } else {\n $view = \"view=return\";\n }\n\n $return_url = substr(BASE_URL, 0, -12) . 'index.php?' . $view . '&transactionid=' . $_GET['transactionid'];\n header(\"Location: \" . $return_url);\n }", "function get_redirect_url($url){\n global $cookie;\n\t$redirect_url = null; \n \n\t$url_parts = @parse_url($url);\n\tif (!$url_parts) return false;\n\tif (!isset($url_parts['host'])) return false; //can't process relative URLs\n\tif (!isset($url_parts['path'])) $url_parts['path'] = '/';\n \n\t$sock = fsockopen($url_parts['host'], (isset($url_parts['port']) ? (int)$url_parts['port'] : 80), $errno, $errstr, 30);\n\tif (!$sock) return false;\n \n\t$request = \"HEAD \" . $url_parts['path'] . (isset($url_parts['query']) ? '?'.$url_parts['query'] : '') . \" HTTP/1.1\\r\\n\"; \n\t$request .= 'Host: ' . $url_parts['host'] . \"\\r\\n\"; \n\t$request .= 'Cookie: ' . $cookie . \"\\r\\n\"; \n\t$request .= \"Connection: Close\\r\\n\\r\\n\"; \n\tfwrite($sock, $request);\n\t$response = '';\n\twhile(!feof($sock)) $response .= fread($sock, 8192);\n\tfclose($sock);\n\n\tif (preg_match('/^Location: (.+?)$/m', $response, $matches)){\n\t\tif ( substr($matches[1], 0, 1) == \"/\" )\n\t\t\treturn $url_parts['scheme'] . \"://\" . $url_parts['host'] . trim($matches[1]);\n\t\telse\n\t\t\treturn trim($matches[1]);\n \n\t} else {\n\t\treturn $url;\n\t}\n \n}", "public function error301($redirectURI)\n {\n }", "public function getExecuteUrl()\r\n\t{\r\n\t\treturn $this->payment->links[2]->getHref();\r\n\t}" ]
[ "0.58109176", "0.57798684", "0.57798684", "0.57798684", "0.57798684", "0.57798684", "0.5774087", "0.5745655", "0.5706383", "0.5702832", "0.57019633", "0.5668898", "0.5656144", "0.5628209", "0.56242675", "0.55989325", "0.5575704", "0.5551249", "0.5544042", "0.55298066", "0.5517218", "0.5517218", "0.55085176", "0.54918915", "0.5473211", "0.54599017", "0.5459258", "0.5454514", "0.5429531", "0.5426696", "0.5425092", "0.5418593", "0.5383183", "0.53651357", "0.5345507", "0.5337045", "0.533699", "0.53317004", "0.53291994", "0.5325945", "0.5322712", "0.53131276", "0.5286089", "0.52802664", "0.5275331", "0.5260339", "0.52463216", "0.5238301", "0.5222223", "0.52162856", "0.5207797", "0.52032936", "0.5194335", "0.5193821", "0.51938117", "0.519163", "0.5186569", "0.51816636", "0.51693285", "0.5162837", "0.51592654", "0.5146712", "0.51442057", "0.5137118", "0.5134489", "0.5132207", "0.5129551", "0.5129551", "0.51253957", "0.51201", "0.51167214", "0.51164347", "0.5104364", "0.51039517", "0.510227", "0.50976455", "0.5097482", "0.5087425", "0.5080033", "0.5080033", "0.5080033", "0.50788087", "0.50738734", "0.5073346", "0.50687766", "0.50622046", "0.5062158", "0.5058958", "0.5057583", "0.5054056", "0.5047421", "0.5045853", "0.5044097", "0.50418484", "0.50306714", "0.5027224", "0.5025577", "0.500057", "0.498789", "0.49850172" ]
0.6333161
0
get detail item that will send
public function getDetailSend(Request $request) { $data = d_productorder::where('po_id', $request->id) ->with('getAgent') ->with(['getPODt' => function ($query) { $query ->where('pod_isapproved', 'Y') ->with(['getItem' => function ($query) { $query ->with('getUnit1') ->with('getUnit2') ->with('getUnit3') ->get(); }]) ->with('getUnit') ->get(); }]) ->first(); $ekspedisi = DB::table('m_expedition') ->where('e_isactive', '=', 'Y') ->get(); //$data->stockItem = $stockItem; $data->total = d_productorderdt::where('pod_productorder', $request->id)->sum('pod_totalprice'); $data->dateFormated = Carbon::parse($data->po_date)->format('d M Y'); $data->ekspedisi = $ekspedisi; return response()->json($data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_detail() {\n return $this->detail;\n }", "public function getDetail();", "public function getDetail()\n {\n return $this->detail;\n }", "public function getDetail()\n {\n return $this->detail;\n }", "public function getDetail()\n {\n return $this->detail;\n }", "public function getDetail() {\r\n\t\treturn($this->detail);\r\n\t}", "function getItem() ;", "public function getItem() {\n return $this->item;\n }", "public function detailAction() {\n\n //GET THE LIST ITEM\n $this->view->listDetail = Engine_Api::_()->getItem('list_listing',(int) $this->_getParam('id'));\n }", "public function item_details($item_id)\n {\n $url = preg_replace('/set/i', 'item:' . $item_id, $this->public_url);\n return $this->curl($url)->item;\n }", "public function get_item() {\n\t\treturn $this->item;\n\t}", "public function getItem() {}", "public function getItem() {}", "public function getItem()\n {\n return $this->get(self::ITEM);\n }", "public function getItem()\n {\n return $this->item;\n }", "public function getItem()\n {\n return $this->item;\n }", "public function getItem()\n {\n return $this->item;\n }", "public function getItem()\n {\n return $this->item;\n }", "public function getItem()\n {\n return $this->item;\n }", "public function getItem()\n {\n return $this->item;\n }", "public function getItem()\n {\n return $this->item;\n }", "public function getItem()\n {\n return $this->item;\n }", "public function getItem()\n {\n return $this->item;\n }", "public function getItem() {\n\t\treturn $this->item;\n\t}", "abstract public function getDetails();", "public function getItem() {\n return $this->item;\n }", "public function getItem();", "public function getItem() \n {\n $this->checkUserIsLogged();\n $params = Route::getUrlParameters();\n $id = $params['id'];\n try {\n $item = new Item;\n $item->getItem($id);\n View::renderJson($item);\n } catch (Exception $e) {\n View::renderJson(['status' => 0, 'message' => $e]);\n }\n }", "public function getDetailId()\n {\n return $this->detailId;\n }", "public function GetItem()\r\n\t{\r\n\t\treturn $this->_phreezer->GetManyToOne($this, \"fk_reference_item1\");\r\n\t}", "function getItemInfo($id){\n $item = $this->order_model->getItemById($id);\n if($item == NULL) return $item;\n\n // get provider information\n $providerinfo = $this->user_model->getUserInfoByid($item->provider);\n $item->provider_id = $providerinfo->userid;\n $item->provider_name = $providerinfo->username;\n\n // get ship man information\n $shipman_info = $this->user_model->getUserInfoByid($item->ship_man);\n $item->shipman_name = isset($shipman_info->username) ? $shipman_info->username : '';\n $item->shipman_phone = isset($shipman_info->contact_phone) ? $shipman_info->contact_phone : '';\n\n // get activity information\n $activity = $this->activity_model->getItemById($item->activity_ids);\n $activity->products = json_decode($item->product_info);\n $activity->cnt = $item->activity_cnts;\n // $activity->products = $this->activity_model->getProductsFromIds($activity->product_id, $activity->provider_id);\n\n $item->activity = $activity;\n\n return $item;\n }", "public function getItem($pk = null)\r\n\t{\r\n\t\tif ($item = parent::getItem($pk))\r\n\t\t{\r\n\t\t\tif (!empty($item->params) && !is_array($item->params))\r\n\t\t\t{\r\n\t\t\t\t// Convert the params field to an array.\r\n\t\t\t\t$registry = new Registry;\r\n\t\t\t\t$registry->loadString($item->params);\r\n\t\t\t\t$item->params = $registry->toArray();\r\n\t\t\t}\r\n\r\n\t\t\tif (!empty($item->metadata))\r\n\t\t\t{\r\n\t\t\t\t// Convert the metadata field to an array.\r\n\t\t\t\t$registry = new Registry;\r\n\t\t\t\t$registry->loadString($item->metadata);\r\n\t\t\t\t$item->metadata = $registry->toArray();\r\n\t\t\t}\n\n\t\tif($item->id){\r\n\t\t\t$item->join_url = JURI::root().\"index.php?option=com_bigbluebutton&view=meetingview&id=\".$item->id;\r\n\t\t}\r\n\t\t\t\r\n\t\t\tif (!empty($item->id))\r\n\t\t\t{\r\n\t\t\t\t$item->tags = new JHelperTags;\r\n\t\t\t\t$item->tags->getTagIds($item->id, 'com_bigbluebutton.meeting');\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $item;\r\n\t}", "public function getDetails() {\n return $this->_get( 'details', array() );\n }", "abstract public function getItem();", "function item_get()\n {\n $key = $this->get('id');\n $result = $this->supplies->get($key);\n if ($result != null)\n $this->response($result, 200);\n else\n $this->response(array('error' => 'Supplies item not found!'), 404);\n }", "public function getDetails()\r\n {\r\n return $this->details;\r\n }", "function getDetails() {\n\t\treturn $this->data_array['details'];\n\t}", "public function action_Detail()\n\t{\n\t\t// load ticket from database\n\t\t$item = ORM::factory('Ticket', $this->request->param('id'));\n\n\t\t// check for ticket existance\n\t\tif ( ! $item->loaded())\n\t\t\treturn $this->not_found('Could not find Ticket', 'Please go back to ticket list and find a ticket.');\n\n\t\t// setup view\n\t\t$this->view = View::factory('Ticket/Detail')\n\t\t->set('item', $item)\n\t\t->set('verified', $this->auth->logged_in('verified'))\n\t\t->set('owner', $this->user AND $this->user->id === $item->user->id)\n\t\t->set('admin', $this->auth->logged_in('admin'))\n\t\t->bind('messages', $messages);\n\n\t\t// get ticket message responses\n\t\t$messages = $item->messages\n\t\t->order_by('created_at', 'ASC')\n\t\t->find_all();\n\t}", "public function getDetails()\n {\n return $this->details;\n }", "public function getDetails()\n {\n return $this->details;\n }", "public function getDetails()\n {\n return $this->details;\n }", "public function retrieve($item);", "public function mailDetailAction(){\r\n \t\t\r\n \t\t/**\r\n \t\t * get form id\r\n \t\t */\r\n \t\t$form_id = $this->getAttribute('form_id');\r\n \t\t\r\n \t\t/**\r\n \t\t * get mail id\r\n \t\t */\r\n \t\t$url_mail_id = $this->getUrlParam('mail_id');\r\n \t\t$mail_id = get_id($url_mail_id);\r\n\r\n \t\t/**\r\n \t\t * get mail data and assign to view\r\n \t\t */\r\n \t\t$mail_info = $this->db_model->getMialData($mail_id);\r\n \t\t$this->viewAssign('mail_info', $mail_info);\r\n \t\t\r\n \t\t\r\n \t\t$this->setDisplay('detail');\r\n \t\t\r\n \t}", "public function details_get()\n \t{\n \t\tlog_message('debug', 'Score/details_get');\n\n\t\t$result = $this->_score->get_details(\n\t\t\t$this->get('type'),\n\t\t\t$this->get('codes'),\n\t\t\textract_id($this->get('userId')),\n\t\t\t(!empty($this->get('storeId'))? extract_id($this->get('storeId')): '')\n\t\t);\n\n\t\tlog_message('debug', 'Score/details_get:: [1] result='.json_encode($result));\n\t\t$this->response($result);\n\t}", "public function getDetails()\n\t{\n\t\treturn $this->details;\n\t}", "function GetDetailPPHItemById($id){\n\n $data = $this->db\n ->select('form_bd_item_pph.id_form_bd_item_pph as id_item_pph,form_bd_item_pph.id_form_bd_item as id_item,form_bd_item_pph.*,form_bd_item.real_amount,form_bd_item.name as item_name')\n ->where('form_bd_item_pph.id_form_bd_item_pph',$id)\n ->join('form_bd_item','form_bd_item.id_form_bd_item=form_bd_item_pph.id_form_bd_item')\n ->get('form_bd_item_pph')\n ->row_array();\n return $data;\n }", "public function getSecondItem();", "public function getDetails() {\n\t\treturn $this->details;\n\t}", "public function getDetails() {\r\n\t\t\treturn $this->_details;\r\n\t\t}", "public function getProductDetailId()\n {\n return $this->product_detail_id;\n }", "public function getDetail(): ?string\n {\n return $this->detail;\n }", "public function getDetails()\n {\n\t $detail_field = $this->getValue('details');\n\t return wed_decodeJSON($detail_field,true);\n }", "public function getItem()\n {\n $query = $this->grammar->compileGetItem($this);\n\n $result = $this->connection->getClient()->getItem($query);\n\n return $this->processor->processItem($result);\n }", "public function getItemDetails($id)\n\t{\n\t\t$apicall = $this->endPoint. \"?callname=GetSingleItem&version=515\"\n . \"&appid=eBay3e085-a78c-4080-ac24-a322315e506&ItemID=$id\"\n . \"&responseencoding=\" .RESPONSE_ENCODING\n . \"&IncludeSelector=ShippingCosts,Details\"; \n \n \t$this->xmlResponse = simplexml_load_file($apicall);\n \t\n \t//print_r($this->xmlResponse);\n\n\t\tif ($this->xmlResponse->Item->PictureURL) \n\t\t{\n \t$this->bigPicUrl = $this->xmlResponse->Item->PictureURL;\n } else \n {\n \t$this->bigPicUrl = \"img/pic.gif\";\n }\n\t}", "public function ItemOnDODetail($params)\n {\n return $this->deliveryOrderDetail::where($params)->first() == null ? true : $this->deliveryOrderDetail::where($params)->first(); \n }", "public function detail(){\r\n\t\t//only ajax is allowed\r\n\t\tif(!$this->input->is_ajax_request()) show_404();\r\n\r\n\t\t//$this->auth->set_access('view');\r\n\t\t//$this->auth->validate();\r\n\r\n\t\t//search data with pk for default\r\n\t\t$search_data = $this->input->post('ang_id');\r\n\t\t//if no search data exist, response error\r\n\t\tif($search_data === NULL)\r\n\t\t\tajax_response('error');\r\n\r\n\t\t//activate if search data is integer\r\n\t\t//$search_data = uintval($search_data);\r\n\r\n\t\t//get detail\r\n\t\t$detail = $this->m_anggota->get_by_column($search_data);\r\n\r\n\t\t//output return value\r\n\t\tif($detail !== NULL) ajax_response('ok', '', $detail);\r\n\t\telse ajax_response('error');\r\n\t}", "public function getDetail()\n\t{\n\t\treturn '';\n\t}", "public function detail()\n {\n return $this->_msg;\n }", "function getGetDetails() {\n return $this->getDetails;\n }", "public function getOrderDetail()\n {\n return $this->orderDetail;\n }", "public function getInstanceDetail()\n {\n return $this->get(self::_INSTANCE_DETAIL);\n }", "public function itemissuedetails(){\n\t$sel='ii_id,ii_itemid,ii_mtid,ii_name,ii_qty,ii_desc,ii_staffpfno,ii_staffname,ii_dept,ii_receivername,ii_creatordate';\n\t$whorder='ii_mtid asc,ii_itemid asc';\n\t$data['result'] = $this->picomodel->get_orderlistspficemore('items_issued',$sel,'',$whorder);\n $this->logger->write_logmessage(\"view\",\" View Item List setting\", \"Item List setting details...\");\n\t$this->logger->write_dblogmessage(\"view\",\" View Item List setting\", \"Item List setting details...\");\n $this->load->view('itemaction/displayissueitem',$data);\n }", "function item_details($iid, $oid)\n\t{\n\t\t$q = $this->db\n\t\t\t->select('co.store_id as stid, co.drug_id as iid, co.supplier_id as suid, co.manufacturer_id as mid, co.unit_cost price, co.unit_savings, co.quantity as qtyPrev, co.date_time, lc.item_type')\n\t\t\t->from('ci_completedorders as co')\n\t\t\t->join('ci_listings_compiled as lc', 'co.drug_id = lc.drug_id')\n\t\t\t->where('co.drug_id', $iid)\n\t\t\t->where('co.order_id', $oid)\n\t\t\t->limit(1)\n\t\t\t->get();\n\t\t\t\n\t\t$r = $q->row();\n\t\t\t\n\t\tif ( $q->num_rows() === 0 )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$r->rx = ( $r->item_type == 1 ) ? false : true;\n\t\t\tunset($r->item_type);\n\t\t\t$r->date = strtotime($r->date_time);\n\t\t\tunset($r->date_time);\n\t\t\t\n\t\t\t$this->result_to_table('Queried item details: ', array($r));\n\t\t\t\n\t\t\treturn $r;\n\t\t}\n\t}", "public function getEventDetail()\n {\n // get event detail\n $this\n ->get('/event/detail/'.$this->event->id)\n ->assertStatus(200);\n }", "abstract protected function extractProductDetail();", "public function getCollectionItem() {}", "public function getOrderDetailId()\n {\n return $this->order_detail_id;\n }", "public function getDetailRequestItem($id_request_item){\n $this->session->id_request_item = $id_request_item; /*untuk ngeset harga vendor butuh id_request_item*/\n $where = array(\n \"id_request_item\" => $id_request_item\n );\n $field = array(\n \"nama_produk\",\"jumlah_produk\",\"notes_produk\",\"file\",\"satuan_produk\"\n );\n $print = array(\n \"nama_produk\",\"jumlah_produk\",\"notes_produk\",\"file\",\"satuan_produk\"\n );\n $result = selectRow(\"price_request_item\",$where);\n $data = foreachResult($result,$field,$print);\n echo json_encode($data);\n }", "public function getDetail()\n {\n \t$request = \\Request::all();\n // add system log\n $this->systemLogs('view', 'information', $request);\n // End\n\n $information = false;\n $information_description = false;\n if(\\Request::has('information_id')) {\n $information = $this->information->getInformation($request['information_id']);\n\n if($information) {\n $information_description = $this->information->getInformationDescriptionByCode(['information_id'=>$request['information_id'], 'language_id'=>$request['language_id']]);\n }\n \n }\n\n if($information) {\n $this->data->information_id = $information->information_id;\n $this->data->icon = $information->icon;\n }else {\n $this->data->information_id = '';\n $this->data->icon = '';\n }\n\n if($information_description) {\n $this->data->title = $information_description->title;\n $this->data->description = $information_description->description;\n }else {\n $this->data->title = '';\n $this->data->description = '';\n }\n\n return view('information.detail', ['data'=>$this->data]);\n }", "public function itemreturndetails(){\n\t$sel='ir_id,ir_itemid,ir_mtid,ir_name,ir_qty,ir_desc,ir_staffpfno,ir_staffname,ir_dept,ir_receivername,ir_creatordate';\n\t$whorder='ir_mtid asc,ir_itemid asc';\n\t$data['result'] = $this->picomodel->get_orderlistspficemore('items_return',$sel,'',$whorder);\n $this->logger->write_logmessage(\"view\",\" View Returned Item List \", \"Returned Item List details...\");\n\t$this->logger->write_dblogmessage(\"view\",\" View Returned Item List \", \"Returned Item List details...\");\n $this->load->view('itemaction/displayreturnitem',$data);\n }", "public function f_get_item()\n {\n\n $sql = $this->db->query(\"SELECT * FROM md_dm_item \");\n return $sql->result();\n\n }", "public function getItem($pk = null) {\n if ($item = parent::getItem($pk)) {\n $db = JFactory::getDbo();\n $query = $db->getQuery(true);\n $query\n ->select('p.name AS processing, p.parameters AS processing_parameters, p.auto AS processing_auto, p.command AS processing_command, p.contact_id AS processing_contact_id, p.map_id AS processing_map_id')\n ->from(' #__sdi_processing AS p ')\n ->where('p.id = ' . (int) $item->processing_id);\n $db->setQuery($query);\n $result = $db->loadObject();\n\n $item->processing_label = $result->processing;\n $item->processing_parameters = $result->processing_parameters;\n $item->processing_command = $result->processing_command;\n $item->processing_auto = $result->processing_auto;\n $item->processing_contact_id= $result->processing_contact_id;\n $item->processing_map_id=$result->processing_map_id;\n \n $query = $db->getQuery(true);\n $query ->select($db->quoteName('users2.name', 'user'))\n ->from(' #__sdi_user AS sdi_user ')\n ->join('LEFT', '#__users AS users2 ON users2.id=sdi_user.user_id')\n ->where('sdi_user.id = ' . (int) $result->processing_contact_id);\n $db->setQuery($query);\n $result = $db->loadObject();\n \n $item->processing_contact_label= $result->user;\n\n $query = $db->getQuery(true);\n $query ->select($db->quoteName('users.name', 'user'))\n ->from(' #__users AS users ')\n ->where('users.id = ' . (int) $item->created_by);\n $db->setQuery($query);\n $result = $db->loadObject();\n\n $item->user_label = $result->user;\n\n self::loadJson($item);\n\n }\n\n return $item;\n\n }", "public function itemDetail($id){\n\n $datadetalle = DocumentoDetalle::\n from('documentodetalle as d')\n ->join('products as p', 'p.id', '=' , 'd.id_producto')\n ->where('d.id_documentocabecera', '=', $id)\n ->select(\n 'd.id',\n 'd.id_producto as idproduct',\n 'p.descripcion as product',\n 'd.precio_unitario as price',\n 'd.cantidad',\n 'p.stock',\n \\DB::raw('4 as tipo')\n )->get();\n\n return response()->json([\n 'data' => $datadetalle\n ]);\n\n }", "public function getDetail( $key ) {\n $details = $this->getDetails();\n if( isset($details[$key]) ) {\n return $details[$key];\n }\n return null;\n }", "public function getDetail(int $id)\n {\n }", "abstract function get ($item);", "public function display_item(Request $request){\n\n $id = $request->item_id;\n $item_id = item::where('id', $id)->first();\n return response()->json($item_id);\n }", "public function display_item(Request $request){\n\n $id = $request->item_id;\n $item_id = item::where('id', $id)->first();\n return response()->json($item_id);\n }", "public function detail() {\n $url = explode('/', $_GET['url']);\n $id = $url[2];\n $this->loadView('detail', 'content');\n $client = $this->em->selectById('client', $id);\n $village = $this->em->selectById('village', $client->getIdVillage());\n $this->loadHtml($client->getId(), 'id');\n $this->loadHtml($client->getNomFamille(), 'nomFamille');\n $this->loadHtml($village->getNom(), 'village');\n $this->loadHtml($client->getTelephone(), 'telephone');\n $this->dom->getElementById('lien_client')->href .= $id;\n }", "public function viewdetailsAction()\n {\n $productId = $this->_getParam('product_id');\n $product = $this->_model->setId($productId);\n $this->view->product = $product->fetch(); \n \n }", "public function show($id)\n {\n return $this->commandBus->execute(new \\Sailr\\Item\\GetSingleItemCommand($id));\n }", "public function detail() {\n global $guest_uname;\n\n $detail = array();\n $detail['billing_address'] = $this->getBillingAddress();\n $detail['shipping_address'] = $this->getShippingAddress();\n $detail['review_orders'] = array($this->getReviewOrder());\n if (tep_count_shipping_modules() < 1) {\n $detail['need_select_shipping_method'] = false;\n } elseif (!$this->freeShipping && !$detail['review_orders'][0]['selected_shipping_method_id']) {\n $detail['need_select_shipping_method'] = true;\n }\n $detail['price_infos'] = $this->getPriceInfos();\n $detail['payment_methods'] = $this->getPaymentMethods();\n $detail['is_virtual'] = $this->isVirtual;\n $detail['need_billing_address'] = defined('NEED_BILLING_ADDRESS') ? NEED_BILLING_ADDRESS : FALSE;\n $detail['need_shipping_address'] = !$this->isVirtual && !ServiceFactory::factory('Store')->checkAddressIntegrity($detail['shipping_address']);\n\n if (tep_session_is_registered('guest_uname')) {\n $detail['uname'] = $guest_uname;\n tep_session_unregister('guest_uname');\n }\n\n return $detail;\n }", "public function itemQuery()\n {\n return $this->item($this->getInput('id'));\n }", "public function getItem()\n\t{\n\t\tif (!isset($this->item))\n\t\t{\n\t\t\t$query = $this->_db->getQuery(true);\n\t\t\t$query->select('*');\n\t\t\t$query->from('#__document');\n\t\t\t$query->where('id = '.(int)$this->getState('document.id'));\n\t\t\t$this->_db->setQuery($query);\n\t\t\t$item = $this->_db->loadObject();\n\n\t\t\t// Check for a database error.\n\t\t\tif ($this->_db->getErrorNum())\n\t\t\t{\n\t\t\t\t$this->setError($this->_db->getErrorMsg());\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$this->item = $item;\t\t\n\t\t}\n\t\treturn $this->item; \n\t}", "public function getContactDetailAttribute()\n {\n return $this->contact()->first();\n }", "public function getDetails(): string\n {\n return $this->details;\n }", "function get_info($item_kit_id)\n\t{\n\t\t$query = $this->db->where('item_kit_id',$item_kit_id)\n\t\t\t\t->where(\"category\", \"tickets\")\n\t\t\t\t->get(\"item_kits\");\n\t\tif($query->num_rows()==1)\n\t\t{\n\t\t\treturn $query->row();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//Get empty base parent object, as $item_kit_id is NOT an item kit\n\t\t\t$item_obj=new stdClass();\n\n\t\t\t//Get all the fields from items table\n\t\t\t$fields = $this->db->list_fields('item_kits');\n\n\t\t\tforeach ($fields as $field)\n\t\t\t{\n\t\t\t\t$item_obj->$field='';\n\t\t\t}\n\n\t\t\treturn $item_obj;\n\t\t}\n\t}", "public function object()\n\t{\n\t\treturn QUICKBOOKS_OBJECT_DISCOUNTITEM;\n\t}", "protected function handle_get_item($args = array())\n {\n $args = $args + array('key' => 'id');\n $Item = ORM::factory($this->ItemType, array($args['key'] => $this->request->param('id')));\n\n\n if( $Item->loaded() )\n {\n\t$content = NULL;\n\t$format = $this->request_format();\n\tswitch($format)\n\t {\n\t default:\n\t case self::FORMAT_XML:\n\t $this->response->headers('Content-Type', 'application/xml; charset=utf-8');\n\t $content = $this->template->content = View::factory('s1/rest/common/xml');\n\t break;\n\t case self::FORMAT_JSON:\n\t $this->response->headers('Content-Type', 'application/json; charset=utf-8');\n\t $content = $this->template->content = View::factory('s1/rest/common/json');\n\t break;\n\t }\n\t\n\t$content->Data = $Item;\n\t$ItemName = isset($this->ItemName) ? $this->ItemName : $this->ItemType;\n\t$content->DataName = strtolower($ItemName);\n }\n else\n {\n\t$this->throw_error(404, 'id not found');\n }\n }", "public function action_detail()\n\t{\n\t\t$this->template = View::forge('template-admin');\n\n $get = Input::get();\n\t\t$id = $get[\"id\"];\n\t\t$data[\"details\"] = Model_Event::find_by('id',$id);\n\t\t//return Response::forge(View::forge('event/detail',$data));\n\t\t$this->template->title = \"イベント詳細\";\n\t\t$this->template->content = View::forge('event/detail', $data);\n\t}", "function GetDetailPPHItemByIdSOA($id){\n\n $data = $this->db\n ->select('form_soa_item_pph.id_form_soa_item_pph as id_item_pph,form_soa_item_pph.id_form_soa_item as id_item,form_soa_item_pph.*,form_soa_item.real_amount,form_soa_item.name as item_name')\n ->where('form_soa_item_pph.id_form_soa_item_pph',$id)\n ->join('form_soa_item','form_soa_item.id_form_soa_item=form_soa_item_pph.id_form_soa_item')\n ->get('form_soa_item_pph')\n ->row_array();\n return $data;\n }", "public function get()\n {\n global $_PM_;\n $api = 'handler_'.$this->handler.'_api';\n $this->api = new $api($_PM_, PHM_API_UID, $this->principalId);\n return $this->api->read_item_content($this->item['id']);\n }", "public function getDetails()\n {\n if (array_key_exists(\"details\", $this->_propDict)) {\n return $this->_propDict[\"details\"];\n } else {\n return null;\n }\n }", "public function detail($id)\n {\n //\n }", "public function getDetail()\n {\n return ! empty($this->result) ? $this->result->getXMLDetail() : NULL;\n }", "public function product_detail()\n {\n return $this->has_one('Product_Detail');\n }", "public function getItem( $id );", "public function getDetail($id) {\n\t\treturn $this->getData('/objekt/detail/objekt_id/' . $id);\n\t}", "public function getDetail( $parameter )\n {\n $id = $parameter[ 'id' ];\n $friend = $this->em->getEntity( 'friends\\model\\Friends', $id );\n return $this->showDetail( $friend );\n }", "public function detailAction()\n {\n $movieId = $this->dispatcher->getParam('id');\n\n $content = $this->api->get(self::API_ROUTE_MOVIE_CRUD . '/' . $movieId);\n\n if($content instanceof AppError) {\n $this->view->setVar('errors', $content->getMessage());\n } else {\n $this->view->setVar('movie', $content->movie);\n $this->view->setVar('genres', $content->genres);\n $this->view->setVar('videos', $content->videos);\n $this->view->setVar('isFavorite', $content->isFavorite);\n }\n }", "public function showitemAction() {\n\t\t$story_id \t\t= $this->getRequest()->getParam(\"story\");\n\t\t$source_id \t\t= $this->getRequest()->getParam(\"source\");\n\t\t$item_id\t\t= $this->getRequest()->getParam(\"item\");\n\t\t\n\t\t//Verify if the requested story exist\n\t\t$stories\t\t= new Stories();\n\t\tif (!($story\t= $stories->getStory($story_id))) {\n\t\t\treturn $this->_helper->json->sendJson(false);\n\t\t}\n\n\t\t// Check if we are the owner\n\t\tif ($this->_application->user->id != $story->user_id) {\n\t\t\treturn $this->_helper->json->sendJson(false);\n\t\t}\n\t\t\n\t\t// Ok, we can show the item\n\t\t$storyItems\t\t= new StoryItems();\n\t\t$storyItems->showItem($story_id, $source_id, $item_id);\n\t\treturn $this->_helper->json->sendJson(true);\n\t}" ]
[ "0.7291318", "0.7212081", "0.7004057", "0.7004057", "0.7004057", "0.6791553", "0.6705254", "0.66846895", "0.665332", "0.66443145", "0.6633574", "0.6613011", "0.6613011", "0.6609222", "0.6585523", "0.6585523", "0.6585523", "0.6585523", "0.6585523", "0.6585523", "0.6585523", "0.6585523", "0.6585523", "0.65850896", "0.65832174", "0.6576918", "0.6561303", "0.6513373", "0.64284563", "0.6408663", "0.6363316", "0.62908", "0.6278761", "0.6277946", "0.6262529", "0.62511784", "0.62208873", "0.6181974", "0.61782247", "0.61782247", "0.61782247", "0.616554", "0.6135084", "0.6125806", "0.60973233", "0.6075168", "0.60622996", "0.6051975", "0.60433733", "0.5989039", "0.59847385", "0.5981453", "0.5978015", "0.59528816", "0.594797", "0.5946685", "0.5943827", "0.5942981", "0.5942485", "0.593443", "0.5931469", "0.5920721", "0.59195083", "0.59192", "0.59190726", "0.59030944", "0.59002703", "0.58915037", "0.5873959", "0.58694714", "0.58624387", "0.58515966", "0.58436847", "0.5805733", "0.58000815", "0.5780332", "0.57709616", "0.57709616", "0.5770098", "0.57656914", "0.5763532", "0.5760508", "0.57552826", "0.57545817", "0.575446", "0.57453763", "0.57201034", "0.5703584", "0.56977963", "0.5690361", "0.5673443", "0.5651117", "0.56478834", "0.5647631", "0.56454086", "0.56283706", "0.5624837", "0.5624773", "0.5620987", "0.56122994", "0.560903" ]
0.0
-1
get list of paymentMethod
public function getPaymentMethod() { // get pusat $pusatCode = m_company::where('c_type', 'PUSAT')->select('c_id')->first(); $pusatCode = $pusatCode->c_id; $data = m_paymentmethod::where('pm_isactive', 'Y') ->whereHas('getAkun', function ($q) use ($pusatCode) { $q->where('ak_comp', $pusatCode); }) ->with('getAkun') ->get(); return response()->json([ 'data' => $data ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function listPaymentMethods()\n {\n return [\n [\n 'id' => self::PAYMENT_BY_CASH,\n 'name' => 'Tiền mặt',\n ],\n [\n 'id' => self::PAYMENT_BY_CONTRACT,\n 'name' => 'Hợp đồng',\n ],\n ];\n }", "public function getAvailablePaymentMethods ();", "public function getPaymentMethods() {\r\n\t\t//@TODO: Insert PaymentMethods into the datebase, create table\r\n\t\t$payment_methods = array();\r\n\t\t\t$payment_methods[0] = array('id' => 0, 'name' => 'AMEX');\r\n\t\t\t$payment_methods[1] = array('id' => 1, 'name' => 'Discover');\r\n\t\t\t$payment_methods[2] = array('id' => 2, 'name' => 'Mastercard');\r\n\t\t\t$payment_methods[3] = array('id' => 3, 'name' => 'Visa');\r\n\t\t\t$payment_methods[4] = array('id' => 4, 'name' => 'Store Credit');\r\n\t\t\t$payment_methods[5] = array('id' => 5, 'name' => 'Check');\r\n\t\t\t$payment_methods[6] = array('id' => 6, 'name' => 'Wire Transfer');\r\n\t\t\t$payment_methods[7] = array('id' => 7, 'name' => 'Trade');\r\n\t\t\t$payment_methods[9] = array('id' => 9, 'name' => 'Cash');\r\n\t\treturn $payment_methods; //array\r\n\t}", "public function methods()\n {\n return collect(Paymentmethods::getList());\n }", "function paymentmethods() {\r\n $db = JFactory::getDBO();\r\n $query = \"SELECT id,payment_method,status FROM #__em_paymentmethod\";\r\n $db->setQuery($query);\r\n $result = $db->loadObjectList();\r\n return $result;\r\n }", "public function get_payment_methods()\n\t{\n\t\t//retrieve all invoice\n\t\t$this->db->from('payment_method');\n\t\t$this->db->select('*');\n\t\t$this->db->order_by('payment_method_name');\n\t\t$query = $this->db->get();\n\t\t\n\t\treturn $query;\n\t}", "public function get_payment_methods()\n\t{\n\t\t//retrieve all orders\n\t\t$this->db->from('payment_method');\n\t\t$this->db->select('*');\n\t\t$this->db->order_by('payment_method_name');\n\t\t$query = $this->db->get();\n\t\t\n\t\treturn $query;\n\t}", "public function iN_PaymentMethods() {\n\t\t$query = mysqli_query($this->db, \"SELECT * FROM i_payment_methods WHERE payment_method_id = '1'\") or die(mysqli_error($this->db));\n\t\t$data = mysqli_fetch_array($query, MYSQLI_ASSOC);\n\t\treturn $data;\n\t}", "public function getPaymentMethods()\n {\n return $this->payment_methods;\n }", "public function getCardsPaymentMethods()\n {\n $payment_methods = Mage::getModel('mercadopago/core')->getPaymentMethods();\n $payment_methods_types = array(\"credit_card\", \"debit_card\", \"prepaid_card\");\n $types = array();\n\n //percorre todos os payments methods\n foreach ($payment_methods['response'] as $pm) {\n\n //filtra por payment_methods\n if (in_array($pm['payment_type_id'], $payment_methods_types)) {\n $types[] = $pm;\n }\n }\n\n return $types;\n }", "public function getPaymentMethods()\n {\n if (!isset($this->data['paymentProfiles']) || empty($this->data['paymentProfiles'])) {\n return null;\n }\n $paymentMethods = [];\n foreach ($this->data['paymentProfiles'] as $method) {\n $paymentMethods[$method['id']] = new PaymentMethod($method['id'], $method['visibleName']);\n }\n return collect($paymentMethods);\n }", "protected function getAllAvailableMethods()\n {\n /* TODO get all available payment methods from toolbox */\n }", "public static function getPaymentMethods() {\n\n // return array(\n // self::PAYMENT_METHOD_PAY_PAL => 'Pay Pal',\n // self::PAYMENT_METHOD_MONEY_BOOKERS => 'Skrill',\n // self::PAYMENT_METHOD_WIRE_TRANSFER => 'Wiretransfer',\n // );\n\n $payment_methods = array();\n\n if(Option::getByName('payment_method_paypal')) \n $payment_methods[self::PAYMENT_METHOD_PAY_PAL] = 'Pay Pal';\n\n if(Option::getByName('payment_method_skrill')) \n $payment_methods[self::PAYMENT_METHOD_MONEY_BOOKERS] = 'Skrill';\n\n if(Option::getByName('payment_method_wiretransfer') && Option::getByName('wiretransfer_doc_path')) \n $payment_methods[self::PAYMENT_METHOD_WIRE_TRANSFER] = 'Wiretransfer';\n\n if(Option::getByName('payment_method_check')) \n $payment_methods[self::PAYMENT_METHOD_CHECK] = 'Check';\n\n if(Option::getByName('payment_method_no_payment')) \n $payment_methods[self::PAYMENT_METHOD_NO_PAYMENT] = 'No Payment';\n\n return $payment_methods;\n }", "public function getPaymentMethodsForCod()\n {\n return $this->_toArrayObject($this->getConfig(\n 'packages/global_settings_payments-for-cod'));\n }", "public function toOptionArray()\n {\n $methods = [];\n\n //default empty value\n $methods[] = [\"value\" => \"\", \"label\" => __(\"Accept all payment methods\")];\n $accessToken = $this->scopeConfig->getValue(\\MercadoPago\\Core\\Helper\\ConfigData::PATH_ACCESS_TOKEN, \\Magento\\Store\\Model\\ScopeInterface::SCOPE_WEBSITE, $this->_switcher->getWebsiteId());\n\n if (empty($accessToken)) {\n return $methods;\n }\n\n $this->coreHelper->log(\"GET /v1/payment_methods\", 'mercadopago');\n\n try {\n $response = \\MercadoPago\\Core\\Lib\\RestClient::get(\"/v1/payment_methods\", null, [\"Authorization: Bearer \" . $accessToken]);\n } catch (\\Exception $e) {\n $this->coreHelper->log(\"PaymentMethodsTicket:: An error occurred at the time of obtaining the ticket payment methods: \" . $e);\n return [];\n }\n\n if (isset($response['error']) || (isset($response['status']) && ($response['status'] != '200' && $response['status'] != '201'))) {\n return $methods;\n }\n\n $response = $response['response'];\n\n foreach ($response as $pm) {\n if (isset($pm['payment_type_id']) && $pm['payment_type_id'] == \"ticket\" || $pm['payment_type_id'] == \"atm\") {\n $methods[] = [\n 'value' => $pm['id'],\n 'label' => __($pm['name'])\n ];\n }\n }\n\n $this->coreHelper->log(\"PaymentMethodsTicket:: Displayed\", 'mercadopago', $methods);\n\n return $methods;\n }", "public function getPaymentMethods()\n {\n return $this->getValue('payment_method_categories');\n }", "public static function getAllPaymentMethods()\n {\n $methods = [];\n $directory = __DIR__ . DIRECTORY_SEPARATOR . 'Method';\n $files = scandir($directory);\n foreach ($files as $file) {\n $file = $directory . DIRECTORY_SEPARATOR . $file;\n\n $info = pathinfo($file);\n if (!isset($info['extension']) || $info['extension'] !== 'php') {\n continue;\n }\n\n $class_name = basename($info['filename'], '.php');\n if (in_array($class_name, ['AbstractMethod'])) {\n continue;\n }\n\n $methods[] = $class_name;\n }\n\n return $methods;\n }", "public static function getPaymentMethods($exclude_cash = false) {\n\t\treturn $exclude_cash ?\n\t\t\tArrayHelper::map(Parameter::find()->where(['domain'=>'payment'])->andWhere(['not', ['name' => Payment::CASH]])->orderBy('value_int')->asArray()->all(), 'name', 'value_text')\n\t\t\t:\n\t\t\tArrayHelper::map(Parameter::find()->where(['domain'=>'payment'])->orderBy('value_int')->asArray()->all(), 'name', 'value_text')\n\t\t\t;\n\t}", "public function getAllPaymentMethods($asArray = false) {\r\n $jsonMethods = array();\r\n $methods = array();\r\n $model = new Mage_Checkout_Block_Onepage_Payment_Methods();\r\n $quote = Mage::getSingleton('checkout/cart')->getQuote();\r\n try {\r\n $selectedPaymentMethod = $quote->getPayment()->getData('method');\r\n } catch (Exception $e) {\r\n $this->logException($e, 'Get payment method');\r\n $this->_JSONencodeAndRespond(array(\"title\" => \"Error\", \"content\" => $e->getMessage()));\r\n return;\r\n }\r\n foreach ($model->getMethods() as $method) {\r\n $methodTitle = $method->getTitle();\r\n $methodCode = $method->getCode();\r\n if ($methodCode == \"paypal_express\") { // PayPal. Has logo and strange label text, override\r\n $methodTitle = \"PayPal\";\r\n }\r\n\r\n //eLabelz specific fix\r\n if ($methodCode == 'msp_cashondelivery') {\r\n $methodTitle .= \" – \" . Mage::helper('core')->currency($quote->getMspCashondeliveryInclTax(), true, false);\r\n }\r\n\r\n $m = array(\r\n 'type' => 'option',\r\n 'title' => $methodTitle,\r\n 'code' => $methodCode,\r\n 'price' => $this->getPaymentMethodPrice($methodCode),\r\n // Payment fee (price) is not available for standard payment methods, for extensions this need to be individualy coded\r\n 'image' => null,\r\n 'options' => $this->_getSuboptionsForPaymentMethod($methodCode),\r\n );\r\n $methods[] = $m;\r\n }\r\n if ($asArray)\r\n return $methods;\r\n $jsonMethods['payment_methods'] = $methods;\r\n\r\n return $jsonMethods;\r\n }", "public static function getPaymentMethods()\n {\n return [\n static::MAIL,\n static::DIRECT_DEPOSIT,\n ];\n }", "public function getListPaymentMethod(ListPaymentMethodRequest $request)\n {\n $this->apiData = $this->paymentMethodService->getListPaymentMethod($request);\n\n return $this->success();\n }", "abstract public function getPaymentDrivers();", "public function getBuyingPaymentMethods()\n {\n return $this->hasMany(PaymentMethod::className(), ['id' => 'payment_method_id'])\n ->viaTable('{{%currency_exchange_order_buying_payment_method}}', ['order_id' => 'id']);\n }", "abstract public function getPaymentMethod();", "public function getInstalledPaymentMethods() {\r\n\t\t// load internal names of installed payment methods\r\n\t\t$this->load->model('setting/extension');\r\n\t\t$paymentCodeList = $this->model_setting_extension->getInstalled('payment');\r\n\r\n\t\t// Get description name of payment methods.\r\n\t\t// It must implemented inline because there is no model method for it.\r\n\t\t// Based on implementation in method getList in class ControllerExtensionExtensionPayment\r\n\t\t$paymentMethods = [];\r\n\t\tforeach ($paymentCodeList as $paymentCode) {\r\n\t\t\t// check if main file of extension exists\r\n\t\t\t$mainFilePath = DIR_APPLICATION . 'controller/extension/payment/' . $paymentCode . '.php';\r\n\t\t\tif (!file_exists($mainFilePath)) {\r\n\t\t\t\tcontinue; // extension is registered as installed, but file is missing\r\n\t\t\t}\r\n\r\n\t\t\t// load description name of payment method from language file of extension\r\n\t\t\t$this->load->language('extension/payment/' . $paymentCode, 'extension');\r\n\t\t\t$extensionName = $this->language->get('extension')->get('heading_title');\r\n\r\n\t\t\t$paymentMethods[] = [\r\n\t\t\t\t'code' => $paymentCode,\r\n\t\t\t\t'name' => $extensionName\r\n\t\t\t];\r\n\t\t}\r\n\r\n\t\treturn $paymentMethods;\r\n\t}", "public function getSellingPaymentMethods()\n {\n return $this->hasMany(PaymentMethod::className(), ['id' => 'payment_method_id'])\n ->viaTable('{{%currency_exchange_order_selling_payment_method}}', ['order_id' => 'id']);\n }", "static function listPaymentMethods($config)\n {\n if ($config == NULL) {\n WebPay::throwMissingConfigException();\n }\n\n return new ListPaymentMethods($config);\n }", "public static function PaymentOptionList()\n {\n \t\n \treturn array(\n \t 'cod'=>t(\"Cash On delivery\"),\n \t 'ocr'=>t(\"Offline Credit Card Payment\"),\n \t 'pyr'=>t(\"Pay On Delivery\"),\n \t 'pyp'=>t(\"paypal\"),\n \t 'stp'=>t(\"stripe\"),\n \t 'mcd'=>t(\"mercapado\"),\n \t 'ide'=>t(\"sisow\"),\n \t 'payu'=>t(\"payumoney\"),\n \t 'pys'=>t(\"paysera\"), \t \n \t 'bcy'=>t(\"Barclay\"),\n \t 'epy'=>t(\"EpayBg\"),\n \t 'atz'=>t(\"Authorize.net\"),\n \t 'obd'=>t(\"Offline Bank Deposit\"),\n \t 'btr' =>t(\"Braintree\")\n \t);\n }", "public function get_payment_methods() {\n\t\treturn $this->get_supported_payment_methods();\n\t}", "function getAutoEnabledPaymentMethods()\n{\n\tglobal $registeredPaymentMethods;\t\n\t\n\t$autoEnabledPaymentMethod = array();\n\t\n\tforeach ($registeredPaymentMethods as $paymentMethod => $className)\n\t{\n\t\t$pmObj = Service_PaymentMethodsFactory::getInstance($paymentMethod);\n\t\tif($pmObj->isAutoEnabledPaymentMethod() == \"y\" )\n\t\t{\n\t\t\tarray_push($autoEnabledPaymentMethod,$paymentMethod);\n\t\t}\n\t\t\n\t}\n\t\n\treturn $autoEnabledPaymentMethod;\n\t\n}", "public function toOptionArray()\n\t{\n $payments = Mage::getModel('payment/config')->getActiveMethods();\n $methods = [];\n\n foreach ($payments as $paymentCode=>$paymentModel) \n {\n $paymentTitle = Mage::getStoreConfig('payment/'.$paymentCode.'/title');\n $methods[$paymentCode] = array(\n\n 'label' => $paymentTitle,\n 'value' => $paymentCode,\n );\n }\n return $methods;\n\t}", "public function getPaymentMethodAllowableValues()\n {\n return [\n self::PAYMENT_METHOD_ACC,\n self::PAYMENT_METHOD_ALP,\n self::PAYMENT_METHOD_APL,\n self::PAYMENT_METHOD_AMX,\n self::PAYMENT_METHOD_AZP,\n self::PAYMENT_METHOD_BON,\n self::PAYMENT_METHOD_CFY,\n self::PAYMENT_METHOD_CSY,\n self::PAYMENT_METHOD_CUP,\n self::PAYMENT_METHOD_DIN,\n self::PAYMENT_METHOD_DII,\n self::PAYMENT_METHOD_DIB,\n self::PAYMENT_METHOD_DIS,\n self::PAYMENT_METHOD_DNK,\n self::PAYMENT_METHOD_ECA,\n self::PAYMENT_METHOD_ELV,\n self::PAYMENT_METHOD_EPS,\n self::PAYMENT_METHOD_ESY,\n self::PAYMENT_METHOD_INT,\n self::PAYMENT_METHOD_JCB,\n self::PAYMENT_METHOD_JEL,\n self::PAYMENT_METHOD_KLN,\n self::PAYMENT_METHOD_MAU,\n self::PAYMENT_METHOD_MDP,\n self::PAYMENT_METHOD_MFX,\n self::PAYMENT_METHOD_MPX,\n self::PAYMENT_METHOD_MYO,\n self::PAYMENT_METHOD_PAP,\n self::PAYMENT_METHOD_PAY,\n self::PAYMENT_METHOD_PEF,\n self::PAYMENT_METHOD_PFC,\n self::PAYMENT_METHOD_PSC,\n self::PAYMENT_METHOD_REK,\n self::PAYMENT_METHOD_SAM,\n self::PAYMENT_METHOD_SWB,\n self::PAYMENT_METHOD_SCX,\n self::PAYMENT_METHOD_SWP,\n self::PAYMENT_METHOD_TWI,\n self::PAYMENT_METHOD_UAP,\n self::PAYMENT_METHOD_VIS,\n self::PAYMENT_METHOD_WEC,\n ];\n }", "public function whmcs_get_payment_methods($params = array()) {\n\t\t$params['action'] = 'GetPaymentMethods';\n\t\t// return Whmcs_base::send_request($params);\n $load = new Whmcs_base();\n return $load->send_request($params);\n\t}", "function getRegisteredPaymentMethods()\n{\n\tglobal $registeredPaymentMethods;\t\n\n\tforeach ($registeredPaymentMethods as $paymentMethod => $className)\n\t{\n\t\t$pmObj = Service_PaymentMethodsFactory::getInstance($paymentMethod);\n\t\tif($pmObj->isUIEnabled() == 'y')\n\t\t{\n\t\t\t$paymentMethodkeyLabels[$paymentMethod] = $pmObj->getPaymentMethodLabel();\n\t\t}\n\t}\n\t\n\treturn $paymentMethodkeyLabels;\t\n}", "public static function payment_methods() {\n return array(\n CheckfrontModule::PaymentPayNow => 'Pay now',\n CheckfrontModule::PaymentPayLater => 'Pay later'\n );\n }", "public function getPaymentAction()\n {\n $builder = Shopware()->Models()->createQueryBuilder();\n $builder->select(['payment'])\n ->from('Shopware\\Models\\Payment\\Payment', 'payment');\n\n $paymentMethods = $builder->getQuery()->getArrayResult();\n\n $languageId = $this->getBackendLanguage();\n\n foreach ($paymentMethods as &$paymentMethod) {\n $paymentMethod = $this->translatePayment($paymentMethod, $languageId);\n }\n\n $total = count($paymentMethods);\n\n $this->view->assign(\n [\n 'data' => $paymentMethods,\n 'total' => $total,\n 'success' => true\n ]\n );\n }", "public function getPaymentMethods()\n {\n $obj = new stdClass();\n\n // Must be in specific order for checksum --\n $obj->Timestamp = $this->getTimeStamp();\n $obj->SessionID = $this->getSessionID();\n $obj->PinCode = $this->getPinCode();\n $obj->UserAgent = $this->getUserAgent();\n // -----------------------------------------\n // Generate Checksum\n $obj->Checksum = $this->generateChecksum($obj);\n\n // Ask for GetPaymentMethods and get response\n $result = $this->client->GetPaymentMethods($obj);\n $result = $result->GetPaymentMethodsResult;\n $methods = isset($result->PaymentMethods->PaymentMethod) ? $result->PaymentMethods->PaymentMethod : null;\n\n $obj->Timestamp = $result->Timestamp;\n\n if (!is_null($methods)) {\n // Assign all properties of the PaymentMethods object as property of mainObject\n $obj = $this->parseForChecksum($obj, $methods);\n }\n\n // Unset properties for new Checksum\n unset($obj->Checksum);\n\n // Verify response data by making a new Checksum\n $CheckSum = $this->generateChecksum($obj);\n\n // Compare Checksums\n if ($result->Checksum != $CheckSum)\n throw new Exception('Data could not be verified');\n\n return (array) $methods;\n }", "protected function _getPaymentMethodsHtml()\n {\n return $this->_getHtmlByHandle('checkout_onepage_paymentmethod');\n }", "public function getPaymentMethods(Request $request){\n error_log(\"Request for getPaymentMethods $request\");\n\n $params = array(\n \"merchantAccount\" => env('MERCHANT_ACCOUNT'),\n \"channel\" => \"Web\"\n );\n\n $response = $this->checkout->paymentMethods($params);\n\n return $response;\n }", "public function getActiveMethods(){\n\n $activeCarriers = $this->shipmentConfig->getActiveCarriers();\n $methods = array();\n\n foreach($activeCarriers as $carrierCode => $carrierModel)\n {\n $carrierTitle =$this->scopeConfig->getValue('carriers/'.$carrierCode.'/title');\n\n if( $carrierMethods = $carrierModel->getAllowedMethods() )\n {\n foreach ($carrierMethods as $methodCode => $method)\n {\n $code= $carrierCode.'_'.$methodCode;\n $methods[]=array(\n 'label'=>$carrierTitle,\n 'value'=>$code\n );\n }\n }\n }\n\n return $methods; \n }", "public function getAutocreatePaymentMethods()\n {\n return $this->_toArrayObject($this->getConfig(\n 'autocreate/autocreate_allowed-payments'));\n }", "public function toArray()\n {\n $payments = $this->_paymentConfig->getAllMethods();\n\n $methods = [];\n\n foreach ($payments as $paymentCode => $paymentModel) {\n if ($paymentCode == 'iways_paypalplus_payment') {\n continue;\n }\n if (empty($paymentTitle)) {\n $paymentTitle = $paymentCode;\n }\n $paymentTitle = $this->_scopeConfig->getValue('payment/' . $paymentCode . '/title');\n $methods[$paymentCode] = $paymentTitle;\n }\n return $methods;\n }", "function get_organizer_payment_methods($organizer = NULL){\n\t\t$query = \"SELECT distinct(payment_key),payment_method_name\";\n\t\t$query .= \" FROM \" . $this->config->item('ems_organizer_payment_settings','dbtables');\n\t\t$query .= \" WHERE organizer_id = $organizer AND status = 1\";\n\n\t\t$res = $this->db->query($query);\n\t\t$resArr = $res->result_array();\n\n\t\tif(!empty($resArr)){\n\t\t\treturn $resArr;\n\t\t}else{\n\t\t\t$data = array();\n\t\t\treturn $data;\n\t\t}\n\t}", "public function getmethods($id)\n {\n return PaymentNetwork::where('service_id',$id)->get();\n }", "public function getAllPaymentMethods($translate = true)\n {\n if (empty($this->paymentMethods)) {\n $free = new \\PiedWeb\\ReservationBundle\\PaymentMethod\\Free();\n $this->paymentMethods[$free->getId()] = $translate ? $this->trans->trans('choices.'.$free->getHumanId()) : $free->getHumanId();\n\n $paymentMethods = explode('|', $this->getConfigurationPool()->getContainer()->getParameter('app.payment_method'));\n foreach ($paymentMethods as $paymentMethod) {\n $p = new $paymentMethod();\n $this->paymentMethods[$p->getId()] = $translate ? $this->trans->trans('choices.'.$p->getHumanId()) : $p->getHumanId();\n }\n }\n\n return $this->paymentMethods;\n }", "public function getMethodOfPaymentAllowableValues()\n {\n $baseVals = [\n self::METHOD_OF_PAYMENT_PAID_BY_BUYER,\n self::METHOD_OF_PAYMENT_COLLECT_ON_DELIVERY,\n self::METHOD_OF_PAYMENT_DEFINED_BY_BUYER_AND_SELLER,\n self::METHOD_OF_PAYMENT_FOB_PORT_OF_CALL,\n self::METHOD_OF_PAYMENT_PREPAID_BY_SELLER,\n self::METHOD_OF_PAYMENT_PAID_BY_SELLER,\n ];\n\n // This is necessary because Amazon does not consistently capitalize their\n // enum values, so we do case-insensitive enum value validation in ObjectSerializer\n return array_map(function ($val) { return strtoupper($val); }, $baseVals);\n }", "public function getPaymentOption() {\r\n $query = $this->db->get('v_combo_payment_method');\r\n \r\n if( $query->num_rows() > 0 ) {\r\n return $query->result();\r\n } else {\r\n return array();\r\n }\r\n }", "public static function getPaymentTypes()\n\t{\n\t\t$types = array('' => 'Any');\n\t\treturn array_merge($types, PaymentMethod::getPaymentMethods());\n\t}", "public function getSupportedPaymentTypes()\n {\n return [PaymentMethod::PAYPAL];\n }", "protected function getPaymentMethod(){\n return $this->method;\n }", "public static function getOfflinePaymentList()\n {\n \t\n \treturn array(\n \t 'cod'=>t(\"Cash On delivery\"),\n \t 'ocr'=>t(\"Offline Credit Card Payment\"),\n \t 'obd'=>t(\"Offline Bank Deposit\") ,\n \t 'pyr'=>t(\"Pay On Delivery\"), \t \n \t);\n }", "public function getPayments()\n {\n return $this->hasMany(Payments::className(), ['paymentMethodId' => 'paymentMethodId']);\n }", "public static function getPaymentTypes(){\n return array(self::IGFC=> PaymentUtils::getLabelText('PAYMENT_TYPE_IGFS'),self::CMPT1 => PaymentUtils::getLabelText('PAYMENT_TYPE_CMPT'));\n }", "public function getPaymentMethod()\n {\n return $this->response['result']['payment_type'];\n }", "static function getPayMethodsOptions($type = 0)\n\t{\n\t\tglobal $ilDB, $lng;\n\t\t\n\t\t$res = $ilDB->query('SELECT * FROM payment_paymethods WHERE pm_enabled = 1');\n\t\t$options = array();\n\t\t\n\t\t//this is only for additional entries in SelectInputGUIs\n\t\tswitch($type)\n\t\t{\n\t\t\tcase 'all':\t\n\t\t\t\t$options['all'] = $lng->txt('pay_all');\n\t\t\t\tbreak;\n\t\t\tcase 'not_specified': \t\n\t\t\t\t$options[0] = $lng->txt('paya_pay_method_not_specified');\n\t\t\t\tbreak;\n\t\t\t//default: break;\n\t\t}\n\t\t\n\t\twhile($row = $ilDB->fetchAssoc($res))\n\t\t{\n\t\t\t$options[$row['pm_id']] = ilPayMethods::getStringByPaymethod($row['pm_title']);\n\t\t}\t\t\n\t\n\t\treturn $options;\n\t}", "function getCronEnabledPaymentMethods()\n{\n\t$registeredPaymentMethods = getRegisteredPaymentMethods();\n\t\n\t$cronEnabledPaymentMethod = array();\n\t\n\tforeach ($registeredPaymentMethods as $paymentMethod => $className)\n\t{\n\t\t$pmObj = Service_PaymentMethodsFactory::getInstance($paymentMethod);\n\t\tif($pmObj->isAutoChargeEnabledPaymentMethod() == \"y\")\n\t\t{\n\t\t\tarray_push($cronEnabledPaymentMethod,$paymentMethod);\n\t\t}\n\t\t\n\t}\n\t\n\t$autoChargePaymentMethod = implode(\",\", $cronEnabledPaymentMethod);\n\t\n\treturn $autoChargePaymentMethod;\n}", "public function getPaymentplans() {\n return $this->paymentPlans;\n }", "public static function get_enabled_payment_times(){\n\t\t$enabled_payment_times = [];\n\t\t$enabled_payment_methods = self::get_enabled_payment_methods();\n foreach($enabled_payment_methods as $method_code => $payment_method){\n $enabled_payment_times[$payment_method['time_type']][$method_code] = $payment_method;\n }\n\t return $enabled_payment_times;\n\t}", "public function getShippingMethods();", "public function getPaymentMethodAllowableValues() : array\n {\n return [\n self::PAYMENT_METHOD_COD,\n self::PAYMENT_METHOD_CVS,\n self::PAYMENT_METHOD_OTHER,\n ];\n }", "public function getPaymentMethodAllowableValues()\n {\n return [\n self::PAYMENT_METHOD_COD,\n self::PAYMENT_METHOD_CVS,\n self::PAYMENT_METHOD_OTHER,\n ];\n }", "public function getPaymentMethod(){\n return $this->_getData(self::PAYMENT_METHOD);\n }", "public function listPaymentMethods(string $customer_id): array;", "public function getPayMethodAllowableValues()\n {\n return [\n self::PAY_METHOD_BANK_TRANSFER,\nself::PAY_METHOD_CHEQUE,\nself::PAY_METHOD_CREDIT_CARD,\nself::PAY_METHOD_GIRO_ACH,\nself::PAY_METHOD_OTHER, ];\n }", "public function getAll()\n\t{\n $get_all = PaymentMethod::all()->toArray();\n return response()->json($get_all);\n\n\t//\treturn view('welcome');\n\t}", "public function get_supported_payment_methods() {\n\t\treturn array(\n\t\t\tPronamic_WP_Pay_PaymentMethods::BANCONTACT,\n\t\t\tPronamic_WP_Pay_PaymentMethods::BANK_TRANSFER,\n\t\t\tPronamic_WP_Pay_PaymentMethods::CREDIT_CARD,\n\t\t\tPronamic_WP_Pay_PaymentMethods::IDEAL,\n\t\t\tPronamic_WP_Pay_PaymentMethods::SOFORT,\n\t\t);\n\t}", "function get_payment_method($method = '')\n{\n global $db_prefix;\n $tmp = array();\n\n if (!$method) {\n $res = sql_query(\"SELECT * FROM \".$db_prefix.\"module WHERE mod_type='payment' AND mod_enabled = '1'\");\n while ($row = sql_fetch_array($res)) {\n // get fee\n $module_config = $summary = array();\n $payment_cmd = 'init';\n $payment_extra_fee = 0;\n $mod = $row['mod_id'];\n if (!file_exists('./module/'.$mod.'/window.php')) {\n msg_die(sprintf($lang['msg']['internal_error'], 'Payment module '.$method.' not found.'));\n }\n require('./module/'.$mod.'/window.php');\n $tmp[$row['mod_id']]['method'] = $row['mod_id'];\n $tmp[$row['mod_id']]['name'] = $row['mod_name'];\n $tmp[$row['mod_id']]['fee'] = $payment_extra_fee;\n }\n\n return $tmp;\n } else {\n $payment_cmd = 'init';\n $payment_extra_fee = 0;\n $row = sql_qquery(\"SELECT * FROM \".$db_prefix.\"module WHERE mod_id='$method' AND mod_type='payment' AND mod_enabled = '1'\");\n if (!$row) {\n return false;\n }\n $mod = $row['mod_id'];\n if (!file_exists('./module/'.$mod.'/window.php')) {\n msg_die(sprintf($lang['msg']['internal_error'], 'Payment module '.$method.' not found.'));\n }\n require('./module/'.$mod.'/window.php');\n return (array('method' => $row['mod_id'], 'name' => $row['mod_name'], 'fee' => $payment_extra_fee));\n }\n}", "public function getPaymentMethod()\n {\n \n //Fill POST fields array\n $ipPostFields = [\n 'InvoiceAmount' => session()->get('total_price'),\n 'CurrencyIso' => 'KWD'\n ];\n \n //Call endpoint\n $paymentMethods = $this->initiatePayment($this->apiURL, $this->apiKey, $ipPostFields);\n \n \n return view('site.payment.checkout', compact('paymentMethods')); // redirect to the pay method in the service classe with the paymentmedthod id\n \n \n }", "public function getPaymentMethodAllowableValues()\n {\n return [\n self::PAYMENT_METHOD_NONE,\n self::PAYMENT_METHOD_DOMESTIC_BANK_TRANSFER,\n self::PAYMENT_METHOD_ABROAD_BANK_TRANSFER,\n self::PAYMENT_METHOD_ACCOUNT_TRANSFER,\n self::PAYMENT_METHOD_CREDIT_CARD,\n ];\n }", "public static function getPaymentMethodsByIsoCode($iso_code)\n {\n // HSS -> Web Payment Pro / Integral Evolution\n // ECS -> Express Checkout Solution\n // PPP -> PAYPAL PLUS\n // PVZ -> Braintree / Payment VZero\n\n $payment_method = array(\n // EUROPE\n 'BE'=>array(WPS, ECS),\n 'CZ'=>array(WPS, ECS),\n 'DE'=>array(WPS, ECS, PPP),\n 'ES'=>array(WPS, HSS, ECS),\n 'FR'=>array(WPS, HSS, ECS),\n 'IT'=>array(WPS, HSS, ECS),\n 'VA'=>array(WPS, HSS, ECS),\n 'NL'=>array(WPS, ECS),\n 'AN'=>array(WPS, ECS), //Netherlands Antilles\n 'PL'=>array(WPS, ECS),\n 'PT'=>array(WPS, ECS),\n 'AT'=>array(WPS, ECS),\n 'CH'=>array(WPS, ECS),\n 'DK'=>array(WPS, ECS),\n 'FI'=>array(WPS, ECS),\n 'GR'=>array(WPS, ECS),\n 'HU'=>array(WPS, ECS),\n 'LU'=>array(WPS, ECS),\n 'NO'=>array(WPS, ECS),\n 'RO'=>array(WPS, ECS),\n 'RU'=>array(WPS, ECS),\n 'SE'=>array(WPS, ECS),\n 'SK'=>array(WPS, ECS),\n 'UA'=>array(WPS, ECS),\n 'TR'=>array(WPS, ECS),\n 'SI'=>array(WPS, ECS),\n 'GB'=>array(WPS, HSS, ECS),\n 'IE'=>array(WPS, ECS),\n 'LT'=>array(WPS, ECS),\n 'EE'=>array(WPS, ECS),\n 'LV'=>array(WPS, ECS),\n 'RS'=>array(WPS, ECS),\n 'HR'=>array(WPS, ECS),\n 'MD'=>array(WPS, ECS),\n 'BA'=>array(WPS, ECS),\n 'AL'=>array(WPS, ECS),\n 'MT'=>array(WPS, ECS),\n 'MC'=>array(WPS, ECS),\n 'IS'=>array(WPS, ECS),\n\n //ASIE\n 'CN'=>array(WPS, ECS),\n 'MO'=>array(WPS, ECS),\n 'HK'=>array(WPS, HSS, ECS),\n 'JP'=>array(WPS, HSS, ECS),\n 'MY'=>array(WPS, ECS),\n 'BN'=>array(WPS, ECS),\n 'ID'=>array(WPS, ECS),\n 'KH'=>array(WPS, ECS),\n 'LA'=>array(WPS, ECS),\n 'PH'=>array(WPS, ECS),\n 'TL'=>array(WPS, ECS),\n 'VN'=>array(WPS, ECS),\n 'IL'=>array(WPS, ECS), //Israel\n 'SG'=>array(WPS, ECS),\n 'TH'=>array(WPS, ECS),\n 'TW'=>array(WPS, ECS),\n\n // OCEANIE\n 'NZ'=>array(WPS, ECS),\n 'PW'=>array(WPS, ECS),\n 'AU'=>array(WPS, HSS, ECS),\n\n // AMERIQUE LATINE\n 'BR'=>array(WPS, ECS),\n 'MX'=>array(WPS, ECS),\n 'CL'=>array(WPS, ECS),\n 'CO'=>array(WPS, ECS),\n 'PE'=>array(WPS, ECS),\n\n //AFRIQUE\n 'SL'=>array(WPS, ECS),\n 'SN'=>array(WPS, ECS),\n );\n $return = isset($payment_method[$iso_code]) ? $payment_method[$iso_code] : false;\n if(Configuration::get('VZERO_ENABLED'))\n {\n $return[] = PVZ;\n }\n return $return;\n }", "public function getMercadoPagoPaymentMethods($accessToken)\n {\n $mp = $this->getApiInstance($accessToken);\n try {\n $response = $mp->get(\"/v1/payment_methods\");\n if ($response['status'] == 401 || $response['status'] == 400) {\n return false;\n }\n } catch (\\Exception $e) {\n return false;\n }\n \n return $response['response'];\n }", "private function _getPaymentMethod ()\n\t{\n\t\t$id = craft()->config->get('paymentMethodId', 'commercepaybear');\n\t\treturn craft()->commerce_paymentMethods->getPaymentMethodById($id);\n\t}", "public function listMethods()\n {\n // @todo fix this method to return only high level data\n [$sql, $params] = $this->_dialect->listMethodsSql($this->_connection->config());\n $result = [];\n $statement = $this->_connection->execute($sql, $params);\n while ($row = $statement->fetch()) {\n $result[] = $row[0];\n }\n $statement->closeCursor();\n\n return $result;\n }", "public function getMapPaymentTypes()\n {\n return $this->map_payment_types;\n }", "public function getInstallments() {\n $api = new ApiPaymentMethods($this->_clientId, $this->_clientSecret, $this->_isTest);\n return $api;\n }", "public function getPaymentMethod() \n {\n return $this->_fields['PaymentMethod']['FieldValue'];\n }", "public function getPaymentMethod()\n {\n return $this->payment_method;\n }", "public function testIsPaymentMethodGettable()\n {\n $response = [self::PAYMENT_METHOD_RESPONSE];\n\n $this->stubRequest(\n 'GET',\n '/payment_methods?customer_id=' . self::CUSTOMER_ID,\n [],\n [],\n $response\n );\n\n $result = DirectDebit::getPaymentMethodsByCustomerID(\n self::CUSTOMER_ID\n );\n\n $this->assertEquals($response, $result);\n }", "protected function getPaymentMethods($paymentMethodCode = null)\n {\n if ($this->paymentMethods === null) {\n $this->paymentMethods = [];\n foreach ($this->getStoreIds() as $storeId) {\n foreach ($this->paymentMethodRepository->getActiveList($storeId) as $item) {\n if (!isset($this->paymentMethods[$item->getCode()])) {\n $this->paymentMethods[$item->getCode()] = $item->getTitle();\n }\n }\n }\n }\n if ($paymentMethodCode !== null) {\n return isset($this->paymentMethods[$paymentMethodCode]) ? $this->paymentMethods[$paymentMethodCode] : null;\n }\n\n return $this->paymentMethods;\n }", "public function showPaymentMethods()\n {\n if(session()->get('parental'))\n {\n $user = DB::table('users')->where('username', session()->get('parental'))->first();\n $pay = DB::table('paymentsmethods')\n ->where('owner', Auth::id())\n ->orWhere('owner', $user->id)\n ->get();\n }else{\n $pay = DB::table('paymentsmethods')->where('owner', Auth::id() )->get(); \n }\n return response()->json($pay);\n }", "public function getPaymentMethod()\n {\n return $this->paymentMethod;\n }", "public function getPaymentMethod()\n {\n return $this->paymentMethod;\n }", "public function get_possible_payment_methods_for_order( WC_Order $order ) {\n\n\t\tif ( ! isset( self::$possible_payment_method_cache[ $order->get_id() ] ) || is_null( self::$possible_payment_method_cache[ $order->get_id() ] ) ) {\n\t\t\ttry {\n\t\t\t\t$transaction = $this->get_transaction_from_order( $order );\n\t\t\t\tif ( $transaction->getState() != \\PostFinanceCheckout\\Sdk\\Model\\TransactionState::PENDING ) {\n\t\t\t\t\tself::$possible_payment_method_cache[ $order->get_id() ] =\n\t\t\t\t\t\t$transaction->getAllowedPaymentMethodConfigurations();\n\t\t\t\t\treturn self::$possible_payment_method_cache[ $order->get_id() ];\n\t\t\t\t}\n\t\t\t\t$integration_method = get_option( WooCommerce_PostFinanceCheckout::CK_INTEGRATION );\n\t\t\t\t$payment_methods = $this->get_transaction_service()->fetchPaymentMethods(\n\t\t\t\t\t$transaction->getLinkedSpaceId(),\n\t\t\t\t\t$transaction->getId(),\n\t\t\t\t\t$integration_method\n\t\t\t\t);\n\t\t\t\t$method_configuration_service = WC_PostFinanceCheckout_Service_Method_Configuration::instance();\n\t\t\t\t$possible_methods = array();\n\t\t\t\tforeach ( $payment_methods as $payment_method ) {\n\t\t\t\t\t$method_configuration_service->update_data( $payment_method );\n\t\t\t\t\t$possible_methods[] = $payment_method->getId();\n\t\t\t\t}\n\n\t\t\t\tself::$possible_payment_method_cache[ $order->get_id() ] = $possible_methods;\n\t\t\t} catch ( WC_PostFinanceCheckout_Exception_Invalid_Transaction_Amount $e ) {\n\t\t\t\tself::$possible_payment_method_cache[ $order->get_id() ] = array();\n\t\t\t\tthrow $e;\n\t\t\t} catch ( \\PostFinanceCheckout\\Sdk\\ApiException $e ) {\n\t\t\t\tself::$possible_payment_method_cache[ $order->get_id() ] = array();\n\t\t\t\tthrow $e;\n\t\t\t}\n\t\t}\n\t\treturn self::$possible_payment_method_cache[ $order->get_id() ];\n\t}", "public function payments()\n {\n return $this->morphToMany(Payment::class, 'referenceable', 'payment_details')->active();\n }", "public function get_methods(Cart $cart);", "public function index()\n\t\t{\n\t\t\t$payment_methods = DB::table('payment_methods')\n\t\t\t\t\t\t\t\t->orderBy('payment_methods.ordering', 'desc')\n\t \t->paginate(10);\n\n\t\t\treturn View::make('admin.payment_methods.payment-methods')\n\t\t\t\t\t\t\t\t->with('payment_methods', $payment_methods);\n\t\t}", "public function providerList()\n {\n $this->getData();\n $this->getDefaultValue();\n\n $list = $this->getMethodsName('list');\n $provider = [];\n\n foreach ($list as $name) {\n $provider[$name] = [\n 'name' => $name,\n 'productId' => $this->allMethods[$name]['countRequiredParams'] > 0\n ? $this->argList\n : []\n ];\n }\n\n return $provider;\n }", "static function getContactMethodTypesList()\n\t{\n\n\t\t$dataSource = self::getDataSource();\n\n\t\t$strSQL = \"SELECT id,description\n\t\tFROM contact_method_type\n\t\tORDER BY description\";\n\n\t\t$result = $dataSource->query($strSQL);\n\n\t\tif(MDB2::isError($result))\n\t\t{\n\t\t\tthrow new Exception(\"Failed to get contact methods: \" . $result->getMessage());\n\t\t}\n\n\t\t$arrContactMethodTypesList = $result->fetchAll(MDB2_FETCHMODE_ASSOC);\n\t\t\n\t\treturn $arrContactMethodTypesList;\n\n\t}", "public function getPaymentTypeAllowableValues()\n {\n return [\n self::PAYMENT_TYPE_CARD,\n self::PAYMENT_TYPE_MPO,\n self::PAYMENT_TYPE_MOBILEPAY,\n self::PAYMENT_TYPE_VIPPS,\n self::PAYMENT_TYPE_VIPPS_RECURRING,\n self::PAYMENT_TYPE_SWISH,\n self::PAYMENT_TYPE_VIABILL,\n self::PAYMENT_TYPE_ANYDAY,\n self::PAYMENT_TYPE_MANUAL,\n self::PAYMENT_TYPE_APPLEPAY,\n self::PAYMENT_TYPE_GOOGLEPAY,\n self::PAYMENT_TYPE_PAYPAL,\n self::PAYMENT_TYPE_KLARNA_PAY_NOW,\n self::PAYMENT_TYPE_KLARNA_PAY_LATER,\n self::PAYMENT_TYPE_KLARNA_SLICE_IT,\n self::PAYMENT_TYPE_KLARNA_DIRECT_BANK_TRANSFER,\n self::PAYMENT_TYPE_KLARNA_DIRECT_DEBIT,\n self::PAYMENT_TYPE_RESURS,\n self::PAYMENT_TYPE_MOBILEPAY_SUBSCRIPTIONS,\n self::PAYMENT_TYPE_EMV_TOKEN,\n self::PAYMENT_TYPE_BCMC,\n self::PAYMENT_TYPE_BLIK,\n self::PAYMENT_TYPE_PP_BLIK_OC,\n self::PAYMENT_TYPE_GIROPAY,\n self::PAYMENT_TYPE_IDEAL,\n self::PAYMENT_TYPE_P24,\n self::PAYMENT_TYPE_SEPA,\n self::PAYMENT_TYPE_VERKKOPANKKI,\n ];\n }", "function getSignupEnabledPaymentMethods()\n{\n\tglobal $registeredPaymentMethods;\n\t\n\tforeach ($registeredPaymentMethods as $paymentMethod => $className)\n\t{\n\t\t$pmObj = Service_PaymentMethodsFactory::getInstance($paymentMethod);\n\t\tif($pmObj->isSignupEnabled()== 'y')\n\t\t{\n\t\t\t$paymentMethodkeyLabels[$paymentMethod] = $pmObj->getPaymentMethodLabel();\n\t\t}\n\t}\n\t\n\treturn $paymentMethodkeyLabels;\n}", "protected function getSavedCardsPaymentMethod()\n {\n return \\XLite\\Core\\Database::getRepo('XLite\\Model\\Payment\\Method')\n ->findOneBy(array('class' => self::METHOD_SAVED_CARD));\n }", "public function getShippingMethods()\n {\n $array = array();\n foreach ($this->config as $key => $item) {\n if ($key == 'allowed_domestic_methods') {\n foreach ($item as $item_internal) {\n $array['Domestic'][] = $item_internal['name'];\n }\n }\n\n if ($key == 'allowed_international_methods') {\n foreach ($item as $item_internal) {\n $array['International'][] = $item_internal['name'];\n }\n }\n }\n return $array;\n }", "public function index()\n {\n return Payment::all();\n }", "public function getAutocreateAllowedPaymentMethods()\n {\n $path = 'intraship/autocreate/autocreate_allowed-payments';\n $methodCodes = Mage::getStoreConfig($path);\n if (null === $methodCodes) {\n $methodCodes = '';\n }\n return $methodCodes;\n }", "public function getPaymentMethodType() {\r\r\n return $this->_paymentMethod;\r\r\n }", "public static function getPaymentMethods($config = NULL)\n {\n if ($config == NULL) {\n WebPay::throwMissingConfigException();\n }\n\n return new GetPaymentMethods($config);\n }", "public static function getList(Context $context, $filter = null)\n {\n $context->setSecurityMode(Context::BASIC_AUTHENTICATION);\n\n $queryParams = (!is_null($filter)) ? ['filter' => $filter] : [];\n\n return NetLicensingService::getInstance()->getList($context, Constants::PAYMENT_METHOD_ENDPOINT_PATH, $queryParams, PaymentMethod::class);\n }", "public function getMethods();", "public function getMethods();", "public function getMethods();" ]
[ "0.805618", "0.80237746", "0.7838028", "0.76399994", "0.7594898", "0.7503392", "0.7456745", "0.74385417", "0.73682684", "0.7221175", "0.71844894", "0.71409684", "0.7015059", "0.70058465", "0.6955736", "0.69505453", "0.693007", "0.69244844", "0.6905005", "0.6877195", "0.68755317", "0.6859671", "0.6833438", "0.68164265", "0.68069184", "0.67922014", "0.67773443", "0.6747065", "0.67362916", "0.67048645", "0.66908664", "0.6633588", "0.66078734", "0.66048944", "0.6604284", "0.6551729", "0.65352273", "0.64580387", "0.6452849", "0.64449614", "0.6438056", "0.642276", "0.64181125", "0.64000946", "0.63707423", "0.63503915", "0.6350246", "0.62995195", "0.62718177", "0.62702143", "0.6257702", "0.6255807", "0.6253721", "0.62216514", "0.62144744", "0.62127465", "0.6210953", "0.6207641", "0.6180135", "0.6176817", "0.61646235", "0.6158321", "0.61571777", "0.61532", "0.61491865", "0.6143819", "0.6138719", "0.6127435", "0.61244583", "0.61236364", "0.61132073", "0.61072695", "0.610485", "0.61037844", "0.6097949", "0.60950756", "0.6089089", "0.60847527", "0.6082172", "0.6062543", "0.6060806", "0.6060806", "0.60581094", "0.6057073", "0.60473436", "0.60449713", "0.60403925", "0.6027402", "0.6024681", "0.6011471", "0.59920114", "0.59908116", "0.5989368", "0.5966696", "0.595732", "0.59470516", "0.5941553", "0.59343535", "0.59343535", "0.59343535" ]
0.6469307
37
function to store jurnal
private function jurnalSendOrder(float $totHpp, float $ongkir, String $notasales, Request $request) { $details = []; // Acc persediaan keluar $acc_persediaan = DB::table('dk_pembukuan_detail') ->where('pd_pembukuan', function($query){ $query->select('pe_id')->from('dk_pembukuan') ->where('pe_nama', 'Pengiriman Distribusi Penjualan') ->where('pe_comp', Auth::user()->u_company)->first(); })->where('pd_nama', 'COA Persediaan Item') ->first(); $acc_persediaan_jalan = DB::table('dk_pembukuan_detail') ->where('pd_pembukuan', function($query){ $query->select('pe_id')->from('dk_pembukuan') ->where('pe_nama', 'Pengiriman Distribusi Penjualan') ->where('pe_comp', Auth::user()->u_company)->first(); })->where('pd_nama', 'COA Persediaan dalam perjalanan') ->first(); if(!is_null($request->harga) && $request->harga != 0) { // Acc Ongkir $acc_beban_ongkir = DB::table('dk_pembukuan_detail') ->where('pd_pembukuan', function($query){ $query->select('pe_id')->from('dk_pembukuan') ->where('pe_nama', 'Pengiriman Distribusi Penjualan') ->where('pe_comp', Auth::user()->u_company)->first(); })->where('pd_nama', 'COA beban ongkos kirim') ->first(); $acc_kas = DB::table('dk_pembukuan_detail') ->where('pd_pembukuan', function($query){ $query->select('pe_id')->from('dk_pembukuan') ->where('pe_nama', 'Pengiriman Distribusi Penjualan') ->where('pe_comp', Auth::user()->u_company)->first(); })->where('pd_nama', 'COA Kas/Setara Kas') ->first(); } $parrent = DB::table('dk_pembukuan')->where('pe_nama', 'Pengiriman Distribusi Penjualan') ->where('pe_comp', Auth::user()->u_company)->first(); if(!$parrent || !$acc_persediaan || !$acc_persediaan_jalan){ return [ 'status' => 'gagal', 'message' => 'beberapa COA yang digunakan untuk transaksi ini belum ditentukan.' ]; } array_push($details, [ "jrdt_nomor" => 1, "jrdt_akun" => $acc_persediaan_jalan->pd_acc, "jrdt_value" => $totHpp, "jrdt_dk" => "D", "jrdt_keterangan" => $acc_persediaan_jalan->pd_keterangan, "jrdt_cashflow" => $acc_persediaan_jalan->pd_cashflow ]); if(!is_null($request->harga) && $request->harga != 0){ array_push($details, [ "jrdt_nomor" => 2, "jrdt_akun" => $acc_beban_ongkir->pd_acc, "jrdt_value" => $request->harga, "jrdt_dk" => "D", "jrdt_keterangan" => $acc_beban_ongkir->pd_keterangan, "jrdt_cashflow" => $acc_beban_ongkir->pd_cashflow ]); } array_push($details, [ "jrdt_nomor" => 3, "jrdt_akun" => $acc_persediaan->pd_acc, "jrdt_value" => $totHpp, "jrdt_dk" => "K", "jrdt_keterangan" => $acc_persediaan->pd_keterangan, "jrdt_cashflow" => $acc_persediaan->pd_cashflow, ]); if(!is_null($request->harga) && $request->harga != 0){ array_push($details, [ "jrdt_nomor" => 4, "jrdt_akun" => $acc_kas->pd_acc, "jrdt_value" => $request->harga, "jrdt_dk" => "K", "jrdt_keterangan" => $acc_kas->pd_keterangan, "jrdt_cashflow" => $acc_kas->pd_cashflow, ]); } // return $details; $jurnal = jurnal::jurnalTransaksi($details, date('Y-m-d'), $notasales, $parrent->pe_nama, 'TK', Auth::user()->u_company); if($jurnal['status'] == 'error'){ return $jurnal; } if($request->paymentType == 'T') { $details = []; $acc_kas = m_paymentmethod::where('pm_id', $request->paymentMethod) ->first(); $acc_kas_ket = DB::table('dk_pembukuan_detail') ->where('pd_pembukuan', function($query){ $query->select('pe_id')->from('dk_pembukuan') ->where('pe_nama', 'Penjualan Pusat Dengan DP') ->where('pe_comp', Auth::user()->u_company)->first(); })->where('pd_nama', 'COA Kas/Setara Kas') ->first(); $acc_DP = DB::table('dk_pembukuan_detail') ->where('pd_pembukuan', function($query){ $query->select('pe_id')->from('dk_pembukuan') ->where('pe_nama', 'Penjualan Pusat Dengan DP') ->where('pe_comp', Auth::user()->u_company)->first(); })->where('pd_nama', 'COA Pendapatan Dibayar Dimuka') ->first(); $parrent = DB::table('dk_pembukuan')->where('pe_nama', 'Penjualan Pusat Dengan DP') ->where('pe_comp', Auth::user()->u_company)->first(); if(!$parrent || !$acc_DP || !$acc_kas){ return [ 'status' => 'gagal', 'message' => 'beberapa COA yang digunakan untuk transaksi ini belum ditentukan.' ]; } array_push($details, [ "jrdt_nomor" => 1, "jrdt_akun" => $acc_kas->pm_akun, "jrdt_value" => $request->payCash, "jrdt_dk" => "D", "jrdt_keterangan" => $acc_kas_ket->pd_keterangan, "jrdt_cashflow" => $acc_kas_ket->pd_cashflow ]); array_push($details, [ "jrdt_nomor" => 1, "jrdt_akun" => $acc_DP->pd_acc, "jrdt_value" => $request->payCash, "jrdt_dk" => "K", "jrdt_keterangan" => $acc_DP->pd_keterangan, "jrdt_cashflow" => $acc_DP->pd_cashflow ]); $jurnal = jurnal::jurnalTransaksi($details, date('Y-m-d'), $notasales, $parrent->pe_nama, 'TK', Auth::user()->u_company); if($jurnal['status'] == 'error'){ return $jurnal; } } return [ 'status' => 'berhasil', 'message' => '' ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function jadwal(){\n\t\tdate_default_timezone_set('Asia/Jakarta');\n// ----------------------------------------------------------------------\n // meng generate tanggal sekarang sampai tanggal akhir bulan\n\t\t// mencari hari\n\t\t$dayList = array(\n\t\t\t'Sun' => 'Minggu',\n\t\t\t'Mon' => 'Senin',\n\t\t\t'Tue' => 'Selasa',\n\t\t\t'Wed' => 'Rabu',\n\t\t\t'Thu' => 'Kamis',\n\t\t\t'Fri' => 'Jumat',\n\t\t\t'Sat' => 'Sabtu'\n\t\t);\n\n\t\t$tgl_hari_ini=Date(\"j\");\n\t\t$tgl_terakhir=Date(\"t\");\n\t\t// --------------------------------------------------------------------------\n\t // mencari kode tanggal pada tabel waktu\n\t\t$tahun= Date(\"Y\");\n\t\t$bln_skrg= Date(\"n\");\n\t\t$bulanList=array(\n\t\t\t\t\"1\"=>\"januari\",\n\t\t\t\t\"2\"=>\"Februari\",\n\t\t\t\t\"3\"=>\"Maret\",\n\t\t\t\t\"4\"=>\"April\",\n\t\t\t\t\"5\"=>\"Mei\",\n\t\t\t\t\"6\"=>\"Juni\",\n\t\t\t\t\"7\"=>\"Juli\",\n\t\t\t\t\"8\"=>\"Agustus\",\n\t\t\t\t\"9\"=>\"September\",\n\t\t\t\t\"10\"=>\"Oktober\",\n\t\t\t\t\"11\"=>\"November\",\n\t\t\t\t\"12\"=>\"Desember\",\n\t\t\t);\n\n\t\t$tgl=0;\n\t\t$hr=1;\n\t\t$input_bulan=array();\n\t\tfor ($taggl=$tgl_hari_ini; $taggl<=$tgl_terakhir ; $taggl++) {\n\t\t$tanggal[$tgl++]=$taggl\t;\n // menentukan jumlah hari pada tgl sekarang sampai tanggal terakhir\n\t\t$jml_hri=$hr++;\n\t\t}\n\n\t\t$jum_tabl_tgl=$jml_hri;\n\t\t// untuk membatasi nilai ketika tanggal lebih dari 7 lengthnya\n\t\tif ($jum_tabl_tgl>=7) {\n\t\t\t$jum_tabl_tgl=7;\n\t\t\t\t$input_bulan[0]=$bulanList[$bln_skrg];\n\t\t}elseif ($jum_tabl_tgl<7) {\n\t\t\t// jika tanggal menjelang akhir maka akan menampilkan tnggal muda\n\t\t\t$jum_tabl_tgl=7;\n\t\t\t$jml_hri=7;\n\t\t\t$tgl_ahr_bln_dpn=$tgl_terakhir+1;\n\t\t\tfor ($taggl=1; $taggl<=$tgl_ahr_bln_dpn; $taggl++) {\n\t\t\t\t$tanggal[$tgl++]=$taggl;\n\t\t\t}\n\t\t\tfor ($i=0; $i <2 ; $i++) {\n\t\t\t\t$input_bulan[$i]=$bulanList[$bln_skrg+$i];\n\t\t\t}\n\n\t\t}elseif (empty($jum_tabl_tgl)) {\n\t\t\t$jum_tabl_tgl=1;\n\t\t}\n\n // untuk mencari nama hari di tampung di data_hari\n\t\tfor($i=0;$i<$jml_hri;$i++){\n\t\t\tif ($jum_tabl_tgl<7) {\n\t\t\t\t$time[$i] = mktime(0, 0, 0, date(\"m\")+1, date(\"d\")+$i, date(\"Y\"));\n\t \t\t $hari[$i]=date(\"D\", $time[$i]);\n\t\t\t $data_hari[$i]=$dayList[$hari[$i]];\n\t\t }elseif ($jum_tabl_tgl>=7) {\n\t\t\t $time[$i] = mktime(0, 0, 0, date(\"m\"), date(\"d\")+$i, date(\"Y\"));\n \t\t $hari[$i]=date(\"D\", $time[$i]);\n \t\t $data_hari[$i]=$dayList[$hari[$i]];\n\t\t }\n\n\t\t}\n\n\t\t$kod=0;\n\t\t$jum_jad=0;\n\n\n // ----------------------------------------------------------\n\t\t// mencari kode karyawan di tabel jadwal\n\t\t$kar=0;\n\t\t$kd_kary=array();\n\t\t$kd_karya=$this->crud_j->cari_kode_kar()->result();\n\t\tforeach ($kd_karya as $karyawan) {\n\t\t\t$kd_kary[$kar++]=$karyawan->kd_kar;\n\t\t}\n // mencari jumlah kode karyawan di tabel jadwal untuk di tampilkan di looping\n\t\t$jml_kar=$this->crud_j->cari_jml_kd_kary()->result();\n\t\tforeach ($jml_kar as $jml) {\n\t\t\t$jum_kd_kar=$jml->jml_kar;\n\t\t}\n// ---------------------------------------------------------\n\t\t//menacri nama karyawan berdasarkan kode karyawan yang ada di tabel jadwal di arrayy\n\t\t$nam=0;\n\t\t$nam_karya=array();\n\t\t$kd_karyaa=array();\n\t\tfor ($i=0; $i<$jum_kd_kar ; $i++) {\n\t\t\t$nam_kary=$this->crud_j->cari_nama_karyawan($kd_kary[$i])->result();\n\t\t\tforeach ($nam_kary as $nama ) {\n\t\t\t\t$nam_karya[$i]=$nama->nam_kar;\n\t\t\t\t$kd_karyaa[$i]=$nama->kd_kar;\n\t\t\t\tif (empty($nam_karya[$i])||empty($kd_karyaa[$i])) {\n\t\t\t\t\t$nam_karya[$i]=\"-\";\n\t\t\t\t\t$kd_karyaa[$i]=\"-\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n // mencari jadwal karyawan\n\t\t$jum_tgl=0;\n\t\t$jml_tgl=$this->crud_j->cari_jml_tanggal($bulanList[$bln_skrg],$tahun)->result();\n\t\tforeach ($jml_tgl as $jml) {\n\t\t\t$jum_tanggal=$jml->jml_tanggal;\n\t\t}\n\t\t$juml_tgl=$jum_tanggal;\n\t\tif ($jum_tgl>7) {\n\t\t\t$jum_tgl=7;\n\t\t}elseif (empty($jum_tgl)) {\n\t\t\t$jum_tgl=1;\n\t\t}elseif ($jum_tgl<7) {\n\t\t\t$jum_tgl=$jum_tanggal;\n\t\t}\n\n\t\tfor ($i=0; $i <$jum_kd_kar ; $i++) {\n\t\t\tfor ($j=0; $j <$jum_tabl_tgl ; $j++) {\n\t\t\t\t// untuk mendapatkan kde tab jam di tab jadwal\n\t\t\t\t$kd_jadwal=$this->crud_j->cari_jadwal_kar($kd_kary[$i],$tanggal[$j],$bulanList[$bln_skrg],$tahun)->result();\n\t\t\t\tforeach ($kd_jadwal as $jadwl_pgw) {\n\t\t\t\t\t$kdjad[$i][$j]=$jadwl_pgw->kd_waktu;\n\n\t\t\t\t}\n\t\t\t\t// mencari jadwal sesuai kode yang di cari di tab waktu\n\t\t\t\t$kdjadwal_jam=$this->crud_j->cari_jadwal_jam($kdjad[$i][$j])->result();\n\t\t\t\tforeach ($kdjadwal_jam as $kdjadwal_jam) {\n\t\t\t\t\t$jadwal_pgw[$i][$j]=$kdjadwal_jam->jadwal;\n\t\t\t\t\t$jadwal_jam[$i][$j]=$kdjadwal_jam->jam;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (empty($jadwal_pgw)||empty($jadwal_jam)) {\n\t\t\t$jadwal_pgw=\"-\";\n\t\t\t$jadwal_jam=\"-\";\n\t\t}\n\t\t\t$total_kary=$this->crud_s->cari_jumlah_kar()->result();\n\t\t\tforeach ($total_kary as $total) {\n\t\t\t\t$jum_tot_kary=$total->total;\n\t\t\t}\n\n\n // --------------------------------kusus CRUD--------------------\n\n\n\t\t// ceksession panah menu\n\t\t$this->cek_session->cek_session_jadwal();\n\n // pengiriman data tampilan\n\t\t$data['tanggal']=$tanggal;\n\n\t\t$data['jum_kar']=$jum_kd_kar;\n\t\t$data['nama_hari']=$data_hari;\n\t\t$data['jum_jad']=$jum_tgl;\n\t\t$data['jadwal']=$jadwal_pgw;\n\t\t$data['jadwal_jam']=$jadwal_jam;\n\t\t$data['bulan']=$input_bulan;\n\t\t$data['tahun']=$tahun;\n\t\t$data['jum_row_tgl']=$jum_tabl_tgl;\n // -------------pengiriman data crud----------------\n\n\t\t$data['kd_unik_jd']=$this->crud_j->cari_kode_jadwal();\n\t\t$data['nama_kary']=$nam_karya;\n\t\t$data['nama_pgw']=$this->crud_m->tampil_data_pegawai()->result();//untuk form input\n\t\t$data['kd_karya']=$kd_karyaa;\n\t\t$data['tgl_awl']=$tgl_hari_ini;\n\t\t$data{'tgl_akhr'}=$tgl_terakhir;\n\t\t$data['jum_kary']=$jum_tot_kary;\n\t\t$data['tgl_akhr_dpn']=$tgl_ahr_bln_dpn;\n\t\t$data['bln_skrg']=$bulanList[$bln_skrg];\n\n\t\t$data['cari_tahun']=$this->crud_j->cari_tahun()->result();\n\n\t\t//$data['cari_bulan']=$this->crud_j->cari_bulan()->result();\n\t\t//$data['kd_kar']=$this->db->crud_j->cari_kd_kar2($nama)->result();\n\t\t// untuk menampilkan halaman\\\n $this->load->view('adm/nav_content/header');\n \t$this->load->view('adm/content/data_jadwal',$data);\n\n\t\t$this->load->view('adm/nav_content/footer');\n\t\t$this->load->view('adm/modal_input/input_jadwal',$data);\n\t\t$this->load->view('adm/modal_input/edit_jadwal',$data);\n\t\t$this->load->view('adm/modal_input/edit_all_jadwal',$data);\n\t\t$this->load->view('adm/modal_input/hapus_jadwal',$data);\n\t\t$this->load->view('adm/modal_input/modal_info_jdwl');\n\t\t$this->load->view('adm/modal_input/input_cetak_jadwal',$data);\n\n\n\n\n\t\t// untuk mengecek pesan konfirmasi edit pegawai\n\t\t\t\tif ($this->session->userdata('tgl_jdwl')=='gagal') {\n\t\t\t\t\t$this->load->view('adm/modal_input/sweet-alert-tgl-ggl');\n\t\t\t\t\t$this->session->unset_userdata('tgl_jdwl');\n\t\t\t\t}\n\t\t\t\tif ($this->session->userdata('cekWaktu')=='gagal') {\n\t\t\t\t\t$this->load->view('adm/modal_input/sweet-alert-cekWaktu');\n\t\t\t\t\t$this->session->unset_userdata('cekWaktu');\n\t\t\t\t}elseif($this->session->userdata('cekWaktu')=='berhasil') {\n\t\t\t\t\t$this->load->view('adm/modal_input/sweet-alert-input');\n\t\t\t\t\t$this->session->unset_userdata('cekWaktu');\n\t\t\t\t}\n\t\t\t\tif ($this->session->userdata('edit_jadwal')=='gagal') {\n\t\t\t\t\t$this->load->view('adm/modal_input/sweet-alert-gagal');\n\t\t\t\t\t$this->session->unset_userdata('edit_jadwal');\n\t\t\t\t}elseif($this->session->userdata('edit_jadwal')=='berhasil') {\n\t\t\t\t\t$this->load->view('adm/modal_input/sweet-alert-edit');\n\t\t\t\t\t$this->session->unset_userdata('edit_jadwal');\n\t\t\t\t}\n\t\t\t\tif ($this->session->userdata('hapus_jadwal')=='gagal') {\n\t\t\t\t\t$this->load->view('adm/modal_input/sweet-alert-gagal');\n\t\t\t\t\t$this->session->unset_userdata('hapus_jadwal');\n\t\t\t\t}elseif($this->session->userdata('hapus_jadwal')=='berhasil') {\n\t\t\t\t\t$this->load->view('adm/modal_input/sweet-alert-hapus');\n\t\t\t\t\t$this->session->unset_userdata('hapus_jadwal');\n\t\t\t\t}\n\t\t\t\tif ($this->session->userdata('empty_jadwal')=='gagal') {\n\t\t\t\t\t$this->load->view('adm/modal_input/sweet-alert-jadwal-empty');\n\t\t\t\t\t$this->session->unset_userdata('empty_jadwal');\n\t\t\t\t}elseif($this->session->userdata('empty_jadwal')=='berhasil') {\n\t\t\t\t\t$this->load->view('adm/modal_input/sweet-alert-thanks');\n\t\t\t\t\t$this->session->unset_userdata('empty_jadwal');\n\t\t\t\t}\n\n\t}\n\n\n\n\tfunction setting(){\n\n\t\t$data['jml_kar']=$this->crud_s->cari_jumlah_kar()->result();\n\t\t$data['super_usr']=$this->crud_s->tampil_data_super_user()->result();\n\t\t// ceksession panah menu\n\t\t$this->cek_session->cek_session_setting();\n // untuk menampilkan halaman\n\t\t$this->load->view('adm/nav_content/header');\n\t\t$this->load->view('adm/content/setting',$data);\n\t\t$this->load->view('adm/nav_content/footer');\n\t\t$this->load->view('adm/modal_input/modal_info_jdwl');\n\n\t\t// untuk mengecek pesan konfirmasi edit pegawai\n\t\t\t\tif ($this->session->userdata('editSuper')=='berhasil') {\n\t\t\t\t\t$this->load->view('adm/modal_input/sweet-alert-edit');\n\t\t\t\t\t$this->session->unset_userdata('editSuper');\n\t\t\t\t}elseif($this->session->userdata('editSuper')=='gagal') {\n\t\t\t\t\t$this->load->view('adm/modal_input/sweet-alert-gagal');\n\t\t\t\t\t$this->session->unset_userdata('editSuper');\n\t\t\t\t}\n\n\t}\n\n\tfunction export_excel(){\n\t\tdate_default_timezone_set('Asia/Jakarta');\n\t// ----------------------------------------------------------------------\n\t\t// meng generate tanggal sekarang sampai tanggal akhir bulan\n\t\t// mencari hari\n\t\t$dayList = array(\n\t\t\t'Sun' => 'Minggu',\n\t\t\t'Mon' => 'Senin',\n\t\t\t'Tue' => 'Selasa',\n\t\t\t'Wed' => 'Rabu',\n\t\t\t'Thu' => 'Kamis',\n\t\t\t'Fri' => 'Jumat',\n\t\t\t'Sat' => 'Sabtu'\n\t\t);\n\t\t$tgl_hari_ini=Date(\"j\");\n\t\t$tgl_terakhir=Date(\"t\");\n\t\t$tgl=0;\n\t\t$hr=1;\n\t\tfor ($i=$tgl_hari_ini; $i<=$tgl_terakhir ; $i++) {\n\t\t$tanggal[$tgl++]=$i\t;\n\t\t// menentukan jumlah hari pada tgl sekarang sampai tanggal terakhir\n\t\t$jml_hri=$hr++;\n\t\t}\n\t\t$jum_tabl_tgl=$jml_hri;\n\t\tif ($jum_tabl_tgl>7) {\n\t\t\t$jum_tabl_tgl=7;\n\t\t}elseif ($jum_tabl_tgl<7) {\n\t\t\t$jum_tabl_tgl=$jml_hri;\n\t\t}elseif (empty($jum_tabl_tgl)) {\n\t\t\t$jum_tabl_tgl=1;\n\t\t}\n\n\t\t// untuk mencari nama hari di tampung di data_hari\n\t\tfor($i=0;$i<$jml_hri;$i++){\n\t\t\t$time[$i] = mktime(0, 0, 0, date(\"m\"), date(\"d\")+$i, date(\"Y\"));\n\t\t $hari[$i]=date(\"D\", $time[$i]);\n\t\t $data_hari[$i]=$dayList[$hari[$i]];\n\t\t}\n\t// --------------------------------------------------------------------------\n\t\t// mencari kode tanggal pada tabel waktu\n\t\t$tahun= Date(\"Y\");\n\t\t$bulan= Date(\"n\");\n\t\t$bulanList=array(\n\t\t\t\"1\"=>\"januari\",\n\t\t\t\"2\"=>\"Februari\",\n\t\t\t\"3\"=>\"Maret\",\n\t\t\t\"4\"=>\"April\",\n\t\t\t\"5\"=>\"Mei\",\n\t\t\t\"6\"=>\"Juni\",\n\t\t\t\"7\"=>\"Juli\",\n\t\t\t\"8\"=>\"Agustus\",\n\t\t\t\"9\"=>\"September\",\n\t\t\t\"10\"=>\"Oktober\",\n\t\t\t\"11\"=>\"November\",\n\t\t\t\"12\"=>\"Desember\",\n\t\t);\n\t\t$kod=0;\n\t\t$jum_jad=0;\n\n\t\t\t// mencari kode tanggal pada tabel waktu\n\t// \t\t$kde_tgl=array();\n\t// \tfor ($i=0; $i<7 ; $i++) {\n\t// \t$kode_tgl=($this->crud_j->cari_tanggal_kode($tanggal[$i],$bulanList[$bulan],$tahun)->result());\n\t// \tforeach ($kode_tgl as $kd_tgl) {\n\t// \t\t$kde_tgl[$i]=$kd_tgl->kd_waktu;\n\t// \t\tif(empty($kde_tgl[$i])){\n\t// \t\t$jum_jad=0;\n\t// \t}elseif (count($kde_tgl[$i])>7) {\n\t// \t\t$jum_jad=7;\n\t// \t}else {\n\t// \t\t$jum_jad=count($kde_tgl);\n\t// \t}\n\t// \t}\n\t// }\n\t// print_r($kde_tgl);\n\t\t// untuk membatasi jumlah jadwal yang tampil kekiri\n\n\n\t// ----------------------------------------------------------\n\t\t// mencari kode karyawan di tabel jadwal\n\t\t$kar=0;\n\t\t$kd_kary=array();\n\t\t$kd_karya=$this->crud_j->cari_kode_kar()->result();\n\t\tforeach ($kd_karya as $karyawan) {\n\t\t\t$kd_kary[$kar++]=$karyawan->kd_kar;\n\t\t}\n\t\t// mencari jumlah kode karyawan di tabel jadwal untuk di tampilkan di looping\n\t\t$jml_kar=$this->crud_j->cari_jml_kd_kary()->result();\n\t\tforeach ($jml_kar as $jml) {\n\t\t\t$jum_kd_kar=$jml->jml_kar;\n\t\t}\n\t// ---------------------------------------------------------\n\t\t//menacri nama karyawan berdasarkan kode karyawan yang ada di tabel jadwal di arrayy\n\t\t$nam=0;\n\t\t$nam_karya=array();\n\t\t$kd_karyaa=array();\n\t\tfor ($i=0; $i<$jum_kd_kar ; $i++) {\n\t\t\t$nam_kary=$this->crud_j->cari_nama_karyawan($kd_kary[$i])->result();\n\t\t\tforeach ($nam_kary as $nama ) {\n\t\t\t\t$nam_karya[$i]=$nama->nam_kar;\n\t\t\t\t$kd_karyaa[$i]=$nama->kd_kar;\n\t\t\t\tif (empty($nam_karya[$i])||empty($kd_karyaa[$i])) {\n\t\t\t\t\t$nam_karya[$i]=\"-\";\n\t\t\t\t\t$kd_karyaa[$i]=\"-\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\t\t$jum_tgl=0;\n\t\t$jml_tgl=$this->crud_j->cari_jml_tanggal($bulanList[$bulan],$tahun)->result();\n\t\tforeach ($jml_tgl as $jml) {\n\t\t\t$jum_tanggal=$jml->jml_tanggal;\n\t\t}\n\t\t$juml_tgl=$jum_tanggal;\n\t\tif ($jum_tgl<7) {\n\t\t\t$jum_tgl=7;\n\t\t}elseif (empty($jum_tgl)) {\n\t\t\t$jum_tgl=1;\n\t\t}\n\t\tfor ($i=0; $i <$jum_kd_kar ; $i++) {\n\t\t\tfor ($j=0; $j <$jum_tanggal ; $j++) {\n\t\t\t\t$jadwal=$this->crud_j->cari_jadwal_kar($kd_kary[$i],$tanggal[$j],$bulanList[$bulan],$tahun)->result();\n\t\t\t\tforeach ($jadwal as $jadwl_pgw) {\n\t\t\t\t\t$jadwal_pgw[$i][$j]=$jadwl_pgw->jadwal;\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (empty($jadwal_pgw)) {\n\t\t\t$jadwal_pgw=\"-\";\n\t\t}\n\t\t// print_r($jadwal_pgw);\n\t\t// for ($i=0; $i <$jum_kd_kar ; $i++) {\n\t\t// \tfor ($j=0; $j <$jum_tanggal ; $j++) {\n\t\t// \t\tif (empty($jadwal_pgw[$i][$j])) {\n\t\t//\n\t\t// \t\t}else {\n\t\t// \t\t\techo \"</br>\";\n\t\t// \t\t\techo $jadwal_pgw[$i][$j];\n\t\t// \t\t\techo \"</br>\";\n\t\t// \t\t}\n\t\t//\n\t\t// \t}\n\t\t// }\n\t\t// \techo \"</br>\";\n\t\t// \tprint_r($kd_kary);\n\n\t\t// for ($i=0; $i <3 ; $i++) {\n\t\t// \techo $kde_tgl[$i];\n\t\t// \techo \"</br>\";\n\t\t// \techo $kd_kary[$i];\n\t\t// \techo \"</br>\";\n\t\t// }\n\n\n\n\n\n\t\t\t//echo $jum_jad;\n\t\t // echo \"</br>\";\n\t\t\t// echo $jum_jad;\n\t\t// print_r($kde_tgl);\n\n\t\t// --------------------------------kusus CRUD--------------------\n\n\n\t\t// ceksession panah menu\n\n\n\t\t// pengiriman data tampilan\n\t\t$data['tanggal']=$tanggal;\n\n\t\t$data['jum_kar']=$jum_kd_kar;\n\t\t$data['nama_hari']=$data_hari;\n\t\t$data['jum_jad']=$jum_tgl;\n\t\t$data['jadwal']=$jadwal_pgw;\n\t\t$data['bulan']=$bulanList[$bulan];\n\t\t$data['tahun']=$tahun;\n\t\t// -------------pengiriman data crud----------------\n\n\t\t// $data['kd_unik_jd']=$this->crud_j->cari_kode_jadwal();\n\t\t $data['nama_kary']=$nam_karya;\n\t\t// $data['nama_pgw']=$this->crud_m->tampil_data_pegawai()->result();//untuk form input\n\t\t// $data['kd_karya']=$kd_karyaa;\n\t\t// $data['tgl_awl']=$tgl_hari_ini;\n\t\t// $data{'tgl_akhr'}=$tgl_terakhir;\n\t\t// $data['bln_skrg']=$bulanList[$bulan];\n\t\t// $data['thn_skrg']=$tahun;\n\t\t// $data['cari_tahun']=$this->crud_j->cari_tahun()->result();\n\n\t\t//$data['cari_bulan']=$this->crud_j->cari_bulan()->result();\n\t\t//$data['kd_kar']=$this->db->crud_j->cari_kd_kar2($nama)->result();\n\t\t// untuk menampilkan halaman\\\n\t\t$this->load->view('adm/laporan/vw_ex_excel',$data);\n\t}\n\n\n\n\t}", "function creer_info_jours_js() {\n\tglobal $mysqli;\n\tglobal $prefix_base, $niveau_arbo;\n\n\t//echo \"\\$niveau_arbo=$niveau_arbo<br />\";\n\n\tif(!isset($prefix_base)) {$prefix_base=\"\";}\n\n\t// tableau semaine\n\t$tab_sem[0] = 'lundi';\n\t$tab_sem[1] = 'mardi';\n\t$tab_sem[2] = 'mercredi';\n\t$tab_sem[3] = 'jeudi';\n\t$tab_sem[4] = 'vendredi';\n\t$tab_sem[5] = 'samedi';\n\t$tab_sem[6] = 'dimanche';\n\n\t$chaine_jours_ouverts=\"\";\n\n\t$i=0;\n\tfor($i=0;$i<count($tab_sem);$i++) {\n\t\t$sql=\"SELECT 1=1 FROM \".$prefix_base.\"horaires_etablissement\n\t\t\t\tWHERE jour_horaire_etablissement = '\".$tab_sem[$i].\"' AND\n\t\t\t\t\t\tdate_horaire_etablissement = '0000-00-00' AND ouvert_horaire_etablissement='1'\";\n\t\t$res_j_o=mysqli_query($mysqli, $sql);\n\t\tif($res_j_o->num_rows) {\n\t\t\tif($chaine_jours_ouverts!=\"\") {$chaine_jours_ouverts.=\",\";}\n\t\t\t$num_jour=$i+1;\n\t\t\t$chaine_jours_ouverts.=\"'$num_jour'\";\n\t\t\t$res_j_o->close();\n\t\t}\n\t}\n\n\tif($chaine_jours_ouverts=='') {\n\t\t$chaine_jours_ouverts=\"'0','1','2','3','4','5','6'\";\n\t}\n\n\tif(!isset($niveau_arbo)) {\n\t\t$pref_arbo=\"..\";\n\t}\n\telseif(\"$niveau_arbo\"=='public') {\n\t\t$pref_arbo=\"..\";\n\t}\n\telseif(\"$niveau_arbo\"==\"0\") {\n\t\t$pref_arbo=\".\";\n\t}\n\telseif(\"$niveau_arbo\"==\"1\") {\n\t\t$pref_arbo=\"..\";\n\t}\n\telseif(\"$niveau_arbo\"==\"2\") {\n\t\t$pref_arbo=\"../..\";\n\t}\n\telseif(\"$niveau_arbo\"==\"3\") {\n\t\t$pref_arbo=\"../../..\";\n\t}\n\n\t//echo \"\\$pref_arbo=$pref_arbo<br />\";\n\n\t$f=fopen(\"$pref_arbo/temp/info_jours.js\",\"w+\");\n\tfwrite($f,\"// Tableau des jours ouverts\n\t// 0 pour dimanche,\n\t// 1 pour lundi,...\n\tvar tab_jours_ouverture=new Array($chaine_jours_ouverts);\");\n\tfclose($f);\n}", "public function run()\n {\n Jurnal::create([\n 'date' => now(),\n 'jam_ke' => '1',\n 'mapel_id' => 1,\n 'kelas_id' => 1,\n 'materi' => 'Pengenalan Istigosah',\n ]);\n }", "public function store() {\n $logData = \"=========================================\\n\";\n $logData .= \"Date Time: \".$this->record_date.\"\\n\";\n $logData .= $this->title.\" (\".$this->type.\") \\n\";\n if(!empty($this->data)) {\n $logData .= var_export($this->data, true).\"\\n\";\n }\n \n file_put_contents($this->file, $logData, FILE_APPEND);\n \n }", "private function storeToDB() {\r\n\t\tDBQuery::getInstance() -> insert('INSERT INTO `CalculatedDailyNeeds`' . DBUtils2::buildMultipleInsertOnDuplikateKeyUpdate($this -> aArticleData));\r\n\t}", "function work_data_emp($id)\n{\n// selecteaza datele platite deja din salarii\n $query = \"SELECT sum(salarii.prezent) AS lucratez, \n (DATE_FORMAT(LAST_DAY(data),'%d') - sum(salarii.prezent)) AS absent, \n sum(motiv) AS motivat, \n sum(suma) AS salarii, \n DATE_FORMAT(data, '%m') AS data\n FROM cozagro_db.salarii \n WHERE salarii.deleted = 0 AND salarii.id_angajat= $id\n GROUP BY MONTH(data)\";\n $result = Database::getInstance()->getConnection()->query($query);\n if (!$result) {\n die(\"Nu s-a reusit conexiunea la DB selectarea salariilor platite\" . Database::getInstance()->getConnection()->error);\n }\n $zile_lucrate = [];\n while ($x = $result->fetch_assoc()) {\n $zile_lucrate[$x['data']] = array(\"luc\" => $x['lucratez'], \"abs\" => $x['absent'], \"mot\" => $x['motivat'], \"sal\" => $x['salarii']);\n }\n $result->free_result();\n return $zile_lucrate;\n}", "function ajouterJeu($titreJeu,$qteJeu,$prixJeu){\n\t\t\n\t\t// si le panier existe\n\t\tif (createPanier() && !isVerouille()) {\n\t\t\t\n\t\t\t// si le Jeu exsite déjà, on incrémente seulement la quantité\n\t\t\t$positionJeu = array_search($titreJeu, $_SESSION['panier']['titreJeu']);\n\n\t\t\tif ($positionJeu !== false) {\n\t\t\t\t$_SESSION['panier']['qteJeu'] += $qteJeu;\t\n\t\t\t}\n\t\t\telse {\n\n\t\t\t\t// sinon on ajoute le jeu au panier\n\t\t\t\tarray_push($_SESSION['panier']['titreJeu'],$titreJeu);\n\t\t\t\tarray_push($_SESSION['panier']['qteJeu'],$qteJeu);\n\t\t\t\tarray_push($_SESSION['panier']['prixJeu'],$prixJeu);\n\t\t\t}\n\t\t} \n\t\telse {\n\t\t\techo \"Une erreur inconnue est survenue, veuillez conatacter l'administrateur\";\n\t\t}\n\t}", "function save_meditation(){\n\t\t\t$para = array(\"paciente_id_paciente\"=>$this->meditions[\"paciente_id_paciente\"], \"fecha_inicio\"=>$this->meditions[\"fecha_inicio\"]);\n\n\t\t\t$query = $this->db->get_where(\"medicionpaciente\",$para);\n\t\t\t$result = $query->result();\n\n\t\t\tif(count($result) > 0){\n\t\t\t\treturn array(\"message\"=>\"Ya Existe Combinación De Usuario, Fecha Y Hora De Medición\");\n\t\t\t}\n\t\t\t\n\t\t\ttry{\n\t\t\t\t$this->db->trans_start();\n\t\t\t\t$this->db->set('fecha_registro', 'NOW()', FALSE);\n\t\t\t\t$this->db->insert('medicionpaciente', $this->meditions);\n\t\t\t\t$this->db->trans_complete();\n\t\t\t\treturn array(\"message\"=>\"ok\");\n\t\t\t} catch (Exception $e){\n\t\t\t\treturn array(\"message\"=>\"error: $e\");\n\t\t\t}\n\t\t}", "public function store(StoreJornadaRequest $request)\n {\n $empleado = Empleado::find($request->input('empleado'));\n $jornada = Jornada::create([\n 'maquina_id' => $request -> input('maquina'),\n 'empleado_id' => $request -> input('empleado'),\n 'incentivo' => $request->input('incentivo'),\n 'hora_extra' => $request->input('hora_extra'),\n 'fecha' => $request->input('fecha'),\n 'jornada_doble' => $request->input('jornada_doble'),\n 'extra' => ($request->input('hora_extra') * $empleado->salario_hora) + ($request->input('jornada_doble') * $empleado->salario_dia)\n ]);\n $jornada ->save();\n\n if($jornada){\n return back()->with('success', 'Jornada registrada correctamente!');\n }\n return back()->withInput()->with('errors', 'Hubo algun error en registro de la jornada');\n\n }", "public function saveUrsprung($monat,$jahr){\n $this->db->query(\"delete from dzeitsoll2 where MONTH(datum)='$monat' and YEAR(datum)='$jahr'\");\n $sql_select = \"select * from dzeitsoll where MONTH(datum)='$monat' and YEAR(datum)='$jahr'\";\n $result = $this->db->query($sql_select);\n $vlozeno =0;\n $user = \"PHP_\".$_SERVER[\"REMOTE_ADDR\"];//.\"/\".$_SESSION[\"user\"];\n while($row = $result->fetch()){\n $sql_insert = \"insert into dzeitsoll2 (persnr,datum,oe,stunden,user) values('\".$row['persnr'].\"','\".$row['datum'].\"','\".$row['oe'].\"','\".$row['stunden'].\"','\".$user.\"')\";\n $this->db->query($sql_insert);\n $vlozeno++;\n }\n\n return $vlozeno;\n }", "function store() {\n\t\tglobal $mysql;\n\t\t// set timestamps\n\t\t$datenow = Date::now();\n\t\tif($this->id=='')\n\t\t\t$this->data['__createdon'] = $datenow;\n\t\t$this->data['__changedon'] = $datenow;\n\t\t\n\t\t// Seperate keys from values\n\t\t$keys = array_keys($this->data);\n\t\t$values = array_values($this->data);\n\t\tfor($i=0;$i<count($values);$i++) {\n\t\t\t$nextval = $this->escape($values[$i]);\n\t\t\t$nextval = \"'$nextval'\";\n\t\t\t$values[$i] = $nextval;\n\t\t}\n\t\t// CREATE SQL Statement\n\t\t$tablename = $this->class_name();\n\t\tif($this->id=='') {\n\t\t\t$query = \"INSERT INTO $tablename (\".implode(\",\",$keys).\") VALUES (\".implode(\",\",$values).\");\";\n\t\t\t$this->id = $mysql->insert($query, $this->sequence_name());\n\t\t} else {\n\t\t\t$query = \"UPDATE $tablename SET\";\n\t\t\t$query .= \" \".$keys[0].\"=\".$values[0];\n\t\t\tfor($i=1;$i<count($values);$i++)\n\t\t\t\t$query .= \", \".$keys[$i].\"=\".$values[$i];\n\t\t\t$query .= \" WHERE id=\".$this->id.\";\";\n\t\t\t$mysql->update($query);\n\t\t}\n\t\treturn $this->id;\n\t}", "public function storeJournal(array $data): TransactionJournal;", "public function sallary_month_store()\n\t{\n\t\t$attr = array(\n\t\t\t'year'=>$this->input->post('year'),\n\t\t\t'month_id'=>$this->input->post('month_id'),\n\t\t\t'note'=>$this->input->post('note'),\n\t\t\t'status'=>'a',\n\t\t\t'created_by' =>$this->session->userdata('name'),\n\t\t\t'updated_by' =>$this->session->userdata('name'),\n\t\t\t'created_at' =>date('Y-m-d'),\n\t\t\t'updated_at' =>date('Y-m-d')\n\t\t);\n\n\t\t$res = $this->db->insert('sallay_months', $attr);\n\t\tif($res){return TRUE;}else{return FALSE; }\n\t}", "public function save(){\n\n \t$sql = \"INSERT INTO \" . self::TABLENAME . \" (ora_aterizare, de_la, \n \t compania)\n \t\t\tVALUES ('$this->ora_aterizare', '$this->de_la', \n \t\t\t'$this->compania')\";\n\n \t$db = new Database(); // se creeaza conexiunea la baza de date\n \t$db->getConnection()->exec($sql);\n\n \treturn \"Datele au fost introduse cu succes.\";\n }", "public function nutriments() {\n\t\tfunction dateenlettre($date) {\n\t\t\t$split = explode(\"-\",$date);\n\t\t\t$jour = $split[2];\n\t\t\t$mois = $split[1];\n\t\t\t$annee = $split[0];\n\t\t\t$newTimestamp = mktime(12,0,0,$mois,$jour,$annee);\n\t\t\t \n\t\t\t$Jour = array(\"Dimanche\",\"Lundi\",\"Mardi\",\"Mercredi\",\"Jeudi\",\"Vendredi\",\"Samedi\");\n\t\t\t$Mois = array(\"\",\"Janvier\",\"Février\",\"Mars\",\"Avril\",\"Mai\",\"Juin\",\"Juillet\",\"Août\",\"Septembre\",\"Octobre\",\"Novembre\",\"Décembre\");\n\t\t\t \n\t\t\treturn $Jour[date(\"w\", $newTimestamp)] . ' ' . $jour . ' ' . $Mois[date(\"n\", $newTimestamp)] . ' ' . $annee;\n\t\t}\n\t\t\n\t\t// Fonction qui renvoi le nombre de jours entre deux dates\n\t\tfunction jours($date1, $date2){\n\t\t\t$diff = abs($date1 - $date2); \n\t\t\t$retour = array();\n\t\t \n\t\t\t$tmp = $diff;\n\t\t\t$retour['second'] = $tmp % 60;\n\t\t \n\t\t\t$tmp = floor( ($tmp - $retour['second']) /60 );\n\t\t\t$retour['minute'] = $tmp % 60;\n\t\t\t\n\t\t\t$tmp = floor( ($tmp - $retour['minute'])/60 );\n\t\t\t$retour['hour'] = $tmp % 24;\n\t\t\t\t \n\t\t\t$tmp = floor( ($tmp - $retour['hour']) /24 );\n\t\t\t$retour['day'] = $tmp;\n\t\t\t\t \n\t\t\treturn $retour['day'];\n\t\t}\n\t\t\n\t\t\n\t\t$id = AuthComponent::user('id');\n\t\tsetlocale (LC_TIME, 'fr_FR.utf8','fra');\n\t\t$date = date('Y-m-d');\n\t\t\n\t\t$this->set('debut',null);\n\t\t$this->set('fin',null);\n\t\tif ($this->request->is('post')) {\n\t\t\t/* Vérification des informations envoyées */\n\t\t\t$message;\n\t\t\t$stop = false;\n\t\t\t$deb = $_POST['debut'];\n\t\t\t$fin = $_POST['fin'];\n\t\t\t\n\t\t\tif (!(preg_match(\"/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/\",$deb))) {\n\t\t\t\t$stop = true;\n\t\t\t\t$message = \"Erreur, la date de début est invalide, elle doit être sous format 'YYYY-MM-DD'\";\n\t\t\t} elseif (!(preg_match(\"/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/\",$fin))) {\n\t\t\t\t$stop = true;\n\t\t\t\t$message = \"Erreur, la date de fin est invalide, elle doit être sous format 'YYYY-MM-DD'\";\n\t\t\t} else {\n\t\t\t\tif ($deb > $date ) {\n\t\t\t\t\t$stop = true;\n\t\t\t\t\t$message = \"Erreur, la date de debut ne peut être supérieure à la date d'aujourd'hui\";\n\t\t\t\t} elseif ($fin > $date) {\n\t\t\t\t\t$stop = true;\n\t\t\t\t\t$message = \"Erreur, la date de debut ne peut être supérieure à la date d'aujourd'hui\";\n\t\t\t\t}\n\t\t\t\tif ($deb == $fin) {\n\t\t\t\t\t$stop = true;\n\t\t\t\t\t$message = \"Erreur, la date de debut ne peut être égale à la date de fin\";\n\t\t\t\t} elseif ($deb > $fin) {\n\t\t\t\t\t$stop = true;\n\t\t\t\t\t$message = \"Erreur, la date de debut ne peut être supérieure à la date de fin\";\n\t\t\t\t}\n\t\t\t\t$this->set('debut',$deb);\n\t\t\t\t$this->set('fin',$fin);\n\t\t\t}\n\t\t\t/* fin vérif */\n\t\t\tif ($stop) {\n\t\t\t\t$this->Session->setFlash(__($message));\n\t\t\t} else {\n\t\t\t\t$fin = $fin . ' 23:59:59';\n\t\t\t\t$repas = $this->Suivialimentaire->find('all',array('conditions' => array('AND' => array(\n\t\t\t\t\t\t\t\tarray('id_user' => $id),\n\t\t\t\t\t\t\t\tarray('Suivialimentaire.created BETWEEN ? AND ?' => array($deb, $fin))\n\t\t\t\t)),'order' => array('Suivialimentaire.created DESC') ));\n\t\t\t\t$temp = $repas;\n\t\t\t\t$i = 0;\n\t\t\t\tforeach ($repas as $r) {\n\t\t\t\t\t$temp[$i]['Aliment']= $this->Aliment->find('first', array('conditions' => array('Aliment.id' => $r['Suivialimentaire']['id_aliment'])));\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t\t$repas = $temp;\n\t\t\t\t$nutriments = array();\n\t\t\t\t$descri = $this->Constituantaliment->query(\"select name from constituantaliments join donneescompilees on constituantaliments_id = constituantaliments.id where aliments_id = 1000\");\n\t\t\t\tforeach ($descri as $desc) {\n\t\t\t\t\t$nutriments[]['nom'] = $desc['constituantaliments']['name'];\n\t\t\t\t}\n\t\t\t\tfor ($i = 0; $i < 57; $i++) $nutriments[$i]['valeur'] = 0;\n\t\t\t\tforeach ($repas as $rep) {\n\t\t\t\t\tfor ($i = 0; $i < 57; $i++) {\n\t\t\t\t\t\tif (!empty($rep['Aliment'])) {\n\t\t\t\t\t\t\t$nutriments[$i]['valeur'] = $nutriments[$i]['valeur'] + ($rep['Aliment']['Donneesaliment'][$i]['valmoy'] * $rep['Suivialimentaire']['quantite'] * $rep['Suivialimentaire']['portion']/100) * count(explode(\"@\",$rep['Suivialimentaire']['nomSA']));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$valsplit = explode(\"@\", $rep['Alimhorsclassification']['nutri']);\n\t\t\t\t\t\t\t$valresul = $valsplit[$i];\n\t\t\t\t\t\t\t$nutriments[$i]['valeur'] = $nutriments[$i]['valeur'] + ($valresul * $rep['Suivialimentaire']['quantite'] * $rep['Suivialimentaire']['portion']/100) * count(explode(\"@\",$rep['Suivialimentaire']['nomSA']));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->set('repas',$repas);\n\t\t\t\t$this->set('nutriments',$nutriments);\n\t\t\t\t$time1 = strtotime($deb);\n\t\t\t\t$time2 = strtotime($fin);\n\t\t\t\t$e=jours($time1, $time2);\n\t\t\t\t$this->set('joursDiff',$e);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "public function run()\n {\n $this->storeJadwal([\n 'kd_kelas' => 'D4A2016',\n 'kd_hari' => '1',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '10',\n 'kd_ruang' => 'D224',\n 'kd_matakuliah' => '16TIN8044',\n 'kd_dosen_pengajar' => 'KO003N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2016',\n 'kd_hari' => '2',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '2',\n 'kd_ruang' => 'D224',\n 'kd_matakuliah' => '16TIN8053',\n 'kd_dosen_pengajar' => 'KO076N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2016',\n 'kd_hari' => '2',\n 'kd_sesi_mulai' => '3',\n 'kd_sesi_berakhir' => '5',\n 'kd_ruang' => 'D224',\n 'kd_matakuliah' => '16TIN8053',\n 'kd_dosen_pengajar' => 'KO076N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2016',\n 'kd_hari' => '2',\n 'kd_sesi_mulai' => '6',\n 'kd_sesi_berakhir' => '7',\n 'kd_ruang' => 'D224',\n 'kd_matakuliah' => '16TIN8032',\n 'kd_dosen_pengajar' => 'KO045N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2016',\n 'kd_hari' => '4',\n 'kd_sesi_mulai' => '4',\n 'kd_sesi_berakhir' => '6',\n 'kd_ruang' => 'D217',\n 'kd_matakuliah' => '16KI38022',\n 'kd_dosen_pengajar' => 'KO057N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2016',\n 'kd_hari' => '4',\n 'kd_sesi_mulai' => '7',\n 'kd_sesi_berakhir' => '8',\n 'kd_ruang' => 'D217',\n 'kd_matakuliah' => '16TIN8012',\n 'kd_dosen_pengajar' => 'KO005N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2016',\n 'kd_hari' => '5',\n 'kd_sesi_mulai' => '9',\n 'kd_sesi_berakhir' => '11',\n 'kd_ruang' => 'D224',\n 'kd_matakuliah' => '16TIN8044',\n 'kd_dosen_pengajar' => 'KO003N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2017',\n 'kd_hari' => '1',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '2',\n 'kd_ruang' => 'D223',\n 'kd_matakuliah' => '16TIN6043',\n 'kd_dosen_pengajar' => 'KO002N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2017',\n 'kd_hari' => '1',\n 'kd_sesi_mulai' => '3',\n 'kd_sesi_berakhir' => '4',\n 'kd_ruang' => 'D217',\n 'kd_matakuliah' => '16TIN6023',\n 'kd_dosen_pengajar' => 'KO012N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2017',\n 'kd_hari' => '1',\n 'kd_sesi_mulai' => '5',\n 'kd_sesi_berakhir' => '7',\n 'kd_ruang' => 'D102',\n 'kd_matakuliah' => '16TIN6023',\n 'kd_dosen_pengajar' => 'KO021N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2017',\n 'kd_hari' => '2',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '2',\n 'kd_ruang' => 'D223',\n 'kd_matakuliah' => '16TIN6013',\n 'kd_dosen_pengajar' => 'KO003N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2017',\n 'kd_hari' => '2',\n 'kd_sesi_mulai' => '3',\n 'kd_sesi_berakhir' => '5',\n 'kd_ruang' => 'D223',\n 'kd_matakuliah' => '16TIN6013',\n 'kd_dosen_pengajar' => 'KO003N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2017',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '3',\n 'kd_ruang' => 'D224',\n 'kd_matakuliah' => '16TIN6073',\n 'kd_dosen_pengajar' => 'KO019N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2017',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '4',\n 'kd_sesi_berakhir' => '5',\n 'kd_ruang' => 'D224',\n 'kd_matakuliah' => '16JTK6032',\n 'kd_dosen_pengajar' => 'KO075N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2017',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '7',\n 'kd_sesi_berakhir' => '9',\n 'kd_ruang' => 'D106',\n 'kd_matakuliah' => '16TIN6043',\n 'kd_dosen_pengajar' => 'KO045N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2017',\n 'kd_hari' => '4',\n 'kd_sesi_mulai' => '3',\n 'kd_sesi_berakhir' => '3',\n 'kd_ruang' => 'D102',\n 'kd_matakuliah' => '16TIN6063',\n 'kd_dosen_pengajar' => 'KO007N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2017',\n 'kd_hari' => '4',\n 'kd_sesi_mulai' => '4',\n 'kd_sesi_berakhir' => '9',\n 'kd_ruang' => 'D102',\n 'kd_matakuliah' => '16TIN6063',\n 'kd_dosen_pengajar' => 'KO007N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2017',\n 'kd_hari' => '5',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '1',\n 'kd_ruang' => 'D106',\n 'kd_matakuliah' => '16TIN6053',\n 'kd_dosen_pengajar' => 'KO007N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2017',\n 'kd_hari' => '5',\n 'kd_sesi_mulai' => '2',\n 'kd_sesi_berakhir' => '4',\n 'kd_ruang' => 'D106',\n 'kd_matakuliah' => '16TIN6053',\n 'kd_dosen_pengajar' => 'KO007N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2017',\n 'kd_hari' => '5',\n 'kd_sesi_mulai' => '7',\n 'kd_sesi_berakhir' => '9',\n 'kd_ruang' => 'D106',\n 'kd_matakuliah' => '16TIN6053',\n 'kd_dosen_pengajar' => 'KO007N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2018',\n 'kd_hari' => '1',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '2',\n 'kd_ruang' => 'D112',\n 'kd_matakuliah' => '16TIN4024',\n 'kd_dosen_pengajar' => 'KO012N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2018',\n 'kd_hari' => '1',\n 'kd_sesi_mulai' => '3',\n 'kd_sesi_berakhir' => '4',\n 'kd_ruang' => 'D112',\n 'kd_matakuliah' => '16TIN4033',\n 'kd_dosen_pengajar' => 'KO021N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2018',\n 'kd_hari' => '1',\n 'kd_sesi_mulai' => '5',\n 'kd_sesi_berakhir' => '6',\n 'kd_ruang' => 'D112',\n 'kd_matakuliah' => '16TIN4063',\n 'kd_dosen_pengajar' => 'KO013N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2018',\n 'kd_hari' => '2',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '2',\n 'kd_ruang' => 'D217',\n 'kd_matakuliah' => '16TIN4043',\n 'kd_dosen_pengajar' => 'KO019N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2018',\n 'kd_hari' => '2',\n 'kd_sesi_mulai' => '3',\n 'kd_sesi_berakhir' => '3',\n 'kd_ruang' => 'D102',\n 'kd_matakuliah' => '16TIN4053',\n 'kd_dosen_pengajar' => 'KO012N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2018',\n 'kd_hari' => '2',\n 'kd_sesi_mulai' => '4',\n 'kd_sesi_berakhir' => '9',\n 'kd_ruang' => 'D102',\n 'kd_matakuliah' => '16TIN4053',\n 'kd_dosen_pengajar' => 'KO012N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2018',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '3',\n 'kd_ruang' => 'D102',\n 'kd_matakuliah' => '16TIN4033',\n 'kd_dosen_pengajar' => 'KO021N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2018',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '4',\n 'kd_sesi_berakhir' => '5',\n 'kd_ruang' => 'D217',\n 'kd_matakuliah' => '16KU34052',\n 'kd_dosen_pengajar' => 'KO070N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2018',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '7',\n 'kd_sesi_berakhir' => '9',\n 'kd_ruang' => 'D102',\n 'kd_matakuliah' => '16TIN4014',\n 'kd_dosen_pengajar' => 'KO007N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2018',\n 'kd_hari' => '4',\n 'kd_sesi_mulai' => '2',\n 'kd_sesi_berakhir' => '4',\n 'kd_ruang' => 'D112',\n 'kd_matakuliah' => '16TIN4014',\n 'kd_dosen_pengajar' => 'KO009N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2018',\n 'kd_hari' => '4',\n 'kd_sesi_mulai' => '5',\n 'kd_sesi_berakhir' => '10',\n 'kd_ruang' => 'D112',\n 'kd_matakuliah' => '16TIN4024',\n 'kd_dosen_pengajar' => 'KO012N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2018',\n 'kd_hari' => '5',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '3',\n 'kd_ruang' => 'D102',\n 'kd_matakuliah' => '16TIN4043',\n 'kd_dosen_pengajar' => 'KO017N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2018',\n 'kd_hari' => '5',\n 'kd_sesi_mulai' => '7',\n 'kd_sesi_berakhir' => '9',\n 'kd_ruang' => 'D102',\n 'kd_matakuliah' => '16TIN4063',\n 'kd_dosen_pengajar' => 'KO013N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4B2019',\n 'kd_hari' => '1',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '10',\n 'kd_ruang' => 'D115',\n 'kd_matakuliah' => '16TIN2043',\n 'kd_dosen_pengajar' => 'KO060N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4B2019',\n 'kd_hari' => '2',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '3',\n 'kd_ruang' => 'D111',\n 'kd_matakuliah' => '16TIN2054',\n 'kd_dosen_pengajar' => 'KO059N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4B2019',\n 'kd_hari' => '2',\n 'kd_sesi_mulai' => '4',\n 'kd_sesi_berakhir' => '6',\n 'kd_ruang' => 'D106',\n 'kd_matakuliah' => '16TIN2054',\n 'kd_dosen_pengajar' => 'KO061N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4B2019',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '2',\n 'kd_ruang' => 'D111',\n 'kd_matakuliah' => '16TIN2074',\n 'kd_dosen_pengajar' => 'KO001N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4B2019',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '3',\n 'kd_sesi_berakhir' => '4',\n 'kd_ruang' => 'D111',\n 'kd_matakuliah' => '16KI22022',\n 'kd_dosen_pengajar' => 'KO075N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4B2019',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '5',\n 'kd_sesi_berakhir' => '6',\n 'kd_ruang' => 'D111',\n 'kd_matakuliah' => '16KU12062',\n 'kd_dosen_pengajar' => 'KO069N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4B2019',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '7',\n 'kd_sesi_berakhir' => '8',\n 'kd_ruang' => 'D111',\n 'kd_matakuliah' => '16TIN2032',\n 'kd_dosen_pengajar' => 'KO056N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4B2019',\n 'kd_hari' => '4',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '6',\n 'kd_ruang' => 'D107',\n 'kd_matakuliah' => '16TIN2074',\n 'kd_dosen_pengajar' => 'KO002N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4B2019',\n 'kd_hari' => '5',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '3',\n 'kd_ruang' => 'D111',\n 'kd_matakuliah' => '16TIN2013',\n 'kd_dosen_pengajar' => 'KO016N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2019',\n 'kd_hari' => '1',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '10',\n 'kd_ruang' => 'D116',\n 'kd_matakuliah' => '16TIN2043',\n 'kd_dosen_pengajar' => 'KO023N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2019',\n 'kd_hari' => '2',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '3',\n 'kd_ruang' => 'D112',\n 'kd_matakuliah' => '16TIN2013',\n 'kd_dosen_pengajar' => 'KO016N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2019',\n 'kd_hari' => '2',\n 'kd_sesi_mulai' => '4',\n 'kd_sesi_berakhir' => '6',\n 'kd_ruang' => 'D112',\n 'kd_matakuliah' => '16TIN2054',\n 'kd_dosen_pengajar' => 'KO059N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2019',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '2',\n 'kd_ruang' => 'D112',\n 'kd_matakuliah' => '16KU12062',\n 'kd_dosen_pengajar' => 'KO072N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2019',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '3',\n 'kd_sesi_berakhir' => '4',\n 'kd_ruang' => 'D112',\n 'kd_matakuliah' => '16TIN2074',\n 'kd_dosen_pengajar' => 'KO001N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2019',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '5',\n 'kd_sesi_berakhir' => '6',\n 'kd_ruang' => 'D112',\n 'kd_matakuliah' => '16KI22022',\n 'kd_dosen_pengajar' => 'KO075N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2019',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '7',\n 'kd_sesi_berakhir' => '8',\n 'kd_ruang' => 'D112',\n 'kd_matakuliah' => '16TIN2032',\n 'kd_dosen_pengajar' => 'KO057N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D4A2019',\n 'kd_hari' => '5',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '9',\n 'kd_ruang' => 'D107',\n 'kd_matakuliah' => '16TIN2074',\n 'kd_dosen_pengajar' => 'KO002N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3A2019',\n 'kd_hari' => '1',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '2',\n 'kd_ruang' => 'D105',\n 'kd_matakuliah' => '16TKO2032',\n 'kd_dosen_pengajar' => 'KO016N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3A2019',\n 'kd_hari' => '1',\n 'kd_sesi_mulai' => '3',\n 'kd_sesi_berakhir' => '4',\n 'kd_ruang' => 'D105',\n 'kd_matakuliah' => '16TKO2044',\n 'kd_dosen_pengajar' => 'KO001N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3A2019',\n 'kd_hari' => '1',\n 'kd_sesi_mulai' => '5',\n 'kd_sesi_berakhir' => '10',\n 'kd_ruang' => 'D107',\n 'kd_matakuliah' => '16TKO2044',\n 'kd_dosen_pengajar' => 'KO009N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3A2019',\n 'kd_hari' => '2',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '2',\n 'kd_ruang' => 'D108',\n 'kd_matakuliah' => '16TKO2053',\n 'kd_dosen_pengajar' => 'KO022N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3A2019',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '3',\n 'kd_sesi_berakhir' => '4',\n 'kd_ruang' => 'D105',\n 'kd_matakuliah' => '16KU12022',\n 'kd_dosen_pengajar' => 'KO077N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3A2019',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '5',\n 'kd_sesi_berakhir' => '6',\n 'kd_ruang' => 'D105',\n 'kd_matakuliah' => '16KI22012',\n 'kd_dosen_pengajar' => 'KO071N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3A2019',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '7',\n 'kd_sesi_berakhir' => '8',\n 'kd_ruang' => 'D105',\n 'kd_matakuliah' => '16TKO2062',\n 'kd_dosen_pengajar' => 'KO018N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3A2019',\n 'kd_hari' => '4',\n 'kd_sesi_mulai' => '3',\n 'kd_sesi_berakhir' => '12',\n 'kd_ruang' => 'D115',\n 'kd_matakuliah' => '16TKO2073',\n 'kd_dosen_pengajar' => 'KO023N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3A2019',\n 'kd_hari' => '5',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '3',\n 'kd_ruang' => 'D105',\n 'kd_matakuliah' => '16TKO2053',\n 'kd_dosen_pengajar' => 'KO065N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3B2019',\n 'kd_hari' => '1',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '2',\n 'kd_ruang' => 'D108',\n 'kd_matakuliah' => '16TKO2044',\n 'kd_dosen_pengajar' => 'KO001N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3B2019',\n 'kd_hari' => '1',\n 'kd_sesi_mulai' => '3',\n 'kd_sesi_berakhir' => '4',\n 'kd_ruang' => 'D108',\n 'kd_matakuliah' => '16TKO2032',\n 'kd_dosen_pengajar' => 'KO016N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3B2019',\n 'kd_hari' => '2',\n 'kd_sesi_mulai' => '3',\n 'kd_sesi_berakhir' => '4',\n 'kd_ruang' => 'D108',\n 'kd_matakuliah' => '16TKO2053',\n 'kd_dosen_pengajar' => 'KO022N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3B2019',\n 'kd_hari' => '2',\n 'kd_sesi_mulai' => '5',\n 'kd_sesi_berakhir' => '10',\n 'kd_ruang' => 'D107',\n 'kd_matakuliah' => '16TKO2044',\n 'kd_dosen_pengajar' => 'KO009N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3B2019',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '2',\n 'kd_ruang' => 'D108',\n 'kd_matakuliah' => '16TKO2062',\n 'kd_dosen_pengajar' => 'KO018N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3B2019',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '2',\n 'kd_sesi_berakhir' => '4',\n 'kd_ruang' => 'D108',\n 'kd_matakuliah' => '16KI22012',\n 'kd_dosen_pengajar' => 'KO071N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3B2019',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '7',\n 'kd_sesi_berakhir' => '8',\n 'kd_ruang' => 'D108',\n 'kd_matakuliah' => '16KU12022',\n 'kd_dosen_pengajar' => 'KO077N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3B2019',\n 'kd_hari' => '4',\n 'kd_sesi_mulai' => '3',\n 'kd_sesi_berakhir' => '12',\n 'kd_ruang' => 'D116',\n 'kd_matakuliah' => '16TKO2073',\n 'kd_dosen_pengajar' => 'KO013N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3B2019',\n 'kd_hari' => '5',\n 'kd_sesi_mulai' => '7',\n 'kd_sesi_berakhir' => '9',\n 'kd_ruang' => 'D108',\n 'kd_matakuliah' => '16TKO2053',\n 'kd_dosen_pengajar' => 'KO065N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3A2018',\n 'kd_hari' => '1',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '2',\n 'kd_ruang' => 'D219',\n 'kd_matakuliah' => '16TKO4024',\n 'kd_dosen_pengajar' => 'KO006N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3A2018',\n 'kd_hari' => '1',\n 'kd_sesi_mulai' => '3',\n 'kd_sesi_berakhir' => '8',\n 'kd_ruang' => 'D219',\n 'kd_matakuliah' => '16TKO4024',\n 'kd_dosen_pengajar' => 'KO006N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3A2018',\n 'kd_hari' => '2',\n 'kd_sesi_mulai' => '3',\n 'kd_sesi_berakhir' => '3',\n 'kd_ruang' => 'D115',\n 'kd_matakuliah' => '16TKO4063',\n 'kd_dosen_pengajar' => 'KO067N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3A2018',\n 'kd_hari' => '2',\n 'kd_sesi_mulai' => '4',\n 'kd_sesi_berakhir' => '9',\n 'kd_ruang' => 'D115',\n 'kd_matakuliah' => '16TKO4063',\n 'kd_dosen_pengajar' => 'KO067N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3A2018',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '2',\n 'kd_ruang' => 'D219',\n 'kd_matakuliah' => '16KU34052',\n 'kd_dosen_pengajar' => 'KO016N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3A2018',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '3',\n 'kd_sesi_berakhir' => '4',\n 'kd_ruang' => 'D105',\n 'kd_matakuliah' => '16TKO4014',\n 'kd_dosen_pengajar' => 'KO045N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3A2018',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '7',\n 'kd_sesi_berakhir' => '9',\n 'kd_ruang' => 'D219',\n 'kd_matakuliah' => '16TKO4033',\n 'kd_dosen_pengajar' => 'KO008N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3A2018',\n 'kd_hari' => '4',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '1',\n 'kd_ruang' => 'D224',\n 'kd_matakuliah' => '16TKO4043',\n 'kd_dosen_pengajar' => 'KO062N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3A2018',\n 'kd_hari' => '4',\n 'kd_sesi_mulai' => '2',\n 'kd_sesi_berakhir' => '7',\n 'kd_ruang' => 'D224',\n 'kd_matakuliah' => '16TKO4043',\n 'kd_dosen_pengajar' => 'KO061N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3A2018',\n 'kd_hari' => '5',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '4',\n 'kd_ruang' => 'D116',\n 'kd_matakuliah' => '16TKO4014',\n 'kd_dosen_pengajar' => 'KO070N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3A2018',\n 'kd_hari' => '5',\n 'kd_sesi_mulai' => '7',\n 'kd_sesi_berakhir' => '8',\n 'kd_ruang' => 'D116',\n 'kd_matakuliah' => '16TKO4014',\n 'kd_dosen_pengajar' => 'KO070N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3B2018',\n 'kd_hari' => '1',\n 'kd_sesi_mulai' => '3',\n 'kd_sesi_berakhir' => '3',\n 'kd_ruang' => 'D106',\n 'kd_matakuliah' => '16TKO4043',\n 'kd_dosen_pengajar' => 'KO072N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3B2018',\n 'kd_hari' => '1',\n 'kd_sesi_mulai' => '4',\n 'kd_sesi_berakhir' => '9',\n 'kd_ruang' => 'D106',\n 'kd_matakuliah' => '16TKO4043',\n 'kd_dosen_pengajar' => 'KO061N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3B2018',\n 'kd_hari' => '2',\n 'kd_sesi_mulai' => '3',\n 'kd_sesi_berakhir' => '3',\n 'kd_ruang' => 'D116',\n 'kd_matakuliah' => '16TKO4063',\n 'kd_dosen_pengajar' => 'KO002N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3B2018',\n 'kd_hari' => '2',\n 'kd_sesi_mulai' => '4',\n 'kd_sesi_berakhir' => '9',\n 'kd_ruang' => 'D116',\n 'kd_matakuliah' => '16TKO4063',\n 'kd_dosen_pengajar' => 'KO002N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3B2018',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '2',\n 'kd_ruang' => 'D217',\n 'kd_matakuliah' => '16TKO4014',\n 'kd_dosen_pengajar' => 'KO045N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3B2018',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '3',\n 'kd_sesi_berakhir' => '4',\n 'kd_ruang' => 'D217',\n 'kd_matakuliah' => '16KU34052',\n 'kd_dosen_pengajar' => 'KO016N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3B2018',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '7',\n 'kd_sesi_berakhir' => '9',\n 'kd_ruang' => 'D217',\n 'kd_matakuliah' => '16TKO4033',\n 'kd_dosen_pengajar' => 'KO075N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3B2018',\n 'kd_hari' => '4',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '6',\n 'kd_ruang' => 'D106',\n 'kd_matakuliah' => '16TKO4014',\n 'kd_dosen_pengajar' => 'KO064N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3B2018',\n 'kd_hari' => '5',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '2',\n 'kd_ruang' => 'D115',\n 'kd_matakuliah' => '16TKO4024',\n 'kd_dosen_pengajar' => 'KO006N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3B2018',\n 'kd_hari' => '5',\n 'kd_sesi_mulai' => '3',\n 'kd_sesi_berakhir' => '9',\n 'kd_ruang' => 'D115',\n 'kd_matakuliah' => '16TKO4024',\n 'kd_dosen_pengajar' => 'KO006N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3A2017',\n 'kd_hari' => '1',\n 'kd_sesi_mulai' => '3',\n 'kd_sesi_berakhir' => '3',\n 'kd_ruang' => 'D223',\n 'kd_matakuliah' => '16TKO6043',\n 'kd_dosen_pengajar' => 'KO045N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3A2017',\n 'kd_hari' => '1',\n 'kd_sesi_mulai' => '4',\n 'kd_sesi_berakhir' => '9',\n 'kd_ruang' => 'D223',\n 'kd_matakuliah' => '16TKO6043',\n 'kd_dosen_pengajar' => 'KO045N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3A2017',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '2',\n 'kd_ruang' => 'D223',\n 'kd_matakuliah' => '16TKO6022',\n 'kd_dosen_pengajar' => 'KO008N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3A2017',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '3',\n 'kd_sesi_berakhir' => '4',\n 'kd_ruang' => 'D223',\n 'kd_matakuliah' => '16JTK6012',\n 'kd_dosen_pengajar' => 'KO063N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3A2017',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '9',\n 'kd_sesi_berakhir' => '10',\n 'kd_ruang' => 'D223',\n 'kd_matakuliah' => '16TKO6032',\n 'kd_dosen_pengajar' => 'KO005N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3A2017',\n 'kd_hari' => '4',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '10',\n 'kd_ruang' => 'D223',\n 'kd_matakuliah' => '16TKO6054',\n 'kd_dosen_pengajar' => 'KO008N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3A2017',\n 'kd_hari' => '5',\n 'kd_sesi_mulai' => '9',\n 'kd_sesi_berakhir' => '11',\n 'kd_ruang' => 'D223',\n 'kd_matakuliah' => '16TKO6054',\n 'kd_dosen_pengajar' => 'KO008N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3B2017',\n 'kd_hari' => '2',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '1',\n 'kd_ruang' => 'D219',\n 'kd_matakuliah' => '16TKO6043',\n 'kd_dosen_pengajar' => 'KO017N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3B2017',\n 'kd_hari' => '2',\n 'kd_sesi_mulai' => '2',\n 'kd_sesi_berakhir' => '7',\n 'kd_ruang' => 'D219',\n 'kd_matakuliah' => '16TKO6043',\n 'kd_dosen_pengajar' => 'KO017N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3B2017',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '3',\n 'kd_sesi_berakhir' => '4',\n 'kd_ruang' => 'D219',\n 'kd_matakuliah' => '16TKO6022',\n 'kd_dosen_pengajar' => 'KO008N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3B2017',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '5',\n 'kd_sesi_berakhir' => '6',\n 'kd_ruang' => 'D219',\n 'kd_matakuliah' => '16JTK6012',\n 'kd_dosen_pengajar' => 'KO063N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3B2017',\n 'kd_hari' => '3',\n 'kd_sesi_mulai' => '7',\n 'kd_sesi_berakhir' => '8',\n 'kd_ruang' => 'D223',\n 'kd_matakuliah' => '16TKO6032',\n 'kd_dosen_pengajar' => 'KO005N',\n 'jenis_perkuliahan' => 'TE'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3B2017',\n 'kd_hari' => '4',\n 'kd_sesi_mulai' => '1',\n 'kd_sesi_berakhir' => '10',\n 'kd_ruang' => 'D219',\n 'kd_matakuliah' => '16TKO6054',\n 'kd_dosen_pengajar' => 'KO018N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n \n $this->storeJadwal([\n 'kd_kelas' => 'D3B2017',\n 'kd_hari' => '5',\n 'kd_sesi_mulai' => '9',\n 'kd_sesi_berakhir' => '11',\n 'kd_ruang' => 'D219',\n 'kd_matakuliah' => '16TKO6054',\n 'kd_dosen_pengajar' => 'KO018N',\n 'jenis_perkuliahan' => 'PR'\n ]);\n \n }", "public function saveDayResult(){\n\n $this->check == 0 ? $result = 0 : $result = count($this->check);\n\n $date = $this->date;\n\n $listResult[] = $this->check;\n\n dayresult::addRow($date, $result, serialize($listResult), Yii::$app->user->id);\n }", "public function save(){\n\n \t$sql = \"INSERT INTO \" . self::TABLENAME . \" (ora_decolare, destinatia, \n \t compania)\n \t\t\tVALUES ('$this->ora_decolare', '$this->destinatia', \n \t\t\t'$this->compania')\";\n\n \t$db = new Database(); // se creeaza conexiunea la baza de date\n \t$db->getConnection()->exec($sql);\n\n \treturn \"Datele au fost introduse cu succes.\";\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\n\t {\n\t //\n\t }", "function savePersonStamm($daten,$datei) {\n $tmp=0;\n $pid=$daten[\"PID\"];\n $bildok=false;\n // Array zu jedem Formularfed: Tabelle (0=contact,1=cust/vend), require(0=nein,1=ja), Regel\n // cp_greeting ist raus hli\n $dbfld=array(\"cp_name\" => array(0,1,1,\"Name\",75), \"cp_givenname\" => array(0,1,1,\"Vorname\",75),\n \"cp_gender\" => array(0,0,1,\"Geschlecht\",1),\n \"cp_title\" => array(0,0,1,\"Titel\",75), \"cp_street\" => array(0,0,1,\"Strasse\",75),\n \"cp_zipcode\" => array(0,0,2,\"Plz\",10),\n \"cp_city\" => array(0,0,1,\"Ort\",75), \"cp_country\" => array(0,0,8,\"Land\",3),\n \"cp_phone1\" => array(0,0,3,\"Telefon 1\",30), \"cp_phone2\" => array(0,0,3,\"Telefon 2\",30),\n \"cp_mobile1\" => array(0,0,3,\"Mobiletelefon 1\",30), \"cp_mobile2\" => array(0,0,3,\"Mobiletelefon 2\",30),\n \"cp_homepage\" =>array(0,0,4,\"Homepage\",0), \"cp_fax\" => array(0,0,3,\"Fax\",30),\n \"cp_email\" => array(0,0,5,\"eMail\",0), \"cp_privatemail\" => array(0,0,5,\"Private eMail\",0),\n \"cp_notes\" => array(0,0,1,\"Bemerkungen\",0), \"cp_stichwort1\" => array(0,0,1,\"Stichworte\",50),\n \"cp_salutation\" => array(0,0,1,\"Briefanrede\",125), \"cp_privatphone\" => array(0,0,3,\"Privattelefon 1\",30),\n \"cp_birthday\" => array(0,0,7,\"Geb-Datum\",0), \"cp_beziehung\" => array(0,0,6,\"Beziehung\",0),\n \"cp_abteilung\" => array(0,0,1,\"Abteilung\",25), \"cp_position\" => array(0,0,1,\"Position\",25),\n \"cp_cv_id\" => array(0,0,6,\"FID\",0), \"name\" => array(1,0,1,\"Firma\",75),\n \"cp_owener\" => array(0,0,6,\"CRM-User\",0), \"cp_grafik\" => array(0,0,9,\"Grafik\",4),);\n if (!empty($datei[\"Datei\"][\"name\"][\"bild\"])) { // eine Datei wird mitgeliefert\n $pictyp=array(\"gif\",\"jpeg\",\"png\",\"jpg\");\n $ext=strtolower(substr($datei[\"Datei\"][\"name\"][\"bild\"],strrpos($datei[\"Datei\"][\"name\"][\"bild\"],\".\")+1));\n if (in_array($ext,$pictyp)) {\n $daten[\"cp_grafik\"]=$ext;\n $datei[\"Datei\"]['name'][\"bild\"]=\"kopf$pid.$ext\";\n $bildok=true;\n }\n } else {\n $daten[\"cp_grafik\"]=$daten[\"IMG_\"];\n }\n if ($daten[\"cp_salutation_\"]) $daten[\"cp_salutation\"]=$daten[\"cp_salutation_\"];\n $keys=array_keys($daten);\n $dbf=array_keys($dbfld);\n //$fid=$daten[\"fid\"];\n $anzahl=count($keys);\n $fehler=-1;\n $tels=array();\n $query0='';\n for ($i=0; $i<$anzahl; $i++) {\n if (in_array($keys[$i],$dbf)) {\n $tmpval=trim($daten[$keys[$i]]);\n if ($dbfld[$keys[$i]][0]==1) { // Daten nicht für contacts\n continue;\n } else {\n if (!chkFld($tmpval,$dbfld[$keys[$i]][1],$dbfld[$keys[$i]][2],$dbfld[$keys[$i]][4])) {\n $fehler=$dbfld[$keys[$i]][3]; $fehler.=\"::\".$keys[$i];\n $i=$anzahl+1;\n }\n if ($keys[$i]==\"cp_phone1\"||$keys[$i]==\"cp_phone2\"||$keys[$i]==\"cp_fax\") $tels[]=$tmpval;\n $query0.=$keys[$i].\"=\";\n if (in_array($dbfld[$keys[$i]][2],array(0,1,2,3,4,5,7,8,9))) { //Stringwert\n if (empty($tmpval)) {\n $query0.=\"null,\";\n } else {\n $query0.=\"'\".$tmpval.\"',\";\n }\n } else {\n if (empty($tmpval)) {\n $query0.=\"null,\";\n } else {\n $query0.=$tmpval.\",\"; //Zahlwert\n }\n }\n }\n }\n }\n if ($fehler==-1) { //Kein Fehler aufgetreten\n if (!$daten[\"PID\"] or $daten[\"PID\"]<1) $pid=mknewPerson($daten[\"employee\"]); //Neue Person\n if (!$pid) return \"keine PID\"; //Hat keine PID\n if ($daten[\"nummer\"]) { //Gehört zu einem Cust./Vend.\n $dir=$daten[\"Quelle\"].$daten[\"nummer\"].\"/\".$pid;\n } else {\n $dir=$pid;\n };\n $ok=chkdir($dir);\n if ($bildok) { //Ein Bild wird mitgeliefert\n require_once(\"documents.php\"); // db-Eintrag und upload\n $dbfile=new document();\n $dbfile->setDocData(\"descript\",\"Foto von \".$daten[\"cp_givenname\"].\" \".$daten[\"cp_name\"]);\n $bild[\"Datei\"][\"name\"]=$datei[\"Datei\"][\"name\"][\"bild\"];\n $bild[\"Datei\"][\"tmp_name\"]=$datei[\"Datei\"][\"tmp_name\"][\"bild\"];\n $bild[\"Datei\"][\"size\"]=$datei[\"Datei\"][\"size\"][\"bild\"];\n $bild[\"Datei\"][\"type\"]=$datei[\"Datei\"][\"type\"][\"bild\"];\n $bild[\"Datei\"][\"error\"]=$datei[\"Datei\"][\"error\"][\"bild\"];\n $dbfile->uploadDocument($bild,\"/$dir\");\n }\n if ($datei[\"Datei\"][\"name\"][\"visit\"]) {\n $bild[\"Datei\"][\"name\"]=\"vcard$pid.\".\n strtolower(substr($datei[\"Datei\"][\"name\"][\"visit\"],strrpos($datei[\"Datei\"][\"name\"][\"visit\"],\".\")+1));\n $bild[\"Datei\"][\"tmp_name\"]=$datei[\"Datei\"][\"tmp_name\"][\"visit\"];\n $bild[\"Datei\"][\"size\"]=$datei[\"Datei\"][\"size\"][\"visit\"];\n $bild[\"Datei\"][\"type\"]=$datei[\"Datei\"][\"type\"][\"visit\"];\n $bild[\"Datei\"][\"error\"]=$datei[\"Datei\"][\"error\"][\"visit\"];\n $dbfile=new document();\n $dbfile->setDocData(\"descript\",\"Visitenkarte von \".$daten[\"cp_givenname\"].\" \".$daten[\"cp_name\"]);\n $dbfile->uploadDocument($bild,\"/$dir\");\n }\n mkTelNummer($pid,\"P\",$tels);\n $sql0=\"update contacts set \".$query0.\"cp_employee=\".$_SESSION[\"loginCRM\"].\" where cp_id=$pid\";\n if($GLOBALS['dbh']->query($sql0)) { //Erfolgreich gesichert\n return $pid;\n } else {\n return \"unbekannt\";\n }\n } else { return $fehler; };\n}", "public function store()\n\t{\n\t\t$this->Model_siswa->store();\n\t}", "function createHourLogSheet($name, $data, &$workBook, $ambs){\n\t$file = 0;\n\t$excel = 1;\n\n\t$cols = array('Log ID', 'Date', 'Date Logged', 'Ambassador', 'Event Name', 'Hours', 'People', 'Schools', 'Experience', 'Questions', 'Would make your job better', 'Improvements you could make');\n\t$entries = array('id', 'eventDate', 'logTime', 'ambassador', 'eventName', 'hours', 'peopleInteracted', 'otherSchools', 'experience', 'questions', 'madeJobBetter', 'improvements');\n\n\t$numSemesterTours = count($data);\n\tif($excel)\n\t\t$tourSheet = & $workBook->add_worksheet($name. ' Hours');\n\tif($file)\n\t\tfwrite($f, \"\\nWorksheet: $name Tours\\n\");\n\t$numCols = count($cols);\n\n\t//Set the column widths\n\tfor($col = 0; $col < $numCols; $col++){\n\t\t$colName = $cols[$col];\n\t\t$colRef = $entries[$col];\t\n\t\t$maxWidth = getTextWidth($colName);\n\t\tif($excel)\n\t\t\t$tourSheet->write_string(0, $col, $colName);\n\t\tif($file)\n\t\t\tfwrite($f, \"Row: 0, Col: $col, $colRef: $colName, width:$maxWidth\\t\");\n\n\t\tfor($logNum = 0; $logNum < $numSemesterTours; $logNum++){\n\t\t\t$text = $data[$logNum][$colRef];\n\t\t\tif($colRef == 'ambassador')\n\t\t\t{\n\t\t\t\t$text = $ambs[\"$text\"]['name'];\n\t\t\t}\n\t\t\t$width = getTextWidth($text);\n\t\t\tif($width > $maxWidth){\n\t\t\t\t$maxWidth = $width;\n\t\t\t}\n\t\t\t/*\n\t\t\t //formats do not work at the moment\n\t\t\t if($col == 0){\n\t\t\t\t$tourSheet->set_row($logNum + 1, NULL, $formatOffset + ($tour % 2));\n\t\t\t}\n\t\t\t*/\n\t\t}\n\t\tif($file)\n\t\t\tfwrite($f, \"\\n\");\n\t\tif($excel)\n\t\t\t$tourSheet->set_column($col, $col, $maxWidth * (2.0/3.0));\n\t}\n\n\t//Now we just add all the logs to the right page\n\tfor($col = 0; $col < $numCols; $col++){\n\t\t$colRef = $entries[$col];\n\t\tfor($logNum = 0; $logNum < $numSemesterTours; $logNum++){\n\t\t\t$text = $data[$logNum][$colRef];\n\t\t\tif($colRef == 'ambassador')\n\t\t\t{\n\t\t\t\t$text = $ambs[\"$text\"]['name'];\n\t\t\t}\n if(is_numeric($text)){\n \tif ($colRef == 'hours') {\n $tourSheet->write_number($logNum + 1, $col, floatval($text));\n }\n else {\n\t\t\t\t $tourSheet->write_number($logNum + 1, $col, intval($text));\n }\n\t\t\t} else {\n\t\t\t\t$tourSheet->write_string($logNum + 1, $col, $text);\n\t\t\t}\n\t\t}\n\t}\n}", "private function saveUserReport($user, $timestamp, $volume) {\n \n $table_name = self::USERS_REPORT_PREFIX.strftime(\"%Y%m\", $timestamp);\n // Table creation if it does not exists\n if (!$this->tableExists($table_name)) {\n $query = \"CREATE TABLE \".$table_name.\" (\n user CHAR(7) NOT NULL,\n nb INTEGER UNSIGNED NOT NULL,\n volume INTEGER UNSIGNED NOT NULL,\n unique index user_index (user)\n ) ENGINE=MyISAM DEFAULT CHARSET=utf8;\";\n\n $this->db_conn->query($query) ||\n die (\"Error sending the query '\".$query.\"' to MySQL: \".$this->db_conn->error.\"\\n\");\n \n // Insertion of a new user entry\n $query_insert = \"insert into \".$table_name.\" (user, nb, volume) values (\\\"\".$user.\"\\\", 1, \".$volume.\")\";\n $this->db_conn->query($query_insert) ||\n die (\"Error sending the query '\".$query_insert.\"' to MySQL: \".$this->db_conn->error.\"\\n\");\n }\n else {\n \t$query = \"select * from \".$table_name.\" where user=\\\"\".$user.\"\\\"\";\n if ($result = $this->db_conn->query($query)) {\n if ($result->num_rows > 0) {\n // There is a user entry for this month\n $row = $result->fetch_assoc();\n $new_nb = $row['nb'] + 1;\n $new_volume = $row['volume'] + $volume;\n $query_update = \"update \".$table_name.\" set nb=\".$new_nb.\", volume=\".$new_volume.\" where user=\\\"\".$user.\"\\\"\";\n $this->db_conn->query($query_update) ||\n die (\"Error sending the query '\".$query_update.\"' to MySQL: \".$this->db_conn->error.\"\\n\");\n }\n else {\n // Insertion of a new user entry\n $query_insert = \"insert into \".$table_name.\" (user, nb, volume) values (\\\"\".$user.\"\\\", 1, \".$volume.\")\";\n $this->db_conn->query($query_insert) ||\n die (\"Error sending the query '\".$query_insert.\"' to MySQL: \".$this->db_conn->error.\"\\n\");\n }\n }\n else {\n die (\"Error sending the query '\".$query.\"' to MySQL\");\n }\n }\n\t}", "function createFichierTxt($cat_txt, $emp, $emp_sigle, $path_txt, $date_debut, $date_fin){\n $data = array();\n $txt =array();\n $no_data_msg = '';\n\n if ($cat_txt == 'AD'){\n $data = getListAdhesionsDuMois($emp,$emp_sigle,$date_debut,$date_fin);\n $no_data_msg = _('Liste des Adhesions du mois');\n }\n if ($cat_txt == 'PS'){\n $data = getListPSDuMois($emp,$emp_sigle,$date_debut,$date_fin);\n $no_data_msg = _('Liste des Parts Sociales du mois');\n }\n if ($cat_txt == 'NE'){\n $data = getListEpargneDuMois($emp,$emp_sigle,$date_debut,$date_fin);\n $no_data_msg = _('Liste des Epargnes du mois');\n }\n if ($cat_txt == 'NP'){\n $data = getListPretDuMois($emp,$emp_sigle,$date_debut,$date_fin);\n $no_data_msg = _('Liste des Prets du mois');\n }\n\n $nombre_colonnes = $data['nbrCols']+1;\n\n if(sizeof($data)>1){\n $file_handle = fopen($path_txt.\"/\".$cat_txt.\"_\".$emp_sigle.\"_\".date('ymd').\".txt\",\"w\");\n $txt_path = $path_txt.\"/\".$cat_txt.\"_\".$emp_sigle.\"_\".date('ymd').\".txt\";\n $txt_name = $cat_txt.\"_\".$emp_sigle.\"_\".date('ymd').\".txt\";\n $txt['path'] = $txt_path;\n $txt['name'] = $txt_name;\n foreach($data as $key => $value){\n $content = '';\n //if($key != 'nbrCols'){\n //$content = $key;\n //}\n for($i=1;$i<=$nombre_colonnes;$i++){\n $content .= $value['col'.$i.'_value'];\n }\n fwrite($file_handle, $content.\"\\r\\n\");\n }\n fclose($file_handle);\n }\n else{\n $txt['no_data'] = $no_data_msg;\n }\n\n return $txt;\n}", "public function update_transaksi_jurnal()\n\t{\n\t\t// echo \"<pre>\";\n\t\t// print_r($_POST);\n\n\t\t$branch_code \t\t= $this->input->post('branch_code');\n\t\t$no_referensi \t\t= $this->input->post('no_referensi2');\n\t\t$deskripsi \t\t\t= $this->input->post('deskripsi2');\n\t\t$tanggal \t\t\t= $this->input->post('tanggal2');\n\t\t$tanggal = str_replace('/', '', $tanggal);\n\t\t$tanggal \t\t\t= substr($tanggal,4,4).'-'.substr($tanggal,2,2).'-'.substr($tanggal,0,2);\n\n\t\t$gl_account_id \t\t= $this->input->post('gl_account_id');\n\t\t$account_code \t\t= $this->input->post('account_code');\n\t\t$credit \t\t\t= $this->convert_numeric($this->input->post('credit'));\n\t\t$debet \t\t\t\t= $this->convert_numeric($this->input->post('debet'));\n\t\t$description \t\t= $this->input->post('description');\n\n\t\t$account_group_code = $this->input->post('account_group_code');\n\t\t$account_type \t\t= $this->input->post('account_type');\n\n\t\t$trx_gl_id \t\t\t= $this->input->post('trx_gl_id');\n\n\t\t$data_trx_gl = array(\n\t\t\t\t// 'trx_gl_id' => $trx_gl_id,\n\t\t\t\t// 'trx_date' \t=> date(\"Y-m-d\"),\n\t\t\t\t'voucher_date' => $tanggal,\n\t\t\t\t'voucher_ref' => $no_referensi,\n\t\t\t\t'branch_code' => $branch_code,\n\t\t\t\t// 'created_by' => $this->session->userdata('user_id'),\n\t\t\t\t// 'jurnal_trx_type' => 0,\n\t\t\t\t'description' => $deskripsi\n\t\t\t\t// 'created_date' => date('Y-m-d H:i:s')\n\t\t\t);\n\t\t$param_trx_gl = array('trx_gl_id'=>$trx_gl_id);\n\n\t\t$data_trx_gl_detail = array();\n\t\tfor ( $i = 0 ; $i < count($gl_account_id) ; $i++ )\n\t\t{\n\t\t\t/** 1. mendapatkan flag D/C. Default = X \n\t\t\t * \t2. mencari amount\n\t\t\t */\n\t\t\t$flag_debit_credit = 'X';\n\t\t\t$amount = 0;\n\t\t\tif ( $credit[$i] > $debet[$i] ) {\n\t\t\t\t$flag_debit_credit = 'C';\n\t\t\t\t$amount = $credit[$i];\n\t\t\t}\n\t\t\telse if ( $credit[$i] < $debet[$i] ) {\n\t\t\t\t$flag_debit_credit = 'D';\n\t\t\t\t$amount = $debet[$i];\n\t\t\t}\n\t\t\t\n\n\t\t\t$data_trx_gl_detail[] = array(\n\t\t\t\t\t'trx_gl_id' => $trx_gl_id,\n\t\t\t\t\t'account_code' => $account_code[$i],\n\t\t\t\t\t'flag_debit_credit' => $flag_debit_credit,\n\t\t\t\t\t'amount' => $amount,\n\t\t\t\t\t'description' => $description[$i],\n\t\t\t\t\t'trx_sequence' => $i\n\t\t\t\t);\n\t\t}\n\n\t\t$this->db->trans_begin();\n\t\t$this->model_transaction->update_trx_gl($data_trx_gl,$param_trx_gl);\n\t\t$this->model_transaction->delete_trx_gl_detail($param_trx_gl);\n\t\t$this->model_transaction->insert_trx_gl_detail($data_trx_gl_detail);\n\t\tif($this->db->trans_status()===true){\n\t\t\t$this->db->trans_commit();\n\t\t\t$return = array('success'=>true,'message'=>'JURNAL BERHASIL DI REVISI!');\n\t\t}else{\n\t\t\t$this->db->trans_rollback();\n\t\t\t$return = array('success'=>false,'message'=>'Failed to insert Journal ! please contact your administrator!');\n\t\t}\n\t\techo json_encode($return);\n\t}", "function insertData($nama,$nim,$semester,$prodi,$bujitul2,$bujitul,$bujikes,$spptetapa,$spptetap,$sppprakteka,$spppraktek,$sppteoria,$sppteori,$bpu,$boa,$seragam,$pps,$blain2,$blain,$blain3,$blain3a,$blain4,$blain4a,$blain5,$blain5a,$total,$pic){\n\t\t\t$this->ConnectDB();\n\t\t\t$kwnums = $this->KwNums();\n\t\t\t$tanggal = $this->Tanggal('tgl').' '.$this->Tanggal('blnL').' '.$this->Tanggal('THN');\n\t\t\t$sql = \"INSERT INTO nota ( kwnum, payee, nim, semester, prodi, bujitul2, bujitul, bujikes, spptetapa, spptetap, sppprakteka, spppraktek, sppteoria, sppteori, bpu, boa, seragam, pps, blain2, blain, blain3, blain3a, blain4, blain4a, blain5, blain5a, total, pic, tglkw) VALUES ('$kwnums','$nama', '$nim','$semester','$prodi','$bujitul2','$bujitul','$bujikes','$spptetapa','$spptetap','$sppprakteka','$spppraktek','$sppteoria','$sppteori','$bpu','$boa','$seragam','$pps','$blain2','$blain','$blain3','$blain3a','$blain4','$blain4a','$blain5','$blain5a','$total','$pic','$tanggal')\";\n\t\t\tif(! mysql_query($sql,$this->conn))\n\t\t\t\techo \"gagal -> \".mysql_error();\n\t\t\telse\n\t\t\t\techo \"berhasil\";\n\t\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "function save_hours() {\n \n global $db_connect;\n \n if (isset($_GET['zapisz_godziny'])) {\n \n if(preg_match('@^20[0-9]{2}-[0-9]{2}-[0-9]{2}$@', $_GET['data']) && preg_match('@^20[0-9]{2}-[0-9]{2}-[0-9]{2} [0-9]{1,2}:[0-9]{1,2}$@', $_GET['rozpoczecie_pracy']) && preg_match('@^20[0-9]{2}-[0-9]{2}-[0-9]{2} [0-9]{1,2}:[0-9]{1,2}$@', $_GET['koniec_pracy']) && preg_match('@^[0-9]{1,2}:[0-9]{1,2}$@', $_GET['czas_rozp_prz']) && preg_match('@^[0-9]{1,2}:[0-9]{1,2}$@', $_GET['czas_kon_prz'])) {\n \n $date = $_GET['data'];\n $poczatek_pracy = $_GET['rozpoczecie_pracy'];\n $koniec_pracy = $_GET['koniec_pracy'];\n $poczatek_przerwy = $_GET['czas_rozp_prz'];\n $koniec_przerwy = $_GET['czas_kon_prz'];\n\n if( !empty($date) && !empty($poczatek_pracy) && !empty($koniec_pracy) && !empty($poczatek_przerwy) && !empty($koniec_przerwy) ) {\n\n $date = htmlspecialchars($date);\n $poczatek_pracy = htmlspecialchars($poczatek_pracy);\n $koniec_pracy = htmlspecialchars($koniec_pracy);\n $poczatek_przerwy = htmlspecialchars($poczatek_przerwy);\n $koniec_przerwy = htmlspecialchars($koniec_przerwy);\n\n $query = \"INSERT INTO czas VALUES(null, '$date', '$poczatek_pracy', '$koniec_pracy', '$poczatek_przerwy', '$koniec_przerwy',\" . licz_przerwe_min() . \",\" . przerwa_netto_min() . \",\" . czas_przepracowanego_dnia_mod() . \",\" . czas_przepracowanego_dnia_int() . \",\" . suma_dnia() . \")\";\n\n if( $db_connect->query($query)){\n\n echo 'Godziny zostały zapisane';\n header(\"Location:index.php\");\n exit();\n\n } else {\n\n echo \"<h2 class='alert alert-danger'>Wystapił błąd podczas zapisywania.</h2>\";\n\n }\n $db_connect->close();\n\n } else {\n\n echo '<h2 class=\"alert alert-danger\">Prosze wypłenić wszystkie Pola.</h2>';\n\n }\n \n } else {\n \n echo \"<p class=\\\"alert alert-danger\\\">Proszę o wpisanie poprawnego formatu do pól wg podanych poniżej formularza.</p>\";\n\n }\n \n }\n \n}", "function add_day() {\n\t\t\t$date = new DateTime($this->entry_date);\n\t\t\t\n\t\t\t$qry = sprintf(\"INSERT INTO %s (tkr_id, entry_date, open, high, low, close, volume, adj_close) \n\t\t\t\t\tVALUES (%d,'%s',%8.2f,%8.2f,%8.2f,%8.2f,%d,%8.2f)\",\n\t\t\t\t\tmysql_real_escape_string(HISTORICAL_TBL), $this->tkr_id, mysql_real_escape_string($date->format('Y-m-d')),\n\t\t\t\t\t$this->open, $this->high, $this->low, $this->close, $this->vol, $this->adj_close);\n\t\t\tmysql_query($qry) or die(mysql_error());\n\t\t\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.5888985", "0.5633174", "0.5628414", "0.5613958", "0.55559343", "0.54032", "0.53976536", "0.5388568", "0.53870237", "0.53557503", "0.53144425", "0.5270367", "0.5268651", "0.5260969", "0.5241741", "0.52033776", "0.5183557", "0.5182659", "0.51787883", "0.51689696", "0.5167948", "0.51557", "0.51252234", "0.51213586", "0.51138014", "0.5113522", "0.50972587", "0.5091887", "0.5091887", "0.5091887", "0.50832295", "0.5073735", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355", "0.5068355" ]
0.0
-1
return 'this is dashboar';
public function index(Request $request) { $posters = Poster::all(); return view('admin.index',[ 'posters' => $posters, 'page_name'=>'dashboard', 'langs' => Lang::all(), ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function well()\n{\n return \"foxphp\";\n}", "function Hola(){\n return 'Hola Darwin'; \n}", "public function falar(){\n\t\treturn \"Som\";\n\t}", "public function alterMeToo()\n {\n return \"fantabulous\";\n }", "function stringMethod()\n {\n// return 1;\n }", "function buenosDias(){\n return \"Hola! buenos días!!\".salto;\n}", "public function howtoEat()\n {\n return \"Chicken could be fried!<br>\";\n }", "function __return_empty_string() {\n\treturn '';\n}", "function __return_empty_string()\n {\n }", "public function bersuara()\n {\n return \"DARAWET ANJING DAWET\";\n }", "function aboutMe(){\n return \"Hi my name is Ruby, I am a chatbot, nice to meet you\";\n}", "function aboutMe(){\n return \"Hi my name is Ruby, I am a chatbot, nice to meet you\";\n}", "public function honk() {\n return (\"\");\n }", "function test17() {\n return '1';\n}", "public function practice1()\n {\n return (\"practice 1\");\n }", "public function bersuara(){\n return \"miawww\";\n}", "public function man(): string;", "function test26($var) {\n return '';\n}", "public static function testReturn(): string\n {\n return 'im a test';\n }", "public function hello()\n {\n return \"beep\";\n }", "function test19() {\n return '1';\n}", "public function bye(){\n return \"Bye... $this->dialogue\";\n }", "function car() \r\n {\r\n return 'Mercedes Benz C180';\r\n }", "function say(){\n return \"hello world\";\n}", "function greetings4($name){\r\n return $name;\r\n}", "function apa_kabar() {\n return \"Apa kabar dunia?\"; //tidak menampilkan apapun\n}", "public function helperText()\n {\n return \"\";\n }", "function limpieza_uno($value=''){\n\treturn \"Hola\";\n}", "function myExample()\n{\n return 'Good practice';\n}", "function sagHallo() {\n\t\treturn 'Hallo Welt!';\n\t}", "abstract protected function displayString(): string;", "public function string();", "public function display()\n {\n return 'I am a mallard duck';\n }", "public function show()\n {\n //\n return 'Rosie can i have a dance';\n }", "function e($string, $return = false)\r\n\t{\r\n\t\tif($return)\r\n\t\t\treturn $string;\r\n\t\telse\r\n\t\t\techo($string);\r\n\t}", "function greeting()\n{\n return 'Welcome!';\n}", "function HelloWorld($name)\n{\n\treturn 'Hello '.$name.', I hope you have a good day.';\n}", "public function usefulFunctionB(): string\n {\n return \"The result of the product B2.\";\n }", "function test18() {\n return '1';\n}", "function golf5() {\n return '';\n}", "public function getSomething($arg)\n {\n return strtoupper($arg);\n }", "function dashed($s) {\n return underscore($s, '-');\n }", "function from_camel_case($str) {\n return GHelper::from_camel_case($str);\n}", "function say_hello() {\n return \"Hello World\";\n }", "function _($string) {\n\t\treturn $string;\n\t}", "public function doNothing(): string\n {\n return '';\n }", "public function randomFunc() {\n return \"RANDOM\";\n }", "function greet($name)\n{\n return 'Welcome ' . $name;\n}", "public function prueba()\n {\n return 'hola mundo';\n }", "public function hello()\n {\n return \"beep! I am a <i>\" . $this -> model . \"</i><br />\";\n }", "public function test_return() \n\t{\n\t\treturn 'Callback returns are also pretty cool';\n\t}", "function hello (){\n echo 'hello, I am Jakodera'.'<br>';\n}", "function WrightText() {\n echo \"Hello world!\".\"<br>\";\n}", "function user_func(): string\n{\n return 'hello';\n}", "function myCreator(){\n return \"Adokiye is my creator he is currently in stage 4 of the HNG internship, he will soon advance to stage 5\";\n}", "function hello($name) {\n return 'Hello, ' . $name;\n}", "function hello($name) {\n return 'Hello, ' . $name;\n}", "function hello($name)\n{\n // echo \"Hello I am $name\";\n return \"$name + $name\";\n}", "function remove_dashes($string)\n{\n return str_replace('-', ' ', $string);\n\n}", "public function protect() {\n return \"Red House kept you from the robber.\";\n }", "public function sayHello(){\n return \"Hello World!\"; // baru mengembalikan nilai\n }", "public function cry()\n {\n echo \"Cat cry\";\n }", "static function after(){\n\t\t$text = \"\n\t\t\";\n\treturn $text;\n\t}", "function hello($name) {\n \n return 'Hello, ' . $name;\n\n\n }", "public function message(): string\n {\n return 'Has a special character.';\n }", "function negrita($text){\r\n return \"<strong>$text</strong>\";\r\n }", "function hamtinhtong(){\n echo \"neu thay dong nay la ok r\";\n $a = 'hello';\n $b = ' Nguyen Hong Son';\n echo \"<br>\" . $a . $b;\n}", "public function make(): string;", "function __($str){\n if(!empty($str)) return _($str);\n else return '';\n}", "function get_return_string() {\n\t\tif(function_exists($this->settings['callback'])) {\n\t\t\treturn call_user_func($this->settings['callback']);\n\t\t}\n\t\treturn $this->settings['return'];\n\t}", "public function doNothing()\n\t{\n\t\treturn '';\n\t}", "public function eat($ban){ // must include parameter here\n return \"Bangla kola\";\n }", "function string1(){\n\n $string1 = \"Hola mundo\";\n\n echo $string1;\n\n}", "function h($string = '')\n{\n return htmlspecialchars($string);\n}", "public static function getTestString(){\n\t\t//This function will throw out a test string. It is for testing only.\n\t\t$testString = 'me re re me fa me re re me me me fa se sol sol fa sol la sol fa me';\n\t\t//$testString = 'me re re me sol me';\n\t\treturn($testString);\n\t}", "function capital_P_dangit($text)\n {\n }", "function truc(string $arg):string{\n return $arg . ' yo <br/>';\n }", "function return10(){\r\n return 10;\r\n }", "function _e($word) {\n echo __($word);\n}", "function sayHi(string $nama) : string {\n return \"Hi, {$nama}! Apa kabar?\";\n}", "function newName($name)\n{\nreturn ' My name is' .$name;\n}", "function h($string=\"\") {\n\t\treturn htmlspecialchars($string);\n\t}", "function hidupkan_laptop() {\n return \"Hidupkan Laptop\";\n }", "function increaseEnthusiasm($str)\n{\n return $str . \"!\";\n}", "function __($text) {\n\treturn $text;\n}", "public function blue($text): string;", "function hello($name)\n{\n return \"Hello \" . $name . \"\\n\";\n}", "public static function dashed()\n {\n return self::generate('-');\n }", "function echo_($s) {\n if ($s === \"err\") {\n throw new BarristerRpcException(99, \"Error!\");\n }\n else {\n return $s;\n }\n }", "public function render(): string;", "public function render(): string;", "public function render(): string;", "function Name()\n\n{\n echo \"<br>Lester\";\n}", "public function myfoo( $text ) {\n\t\t$text .= ' bar!';\n\t\treturn $text;\n\t}", "public function display(){\n return $this->string;\n }", "function flash_belum_lunas() {\n\n\n return '<span class=\"badge badge-danger text-light p-2\">BELUM LUNAS</span>';\n}", "function makePasta(){\r\n echo \"The Italian Chef made some pasta. <br>\";\r\n }", "public function actionDoSomething(): string\n {\n $result = 'something';\n\n echo \"Welcome to the console DefaultController actionDoSomething() method\\n\";\n\n return $result;\n }", "public function yellow($text): string;", "function salam($waktu, $nama) {\n\treturn \"Selamat $waktu, $nama!!\";\n}", "static function str_name () {\n echo \"This is a static methoc message\";\n }" ]
[ "0.74391776", "0.72810084", "0.6764207", "0.66425455", "0.6583202", "0.64278054", "0.64128363", "0.6411482", "0.6403098", "0.63632584", "0.6306986", "0.6306986", "0.62921107", "0.6222296", "0.6203622", "0.62008935", "0.6176501", "0.616253", "0.6155817", "0.61545926", "0.6113965", "0.6101138", "0.60924774", "0.60870624", "0.6085229", "0.6063762", "0.60571873", "0.6028351", "0.6020175", "0.6007403", "0.6005409", "0.59737694", "0.59694403", "0.5954241", "0.5945424", "0.59355915", "0.593132", "0.5927144", "0.5914619", "0.59099287", "0.5873212", "0.5850874", "0.58499205", "0.58486056", "0.5842024", "0.5831058", "0.58040786", "0.5800274", "0.57970417", "0.5795288", "0.5769529", "0.5755875", "0.57539606", "0.5753905", "0.57504267", "0.5742079", "0.5742079", "0.5738476", "0.5737294", "0.5736176", "0.57212424", "0.5715001", "0.57127213", "0.57087207", "0.5699884", "0.5698847", "0.5692993", "0.56574583", "0.5653753", "0.5638289", "0.5636854", "0.563591", "0.56300163", "0.562774", "0.56172204", "0.56097925", "0.56037784", "0.55997604", "0.5590883", "0.55706936", "0.55692667", "0.5568685", "0.55680084", "0.5566687", "0.5556743", "0.55558753", "0.5552245", "0.55473614", "0.55296767", "0.55177313", "0.55177313", "0.55177313", "0.55116534", "0.5509927", "0.5495993", "0.5492176", "0.5486652", "0.5484829", "0.54812926", "0.54762065", "0.54743916" ]
0.0
-1
end func: __construct Get or set Job key
public function key($key = null) { if($key === null) return $this->key; $this->key = $key; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct($key)\n {\n $this->key = $key;\n }", "public function getLockKey($job)\n {\n return $this->prefix.get_class($job).':'.$this->key;\n }", "public function __construct($key)\n {\n $this->key = $key;\n }", "public function __construct($key)\n {\n $this->key = $key;\n }", "public function __construct($key)\n {\n $this->key = $key;\n }", "public function __construct( $key ) {\n\t\t$this->key = $key;\n\t}", "public function __construct($key)\n {\n parent::__construct($key);\n }", "protected function _getKeyInstanceName() {}", "protected function _getKeyInstanceName() {}", "function GetKey() { return( $this->key ); }", "public function key() {}", "public function key() {}", "public function key() {}", "public function key() {}", "public function key() {}", "public function key() {}", "public function key() {}", "public function key() {}", "public function __construct($key, $engine = NULL) {\n $this->key = $key;\n $engine = $engine;\n }", "public function getKey() {}", "public function getKey() {}", "public function __construct(Key $key)\n {\n $this->key = $key;\n }", "public function __construct(Key $key)\n {\n $this->key = $key;\n }", "public function __construct(Job $job)\n {\n $this->job = $job;\n }", "public function getJobId();", "public function __construct($job_data)\n {\n $this->job_data = $job_data;\n }", "public function getKeyName(){\n return \"job_level\";\n }", "abstract public function getKey(): string;", "public function __construct($emailJobID)\n {\n $this->emailJobID = $emailJobID;\n }", "public function key() { return $this->_m_key; }", "abstract public function getKey();", "abstract public function getKey();", "public function __construct(string $strKey)\r\n {\r\n $this->strKey = $strKey;\r\n }", "protected function getKey()\n {\n return self::$lockPrefix . $this->name;\n }", "public function __construct($job)\n {\n $payload = [];\n $this->job = $job;\n $payload['data'] = json_encode($this->job);\n\n $payload['classname'] = $this->job->getNameOfClass();\n $this->payload = $payload;\n\n }", "public function addJob($key, Job $value)\n {\n return parent::add($key, $value);\n }", "public static function redisKey($job, $suffix = null)\n {\n $id = $job instanceof Job ? $job->id : $job;\n return 'job:'.$id.($suffix ? ':'.$suffix : '');\n }", "public function getJobId(): string\n {\n return $this->job_id;\n }", "public function __construct($keyid, $name = 'unknown') {\n\t\t$this->keyid = $keyid;\n\t\t$this->name = $name;\n\t}", "public function getJobId()\n {\n return $this->job_id;\n }", "public function __construct(Job $job)\n {\n parent::__construct();\n\n $this->job = $job;\n }", "function getKey() {\r\n return $this->key;\r\n }", "public function setKey($key);", "public function key() {\n return $this->key;\n }", "public function jobsJobIdGet($x_oc_token, $x_oc_api_key, $job_id) {\n \n // verify the required parameter 'job_id' is set\n if ($job_id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $job_id when calling jobsJobIdGet');\n }\n \n\n // parse inputs\n $resourcePath = \"/jobs/{job_id}\";\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n $method = \"GET\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = $this->apiClient->selectHeaderAccept(array());\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());\n\n \n // header params\n if($x_oc_token !== null) {\n $headerParams['X-Oc-Token'] = $this->apiClient->toHeaderValue($x_oc_token);\n }// header params\n if($x_oc_api_key !== null) {\n $headerParams['X-Oc-Api-Key'] = $this->apiClient->toHeaderValue($x_oc_api_key);\n }\n // path params\n if($job_id !== null) {\n $resourcePath = str_replace(\"{\" . \"job_id\" . \"}\",\n $this->apiClient->toPathValue($job_id), $resourcePath);\n }\n \n \n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } else if (count($formParams) > 0) {\n // for HTTP post (form)\n $httpBody = $formParams;\n }\n\n // authentication setting, if any\n $authSettings = array();\n\n // make the API Call\n $response = $this->apiClient->callAPI($resourcePath, $method,\n $queryParams, $httpBody,\n $headerParams, $authSettings);\n\n if(! $response) {\n return null;\n }\n\n $responseObject = $this->apiClient->deserialize($response,'Job');\n return $responseObject;\n }", "public function set_key ( $key = '' )\n {\n if ( ! empty( $key ) )\n {\n if ( is_array( $key ) )\n {\n $this->key = $key;\n } else {\n // String has special delimiter\n if ( strpos( $key, ':' ) > -1 )\n {\n $this->key = explode( ':', $key );\n }\n else\n {\n $this->key = [ $key ];\n }\n }\n\n // Default to the entity's name\n } else {\n $this->key = [ $this->name ];\n }\n\n return $this->get_key();\n }", "public function setId()\n {\n throw new \\RuntimeException('It is not possible to set job id, you must create a new job');\n }", "abstract protected function _getKeyClassName();", "public function setKey(string $key);", "public function getSetJob()\n {\n return $this->get(self::_SET_JOB);\n }", "public function key();", "public function key();", "public function key();", "public function key();", "public function key();", "public function key();", "public function key();", "public function key();", "public function key();", "protected function _getKeyClassName() {}", "protected function _getKeyClassName() {}", "function setKey($clave){\n $this->key = $clave;\n }", "public function key($key = null)\n\t{\n\t\treturn $this->getSet(\"key\", $key);\n\t}", "public function key($key = null)\n\t{\n\t\treturn $this->getSet(\"key\", $key);\n\t}", "function getJobId() {\n return $this->helper->getJobId();\n }", "function getJobId() {\n return $this->helper->getJobId();\n }", "function getJobId() {\n return $this->helper->getJobId();\n }", "function getJobId() {\n return $this->helper->getJobId();\n }", "function getJobId() {\n return $this->helper->getJobId();\n }", "public function __construct($_key = NULL,$_versionId = NULL,$_isLatest = NULL,$_lastModified = NULL,$_owner = NULL)\r\n\t{\r\n\t\tparent::__construct(array('Key'=>$_key,'VersionId'=>$_versionId,'IsLatest'=>$_isLatest,'LastModified'=>$_lastModified,'Owner'=>$_owner));\r\n\t}", "public function getComponentKey();", "public function getKey() {\n return $this->key;\n }", "public function key()\n {\n }", "public function key()\n {\n }", "public function key()\n {\n }", "public function key()\n {\n }", "public function getKey() \n {\n return $this->_key;\n }", "public function __construct(Key $key)\n {\n $this->key = $key;\n $this->server = $key->server;\n }", "function __construct($key, $base64 = true) {\n\t\t\t\n\t\t\tglobal $cc_encryption_hash;\n\t\t\t\n\t\t\t// Toggle base64 usage on / off\n\t\t\t$this->base64 = $base64;\n\t\t\t\n\t\t\t// Instead of using the key directly we compress it using a hash function\n\t\t\t$this->hash_key = $this->_hash($key);\n\t\t\t\n\t\t\t// Remember length of hashvalues for later use\n\t\t\t$this->hash_length = strlen($this->hash_key);\n\t\t}", "Public Function CreatejobId()\n {\n \t$DatabaseObj = Zend_Registry::get('Instance/DatabaseObj');\n \t\n\t\t\t$Salt = \"abcdefghijklmnpqrstuvwxyzABCDEFGHIJKLMNPQRSTUVWXYZ1234567890_\";\n\t\t\tsrand((double)microtime()*1000000);\n\t\t\t$ConfirmationKey = \"\";\n\t\t\tfor ($i=0;$i<8;$i++)\n\t\t\t{\n\t\t\t\t$ConfirmationKey = $ConfirmationKey . substr ($Salt, rand() % strlen($Salt), 1);\n\t\t\t}\n\t\t\t\n\t\t\t$InsertArray = array(\n \t\t\t'jobId' => $ConfirmationKey,\n \t\t);\n \t\t\n \t\t$Sql = \"SELECT id FROM bevomedia_queue WHERE jobId = '$ConfirmationKey'\";\n \t\t$Rows = $DatabaseObj->fetchAll($Sql);\n \t\tif(sizeof($Rows) > 0)\n \t\t{\n \t\t\t$ConfirmationKey = $this->CreatejobId();\n \t\t\treturn $ConfirmationKey;\n \t\t}\n \t\t\n \t\t$DatabaseObj->insert('bevomedia_queue', $InsertArray);\n \t\t\n \t\t$this->jobId = $ConfirmationKey;\n \t\t\n\t\t\treturn $ConfirmationKey;\n \t\n }", "public function getKey()\r\n {\r\n return $this->key;\r\n }", "public function key(): int|string|null;", "abstract protected function getJob(int $jobid): Job;", "public static function getKey();", "public static function getKey();", "public function getKey(): string;", "public function getKey(): string;", "public function getJob(): string\n {\n return $this->job;\n }", "public function setKey($key)\n {\n //\n $this->key = $key;\n //\n return null;\n }", "public function getKey();", "public function getKey();", "public function getKey();", "public function getKey();", "public function getKey();", "public function getKey();", "public function getKey();", "public function getKey();", "public function getKey();", "public function getKey();", "public function getKey();" ]
[ "0.6477422", "0.63714445", "0.6324853", "0.6324853", "0.6324853", "0.62862635", "0.5891638", "0.58866084", "0.58866084", "0.5880597", "0.587692", "0.587692", "0.587692", "0.587692", "0.587692", "0.587692", "0.5876362", "0.5876362", "0.58371025", "0.58364046", "0.58364046", "0.58245313", "0.58245313", "0.5808411", "0.5808083", "0.57809526", "0.57452583", "0.5737242", "0.5734555", "0.5723167", "0.56977546", "0.56977546", "0.5697654", "0.5692005", "0.5685455", "0.5659725", "0.5657504", "0.5633916", "0.5620676", "0.55985916", "0.55940956", "0.5573723", "0.55641997", "0.55631924", "0.55573267", "0.5553059", "0.5538195", "0.5527101", "0.55269474", "0.5526667", "0.5504525", "0.5504525", "0.5504525", "0.5504525", "0.5504525", "0.5504525", "0.5504525", "0.5504525", "0.5504525", "0.55004627", "0.55004627", "0.5484963", "0.5483355", "0.5483355", "0.5474849", "0.5474849", "0.5474849", "0.5474849", "0.5474849", "0.54732853", "0.54691476", "0.5466152", "0.5464275", "0.5464275", "0.5464275", "0.5464275", "0.54559964", "0.5443719", "0.54422355", "0.54407567", "0.5435911", "0.5428102", "0.5425443", "0.54192525", "0.54192525", "0.5406904", "0.5406904", "0.5399775", "0.5399772", "0.539566", "0.539566", "0.539566", "0.539566", "0.539566", "0.539566", "0.539566", "0.539566", "0.539566", "0.539566", "0.539566" ]
0.5804263
25
end func: key Add a cron expression
public function on($format) { $this->formats[] = Format::factory($format); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addCron() { // cron parameters passed via JSON query string\n\t\t$cron = json_decode(Flight::request()->query['cron'],true);\n\t\t$t = explode(\":\",$cron['t']); //time\n\t\t$i= 0;\n\t\t$str='';\n\t\tforeach ($cron['d'] as $d) { //compose day of Week\n\t\t\tif ($d) $str .= $i.',';\n\t\t\t$i++;\n\t\t};\n\t\t$str = rtrim($str,',');\n\t\t$cronLine = $t[1].' '.$t[0].' * * '.$str.' /usr/bin/curl localhost/radion >/dev/null 2>&1 #'.$cron['c'].PHP_EOL;\n\t\tfile_put_contents(Flight::get(\"pathCron\"), $cronLine, FILE_APPEND | LOCK_EX);\n\t\texec(\"cat \".Flight::get(\"pathCron\").\" | crontab -\");\n\t\tFlight::json(array('Status' => 'OK','Cron' => $t[1].' '.$t[0].' * * '.$str.' #'.$cron['c']));\n\t}", "public function addcron() {\r\n $os = php_uname('s');\r\n\r\n $file = APP_PATH . '/index.php?c=cron&a=apply';\r\n\r\n\r\n switch ($os) {\r\n case substr($os, 0, 7) == 'Windows':\r\n exec(\"schtasks /create /sc minute /mo 5 /tn 'update_quota' /tr . $file . /ru 'System'\");\r\n break;\r\n\r\n case substr($os, 0, 5) == 'Linux':\r\n switch ($_SERVER['SERVER_PORT']) {\r\n case 80:\r\n $url = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];\r\n break;\r\n\r\n case 443:\r\n $url = 'https://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];\r\n break;\r\n\r\n default:\r\n $url = 'http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'] . $_SERVER['REQUEST_URI'];\r\n }\r\n\r\n $cmdline = '*/5 * * * * /usr/bin/curl' . $url;\r\n\r\n exec('crontab -e <' . $cmdline);\r\n break;\r\n }\r\n }", "public function cron($key) {\n\t\t// Todo a task \n\t}", "public function cron($key) {\n\t\t// Todo a task \n\t}", "function add_custom_cron() {\n\tif ( ! wp_next_scheduled( 'custom_cron_action' ) ) {\n\t\twp_schedule_event( current_time( 'timestamp' ), 'hourly', 'custom_cron_action' );\n\t}\n}", "public function getCronCmd() {}", "function _schedule_cron( $hook, $recurrence = null, $time = null ) {\n\t\tIMFORZA_Utils::schedule_cron( $hook, $recurrence, $time );\n\t}", "private function getCron(): CronExpression\n {\n return CronExpression::factory($this->expression);\n }", "public function cron() {\n settings()->cron = json_decode(db()->where('`key`', 'cron')->getValue('settings', '`value`'));\n\n $this->process();\n }", "public function cron($expression)\n {\n $this->_expression = $expression;\n\n return $this;\n }", "function install_cron(){\n wp_schedule_event(\n time(),\n 'cuentadigital_interval',\n 'cuentadigital_cron_hook'\n );\n }", "public function getNextCronExecution() {}", "function addCronTask()\n{\n require_once __DIR__.\"/models/SchedulesModel.php\";\n require_once __DIR__.\"/models/LogModel.php\";\n\n // Emojione client\n $Emojione = new \\Emojione\\Client(new \\Emojione\\Ruleset());\n\n\n // Get auto repost schedules\n $Schedules = new SchedulesModel;\n $Schedules->where(\"is_active\", \"=\", 1)\n ->where(\"schedule_date\", \"<=\", date(\"Y-m-d H:i:s\"))\n ->where(\"end_date\", \">=\", date(\"Y-m-d H:i:s\"))\n ->orderBy(\"last_action_date\", \"ASC\")\n ->setPageSize(5) // required to prevent server overload\n ->setPage(1)\n ->fetchData();\n\n if ($Schedules->getTotalCount() < 1) {\n // There is not any active schedule\n return false;\n }\n\n // Settings\n $settings = namespace\\settings();\n\n // Random delays between actions\n $random_delay = 0;\n if ($settings->get(\"data.random_delay\")) {\n $random_delay = rand(0, 3600); // up to an hour\n }\n\n // Speeds (action count per day)\n $default_speeds = [\n \"very_slow\" => 1,\n \"slow\" => 2,\n \"medium\" => 3,\n \"fast\" => 4,\n \"very_fast\" => 5,\n ];\n $speeds = $settings->get(\"data.speeds\");\n if (empty($speeds)) {\n $speeds = [];\n } else {\n $speeds = json_decode(json_encode($speeds), true);\n }\n $speeds = array_merge($default_speeds, $speeds);\n\n\n $as = [__DIR__.\"/models/ScheduleModel.php\", __NAMESPACE__.\"\\ScheduleModel\"];\n foreach ($Schedules->getDataAs($as) as $sc) {\n $Log = new LogModel;\n $Account = \\Controller::model(\"Account\", $sc->get(\"account_id\"));\n $User = \\Controller::model(\"User\", $sc->get(\"user_id\"));\n\n // Set default values for the log (not save yet)...\n $Log->set(\"user_id\", $User->get(\"id\"))\n ->set(\"account_id\", $Account->get(\"id\"))\n ->set(\"status\", \"error\");\n\n // Check the account\n if (!$Account->isAvailable() || $Account->get(\"login_required\")) {\n // Account is either removed (unexected, external factors)\n // Or login reqiured for this account\n // Deactivate schedule\n $sc->set(\"is_active\", 0)->save();\n\n // Log data\n $Log->set(\"data.error.msg\", \"Activity has been stopped\")\n ->set(\"data.error.details\", \"Re-login is required for the account.\")\n ->save();\n continue;\n }\n\n // Check the user\n if (!$User->isAvailable() || !$User->get(\"is_active\") || $User->isExpired()) {\n // User is not valid\n // Deactivate schedule\n $sc->set(\"is_active\", 0)->save();\n\n // Log data\n $Log->set(\"data.error.msg\", \"Activity has been stopped\")\n ->set(\"data.error.details\", \"User account is either disabled or expired.\")\n ->save();\n continue;\n }\n\n if ($User->get(\"id\") != $Account->get(\"user_id\")) {\n // Unexpected, data modified by external factors\n // Deactivate schedule\n $sc->set(\"is_active\", 0)->save();\n continue;\n }\n\n // Check user access to the module\n $user_modules = $User->get(\"settings.modules\");\n if (!is_array($user_modules) || !in_array(IDNAME, $user_modules)) {\n // Module is not accessible to this user\n // Deactivate schedule\n $sc->set(\"is_active\", 0)->save();\n\n // Log data\n $Log->set(\"data.error.msg\", \"Activity has been stopped\")\n ->set(\"data.error.details\", \"Module is not accessible to your account.\")\n ->save();\n continue;\n }\n\n // Calculate next schedule datetime...\n if (isset($speeds[$sc->get(\"speed\")]) && (int)$speeds[$sc->get(\"speed\")] > 0) {\n $speed = (int)$speeds[$sc->get(\"speed\")];\n $delta = round(86400/$speed) + $random_delay;\n } else {\n $delta = rand(1200, 21600); // 20 min - 6 hours\n }\n\n $next_schedule = date(\"Y-m-d H:i:s\", time() + $delta);\n if ($sc->get(\"daily_pause\")) {\n $pause_from = date(\"Y-m-d\").\" \".$sc->get(\"daily_pause_from\");\n $pause_to = date(\"Y-m-d\").\" \".$sc->get(\"daily_pause_to\");\n if ($pause_to <= $pause_from) {\n // next day\n $pause_to = date(\"Y-m-d\", time() + 86400).\" \".$sc->get(\"daily_pause_to\");\n }\n\n if ($next_schedule > $pause_to) {\n // Today's pause interval is over\n $pause_from = date(\"Y-m-d H:i:s\", strtotime($pause_from) + 86400);\n $pause_to = date(\"Y-m-d H:i:s\", strtotime($pause_to) + 86400);\n }\n\n if ($next_schedule >= $pause_from && $next_schedule <= $pause_to) {\n $next_schedule = $pause_to;\n }\n }\n $sc->set(\"schedule_date\", $next_schedule)\n ->set(\"last_action_date\", date(\"Y-m-d H:i:s\"))\n ->save();\n\n\n // Parse targets\n $targets = @json_decode($sc->get(\"target\"));\n if (is_null($targets)) {\n // Unexpected, data modified by external factors or empty targets\n // Deactivate schedule\n $sc->set(\"is_active\", 0)->save();\n continue;\n }\n\n if (count($targets) < 1) {\n // Couldn't find any target for the feed\n // Log data\n $Log->set(\"data.error.msg\", \"Couldn't find any target to search for the feed.\")\n ->save();\n return false;\n }\n\n // Select random target from the defined target collection\n $i = rand(0, count($targets) - 1);\n $target = $targets[$i];\n\n if (empty($target->type) || empty($target->id) ||\n !in_array($target->type, [\"hashtag\", \"location\", \"people\"])) \n {\n // Unexpected invalid target, \n // data modified by external factors\n $sc->set(\"is_active\", 0)->save();\n continue; \n }\n\n $Log->set(\"data.trigger\", $target);\n\n\n // Login into the account\n try {\n $Instagram = \\InstagramController::login($Account);\n } catch (\\Exception $e) {\n // Couldn't login into the account\n $Account->refresh();\n\n // Log data\n if ($Account->get(\"login_required\")) {\n $sc->set(\"is_active\", 0)->save();\n $Log->set(\"data.error.msg\", \"Activity has been stopped\");\n } else {\n $Log->set(\"data.error.msg\", \"Action re-scheduled\");\n }\n $Log->set(\"data.error.details\", $e->getMessage())\n ->save();\n\n continue;\n }\n\n\n // Logged in successfully\n $permissions = $User->get(\"settings.post_types\");\n $video_processing = isVideoExtenstionsLoaded() ? true : false;\n\n $acceptable_media_types = [];\n if (!empty($permissions->timeline_photo)) {\n $acceptable_media_types[] = \"1\"; // Photo\n }\n\n if (!empty($permissions->timeline_video)) {\n $acceptable_media_types[] = \"2\"; // Video\n }\n\n if (!empty($permissions->album_photo) || !empty($permissions->album_video)) {\n $acceptable_media_types[] = \"8\"; // Album\n }\n\n\n // Generate a random rank token.\n $rank_token = \\InstagramAPI\\Signatures::generateUUID();\n\n if ($target->type == \"hashtag\") {\n $hashtag = str_replace(\"#\", \"\", trim($target->id));\n if (!$hashtag) {\n continue;\n }\n\n try {\n $feed = $Instagram->hashtag->getFeed(\n $hashtag,\n $rank_token);\n } catch (\\Exception $e) {\n // Couldn't get instagram feed related to the hashtag\n // Log data\n $msg = $e->getMessage();\n $msg = explode(\":\", $msg, 2);\n $msg = isset($msg[1]) ? $msg[1] : $msg[0];\n\n $Log->set(\"data.error.msg\", \"Couldn't get the feed\")\n ->set(\"data.error.details\", $msg)\n ->save();\n continue;\n }\n\n $items = array_merge($feed->getRankedItems(), $feed->getItems());\n } else if ($target->type == \"location\") {\n try {\n $feed = $Instagram->location->getFeed(\n $target->id, \n $rank_token);\n } catch (\\Exception $e) {\n // Couldn't get instagram feed related to the location id\n // Log data\n $msg = $e->getMessage();\n $msg = explode(\":\", $msg, 2);\n $msg = isset($msg[1]) ? $msg[1] : $msg[0];\n\n $Log->set(\"data.error.msg\", \"Couldn't get the feed\")\n ->set(\"data.error.details\", $msg)\n ->save();\n continue;\n }\n\n $items = $feed->getItems();\n } else if ($target->type == \"people\") {\n try {\n $feed = $Instagram->timeline->getUserFeed($target->id);\n } catch (\\Exception $e) {\n // Couldn't get instagram feed related to the user id\n // Log data\n $msg = $e->getMessage();\n $msg = explode(\":\", $msg, 2);\n $msg = isset($msg[1]) ? $msg[1] : $msg[0];\n\n $Log->set(\"data.error.msg\", \"Couldn't get the feed\")\n ->set(\"data.error.details\", $msg)\n ->save();\n continue;\n }\n\n $items = $feed->getItems();\n }\n\n\n // Found feed item to repost\n $feed_item = null;\n\n // Shuffe items\n shuffle($items);\n\n // Iterate through the items to find a proper item to repost\n foreach ($items as $item) {\n if (!$item->getId()) {\n // Item is not valid\n continue;\n }\n\n if (!in_array($item->getMediaType(), $acceptable_media_types)) {\n // User has not got a permission to post this kind of the item\n continue;\n }\n\n if ($item->getMediaType() == 2 && !$video_processing) {\n // Video processing is not possible now,\n // FFMPEG is not configured\n continue;\n }\n\n if ($item->getMediaType() == 8) {\n $medias = $item->getCarouselMedia();\n $is_valid = true;\n foreach ($medias as $media) {\n if ($media->getMediaType() == 1 && empty($permissions->album_photo)) {\n // User has not got a permission for photo albums\n $is_valid = false;\n break; \n }\n\n if ($media->getMediaType() == 2 && empty($permissions->album_video)) {\n // User has not got a permission for video albums\n $is_valid = false;\n break; \n }\n\n if ($media->getMediaType() == 2 && !$video_processing) {\n // Video processing is not possible now,\n // FFMPEG is not configured\n $is_valid = false;\n break; \n }\n }\n\n if (!$is_valid) {\n // User can not re-post this album post because of the permission \n // (or absence of the ffmpeg video processing)\n continue;\n }\n }\n\n\n $_log = new LogModel([\n \"user_id\" => $User->get(\"id\"),\n \"account_id\" => $Account->get(\"id\"),\n \"original_media_code\" => $item->getCode(),\n \"status\" => \"success\"\n ]);\n\n if ($_log->isAvailable()) {\n // Already reposted this feed\n continue;\n }\n\n // Found the feed item to repost\n $feed_item = $item;\n break;\n }\n\n\n if (empty($feed_item)) {\n $Log->set(\"data.error.msg\", \"Couldn't find the new feed item to repost\")\n ->save();\n continue;\n }\n\n\n // Download the media\n $media = [];\n if ($feed_item->getMediaType() == 1 && $feed_item->getImageVersions2()->getCandidates()[0]->getUrl()) {\n $media[] = $feed_item->getImageVersions2()->getCandidates()[0]->getUrl();\n } else if ($feed_item->getMediaType() == 2 && $feed_item->getVideoVersions()[0]->getUrl()) {\n $media[] = $feed_item->getVideoVersions()[0]->getUrl();\n } else if ($feed_item->getMediaType() == 8) {\n foreach ($feed_item->getCarouselMedia() as $m) {\n if ($m->getMediaType() == 1 && $m->getImageVersions2()->getCandidates()[0]->getUrl()) {\n $media[] = $m->getImageVersions2()->getCandidates()[0]->getUrl();\n\n } else if ($m->getMediaType() == 2 && $m->getVideoVersions()[0]->getUrl()) {\n $media[] = $m->getVideoVersions()[0]->getUrl();\n }\n }\n }\n\n\n $downloaded_media = [];\n foreach ($media as $m) {\n $url_parts = parse_url($m);\n if (empty($url_parts['path'])) {\n continue;\n }\n\n $ext = strtolower(pathinfo($url_parts['path'], PATHINFO_EXTENSION));\n $filename = uniqid(readableRandomString(8).\"-\").\".\".$ext;\n $downres = file_put_contents(TEMP_PATH . \"/\". $filename, file_get_contents($m));\n if ($downres) {\n $downloaded_media[] = $filename;\n }\n }\n\n if (empty($downloaded_media)) {\n $Log->set(\"data.error.msg\", \"Couldn't download the media of the selected post\")\n ->save();\n continue;\n }\n\n $original_caption = \"\";\n if ($feed_item->getCaption()->getText()) {\n $original_caption = $feed_item->getCaption()->getText();\n }\n\n $caption = $sc->get(\"caption\");\n $variables = [\n \"{{caption}}\" => $original_caption,\n \"{{username}}\" => \"@\".$feed_item->getUser()->getUsername(),\n \"{{full_name}}\" => $feed_item->getUser()->getFullName() ?\n $feed_item->getUser()->getFullName() :\n \"@\".$feed_item->getUser()->getUsername()\n ];\n $caption = str_replace(\n array_keys($variables), \n array_values($variables), \n $caption);\n\n $caption = $Emojione->shortnameToUnicode($caption);\n if ($User->get(\"settings.spintax\")) {\n $caption = \\Spintax::process($caption);\n }\n\n $caption = mb_substr($caption, 0, 2200);\n\n\n\n // Try to repost\n try {\n if (count($downloaded_media) > 1) {\n $album_media = [];\n\n foreach ($downloaded_media as $m) {\n $ext = strtolower(pathinfo($m, PATHINFO_EXTENSION));\n\n $album_media[] = [\n \"type\" => in_array($ext, [\"mp4\"]) ? \"video\" : \"photo\",\n \"file\" => TEMP_PATH.\"/\".$m\n ];\n }\n\n $res = $Instagram->timeline->uploadAlbum($album_media, ['caption' => $caption]);\n } else {\n $m = $downloaded_media[0];\n $ext = strtolower(pathinfo($m, PATHINFO_EXTENSION));\n if (in_array($ext, [\"mp4\"])) {\n $res = $Instagram->timeline->uploadVideo(TEMP_PATH.\"/\".$m, [\"caption\" => $caption]);\n } else {\n $res = $Instagram->timeline->uploadPhoto(TEMP_PATH.\"/\".$m, [\"caption\" => $caption]);\n }\n }\n } catch (\\Exception $e) {\n $msg = $e->getMessage();\n $msg = explode(\":\", $msg, 2);\n $msg = isset($msg[1]) ? $msg[1] : $msg[0];\n\n $Log->set(\"data.error.msg\", __(\"An error occured during reposting the media.\"))\n ->set(\"data.error.details\", $msg)\n ->save();\n continue;\n }\n\n if (!$res->isOk()) {\n $Log->set(\"data.error.msg\", __(\"An error occured during reposting the media.\"))\n ->set(\"data.error.details\", __(\"Instagram didn't return the expected result.\"))\n ->save();\n continue;\n }\n\n\n // Reposted media succesfully\n // Save log\n $thumb = null;\n if (null !== $feed_item->getImageVersions2()) {\n $thumb = $feed_item->getImageVersions2()->getCandidates()[0]->getUrl();\n } else if (null !== $feed_item->getCarouselMedia()) {\n $thumb = $feed_item->getCarouselMedia()[0]->getImageVersions2()->getCandidates()[0]->getUrl();\n }\n\n\n $Log->set(\"data.grabbed\", [\n \"media_id\" => $feed_item->getId(),\n \"media_code\" => $feed_item->getCode(),\n \"media_type\" => $feed_item->getMediaType(),\n \"media_thumb\" => $thumb,\n \"user\" => [\n \"pk\" => $feed_item->getUser()->getPk(),\n \"username\" => $feed_item->getUser()->getUsername(),\n \"full_name\" => $feed_item->getUser()->getFullName()\n ]\n ]);\n\n $Log->set(\"data.reposted\", [\n \"upload_id\" => $res->getUploadId(),\n \"media_pk\" => $res->getMedia()->getPk(),\n \"media_id\" => $res->getMedia()->getId(),\n \"media_code\" => $res->getMedia()->getCode()\n ]);\n \n $Log->set(\"status\", \"success\")\n ->set(\"original_media_code\", $feed_item->getCode());\n \n\n if ($sc->get(\"remove_delay\") > 0) {\n $Log->set(\"is_removable\", 1)\n ->set(\"remove_scheduled\", date(\"Y-m-d H:i:s\", time() + $sc->get(\"remove_delay\")));\n }\n\n $Log->save();\n\n // Remove downloaded media files\n foreach ($downloaded_media as $m) {\n @unlink(TEMP_PATH.\"/\".$m);\n }\n }\n}", "function ds_add_email_cron_schedules( $param ) {\n\n $param['fifteen_minute'] = array(\n 'interval' => 900, // seconds* 900/60 = 15 mins\n 'display' => __( 'Every Fifteen Minutes' )\n );\n\n return $param;\n\n }", "public function cron()\n {\n wp_schedule_event(time(), 'hourly', array($this, 'generate'));\n }", "static function cron() {\n\t\tself::starter();\n\t\tself::ender();\n\t}", "function dcs_dropship_cron_definer($schedules)\r\n{ \r\n\t$schedules['monthly'] = array( \r\n\t\t'interval'=> 2592000, \r\n\t\t'display'=> __('Once Every 30 Days') \r\n\t\t); \r\n\treturn $schedules;\r\n}", "function cron_add_weekly( $schedules ) {\n $schedules['weekly'] = array(\n 'interval' => 604800,\n 'display' => __( 'Once Weekly' )\n );\n return $schedules;\n}", "public function cron() {\n include('programming_cron.php');\n }", "function add_cron_interval( $schedules ) {\n\t$schedules['ten_seconds'] = array(\n\t\t'interval' => 60,\n\t\t'display' => esc_html__( 'Every Ten Seconds' ),\n\t);\n\n\treturn $schedules;\n}", "function cron_add_minute( $schedules ) {\r\n $schedules['everyminute'] = array( 'interval' => 60, 'display' => __( 'Once Every Minute' ) ); \r\n return $schedules; \r\n }", "static function schedule_cron() {\n\t\t$is_multisite = is_multisite();\n\t\tif ( $is_multisite ) {\n\t\t\t$primary_blog = get_current_site();\n\t\t\t$current_blog = get_current_blog_id();\n\t\t} else {\n\t\t\t$primary_blog = 1;\n\t\t\t$current_blog = 1;\n\t\t}\n\n\t\t/**\n\t\t * If we're on a multisite, only schedule the cron if we're on the primary blog\n\t\t */\n\t\tif (\n\t\t( ! $is_multisite || ( $is_multisite && $primary_blog->id === $current_blog ) )\n\t\t) {\n\t\t\t$cronsScheduled = false;\n\t\t\tif( ! wp_next_scheduled( 'wp_rest_cache_cron' ) ) {\n\t\t\t\twp_schedule_event( time(), '5_minutes', 'wp_rest_cache_cron' );\n\t\t\t\t$cronsScheduled = true;\n\t\t\t}\n\t\t\tif( ! wp_next_scheduled( 'wp_rest_cache_expired_cron' ) ) {\n\t\t\t\twp_schedule_event( time(), 'hourly', 'wp_rest_cache_expired_cron' );\n\t\t\t\t$cronsScheduled = true;\n\t\t\t}\n\t\t\tif( $cronsScheduled ) {\n\t\t\t\tdo_action( 'wrc_after_schedule_cron', $primary_blog, $current_blog );\n\t\t\t}\n\t\t}\n\t}", "function wp_doing_cron()\n {\n }", "function escape_cron () {\n global $CFG;\n\n return true;\n}", "function registry()\n\t{\n\t\tif ( !wp_next_scheduled( 'admin_action_delibera_cron_action' ) ) // if already been scheduled, will return a time \n\t\t{\n\t\t\twp_schedule_event(time(), 'hourly', 'admin_action_delibera_cron_action');\n\t\t}\n\t}", "private function modifyCronEntry($search_term)\r\n {\r\n echo \"Modify Cron Entry<br>\";\r\n }", "function spawn_cron($gmt_time = 0)\n {\n }", "private function addCronTasks(array $tasks) {\n\t\t// TODO\n\t}", "private function addCronTasks(array $tasks) {\n\t\t// TODO\n\t}", "public function cron(Reminder $reminder);", "function tquiz_cron () {\n return true;\n}", "function emp_cron_schedules($schedules){\n\t$schedules['em_minute'] = array(\n\t\t'interval' => 60,\n\t\t'display' => 'Every Minute'\n\t);\n\treturn $schedules;\n}", "function annotation_cron () {\n return true;\n}", "function view_check_cron() {\n\t}", "public function schedule_cron() {\n\t\twp_schedule_event( time(), 'daily', 'download_iracing_members_files' );\n\t\twp_schedule_event( time(), 'daily', 'convert_iracing_members_file_to_json' );\n\t}", "function my_cron_schedules($schedules){\r\n if(!isset($schedules[\"5min\"])){\r\n $schedules[\"5min\"] = array(\r\n 'interval' => 5*60,\r\n 'display' => __('Once every 5 minutes'));\r\n }\r\n if(!isset($schedules[\"15min\"])){\r\n $schedules[\"15min\"] = array(\r\n 'interval' => 15*60,\r\n 'display' => __('Once every 15 minutes'));\r\n }\r\n return $schedules;\r\n}", "public function actionCronHourly()\n {\n switch (date('H')) {\n default: echo \"Nothing to run\\n\";\n }\n echo \"Done!\\n\";\n }", "function cicleinscription_cron () {\n return true;\n}", "function etherpadlite_cron () {\n return true;\n}", "function email_cron() {\n return true;\n}", "function implement(){\n// .' or (`status`='.self::CRON_STATUS_RUN.' and `runtime`<'.(NOW_TIME-self::CRON_RETRY_TIME).')) ';\n// $where .= ' and `retry`<'.self::CRON_RETRY_COUNT;\n $where = '`status`='.self::CRON_STATUS_DEF;\n //$where .= ' and `addtime` >'.(NOW_TIME-self::CRON_TIMEOUT);\n $where .= ' and (`runtime` is null or `runtime`<'.(NOW_TIME-self::CRON_RETRY_TIME).') ';\n $where .= ' and `crontime` <'.NOW_TIME;\n $error_acid=$this->getErrorACID();\n if($error_acid){\n $where .= \" and `ac_id` not in ($error_acid) \";\n }\n $cron=M('x_cron');\n// $cron->where($where)\n// ->order('`priority` desc,`addtime` asc')->limit(1)\n// ->find();\n// if($cron->id){\n// $param=@json_decode($cron->param,true);\n// $param['cron_id']= $cron->id;\n// asyn_implement($cron->path,$param,$cron->method);\n// $cron->retry+=1;\n// $cron->status=self::CRON_STATUS_RUN;\n// $cron->runtime=NOW_TIME;\n// $cron->save();\n// }\n $data=$cron->where($where)\n ->order('`priority` desc,`addtime` asc')->limit(50)\n ->select();\n echo $cron->getLastSql();\n if($data){\n foreach ($data as $r){\n $param=@json_decode($r['param'],true);\n $param['cron_id']= $r['id'];\n $url=url($r['path']).'?'.http_build_query($param, '', '&');\n echo '<br>'.$r['id'].'#'.$r['message'].'##<a href=\"'.$url.'\" target=\"_blank\">'.$url.'</a>';\n asyn_implement($r['path'],$param,$r['method']);\n }\n\n }\n }", "function goodrds_schedule_cron() {\n\t if ( !wp_next_scheduled( 'goodrds_cronjob' ) )\n\t wp_schedule_event(time(), 'daily', 'goodrds_cronjob');\n\t}", "function schedule_expiry() {\n\t\tif ( ! wp_next_scheduled( 'github_embed_cron' ) ) {\n\t\t\t$frequency = apply_filters( 'github_embed_cache_frequency', 'daily' );\n\t\t\twp_schedule_event( time(), $frequency, 'github_embed_cron' );\n\t\t}\n\t}", "function cron() {\n\t\t//look at the clock.\n\t\t$now = strtotime('now');\n\t\t\n\t\t//check for the hack\n\t\tif(Configure::read('debug') != 0 && isset($this->params['named']['time_machine'])){\n\t\t\t$now = strtotime($this->params['named']['time_machine']);\n\t\t}\n\t\t\n\t\t$this->Project->upgradeProjects($now);\n\t}", "private function getNextCron($c) {\n\t\t//$c = \"30 07 * * 0\";\n\t\t$c = 'cron '.$c;\n\t\t$c = explode(' ',$c);\n\t\t$d = explode(',',$c[5]);\n\t\tfor ($i=0 ; $i<count($d) ; $i++) { array_splice($d, $i, 1, $d[$i]+1); }\n\t\t$d = implode(',',$d);\n\t\t$c[5] = $d;\t\n\t\t$c = implode(' ',$c);\n\t\tFlight::nextcron()->AddSchedule($c);\n\t\tFlight::nextcron()->RebuildCalendar();\n\t\t$result = Flight::nextcron()->NextTrigger();\n\t\treturn $result[\"ts\"];\n\t}", "function bigbluebuttonbn_cron () {\n return true;\n}", "function log_cron($data)\n\t{\n\t\tif(isset($data))\n\t\t{\n\t\t\tif(!$this->db->insert('CRONLOGS', $data))\n\t\t\t{\n\t\t\t\tthrow new Exception(\"Database Error.\");\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new Exception(\"No data input.\");\n\t\t}\n\t}", "public function it_can_update_cron()\n {\n $cron = factory(Cron::class)->create();\n\n $data = [\n 'expression' => $this->faker->text(15),\n 'description' => $this->faker->text(35)\n ];\n\n $result = $cron->update($data);\n\n $this->assertTrue($result);\n $this->assertEquals($data['expression'], $cron->expression);\n $this->assertEquals($data['description'], $cron->description);\n }", "function contactmod_cron () {\n return true;\n}", "public function getExpression() : string {\n return $this->cronExpr;\n }", "function econsole_cron () {\r\n global $CFG;\r\n\r\n return true;\r\n}", "function add_cron_intervals( $schedules ) {\n\n\t$schedules['5seconds'] = array( // Provide the programmatic name to be used in code\n\t\t'interval' => 5, // Intervals are listed in seconds\n\t\t'display' => 'Every 5 Seconds' // Easy to read display name\n\t);\n\treturn $schedules; // Do not forget to give back the list of schedules!\n}", "public function add(Cron $cron)\n {\n $this->lines[] = $cron;\n\n $this->write();\n }", "protected function _afterSave()\n {\n if ($this->getValue() == Iparcel_All_Model_System_Config_Source_Catalog_Mapping_Mode::CRON) {\n $params = Mage::app()->getRequest()->getParams();\n $params = $params[\"groups\"][\"config\"][\"fields\"];\n /* var $params array */\n\n $freq = $params['cron_frequency']['value'];\n $cron_expr = array();\n $cron_expr[2] = '*';\n $cron_expr[3] = '*';\n $cron_expr[4] = '*';\n switch ($freq) {\n case Mage_Adminhtml_Model_System_Config_Source_Cron_Frequency::CRON_MONTHLY:\n $cron_expr[2] = $params['cron_monthday']['value'];\n break;\n case Mage_Adminhtml_Model_System_Config_Source_Cron_Frequency::CRON_WEEKLY:\n $cron_expr[4] = $params['cron_weekday']['value'];\n break;\n }\n $cron_expr[0] = $params['cron_minute']['value'];\n $cron_expr[1] = $params['cron_hour']['value'];\n\n ksort($cron_expr, SORT_NUMERIC);\n $cron_expr = trim(implode(' ', $cron_expr));\n\n try {\n $this->_getCron()\n ->setValue($cron_expr)\n ->setPath(self::CRON_STRING_PATH)\n ->save();\n } catch (Exception $e) {\n throw new Exception(Mage::helper('cron')->__('Unable to save the cron expression'));\n }\n } else {\n try {\n $this->_getCron()\n ->delete();\n } catch (Exception $e) {\n throw new Exception(Mage::helper('cron')->__('Unable to remove the cron expression'));\n }\n }\n\n return parent::_afterSave();\n }", "private function cronMinute()\n {\n $timedRecords = $this->app['storage.event_processor.timed'];\n if ($timedRecords->isDuePublish()) {\n $this->notify('Publishing timed records');\n $timedRecords->publishTimedRecords();\n }\n if ($timedRecords->isDueHold()) {\n $this->notify('De-publishing timed records');\n $timedRecords->holdExpiredRecords();\n }\n }", "function roshine_cron () {\n return true;\n}", "private function cronAdd($item) {\n $postController = new PostController();\n $postController->createFromCron($item, $this->current_feed);\n }", "function dllc_cron () {\n return true;\n}", "public function getCronDefinition()\n {\n return $this->cron_script; \n }", "private function addCronTasks(array $tasks)\n {\n foreach ($tasks as $task) {\n $task_id = $this->CronTasks->add($task);\n\n if (!$task_id) {\n $cron_task = $this->CronTasks->getByKey(\n $task['key'],\n $task['plugin_dir']\n );\n if ($cron_task) {\n $task_id = $cron_task->id;\n }\n }\n\n if ($task_id) {\n $task_vars = array('enabled' => $task['enabled']);\n if ($task['type'] === \"time\") {\n $task_vars['time'] = $task['type_value'];\n } else {\n $task_vars['interval'] = $task['type_value'];\n }\n\n $this->CronTasks->addTaskRun($task_id, $task_vars);\n }\n }\n }", "function filter_cron_schedules($schedules) {\n $schedules['once_half_hour'] = array(\n 'interval' => 1800, // seconds\n 'display' => __('Once Half an Hour')\n );\n $schedules['half_part_time'] = array(\n 'interval' => 900, // seconds\n 'display' => __('Half Part Time')\n );\n\n return $schedules;\n}", "function build_cron() {\n $inc_job = new \\Cron\\Job\\ShellJob();\n $inc_job->setCommand('php inc.php');\n $inc_job->setSchedule(new \\Cron\\Schedule\\CrontabSchedule('*/2 * * * *'));\n\n $resolver = new \\Cron\\Resolver\\ArrayResolver();\n $resolver->addJob($inc_job);\n\n $cron = new \\Cron\\Cron();\n $cron->setExecutor(new \\Cron\\Executor\\Executor());\n $cron->setResolver($resolver);\n return $cron;\n }", "function questionnaire_cron () {\n global $CFG;\n require_once($CFG->dirroot . '/mod/questionnaire/locallib.php');\n\n return questionnaire_cleanup();\n}", "public function getCronFrequency(): string;", "function wwt_register_cron() {\r\n wp_clear_scheduled_hook('wwt_send_email_with_log');\r\n $firstDayNextMonth = date('Y-m-d 03:00:00', strtotime('first day of next month'));\r\n wp_schedule_event(strtotime($firstDayNextMonth), 'monthly', 'wwt_send_email_with_log');\r\n\r\n return $firstDayNextMonth;\r\n}", "function createCrontab()\n\t{\n\t\t$crontabFilePath = '/tmp/crontab.txt';\n\t\t$file = fopen($crontabFilePath, \"w\") or die(\"Unable to open file!\");\n\t\tglobal $mongo,$python_script_path;\n\t\t$db = $mongo->logsearch;\n\t\t$collection = $db->service_config;\n\t\t$cursor = $collection->find();\n\t\tforeach ($cursor as $doc) {\n\t\t\tif( $doc['state'] == 'Running' && $doc['path'] != '' && $doc['crontab'] != ''){\n\t\t\t\t$txt = '# Index, service:\"'.$doc['service'].'\" system:\"'.$doc['system']\n\t\t\t\t\t\t.'\" node:\"'.$doc['node'].'\" process:\"'.$doc['process'].'\" path:\"'.$doc['path'].'\"'.PHP_EOL;\n\t\t\t\tfwrite($file, $txt); \n\t\t\t\t$txt = $doc['crontab'].' sudo -u logsearch python '\n\t\t\t\t\t\t\t.$python_script_path.'indexScript.py index '.$doc['_id'].PHP_EOL;\n\t\t\t\tfwrite($file, $txt); \n\t\t\t}\n\t\t}\n\t\t//purge data here\n\t\t$keepDataMonth = 3;\n\t\t$txt = '# Purge data at 04:00 everyday, keep data '.$keepDataMonth.' months'.PHP_EOL;\n\t\tfwrite($file, $txt);\n\t\t$txt = '0 4 * * *'.' sudo -u logsearch python '.$python_script_path.'purgeData.py '.$keepDataMonth.' '.PHP_EOL;\n\t\tfwrite($file, $txt); \n\t\tfclose($file);\n\t\t$cmd = \"sudo -u logsearch crontab \".$crontabFilePath;\n\t\texec($cmd);\n\t}", "public function fetchCronIntegrationAction()\n {\n $result = array(\"result\" => \"no change\");\n\n if ($this->request->isPost()) {\n $mdlAcme = $this->getModel();\n $backend = new Backend();\n\n // Setup cronjob if AcmeClient and AutoRenewal is enabled.\n if (\n (string)$mdlAcme->settings->UpdateCron == \"\" and\n (string)$mdlAcme->settings->autoRenewal == \"1\" and\n (string)$mdlAcme->settings->enabled == \"1\"\n ) {\n $mdlCron = new Cron();\n // NOTE: Only configd actions are valid commands for cronjobs\n // and they *must* provide a description that is not empty.\n $cron_uuid = $mdlCron->newDailyJob(\n \"AcmeClient\",\n \"acmeclient cron-auto-renew\",\n \"AcmeClient Cronjob for Certificate AutoRenewal\",\n \"*\",\n \"1\"\n );\n $mdlAcme->settings->UpdateCron = $cron_uuid;\n\n // Save updated configuration.\n if ($mdlCron->performValidation()->count() == 0) {\n $mdlCron->serializeToConfig();\n // save data to config, do not validate because the current in memory model doesn't know about the\n // cron item just created.\n $mdlAcme->serializeToConfig($validateFullModel = false, $disable_validation = true);\n Config::getInstance()->save();\n // Refresh the crontab\n $backend->configdRun('template reload OPNsense/Cron');\n // (res)start daemon\n $backend->configdRun(\"cron restart\");\n $result['result'] = \"new\";\n $result['uuid'] = $cron_uuid;\n } else {\n $result['result'] = \"unable to add cron\";\n }\n // Delete cronjob if AcmeClient or AutoRenewal is disabled.\n } elseif (\n (string)$mdlAcme->settings->UpdateCron != \"\" and\n ((string)$mdlAcme->settings->autoRenewal == \"0\" or\n (string)$mdlAcme->settings->enabled == \"0\")\n ) {\n // Get UUID, clean existin entry\n $cron_uuid = (string)$mdlAcme->settings->UpdateCron;\n $mdlAcme->settings->UpdateCron = \"\";\n $mdlCron = new Cron();\n // Delete the cronjob item\n if ($mdlCron->jobs->job->del($cron_uuid)) {\n // If item is removed, serialize to config and save\n $mdlCron->serializeToConfig();\n $mdlAcme->serializeToConfig($validateFullModel = false, $disable_validation = true);\n Config::getInstance()->save();\n // Regenerate the crontab\n $backend->configdRun('template reload OPNsense/Cron');\n // (res)start daemon\n $backend->configdRun(\"cron restart\");\n $result['result'] = \"deleted\";\n } else {\n $result['result'] = \"unable to delete cron\";\n }\n }\n }\n\n return $result;\n }", "function customcert_cron () {\n return true;\n}", "function randomstrayquotes_cron () {\n return true;\n}", "function customcert_cron() {\n return true;\n}", "public function schedule_cron($rate = 'md5_hash_weekly') {\n if ( !wp_next_scheduled( 'md5_hasher_check_dir' ) ) {\n wp_schedule_event( time(), $rate, 'md5_hasher_check_dir');\n }\n }", "public function initialteRedmineCronJob()\r\n { \r\n \r\n //GET All projects \r\n $allProjects = $this->client->api('project')->all(array('limit' => 100,'offset' => 0));\r\n foreach ($allProjects['projects'] as $project)\r\n { \r\n \t$this->addProject($project);\r\n }\r\n //GET All issues \r\n $allIssue=$this->client->api('issue')->all();\r\n if($allIssue['total_count'] >= 0)\r\n {\r\n for ($offset=0; $offset <=$allIssue['total_count'] ; $offset+=$allIssue['limit']) \r\n { \r\n \r\n $issueList=$this->client->api('issue')->all(array(\r\n 'limit' => $allIssue['limit'],\r\n 'offset' =>$offset)); \r\n foreach ($issueList['issues'] as $singleIssue)\r\n {\r\n $this->addIssue($singleIssue);\r\n }\r\n }\r\n }\r\n \r\n \r\n // //Get All Timelog Entries \r\n $allTimeEntry=$this->client->api('time_entry')->all();\r\n if($allTimeEntry['total_count'] >= 0)\r\n {\r\n for ($offset=0; $offset <=$allTimeEntry['total_count'] ; $offset+=$allTimeEntry['limit']) \r\n { \r\n \r\n $timeEntryList=$this->client->api('time_entry')->all(array('limit' => $allTimeEntry['limit'],'offset' =>$offset)); \r\n foreach ($timeEntryList['time_entries'] as $singleTimeLog)\r\n {\r\n $this->addTimeEntry($singleTimeLog);\r\n }\r\n }\r\n }\r\n\r\n \r\n }", "function asmcron_init_cronjob()\n{\n // check that it hasn't been scheduled yet using our own custom hook\n if( !wp_next_scheduled( 'asmcron_sendmail_hook' ) )\n {\n // if it hasn't, schedule it\n // https://codex.wordpress.org/Function_Reference/wp_schedule_event\n // \"$timestamp\" is for the first time you want the event to occur\n // \"$recurrence\" is for how often the event should reoccur\n // \"$hook\" is for the action hook to execute\n wp_schedule_event( time(), 'hourly', 'asmcron_sendmail_hook' );\n }\n}", "function do_cron() {\n global $config;\n ct_log(\"Cron-Job started.\", 2, -1, 'cron');\n \n $btns = churchcore_getModulesSorted(false, false);\n foreach ($btns as $key) {\n include_once (constant(strtoupper($key)) . \"/$key.php\");\n if (function_exists($key . \"_cron\") && getConf($key . \"_name\")) {\n $arr = call_user_func($key . \"_cron\");\n }\n }\n ct_sendPendingNotifications();\n ct_log(\"Cron-Job finished.\", 2, -1, 'cron');\n}", "public static function createDefaultIncomeContractNotificationCron(){\n\t\t\n\t\t\t$cron = new \\GO\\Base\\Cron\\CronJob();\n\t\t\n\t\t\t$cron->name = GO::t(\"Contract Expiry Notification Cron\", \"projects2\");\n\t\t\t$cron->active = true;\n\t\t\t$cron->runonce = false;\n\t\t\t$cron->minutes = '2';\n\t\t\t$cron->hours = '7';\n\t\t\t$cron->monthdays = '*';\n\t\t\t$cron->months = '*';\n\t\t\t$cron->weekdays = '*';\n\t\t\t$cron->job = 'GO\\Projects2\\Cron\\IncomeNotification';\n\n\t\t\treturn $cron->save();\n\t}", "public function createCronEntry($cron_comment, $cron_datetime, $cron_cmd)\r\n {\r\n exec('crontab -l', $cron_contents_raw);\r\n $cron_contents = implode(PHP_EOL, $cron_contents_raw);\r\n\r\n if (!empty($cron_contents))\r\n {\r\n file_put_contents('/tmp/crontab', $cron_contents.PHP_EOL.$cron_comment.PHP_EOL.$cron_datetime.\" \".$cron_cmd.PHP_EOL);\r\n exec('crontab /tmp/crontab', $o, $exit_code);\r\n\r\n return $exit_code;\r\n }\r\n else\r\n {\r\n file_put_contents('/tmp/crontab', $cron_comment.PHP_EOL.$cron_datetime.\" \".$cron_cmd.PHP_EOL);\r\n exec('crontab /tmp/crontab', $o, $exit_code);\r\n\r\n return $exit_code;\r\n }\r\n return $exit_code;\r\n }", "public function getCron() {\n\t\t$cron = [\"raw\" => \"\", \"active\" => false, \"mm\" => \"\", \"hh\" => \"\", \"dd\" => \"\", \"name\" => \"\"];\n\t\t$output = shell_exec('crontab -l');\n\t\t$lines = explode(\"\\n\", trim($output));\n\t\tif (count($lines) > 3) { // check cron is not empty - First 3 lines are not cron entry but used to reload crontrab at reboot\n\t\t\t$return['Status'] = \"OK\";\n\t\t\twhile ($lines[0] != \"#BEGIN\") { array_shift($lines); } //Remove non cron lines\n\t\t\tarray_shift($lines);\n\t\t\tforeach ($lines as $entry) {\n\t\t\t\t$str = explode(\"/usr\", $entry);\n\t\t\t\t$cron[\"raw\"] = rtrim($str[0]);\n\t\t\t\tif ($cron[\"raw\"][0] == \"#\") {\n\t\t\t\t\t$cron[\"active\"] = false;\n\t\t\t\t\t$sched = substr($cron[\"raw\"],1);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$cron[\"active\"] = true;\n\t\t\t\t\t$sched = $cron[\"raw\"];\n\t\t\t\t}\n\t\t\t\t$sched = explode(\" \",$sched);\n\t\t\t\t$cron[\"mm\"] = $sched[0];\n\t\t\t\t$cron[\"hh\"] = $sched[1];\n\t\t\t\t$cron[\"dd\"] = $sched[4];\n\t\t\t\t$cron[\"name\"] = explode(\"#\",$str[count($str)-1]);\n\t\t\t\t$cron[\"name\"] = $cron[\"name\"][1];\n\t\t\t\t$return['cron'][]=$cron;\n\t\t\t}\n\t\t}\n\t\telse $return['Status'] = \"KO\";\n\t\tif (debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS,2)[1]['function'] == 'invokeMethod') Flight::json($return);\n\t\telse return $return;\n\t}", "static function doCron() {\n\t\t$lc = new DateTime(Preferences::value(\"lastCron\"));\n\t\t$now = new DateTime();\n\t\t\n\t\t$diff = $now->diff($lc, true);\n\t\tif($diff->i >= 1) return true;\n\t\treturn false;\n\t}", "public function nextCron() {\n\t\t$jour=array('Dimanche', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi');\n\t\t$x = self::getCron();\n\t\t$t = [];\n\t\tforeach ($x['cron'] as $cron) {\n\t\t\tif ($cron['active']) $t[] = self::getNextCron($cron['raw']);\n\t\t}\n\t\tif (count($t) >=1) {\n\t\t\t$n = min($t);\n\t\t\tFlight::json(array('Status' => 'OK','Time' => $jour[date('w', $n)].date(' d/m/Y H:i', $n)));\n\t\t}\n\t\telse Flight::json(array('Status' => 'KO','Time' => 'Not Found'));\n\t}", "public function everyHour() {\n $this->cron('0 * * * *');\n }", "function _get_cron_array()\n {\n }", "public function addQueueLog($pid,$action_description,$cron_send_email_on,$cron_send_email_on_field,$cron_repeat_for,$cron_queue_expiration_date,$cron_queue_expiration_date_field){\n #Add logs\n $scheduled_email = \"\";\n if($cron_send_email_on == \"now\"){\n $scheduled_email = \"Send \".$cron_send_email_on.\"\";\n }else if($cron_send_email_on == \"date\"){\n $scheduled_email = \"Send on \".$cron_send_email_on;\n }else if($cron_send_email_on == \"calc\"){\n $scheduled_email = \"Send on condition\";\n }\n if($cron_send_email_on_field != \"\"){\n $scheduled_email .= \": \".$cron_send_email_on_field.\"\";\n }\n $never = false;\n if ($cron_repeat_for != \"\" && $cron_repeat_for != \"0\") {\n if($cron_repeat_for == 1){\n $scheduled_email .= \"<br><br>Repeat every day\";\n }else{\n $scheduled_email .= \"<br><br>Repeat every \" . $cron_repeat_for . \" days\";\n }\n }\n if ($cron_queue_expiration_date != \"\" && $cron_queue_expiration_date != null) {\n $scheduled_email .= \" \";\n if ($cron_queue_expiration_date == \"cond\") {\n $scheduled_email .= \"<br><br>Expires on condition: \";\n }else if ($cron_queue_expiration_date == \"date\") {\n $scheduled_email .= \"<br><br> Expires on: \";\n } else {\n $scheduled_email .= \"<br><br><b>Never</b> Expires\";\n $never = true;\n }\n }\n if ($cron_queue_expiration_date_field != \"\" && !$never) {\n $scheduled_email .= $cron_queue_expiration_date_field . \"\";\n }\n\n $changes_made = $scheduled_email;\n \\REDCap::logEvent($action_description,$changes_made,null,null,null,$pid);\n }", "public function hasCronExpression(): bool\n {\n return $this->cron_expression !== null;\n }", "static public function activate()\n {\n do_action( \"sc_wpfmp_enable_wp_cron\" ); // Go enable cron\n }", "public function wpda_add_cron_job() {\n\t\t\tif ( ! isset( $_REQUEST['backupid'] ) ) {\n\t\t\t\t$this->show_wp_cron();\n\t\t\t\t$msg = new WPDA_Message_Box(\n\t\t\t\t\t[\n\t\t\t\t\t\t'message_text' => __( 'Mandatory item \"backupid\" not found', 'wp-data-access' ),\n\t\t\t\t\t\t'message_type' => 'error',\n\t\t\t\t\t\t'message_is_dismissible' => false,\n\t\t\t\t\t]\n\t\t\t\t);\n\t\t\t\t$msg->box();\n\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$backupid = sanitize_text_field( wp_unslash( $_REQUEST['backupid'] ) ); // input var okay.\n\t\t\tif ( ! isset( $_REQUEST['interval'] ) ) {\n\t\t\t\t$this->show_wp_cron();\n\t\t\t\t$msg = new WPDA_Message_Box(\n\t\t\t\t\t[\n\t\t\t\t\t\t'message_text' => __( 'Mandatory item \"interval\" not found', 'wp-data-access' ),\n\t\t\t\t\t\t'message_type' => 'error',\n\t\t\t\t\t\t'message_is_dismissible' => false,\n\t\t\t\t\t]\n\t\t\t\t);\n\t\t\t\t$msg->box();\n\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$interval = sanitize_text_field( wp_unslash( $_REQUEST['interval'] ) ); // input var okay.\n\t\t\tif ( ! isset( $_REQUEST['keep'] ) ) {\n\t\t\t\t$this->show_wp_cron();\n\t\t\t\t$msg = new WPDA_Message_Box(\n\t\t\t\t\t[\n\t\t\t\t\t\t'message_text' => __( 'Mandatory item \"keep\" not found', 'wp-data-access' ),\n\t\t\t\t\t\t'message_type' => 'error',\n\t\t\t\t\t\t'message_is_dismissible' => false,\n\t\t\t\t\t]\n\t\t\t\t);\n\t\t\t\t$msg->box();\n\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$keep = sanitize_text_field( wp_unslash( $_REQUEST['keep'] ) ); // input var okay.\n\t\t\tif ( ! isset( $_REQUEST['device'] ) ) {\n\t\t\t\t$this->show_wp_cron();\n\t\t\t\t$msg = new WPDA_Message_Box(\n\t\t\t\t\t[\n\t\t\t\t\t\t'message_text' => __( 'Mandatory item \"device\" not found', 'wp-data-access' ),\n\t\t\t\t\t\t'message_type' => 'error',\n\t\t\t\t\t\t'message_is_dismissible' => false,\n\t\t\t\t\t]\n\t\t\t\t);\n\t\t\t\t$msg->box();\n\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$device = sanitize_text_field( wp_unslash( $_REQUEST['device'] ) ); // input var okay.\n\t\t\tif ( ! isset( $_REQUEST['wpda_table_name_export'] ) ) {\n\t\t\t\t$this->show_wp_cron();\n\t\t\t\t$msg = new WPDA_Message_Box(\n\t\t\t\t\t[\n\t\t\t\t\t\t'message_text' => __( 'No tables defined to backup', 'wp-data-access' ),\n\t\t\t\t\t\t'message_type' => 'error',\n\t\t\t\t\t\t'message_is_dismissible' => false,\n\t\t\t\t\t]\n\t\t\t\t);\n\t\t\t\t$msg->box();\n\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\t$request_tables = [];\n\t\t\t\tforeach ( $_REQUEST['wpda_table_name_export'] as $table ) {\n\t\t\t\t\tarray_push( $request_tables, $table );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( isset( $_REQUEST['schema_name'] ) ) {\n\t\t\t\t$schema_name = sanitize_text_field( wp_unslash( $_REQUEST['schema_name'] ) ); // input var okay.\n\t\t\t} else {\n\t\t\t\t$schema_name = '';\n\t\t\t}\n\t\t\tif ( 'runonce' === $interval ) {\n\t\t\t\t// Run data backup once. Do not create job.\n\t\t\t\t$data_backups = get_option( 'wpda_data_backup_option_runonce' );\n\t\t\t\tif ( ! $data_backups ) {\n\t\t\t\t\t$data_backups = [];\n\t\t\t\t}\n\t\t\t\t$data_backup = [\n\t\t\t\t\t'id' => self::PREFIX_RUNONCE . $backupid,\n\t\t\t\t\t'device' => $device,\n\t\t\t\t\t'keep' => $keep,\n\t\t\t\t\t'schema_name' => $schema_name,\n\t\t\t\t\t'tables' => $request_tables,\n\t\t\t\t];\n\t\t\t\tarray_push( $data_backups, $data_backup );\n\t\t\t\tif ( ! update_option( 'wpda_data_backup_option_runonce', $data_backups ) ) {\n\t\t\t\t\t$msg = new WPDA_Message_Box(\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t'message_text' => __( 'Could not create data backup', 'wp-data-access' ),\n\t\t\t\t\t\t\t'message_type' => 'error',\n\t\t\t\t\t\t\t'message_is_dismissible' => false,\n\t\t\t\t\t\t]\n\t\t\t\t\t);\n\t\t\t\t\t$msg->box();\n\t\t\t\t} else {\n\t\t\t\t\tif ( ! wp_schedule_single_event(\n\t\t\t\t\t\tcurrent_time( 'timestamp' ),\n\t\t\t\t\t\t'wpda_data_backup',\n\t\t\t\t\t\t[ self::PREFIX_RUNONCE . $backupid ]\n\t\t\t\t\t)\n\t\t\t\t\t) {\n\t\t\t\t\t\t$msg = new WPDA_Message_Box(\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t'message_text' => __( 'Backup failed', 'wp-data-access' ),\n\t\t\t\t\t\t\t\t'message_type' => 'error',\n\t\t\t\t\t\t\t\t'message_is_dismissible' => false,\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$msg->box();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t?>\n\t\t\t\t<div class=\"wrap\">\n\t\t\t\t\t<h1 class=\"wp-heading-inline\">\n\t\t\t\t\t\t<span><?php echo __( 'Data Backup' ); ?></span>\n\t\t\t\t\t\t<a href=\"https://wpdataaccess.com/docs/documentation/data-explorer/data-backup/\" target=\"_blank\" title=\"Plugin Help - open a new tab or window\">\n\t\t\t\t\t\t\t<span class=\"dashicons dashicons-editor-help\"\n\t\t\t\t\t\t\t\t style=\"text-decoration:none;vertical-align:top;font-size:30px;\">\n\t\t\t\t\t\t\t</span></a>\n\t\t\t\t\t</h1>\n\t\t\t\t\t<p><?php echo __( 'Data backup started. Please check backup location.' ); ?></p>\n\t\t\t\t\t<p><a href=\"?page=wpda&page_action=wpda_backup\" class=\"button\"><?php echo __( 'Back to main page' ); ?></a></p>\n\t\t\t\t</div>\n\t\t\t\t<?php\n\t\t\t} else {\n\t\t\t\t// Create job for data backup.\n\t\t\t\t$data_backups = get_option( 'wpda_data_backup_option' );\n\t\t\t\tif ( ! $data_backups ) {\n\t\t\t\t\t$data_backups = [];\n\t\t\t\t} else {\n\t\t\t\t\tforeach ( $data_backups as $data_backup ) {\n\t\t\t\t\t\tif ( $data_backup['id'] === $backupid ) {\n\t\t\t\t\t\t\t$this->show_wp_cron();\n\t\t\t\t\t\t\t$msg = new WPDA_Message_Box(\n\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t'message_text' => __( 'Backup id already exists', 'wp-data-access' ),\n\t\t\t\t\t\t\t\t\t'message_type' => 'error',\n\t\t\t\t\t\t\t\t\t'message_is_dismissible' => false,\n\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t$msg->box();\n\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$data_backup = [\n\t\t\t\t\t'id' => $backupid,\n\t\t\t\t\t'device' => $device,\n\t\t\t\t\t'keep' => $keep,\n\t\t\t\t\t'schema_name' => $schema_name,\n\t\t\t\t\t'tables' => $request_tables,\n\t\t\t\t];\n\t\t\t\tarray_push( $data_backups, $data_backup );\n\t\t\t\tif ( ! update_option( 'wpda_data_backup_option', $data_backups ) ) {\n\t\t\t\t\t$this->show_wp_cron();\n\t\t\t\t\t$msg = new WPDA_Message_Box(\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t'message_text' => __( 'Could not save data backup options', 'wp-data-access' ),\n\t\t\t\t\t\t\t'message_type' => 'error',\n\t\t\t\t\t\t\t'message_is_dismissible' => false,\n\t\t\t\t\t\t]\n\t\t\t\t\t);\n\t\t\t\t\t$msg->box();\n\t\t\t\t} else {\n\t\t\t\t\t// Flush option to database???\n\t\t\t\t\tglobal $wpdb;\n\t\t\t\t\t$wpdb->flush();\n\t\t\t\t\twp_cache_flush();\n\t\t\t\t\tif ( ! wp_next_scheduled( 'wpda_data_backup', [ $backupid ] ) ) {\n\t\t\t\t\t\twp_schedule_event( current_time( 'timestamp' ), $interval, 'wpda_data_backup', [ $backupid ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->show_wp_cron();\n\t\t\t}\n\t\t}", "function cron_add_10_minutes($schedules) {\n\t\t\t$schedules['10minutes'] = array(\n\t\t\t\t'interval' => 600,\n\t\t\t\t'display' => __( 'Once 10 Minutes' )\n\t\t\t);\n\t\t\treturn $schedules;\n\t\t }", "function cron( $args, $assoc_args ) {\n\n\t\tlist( $source ) = $args;\n\t\t$queue = array(); // list of tasks we need to do\n\n\t\tswitch ( $source ) {\n\t\t\tcase 'google':\n\t\t\t\t$queue[] = 'googleAnalyticsSource';\n\t\t\t\t$queue[] = 'decayViewsSource';\n\t\t\t\tbreak;\n\t\t\tcase 'facebook':\n\t\t\t\t//$queue[] = 'facebookLikesSource';\n\t\t\t\t$queue[] = 'facebookSharesSource';\n\t\t\t\t$queue[] = 'totalSharesSource';\n\t\t\t\t$queue[] = 'decaySharesSource';\n\t\t\t\tbreak;\n\t\t\tcase 'twitter':\n\t\t\t\t$queue[] = 'twitterSharesSource';\n\t\t\t\t$queue[] = 'totalSharesSource';\n\t\t\t\t$queue[] = 'decaySharesSource';\n\t\t\t\tbreak;\n\t\t\tcase 'total':\n\t\t\t\t$queue[] = 'totalSharesSource';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\techo \"Unknown source.\\n\";\n\n\t\t\t\treturn false;\n\t\t\t\tbreak;\n\t\t}\n\n\t\tforeach ( $queue as $v ) {\n\t\t\t$task = $this->factory->cronTask( $this->factory->{$v}() );\n\t\t\techo $task->task();\n\t\t}\n\n\t}", "public function wp_cron_scheduled_check()\n {\n }", "function virtualcron($minDelay = false, $controlFile = false) {\r\n if ($minDelay)\r\n $this->minDelay = $minDelay;\r\n if ($controlFile)\r\n $this->controlFile = $controlFile;\r\n $this->lastExec = 0; // it will contain the UNIXTIME of the last action\r\n $this->nextExec = 0; // it will contain the UNIXTIME of the next action\r\n $this->secToExec = 0; // it will contain the time in seconds until of the next action\r\n if (file_exists($this->controlFile))\r\n $this->check = true;\r\n else {\r\n $handle = fopen($this->controlFile, \"w\");\r\n if (!$handle)\r\n $this->check = false;\r\n else {\r\n if (!fwrite($handle, time()))\r\n $this->check = false;\r\n else {\r\n fclose($handle);\r\n $this->check = true;\r\n }\r\n }\r\n }\r\n }", "function activate_zanders_cron(){\n\t$timestamp = wp_next_scheduled( 'zanders_ftp_download_inventory' );\n\t$status = false;\n\t//If $timestamp == false schedule daily backups since it hasn't been done previously\n\tif( $timestamp == false ){\n\t$status = wp_schedule_event( time(), 'quarterhour', 'zanders_ftp_download_inventory' );\n\t}\n\n\twp_die(); \n}", "function cron_data() {\n return false;\n }", "public function run()\n {\n DB::table('cron_master_lists')->insert([\n \t\t 'description' => 'Advertising Performance',\n \t\t 'route' => 'UpdateCampaignAdvertising',\n \t\t 'sequence' => 10\n \t\t]);\n }", "public function set_cron_check() {\n\n\t\t/* Nonce check */\n\t\tcheck_ajax_referer( 'wpcd-admin', 'nonce' );\n\n\t\t/* Permision check - unsure that this is needed since the action is not destructive and might cause issues if the user sees the message and can't dismiss it because they're not an admin. */\n\t\tif ( ! wpcd_is_admin() ) {\n\t\t\twp_send_json_error( array( 'msg' => __( 'You are not authorized to perform this action - dismiss cron check.', 'wpcd' ) ) );\n\t\t}\n\n\t\t/* Permissions passed - set transient. */\n\t\tset_transient( 'wpcd_cron_check', 1, 12 * HOUR_IN_SECONDS );\n\t\twp_die();\n\n\t}", "public static function vce_call_add_functions($vce) {\n\n /**\n * update a current cron_task\n * @param $id // site_meta table row id\n * @param $timestamp // new timestamp to set\n * @param $properties // key=>value array to update\n *\n * $attributes = json_encode(\n * array (\n * 'component' => *component_name*,\n * 'method' => *component_function_name*,\n * 'properties' => array ('key' => 'value', 'key' => 'value')\n * )\n * );\n */\n $vce->manage_cron_task = function ($attributes) {\n\n // check for a action\n if (isset($attributes['action'])) {\n // move a single attribute to the first array element\n $attributes = array('0' => $attributes);\n }\n\n // check that attributes is not empty\n if (!empty($attributes)) {\n\n global $vce;\n\n foreach ($attributes as $key => $each) {\n // add a cron_task\n if ($each['action'] == \"add\") {\n\n $data = array(\n 'meta_key' => 'cron_task',\n 'meta_value' => $each['value'],\n 'minutia' => $each['timestamp'],\n );\n\n $cron_task_id = $vce->db->insert('site_meta', $data);\n\n return $cron_task_id;\n\n }\n // update a cron_task\n if ($each['action'] == \"update\") {\n\n // update timestamp for cron_task\n $update = array('minutia' => $each['timestamp']);\n\n if (isset($each['value'])) {\n $update['meta_value'] = $each['value'];\n }\n\n $update_where = array('id' => $each['id']);\n $vce->db->update('site_meta', $update, $update_where);\n\n return true;\n\n }\n // delete a cron_task\n if ($each['action'] == \"delete\" && isset($each['id'])) {\n\n // delete cron_task\n $where = array('id' => $each['id']);\n $vce->db->delete('site_meta', $where);\n\n return true;\n\n }\n\n }\n\n }\n\n return false;\n\n };\n\n }", "public function cronSet() {\n// de tim height, khi nao co height thi tiep tuc lay tu 2 https://blockchain.info/latestblock va thuc hien phep toan .\n//\n// neu thoa man thi update status = 1 trong bang hash_confirm va borrow = 1 status\n // check borrow the chap\n $listCheck = Hash::where('status', 0)->get();\n if(count($listCheck)) {\n foreach($listCheck as $ihash) {\n $keyHash = $ihash->hask;\n $baseUrl = 'https://blockchain.info/rawtx/';\n $getInfo = $baseUrl.$keyHash;\n $file = $getInfo;\n $file_headers = @get_headers($file);\n if(!$file_headers || $file_headers[0] == 'HTTP/1.1 404 Not Found' || $file_headers[0] == 'HTTP/1.1 500 Internal Server Error') {\n $exists = false;\n }\n else {\n $exists = true;\n }\n if ($exists) {\n $jsonInfo = file_get_contents($getInfo);\n $objInfo = json_decode($jsonInfo);\n $urlHeight = 'https://blockchain.info/latestblock';\n $jsonInfoHeight = file_get_contents($urlHeight);\n $objInfoHeight = json_decode($jsonInfoHeight);\n if ( ( ($objInfoHeight->height - $objInfo->block_height) + 1) > 2 ) {\n Hash::where('id', $ihash->id)->update(array('status'=>1));\n // update status ...\n Borrow::where('id', $ihash->dataId)->update(array('status'=>1));\n }\n }\n }\n }\n\n $data = date('Y-m-d');\n $time = date('h-A');\n \\Log::useFiles(base_path() . '/log/'.$data.'/'.$time.'-info.log', 'info');\n \\Log::info('Log content here ...');\n // http://localhost/lending/tlog\n }", "public static function cron()\n\t{\n\t\tzipabox::log( 'debug', \"Début de Mise à jour des commandes INFOS.\");\n\t\t$n = 0;\n\t\t$eqLogics = eqLogic::byType('zipabox');\n\t\tforeach ($eqLogics as $eqLogic)\n\t\t{\n\t\t\tif ($eqLogic->getIsEnable() == 0)\n\t\t\t{\n\t\t\t\tzipabox::log( 'debug', 'L\\'équipement zipabox ID ' . $eqLogic->getId() . ' ( ' . $eqLogic->getName() . ' ) est désactivé.');\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$zipabox_id = $eqLogic->getConfiguration('zipabox_id');\n\t\t\tforeach ($eqLogic->getCmd('info') as $cmd)\n\t\t\t{\n\t\t\t\t$uuid = $cmd->getConfiguration('uuid');\n\t\t\t\t$r = json_decode(zipabox::CallZipabox( $zipabox_id, 'attributes/' . $uuid . '?definition=true&value=true'), true);\n\t\t\t\tif (!is_array($r))\n\t\t\t\t{\n\t\t\t\t\tzipabox::log( 'debug', \"CRON,ATTRIBUTES,DEFINITION-1-La réponse de la Zipabox n'est pas conforme (not an array).\");\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (isset($r['value']))\n\t\t\t\t{\n\t\t\t\t\t$cmd->setCollectDate(date('Y-m-d H:i:s'));\n\t\t\t\t\t$cmd->event($r['value']['value']);\n\t\t\t\t\t$cmd->setConfiguration('value', $r['value']['value']);\n\t\t\t\t\t$cmd->save();\n\t\t\t\t\t$n++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tzipabox::log( 'debug', \"Fin de Mise à jour des commandes INFOS ( Nombre : \" . $n .\" ).\");\n\t}", "function _upgrade_cron_array($cron)\n {\n }", "function install_cron_scheduler() {\n\tglobal $amp_conf;\n\tglobal $nt;\n\n\t// crontab appears to return an error when no entries, os only fail if error returned AND a list of entries.\n\t// Don't know if this will ever happen, but a failure and a list could indicate something wrong.\n\t//\n\t$outlines = array();\n\texec(\"/usr/bin/crontab -l\", $outlines, $ret);\n\tif ($ret && count($outlines)) {\n\t\t$nt->add_error('retrieve_conf', 'CRONMGR', _(\"Failed to check crontab for cron manager\"), sprintf(_(\"crontab returned %s error code when checking for crontab entries to start freepbx-cron-scheduler.php crontab manager\"),$ret));\n\t} else {\n\t\t$nt->delete('retrieve_conf', 'CRONMGR');\n\t\t$outlines2 = preg_grep(\"/freepbx-cron-scheduler.php/\",$outlines);\n\t\t$cnt = count($outlines2);\n\t\tswitch ($cnt) {\n\t\t\tcase 0:\n\t\t\t\t/** grab any other cronjobs that are running as asterisk and NOT associated with backups\n \t\t\t\t* this code was taken from the backup module for the most part. But seems to work...\n \t\t\t\t*/\n\t\t\t\t$outlines = array();\n\t\t\t\texec(\"/usr/bin/crontab -l | grep -v ^#\\ DO\\ NOT | grep -v ^#\\ \\( | grep -v freepbx-cron-scheduler.php\", $outlines, $ret);\n\t\t\t\t$crontab_entry = \"\";\n\t\t\t\tforeach ($outlines as $line) {\n\t\t\t\t\t$crontab_entry .= $line.\"\\n\";\n\t\t\t\t}\n\t\t\t\t// schedule to run hourly, at a random time. The random time is explicit to accomodate things like module_admin online update checking\n\t\t\t\t// since we will want a random access to the server. In the case of module_admin, that will also be scheduled randomly within the hour\n\t\t\t\t// that it is to run\n\t\t\t\t//\n\t\t\t\t$crontab_entry .= rand(0,59).\" * * * * \".$amp_conf['AMPBIN'].\"/freepbx-cron-scheduler.php\";\n\t\t\t\tsystem(\"/bin/echo '$crontab_entry' | /usr/bin/crontab -\");\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\t// already running, nothing to do\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t// error, there should never be more than one running\n\t\t\t\techo \"TODO: deal with error here\\n\";\n\t\t\t\t$nt->add_error('retrieve_conf', 'CRONMGR', _(\"Multiple freepbx-cron-scheduler.php running\"), sprintf(_(\"There were %s freepbx-cron-scheduler.php instances running. There should be only 1.\"),$cnt));\n\t\t}\n\t}\n}", "function metarefresh_hook_cron(&$croninfo) {\n\tassert('is_array($croninfo)');\n\tassert('array_key_exists(\"summary\", $croninfo)');\n\tassert('array_key_exists(\"tag\", $croninfo)');\n\n\tSimpleSAML\\Logger::info('cron [metarefresh]: Running cron in cron tag [' . $croninfo['tag'] . '] ');\n\n\ttry {\n\t\t$config = SimpleSAML_Configuration::getInstance();\n\t\t$mconfig = SimpleSAML_Configuration::getOptionalConfig('config-metarefresh.php');\n\n\t\t$sets = $mconfig->getConfigList('sets', array());\n\t\t$stateFile = $config->getPathValue('datadir', 'data/') . 'metarefresh-state.php';\n\n\t\tforeach ($sets AS $setkey => $set) {\n\t\t\t// Only process sets where cron matches the current cron tag\n\t\t\t$cronTags = $set->getArray('cron');\n\t\t\tif (!in_array($croninfo['tag'], $cronTags, true)) continue;\n\n\t\t\tSimpleSAML\\Logger::info('cron [metarefresh]: Executing set [' . $setkey . ']');\n\n\t\t\t$expireAfter = $set->getInteger('expireAfter', NULL);\n\t\t\tif ($expireAfter !== NULL) {\n\t\t\t\t$expire = time() + $expireAfter;\n\t\t\t} else {\n\t\t\t\t$expire = NULL;\n\t\t\t}\n\n\t\t\t$outputDir = $set->getString('outputDir');\n\t\t\t$outputDir = $config->resolvePath($outputDir);\n\t\t\t$outputFormat = $set->getValueValidate('outputFormat', array('flatfile', 'serialize'), 'flatfile');\n\n\t\t\t$oldMetadataSrc = SimpleSAML_Metadata_MetaDataStorageSource::getSource(array(\n\t\t\t\t'type' => $outputFormat,\n\t\t\t\t'directory' => $outputDir,\n\t\t\t));\n\n\t\t\t$metaloader = new sspmod_metarefresh_MetaLoader($expire, $stateFile, $oldMetadataSrc);\n\n\t\t\t# Get global blacklist, whitelist and caching info\n\t\t\t$blacklist = $mconfig->getArray('blacklist', array());\n\t\t\t$whitelist = $mconfig->getArray('whitelist', array());\n\t\t\t$conditionalGET = $mconfig->getBoolean('conditionalGET', FALSE);\n\n\t\t\t// get global type filters\n\t\t\t$available_types = array(\n\t\t\t\t'saml20-idp-remote',\n\t\t\t\t'saml20-sp-remote',\n\t\t\t\t'shib13-idp-remote',\n\t\t\t\t'shib13-sp-remote',\n\t\t\t\t'attributeauthority-remote'\n\t\t\t);\n\t\t\t$set_types = $set->getArrayize('types', $available_types);\n\n\t\t\tforeach($set->getArray('sources') AS $source) {\n\n\t\t\t\t// filter metadata by type of entity\n\t\t\t\tif (isset($source['types'])) {\n\t\t\t\t\t$metaloader->setTypes($source['types']);\n\t\t\t\t} else {\n\t\t\t\t\t$metaloader->setTypes($set_types);\n\t\t\t\t}\n\n\t\t\t\t# Merge global and src specific blacklists\n\t\t\t\tif(isset($source['blacklist'])) {\n\t\t\t\t\t$source['blacklist'] = array_unique(array_merge($source['blacklist'], $blacklist));\n\t\t\t\t} else {\n\t\t\t\t\t$source['blacklist'] = $blacklist;\n\t\t\t\t}\n\n\t\t\t\t# Merge global and src specific whitelists\n\t\t\t\tif(isset($source['whitelist'])) {\n\t\t\t\t\t$source['whitelist'] = array_unique(array_merge($source['whitelist'], $whitelist));\n\t\t\t\t} else {\n\t\t\t\t\t$source['whitelist'] = $whitelist;\n\t\t\t\t}\n\n\t\t\t\t# Let src specific conditionalGET override global one\n\t\t\t\tif(!isset($source['conditionalGET'])) {\n\t\t\t\t\t$source['conditionalGET'] = $conditionalGET;\n\t\t\t\t}\n\n\t\t\t\tSimpleSAML\\Logger::debug('cron [metarefresh]: In set [' . $setkey . '] loading source [' . $source['src'] . ']');\n\t\t\t\t$metaloader->loadSource($source);\n\t\t\t}\n\n\t\t\t// Write state information back to disk\n\t\t\t$metaloader->writeState();\n\n\t\t\tswitch ($outputFormat) {\n\t\t\t\tcase 'flatfile':\n\t\t\t\t\t$metaloader->writeMetadataFiles($outputDir);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'serialize':\n\t\t\t\t\t$metaloader->writeMetadataSerialize($outputDir);\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif ($set->hasValue('arp')) {\n\t\t\t\t$arpconfig = SimpleSAML_Configuration::loadFromArray($set->getValue('arp'));\n\t\t\t\t$metaloader->writeARPfile($arpconfig);\n\t\t\t}\n\t\t}\n\n\t} catch (Exception $e) {\n\t\t$croninfo['summary'][] = 'Error during metarefresh: ' . $e->getMessage();\n\t}\n}", "private function _updateCronStats()\n\t{\n\t $this->load->model('tasks');\n\t $this->tasks->updateCronStats();\n\t}", "function _unschedule_cron( $hook ) {\n\t\tIMFORZA_Utils::unschedule_cron( $hook );\n\t}" ]
[ "0.7509266", "0.7335807", "0.7074098", "0.7074098", "0.68722135", "0.65738714", "0.6537081", "0.6522536", "0.64599377", "0.6453049", "0.6427951", "0.64113075", "0.6365154", "0.63514215", "0.6327963", "0.6315157", "0.629822", "0.62900054", "0.6288639", "0.62833124", "0.62413925", "0.62064976", "0.61649424", "0.61064357", "0.6097907", "0.6078411", "0.60627913", "0.60612375", "0.60612375", "0.605129", "0.60437804", "0.6033057", "0.6008176", "0.59548295", "0.59534764", "0.5943185", "0.5940205", "0.59223175", "0.5908289", "0.58999586", "0.58912337", "0.588692", "0.5884998", "0.588205", "0.5880374", "0.58773714", "0.5865054", "0.58640563", "0.58602136", "0.58551407", "0.58489275", "0.58453625", "0.582726", "0.5788687", "0.5782539", "0.5769558", "0.57677096", "0.5761082", "0.57530046", "0.57465357", "0.5744857", "0.5740183", "0.5738529", "0.57332057", "0.57329154", "0.5717201", "0.57151383", "0.56952596", "0.5684404", "0.5672733", "0.56436557", "0.564151", "0.5629434", "0.5611919", "0.56040764", "0.5586257", "0.55824137", "0.55807877", "0.556765", "0.5559159", "0.5551559", "0.55201614", "0.55188143", "0.55172557", "0.5495307", "0.5492642", "0.54748255", "0.5468965", "0.5455189", "0.5454751", "0.5447764", "0.5444468", "0.54429287", "0.5435974", "0.54309005", "0.54177177", "0.5400501", "0.5397239", "0.5395689", "0.5353824", "0.5353477" ]
0.0
-1
end func: on Add callback to fire for job
public function trigger($callback) { $this->callbacks[] = $callback; // Lazy evaluate return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function onEnd(): void;", "public function after_run(){}", "public function callback();", "public function onFinish() {\n\t\t$this->onResponse->executeAll(false);\n\t\tparent::onFinish();\n\t}", "public function onEventAdd()\n\t{\n\t\t$this->onTaskAdd();\n\t}", "public function after($callback)\n {\n $this->app['events']->listen(Events\\JobProcessed::class, $callback);\n }", "public function after($callback)\n {\n $this->app['events']->listen(Events\\JobProcessed::class, $callback);\n }", "function completeCallback()\r\n { }", "public function after_run() {}", "public function afterBatch();", "private function onCompletion()\n {\n }", "public function after($callback)\n {\n $this->app['events']->listen('custom.queue.after', $callback);\n }", "public function extProc_finish() {}", "public function extProc_finish() {}", "public function postEventadd();", "abstract protected function after();", "protected function afterAdd() {\n\t}", "abstract function after();", "function run_job()\r\n\t{\r\n\t}", "public function completed() {\n\t}", "public function postRemoveCallback()\n {\n $this->performPostRemoveCallback();\n }", "public function postRemoveCallback()\n {\n $this->performPostRemoveCallback();\n }", "public function onRequestComplete($callback) {\n $this->eventManager->attach('complete', $callback);\n }", "public function after_update() {}", "abstract protected function registerCallback();", "public function onSpeakersAdd()\n\t{\n\t\t$this->onTaskAdd();\n\t}", "function update_end()\n {\n }", "public function addNewJobOpo()\n {\n }", "public function postLoadCallback()\n {\n $this->performPostLoadCallback();\n }", "public function postLoadCallback()\n {\n $this->performPostLoadCallback();\n }", "function finish(){\r\n\t}", "public function finishJob()\r\n {\r\n $this->done = true;\r\n }", "public function postSaveCallback()\n {\n $this->performPostSaveCallback();\n }", "public function postSaveCallback()\n {\n $this->performPostSaveCallback();\n }", "function handle_callback() {\r\n }", "public function after($callback);", "public function onTicketsAdd()\n\t{\n\t\t$this->onTaskAdd();\n\t}", "function after_update() {}", "public function complete();", "public function complete();", "public function postEventDel();", "public function onAwardnominationsAdd()\n\t{\n\t\t$this->onTaskAdd();\n\t}", "protected function after(){}", "protected function after(){}", "protected function after(){}", "public function finish() {}", "public function finish() {}", "public function finish() {}", "public function finish() {}", "public function finish() {}", "public function finish() {}", "public function finish() {}", "public function finish() {}", "protected function finish() {}", "public function postUpdateCallback()\n {\n $this->performPostUpdateCallback();\n }", "public function postUpdateCallback()\n {\n $this->performPostUpdateCallback();\n }", "public function commitEvents();", "public function finish()\n\t{\n\t\t\n\t}", "public function _after_addon_load($name = NULL) {\n $this->after_addon_load($name);\n App::Module('Hook')->getHandler('Callback', 'after_addon_load', $name);\n }", "protected function _after()\n\t{\n\t\t\n\t}", "protected function _after()\n\t{\n\t\t\n\t}", "public function hook_after_add($id) { \n\t //Your code here\n\n\t }", "public function hook_after_add($id) { \n\t //Your code here\n\n\t }", "public function onAwardcategoriesAdd()\n\t{\n\t\t$this->onTaskAdd();\n\t}", "public abstract function afterExec();", "function PKG_addJob($client,$packageName,$priority,$params)\n{\n\tPKG_addStatusJob($client,$packageName,$priority,$params,\"waiting\");\n}", "public function active_callback()\n {\n }", "public function active_callback()\n {\n }", "public function active_callback()\n {\n }", "public function active_callback()\n {\n }", "public function active_callback()\n {\n }", "public function finish() {\r\n\t}", "function enqueue(){\n\t\t}", "public function finished()\n {\n }", "function OnAfterApply(){\n }", "function after_save() {}", "function after_create() {}", "public function onAfterSave();", "abstract protected function register_hook_callbacks();", "public function afterSaveCommit(): void\n {\n }", "public function onAfterDelete();", "public function end() {}", "public function end() {}", "public function end() {}", "public function postPersistCallback()\n {\n $this->performPostPersistCallback();\n }", "public function postPersistCallback()\n {\n $this->performPostPersistCallback();\n }", "public function onAfterDelete() {\r\n\t\tparent::onAfterDelete();\r\n\t\t$this->zlog('Delete');\r\n\t}", "public function after_delete() {}", "public function getAfterSendCallback(): array;", "public function hook_after($postdata,&$result) {\n\n\t\t }", "public function hook_after($postdata,&$result) {\n\n\t\t }", "public function add_callback($callback)\n {\n }", "function after_delete() {}", "public function after_insert() {}", "public function preRemoveCallback()\n {\n $this->performPreRemoveCallback();\n }", "public function preRemoveCallback()\n {\n $this->performPreRemoveCallback();\n }", "public function setOnOperationSubmit($callback)\n\t{\n\t\tif (!is_array($this->onOperationSubmit)) {\n\t\t\t$this->onOperationSubmit = array();\n\t\t}\n\t\t$this->onOperationSubmit[] = $callback;\n\t}", "public function done();", "function eventclass_Delected_Jobs()\n\t{\n\t\t$this->events[\"BeforeMoveNextList\"]=true;\n\n\n\t\t$this->events[\"AfterDelete\"]=true;\n\n\n//\tonscreen events\n\n\t}", "abstract public function register_hook_callbacks();", "public function onSlotsAdd()\n\t{\n\t\t$this->onTaskAdd();\n\t}" ]
[ "0.6754883", "0.65809137", "0.65297437", "0.64483464", "0.63377744", "0.6299356", "0.6299356", "0.62503904", "0.6242394", "0.62246776", "0.61952275", "0.6121663", "0.6069406", "0.6068362", "0.6016906", "0.59881735", "0.59823865", "0.59722036", "0.5926913", "0.59115016", "0.5899064", "0.5899064", "0.5897619", "0.58764714", "0.5869122", "0.5865665", "0.5859947", "0.5856209", "0.5845693", "0.5845693", "0.5832708", "0.58321875", "0.5818601", "0.5818601", "0.5811504", "0.5803261", "0.5800555", "0.57988524", "0.57908", "0.57908", "0.57864374", "0.5781704", "0.57779825", "0.57779825", "0.57779825", "0.5763827", "0.57636106", "0.57628083", "0.57628083", "0.57628083", "0.57628083", "0.57628083", "0.5762381", "0.5741403", "0.57300895", "0.57300895", "0.5699947", "0.5669689", "0.5639345", "0.56320655", "0.56320655", "0.56313074", "0.56313074", "0.56290704", "0.561276", "0.5604485", "0.55981266", "0.55981266", "0.55976015", "0.55975896", "0.55975896", "0.5597229", "0.55939424", "0.5592587", "0.55907625", "0.55821484", "0.5577767", "0.5575039", "0.55700046", "0.55554146", "0.55428797", "0.55280787", "0.55280787", "0.55280787", "0.5516968", "0.5516968", "0.550541", "0.5499591", "0.5497649", "0.54872465", "0.54872465", "0.5482153", "0.5476878", "0.54751223", "0.54672146", "0.54672146", "0.5463292", "0.5456212", "0.5454499", "0.5453441", "0.54472935" ]
0.0
-1
end func: trigger Determine if this Job is set to be run, if so, run it
public function run($time) { if(empty($this->formats) or empty($this->callbacks)) return false; if(!is_array($time)) $time = getdate($time); $should_run = false; foreach($this->formats as $format) { if(!$format->test($time)) continue; $should_run = true; break; } if(!$should_run) return false; foreach($this->callbacks as $callback) { if(!is_callable($callback)) continue; call_user_func($callback); } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function run_job()\r\n\t{\r\n\t}", "public function hasJob(): bool;", "public function run()\n {\n $this->_fnameFlagStop = dirname(__FILE__) . '/' . $this->getIndividualFilenameAsFlag();\n $this->checkIfShouldStopWork();\n\n $worker = Mage::getModel('myproject_gearman/worker'); // just a wrapper around PHP Gearman class\n\n $worker->addFunction($this->getJobName(), function (GearmanJob $job) {\n $this->_curJobObject = $job;\n $data = unserialize($job->workload());\n $this->processDataWrapper($data, $job);\n });\n\n $worker->addFunction($this->getIndividualFilenameAsFlag(), function (GearmanJob $job) {\n $this->log('Got job to exit. Job name: ' . $this->getIndividualFilenameAsFlag());\n $job->sendComplete('ok'); // without this line queue not cleans and task stay in this queue\n exit;\n });\n\n $worker->work();\n }", "protected function execJobNalWim() {\n\n $job_type = $this->_nalConf['job_type'];\n if( $job_type === neccsNal_Config::JOB_SCHEDULER ){\n $this->callJobScheduler();\n }else{\n $this->callJobCenterNalWim();\n }\n }", "private static function run\n\t(\n\t\t$id\t\t\t\t/* <int> The ID of the job you want to run. */,\n\t\t$reset = true\t/* <bool> TRUE to reset the job activation afterward, FALSE to not reset. */\n\t)\t\t\t\t\t/* RETURNS <bool> TRUE on success, FALSE on failure. */\n\t\n\t// Job::run($id)\n\t{\n\t\t// Retrieve the job\n\t\t$job = Database::selectOne(\"SELECT * FROM jobs WHERE id=? LIMIT 1\", array($id));\n\t\t\n\t\t// Activate the job\n\t\tJob::process($job);\n\t\t\n\t\t// Reset or remove jobs\n\t\tif($reset == true)\n\t\t{\n\t\t\tself::reset($job['id'], $job['nextActivation'], $job['runEveryXSeconds'], $job['startAt'], $job['endAt']);\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "function cemhub_cron_should_perform_job() {\n $last_cron_run_day = variable_get('cemhub_last_cron_run', date('Ymd', strtotime(\"yesterday\")));\n $current_day = date('Ymd');\n\n $is_in_scheduled_hour_range = (variable_get('cemhub_batch_run_time') == date('H', REQUEST_TIME));\n $hasnt_ran_today = ($last_cron_run_day < $current_day);\n\n $should_perform_job = ($is_in_scheduled_hour_range && $hasnt_ran_today);\n\n return $should_perform_job;\n}", "public function action() {\n $this->getSettings();\n if (!date_default_timezone_set($this->timezone)) {\n // invalid timezone\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__,\n sprintf(\"The timezone '%s' is invalid, please check the settings for kitCronjob!\", $this->timezone)));\n // set Europe/Berlin as timezone and continue the job.\n date_default_timezone_set('Europe/Berlin');\n }\n if (!$this->cronjob_active) {\n // the cronjob is not active, so terminate immediate!\n $this->log[self::LOG_STATUS] = self::STATUS_INACTIVE;\n $this->log[self::LOG_MESSAGE] = 'The cronjob is inactive and does not execute any job.';\n $this->writeLog();\n exit('OK');\n }\n if (!$this->checkCronjobKey()) {\n // the cronjob KEY is not set or invalid\n $this->log[self::LOG_STATUS] = self::STATUS_ERROR;\n $this->log[self::LOG_MESSAGE] = 'The cronjob.php was called without the parameter KEY or with a wrong passphrase for the KEY.';\n $this->writeLog();\n exit($this->getError());\n }\n // check the scheduled jobs\n $this->checkScheduledJobs();\n\n if (!$this->cronjob_executed) {\n // nothing to do - still quit\n $this->log[self::LOG_STATUS] = self::STATUS_OK;\n $this->log[self::LOG_MESSAGE] = 'Nothing to do.';\n $this->log[self::CRONJOB_ID] = -1;\n $this->log[self::CRONJOB_NAME] = '';\n $this->writeLog();\n }\n exit('OK');\n }", "public function work() {\n $this->model = ModelManager::getInstance()->getModel(QueueModel::NAME);\n\n do {\n $data = $this->model->popJobFromQueue($this->name);\n if ($data) {\n echo $this->name . ': Invoking job #' . $data->id . ' ... ';\n $dateReschedule = $this->invokeJob($data);\n\n if ($dateReschedule == -1) {\n echo \"error\\n\";\n } else {\n echo \"done\\n\";\n\n if (is_numeric($dateReschedule) && $dateReschedule > time()) {\n echo $this->name . ': Rescheduling job #' . $data->id . ' from ' . date('Y-m-d H:i:s', $dateReschedule) . \"\\n\";\n $queueModel->pushJobToQueue($data->job, $dateReschedule);\n }\n }\n } elseif (!$this->sleepTime) {\n echo $this->name . \": Nothing to be done and no sleep time. Exiting ...\\n\";\n break;\n }\n\n if ($this->sleepTime) {\n echo $this->name . ': Sleeping ' . $this->sleepTime . \" second(s)...\\n\";\n sleep($this->sleepTime);\n }\n } while (true);\n }", "public function work(Job $job);", "public function work(Job $job);", "public function executeJob()\n {\n // Fetch a job\n echo \"_\";\n $job = $this->queue\n ->watch('testtube')\n ->ignore('default')\n ->reserve();\n // Ensure we got a job.\n if ($job !== false) {\n // Extract job data.\n $jobData = json_decode($job->getData());\n \n switch ($jobData->Name) {\n case 'Wait':\n $result = $this->wait($jobData->Time);\n break;\n \n default:\n // Job definition unknown.\n break;\n }\n \n if (isset($result) && $result === true) {\n // Job succeeded. Remove it.\n $this->queue->delete($job);\n } else {\n // Job Failed. Bury it. \n $this->queue->bury($job);\n }\n }\n }", "private function check()\n {\n foreach ($this->scheduler->getQueuedJobs() as $job) {\n if ($job->isDue(new DateTime()) === true) {\n\n $this->executeIfNotOverlapped($job);\n }\n }\n }", "abstract public function makeJob();", "abstract public function makeJob();", "function tripal_jobs_check_running () {\n // iterate through each job that has not ended\n // and see if it is still running. If it is not\n // running but does not have an end_time then\n // set the end time and set the status to 'Error'\n $sql = \"SELECT * FROM {tripal_jobs} TJ \".\n \"WHERE TJ.end_time IS NULL and NOT TJ.start_time IS NULL \";\n $jobs = db_query($sql);\n while($job = db_fetch_object($jobs)){\n if($job->pid and posix_kill($job->pid, 0)) {\n // the job is still running so let it go\n\t\t // we return 1 to indicate that a job is running\n\t\t print \"Job is still running (pid $job->pid)\\n\";\n\t\t return 1;\n } else {\n\t // the job is not running so terminate it\n\t $record = new stdClass();\n $record->job_id = $job->job_id;\n\t $record->end_time = time();\n $record->status = 'Error';\n\t $record->error_msg = 'Job has terminated unexpectedly.';\n drupal_write_record('tripal_jobs',$record,'job_id');\n\t }\n }\n // return 1 to indicate that no jobs are currently running.\n return 0;\n}", "public function execute() {\n $sql = \"SELECT gcj_id_job\n FROM gems__comm_jobs\n WHERE gcj_active = 1\n ORDER BY gcj_id_order, \n CASE WHEN gcj_id_survey IS NULL THEN 1 ELSE 0 END,\n CASE WHEN gcj_round_description IS NULL THEN 1 ELSE 0 END,\n CASE WHEN gcj_id_track IS NULL THEN 1 ELSE 0 END,\n CASE WHEN gcj_id_organization IS NULL THEN 1 ELSE 0 END\";\n\n $jobs = $this->db->fetchAll($sql);\n\n if ($jobs) {\n $batch = $this->getBatch();\n foreach ($jobs as $job) {\n $batch->addTask('Mail\\\\ExecuteMailJobTask', $job['gcj_id_job']);\n }\n } else {\n $this->getBatch()->addMessage($this->_('Nothing to do, please create a mail job first.'));\n }\n }", "public function hasJob($name);", "protected function doJob()\n {\n $this->logInfo('Triggering an error.');\n trigger_error('Very nice! How much?');\n }", "public function execute() {\n\t\tContext::get()->setSourceType( 'job-runner' );\n\t\t// Get some defaults from configuration\n\t\t$basePath = 'maintenance/job-runner/';\n\n\t\t$consumer = new JobQueueConsumer(\n\t\t\t$this->getOption( 'queue' ),\n\t\t\t$this->getOptionOrConfig( 'time-limit', $basePath . 'time-limit' ),\n\t\t\t$this->getOptionOrConfig( 'max-messages', $basePath . 'message-limit' )\n\t\t);\n\n\t\t$startTime = time();\n\t\t$messageCount = $consumer->dequeueMessages();\n\n\t\t$successCount = $consumer->getSuccessCount();\n\t\t$elapsedTime = time() - $startTime;\n\t\tLogger::info(\n\t\t\t\"Processed $messageCount ($successCount successful) jobs in $elapsedTime seconds.\"\n\t\t);\n\t}", "public function run()\n\t{\n if($this->_config()->isLogEnabled()) {\n $this->_config()->dbLog(\"Cron [Triggered]\");\n }\n\n /**\n * This doesn't exist in 1.3.2!\n */\n $indexProcess = new Mage_Index_Model_Process();\n $indexProcess->setId(self::LOCK_INDEX_ID);\n if ($indexProcess->isLocked()) {\n // Check how old the lock is - unlock after 1hr\n if ($this->_lockIsOld(self::LOCK_INDEX_ID)) {\n $indexProcess->unlock();\n } else {\n $this->_config()->log('MAILUP: cron already running or locked');\n return false;\n }\n }\n $indexProcess->lockAndBlock();\n\n try {\n require_once dirname(__FILE__) . '/../Helper/Data.php';\n $db_read = Mage::getSingleton('core/resource')->getConnection('core_read');\n $db_write = Mage::getSingleton('core/resource')->getConnection('core_write');\n $syncTableName = Mage::getSingleton('core/resource')->getTableName('mailup/sync');\n $jobsTableName = Mage::getSingleton('core/resource')->getTableName('mailup/job');\n $lastsync = gmdate(\"Y-m-d H:i:s\");\n // reading customers (jobid == 0, their updates)\n $customer_entity_table_name = Mage::getSingleton('core/resource')->getTableName('customer_entity');\n\n /**\n * Now Handle Jobs we need to Sync, and all customers attached to each job\n */\n foreach(Mage::getModel('mailup/job')->fetchQueuedOrStartedJobsCollection() as $jobModel) {\n /* @var $jobModel MailUp_MailUpSync_Model_Job */\n $job = $jobModel->getData();\n\n $storeId = isset($job['store_id']) ? $job['store_id'] : NULL;\n\n // If job is auto-sync and cron is not enabled for the job's site, skip the job\n if ($jobModel->isAutoSync() && ! $this->_config()->isCronExportEnabled($storeId)) {\n $this->_config()->dbLog(\"Auto-Task skipped as auto-sync disabled for site\", $job[\"id\"], $storeId);\n continue;\n }\n\n $stmt = $db_write->query(\n \"UPDATE {$jobsTableName}\n SET status='started', start_datetime='\" . gmdate(\"Y-m-d H:i:s\") . \"'\n WHERE id={$job[\"id\"]}\"\n );\n $customers = array();\n $job['mailupNewGroup'] = 0;\n $job['mailupIdList'] = Mage::getStoreConfig('mailup_newsletter/mailup/list', $storeId);\n $job[\"mailupGroupId\"] = $job[\"mailupgroupid\"];\n $job[\"send_optin_email_to_new_subscribers\"] = $job[\"send_optin\"];\n\n // If group is 0 and there is a default group, set group to this group\n $defaultGroupId = Mage::getStoreConfig('mailup_newsletter/mailup/default_group');\n if ($job[\"mailupGroupId\"] == 0 && $defaultGroupId !== null) {\n $job[\"mailupGroupId\"] = $defaultGroupId;\n }\n\n $tmp = Mage::getSingleton('mailup/source_lists');\n $tmp = $tmp->toOptionArray($storeId); // pass store id!\n foreach ($tmp as $t) {\n if ($t[\"value\"] == $job['mailupIdList']) {\n $job['mailupListGUID'] = $t[\"guid\"];\n $job[\"groups\"] = $t[\"groups\"];\n break;\n }\n }\n unset($tmp);\n unset($t);\n $stmt = $db_read->query(\"\n SELECT ms.*, ce.email\n FROM {$syncTableName} ms\n JOIN $customer_entity_table_name ce\n ON (ms.customer_id = ce.entity_id)\n WHERE ms.needs_sync=1\n AND ms.entity='customer'\n AND job_id={$job[\"id\"]}\"\n );\n while ($row = $stmt->fetch()) {\n $customers[] = $row[\"customer_id\"];\n }\n /**\n * Send the Data!\n */\n $returnCode = MailUp_MailUpSync_Helper_Data::generateAndSendCustomers($customers, $job, $storeId);\n /**\n * Check return OK\n */\n if($returnCode === 0) {\n $customerCount = count($customers);\n $db_write->query(\"\n UPDATE {$syncTableName} SET needs_sync=0, last_sync='$lastsync'\n WHERE job_id = {$job[\"id\"]}\n AND entity='customer'\"\n );\n $this->_config()->dbLog(\"Job Task [update] [Synced] [customer count:{$customerCount}]\", $job[\"id\"], $storeId);\n // finishing the job also\n $db_write->query(\"\n UPDATE {$jobsTableName} SET status='finished', finish_datetime='\" . gmdate(\"Y-m-d H:i:s\") . \"'\n WHERE id={$job[\"id\"]}\"\n );\n $this->_config()->dbLog(\"Jobs [Update] [Complete] [{$job[\"id\"]}]\", $job[\"id\"], $storeId);\n }\n /**\n * Only successfull if we get 0 back. False is also a fail.\n */\n else {\n $stmt = $db_write->query(\n \"UPDATE {$jobsTableName} SET status='queued' WHERE id={$job[\"id\"]}\"\n );\n if($this->_config()->isLogEnabled()) {\n $this->_config()->dbLog(sprintf(\"generateAndSendCustomers [ReturnCode] [ERROR] [%d]\", $returnCode), $job[\"id\"], $storeId);\n }\n }\n }\n } catch (Exception $e) {\n // In case of otherwise uncaught error, unlock and re-throw\n $indexProcess->unlock();\n throw $e;\n }\n\n $indexProcess->unlock();\n \n if ($this->_config()->isLogEnabled()) {\n $this->_config()->dbLog(\"Cron [Completed]\");\n }\n\t}", "public function start()\n {\n if (!property_exists($this->options, 'currentJob') || $this->options->currentJob === null) {\n $this->log(\"Cloning job finished\");\n return true;\n }\n\n $methodName = \"job\" . ucwords($this->options->currentJob);\n\n if (!method_exists($this, $methodName)) {\n $this->log(\"Can't execute job; Job's method {$methodName} is not found\");\n throw new JobNotFoundException($methodName);\n }\n\n if ($this->options->databasePrefix === $this->db->prefix && $this->enteredDatabaseSameAsLiveDatabase()) {\n $this->returnException('Entered table prefix for staging and production database can not be identical! Please start over and change the table prefix.');\n }\n\n // Call the job\n return $this->{$methodName}();\n }", "public function run() {\n $job_list = $this->find_all_jobs();\n $jobby = new \\Jobby\\Jobby();\n\n $this->register_tasks( $jobby, $job_list );\n return $jobby->run();\n }", "protected function checkScheduledJobs() {\n global $database;\n // first get all active cronjobs\n $SQL = sprintf(\"SELECT * FROM %smod_kit_cj_cronjob WHERE `cronjob_status`='ACTIVE'\", TABLE_PREFIX);\n if (null ===($result = $database->query($SQL))) {\n $this->setError(sprintf('[%s _ %s] %s', __METHOD__, __LINE__, $database->get_error()));\n exit($this->getError());\n }\n $cronjobs = array();\n while (false !== ($job = $result->fetchRow(MYSQL_ASSOC))) {\n $cronjobs[$job['cronjob_id']] = $job;\n }\n foreach ($cronjobs as $cronjob) {\n $this->log[self::CRONJOB_ID] = $cronjob['cronjob_id'];\n $this->log[self::CRONJOB_NAME] = $cronjob['cronjob_name'];\n if ($cronjob['cronjob_next_run'] == '0000-00-00 00:00:00') {\n // this cronjob was never executed...\n $cronjob['cronjob_next_run'] = $this->calculateNextRun($cronjob);\n $cronjob['cronjob_last_status'] = 'First call, calculate the next regular run of this cronjob.';\n $cronjob['cronjob_last_run'] = date('Y-m-d H:i:s');\n $this->updateCronjob($cronjob);\n $this->log[self::LOG_MESSAGE] = 'First call, calculate the next regular run of this cronjob.';\n $this->log[self::LOG_STATUS] = self::STATUS_OK;\n $this->log[self::CRONJOB_RUN] = $cronjob['cronjob_last_run'];\n $this->log[self::CRONJOB_STATUS] = 'OK';\n $this->writeLog();\n }\n if (strtotime($cronjob['cronjob_next_run']) < time()) {\n // execute this cronjob\n if (false !== strpos($cronjob['cronjob_command'], LEPTON_URL)) {\n $cronjob['cronjob_command'] = substr($cronjob['cronjob_command'], strlen(LEPTON_URL));\n }\n if (false !== strpos($cronjob['cronjob_command'], LEPTON_PATH)) {\n $cronjob['cronjob_command'] = substr($cronjob['cronjob_command'], strlen(LEPTON_PATH));\n }\n if (strpos($cronjob['cronjob_command'], DIRECTORY_SEPARATOR) == 0) {\n $cronjob['cronjob_command'] = substr($cronjob['cronjob_command'], 1);\n }\n $execute = LEPTON_PATH.DIRECTORY_SEPARATOR.$cronjob['cronjob_command'];\n if (!file_exists($execute)) {\n // write the error to the log but continue with the next cronjob.\n $this->setError(sprintf('The relative path %s does not exists, please check the settings for this cronjob!', $cronjob['cronjob_command']));\n continue;\n }\n if (false === ($result = exec(sprintf(\"%s %s\", $this->php_exec, $execute)))) {\n // error executing - write log and continue\n $this->setError(sprintf('Error executing %s - no more informations available.', $cronjob['cronjob_command']));\n continue;\n }\n $this->log[self::LOG_MESSAGE] = $result;\n $this->log[self::LOG_STATUS] = self::STATUS_OK;\n $this->log[self::CRONJOB_RUN] = date('Y-m-d H:i:s');\n $this->log[self::CRONJOB_STATUS] = 'OK';\n $this->writeLog();\n $cronjob['cronjob_last_run'] = $this->log[self::CRONJOB_RUN];\n $cronjob['cronjob_last_status'] = $result;\n $cronjob['cronjob_next_run'] = $this->calculateNextRun($cronjob);\n $this->updateCronjob($cronjob);\n $this->cronjob_executed = true;\n }\n }\n }", "public function run()\n {\n $handler = $this->getHandler();\n if (!is_object($handler) || !method_exists($handler, 'perform')) {\n $msg = \"[JOB] bad handler for job::{$this->id}\";\n $this->finishWithError($msg, false);\n return false;\n }\n # run the handler\n try {\n $handler->perform();\n # cleanup\n $this->finish();\n return true;\n } catch (RetryException $e) {\n # attempts hasn't been incremented yet.\n $attempts = $this->getAttempts() + 1;\n\n $msg = \"Caught DJRetryException \\\"{$e->getMessage()}\\\" on attempt $attempts/{$this->maxAttempts}.\";\n\n if ($attempts >= $this->maxAttempts) {\n $msg = \"[JOB] job::{$this->id} $msg Giving up.\";\n $this->finishWithError($msg);\n } else {\n $this->logJob(\"[JOB] job::{$this->id} $msg Try again in {$e->getDelay()} seconds.\", self::WARN);\n $this->retryLater($e->getDelay());\n }\n return false;\n } catch (Exception $e) {\n $this->finishWithError($e->getMessage(), $handler);\n return false;\n }\n }", "public function finishJob()\r\n {\r\n $this->done = true;\r\n }", "public function needsExecution() {}", "public function needsExecution() {}", "public function needsExecution() {}", "public function needsExecution() {}", "public function needsExecution() {}", "public function processJOb() {\n \t\t//update staus for cron job to processed when done or error if erored out \n \t}", "protected function setLastJobAsActive(){\n\t\t$this->setProjectJob(end($this->getProject()->jobs));\n\t}", "public function run()\n {\n $this->setStatus(Job::STATUS_RUNNING);\n\n $this->redis->zadd(Queue::redisKey($this->queue, 'running'), time(), $this->payload);\n Stats::incr('running', 1);\n Stats::incr('running', 1, Queue::redisKey($this->queue, 'stats'));\n\n Event::fire(Event::JOB_RUNNING, $this);\n }", "public function execute()\n {\n // $GLOBALS['BE_USER']->simplelog('Scheduler started: '.date('Y-m-d h:i:s'), ST9FISSYNC_EXTKEY);\n // use own logger here too\n\n tx_st9fissync::getInstance()->getSyncProcessHandle()->launch();\n\n //\t$GLOBALS['BE_USER']->simplelog('Scheduler ended: '.date('Y-m-d h:i:s'), ST9FISSYNC_EXTKEY);\n // use own logger here too\n return TRUE;\n }", "public function testJobEnable()\n {\n\n }", "public function isExecuted() {}", "public function run(){\n $explorers = $this->job_service->getUnfinishedJobs();\n\n // Recorro todos los trabajadores\n foreach ($explorers as $explorer){\n // Compruebo el trabajo pendiente del explorador\n $job = $this->job_service->checkJob($explorer->get('id_job'));\n\n // Si el trabajo ya ha terminado\n if ($job->getStatus()==jobService::STATUS_FINISHED){\n // Le quito el trabajo pendiente al explorador\n $explorer->set('id_job',null);\n $explorer->save();\n\n $job->jobDone();\n }\n }\n }", "public function isJobReadyToBeExecuted(QueueControl $job)\n {\n $children = $job->getChildren();\n\n echo 'I have '.count($children).' children'.PHP_EOL;\n\n if (empty($children)) {\n return true;\n }\n\n foreach ($children as $childJob) {\n $childStatus = $childJob->getQueueStatus()->getId();\n echo 'My child status is '.$childStatus.PHP_EOL;\n\n if (!in_array($childStatus, array(self::STATUS_COMPLETED, self::STATUS_FAILED, self::STATUS_NEW))) {\n //Forced to query DB again by dea\n $this->entityManager->detach($job);\n echo 'Still have incompleted jobs '.$childStatus.PHP_EOL;\n return false;\n }\n }\n\n return true;\n\n\n\n }", "function check(){\n\techo \"Looking for jobs and adding to queue\\n\";\n\t\n\t$times = date('d-M-Y');\n\tif(DEBUG) $qlog = new snowytech\\stphplogger\\logWriter('../logs/check-queue-' . $times . '.txt');\n\t$check = new snowytech\\stphpschedule\\schedule();\n\t//Goes through whole Jobs table and checks interval!\t\n\t$db = db::getInstance();\n\t$sql = \"SELECT * FROM JOBS\";\n\t$stmt = $db->getData($sql);\n\n\t//Count the rows and send console message there are no jobs configured.\n\tif ( count($stmt) > 0) {\n\t\tforeach($stmt as $row){\n\t\t\t$id = $row['id'];\n\t\t\t$job_name = $row['name'];\n\t\t\t$path = $row['path'];\n\t\t\t$in_queue = $row['status_int'];\n\t\t\t$lastrun = $row['last_run'];\n\t\t\t$interval = $row['interval'];\n\t\t\t$global_hold = $row['global_hold'];\n\t\t\t\n\t\t\t$r = $check->interval($lastrun, $interval);\n\t\t\t\n\t\t\t//Dont run if global hold is set to 1\n\t\t\tif($global_hold !=1){\n\t\t\t\t//Dont run if $in_queue = 0 ( already in queue )\n\t\t\t\tif($in_queue != 0){\n\t\t\t\t\tif( $r ) {\n\t\t\t\t\t\techo \"Job hit the queue: \" . $job_name . \"\\n\";\n\t\t\t\t\t\t$count = time();\n\t\t\t\t\t\techo $count . \"\\n\";\n\t\t\t\t\t\tif(DEBUG) $qlog->info('Job hit the queue: ' . $job_name . \" : time: \" . $count);\n\t\t\t\t\t\t \n\t\t\t\t\t\t//Now last update is updating in table. Need to add an entry to the QUE and update last run from there.\t\t\t\t\n\t\t\t\t\t\t$data = array(':jid' => $id, ':path' => $path, ':hold' => '1', ':time' => $count);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//Add into QUEUE\n\t\t\t\t\t\t$sql= 'INSERT INTO QUEUE (job_id, path, hold, in_que_time) VALUES (:jid,:path,:hold,:time)';\n\t\t\t\t\t\t$db->execQuery($sql, $data);\n\n\t\t\t\t\t\t//update status_int, prevents multiple entries into queue\n\t\t\t\t\t\t$sql= \"UPDATE JOBS SET status_int = 0 WHERE id = '$id'\";\n\t\t\t\t\t\t$db->updateData($sql);\n\t\t\t\t\t}else{ \n\t\t\t\t\t\techo \"NOT ready to run - \" . $job_name . \"\\n\"; \n\t\t\t\t\t\t//Log that its intervnal is not ready\n\t\t\t\t\t\tif(DEBUG) $qlog->info('NOT RUN - interval is ' . $interval . \" minutes on JOB: \" . $job_name . \"\\n\");\n\t\t\t\t\t}\n\t\t\t\t} else { \n\t\t\t\t\techo \"JOB \" . $job_name . \" - already in QUEUE!\\n\"; \n\t\t\t\t\tif(DEBUG) $qlog->info('JOB ' . $job_name . \" - already in QUEUE!\");\n\t\t\t\t}\n\t\t\t} else { \n\t\t\t\techo \"JOB \" . $job_name . \" is HELD globally!\\n\";\n\t\t\t\tif(DEBUG) $qlog->info(\"JOB \" . $job_name . \" is HELD globally!\\n\");\n\t\t\t}\n\t\t}\n\t} else { echo \"There are no JOBS configured!\"; }\n\t$db->closeDB();\n}", "public static function runQueue (\n\t)\t\t\t/* RETURNS <bool> TRUE on success, FALSE on failure. */\n\t\n\t// Job::runQueue()\n\t{\n\t\t// Retrieve the next jobs in the list\n\t\t$jobList = Database::selectMultiple(\"SELECT * FROM jobs WHERE nextActivation < ?\", array(time()));\n\t\t\n\t\t// Cycle through the jobs provided\n\t\tforeach($jobList as $job)\n\t\t{\n\t\t\t// Run the job\n\t\t\tJob::process($job);\n\t\t\t\n\t\t\t// Reset or remove jobs\n\t\t\tself::reset($job['id'], $job['nextActivation'], $job['runEveryXSeconds'], $job['startAt'], $job['endAt']);\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "protected function completeJob() {\n\t\t$this->isComplete = 1;\n\t\t$nextgeneration = new CheckExternalLinksJob();\n\t\tsingleton('QueuedJobService')->queueJob($nextgeneration,\n\t\t\tdate('Y-m-d H:i:s', time() + self::$regenerate_time));\n\t}", "function action_runjobs() {\n global $CFG;\n\n //need the code that defines the scheduled export behaviour\n require_once($CFG->dirroot . '/blocks/php_report/runschedule.php');\n\n $scheduleids = array();\n if ($data = data_submitted()) {\n foreach ($data as $key => $value) {\n if (strpos($key, 'schedule_') === 0) {\n $scheduleid = (int)substr($key, strlen('schedule_'));\n if ($this->can_do_schedule_action($scheduleid)) {\n $scheduleids[] = $scheduleid;\n }\n }\n }\n }\n\n //re-display the list of scheduled jobs for this report\n $this->action_listinstancejobs();\n\n if (count($scheduleids) > 0) {\n //include the necessary javascript libraries for the ASYNC request stuff\n require_js(array('yui_yahoo', 'yui_event'));\n\n //one or more schedules selected, so open the popup to run them\n echo '<script type=\"text/javascript\">\n YAHOO.util.Event.onDOMReady(function() {\n openpopup(\\'/blocks/php_report/lib/run_schedule_popup.php?scheduleids=' . urlencode(json_encode($scheduleids)) . '\\', \\'runjobsnow\\', \\'menubar=0,location=0,scrollbars,status,resizable,width=400,height=500\\', 0);\n });\n </script>';\n }\n }", "public function hasJobs()\n {\n if($this->numJobs() > 0)\n {\n return true;\n }\n return false;\n }", "protected function workJob($job, $data)\n {\n if (!isset($data['uid'])) {\n $job->failJob('No uid found.');\n return false;\n }\n\n // mass update\n $newData = $data;\n if (isset($newData['entire'])) {\n unset($newData['entire']);\n }\n\n try {\n $this->runUpdate($data);\n } catch (Exception $e) {\n $job->failJob($e->getMessage());\n return false;\n }\n\n $job->succeedJob('All records processed for this chunk.');\n\n return true;\n }", "public function run() {\n // Run until we break\n while (true) {\n $i++;\n $job = $this->fetch();\n\n // Break if there are no jobs to run\n if (!$job) {\n break;\n }\n\n $this->info($job->getRequestID().' - running job'); \n $result = $job->run();\n \n // Log any errors we hit and run the next\n if (!$result || !$result['success']) {\n $this->alert($job->getRequestID().' - error running job');\n\n continue;\n }\n\n $this->info($job->getRequestID().' - successfully completed job');\n }\n }", "public function gearmanRunOnceBeforeExit()\n {\n echo \"i am handling signal!\\n\";\n if (!isset($this->_app)) {\n $this->_app = CApp::getApp();\n }\n// var_dump($this->sub_process_keys);\n foreach ($this->sub_process_keys as $_k => $_subProcessKey) {\n $workeName = $this->_gearmanFuncNamePre.\"_\".$_subProcessKey;\n $this->_app->logger->log(\"i am worker {$workeName},i am tring to run last worker before exit\", \"NOTICE\");\n $dataDir = $this->_app->systemDataDir;\n $workingJobsDir = $dataDir.DIRECTORY_SEPARATOR.self::WORKING_JOBS_DIRNANE;\n if (!file_exists($workingJobsDir)) {\n mkdir($workingJobsDir);\n }\n $registerFuncName = $this->_gearmanFuncNamePre.\"_\".$_subProcessKey;\n $workingJobFile = $workingJobsDir.DIRECTORY_SEPARATOR.$registerFuncName;\n var_dump($workingJobFile);\n if (!file_exists($workingJobFile)) {\n $this->_app->logger->log(\"i am worker {$workeName},i am not working when i am nicely killed\", \"NOTICE\");\n // when job isn't running kill the working process\n posix_kill($this->_forkedPids[$_k], SIGKILL);\n } \n else {\n echo \"the worker $workeName is running\\n\";\n }\n }\n }", "public function runInCron(): void\n {\n $result = $this->run();\n\n if ($result->getStatus() !== true) {\n do_action(Hooks::ADVANCED_CHECK_ALERT, $this, $result);\n }\n }", "public function maybeSchedule() {\n\t\t$scheduledTimestamp = wp_next_scheduled(static::$cronHook);\n\t\tif( !$scheduledTimestamp ) {\n\t\t\t$this->schedule();\n\t\t\treturn;\n\t\t}\n\n\t\t$cronJobs = _get_cron_array();\n\t\t$job = $cronJobs[$scheduledTimestamp][static::$cronHook];\n\n\t\t//If the schedule doesn't match, reschedule\n\t\tif( $job['schedule'] !== $this->get_option('schedule') ) {\n\t\t\t$this->unschedule();\n\t\t\t$this->schedule();\n\t\t}\n\t}", "protected function shouldExecute()\n {\n return !$this->job->isDryRun() || $this->get('executeInPreview');\n }", "function tripal_jobs_launch ($do_parallel = 0){\n \n // first check if any jobs are currently running\n // if they are, don't continue, we don't want to have\n // more than one job script running at a time\n if(!$do_parallel and tripal_jobs_check_running()){\n return;\n }\n \n // get all jobs that have not started and order them such that\n // they are processed in a FIFO manner. \n $sql = \"SELECT * FROM {tripal_jobs} TJ \".\n \"WHERE TJ.start_time IS NULL and TJ.end_time IS NULL \".\n \"ORDER BY priority ASC,job_id ASC\";\n $job_res = db_query($sql);\n while($job = db_fetch_object($job_res)){\n\n\t\t// set the start time for this job\n\t\t$record = new stdClass();\n\t\t$record->job_id = $job->job_id;\n\t\t$record->start_time = time();\n\t\t$record->status = 'Running';\n\t\t$record->pid = getmypid();\n\t\tdrupal_write_record('tripal_jobs',$record,'job_id');\n\n\t\t// call the function provided in the callback column.\n\t\t// Add the job_id as the last item in the list of arguments. All\n\t\t// callback functions should support this argument.\n\t\t$callback = $job->callback;\n\t\t$args = split(\"::\",$job->arguments);\n\t\t$args[] = $job->job_id;\n\t\tprint \"Calling: $callback(\" . implode(\", \",$args) . \")\\n\"; \n\t\tcall_user_func_array($callback,$args);\n\t\t\n\t\t// set the end time for this job\n\t\t$record->end_time = time();\n\t\t$record->status = 'Completed';\n\t\t$record->progress = '100';\n\t\tdrupal_write_record('tripal_jobs',$record,'job_id');\n\t\t\n\t\t// send an email to the user advising that the job has finished\n }\n}", "function isExecuted() ;", "public function isExecuted() {\n return $this->state->getCode() == TaskState::Executed;\n }", "public function run($data)\n {\n /*\n - type:init\n - perform filter to get all records to be updated, including id\n - create child jobs (type=work), each job has up to $this->chunkSize records\n - type:work\n - do update/delete\n */\n\n $data = json_decode(from_html($data), true);\n\n if (empty($data) || !is_array($data) || empty($data['_jobType_'])) {\n $this->job->failJob('Invalid job data.');\n return false;\n }\n\n switch ($data['_jobType_'])\n {\n // this is the parent job, find out all the records to be updated and create child jobs\n case 'init':\n\n // if uid is already provided, use them\n if (isset($data['uid'])) {\n if (!is_array($data['uid'])) {\n $data['uid'] = explode(',', $data['uid']);\n }\n\n $uidChunks = array_chunk($data['uid'], $this->chunkSize);\n foreach ($uidChunks as $chunk) {\n $tmpData = $data;\n $tmpData['uid'] = $chunk;\n $this->workJobIds[] = $this->createJobQueueConsumer($tmpData, 'work');\n }\n }\n // if updating entire list, use filter\n else if (!empty($data['entire'])) {\n // call filter api to get the ids then create a job queue for each chunk\n $filterApi = new FilterApi();\n $api = new RestService();\n $api->user = $GLOBALS['current_user'];\n $nextOffset = 0;\n $filterArgs = array('module'=>$data['module'], 'fields'=>'id');\n if (isset($data['filter'])) {\n $filterArgs['filter'] = $data['filter'];\n }\n $uidArray = array();\n\n // max_num does not need to set to chunkSize, it can be any size that makes sense\n $filterArgs['max_num'] = $this->chunkSize;\n\n // start getting all the ids\n while ($nextOffset != -1) { // still have records to be fetched\n $filterArgs['offset'] = $nextOffset;\n $result = $filterApi->filterList($api, $filterArgs);\n $nextOffset = $result['next_offset'];\n foreach ($result['records'] as $record) {\n if (!empty($record['id'])) {\n $uidArray[] = $record['id'];\n }\n }\n // create one child job for each chunk\n if (count($uidArray)) {\n $uidChunks = array_chunk($uidArray, $this->chunkSize);\n foreach ($uidChunks as $chunk) {\n $tmpData = $data;\n $tmpData['uid'] = $chunk;\n $this->workJobIds[] = $this->createJobQueueConsumer($tmpData, 'work');\n }\n }\n }\n } else {\n $this->job->failJob('Neither uid nor entire specified.');\n return false;\n }\n\n $this->job->succeedJob('Child jobs created.');\n\n // return the ids of the child jobs that have been created\n return $this->workJobIds;\n\n // this is the child job, do update\n case 'work':\n return $this->workJob($this->job, $data);\n\n default:\n break;\n }\n\n return true;\n }", "private static function process\n\t(\n\t\t$jobData\t\t/* <array> The job array. */\n\t)\t\t\t\t\t/* RETURNS <bool> TRUE on success, FALSE on failure. */\n\t\n\t// Job::process($jobData)\n\t{\n\t\t// Process the Job\n\t\tif(isset($jobData['class']) && isset($jobData['method']))\n\t\t{\n\t\t\tif(class_exists($jobData['class']) && method_exists($jobData['class'], $jobData['method']))\n\t\t\t{\n\t\t\t\techo \"Job Processed\";\n\t\t\t\tvar_dump($jobData);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "static function jobs() {\n\t\tif(self::doCron()):\n\t\t\n\t\twhile(!Db::lock());\n\n\t\tReminder::cron();\n\t\t\n\t\t$ctrl = new Cronjob();\n\t\t$ctrl->checkBookings();\n\t\t$ctrl->cancelPending();\n\t\t$ctrl->unattended();\n\t\t\n\t\twhile(!Db::unlock());\n\t\t\n\t\tPreferences::set('lastCron', date(\"H:i:s\"));\n\t\t_debug(\"CRON JOBS DONE!\");\n\t\tendif;\n\t}", "private function Should_Run_Task() {\n\t\t$rules = $this->Get_Business_Rules();\n\t\t\n\t\t$time = time();\n\t\t$today = date('Y-m-d', $time);\n\t\t$named_day = date('l', $time);\n\t\t\n\t\t// Cheating.. If the rule is set to NULL we're cheating\n\t\t// and not creating a business rule for it, so just run it.\n\t\tif(is_null($this->business_rule_name))\n\t\t{\n\t\t\t$this->Get_Server()->log->Write(\"Developer was lazy and didn't create a business rule! Running task anyways..\");\n\t\t\treturn TRUE;\n\t\t}\n\t\t\n\t\tif(! isset($rules[$this->business_rule_name]))\n\t\t{\n\t\t\t$this->Get_Server()->log->Write(\"Can't find business rule name: {$this->business_rule_name}\");\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t$days = $rules[$this->business_rule_name];\n\n\t\t//[#44294] check 'day_special' rule (overrides day of week & holidays)\n\t\tif(isset($days['Special Days']))\n\t\t{\n\t\t\t$special_days = explode(',', $days['Special Days']);\t\n\t\t\tforeach($special_days as $special_day)\n\t\t\t{\n\t\t\t\tswitch($special_day)\n\t\t\t\t{\n\t\t\t\t\tcase 'last of month':\t\t\t\t\t\t\n\t\t\t\t\t\tif(date('t', $time) == date('j', $time))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->Get_Server()->log->Write(\"Running task for special day 'last of month'\");\n\t\t\t\t\t\t\treturn TRUE;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (strtolower($days[$named_day]) == 'yes') \n\t\t{\n\t\t\tif (strtolower($days['Holidays']) == 'no') \n\t\t\t{\n\t\t\t\t$holidays = Fetch_Holiday_List();\n\t\t\t\t$check_day = strtotime(\"+1 day\", $today);\n\t\t\t\tif (in_array($check_day, $holidays)) \n\t\t\t\t{\n\t\t\t\t\treturn FALSE;\n\t\t\t\t} \n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\treturn TRUE;\n\t\t\t\t}\n\t\t\t} \n\t\t\telse \n\t\t\t{\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t} \n\t\telse \n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function startNextJob()\n {\n $jobModel = Mage::getModel('mailup/job');\n /* @var $jobModel MailUp_MailUpSync_Model_Job */\n foreach($jobModel->fetchQueuedJobsCollection() as $job) {\n /* @var $job MailUp_MailUpSync_Model_Job */\n \n /**\n * Try and Start it... if it fails, we can try the next one!\n */\n }\n }", "public function run()\n {\n DB::table('job_service')->insert([\n 'jobId' => 1,\n 'serviceId' => 1,\n 'isActive' => 1,\n 'isComplete' => 1,\n 'isVoid' => 0,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n \n DB::table('job_service')->insert([\n 'jobId' => 2,\n 'serviceId' => 1,\n 'isActive' => 1,\n 'isComplete' => 1,\n 'isVoid' => 0,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n }", "function needsExecution() ;", "public function isExecutionRunning() {}", "public function fire()\n\t{\n\n App\\Lib\\CronHelper::before_cronrun($this->name, $this );\n\n\n $arguments = $this->argument();\n $getmypid = getmypid(); // get proccess id\n $CronJobID = $arguments[\"CronJobID\"];\n $CompanyID = $arguments[\"CompanyID\"];\n $CronJob = CronJob::find($CronJobID);\n $cronsetting = json_decode($CronJob->Settings,true);\n $dataactive['Active'] = 1;\n $dataactive['PID'] = $getmypid;\n $dataactive['LastRunTime'] = date('Y-m-d H:i:00');\n $CronJob->update($dataactive);\n Log::useFiles(storage_path().'/logs/pendingduesheet-'.$CronJobID.'-'.date('Y-m-d').'.log');\n\n $WEBURL = App\\Lib\\CompanyConfiguration::getValueConfigurationByKey($CompanyID,'WEB_URL');\n\n DB::beginTransaction();\n $joblogdata = array();\n $joblogdata['CronJobID'] = $CronJobID;\n $joblogdata['created_at'] = date('Y-m-d H:i:s');\n $joblogdata['created_by'] = 'RMScheduler';\n $forceelse = false;\n\n try {\n CronJob::createLog($CronJobID);\n\n //$CompanyDueSheetEmail = Company::select('DueSheetEmail','CompanyName')->where(\"CompanyID\", '=', $CompanyID)->first();\n $query = \"CALL prc_GetRecentDueSheetCronJob(\" . $CompanyID . \")\";\n\n $result = DataTableSql::of($query)->getProcResult(array('VendorCustomerPending'));\n $dueSheetVendorCustomer = $result['data']['VendorCustomerPending'];\n $temp = array('WEBURL'=>$WEBURL);\n if(count($dueSheetVendorCustomer)>0){\n foreach($dueSheetVendorCustomer as $key=>$row){\n $temp[] = array('AccountID'=>$row->AccountID,'AccountName'=>$row->AccountName,'Trunk'=>$row->Trunk,'EffectiveDate'=>$row->EffectiveDate,'DAYSDIFF'=>$row->DAYSDIFF,'type'=>$row->type);\n }\n\n $ComanyName = Company::getName($CompanyID);\n /*$emailAddress =$CompanyDueSheetEmail->DueSheetEmail;\n $emailToName = $CompanyDueSheetEmail->CompanyName;*/\n\n if(!empty($cronsetting['SuccessEmail'])) {\n $emailAddress = $cronsetting['SuccessEmail'];\n $emailToName = $ComanyName;\n $data['EmailTo'] = explode(',', $emailAddress);\n $data['EmailToName'] = $emailToName;\n $data['Subject'] = 'Pending Due Sheets';\n $data['CompanyID'] = $CompanyID;\n $data['data'] = $temp;\n $status = Helper::sendMail('emails.PendingDueSheets', $data);\n }\n }\n //echo $status['message'];\n $joblogdata['Message'] = 'Success';\n $joblogdata['CronJobStatus'] = CronJob::CRON_SUCCESS;\n CronJobLog::insert($joblogdata);\n DB::commit();\n\n }catch (\\Exception $e) {\n DB::rollback();\n $this->info('Failed:' . $e->getMessage());\n $joblogdata['Message'] ='Error:'.$e->getMessage();\n $joblogdata['CronJobStatus'] = CronJob::CRON_FAIL;\n date_default_timezone_set(Config::get('app.timezone'));\n CronJobLog::insert($joblogdata);\n Log::error(\"PendingDueSheet : \". $e->getMessage());\n if(!empty($cronsetting['ErrorEmail'])) {\n $result = CronJob::CronJobErrorEmailSend($CronJobID,$e);\n Log::error(\"**Email Sent Status \" . $result['status']);\n Log::error(\"**Email Sent message \" . $result['message']);\n }\n }\n $dataactive['Active'] = 0;\n $dataactive['PID'] = '';\n $CronJob->update($dataactive);\n if(!empty($cronsetting['SuccessEmail'])) {\n $result = CronJob::CronJobSuccessEmailSend($CronJobID);\n Log::error(\"**Email Sent Status \".$result['status']);\n Log::error(\"**Email Sent message \".$result['message']);\n }\n\n App\\Lib\\CronHelper::after_cronrun($this->name, $this);\n\n }", "public function workingOn(JobHandler $job)\n\t{\n\t\t$job->worker = $this;\n\t\t$this->currentJob = $job;\n\t\t$job->updateStatus(Status::STATUS_RUNNING);\n\t\t$data = json_encode(array(\n\t\t\t'queue' => $job->queue,\n\t\t\t'run_at' => date('c'),\n\t\t\t'payload' => $job->payload\n\t\t));\n\t\tResque::redis()->set('worker:' . $job->worker, $data);\n\t}", "function run_activity_pre()\n\t\t{\n\t\t\t//load agent data from database\n\t\t\t$this->bo_agent->init();\n\t\t\t\n\t\t\t//this will send an email only if the configuration says to do so\n\t\t\tif (!($this->bo_agent->send_start()))\n\t\t\t{\n\t\t\t\t$this->error[] = lang('Smtp Agent has detected some errors when sending email at the beginning of the activity');\n\t\t\t\t$ok = false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$ok = true;\n\t\t\t}\n\t\t\t$this->error[] = $this->bo_agent->get_error();\n\t\t\tif ($this->bo_agent->debugmode) echo '<br />START: Mail agent in DEBUG mode:'.implode('<br />',$this->error);\n\t\t\treturn $ok;\n\t\t}", "public function run()\n {\n DB::table('job')->insert([\n \t[\n\t 'title' => 'job 1',\n\t 'minimumWorkExperience' => 5,\n\t 'state' => 'state',\n\t 'countryID' => 1,\n\t 'responsibilities' => 'eating',\n\t 'workLocation' => 'Subang',\n\t 'jobLevelID' => 1,\n\t 'status' => 1,\n\t\t 'created_at' => new DateTime,\n\t\t 'updated_at' => new DateTime\n \t],\n \t\n ]);\n }", "protected function completeRunningJob()\n {\n $runningJob = $this->objFromFixture(QueuedJobDescriptor::class, 'runningjob');\n $runningJob->JobStatus = 'Complete';\n $runningJob->write();\n\n $runningJob = $this->objFromFixture(QueuedJobDescriptor::class, 'immediatependingjob');\n $runningJob->JobStatus = 'Complete';\n $runningJob->write();\n }", "function midnight_jobs()\n {\n\t if (intval(date('d')) == 1){\n\t\t set_setting('stt', 0);\n\t }\n\t echo 'Done';\n }", "public function process(Job $job): void\n {\n }", "protected function process() {\n\n $jobId = $this->param();\n\n $jobTitle = $this->app()->request->post(\"title\");\n $jobDescription = $this->app()->request->post(\"description\");\n $jobSkills = $this->app()->request->post(\"skills\");\n\n $jobPositions = $this->app()->request->post(\"positions\");\n $jobLocation = $this->app()->request->post(\"location\");\n $jobType = $this->app()->request->post(\"type\");\n $jobStart = $this->app()->request->post(\"start\");\n\n\n if($jobType == 'temporary') {\n $jobDuration = $this->app()->request->post(\"duration\");\n }\n else {\n $jobDuration = '';\n }\n\n $skills = explode(\",\", $jobSkills);\n\n if(!$this->validPost($jobTitle, $jobDescription, $jobSkills, $jobPositions, $jobLocation, $jobDuration, $jobStart, $jobType)) {\n return;\n }\n\n require_once 'models/Job.php';\n\n\n switch($jobType) {\n case 'temporary':\n require_once 'models/TemporaryJob.php';\n $job = new TemporaryJob($jobId);\n $job->setTitle($jobTitle);\n $job->setDescription($jobDescription);\n $job->setSkills($skills);\n $job->setPositions($jobPositions);\n $job->setLocation($jobLocation);\n $job->setStartTime($jobStart);\n $job->setDuration($jobDuration);\n $job->saveToDb();\n break;\n\n case 'permanent':\n require_once 'models/PermanentJob.php';\n $job = new PermanentJob($jobId);\n $job->setTitle($jobTitle);\n $job->setDescription($jobDescription);\n $job->setSkills($skills);\n $job->setPositions($jobPositions);\n $job->setLocation($jobLocation);\n $job->setStartTime($jobStart);\n $job->saveToDb();\n break;\n }\n }", "public function markExecution() {}", "public function doAction() : void {\n $this->doJob();\n }", "protected function executeSpecificStep() {}", "public function fire()\n {\n\n CronHelper::before_cronrun($this->name, $this );\n\n $arguments = $this->argument();\n $getmypid = getmypid(); // get proccess id added by abubakar\n $JobID = $arguments[\"JobID\"];\n $job = Job::find($JobID);\n $ProcessID = (string) Uuid::generate();\n Job::JobStatusProcess($JobID, $ProcessID,$getmypid);//Change by abubakar\n $CompanyID = $arguments[\"CompanyID\"];\n $bacth_insert_limit = 250;\n $counter = 0;\n $start_time = date('Y-m-d H:i:s');\n $JobStatusMessage =array();\n $duplicatecode=0;\n $DialStringID = '';\n\n Log::useFiles(storage_path() . '/logs/dialstringupload-' . $JobID. '-' . date('Y-m-d') . '.log');\n $TEMP_PATH = CompanyConfiguration::get($CompanyID,'TEMP_PATH').'/';\n try {\n\n if (!empty($job)) {\n $jobfile = JobFile::where(['JobID' => $JobID])->first();\n $joboptions = json_decode($jobfile->Options);\n if (count($joboptions) > 0) {\n if(isset($joboptions->uploadtemplate) && !empty($joboptions->uploadtemplate)) {\n $uploadtemplate = FileUploadTemplate::find($joboptions->uploadtemplate);\n $templateoptions = json_decode($uploadtemplate->Options);\n }else{\n $templateoptions = json_decode($joboptions->Options);\n\n }\n $DialStringID = $joboptions->DialStringID;\n $csvoption = $templateoptions->option;\n $attrselection = $templateoptions->selection;\n\n if ($jobfile->FilePath) {\n $path = AmazonS3::unSignedUrl($jobfile->FilePath,$CompanyID);\n if (strpos($path, \"https://\") !== false) {\n $file = $TEMP_PATH . basename($path);\n file_put_contents($file, file_get_contents($path));\n $jobfile->FilePath = $file;\n } else {\n $jobfile->FilePath = $path;\n }\n };\n\n $NeonExcel = new NeonExcelIO($jobfile->FilePath, (array) $csvoption);\n $results = $NeonExcel->read();\n $lineno = 2;\n if ($csvoption->Firstrow == 'data') {\n $lineno = 1;\n }\n $error = array();\n $batch_insert_array = [];\n foreach ($results as $index=>$temp_row) {\n if ($csvoption->Firstrow == 'data') {\n array_unshift($temp_row, null);\n unset($temp_row[0]);\n\n }\n $temp_row = filterArrayRemoveNewLines($temp_row);\n $tempdialstringdata = array();\n $tempdialstringdata['DialStringID'] = $joboptions->DialStringID;\n $tempdialstringdata['ProcessId'] = (string) $ProcessID;\n\n //check empty row\n $checkemptyrow = array_filter(array_values($temp_row));\n if(!empty($checkemptyrow)){\n if (isset($attrselection->DialString) && !empty($attrselection->DialString) && !empty($temp_row[$attrselection->DialString])) {\n $tempdialstringdata['DialString'] = trim($temp_row[$attrselection->DialString]);\n $tempdialstringdata['DialString'] = preg_replace('/\\s+/', '', $tempdialstringdata['DialString']);\n }else{\n $error[] = 'Prefix is blank at line no:'.$lineno;\n }\n if (isset($attrselection->ChargeCode) && !empty($attrselection->ChargeCode) && !empty($temp_row[$attrselection->ChargeCode])) {\n $tempdialstringdata['ChargeCode'] = trim($temp_row[$attrselection->ChargeCode]);\n }else{\n $error[] = 'ChargeCode is blank at line no:'.$lineno;\n }\n if (isset($attrselection->Description) && !empty($attrselection->Description) && !empty($temp_row[$attrselection->Description])) {\n $tempdialstringdata['Description'] = trim($temp_row[$attrselection->Description]);\n }else{\n $tempdialstringdata['Description'] = '';\n }\n\n if (isset($attrselection->Forbidden) && !empty($attrselection->Forbidden)) {\n $Forbidden = trim($temp_row[$attrselection->Forbidden]);\n if($Forbidden=='1'){\n $tempdialstringdata['Forbidden'] = '1';\n }else{\n $tempdialstringdata['Forbidden'] = '0';\n }\n }\n\n if (isset($attrselection->Action) && !empty($attrselection->Action)) {\n if(empty($temp_row[$attrselection->Action])){\n $tempdialstringdata['Action'] = 'I';\n }else{\n $action_value = $temp_row[$attrselection->Action];\n if (isset($attrselection->ActionDelete) && !empty($attrselection->ActionDelete) && trim(strtolower($action_value)) == trim(strtolower($attrselection->ActionDelete)) ) {\n $tempdialstringdata['Action'] = 'D';\n }else if (isset($attrselection->ActionUpdate) && !empty($attrselection->ActionUpdate) && trim(strtolower($action_value)) == trim(strtolower($attrselection->ActionUpdate))) {\n $tempdialstringdata['Action'] = 'U';\n }else if (isset($attrselection->ActionInsert) && !empty($attrselection->ActionInsert) && trim(strtolower($action_value)) == trim(strtolower($attrselection->ActionInsert))) {\n $tempdialstringdata['Action'] = 'I';\n }else{\n $tempdialstringdata['Action'] = 'I';\n }\n }\n\n }else{\n $tempdialstringdata['Action'] = 'I';\n }\n\n\n if(isset($tempdialstringdata['DialString']) && isset($tempdialstringdata['ChargeCode'])){\n $batch_insert_array[] = $tempdialstringdata;\n $counter++;\n }\n }\n\n if($counter==$bacth_insert_limit){\n Log::info('Batch insert start');\n Log::info('global counter'.$lineno);\n Log::info('insertion start');\n TempDialString::insert($batch_insert_array);\n Log::info('insertion end');\n $batch_insert_array = [];\n $counter = 0;\n }\n $lineno++;\n } // loop over\n\n if(!empty($batch_insert_array)){\n Log::info('Batch insert start');\n Log::info('global counter'.$lineno);\n Log::info('insertion start');\n Log::info('last batch insert ' . count($batch_insert_array));\n TempDialString::insert($batch_insert_array);\n Log::info('insertion end');\n }\n\n DB::beginTransaction();\n Log::info(\"start CALL prc_WSProcessDialString ('\" . $ProcessID . \"','\" . $DialStringID . \"')\");\n $JobStatusMessage = DB::select(\"CALL prc_WSProcessDialString ('\" . $ProcessID . \"','\" . $DialStringID . \"')\");\n Log::info(\"end CALL prc_WSProcessDialString ('\" . $ProcessID . \"','\" . $DialStringID . \"')\");\n DB::commit();\n $JobStatusMessage = array_reverse(json_decode(json_encode($JobStatusMessage),true));\n\n //$time_taken = ' <br/> Time taken - ' . time_elapsed($start_time, date('Y-m-d H:i:s'));\n //Log::info($time_taken);\n\n if(!empty($error) || count($JobStatusMessage) > 1){\n $prc_error = array();\n foreach ($JobStatusMessage as $JobStatusMessage1) {\n $prc_error[] = $JobStatusMessage1['Message'];\n if(strpos($JobStatusMessage1['Message'], 'DUPLICATE CODE') !==false){\n $duplicatecode = 1;\n }\n }\n\n $job = Job::find($JobID);\n\n // if duplicate code exit job will fail\n if($duplicatecode == 1){\n $error = array_merge($prc_error,$error);\n unset($error[0]);\n $jobdata['JobStatusMessage'] = implode(',\\n\\r',fix_jobstatus_meassage($error));\n $jobdata['JobStatusID'] = DB::table('tblJobStatus')->where('Code','F')->pluck('JobStatusID');\n }else{\n $error = array_merge($prc_error,$error);\n $jobdata['JobStatusMessage'] = implode(',\\n\\r',fix_jobstatus_meassage($error));\n $jobdata['JobStatusID'] = DB::table('tblJobStatus')->where('Code','PF')->pluck('JobStatusID');\n }\n\n $jobdata['updated_at'] = date('Y-m-d H:i:s');\n $jobdata['ModifiedBy'] = 'RMScheduler';\n Job::where([\"JobID\" => $JobID])->update($jobdata);\n }elseif(!empty($JobStatusMessage[0]['Message'])) {\n $job = Job::find($JobID);\n\n $jobdata['JobStatusMessage'] = $JobStatusMessage[0]['Message'] ;\n $jobdata['JobStatusID'] = DB::table('tblJobStatus')->where('Code','S')->pluck('JobStatusID');\n $jobdata['updated_at'] = date('Y-m-d H:i:s');\n $jobdata['ModifiedBy'] = 'RMScheduler';\n Job::where([\"JobID\" => $JobID])->update($jobdata);\n }\n\n }\n }\n\n\n } catch (\\Exception $e) {\n $jobdata['JobStatusID'] = DB::table('tblJobStatus')->where('Code', 'F')->pluck('JobStatusID');\n $jobdata['JobStatusMessage'] = 'Exception: ' . $e->getMessage();\n $jobdata['updated_at'] = date('Y-m-d H:i:s');\n $jobdata['ModifiedBy'] = 'RMScheduler';\n Job::where([\"JobID\" => $JobID])->update($jobdata);\n Log::error($e);\n }\n Job::send_job_status_email($job,$CompanyID);\n\n CronHelper::after_cronrun($this->name, $this);\n }", "public function startjobAction(){\n\t\ttry{\n\t\t\t$sm = $this->getServiceLocator();\n\t\t\t$identity = $sm->get('AuthService')->getIdentity();\n\t\t\t\n\t\t\t$config = $sm->get('Config');\n\t\t\t\n\t\t\t$request = $this->getRequest();\n\t\t\tif($request->isPost()){\n\t\t\t\n\t\t\t\t$posts = $request->getPost()->toArray();\n\t\t\t\t$paymentMade = 0;\n\t\t\t\t\n\t\t\t\tif(!empty($posts['invoice_number'])){ // If no invoice is attached then start the job\n\t\t\t\t\t$xero = new \\Invoice\\Model\\Xero($sm);\n\t\t\t\t\t$invoice = $xero->getInvoiceById($posts['invoice_number']);\n\t\t\t\t\t\n\t\t\t\t\t$paymentMade = ($invoice->Invoices->Invoice->AmountPaid * 100) / $invoice->Invoices->Invoice->Total;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(empty($posts['invoice_number']) || $paymentMade < 40){ // If payment made more than 40% then start else wait for approval\t\t\t\t\t\n\t\t\t\t\techo 2;\n\t\t\t\t}else{\n\t\t\t\t\t$data = array('status' => 1);\n\t\t\t\t\t\n\t\t\t\t\t$jobPacketTable = $sm->get('Order\\Model\\JobPacketTable');\n\t\t\t\t\techo $response = $jobPacketTable->startJob($posts['start_job_id'], $data);\n\t\t\t\t}\n\t\t\t}\n\t\t\texit;\n\t\t}catch(Exception $e){\n\t\t\t\\De\\Log::logApplicationInfo ( \"Caught Exception: \" . $e->getMessage () . ' -- File: ' . __FILE__ . ' Line: ' . __LINE__ );\n\t\t}\n\t}", "public function execute() {\n $this->getQueue()->push($this->getJob(), $this->getJobOptions());\n }", "public function testJobUpdate()\n {\n\n }", "public function run()\n\t{\n\n\t\t$this->setUpFromConfig();\n\t\t$this->cleanUp();\n\n\t\t$success = true;\n\n\t\t// find all the tasks to be run\n\t\t$tasks = $this->taskRepository->findTasksToRun();\n\t\tforeach ($tasks as $task) {\n\n\t\t\t$success = $this->runTask($task) and $success;\n\n\t\t}\n\n\t\treturn $success;\n\t}", "public static function setCurrentJob($job)\n {\n return (bool) Configuration::updateGlobalValue(self::CURRENT_TASK_CLI, $job);\n }", "public function pingJob(): void\n {\n $this->storage->pingJob($this->storedJob);\n }", "function cron_job_for_closed_event_check() {\n $this->event_model->cron_job_for_closed_event_check();\n }", "public function testJobDisable()\n {\n\n }", "private function _doEditJob($parameters) {\n\t\trequire(wgPaths::getModulePath().'actions/class.edit.php');\n\t\t$class = new newsActionsEdit();\n\t\tif ((bool) $class->init()) { wgError::add('actionok', 2);\n\t\t\treturn true;\n\t\t}\n\t\telse { wgError::add('actionfailed');\n\t\t\treturn false;\n\t\t}\n\t}", "protected function isJobLimit(): bool\n {\n return $this->jobCount >= $this->options->jobLimit;\n }", "public function ensurePublishJob()\n {\n // Can't clear a job while it's in the process of being completed.\n if ($this->owner->getIsPublishJobRunning()) {\n return;\n }\n\n if (!$this->owner->checkAddPermission()) {\n return;\n }\n\n $now = DBDatetime::now()->getTimestamp();\n // New desired date (if set).\n $desiredPublishTime = $this->owner->dbObject('DesiredPublishDate')->getTimestamp();\n $desiredUnPublishTime = $this->owner->dbObject('DesiredUnPublishDate')->getTimestamp();\n // Existing publish and un-publish date (if set).\n $publishTime = $this->owner->dbObject('PublishOnDate')->getTimestamp();\n $unPublishTime = $this->owner->dbObject('UnPublishOnDate')->getTimestamp();\n\n // If there is no PublishOnDate set, make sure we remove any existing Jobs.\n if (!$publishTime) {\n $this->clearPublishJob();\n }\n\n // If there is no desired publish time set, then there is nothing for us to change.\n if (!$desiredPublishTime) {\n return;\n }\n\n // You might have some additional requirements for allowing a PublishJob to be created.\n /** @var array|bool[] $canHavePublishJob */\n $canHavePublishJob = $this->owner->invokeWithExtensions('publishJobCanBeQueued');\n // One or more extensions said that this Object cannot have a PublishJob.\n if (in_array(false, $canHavePublishJob)) {\n return;\n }\n\n // The desired publish date is set after the desired un-publish date, and you require sequential dates.\n if ($this->owner->config()->get('enforce_sequential_dates')\n && $desiredUnPublishTime\n && $desiredPublishTime > $desiredUnPublishTime\n ) {\n return;\n }\n\n // The desired publish date is set after the active un-publish date, and you require sequential dates.\n if ($this->owner->config()->get('enforce_sequential_dates')\n && $unPublishTime\n && $desiredPublishTime > $unPublishTime\n ) {\n return;\n }\n\n // Check if there is a prior Publish Job.\n if ((int) $this->owner->PublishJobID !== 0) {\n $job = $this->owner->PublishJob();\n\n // If it's the same Publish Job, leave it be.\n if ($job\n && $job->exists()\n && DBDatetime::create()->setValue($job->StartAfter)->getTimestamp() === $desiredPublishTime\n ) {\n // Make sure our PublishOnDate is up to date.\n $this->updatePublishOnDate();\n\n return;\n }\n\n // Remove the old Publish Job.\n $this->owner->clearPublishJob();\n }\n\n $options = [];\n\n // If you have some extra options that you would like to pass to your Job, add them here.\n $this->owner->invokeWithExtensions('updatePublishTargetJobOptions', $options);\n\n // Do you want to use a different queue? You can define it at a DataObject level using this config. Your options\n // are: 1 (immediate), 2 (queued), 3 (large). See QueuedJob constants. Default is 2 (queued).\n $queueID = (int) $this->owner->config()->get('publish_target_job_queue_id');\n\n // Make sure the value set is valid, if it isn't, set back to default.\n if ($queueID === 0) {\n $queueID = null;\n }\n\n // Create a new job with the specified schedule. If publish time is in the past, run the Job immediately.\n // @todo There is a PR on QueuedJobs to use injectable. Should update this once that goes through.\n $jobTime = $desiredPublishTime > $now ? date('Y-m-d H:i:s', $desiredPublishTime) : null;\n $job = new PublishTargetJob($this->owner, $options);\n $this->owner->PublishJobID = Injector::inst()->get(QueuedJobService::class)\n ->queueJob($job, $jobTime, null, $queueID);\n\n // Make sure our PublishOnDate is up to date.\n $this->updatePublishOnDate();\n }", "function tripal_jobs_get_start_time($job){\n if($job->start_time > 0){\n $start = format_date($job->start_time);\n } else {\n if(strcmp($job->job_status,'Cancelled')==0){\n $start = 'Cancelled';\n } else {\n $start = 'Not Yet Started';\n }\n }\n return $start;\n}", "public function cron_action()\n\t{\n\n\t\t// process any recently updated inventory\n\t\t$this->inventory_batch();\n\t\t\n\t\t// process any recently shipped orders\n\t\t$this->shipping_batch();\n\n\t\t// process any recently processing orders\n\t\t$this->processing_batch();\n\n\t\t// process any product updates\n\t\t$this->product_batch(); \n\n\t\t// clean up any old records from the queues\n\t\t$this->cleanup();\n\t\texit('done');\n\n\t}", "public function needs_run() {\n $today = time();\n $lastrun = $this->info[\"last_run\"];\n $interval = (int)$this->freq * 86400;\n\n return($today > ($lastrun + $interval));\n }", "public function shopifyCronJob(){\n $this->load->model('Projects_model');\n $projects = $this->db->select('*')->from('projects')->where_in('connection_type',[1,3])->get()->result_array();\n $this->updateArticleInShopify();\n if(!empty($projects)){\n foreach ($projects as $p_key => $p_value) {\n $projectId = $p_value['id'];\n if($this->Projects_model->getValue('cms', $projectId)!='shopify')\n continue;\n $enabled = $this->Projects_model->getValue('enabled', $projectId);\n // check if the last execution time is satisfy the time checking.\n if($enabled == '1'){\n if($p_value['erp_system'] == 'exactonline') {\n $this->importArticleFromExact($projectId);\n $this->importCustomerFromExact($projectId);\n }\n }\n }\n } \n }", "public abstract function should_execute();", "function acereview_rule_custom_code_execute($job) {\n global $base_url;\n // create review node by job and send email to client\n $job_nid = $job->nid;\n $review_id = acecrew_get_review_by_job($job_nid);\n if (!$review_id) {\n // create Review by Job\n $url = acereview_get_link_by_job($job_nid);\n $email = acereview_get_client_email($job_nid);\n acereview_sent_email_to_client($email, $url, $job->field_job_number[0]['value']);\n }\n}", "function tripal_jobs_rerun ($job_id){\n global $user;\n\n $sql = \"select * from {tripal_jobs} where job_id = %d\";\n $job = db_fetch_object(db_query($sql,$job_id));\n\n $args = explode(\"::\",$job->arguments);\n tripal_add_job ($job->job_name,$job->modulename,$job->callback,$args,$user->uid,\n $job->priority);\n\n drupal_goto(\"admin/tripal/tripal_jobs\");\n}", "public function execute()\n {\n return true;\n }", "public function canHandleJob(JobData $jobData);", "public abstract function sendJobs();", "public function trigger(): string|bool\n {\n return Resque::enqueue($this->queue, $this->class, [\n 'project' => $this->project,\n 'type' => $this->type,\n 'document' => $this->document,\n 'resource' => $this->resource,\n 'datetime' => $this->datetime,\n 'hourlyUsageRetentionDatetime' => $this->hourlyUsageRetentionDatetime\n ]);\n }", "public function run() {\n $handler = $this->getHandler();\n if (!is_object($handler)) {\n $msg = \"[JOB] bad handler for job::{$this->job_id}\";\n $this->finishWithError($msg);\n return false;\n }\n\n # run the handler\n try {\n\n if ($this->fail_on_output) {\n ob_start(); \n }\n\n $handler->perform();\n\n if ($this->fail_on_output) {\n $output = ob_get_contents();\n ob_end_clean();\n\n if (!empty($output)) {\n throw new Exception(\"Job produced unexpected output: $output\");\n }\n }\n\n # cleanup\n $this->finish();\n return true;\n\n } catch (DJRetryException $e) {\n if ($this->fail_on_output) {\n ob_end_flush();\n }\n \n # attempts hasn't been incremented yet.\n $attempts = $this->getAttempts()+1;\n\n $msg = \"Caught DJRetryException \\\"{$e->getMessage()}\\\" on attempt $attempts/{$this->max_attempts}.\";\n\n if($attempts == $this->max_attempts) {\n $msg = \"[JOB] job::{$this->job_id} $msg Giving up.\";\n $this->finishWithError($msg, $handler);\n } else {\n $this->log(\"[JOB] job::{$this->job_id} $msg Try again in {$e->getDelay()} seconds.\", self::WARN);\n $this->retryLater($e->getDelay());\n }\n return false;\n\n } catch (Exception $e) {\n if ($this->fail_on_output) {\n ob_end_flush();\n }\n\n $this->finishWithError($e->getMessage(), $handler);\n return false;\n\n }\n }", "public function isExecutable() {\n return $this->state->canChange('executed');\n }", "public function run(){\n parent::run();\n //Do stuff...\n }", "protected abstract function run();", "public function run()\n {\n $jobtype = new \\App\\Jobtype([\n 'type' => 'Full Time'\n ]);\n\n $jobtype->save();\n\n $jobtype = new \\App\\Jobtype([\n 'type' => 'Part Time'\n ]);\n\n $jobtype->save();\n }", "public function should_run()\n\t{\n\t\treturn $this->config['delete_pms_last_gc'] < time() - $this->config['delete_pms_gc'];\n\t}", "function acceptJob($postData)\n\t\t{\n\t\t\t//get the bid information\n\t\t\t$bid_details = $this->manageContent->getValue_where('bid_info','*','bid_id',$postData['bid']);\n\t\t\t\n\t\t\t//get the project details on which bid is made\n\t\t\t$project_details = $this->manageContent->getValue_where(\"project_info\",\"*\",\"project_id\",$bid_details[0]['project_id']);\n\t\t\t\n\t\t\t//get award info of this job\n\t\t\t$award_info = $this->manageContent->getValue_where(\"award_info\",\"*\",\"project_id\",$bid_details[0]['project_id']);\n\t\t\t\n\t\t\t//check for the valid contractor\n\t\t\tif( $_SESSION['user_id'] == $bid_details[0]['user_id'] && !empty($project_details) )\n\t\t\t{\n\t\t\t\t//update the accept flag\n\t\t\t\t$update_1 = $this->manageContent->updateValueWhere(\"award_info\",\"is_accepted\",1,\"bid_id\",$postData['bid']);\n\t\t\t\t$update_2 = $this->manageContent->updateValueWhere(\"award_info\",\"result_date\",date('Y-m-d g:i:s'),\"bid_id\",$postData['bid']);\n\t\t\t\t\n\t\t\t\t//create a work room for the job\n\t\t\t\tif( $update_1 == 1 && $update_2 == 1 )\n\t\t\t\t{\n\t\t\t\t\t//create the variables\n\t\t\t\t\t$workroom_id = uniqid('wkrm');\n\t\t\t\t\t$project_id = $bid_details[0]['project_id'];\n\t\t\t\t\t$employer_id = $project_details[0]['user_id'];\n\t\t\t\t\t$contractor_id = $bid_details[0]['user_id'];\n\t\t\t\t\t$date = date('Y-m-d');\n\t\t\t\t\t$time = date('h:i:s');\n\t\t\t\t\t\n\t\t\t\t\t//insert the values\n\t\t\t\t\t$column_name = array(\"workroom_id\", \"project_id\", \"bid_id\", \"emp_user_id\", \"con_user_id\", \"date\", \"time\", \"job_status\");\n\t\t\t\t\t$column_value = array($workroom_id, $project_id, $postData['bid'], $employer_id, $contractor_id, $date, $time,1);\n\t\t\t\t\t$insert = $this->manageContent->insertValue(\"workroom_info\",$column_name,$column_value);\n\t\t\t\t\tif($insert == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\t//get contractor details\n\t\t\t\t\t\t$con_details = $this->manageContent->getValue_where('user_info', '*', 'user_id', $bid_details[0]['user_id']);\n\t\t\t\t\t\t//getting employer details\n\t\t\t\t\t\t$emp_details = $this->getEmailIdFromUserId($project_details[0]['user_id']);\n\t\t\t\t\t\t//sending mail to employer\n\t\t\t\t\t\t$this->mailSent->mailForAcceptingJob($emp_details[0], $emp_details[1], $con_details[0]['name'], $project_details[0]['title']);\n\t\t\t\t\t\t\n\t\t\t\t\t\techo 'Successfully Awarded';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo 'Please try again.';\n\t\t\t}\n\t\t}" ]
[ "0.68277204", "0.6624578", "0.6510412", "0.6470208", "0.63723767", "0.6296154", "0.6082285", "0.6069997", "0.6068144", "0.6068144", "0.6018827", "0.6003223", "0.5971469", "0.5971469", "0.59371185", "0.59261274", "0.58667743", "0.5821147", "0.58165455", "0.58077943", "0.5777272", "0.5766593", "0.5753839", "0.5716023", "0.571484", "0.57136524", "0.57136524", "0.57136524", "0.57132643", "0.57132643", "0.5667825", "0.5665648", "0.5651121", "0.56408554", "0.5616663", "0.5601674", "0.5599345", "0.5590917", "0.55892557", "0.55812377", "0.55783266", "0.55621314", "0.5548004", "0.55369", "0.5530539", "0.55302286", "0.5519667", "0.5508285", "0.5506537", "0.5498013", "0.549406", "0.5492786", "0.54912174", "0.54854494", "0.5475177", "0.5473713", "0.5473294", "0.54722583", "0.54699045", "0.5457364", "0.5429451", "0.5421838", "0.541231", "0.54071665", "0.54016936", "0.5378352", "0.53768784", "0.53658503", "0.53582525", "0.53581375", "0.5351276", "0.5349735", "0.5349548", "0.5347983", "0.5342301", "0.5340442", "0.5339854", "0.5338071", "0.5337022", "0.533676", "0.53336465", "0.5330163", "0.53165656", "0.5303083", "0.5301906", "0.53011924", "0.52953875", "0.52884305", "0.5274573", "0.52676815", "0.5263076", "0.52391595", "0.5230779", "0.52256465", "0.5225306", "0.52181745", "0.52174777", "0.52161944", "0.5211889", "0.52101487", "0.52070093" ]
0.0
-1
Get all ADT types
public function getValidTypes() { return array("Float", "Integer", "Location", "Text", "Boolean", "MultiText", "Date", "DateTime", "Enum", "MultiEnum", "Group"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTypes();", "public function getTypes();", "public function getTypes();", "public function getTypes();", "public function getAdtTypes()\n {\n $query = \"SELECT ALL FROM adv_type\";\n return $this->getQueryData($query, $this->getConnection());\n }", "public static function getTypes();", "protected function getTypes() {}", "public function listAllType(){\n try {\n return $this->identityTypeGateway->getAllTypes();\n } catch (Exception $ex) {\n throw $ex;\n }catch (PDOException $e){\n throw $e;\n }\n }", "public function get_types()\n {\n }", "public function getAllTypes()\n {\n return $this->connection->select(\n $this->grammar->compileGetAllTypes()\n );\n }", "public function getAllTypes()\n {\n return $this->connection->select(\n $this->grammar->compileGetAllTypes()\n );\n }", "public function all()\n {\n return $this->type->all();\n }", "public function getAllTypes(){\n return $this->find()->asArray()->orderBy('typeDesc ASC')->all();\n }", "public function get_types()\n\t{\n\t\treturn $this->driver_query('type_list', FALSE);\n\t}", "public function getTypes(): array;", "public function getTypes(): array;", "public function get_types()\n\t{\n\t\treturn array();\n\t}", "protected function _listTypes()\n {\n global $config;\n $types = objects::types();\n\n $result = array();\n foreach ($types as $type) {\n $infos = objects::infos($type);\n $result[$type] = $infos['name'];\n }\n return $result;\n }", "public static function getAll()\r\n {\r\n return self::$typeRegistry;\r\n }", "public function attributeTypes(): TypeCollection;", "public function getTypes()\n {\n return $this->getData(self::TYPES);\n }", "public function listOfTypes()\n {\n $qb = $this->createQueryBuilder('b')\n ->select('b.type')\n ->distinct('b.type');\n \n $query = $qb->getquery();\n \n return $query->execute();\n }", "public function getTypes()\n {\n return $this->getTypesCollection()->getArrayCopy();\n }", "public function retrieveEntityTypes()\n {\n return $this->start()->uri(\"/api/entity/type\")\n ->get()\n ->go();\n }", "function getTypes() {\n\t\treturn $this->types;\n\t}", "public function getTypes()\n {\n return get_object_vars($this);\n }", "public function getTypes(): array\n {\n return $this->types;\n }", "public function get_desired_types();", "public function getTypes()\n {\n return $this->types;\n }", "public function getTypes()\n {\n return $this->types;\n }", "public function getAllTypes()\n {\n $this->db->select('*', FALSE);\n $this->db->from('item_type');\n $query = $this->db->get();\n return $query->result();\n }", "function &getAssociatedTypes() {\n\t\tif ($this->getIsGeneric()) { return array(); }\n\t\t\n\t\t$sTable = KTUtil::getTableName('document_type_fieldsets');\n $aQuery = array(\n \"SELECT document_type_id FROM $sTable WHERE fieldset_id = ?\",\n array($this->getId()),\n );\n $aIds = DBUtil::getResultArrayKey($aQuery, 'document_type_id');\n\t\t\n\t\t$aRet = array();\n\t\tforeach ($aIds as $iID) {\n\t\t $oType = DocumentType::get($iID);\n\t\t\tif (!PEAR::isError($oType)) { \n\t\t\t $aRet[] = $oType;\n\t\t\t}\n\t\t}\n\t\treturn $aRet;\n\t}", "public function getTypesItems()\n {\n return self::$_types;\n }", "public static function getTypes()\n {\n $sql = 'SELECT * FROM location_type';\n $command = Yii::app()->db->createCommand($sql);\n return $command->queryAll(true);\n }", "public function getTypes() {\n\t\treturn $this->types;\n\t}", "#[Pure]\n\tpublic function getTypes()\n {\n }", "public static function get_possible_types()\n {\n }", "public static function get_possible_types()\n {\n }", "public static function get_possible_types()\n {\n }", "public function getTypes(){\n\t\t$stmt = $this->db->query(\"SELECT * FROM products_types\");\n\t\treturn $stmt->fetchAll(PDO::FETCH_OBJ);\n\t}", "public static function getTypesList()\n {\n $sql = 'SELECT id AS value, display_name AS text '\n . 'FROM location_type '\n . 'WHERE active = 1';\n $command = Yii::app()->db->createCommand($sql);\n return $command->queryAll(true);\n }", "static function getTypes(): array\n\t{\n return self::$types;\n }", "public function types()\n {\n return $this->types;\n }", "public static function types()\n {\n return self::$types;\n }", "public function getAllType()\n {\n $q=\"SELECT type_id FROM `status`\";\n $result = $this->fetchAll($q);\n return $result;\n }", "function get_all_types()\n {\n return $this->db->get('card_types')->result();\n }", "public function getAllTypes() {\n\n $select = $this->select()\n ->setIntegrityCheck(false)\n ->from(\n array('t' => 'NEWAGENTTYPELOOKUP')\n );\n $allTypes = $this->fetchAll($select);\n $returnVal = array();\n foreach ($allTypes as $typeRow) {\n $returnVal[$typeRow->NEWAGENTTYPELOOKUPID] = $typeRow->LABEL;\n }\n\n return $returnVal;\n }", "function getTypeslist ()\r\n\t{\r\n\t\t$query = 'SELECT id, name'\r\n\t\t\t\t. ' FROM #__flexicontent_types'\r\n\t\t\t\t. ' WHERE published = 1'\r\n\t\t\t\t. ' ORDER BY name ASC'\r\n\t\t\t\t;\r\n\t\t$this->_db->setQuery($query);\r\n\t\t$types = $this->_db->loadObjectList();\r\n\t\treturn $types;\r\n\t}", "function grabTypes(){\n\t\t$d=$this->find('all',array('order'=>array('id ASC')));\n\t\treturn $d;\n\t}", "public function get_types()\n {\n return self::$TYPES;\n }", "public static function get_types()\n {\n return self::$TYPES;\n }", "public static function getTypesById()\n {\n return array_flip(self::getTypes());\n }", "public static function getTypes(): array\n {\n return self::getRelevancyTypes();\n }", "public static function getTypes()\n {\n return TourType::find()\n ->where(['pid' => null]);\n }", "public static function getTypesList()\n {\n return ArrayHelper::map(Yii::$app->get('cms')->getPageTypes(), 'type', 'name');\n }", "public static function types(): array\n {\n $all = self::getAll();\n\n return array_keys($all);\n }", "public function getVATypesDD() {\n if (!$options = $this->_cache->load('vatypedd')) {\n\t$select = $this->select()\n\t\t->from($this->_name, array('type', 'type'))\n\t\t->order('type');\n\t$options = $this->getAdapter()->fetchPairs($select);\n\t$this->_cache->save($options, 'vatypedd');\n\t}\n\treturn $options;\n }", "public function getTypes()\n {\n $oDb = Factory::service('Database');\n $oResult = $oDb->query('SHOW COLUMNS FROM `' . $this->table . '` LIKE \"type\"')->row();\n $sTypes = $oResult->Type;\n $sTypes = preg_replace('/enum\\((.*)\\)/', '$1', $sTypes);\n $sTypes = str_replace(\"'\", '', $sTypes);\n $aTypes = explode(',', $sTypes);\n\n $aOut = [];\n\n foreach ($aTypes as $sType) {\n $aOut[$sType] = ucwords(strtolower($sType));\n }\n\n return $aOut;\n }", "public function getTypes() : array\n {\n return \\array_map(function ($t) {\n return $t instanceof self ? $t : new self([$t]);\n }, $this->types);\n }", "public function getDataTypes(){\n\t\t$this->_connect();\n\t\treturn $this->_getDataTypes();\n\t}", "public static function getTypes()\n {\n return [\n ModelRegistry::TRANSACTION => ModelRegistry::getById(ModelRegistry::TRANSACTION)->label,\n ModelRegistry::PRODUCT => ModelRegistry::getById(ModelRegistry::PRODUCT)->label,\n ];\n }", "public function getTypesFromApi(): array {\n return $this->curlRequest('types');\n }", "public static function getAllFieldsWithTypes(): array\n {\n $className = get_called_class();\n $table = with(new $className)->getTable();\n\n\n $cache_key = self::$cache_prefix.'.ALLFIELDS.WITH.TYPES.' . strtoupper($table);\n\n return self::$use_cache ? Cache::remember($cache_key, 5 * 60, function () use ($table) {\n return self::getArrayTableInfo($table);\n }) : self::getArrayTableInfo($table);\n }", "public function getAccountTypes()\n {\n return AccountTypes::all();\n }", "public function Types(){\r\n\t\t$types = self::get_types();\r\n\t\t$types_available = self::get_types_available();\r\n\t\tif (!$types){\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$completeTypes = ArrayList::create();\r\n\t\tforeach ($types as $type){\r\n\t\t\tif (isset($types_available[$type])){\r\n\t\t\t\t$completeTypes->push($types_available[$type]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $completeTypes;\t\r\n\t}", "public static function getAllTypes() {\r\n\t\t$class_name = get_class(new static());\r\n\t\treturn isset(self::$all_role_types[$class_name]) ? self::$all_role_types[$class_name] : [];\r\n\t}", "public function types() {\n return $this->hasMany(Type::class);\n }", "public static function getAllFestivalTypes()\n\t{\n\t\t$database = DatabaseFactory::getFactory()->getConnection();\n\n\t\t$sql = \"SELECT * FROM fest_type\";\n\t\t$query = $database->query($sql);\n\n\t\t// fetchAll() is the PDO method that gets all result rows\n\t\treturn $query->fetchAll();\n\t}", "public function types()\n {\n return new Types($this->domusClient);\n }", "public function getUserTypes()\n {\n return $this->find()->all();\n }", "public function getItemTypeList()\n {\n\n $db = $this->getDb();\n\n $sql = <<<SQL\nSELECT\n type.rowid as type_id,\n type.name as type_name,\n type.icon as type_icon\n\nFROM\n wbfsys_address_item_type type\n\nORDER BY\n type.name;\n\nSQL;\n\n return $db->select($sql)->getAll();\n\n }", "static public function getTypeList()\n\t{\n\t\t/*\n\t\t * Searches the Type folder for all different tournament types.\n\t\t * This is used for when a user is creating a tournament and want to select what type to use\n\t\t * The array is set up like so:\n\t\t * key: class name for tourney type (get_class() could be useful)\n\t\t * value: result of object getName()\n\t\t */\n\t\t$retarray = array();\n\t\tif ($dir = scandir(APPLICATION_PATH . '/models/VictoryCondition')) {\n\t\t\tforeach ($dir as $file) {\n\t\t\t\tif ($file != 'Abstract.php' && strtolower(substr($file, strrpos($file, '.') + 1)) == 'php') {\n\t\t\t\t\t$classname = 'Model_VictoryCondition_' . substr($file, 0, strrpos($file, '.'));\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (class_exists($classname)) {\n\t\t\t\t\t\t\t$instance = new $classname;\n\t\t\t\t\t\t\tif ($instance instanceof Model_VictoryCondition_Abstract) {\n\t\t\t\t\t\t\t\t$retarray[$classname] = $instance->getTypeName();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception $e) {}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $retarray;\n\t}", "public static function get_all_types() {\t\t$types = scandir(str_replace(\"/\", \"\\\\\", dirname(plugin_dir_path( __FILE__ )) . \"\\\\ESWP\\\\MyTypes\"));\r\n\t\t$size = count($types);\r\n\t\t$_types = array();\r\n\t\t\r\n\t\t//Feed in the extra types\r\n\t\t$extra_types = array();\r\n\t\tif(has_filter(\"es_include_types\")) {\r\n\t\t\t$extra_types = apply_filters(\"es_include_types\", $extra_types);\r\n\t\t\t\r\n\t\t\t$size += count($extra_types);\r\n\t\t\t\r\n\t\t\tforeach ($extra_types as $type) {\r\n\t\t\t\t$order = $size;\r\n\t\t\t\t\r\n\t\t\t\tif (method_exists($type, \"get_order\")) {\r\n\t\t\t\t\t$order = $type->get_order();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tarray_push($_types, array(\r\n\t\t\t\t\t\"order\" => $order,\r\n\t\t\t\t\t\"type\" => $type\r\n\t\t\t\t));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Add the included types\r\n\t\tforeach ($types as $type) {\r\n\t\t\tif ($type !== \"BaseType.php\" && trim($type, \".\") !== \"\") {\r\n\t\t\t\t$order = $size + 10;\r\n\t\t\t\t$_type = \"\\\\ESWP\\\\MyTypes\\\\\". explode(\".\", $type)[0];\r\n\t\t\t\t\r\n\t\t\t\tif (class_exists($_type)) {\r\n\t\t\t\t\t$_type_obj = new $_type();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (method_exists($_type, \"get_order\")) {\r\n\t\t\t\t\t\t$order = $_type_obj->get_order();\r\n\t\t\t\t\t}\r\n\t\t\t\r\n\t\t\t\t\tarray_push($_types, array(\r\n\t\t\t\t\t\t\"order\" => $order,\r\n\t\t\t\t\t\t\"type\" => $_type_obj\r\n\t\t\t\t\t));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $_types;\r\n\t}", "public function index()\n {\n $types = $this->allResources($this->typeRepository);\n\n return TypeResource::collection($types);\n }", "public function getAvailableAdTypes()\n {\n $query = \"SELECT ALL FROM adv_type WHERE is_available = 'y'\";\n return $this->getQueryData($query, $this->getConnection());\n }", "protected static function _getDataTypes()\n {\n return [];\n }", "public function getUserTypes()\n {\n $main_actions = [\n 'type' => \\adminer\\lang('Create type'),\n ];\n\n $headers = [\n \\adminer\\lang('Name'),\n ];\n\n // From db.inc.php\n $userTypes = \\adminer\\support(\"type\") ? \\adminer\\types() : [];\n $details = [];\n foreach($userTypes as $userType)\n {\n $details[] = [\n 'name' => \\adminer\\h($userType),\n ];\n }\n\n return \\compact('main_actions', 'headers', 'details');\n }", "public function viewClassType(){\n\t\t\t$query = $this->connection()->prepare(\"SELECT * FROM clazz_type ORDER BY id DESC\");\n\t\t\t$query->execute();\n\t\t\treturn $query->fetchAll();\n\t\t}", "public function getAllMealTypes()\n {\n return MealFoodType::all();\n }", "public static function getAllBuiltInTypes()\n {\n }", "public static function getAllServiceTypes() {\n return id(new PhutilClassMapQuery())\n ->setAncestorClass(__CLASS__)\n ->setUniqueMethod('getServiceTypeConstant')\n ->setSortMethod('getServiceTypeName')\n ->execute();\n }", "public function list()\n {\n return $this->getResult($this->client->get('linode/types'));\n }", "public static function all(){\n\n\t\t//Connection to DB\n\t\t$db = $_COOKIE[\"db\"];\n\n\t\t//Fields\n\t\t$sql = \"SELECT * FROM company_types\";\n\n\t\t//Query\n\t\t$statement = $db->prepare($sql);\n\n\t\t//SET FETCH MODE\n\t\t$statement->setFetchMode(PDO::FETCH_ASSOC);\n\n\t\t//EXECUTE\n\t\t$statement->execute();\n\n\n\t\treturn $statement->fetchAll();\n\t}", "public function allOfType($type)\n {\n return $this->all($type, '^rdf:type');\n }", "function getDatatypes() {\n return ['Protein', 'Phenotype', 'Gene Expression', 'Nucleotide Sequence','Clinical Trials','Imaging Data','Morphology','Proteomics Data','Physiological Signals','Epigenetic Data','Data from Papers',\n 'Omics Data','Survey Data','Cell Signaling','Unspecified',];\n}", "public static function types()\n\t{\n\t\t$states = array(\n\t\t\t'blog' => __('Blog'),\n\t\t\t'page' => __('Page'),\n\t\t\t'user' => __('User')\n\t\t);\n\n\t\t$values = Module::action('gleez_types', $states);\n\n\t\treturn $values;\n\t}", "protected function _getDataTypes(){\n\t\treturn ActiveRecordMetaData::getDataTypes($this->_source, $this->_schema);\n\t}", "public static function openAPITypes();", "public function all()\n {\n return IncomeTypes::all();\n }", "public function getEntityTypes() {\n return $this->entity_types;\n }", "public static function get_type_registry()\n {\n }", "function getChildTypes() : array;", "public function getBaseTypes()\n {\n return $this->base_types;\n }", "public function types(): array\n {\n return collect($this->modelSchemas)->map(function ($modelSchema) {\n return $modelSchema instanceof RootType\n ? $modelSchema\n : $this->registry->type($this->registry->getModelSchema($modelSchema)->typename());\n })->toArray();\n }", "public function fetchAll()\n {\n $templateTypeTable = new Api_Model_DbTable_TemplateType();\n\n $rowset = $templateTypeTable->fetchAll(null, 'name');\n\n $templateTypes = new Set();\n foreach ($rowset as $row) {\n $templateType = Type::factory($row);\n\n $templateTypes->addItem($templateType);\n }\n\n return $templateTypes;\n }", "function getTagTypes ()\n {\n try\n {\n $result = $this->apiCall('get',\"{$this->api['syndication_url']}/resources/tagTypes.json\");\n return $this->createResponse($result,'get All Tag Types');\n } catch ( Exception $e ) {\n return $this->createResponse($e,'API Call');\n }\n }", "function get_all_usertype()\n\t\t{\n\t\t\t$query=\"SELECT * from tbl_user_type\";\n\t\t\t$result = execute_query($query);\n\t\t\treturn new readonlyresultset($result);\n\t\t}", "public function types(): array\n {\n $json = $this->parent->performAPICallWithJsonResponse('get', 'artwork/types');\n return DataParser::parseDataArray($json, ArtworkType::class);\n }", "public function getTypesList() {\n \t//maybe someday sorts them by course, student progress?\n \t$course_id = Auth::user()->course_id;\n Debugbar::info($course_id);\n $course = Course::find($course_id);\n Debugbar::info($course);\n $typesList = $course->questions;\n Debugbar::info($typesList);\n \treturn $typesList;\n }", "public function getAvailableSeedTypes(){\n\t\t$sql = \n\t\t\t\"SELECT DISTINCT type.type_name \n\t\t\tFROM type\n\t\t\tWHERE type.type_name != '000'\n\t\t\tORDER BY type.type_name\";\n\t\t$stmt = $this->databaseConnection->dbConnection->prepare($sql);\n\t\t$stmt->execute();\n\t\t$arrayThing = [];\n\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC)){\n\t\t\tarray_push($arrayThing, $row['type_name']);\n\t\t}\n\t\t$myJSON = json_encode($arrayThing);\n\t\techo $myJSON;\n\t}", "public function index()\n {\n $types=TypeAttribute::all();\n\n foreach ($types as $type) {\n $type->att;\n }\n return response()->json(['types' => $types],200);\n }" ]
[ "0.8104263", "0.8104263", "0.8104263", "0.8104263", "0.7992159", "0.7942152", "0.7877116", "0.77502185", "0.7582065", "0.7574785", "0.7574785", "0.75543743", "0.7513106", "0.7469903", "0.74530625", "0.74530625", "0.74091035", "0.7398906", "0.7392792", "0.7290119", "0.7182691", "0.71577287", "0.71451527", "0.7138925", "0.70695007", "0.7066054", "0.70504636", "0.70470876", "0.70249724", "0.70249724", "0.6962776", "0.69034517", "0.6903336", "0.6903324", "0.6895097", "0.68615186", "0.6857851", "0.6857851", "0.6857851", "0.685205", "0.6847397", "0.68400264", "0.6827845", "0.67898536", "0.6785239", "0.67821413", "0.67698455", "0.6764637", "0.6754341", "0.67441887", "0.67328715", "0.6727261", "0.67146087", "0.6681726", "0.66809326", "0.66656846", "0.6663352", "0.6658139", "0.6645413", "0.66346776", "0.6629373", "0.65994513", "0.6597942", "0.65904427", "0.65784484", "0.6536427", "0.6531819", "0.6528841", "0.65275234", "0.6513913", "0.65091884", "0.65090245", "0.64929855", "0.64895284", "0.6474292", "0.64673734", "0.64605296", "0.6451231", "0.6448635", "0.6433606", "0.6420604", "0.6418552", "0.6412917", "0.6406967", "0.6398365", "0.639741", "0.63814205", "0.63779604", "0.6375129", "0.636316", "0.6345215", "0.63434434", "0.6332989", "0.6324283", "0.63213414", "0.6310926", "0.62657833", "0.6250135", "0.624651", "0.6238977", "0.6235793" ]
0.0
-1
Check if given type is valid
public function isValidType($a_type) { return in_array((string)$a_type, $this->getValidTypes()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function is_valid_type($type){\n\t\treturn in_array($type, $this->valid_types);\n\t}", "public function testIsValidType()\n {\n $this->assertFalse(\n Method::invoke($this->type, 'isValidType', $this, 'test'),\n 'The value should not be valid.'\n );\n\n $this->assertTrue(\n Method::invoke($this->type, 'isValidType', $this, 1.23),\n 'The value should be valid.'\n );\n }", "private function _isValidType($type) {\n return in_array($type, array('select', 'checkboxes', 'checkbox', 'radios',\n 'radio', 'textfield', 'textarea', 'file', 'submit', 'reset',\n 'hidden', 'fieldset', 'markup', 'button', 'password'));\n }", "private function validate($value,$type) {\n\t\tswitch($type) {\n\t\t\tcase \"varchar\":\n\t\t\t\treturn self::is_alphanum($value);\n\t\t\t\tbreak;\n\t\t\tcase \"int\":\n\t\t\t\treturn self::is_num($value);\n\t\t\t\tbreak;\n\t\t\tcase \"binary\":\n\t\t\t\treturn self::is_binary($value);\n\t\t\t\tbreak;\n\t\t\tcase \"alpha\":\n\t\t\t\treturn self::is_alpha($value);\n\t\t\t\tbreak;\n\t\t\tcase \"signed\":\n\t\t\t\treturn self::is_signed($value);\n\t\t\t\tbreak;\n\t\t\tcase \"file\":\n\t\t\t\treturn true;\n\t\t\t\tbreak;\n\t\t\tcase \"alpha\":\n\t\t\t\treturn self::is_alpha($value);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t\t\tbreak;\n\t\t}\n\t}", "static public function isValid($type)\n\t{\n\t\treturn in_array($type, self::$validTypes);\n\t}", "private function isValidType($type){\n $lowercased = strtolower($type);\n //check if something is in array\n return in_array($lowercased, $this->allowedTypes);\n }", "protected function _is_valid_type($type) {\n\t\t$types_array = explode(',', self::types_array);\n\t\tif (in_array($type, $types_array)) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "protected function check_type()\n {\n $regex = \"/^int$|^bool$|^string$/\";\n\n $result = preg_match($regex, $this->token);\n\n if($result == 0 or $result == FALSE)\n {\n fwrite(STDERR, \"Error, expecting <type> function parameter! Line: \");\n fwrite(STDERR, $this->lineCount);\n fwrite(STDERR, \"\\n\");\n exit(23);\n } \n }", "protected function isTypeValid(string $type): bool\n {\n return in_array($type, $this->types, true);\n }", "function checkType ($value, $type) {\n\tswitch ($type) {\n\t\tcase STRING : $r = is_string ($value); break;\n\t\tcase BOOL : $r = is_bool ($value); break;\n\t\tcase NUMERIC : $r = is_int ($value); break;\n\t\tcase REAL : $r = (is_real ($value) or is_int ($value)); break;\n\t\tdefault : return new Error ('TYPE_NOT_RECOGNIZED'); \n\t}\n\t\n\tif ($r === true) {\n\t\treturn true;\n\t} else {\n\t\treturn new Error ('TYPE_MISMATCH_VALUE', $type, $value);\n\t}\n}", "static function validate ($type, $v)\n {\n if (is_null ($v) || $v === '')\n return true;\n\n switch ($type) {\n\n case type::binding:\n return is_string ($v);\n\n case type::any:\n case type::bool: // Any value can be typecast to boolean.\n return true;\n\n case type::data:\n return is_array ($v) || is_object ($v)\n || $v instanceof \\Traversable\n || (is_string ($v) && strpos ($v, '{') !== false);\n\n case type::id:\n return !!preg_match ('#^[\\w\\-]+$#', $v);\n\n case type::content:\n return $v instanceof Metadata || is_string ($v); // Note: content props can be specified in attribute syntax.\n\n case type::metadata:\n return $v instanceof Metadata;\n\n case type::collection:\n return is_array ($v);\n\n case type::number:\n return is_numeric ($v);\n\n case type::string:\n return is_scalar ($v) || (is_object ($v) && method_exists ($v, '__toString'));\n }\n return false;\n }", "public static function isValid($value, string $type): bool\n\t{\n\t\t$valid = false;\n\t\tif($type == 'mixed') {\n\t\t\t$valid = true;\n\t\t} else if(is_string($value) || $value instanceof DataTypes\\TypeString) {\n\t\t\tif($type == 'string') $valid = true;\n\t\t} else if(is_int($value) || $value instanceof DataTypes\\TypeInt) {\n\t\t\tif($type == 'int') $valid = true;\n\t\t} else if(is_float($value) || $value instanceof DataTypes\\TypeFloat) {\n\t\t\tif($type == 'float') $valid = true;\n\t\t} else if(is_array($value) || $value instanceof DataTypes\\TypeArray) {\n\t\t\tif($type == 'array') $valid = true;\n\t\t} else if(is_bool($value) || $value instanceof DataTypes\\TypeBool) {\n\t\t\tif($type == 'boolean') $valid = true;\n\t\t} else if(is_object($value)) {\n\t\t\tif($value instanceof $type) $valid = true;\n\t\t}\n\t\treturn $valid;\t\n\t}", "function validate ($type, $value)\n {\n \n if($type == \"link\") {\n return filter_var($value, FILTER_VALIDATE_URL);\n }\n if($type == \"picture\") {\n $ext = substr($value, strlen($value) - 4, 4);\n if($ext != \".png\" && $ext != \".jpg\" && $ext != \".gif\") return false;\n else return true;\n }\n if($type == \"int\") {\n return is_numeric($value);\n }\n if($type == \"string\") {\n return true;\n }\n if($type == \"date\") {\n if($value instanceof DateTime) return true;\n else return false;\n }\n }", "private function hasValidPortType($type): bool\n {\n return in_array($type, Port::$datatypes);\n }", "public function typeIsValid()\n {\n if (!$this->scan_attributes) {\n return false;\n }\n\n return !is_null($this->scan_attributes->template_type);\n }", "private static function _isValidValue($type, $value){\n $value = self::_sanitizeValue($type, $value);\n if ($value != null){\n $nativeType = self::_getNativeType($type);\n if ($nativeType == 'ascii'){\n if (isset(self::$_extendedTypes[$type]['validate'])){\n if (!preg_match(self::$_extendedTypes[$type]['validate'], $value)){\n return false;\n }\n }\n }\n return true;\n }\n return false;\n }", "protected function validateType($value)\n {\n }", "protected function validateType($type) {\n switch (strtolower($type)) {\n case 'string':\n return 'string';\n break;\n\n case 'url':\n return 'url';\n break;\n\n case 'file':\n return 'file';\n break;\n\n default:\n return FALSE;\n break;\n }\n }", "public static function validateType()\n\t{\n\t\treturn array(\n\t\t\tarray(__CLASS__, 'checkType')\n\t\t);\n\t}", "public function validateType()\n {\n $validTalkTypes = $this->getOption('types');\n\n if (empty($this->_cleanData['type']) || !isset($this->_cleanData['type'])) {\n $this->_addErrorMessage(\"You must choose what type of talk you are submitting\");\n\n return false;\n }\n\n if (!isset($validTalkTypes[$this->_cleanData['type']])) {\n $this->_addErrorMessage(\"You did not choose a valid talk type\");\n\n return false;\n }\n\n return true;\n }", "public function isValidDataType(string $type): bool\r\n {\r\n return in_array($type, static::DATA_TYPES);\r\n }", "public function testIsValidTypeInvalid()\n {\n $this->assertFalse($this->annotation->isValidType('INVALID'));\n }", "static function isType($type)\n {\n try {\n return call_user_func_array('PHPUnit_Framework_Assert::isType', func_get_args());\n } catch (\\Exception $e) {\n self::callSlack($e, debug_backtrace()[1]);\n }\n }", "function check( $value, $type='text' )\n {\n return Pgg_Validate::is( $value, $type );\n }", "protected function validateType($type)\n {\n if (!isset($this->types[$type]))\n {\n throw new InvalidArgumentException('Hibas tipus: ' . $type);\n }\n }", "function __checkType($type = null) {\n\t\t$valid = false;\n \tforeach($this->allowedTypes as $allowedType) {\n \t\tif(strtolower($type) == strtolower($allowedType)){\n \t\t$valid = true;\n \t\t}\n \t}\n\t\tif(!$valid) {\n\t\t\t$this->Session->setFlash('You tried to upload an invalid type! Please upload your pictures in jpeg, gif, or png format!');\n\t\t\t$this->redirect(Controller::referer('/'));\n\t\t}\n\t}", "public function validType($key, $type, &$data) {\n\n\n if(!is_bool($data) && !is_array($data) && is_string($data) && !strlen($data)) return false;\n\n // database conversion types\n $type = preg_replace('/\\(.*/','',$type);\n\n switch (strtolower($type)) {\n case \"varbinary\": case \"varchar\": case \"char\": case \"string\": return is_string($data);\n case \"text\": case \"txt\": return is_string($data);\n case \"integer\": if(strval(intval($data))===strval($data)) $data=intval($data);return is_integer($data);\n case \"decimal\": case \"float\": if(floatval($data)!=0 || $data===\"0\" || $data === 0) $data=floatval($data);return is_float($data);\n case \"bit\": if(strval(intval($data))===strval($data)) $data=intval($data);return ($data==0 || $data==1);\n case \"model\": return is_array($data) && !empty($data);\n case \"json\": if(is_array($data)) $data = json_encode($data);return is_string($data) && is_array(json_decode($data,true));\n case \"name\": return $this->validateName($key,$data);\n case \"ip\": return filter_var($data,FILTER_VALIDATE_IP);\n case \"url\": return filter_var($data,FILTER_VALIDATE_URL);\n case \"email\": return is_string($data) && $this->validateEmail($key,\"email\",$data);\n case \"emails\": return is_array($data) && $this->validateEmail($key,\"email\",$data);\n case \"phone\": return is_string($data);\n case \"zip\": return is_string($data);\n case \"keyname\": return is_string($data);\n case \"key\": return is_string($data);\n case \"date\": return $this->validateDate($data);\n case \"datetime\": return $this->validateDateTime($data);\n case \"datetimeiso\": return $this->validateDateTimeISO($data);\n case \"currency\": return is_numeric($data);\n case \"boolean\": if(!is_bool($data) && ($data=='true' || $data=='false')) $data = ($data == 'true');return is_bool($data);\n case \"array\": return is_array($data);\n case \"list\": return is_array($data);\n case \"array_to_string\": if(is_array($data)) $data=implode(\",\",$data);return is_string($data);\n default: return false;\n }\n }", "function validate($element,$type)\n {\n if(empty($element)||!isset($element))\n {\n $test = false;\n }\n else\n {\n switch($type)\n {\n case 'university':\n {\n if ($element === 'MDU'|| $element === 'IP') \n $test = TRUE;\n else\n return FALSE;\n }\n break;\n case 'course':\n {\n if($element === 'B. Tech.')\n $test = TRUE;\n else\n return FALSE;\n }\n break;\n case 'stream':\n {\n if ($element === 'CSE'||$element === 'ECS')\n $test = TRUE;\n else\n return FALSE;\n }\n break;\n case 'semester':\n {\n if ($element >= 1 && $element <= 8) \n $test = TRUE;\n else\n return FALSE;\n }\n break;\n }\n }\n if($test)\n return TRUE;\n else\n return FALSE;\n }", "private function isTypeValid($param)\n {\n return is_array($param) || is_string($param) || is_null($param);\n }", "function is($type);", "private function _valid_data_type($type=NULL){\n\t\tif(!empty($type)){\n\t\t\tif ($type == Minematic_Connector_Model_Config::DATA_TYPE_ALL ||\n\t\t\t\t$type == Minematic_Connector_Model_Config::DATA_TYPE_ITEMS || \n\t\t\t\t$type == Minematic_Connector_Model_Config::DATA_TYPE_USERS || \n\t\t\t\t$type == Minematic_Connector_Model_Config::DATA_TYPE_EVENTS){\n\t\t\t\t\n\t\t\t\treturn TRUE;\n\t\t\t} else {\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn TRUE;\n\t}", "protected function _isTypeValid($type = null)\n {\n if (is_null($type)) {\n $type = $this->type;\n }\n return in_array($type, array(\n HistoryLogChange::TYPE_NONE,\n HistoryLogChange::TYPE_CREATE,\n HistoryLogChange::TYPE_UPDATE,\n HistoryLogChange::TYPE_DELETE,\n ));\n }", "function __validate($val=false, $type=false) {\n\t\tif(!$val || !$type) return false;\n\t\t$val = trim($val);\n\t\tswitch($type) {\n\t\t\tcase 'numeric':\n\t\t\t\tif(is_numeric($val)) return true;\n\t\t\t\tbreak;\n\t\t\tcase 'exists':\n\t\t\t\tif($val && $val != '' && $val !== '') return true;\n\t\t\t\tbreak;\n\t\t\tcase 'email':\n\t\t\t\tif(!ereg(\"^[^@]{1,64}@[^@]{1,255}$\", $val)) return false;\n\t\t\t\tif(!eregi(\"^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,4})$\", $val)) return false;\n\t\t\t\treturn true;\n\t\t\t\tbreak;\n\t\t\tcase 'password':\n\t\t\t\tif(preg_match(\"/^[a-zA-Z0-9_-]{8,20}$/i\", $val)) return true;\n\t\t\t\tbreak;\n\t\t\tcase 'bool':\n\t\t\t\tif($val === true || $val === false) return true;\n\t\t\t\tbreak;\n\t\t}\n\t\treturn false;\n\t}", "public function isType($type){\n \n // canary...\n if(!$this->hasType()){ return false; }//if\n \n return ($this->field_map['type'] === $type);\n \n }", "abstract protected function getValidType(): string;", "public function isTypeSupported(string $type) : bool;", "private function isAllowedType(string $type): bool\n {\n return in_array($type, Reduction::ALLOWED_TYPES, true);\n }", "protected function checkType(&$inMessage = '') {\n\t\t$isValid = true;\n\t\tif ( !is_string($this->_Type) && $this->_Type !== '' ) {\n\t\t\t$inMessage .= \"{$this->_Type} is not a valid value for Type\";\n\t\t\t$isValid = false;\n\t\t}\t\t\n\t\tif ( $isValid && $this->_Type != '' && !in_array($this->_Type, array(self::TYPE_SOURCE, self::TYPE_THUMBNAIL, self::TYPE_FILE, self::TYPE_CCA)) ) {\n\t\t\t$inMessage .= \"Type must be one of TYPE_SOURCE, TYPE_THUMBNAIL, TYPE_FILE\";\n\t\t\t$isValid = false;\n\t\t}\t\t\n\t\treturn $isValid;\n\t}", "public static function validate($value, $type)\n {\n switch ($type) {\n case 'email':\n case 'user_name':\n case 'login':\n case 'body':\n case 'required':\n return !empty($value);\n case 'alphabets':\n preg_match('/^[a-zA-Z]*$/', $value, $matches);\n return !empty($value) && $matches[0];\n case 'numbers':\n preg_match('/^[0-9]*$/', $value, $matches);\n return !empty($value) && $matches[0];\n case 'date(m/d/y)':\n $array = explode(\"/\", $value);\n return !empty($value) && checkdate($array[0], $array[1], $array[2]);\n case 'date(m-d-y)':\n $array = explode(\"-\", $value);\n return !empty($value) && checkdate($array[0], $array[1], $array[2]);\n case 'date(d/m/y)':\n $array = explode(\"/\", $value);\n return !empty($value) && checkdate($array[1], $array[0], $array[2]);\n case 'date(d.m.y)':\n $array = explode(\".\", $value);\n return !empty($value) && checkdate($array[1], $array[0], $array[2]);\n case 'date(d-m-y)':\n $array = explode(\"-\", $value);\n return !empty($value) && checkdate($array[1], $array[0], $array[2]);\n case 'past':\n return !empty($value) && strtotime($value) < strtotime('now');\n case 'present':\n return !empty($value) && strtotime($value) === strtotime('now');\n case 'future':\n return !empty($value) && strtotime($value) > strtotime('now');\n default:\n return false;\n }\n }", "public function validate_type($type)\r\n {\r\n // a valid type for the object.\r\n\r\n // A valid type for a field is a value from the types_set attribute of\r\n // that field's class.\r\n\r\n if (!empty($type) && !in_array($type, $this->types_set))\r\n {\r\n throw new InvalidArgumentException('Invalid type for ' . get_class($this) . ' ' . $type);\r\n }\r\n }", "public function testTypeCorrect()\n {\n $validator=new Validator();\n $result=$validator->type(\"2\");\n $this->assertTrue($result[0]);\n }", "public static function isValidType(String $type){\n return array_key_exists(strtoupper($type), self::userTypes());\n }", "private function checkType(&$type): void\n {\n if ( ! is_string($type)) {\n throw new InvalidTwitterCardException(\n 'The Twitter card type must be a string value, [' . gettype($type) . '] was given.'\n );\n }\n\n $type = strtolower(trim($type));\n\n if ( ! in_array($type, $this->types())) {\n throw new InvalidTwitterCardException(\"The Twitter card type [$type] is not supported.\");\n }\n }", "private static function validate_type( $object_type ) {\n\t\tif ( ! in_array( $object_type, array( 'post', 'term' ), true ) ) {\n\t\t\tthrow WPSEO_Invalid_Argument_Exception::invalid_type( $object_type );\n\t\t}\n\t}", "public function validDataTypes();", "public static function validate_type($type) { \n\n\t\tswitch($type) { \n\t\t\tcase 'rpc':\n\t\t\tcase 'interface':\n\t\t\tcase 'network':\n\t\t\t\treturn $type;\n\t\t\tbreak;\n\t\t\tcase 'xml-rpc':\n\t\t\t\treturn 'rpc';\n\t\t\tbreak; \n\t\t\tdefault: \n\t\t\t\treturn 'stream';\n\t\t\tbreak;\n\t\t} // end switch\n\n\t}", "static function valid($value, $type) {\n\t\t\n\t\t// initilisation\n\t\t$messages = array();\n\t\t$validator= false;\n\t\t\n\t\tif ($type instanceof Zend_Validate_Abstract)\t {$validator = $type;}\n\t\telse {\n\t\t\tforeach(Zend_Loader_Autoloader::getInstance()->getRegisteredNamespaces() as $namespace) {\n\t\t\t\t\n\t\t\t\t// construction du nom de la classe\n\t\t\t\t$class = sprintf('%sValidate_%s', $namespace, $type);\n\n\t\t\t\t// creation du validateur si la class existe\n\t\t\t\ttry {\n\t\t\t\t\t@Zend_Loader::loadClass($class);// on essaie de charger la classe\n\t\t\t\t\t$php = '';// initialisationd es arguments\n\t\t\t\t\tforeach((array) $args = array_slice(func_get_args(), 2) as $k => $v) {$php .= (empty($php) ? '' : ',') . sprintf('$args[%s]', $k);}\n\t\t\t\t\teval (sprintf('$validator = new %s(%s);', $class, $php));// création du validateur\n\t\t\t\t} catch(Exception $e) {;}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// si mauvais validateur, on envoie une exception\n\t\tif (!($validator instanceof Zend_Validate_Abstract)) {throw new Exception('Validateur invalide');}\n\t\t\n\t\t$return = $validator->isValid($value);// on verifie si la valeur est ok\n\t\tself::$messages = $validator->getMessages();// inscription des messages\n\t\treturn $return;// on retourne le resultat du test\n\t}", "public function isValueValid($value) {\n\t\treturn $value instanceof Type\\PersonType;\n\t}", "function is($type)\n {\n return $this->factory->is($type);\n }", "function verify($var, $strict = false, $type = 'string'){\n if(!isset($var) || empty($var) || is_null($var)){\n return false;\n }\n else {\n if($strict){\n switch($type){\n case 'number':\n if(is_numeric($var)){\n return true;\n }\n break;\n case 'string':\n return true;\n break;\n case 'array':\n if(is_array($var)){\n return true;\n }\n break;\n default:\n return false;\n break;\n }\n }\n else {\n return true;\n }\n\n }\n }", "function checkType($type){\n\n $allowed = array('jpg', 'jpeg', 'png');\n $fileExt = explode('/', $type);\n $fileExt = strtolower(end($fileExt));\n return in_array($fileExt, $allowed) ? true : false ;\n\n }", "public function validate($element, $type)\n {\n switch ($element) {\n case 'audio':\n case 'image':\n case 'video':\n case 'all':\n return true;\n break;\n default:\n throw new \\Exception(\"The element '$element' is not valid for the filter type; '$type' only the following are allowed: audio, image, video, all\");\n }\n }", "public static function partIsValidType($type, $count)\n {\n switch($type) {\n case self::isPartOfTypeEqual($type, self::SHORT_INT, $count):\n return true;\n case self::isPartOfTypeEqual($type, self::LONG_INT, $count):\n return true;\n case self::isPartOfTypeEqual($type, self::LONG_LONG_INT, $count):\n return true;\n case self::isPartOfTypeEqual($type, self::UNSIGNED_CHAR, $count):\n return true;\n case self::isPartOfTypeEqual($type, self::UNSIGNED_SHORT_INT, $count):\n return true;\n case self::isPartOfTypeEqual($type, self::UNSIGNED_LONG_INT, $count):\n return true;\n case self::isPartOfTypeEqual($type, self::UNSIGNED_LONG_LONG_INT, $count):\n return true;\n default:\n return false;\n }\n }", "abstract public function isValid(mixed $value): bool;", "function validateInput($type, &$error, $options_arr) {\n if (!filter_var($_POST[$type], FILTER_VALIDATE_INT, $options_arr)) {\n $error = \"* Invalid ${type}\";\n return false;\n } else {\n return true;\n }\n }", "public function supports(string $type): bool;", "public function isValid()\n {\n if ($this->type != self::SCALAR_TPYE && $this->type != self::LIST_TYPE && $this->type != self::MAP_TYPE)\n return false;\n if (!Utils::isValidIdentifier($this->name))\n return false;\n return true;\n }", "function isDateType($type)\n{\n return($type == \"date\" or $type == \"year\" or isTimeType($type));\n}", "public static function validate_type($type) {\n\n\t\tswitch ($type) {\n\t\t\tcase 'album':\n\t\t\tcase 'artist':\n\t\t\tcase 'video':\n\t\t\t\treturn $type;\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn 'album';\n\t\t\tbreak;\n\t\t}\n\n\t}", "public function testNonStrings($type)\n {\n $reflection = $this->createMock(\"\\Loom\\Settable\");\n $method = new \\ReflectionMethod($reflection, \"checkType\");\n $method->setAccessible(true);\n \n $result = $method->invoke($reflection, \"myvalue\", $type);\n $this->assertFalse($result);\n }", "public function validate($variable, $type) {\n switch($type) {\n case \"email\":\n $valid = filter_var($variable, FILTER_VALIDATE_EMAIL);\n break;\n case \"url\":\n $valid = filter_var($variable, FILTER_VALIDATE_URL);\n break;\n default:\n $valid = false;\n break;\n }\n return $valid;\n }", "private static function isType($arg, $type) {\n\t\tswitch ($type) {\n\t\t\tcase self::TYPE_INTEGER: return is_int($arg);\n\t\t\tcase self::TYPE_BOOLEAN: return is_bool($arg);\n\t\t\tcase self::TYPE_FLOAT: return is_float($arg);\n\t\t\tcase self::TYPE_STRING: return is_string($arg);\n\t\t\tdefault:\n\t\t\t\tif (is_object($arg) && get_class($arg) === $type) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t}\n\t\tthrow new \\Scrivo\\SystemException(\"No such argument type\");\n\t}", "public static function checkType(string $name, $value, array $type): array\n\t{\n\t\t$result = ['isValid' => true, 'message' => ''];\n\t\tswitch($type['type']) {\n\t\t\tcase 'string':\n\t\t\t\tif(!is_string($value) && !$value instanceof DataTypes\\TypeString) {\n\t\t\t\t\t$result['isValid'] \t= false;\n\t\t\t\t\t$result['message'] \t= $name.' must be a string';\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 'int':\n\t\t\t\tif(!is_int($value) && !$value instanceof DataTypes\\TypeInt) {\n\t\t\t\t\t$result['isValid'] \t= false;\n\t\t\t\t\t$result['message'] \t= $name.' must be a int';\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 'float':\n\t\t\t\tif(!is_float($value) && !$value instanceof DataTypes\\TypeFloat) {\n\t\t\t\t\t$result['isValid'] \t= false;\n\t\t\t\t\t$result['message'] \t= $name.' must be a float';\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'boolean':\n\t\t\t\tif(!is_bool($value) && !$value instanceof DataTypes\\TypeBool) {\n\t\t\t\t\t$result['isValid'] \t= false;\n\t\t\t\t\t$result['message'] \t= $name.' must be a boolean';\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 'null':\n\t\t\t\tif($value !== NULL) {\n\t\t\t\t\t$result['isValid'] \t= false;\n\t\t\t\t\t$result['message'] \t= $name.' must be null';\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 'any':\n\t\t\t\tbreak;\t\n\n\t\t\tdefault:\n\t\t\t\tif(strpos($type['type'], '\\\\') !== false || preg_match(\"/^[A-Z]/\", $type['type'])) {\n\t\t\t\t\tif(!self::isResource($value, $type['type'])) {\n\t\t\t\t\t\t$result['isValid'] \t= false;\n\t\t\t\t\t\t$result['message'] \t= $name.' must be of type class: '.$type['type'];\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new \\RuntimeException(\"Invalid data type: \".$type['type']);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t\tif($result['isValid'] && isset($type['length']) && $type['length']) {\n\t\t\t$result = self::checkLength($name, $value, $type['type'], $type['length']);\n\t\t}\n\t\treturn $result;\n\t}", "abstract public function valid();", "private static function validateUserType(string $userType): bool\n {\n return in_array($userType, Operation::USER_TYPES);\n }", "public function checkType() {\n\t\t//Because the DB gave us a string for the card type, we must\n\t\t//ensure that they are strings and compare accordingly.\n\t\tif (strcmp($this->getTypeAsStr(), \"aspect\")==0) {\n\t\t\t$this->boostInfo = 0;\n\t\t\t$this->magnitude = 0;\n\t\t}\n\t}", "function validateTypeOfFile($type){\n\t$arrFile = ['image/png', 'image/jpg', 'image/jpeg', 'image/gif'];\n\tif(in_array($type, $arrFile)){\n\t\treturn true;\n\t}else{\n\t\treturn false;\n\t}\n}", "public function canTypeUseLength($type)\n {\n return $this->isTypeLengthRequired($type) || $this->isTypeLengthAllowed($type);\n }", "public function isTypeLengthRequired($type)\n {\n return $this->getSource()->isTypeLengthRequired($type);\n }", "public function securityCheck($type) {\n\t\t$setting = $this->getSetting($type);\n\t\tif ($setting) {\n\t\t\tif ($setting->validateRequest()) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "abstract public function isValid();", "abstract public function isValid();", "function isTextType($type)\n{\n return($type == \"string\" or $type == \"varchar\" or $type == \"tinytext\" or $type == \"password\" or\n $type == \"set\" or $type == \"enum\" or $type == \"char\" or $type == \"file\" or isTextAreaType($type));\n}", "protected function checkType($type)\n {\n return $type === 'application/x-shockwave-flash' ||\n substr_compare($type, 'audio/', 0, 6) === 0;\n }", "public function validData($data, $type = \"\"){\n switch ($type){\n case 'ug':\n case \"ul\"://user-login. no russian 4-30 characters\n preg_match('/[A-Za-z0-9\\)\\(_\\-]{4,30}/u', $data, $arr);\n return strlen($data) == strlen($arr[0]) ? $arr[0]\n : false;\n break;\n case \"un\": //user-name/surname rus+eng 2-30\n preg_match('/[А-Яа-яA-Za-z0-9\\)\\(_\\-]{2,30}/u', $data, $arr);\n return strlen($data) == strlen($arr[0]) ? $arr[0]\n : false;\n break;\n case \"up\": //user=password\n preg_match('/[\\w]{6,16}/u', $data, $arr);\n return strlen($data) == strlen($arr[0]) ? md5($arr[0])\n : false;\n break;\n case \"ue\": //user-email\n return filter_var($data, FILTER_VALIDATE_EMAIL) ? $data\n : false;\n break;\n case \"dt\": //date &year &month &day\n preg_match('/(\\d{4})\\.(\\d{1,2})\\.(\\d{1,2})/', $data, $arr);\n return checkdate($arr[2], $arr[3], $arr[1]) ? $arr[0]\n : false;\n break;\n case \"ph\": //phone 0-9{3} 0-9{7}\n preg_match('/\\d{3}-\\d{7}/', $data, $arr);\n return !empty($arr) ? $arr[0]\n : false;\n break;\n case \"gr\": //user-name/surname rus+eng 2-30\n preg_match('/[А-Яа-яA-Za-z0-9\\)\\(_\\-]{2,30}/u', $data, $arr);\n return strlen($data) == strlen($arr[0]) ? $arr[0]\n : false;\n break;\n default:\n return false;\n break;\n }\n }", "public function check($type)\n {\n switch ($type)\n {\n case Signature::TYPE_SUBSCRIBO_BASIC:\n if (empty($this->basicToken)) {\n return false;\n }\n return true;\n case Signature::TYPE_SUBSCRIBO_DIGEST:\n if (empty($this->digestToken)) {\n return false;\n }\n if (empty($this->digestSecret)) {\n return false;\n }\n return true;\n default:\n return false;\n }\n }", "public function isValueValid($value) {\n\t\treturn $value instanceof Type\\DataDownloadType;\n\t}", "public function supports($type);", "public function validateEventType(string $type): void\n {\n if ($this->payload->object_kind !== $type) {\n throw new Exception(\n \"Invalid event type. Expected {$type} but found {$this->payload->object_kind}\",\n 200\n );\n }\n }", "private function isUrlTypeOf($type, $url)\n {\n // Throw exception if type parameter is empty because we can't work without it.\n if (empty($type)) {\n throw new RequiredUrlParameterException('type', 'isUrlTypeOf');\n }\n\n // Throw exception it url parameter is empty or not passed because we can't work without it.\n if (empty($url)) {\n throw new RequiredUrlParameterException('url', 'isUrlTypeOf');\n }\n\n // Cast url to string and lowercase it.\n // Also checking if provided type is in array of allowed types.\n $type = strtolower((string) $type);\n if (!in_array($type, self::$allowedUrlTypes)) {\n throw new NotAllowedUrlTypeException(\n 'Provided type: ' .$type. ' is not in list of allowed url types. ' .\n 'Allowed url types are: ' . implode(' and ', self::$allowedUrlTypes)\n );\n }\n\n // Check if passed type is same to what identify method returns.\n if ($type == $this->identify($url)) {\n return true;\n }\n\n // Return false otherwise.\n return false;\n }", "public function acceptsDataStructure($type)\n {\n return false;\n }", "protected static function validCardFormat($number, $type) : bool\n {\n return preg_match(self::getCardFormats()[$type]['pattern'], $number ?? '');\n }", "public function isValueValid($value) {\n\t\treturn $value instanceof Type\\PropertyValueType || $value instanceof DataType\\TextType || $value instanceof DataType\\URLType;\n\t}", "function isType($input) {\n\treturn ((strcmp($input, 'dynamic') == 0) || (strcmp($input, 'static') == 0));\n}", "public function validateType($attribute)\n\t{\n\t\tif (!array_key_exists($this->type, $this->getValidTypes()))\n\t\t\t$this->addError($attribute, Yii::t('payment', 'Okänd betalningstyp'));\n\t}", "public static function validateType(int $type)\n {\n $refl = new \\ReflectionClass(self::class);\n if (!in_array($status, $refl->getConstants())) {\n throw new \\InvalidArgumentException('Does not support this type');\n }\n }", "public function isTypeLengthAllowed($type)\n {\n return $this->getSource()->isTypeLengthAllowed($type);\n }", "private function checkValid()\n\t{\n\t\tif(!$this->isValid()) {\n\t\t\tthrow new \\RuntimeException(\"TypeStruct Error: '\".get_called_class().\"' not validated to perform further operations\");\t\n\t\t}\n\t}", "public function accepts( $type );", "public static function field($value, string $type, array $params = []): bool\n {\n $validated = true;\n switch ($type) {\n case \"email\":\n $validated = self::email($value);\n\n break;\n case \"text\":\n $validated = self::str_length($value, $params);\n break;\n case \"password\":\n $validated = self::str_length($value, $params) === true && self::password($value) === true;\n\n }\n\n return $validated;\n }", "public function isType(int $type): bool\n {\n return ($this->getType() & $type) !== 0;\n }", "function accept($data,$type=NULL){\n if(is_object($data) and get_class($data)===get_class($this)) return TRUE;\n if(is_null($type)) $type = $this->get_type($data,FALSE,FALSE);\n else if(is_int($type)) $type = def(self::$types,$type,'null');\n $acc = def($this->accept,$type,0);\n if($acc<2) return $acc==1;\n $mth = 'check_' . $type;\n return $this->$mth($data);\n }", "abstract function validate(mixed $value) : bool;", "function check_type_code($type_code){\n\t\t\tif($this->db->get_where('type',array('code' => $type_code))->num_rows() > 0){\n\t\t\t\treturn true;\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "function isTimeType($type)\n{\n return($type == \"datetime\" or $type == \"time\" or $type == \"timestamp\");\n}", "public function validate()\n {\n $this->validateRequiredParameters();\n\n if (!is_string($this->getType())) {\n throw new InvalidDocumentException(\"The type parameter must be a string\");\n }\n }", "public function isValid();", "public function isValid();", "public function isValid();", "public function isValid();" ]
[ "0.81301844", "0.7605631", "0.7464584", "0.7453233", "0.74303216", "0.7374696", "0.7330754", "0.7312097", "0.73045266", "0.72687274", "0.7252112", "0.72197706", "0.7219039", "0.7069082", "0.70035636", "0.69912547", "0.6982228", "0.6960759", "0.6943651", "0.6878082", "0.6857965", "0.6848233", "0.6843088", "0.6812071", "0.6804552", "0.6799305", "0.679651", "0.67805916", "0.67743444", "0.67695665", "0.6705831", "0.6703543", "0.6698525", "0.6695648", "0.66659856", "0.6663307", "0.6658247", "0.66489786", "0.6625744", "0.6615836", "0.6605845", "0.66058344", "0.65194863", "0.6495279", "0.6487394", "0.6458125", "0.6402948", "0.63949466", "0.6370599", "0.6358606", "0.63331574", "0.63296425", "0.6328274", "0.63272583", "0.63069075", "0.6302885", "0.6291995", "0.62878174", "0.6284924", "0.626544", "0.6261645", "0.626014", "0.62549645", "0.6241157", "0.62176687", "0.6212414", "0.620921", "0.6205226", "0.61958134", "0.61654484", "0.61557734", "0.61557734", "0.6153337", "0.615127", "0.6145348", "0.61409855", "0.6137278", "0.61248255", "0.6122551", "0.6112474", "0.61086434", "0.61049175", "0.6101914", "0.60999435", "0.60980546", "0.608429", "0.6083066", "0.6079365", "0.60760754", "0.60643345", "0.60524154", "0.6044241", "0.6044231", "0.6020562", "0.6014834", "0.6009868", "0.60077745", "0.60077745", "0.60077745", "0.60077745" ]
0.6864588
20
Get instance of ADT definition
public function getDefinitionInstanceByType($a_type) { $class = $this->initTypeClass($a_type, "Definition"); return new $class(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDefinition();", "public function getDefinition();", "public function getDefinition() {}", "public function getInstanceByDefinition(ilADTDefinition $a_def)\r\n\t{\r\n\t\tif(!method_exists($a_def, \"getADTInstance\"))\r\n\t\t{\t\t\t\r\n\t\t\t$class = $this->initTypeClass($a_def->getType());\t\t\r\n\t\t\treturn new $class($a_def);\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn $a_def->getADTInstance();\r\n\t\t}\r\n\t}", "public function getDefinition()\n {\n return $this->definition;\n }", "public function getDefinition() {\n return $this->definition;\n }", "public function getDefinition() {\n return $this->definition;\n }", "public function getDefinition()\n\t{\n\t\treturn $this->definition;\n\t}", "static public function get($name)\n {\n\n if (!isset(self::$aInstances[$name]))\n {\n // echo \" returning new definition\\n\";\n self::$aInstances[$name] = new DataModel_Definition($name);\n }\n else\n // {\n // echo \" returning existing definition\\n\";\n // }\n // echo \" Count of definitions: \" . count(self::$aInstances) . \"\\n\";\n constraint_modelMustBeCalled(self::$aInstances[$name], $name);\n return self::$aInstances[$name];\n }", "public function getDef()\n {\n return $this->definition;\n }", "public function getClassDefinition();", "public static function getInstance()\r\n {\r\n return Doctrine_Core::getTable('attribute_def_value');\r\n }", "public static function instance() {\n static $_instance = null;\n if ($_instance === null) {\n $_instance = new Ontology();\n }\n return $_instance;\n }", "public function getDefinition()\n {\n $inputDefinition = parent::getDefinition();\n $inputDefinition->setArguments();\n\n return $inputDefinition;\n }", "public function getInstance(): object;", "static public function getInstance() {\n\t\treturn GeneralUtility::makeInstance('Fab\\Media\\ObjectFactory');\n\t}", "public function getType(): TypeDefinition;", "public function getDefinition(): InputDefinition\n {\n return $this->fullDefinition ?? $this->getNativeDefinition();\n }", "public function getDefinition(): array;", "public function getDefinition(): FixerDefinitionInterface;", "abstract protected function loadDefinition();", "public function getDataDefinition();", "public function getDefinition(): RuleDefinition\n {\n }", "public function getDefinition(): RuleDefinition\n {\n }", "public static function definition();", "protected function createDefinition()\n {\n $definition = new WorkflowDefinition();\n $definition->Title = \"Dummy Workflow Definition\";\n $definition->write();\n\n $stepOne = new WorkflowAction();\n $stepOne->Title = \"Step One\";\n $stepOne->WorkflowDefID = $definition->ID;\n $stepOne->write();\n\n $stepTwo = new WorkflowAction();\n $stepTwo->Title = \"Step Two\";\n $stepTwo->WorkflowDefID = $definition->ID;\n $stepTwo->write();\n\n $transitionOne = new WorkflowTransition();\n $transitionOne->Title = 'Step One T1';\n $transitionOne->ActionID = $stepOne->ID;\n $transitionOne->NextActionID = $stepTwo->ID;\n $transitionOne->write();\n\n return $definition;\n }", "public function define()\n {\n return $this->getFactoryMuffin()\n ->define(get_class($this))\n ->setDefinitions($this->definition())\n ->setMaker($this->maker());\n }", "abstract public function get_instance();", "public function definition()\n {\n \n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Designaciones');\n }", "public function getDefinition()\n {\n $definition = array(\n \"name\" => $this->name,\n \"value\" => $this->value,\n );\n\n return $definition;\n }", "public function instance();", "public function getDefinition()\n {\n $definition = array(\n \"name\" => $this->reflector->getName(),\n \"isPassedByReference\" => $this->reflector->isPassedByReference(),\n \"isArray\" => $this->reflector->isArray(),\n \"class\" => $this->reflector->getClass() ? $this->reflector->getClass()->getName() : null,\n \"isOptional\" => $this->reflector->isOptional(),\n \"isVariadic\" => version_compare(phpversion(), \"5.6.0\", \">=\") && $this->reflector->isVariadic(),\n \"defaultValue\" => null,\n );\n\n // default value\n if ($this->reflector->isDefaultValueAvailable()) {\n if (version_compare(phpversion(), \"5.4.6\", \">=\") && $this->reflector->isDefaultValueConstant()) {\n // default value as constant\n $definition[\"defaultValue\"] = $this->reflector->getDefaultValueConstantName();\n } else {\n $definition[\"defaultValue\"] = $this->reflector->getDefaultValue();\n }\n }\n\n return $definition;\n }", "function createInstance(ClassDefinition $classDefinition);", "public function getDefinitionInstances();", "abstract public function getObjectDefinitionProperty();", "public static function instance()\n {\n global $container;\n return $container->getByType(self::class);\n }", "public function getDefinition(): string {\n return \"`{$this->name}` {$this->type}\";\n }", "public function test_instance() {\n $this->assertInstanceOf(\\mediasource_bbc\\definition::class, $this->source);\n }", "public function getDefinition()\n {\n return \"\";\n }", "public function getType(string $name): ?Definition;", "public function type()\n\t{\n\t\treturn $this->definition->name;\n\t}", "public function getInstance(): object\n {\n }", "public function getDefiner();", "public function extend(string $id): DefinitionInterface;", "public function definition()\n {\n return [\n 'battle_id' => Battles::factory(),\n 'player_id' => Knight::factory()\n \n ];\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('DesignacionesEmpleados');\n }", "abstract public function instance();", "public static function getInstance()\n {\n return Doctrine_Core::getTable('CFType');\n }", "public static function instance() {\n return Doctrine::getTable('DocumentTemplate');\n }", "public function newInstance(): object\n {\n return $this->instantiator->instantiate($this->name);\n }", "public function getCopyOfDefinition()\n\t{\n\t\treturn (clone $this->definition);\t\t\n\t}", "public function getInstance()\n\t{\n\t\tif($this->classname === null) {\n\t\t\tthrow new BuildException('The classname attribute must be specified');\n\t\t}\n\t\t\n\t\tif($this->instance === null) {\n\t\t\ttry {\n\t\t\t\tPhing::import($this->classname, $this->classpath);\n\t\t\t}\n\t\t\tcatch (BuildException $be) {\n\t\t\t\t/* Cannot import the file. */\n\t\t\t\tthrow new BuildException(sprintf('Object from class %s cannot be instantiated', $this->classname), $be);\n\t\t\t}\n\t\t\t\n\t\t\t$class = $this->classname;\n\t\t\t$this->instance = new $class();\n\t\t}\n\t\treturn $this->instance;\n\t}", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Type');\n }", "public function getObject()\n\t{\n\t\t// Create the OPF instance.\n\t\treturn new Opf_Class($this->_serviceLocator->get('template.Opt'));\n\t}", "public function initDefinition($definition) {\n\t\tparent::__construct($definition);\n\t}", "public static function getInstance()\n {\n return Doctrine_Core::getTable('AgreementModelType');\n }", "public function definition()\n {\n return [\n 'name' => $this->faker->name,\n 'gadget_type_id' => GadgetType::factory(),\n 'manufacturer_id' => Manufacturer::factory(),\n ];\n }", "public function getDefinitions();", "public static function getInstance(){\r\n\r\n\t\t// This method is overriden from the singleton one simply to get correct\r\n\t\t// autocomplete annotations when returning the instance\r\n\t\t$instance = parent::getInstance();\r\n\r\n\t\treturn $instance;\r\n\t}", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Type_depot');\n }", "private function createFormDefinition()\n {\n $id = $this->getServiceId('form_type');\n if (!$this->container->has($id)) {\n $definition = new Definition($this->getServiceClass('form'));\n $definition\n ->setArguments([$this->options['entity']])\n ->addTag('form.type', [\n 'alias' => sprintf('%s_%s', $this->prefix, $this->resourceName)]\n )\n ;\n $this->container->setDefinition($id, $definition);\n }\n }", "protected function createItem()\n {\n return new PHP_Depend_Code_Class('clazz', 0);\n }", "protected function instantiate()\n\t{\n\t\t$class = get_class($this);\n\t\t$model = new $class(null);\n\t\treturn $model;\n\t}", "public function getNativeDefinition(): InputDefinition\n {\n return $this->definition ?? throw new LogicException(sprintf('Command class \"%s\" is not correctly initialized. You probably forgot to call the parent constructor.', static::class));\n }", "abstract public function getWorkflowDefinition();", "public static function init() {\n\t\treturn Factory::get_instance( self::class );\n\t}", "public static function definition()\n {\n static $def = array( 'fields' => array(\n 'id' => array(\n 'name' => 'id',\n 'datatype' => 'integer',\n 'default' => '',\n 'required' => true ),\n 'node_id' => array(\n 'name' => 'NodeID',\n 'datatype' => 'integer',\n 'default' => 0,\n 'required' => true,\n 'foreign_class' => 'eZContentObjectTreeNode',\n 'foreign_attribute' => 'id',\n 'multiplicity' => '1..*'),\n 'user_id' => array(\n 'name' => 'UserID',\n 'datatype' => 'integer',\n 'default' => 0,\n 'required' => true,\n 'foreign_class' => 'eZUser',\n 'foreign_attribute' => 'contentobject_id',\n 'multiplicity' => '1..*'),\n 'name' => array(\n 'name' => 'Name',\n 'datatype' => 'string',\n 'default' => '',\n 'required' => true ),\n 'content' => array(\n 'name' => 'Content',\n 'datatype' => 'text',\n 'default' => '',\n 'required' => true ),\n 'view_count' => array(\n 'name' => 'ViewCount',\n 'datatype' => 'integer',\n 'default' => 0,\n 'required' => false ),\n 'response_count' => array(\n 'name' => 'ResponseCount',\n 'datatype' => 'integer',\n 'default' => 0,\n 'required' => false ),\n 'state' => array(\n 'name' => 'State',\n 'datatype' => 'string',\n 'default' => self::STATUS_PUBLISHED,\n 'required' => true ),\n 'published' => array(\n 'name' => 'Published',\n 'datatype' => 'integer',\n 'default' => 0,\n 'required' => true ),\n 'modified' => array(\n 'name' => 'Modified',\n 'datatype' => 'integer',\n 'default' => 0,\n 'required' => true ),\n 'language_id' => array(\n 'name' => 'LanguageID',\n 'datatype' => 'integer',\n 'default' => 0,\n 'required' => true,\n 'foreign_class' => 'eZContentLanguage',\n 'foreign_attribute' => 'id',\n 'multiplicity' => '1..*' )\n ),\n 'function_attributes' => array(\n 'forum_node' => 'forumNode',\n 'user' => 'topicUser',\n 'is_hidden' => 'isHidden',\n 'is_published' => 'isPublished',\n 'is_validated' => 'isValidated',\n 'is_moderated' => 'isModerated',\n 'is_closed' => 'isClosed',\n 'is_visible' => 'isVisible',\n \t 'can_read' => 'canRead',\n \t 'can_delete' => 'canDelete',\n 'language_code' => 'languageCode',\n 'language_object' => 'languageObject',\n 'url_alias' => 'urlAlias'\n ),\n 'keys' => array( 'id' ),\n 'increment_key' => 'id',\n 'class_name' => 'SimpleForumTopic',\n 'name' => 'simpleforum_topic' );\n \n return $def;\n }", "public final function getDefinition($key){\n return $this->definition[$key];\n }", "public function get_instance() {\r\n\t\treturn $this->obj;\r\n\t}", "public function getDefinition()\n {\n $inputDefinition = parent::getDefinition();\n // clear out the normal first argument, which is the command name\n $inputDefinition->setArguments();\n\n return $inputDefinition;\n }", "public function getDefinition()\n {\n $inputDefinition = parent::getDefinition();\n // clear out the normal first argument, which is the command name\n $inputDefinition->setArguments();\n\n return $inputDefinition;\n }", "public function definition()\n {\n return [\n 'name' => $this->faker->slug,\n 'json' => null,\n 'dict_id' => Dict::factory(),\n ];\n }", "static public function getInstance() {\n\t\t$objectManager = GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');\n\t\treturn $objectManager->get('TYPO3\\CMS\\Vidi\\PersistenceObjectFactory');\n\t}", "public function definition()\n {\n return [\n 'name' => $this->faker->word,\n 'uri' => $this->faker->word,\n 'type' => $this->faker->word,\n 'belongs_to' => $this->faker->word,\n 'created_at' => $this->faker->date('Y-m-d H:i:s'),\n 'updated_at' => $this->faker->date('Y-m-d H:i:s'),\n 'deleted_at' => $this->faker->date('Y-m-d H:i:s')\n ];\n }", "private function createMetadataDefinition()\n {\n $id = $this->getServiceId('metadata');\n if (!$this->container->has($id)) {\n $definition = new Definition(self::CLASS_METADATA);\n $definition\n ->setFactory([new Reference($this->getManagerServiceId()), 'getClassMetadata'])\n ->setArguments([\n $this->container->getParameter($this->getServiceId('class'))\n ])//->setPublic(false)\n ;\n $this->container->setDefinition($id, $definition);\n }\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('AdManageAttr');\n }", "protected function newModelInstance()\n {\n return resolve(Arr::get(self::DOCUMENT_TYPES, $this->type));\n }", "public function getDefinition($modelName = null, $reset = false)\n {\n // reasons, but we also need a way to reliably cope when\n // (not if) the master list of definitions is emptied\n\n static $oDef = null;\n\n // special case\n if ($reset)\n {\n \t$oDef = null;\n return;\n }\n\n if ($modelName == null)\n {\n \t$modelName = get_class($this);\n }\n if ($oDef === null)\n {\n \t $oDef = DataModel_Definitions::get($modelName);\n DataModel_Definitions::registerCache($this, $modelName);\n }\n\n return $oDef;\n }", "public static function inst()\n {\n return static::get_one(__CLASS__);\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('IdeaGoal');\n }", "public function getInstance(): mixed;", "public function getDefaultDefinition(): string;", "public function create(){\r\n\treturn new $this->class();\r\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('IdeaIdeaGoal');\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Assemblage');\n }", "public function definition()\n {\n return [\n 'friendly_name' => $this->faker->word(),\n 'key' => $this->faker->slug(),\n 'type' => $this->faker->randomElement(['text', 'integer']),\n 'available_options' => [],\n 'required' => $this->faker->boolean(),\n 'default_value' => $this->faker->optional()->word,\n 'description' => $this->faker->optional()->paragraph,\n 'model_class' => $this->faker->word(),\n 'contextable_id' => $this->faker->randomNumber(),\n 'contextable_type' => $this->faker->word(),\n ];\n }", "public function getObjectTypeDefinition($objectId) { // Nice to have\n\t\t$myURL = $this->getLink($objectId, \"describedby\");\n\t\t$ret = $this->doGet($myURL);\n\t\t$obj = $this->extractTypeDef($ret->body);\n\t\t$this->cacheTypeInfo($obj);\n\t\treturn $obj;\n\t}", "public function get_instance_schema()\n {\n }", "public function get_instance_schema()\n {\n }", "public function get_instance_schema()\n {\n }", "public function get_instance_schema()\n {\n }", "public function get_instance_schema()\n {\n }", "public static function get_instance() {\r\n if (null == self::$instance)\r\n self::$instance = new DataApis();\r\n return self::$instance;\r\n }", "public static function instance();", "public function getModelsDefinition();", "public function getSearchBridgeForDefinitionInstance(ilADTDefinition $a_adt_def, $a_range = true, $a_multi = true)\r\n\t{\r\n\t\tif($a_range)\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\t$class = $this->initTypeClass($a_adt_def->getType(), \"SearchBridgeRange\");\t\r\n\t\t\t\treturn new $class($a_adt_def);\t\r\n\t\t\t}\r\n\t\t\tcatch(Exception $e)\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// multi enum search (single) == enum search (multi)\t\t\r\n\t\tif(!$a_multi &&\r\n\t\t\t$a_adt_def->getType() == \"MultiEnum\")\r\n\t\t{\r\n\t\t\t$class = $this->initTypeClass(\"Enum\", \"SearchBridgeMulti\");\t\r\n\t\t\treturn new $class($a_adt_def);\t\r\n\t\t}\t\r\n\t\t\r\n\t\tif($a_multi)\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t$class = $this->initTypeClass($a_adt_def->getType(), \"SearchBridgeMulti\");\t\r\n\t\t\t\treturn new $class($a_adt_def);\t\r\n\t\t\t}\r\n\t\t\tcatch(Exception $e)\r\n\t\t\t{\r\n\r\n\t\t\t}\r\n\t\t}\t\t\t\r\n\t\t$class = $this->initTypeClass($a_adt_def->getType(), \"SearchBridgeSingle\");\t\r\n\t\treturn new $class($a_adt_def);\t\t\t\t\t\r\n\t}", "public function setDefinition($definition) {\n $this->definition = $definition;\n return $this;\n }", "public function getInstance()\n {\n return $this->instance;\n }", "public function getInstance()\n {\n return $this->instance;\n }" ]
[ "0.7202446", "0.7202446", "0.7117087", "0.70327014", "0.650909", "0.64566433", "0.64566433", "0.6396597", "0.6234741", "0.6207323", "0.59791976", "0.5947958", "0.59183973", "0.583498", "0.5825931", "0.5794372", "0.57867825", "0.5759898", "0.5756079", "0.57560426", "0.5736088", "0.5715803", "0.57116324", "0.57116324", "0.57055366", "0.57032657", "0.56976795", "0.56820416", "0.5680406", "0.5630647", "0.5553971", "0.5550391", "0.5546056", "0.54938984", "0.5485957", "0.5481126", "0.5475615", "0.54748243", "0.5437972", "0.5405947", "0.5404638", "0.5400562", "0.5394075", "0.5391284", "0.53821224", "0.53797656", "0.53519917", "0.5341655", "0.5338162", "0.5333414", "0.53327715", "0.53302634", "0.5328691", "0.5324758", "0.5313221", "0.53060764", "0.5299279", "0.5278595", "0.526954", "0.5260619", "0.52590185", "0.5257853", "0.5257731", "0.52283055", "0.5215046", "0.5214777", "0.5212686", "0.52118456", "0.5207455", "0.51982844", "0.51976687", "0.51976687", "0.51944685", "0.5189464", "0.51860386", "0.5181581", "0.51803666", "0.51776546", "0.51719064", "0.5165264", "0.5163075", "0.5157986", "0.5156802", "0.51565087", "0.5155323", "0.51474524", "0.5146179", "0.5142904", "0.5129417", "0.5129417", "0.5129417", "0.5129417", "0.5129417", "0.51293236", "0.51195526", "0.51136297", "0.51128", "0.51083624", "0.5102362", "0.5102362" ]
0.7133288
2
Get instance of ADT
public function getInstanceByDefinition(ilADTDefinition $a_def) { if(!method_exists($a_def, "getADTInstance")) { $class = $this->initTypeClass($a_def->getType()); return new $class($a_def); } else { return $a_def->getADTInstance(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getInstance(): object;", "public static function instance()\n {\n global $container;\n return $container->getByType(self::class);\n }", "public function instance();", "abstract public function get_instance();", "abstract public function instance();", "public function getInstance(): object\n {\n }", "public static function instance() {\n static $_instance = null;\n if ($_instance === null) {\n $_instance = new Ontology();\n }\n return $_instance;\n }", "protected function instantiate()\n\t{\n\t\t$class = get_class($this);\n\t\t$model = new $class(null);\n\t\treturn $model;\n\t}", "public function get_instance() {\r\n\t\treturn $this->obj;\r\n\t}", "public function newInstance(): object\n {\n return $this->instantiator->instantiate($this->name);\n }", "public static function get_instance()\n {\n }", "public static function get_instance()\n {\n }", "public static function get_instance()\n {\n }", "public static function get_instance()\n {\n }", "public static function get_instance()\n {\n }", "public static function get_instance()\n {\n }", "public function getInstance(): mixed;", "public static function instance();", "public static function inst()\n {\n return static::get_one(__CLASS__);\n }", "public static function instance() {\n\t\treturn new self;\n\t}", "public static function me(): Instantiatable\n {\n return self::instantiate();\n }", "public function newInstance(): object;", "public static function init() \n {\n if (!isset(self::$o_instance)) \n\t\t{\n $c = __CLASS__;\n self::$o_instance = new $c;\n }\n\n return self::$o_instance;\n }", "public static function get_instance() {\n\t\tif (is_null(self::$instance)) {\n\t\t\t$className = __CLASS__;\n self::$instance = new $className;\n\t\t}\n\t\treturn self::$instance;\n\t}", "public static function get_instance() {\n\n\t\tif ( self::$_instance == null ) {\n\t\t\tself::$_instance = new GF_Akismet();\n\t\t}\n\n\t\treturn self::$_instance;\n\n\t}", "public function instance() {\n\t\t\n\t}", "public static function get_instance() {\n static $instance = null;\n if ( null === $instance ) {\n $instance = new static();\n $instance->setup_actions();\n $instance->setup_filters();\n $instance->setup_types();\n }\n return $instance;\n }", "public static function get_instance() {\r\n if (null == self::$instance)\r\n self::$instance = new DataApis();\r\n return self::$instance;\r\n }", "static function get_instance() {\n\t\tstatic $instance;\n\t\t$class = __CLASS__;\n\t\tif ( ! is_a( $instance, $class ) ) {\n\t\t\t$instance = new $class;\n\t\t}\n\t\treturn $instance;\n\t}", "public static function init() {\n\t\treturn Factory::get_instance( self::class );\n\t}", "public function getInstance()\n {\n return $this->instance;\n }", "public function getInstance()\n {\n return $this->instance;\n }", "public function getInstance()\n {\n return $this->instance;\n }", "public function getInstance()\n {\n return $this->instance;\n }", "public static function get_instance() {\n \t\tstatic $instance = null;\n \t\tif (is_null($instance)) {\n \t\t\t$instance = new self();\n \t\t}\n \t\treturn $instance;\n \t}", "public static function get_instance ();", "public function getInstance()\n {\n return $this;\n }", "static public function getInstance() {\n\t\t$objectManager = GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');\n\t\treturn $objectManager->get('TYPO3\\CMS\\Vidi\\PersistenceObjectFactory');\n\t}", "public static function getInstance(){\r\n\r\n\t\t// This method is overriden from the singleton one simply to get correct\r\n\t\t// autocomplete annotations when returning the instance\r\n\t\t$instance = parent::getInstance();\r\n\r\n\t\treturn $instance;\r\n\t}", "static public function getInstance() {\n\t\treturn GeneralUtility::makeInstance('Fab\\Media\\ObjectFactory');\n\t}", "public function getInstance() {\n\t\treturn $this->instance;\n\t}", "public static function instance() {\n\t if ( !isset( self::$instance ) ) {\n\t $className = __CLASS__;\n\t self::$instance = new $className;\n\t }\n\t return self::$instance;\n\t }", "public static function getInstance(): self;", "public static function get_instance() {\r\n\t\tstatic $instance = null;\r\n\t\tif( $instance === null ) {\r\n\t\t\t$instance = new self;\r\n\t\t}\r\n\t\treturn $instance;\r\n\t}", "public function instance() {\n\t\n\t\treturn $this;\n\t\n\t}", "public static function GetInstance(){\n if (!isset(self::$instance)) {\n $c = __CLASS__;\n self::$instance = new $c;\n }\n\n return self::$instance;\n }", "public static function get_instance() {\n\n\t\treturn null === self::$instance ? new self() : self::$instance;\n\n\t}", "public function loadTheInstance();", "public static function get_instance(){\n\t\t\tif( is_null( self::$instance ) ){\n\t\t\t\tself::$instance = new self();\n\t\t\t}\n\n\t\t\treturn self::$instance;\n\t\t}", "public function get_instance() {\n if ( null == self::$instance ) {\n self::$instance = new self;\n }\n return self::$instance;\n }", "public function construct()\n {\n return $this->object;\n }", "public static function getInstance()\n {\n static $instance;\n if ( $instance )\n\n return $instance;\n $class = get_called_class();\n # echo \"new $class\\n\";\n\n return $instance = new $class;\n }", "public static function getInstance() {}", "public static function getInstance() {}", "public static function getInstance() {}", "public static function getInstance() {}", "public static function getInstance() {}", "public static function getInstance() {}", "public static function getInstance() {}", "public static function getInstance() {\n\t\tself::init();\n\t\treturn parent::getInstance();\n\t}", "public static function getInstance() {}", "public static function getInstance() {}", "public static function getInstance() {}", "public static function get_instance() {\n\t\t\n\t\tif ( self::$_instance == null ) {\n\t\t\tself::$_instance = new self;\n\t\t}\n\n\t\treturn self::$_instance;\n\t\t\n\t}", "public static function get_instance() {\n\n\n\n\t\tif ( null === self::$_instance ) {\n\n\t\t\tself::$_instance = new self;\n\n\t\t}\n\n\n\n\t\treturn self::$_instance;\n\n\n\n\t}", "public static function getInstance()\n {\n if (self::$instance == null) {\n \n //make new istance of this class and save it to field for next usage\n $class = __class__;\n self::$instance = new $class();\n }\n\n return self::$instance;\n }", "public static function instance() {\n if (!isset(self::$singleton)) {\n self::$singleton = new OrdineFactory();\n }\n\n return self::$singleton;\n }", "public static function inst()\n {\n return new static();\n }", "public static function get_instance() {\n\t\tif( ! is_object( self::$instance ) ) {\n\t\t\t$c = __CLASS__;\n\t\t\tself::$instance = new $c();\n\t\t}\n\t\treturn self::$instance;\n\t}", "public function getDefinitionInstanceByType($a_type)\r\n\t{\r\n\t\t$class = $this->initTypeClass($a_type, \"Definition\");\t\t\r\n\t\treturn new $class();\t\t\r\n\t}", "public static function instance() {\n return new static();\n }", "public static function instance()\n {\n return new static();\n }", "public static function instance()\n {\n return new static();\n }", "public static function instance() {\n\t\tif (!Registry::exists($class=get_called_class())) {\n\t\t\t$ref=new \\Reflectionclass($class);\n\t\t\t$args=func_get_args();\n\t\t\tRegistry::set($class,\n\t\t\t\t$args?$ref->newinstanceargs($args):new $class);\n\t\t}\n\t\treturn Registry::get($class);\n\t}", "public static function getInstance()\n {\n return GeneralUtility::makeInstance(self::class);\n }", "public static function getInstance()\n {\n return GeneralUtility::makeInstance(self::class);\n }", "function get_instance($class)\n {\n }", "public static function get_instance() {\n\t\treturn self::$instance;\n\t}", "public static function get_instance() {\n\t\treturn self::$instance;\n\t}", "public static function instance() {\n\t\tif ( ! isset( self::$instance ) ) {\n\t\t\t// Setup the init\n\t\t\tself::$instance = new Mai_AEC;\n\t\t\t// Methods\n\t\t\tself::$instance->setup_constants();\n\t\t\tself::$instance->includes();\n\t\t\tself::$instance->hooks();\n\t\t}\n\t\treturn self::$instance;\n\t}", "public static function getInstance () {\n\t\tif(!isset(self::$oInstance)){\n\t\t\t$sClass = __CLASS__;\n\t\t\tself::$oInstance = new $sClass();\n\t\t}\n\t\treturn self::$oInstance;\n\t}", "public function get_instance()\n\t{\n\t\treturn $this;\n\t}", "public function get_instance()\n\t{\n\t\treturn $this;\n\t}", "function get_obj()\n {\n $object = new ApiRest;\n return $object;\n }", "public static function get_instance() {\n\n if ( ! self::$instance instanceof self ) {\n self::$instance = new self;\n }\n\n return self::$instance;\n\n }", "public static function get_instance() {\n\t\tif ( !is_a( self::$instance, __CLASS__ ) ) {\n\t\t\tself::$instance = new self();\n\t\t}\n\t\treturn self::$instance;\n\t}", "public static function instance()\n {\n return new static;\n }", "public static function instance()\n {\n return new static;\n }", "public static abstract function createInstance();", "public static function instance () {\n\t\tif ( is_null( self::$_instance ) )\n\t\t\tself::$_instance = new self();\n\t\treturn self::$_instance;\n\t}", "public static function getInstance() {\n\t\treturn parent::getInstance(__CLASS__); \n\t}", "function get_instance()\r\n{\r\n\t\r\n}", "public static function getInstance() {\n return new self();\n }", "public static function get_instance() {\n $self = __CLASS__;\n\n if ( is_null( $self::$instance ) ) {\n $self::$instance = new $self;\n }\n\n return $self::$instance;\n }", "public static function getInstance();", "public static function getInstance();", "public static function getInstance();", "public static function getInstance();", "public static function getInstance();", "public static function getInstance();" ]
[ "0.71512145", "0.7042584", "0.6944135", "0.6942822", "0.6783025", "0.6754488", "0.6686437", "0.6669435", "0.6665037", "0.6581002", "0.65632546", "0.6563135", "0.6563135", "0.6563135", "0.6563135", "0.6562312", "0.6495414", "0.6492811", "0.6468329", "0.643674", "0.6390926", "0.63619685", "0.6347299", "0.6335391", "0.6319831", "0.6303244", "0.63005126", "0.6292792", "0.6287128", "0.6277513", "0.6271287", "0.6271287", "0.6271287", "0.6271287", "0.62662035", "0.6253979", "0.62539583", "0.62490666", "0.6247445", "0.6230918", "0.62280846", "0.62091357", "0.62049085", "0.61801606", "0.6176721", "0.61759657", "0.616038", "0.6158307", "0.61559016", "0.6153655", "0.6147245", "0.61437684", "0.6132351", "0.6132351", "0.6132351", "0.6132351", "0.61321723", "0.61321723", "0.61321723", "0.6132104", "0.6131127", "0.6131127", "0.6131127", "0.6127962", "0.6125409", "0.61248064", "0.6119758", "0.6117861", "0.61148244", "0.61098355", "0.6105381", "0.6102647", "0.6102647", "0.6095892", "0.60958576", "0.60958576", "0.60901517", "0.60853755", "0.60853755", "0.60841036", "0.6083775", "0.60821974", "0.60821974", "0.6080477", "0.6077696", "0.60751766", "0.6071785", "0.6071785", "0.6071454", "0.60613483", "0.60572225", "0.6056662", "0.6056431", "0.6055359", "0.60470617", "0.60470617", "0.60470617", "0.60470617", "0.60470617", "0.60470617" ]
0.64213425
20
bridges Get form bridge instance for ADT
public function getFormBridgeForInstance(ilADT $a_adt) { $class = $this->initTypeClass($a_adt->getType(), "FormBridge"); return new $class($a_adt); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _getBridge() {}", "private function get_bridge()\n\t{\n\t\treturn $this->m_bridge;\n\t}", "function getBridgeModel() {\n return $this->bridgeModel;\n }", "public function getDBBridgeForInstance(ilADT $a_adt)\r\n\t{\r\n\t\t$class = $this->initTypeClass($a_adt->getType(), \"DBBridge\");\t\t\r\n\t\treturn new $class($a_adt);\t\r\n\t}", "public function getActiveRecordBridgeForInstance(ilADT $a_adt)\r\n\t{\r\n\t\t$class = $this->initTypeClass($a_adt->getType(), \"ActiveRecordBridge\");\t\t\r\n\t\treturn new $class($a_adt);\r\n\t}", "public function getPresentationBridgeForInstance(ilADT $a_adt)\r\n\t{\r\n\t\t$class = $this->initTypeClass($a_adt->getType(), \"PresentationBridge\");\t\t\r\n\t\treturn new $class($a_adt);\t\r\n\t}", "abstract function getForm();", "abstract protected function getForm();", "function getBridgeGateway() {\n return $this->bridgeGateway;\n }", "abstract public function getForm() : void;", "abstract public function get_gateway_form_fields();", "function getBridgeName() {\n return $this->bridgeName;\n }", "public function getBp($bp=null)\n {\n if ($bp != null && is_array($this->entity) && count($this->entity)!=0) {\n $table_name = strtolower(get_class($this));\n $query = \"SELECT * FROM $table_name WHERE bp = ?\";\n $req = Manager::bdd()->prepare($query);\n $req->execute([$bp]);\n $data = \"\";\n if ($data = $req->fetchAll(PDO::FETCH_ASSOC)) {\n$d=$data[0];\n$this->setId_entity($d['id_entity']);\n$this->setLabel($d['label']);\n$this->setDomaine($d['domaine']);\n$this->setEmail($d['email']);\n$this->setPhone_number($d['phone_number']);\n$this->setBp($d['bp']);\n$this->setLocalisation($d['localisation']);\n$this->setVille($d['ville']);\n$this->setUniqueId($d['uniqueId']);\n$this->setCreated_at($d['created_at']);\n$this->setCreated_by($d['created_by']);\n$this->setUpdate_at($d['update_at']);\n$this->setUpdate_by($d['update_by']);\n$this->entity =$data; \n return $this;\n }\n \n } else {\n return $this->bp;\n }\n \n }", "public function getForm();", "function getBridgeDhcp() {\n return $this->bridgeDhcp;\n }", "public function getForm(): FormInterface;", "abstract public function get_instance();", "public function getFormInObject()\n {\n $sExKey = null;\n\n if ($this->_iIdEntity > 0 && $this->_sSynchronizeEntity !== null && count($_POST) < 1) {\n\n $sModelName = str_replace('Entity', 'Model', $this->_sSynchronizeEntity);\n $oModel = new $sModelName;\n\n $oEntity = new $this->_sSynchronizeEntity;\n $sPrimaryKey = LibEntity::getPrimaryKeyNameWithoutMapping($oEntity);\n $sMethodName = 'findOneBy'.$sPrimaryKey;\n $oCompleteEntity = call_user_func_array(array(&$oModel, $sMethodName), array($this->_iIdEntity));\n\n if (is_object($oCompleteEntity)) {\n\n foreach ($this->_aElement as $sKey => $sValue) {\n\n\t\t\t\t\tif ($sValue instanceof \\Venus\\lib\\Form\\Input && $sValue->getType() == 'submit') {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n if ($sValue instanceof \\Venus\\lib\\Form\\Radio) {\n\n $sExKey = $sKey;\n $sKey = substr($sKey, 0, -6);\n }\n\n if ($sValue instanceof Form) {\n\n ;\n } else {\n\n $sMethodNameInEntity = 'get_'.$sKey;\n\t\t\t\t\t\tif (method_exists($oCompleteEntity, $sMethodNameInEntity)) {\n\t\t\t\t\t\t\t$mValue = $oCompleteEntity->$sMethodNameInEntity();\n\t\t\t\t\t\t}\n\n if ($sValue instanceof \\Venus\\lib\\Form\\Radio && method_exists($this->_aElement[$sExKey], 'setValueChecked')) {\n\n $this->_aElement[$sExKey]->setValueChecked($mValue);\n } else if (isset($mValue) && method_exists($this->_aElement[$sKey], 'setValue')) {\n\n $this->_aElement[$sKey]->setValue($mValue);\n }\n }\n }\n }\n }\n\n $oForm = new \\StdClass();\n $oForm->start = '<form name=\"form'.$this->_iFormNumber.'\" method=\"post\" enctype=\"multipart/form-data\"><input type=\"hidden\" value=\"1\" name=\"validform'.$this->_iFormNumber.'\">';\n $oForm->form = array();\n\n foreach ($this->_aElement as $sKey => $sValue) {\n\n if ($sValue instanceof Container) {\n\n $oForm->form[$sKey] = $sValue;\n } else {\n\n $oForm->form[$sKey] = $sValue->fetch();\n }\n }\n\n $oForm->end = '</form>';\n\n return $oForm;\n }", "function getMbrid() {\n return $this->_mbrid;\n }", "public static function getForm();", "abstract public function bindForm();", "abstract public function bindForm();", "protected function getVictoireForm_Form_Type_VicLinkService()\n {\n return $this->services['victoire_form.form.type.vic_link'] = new \\Victoire\\Bundle\\FormBundle\\Form\\Type\\LinkType(array(), $this->get('victoire_view_reference.repository'), array(0 => 'fr', 1 => 'en'), $this->get('request_stack'), array(0 => 'modal'));\n }", "protected function form()\n {\n $Adv=new Adv();\n $form = new Form($Adv);\n $platform= $Adv->platform;\n $type= $Adv->type;\n $status= $Adv->status;\n $list_array=[\n array(\"field\"=>\"title\",\"title\"=>\"标题\",\"type\"=>\"text\"),\n array(\"field\"=>\"platform\",\"title\"=>\"平台\",\"type\"=>\"select\",\"array\"=>$platform),\n array(\"field\"=>\"type\",\"title\"=>\"类型\",\"type\"=>\"select\",\"array\"=>$type),\n array(\"field\"=>\"image\",\"title\"=>\"图片\",\"type\"=>\"image\"),\n array(\"field\"=>[\"start_time\",\"end_time\"],\"title\"=>\"活动时间\",\"type\"=>\"datetimeRange\"),\n array(\"field\"=>\"font1\",\"title\"=>\"字段1\",\"type\"=>\"text\"),\n array(\"field\"=>\"font2\",\"title\"=>\"字段2\",\"type\"=>\"text\"),\n array(\"field\"=>\"font3\",\"title\"=>\"字段3\",\"type\"=>\"text\"),\n array(\"field\"=>\"font4\",\"title\"=>\"字段4\",\"type\"=>\"text\"),\n array(\"field\"=>\"font5\",\"title\"=>\"字段5\",\"type\"=>\"text\"),\n array(\"field\"=>\"status\",\"title\"=>\"状态\",\"type\"=>\"switch\",\"array\"=>$status),\n array(\"field\"=>\"created_at\",\"title\"=>\"创建时间\",\"type\"=>\"value\")\n ];\n BaseControllers::set_form($form,$list_array);\n return $form;\n }", "public function getAcroForm() {}", "public function getAcroForm() {}", "function getBridgeNetmask() {\n return $this->bridgeNetmask;\n }", "abstract protected function instantiateForm(): FormInterface;", "public function makeBridge()\n {\n //Return the bridge\n return app('PersonalityInsightsBridge', ['credentialsName' => $this->getCredentialsName()])->appendHeaders($this->getHeaders());\n }", "public function getIndirectObject() {}", "public function getIndirectObject() {}", "function dennis_client_field_client_instance($bundle, $entity_type) {\n return array(\n 'bundle' => $bundle,\n 'default_value' => NULL,\n 'deleted' => '0',\n 'description' => 'Changes the targeting of adverts to the selected client.',\n 'display' => array(\n 'default' => array(\n 'label' => 'above',\n 'settings' => array(),\n 'type' => 'hidden',\n 'weight' => 0,\n ),\n ),\n 'entity_type' => $entity_type,\n 'field_name' => 'field_client',\n 'label' => 'Client',\n 'required' => 0,\n 'settings' => array(\n 'user_register_form' => FALSE,\n ),\n 'widget' => array(\n 'active' => 1,\n 'module' => 'options',\n 'settings' => array(),\n 'type' => 'options_select',\n 'weight' => '2.5',\n ),\n );\n}", "public function bridge()\n {\n return new Bridge($this->talker);\n }", "abstract protected function getBusClass(): string;", "function getBdd()\n{\n\treturn $bdd;\n}", "function make_form_row(){\n\t\tswitch($this->fieldType){\n\t\t\tcase 'id':\n\t\t\t\treturn $this->obo_id();\n\t\t\t\tbreak;\n\t\t\tcase 'term':\n\t\t\t\treturn $this->obo_term();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$form = parent::make_form_row();\n\t\t\n\t\t}\n\t\treturn $form;\n\t\n\t}", "function get_instance()\r\n{\r\n\t\r\n}", "function bounce_tab_connection() {\n $form_fields = array();\n $form_fields['bounce_email'] = array(\n 'type' => 'input',\n 'size' => 38,\n 'label' => __('Bounce Email', WYSIJA));\n\n $form_fields['bounce_host'] = array(\n 'type' => 'input',\n 'size' => 38,\n 'label' => __('Hostname', WYSIJA));\n\n $form_fields['bounce_login'] = array(\n 'type' => 'input',\n 'size' => 38,\n 'label' => __('Login', WYSIJA));\n $form_fields['bounce_password'] = array(\n 'type' => 'password',\n 'size' => 38,\n 'label' => __('Password', WYSIJA));\n $form_fields['bounce_port'] = array(\n 'type' => 'input',\n 'label' => __('Port', WYSIJA),\n 'size' => '4',\n 'style' => 'width:10px;');\n $form_fields['bounce_connection_method'] = array(\n 'type' => 'dropdown',\n 'values' => array('pop3' => 'POP3', 'imap' => 'IMAP', 'pear' => __('POP3 without imap extension', WYSIJA), 'nntp' => 'NNTP'),\n 'label' => __('Connection method', WYSIJA));\n $form_fields['bounce_connection_secure'] = array(\n 'type' => 'radio',\n 'values' => array('' => __('No', WYSIJA), 'ssl' => __('Yes', WYSIJA)),\n 'label' => __('Secure connection(SSL)', WYSIJA));\n $form_fields['bounce_selfsigned'] = array(\n 'type' => 'selfsigned',\n 'label' => __('Self-signed certificates', WYSIJA));\n\n $multisite_prefix = '';\n if (is_multisite()) {\n $temp_array = array();\n $multisite_prefix = 'ms_';\n foreach ($form_fields as $key => $field) {\n $field['id'] = $key;\n $temp_array[$multisite_prefix . $key] = $field;\n }\n $form_fields = $temp_array;\n }\n\n $html_content = '<table class=\"form-table\"><tbody>';\n $html_content .= $this->viewObj->buildMyForm($form_fields, '', 'config');\n\n $name = $multisite_prefix . 'bouncing_emails_each';\n $id = str_replace('_', '-', $name);\n\n $value = $this->viewObj->model->getValue($name);\n $helper_forms = WYSIJA::get('forms', 'helper');\n $field = $helper_forms->dropdown(array('name' => 'wysija[config][' . $name . ']', 'id' => $id), array('fifteen_min' => __('15 minutes', WYSIJA),\n 'thirty_min' => __('30 minutes', WYSIJA),\n 'hourly' => __('1 hour', WYSIJA),\n 'two_hours' => __('2 hours', WYSIJA),\n 'twicedaily' => __('Twice daily', WYSIJA),\n 'daily' => __('Day', WYSIJA)), $value);\n\n $checked = '';\n if ($this->viewObj->model->getValue($multisite_prefix . 'bounce_process_auto'))\n $checked = ' checked=\"checked\" ';\n $html_content .= '<tr><td><label for=\"bounce-process-auto\"><input type=\"checkbox\" ' . $checked . ' id=\"bounce-process-auto\" value=\"1\" name=\"wysija[config][' . $multisite_prefix . 'bounce_process_auto]\" />\n ' . __('Activate bounce and check every...', WYSIJA) . '</label></td><td id=\"bounce-frequency\">' . $field . '</td></tr>';\n\n // try to connect button\n $html_content .= '<tr><td><a class=\"button-secondary\" id=\"bounce-connector\">' . __('Does it work? Try to connect.', WYSIJA) . '</a></td><td></td></tr>';\n\n\n $html_content .= '</tbody></table>';\n return $html_content;\n }", "abstract protected function getBusClass();", "protected function form()\n {\n return Form::make(new Linkman(), function (Form $form) {\n $form->display('id');\n $form->text('name');\n $form->text('mobile')->saving(function ($value) {\n return (string) $value;\n });\n $form->text('gender');\n $form->text('birthday')->saving(function ($value) {\n return (string) $value;\n });\n $form->text('province_id');\n $form->text('city_id');\n $form->text('area_id');\n $form->text('address')->saving(function ($value) {\n return (string) $value;\n });\n $form->text('description');\n $form->text('nickname')->saving(function ($value) {\n return (string) $value;\n });\n \n $form->display('created_at');\n $form->display('updated_at');\n });\n }", "public function get_active_instance() { \n\n\n\t}", "abstract function form();", "function B_M() {\n\treturn Bonster_Management::instance();\n}", "public function generateMergeBaseFormAction()\n {\n $options = $this->_getParam('bases');\n $site = \\Fisdap\\EntityUtils::getEntity(\"SiteLegacy\", $this->_getParam(\"site_id\"));\n\n foreach ($options as $id => $text) {\n $base = \\Fisdap\\EntityUtils::getEntity(\"BaseLegacy\", $id);\n if ($base->getAddressString() != '') {\n $options[$id] .= \": \".$base->getAddressString();\n } else {\n $options[$id] .= \": no address entered\";\n }\n }\n \n $form = new Account_Form_Modal_MergeBasesModal($options, $site->id);\n $this->_helper->json($form->__toString());\n }", "public function get_active_instance() {\n\n\n }", "function getInputForm() {\n\t\treturn new \\Flux\\Lead();\n\t}", "abstract protected function getDefaultViewForm();", "public static function get_model_dba() {\n $model_dba_id = Doggy_Config::get('app.model.dba');\n return self::get_dba(empty($model_dba_id)?'default':$model_dba_id);\n\t}", "public function model()\n {\n return Rba::class;\n }", "function _erpal_contract_helper_config_basic() {\n $form = drupal_get_form('erpal_contract_helper_config_form');\n\n return $form;\n}", "public function getForm()\n {\n RETURN $this->strategy->getForm();\n }", "public function bridgeLoad( $class_name ){\r\n\t!defined('BAY_OMIT_CONTROLLER_CONSTRUCT') && define('BAY_OMIT_CONTROLLER_CONSTRUCT',true);\r\n\tif( !isset($this->bridge) ){\r\n\t require_once 'iSellBase.php';\r\n\t $this->bridge=new iSellBase();\r\n\t}\r\n\treturn $this->bridge->LoadClass($class_name);\r\n }", "public function getFormFieldBuilder(): FormFieldBuilder;", "public function\tgetReferidoInfo(){\r\t\t\r\t\t$model_ref = $this->getModel( 'referido' );\r\t\t$idref = JRequest::getInt( 'idref' );\r\t\t\r\t\t$model_ref->instance( $idref );\r\t\t$inf_ref = $model_ref->getReferidoInf();\r\t\t\r\t\tif( !empty($inf_ref) ){\r\t\t\t\r\t\t\t$model_ref\r\t\t}\r\t\t\r\t}", "protected function form()\n {\n $form = new Form(new BackPeopleInfo());\n\n $form->text('name', __('姓名'));\n $form->text('id_num', __('身份证号码'));\n $form->mobile('phone', __('手机号码'));\n $form->text('address', __('楼栋房号'));\n $form->text('originatin', __('始发地'));\n $form->date('back_date', __('返回日期'))->default(date('Y-m-d'));\n $form->date('isolate_date', __('隔离日期'))->default(date('Y-m-d'));\n $form->text('isolate_flag', __('解除隔离'))->default('否');\n $form->text('isolate_level', __('隔离等级'))->default('普通');\n $form->text('qrcode_flag', __('网格化管理'))->default('否');\n $form->text('vehicle_info', __('交通工具'));\n $form->text('remarks', __('备注'));\n\n return $form;\n }", "public function getAfraModel()\n {\n return $this->_aframark;\n }", "public static function & GetInstance ();", "public function getForm($object = null) : \\Dms\\Core\\Form\\IForm;", "protected function form()\n {\n $form = new Form(new Advertisement);\n\n $form->text('title', 'العنوان')->rules('required');\n $form->text('slug')->disable();\n $form->textarea('details', 'التفاصيل')->rules('required');\n $form->select('user_id', 'المستخدم')->options(User::pluck('mobile', 'id')->all())->rules('required');\n $form->select('category_id', 'القسم')->options(Category::pluck('title_ar', 'id')->all())->rules('required');\n // $form->select('city_id', 'المدينة')->options(City::pluck('title', 'id')->all())->rules('required');\n $form->multipleImage('images', 'الصور')->removable();\n $form->radio('status', 'الحالة')->options(\n [\n -1 => 'قيد المراجعة',\n 1 => 'مقبول',\n 0 => 'مرفوض',\n ]\n )->rules('required');\n $form->radio('type', 'النوع')->options(\n [\n 'sell' => 'بيع',\n 'rental' => 'إيجار',\n ]\n )->rules('required');\n $form->radio('featured', 'مميز')->options(\n [\n 1 => 'نعم',\n -1 => 'لا',\n ]\n )->rules('required');\n \n $form->number('area', 'المساحة')->rules('required');\n $form->currency('price', 'السعر')->symbol('ر.س')->rules('required');\n $form->map('ad_lat', 'ad_long', 'الخريطة')->useGoogleMap();\n $form->text('location', 'الموقع الجغرافي');\n return $form;\n }", "function getBridgeMacAddress() {\n return $this->bridgeMacAddress;\n }", "function getBackend() ;", "public function getConfigForm() {\n $rooms = array();\n\n $rooms['0'] = 'None';\n\n $regions = array();\n\n //die($this->getHouse());\n\n $housesService = new HomeNet_Model_House_Service();\n $house = $housesService->getObjectByIdWithRooms($this->getHouse());\n\n $r = $housesService->getHouseRegionNames($this->getHouse());\n\n foreach($r as $region){\n $regions[$region['id']] = $region['name'];\n }\n\n foreach($house->rooms as $room){\n $region = $regions[$room->region];\n $rooms[$region][$room->id] = $room->name;\n }\n\n $form = new Zend_Form();\n\n $subdevices = $this->getSubdevices();\n\n //debugArray($this->settings);\n // die(debugArray($subdevices));\n\n foreach ($subdevices as $position => $subdevice) {\n\n $sub = $subdevice->getConfigForm();\n\n \n if (!empty($subdevice)) {\n \n //set default name\n $name = $sub->getElement('name');//\n if(empty($subdevice->name) && !empty($this->settings['subdevice'.$position.'name'])){\n $name->setValue($this->settings['subdevice'.$position.'name']); \n } \n \n $room = $sub->getElement('room');\n $room->setMultiOptions($rooms);\n\n if(empty($subdevice->room)){\n $room->setValue($this->getRoom());\n }\n\n $sub->setLegend('Subdevice ' . $position . ': ' . $subdevice->name);\n\n $form->addSubForm($sub, 'subdevice' . $position);\n }\n }\n\n //die(debugArray($sub));\n\n return $form;\n }", "protected function getDatabaseTransferObjectAssembler()\n {\n return $this->databaseTransferObjectAssembler;\n }", "protected function getGateway($name) {\n\t\t$class = get_class($this);\n\t\t\n\t\tif($name === $this->getName())\n\t\t\treturn $this;\n\t\t\n\t\t// load in the model if it hasn't been loaded yet\n\t\t$this->_model_dict[$name];\n\t\t\n\t\t$temp = class_name(\"{$name} gateway\");\n\t\t\n\t\tif(class_exists($temp, FALSE))\n\t\t\t$class = $temp;\n\t\t\n\t\treturn new $class(\n\t\t\t$this->_resource, \n\t\t\t$this->_type_handler\n\t\t);\n\t}", "public function get_form() {\n\t\treturn $this;\n\t}", "abstract public function createForm();", "abstract public function createForm();", "private function getBoundTarget()\n {\n return $this->getFormDataBinder()->get();\n }", "public function accessForm(): IFormElement;", "public abstract function getBackend();", "function GetForm($state, $curchild = null)\r\n\t{\r\n\t\tif ($this->state == STATE_CREATE && !$this->Behavior->AllowCreate)\r\n\t\t\treturn;\r\n\r\n\t\t$fullname = $this->Name;\r\n\t\tif ($curchild != null) $fullname .= '_'.$curchild;\r\n\t\t$ci = Server::GetState($this->Name.'_ci');\r\n\r\n\t\tif ($this->type == CONTROL_BOUND)\r\n\t\t{\r\n\t\t\tif ($this->state == STATE_CREATE)\r\n\t\t\t{\r\n\t\t\t\tif (!empty($this->ds->FieldInputs))\r\n\t\t\t\tforeach ($this->ds->FieldInputs as $k => $fi)\r\n\t\t\t\t\tif (is_object($fi) && $fi->attr('TYPE') == 'label')\r\n\t\t\t\t\t\tunset($this->ds->FieldInputs[$k]);\r\n\t\t\t}\r\n\t\t\t$context = isset($curchild) ? $this->ds->children[$curchild] :\r\n\t\t\t\t$this;\r\n\r\n\t\t\tif (!isset($this->ds)) Error(\"<br />What: Dataset is not set.\r\n\t\t\t\t<br />Where: EditorData({$this->Name})::GetForm.\r\n\t\t\t\t<br />Why: This editor was not created with a proper dataset.\");\r\n\r\n\t\t\tforeach ($this->handlers as $handler)\r\n\t\t\t{\r\n\t\t\t\t$joins = $handler->GetJoins();\r\n\t\t\t\tif (!empty($joins))\r\n\t\t\t\tforeach ($joins as $ix => $j) $this->ds->joins[$ix] = $j;\r\n\t\t\t\t\t//$joins = array_merge($joins, $join);\r\n\t\t\t}\r\n\r\n\t\t\t$sel = $state == STATE_EDIT ? $context->ds->Get(array(\r\n\t\t\t\t'match' => array($context->ds->id => $ci),\r\n\t\t\t\t\t'joins' => @$joins)) : null;\r\n\r\n\t\t\t$ds = $context->ds;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$ds = $this->ds;\r\n\t\t\tif (!empty($ds->FieldInputs))\r\n\t\t\tforeach (array_keys($ds->FieldInputs) as $n)\r\n\t\t\t{\r\n\t\t\t\tif (isset($this->values[$n]))\r\n\t\t\t\t\t$ds->FieldInputs[$n]->attr('VALUE', $this->values[$n]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (!empty($ds->FieldInputs))\r\n\t\t{\r\n\t\t\t$frm = new Form($fullname, null, false);\r\n\r\n\t\t\tif (isset($ds->Validation))\r\n\t\t\t{\r\n\t\t\t\t$frm->Validation = $ds->Validation;\r\n\t\t\t\t$frm->Errors = $ds->Errors;\r\n\t\t\t}\r\n\r\n\t\t\tif ($state == STATE_EDIT || $this->type != CONTROL_BOUND)\r\n\t\t\t{\r\n\t\t\t\t$frm->AddHidden('ci', $ci);\r\n\t\t\t\tif (!empty($this->assoc))\r\n\t\t\t\t\t$frm->AddHidden($this->assoc, $this->Name);\r\n\t\t\t}\r\n\r\n\t\t\tglobal $PERSISTS;\r\n\t\t\tif (!empty($PERSISTS))\r\n\t\t\t\tforeach ($PERSISTS as $key => $val)\r\n\t\t\t\t\t$frm->AddHidden($key, $val);\r\n\r\n\t\t\tif (isset($curchild))\r\n\t\t\t{\r\n\t\t\t\t$frm->AddHidden('parent', $ci);\r\n\t\t\t\t$frm->AddHidden('child', $curchild);\r\n\t\t\t}\r\n\r\n\t\t\tforeach ($ds->FieldInputs as $col => $in)\r\n\t\t\t{\r\n\t\t\t\tif (is_object($in))\r\n\t\t\t\t{\r\n\t\t\t\t\tif ($in->attr('TYPE') == 'custom') //Callback\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$cb = $in->attr('VALUE');\r\n\t\t\t\t\t\tcall_user_func($cb, isset($sel) ? $sel : null,\r\n\t\t\t\t\t\t\t$frm, $col);\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ($in->attr('TYPE') == 'select' || $in->attr('TYPE') == 'radios')\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$val = $in->attr('VALUE');\r\n\t\t\t\t\t\tif (isset($sel) && isset($val[$sel[0][$col]]))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$val[$sel[0][$col]]->selected = true;\r\n\t\t\t\t\t\t\t$in->attr('VALUE', $val);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ($in->attr('TYPE') == 'file')\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif (!empty($in->atrs['EXTRA']))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$vp = new VarParser();\r\n\t\t\t\t\t\t\t$glob = $vp->ParseVars($in->attr('VALUE'), $sel[0]);\r\n\t\t\t\t\t\t\t$files = glob($glob.'.*');\r\n\r\n\t\t\t\t\t\t\tswitch ($in->atrs['EXTRA'])\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tcase 'thumb':\r\n\t\t\t\t\t\t\t\t\t$in->help = '<img src=\"'\r\n\t\t\t\t\t\t\t\t\t.(empty($files) ? 'xedlib/images/cross.png'\r\n\t\t\t\t\t\t\t\t\t: $files[0]).'\" />';\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\tcase 'exists':\r\n\t\t\t\t\t\t\t\t\t$in->help = '<img src=\"xedlib/images/'.\r\n\t\t\t\t\t\t\t\t\t(empty($files) ? 'cross.png' : 'tick.png').\r\n\t\t\t\t\t\t\t\t\t'\" />';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif ($in->attr('TYPE') == 'password') $in->attr('VALUE', '');\r\n\t\t\t\t\t\telse if (isset($sel[0][$col]))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif ($in->attr('TYPE') == 'date')\r\n\t\t\t\t\t\t\t\t$in->attr('VALUE', strftime('%x',\r\n\t\t\t\t\t\t\t\t\tDatabase::MyDateTimestamp($sel[0][$col])));\r\n\t\t\t\t\t\t\telse if ($in->attr('TYPE') == 'datetime')\r\n\t\t\t\t\t\t\t\t$in->attr('VALUE', Database::MyDateTimestamp($sel[0][$col], true));\r\n\t\t\t\t\t\t\telse $in->attr('VALUE', $sel[0][$col]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$in->attr('NAME', $this->Name.'_'.$col);\r\n\r\n\t\t\t\t\tif (isset($this->Errors[$in->attr('NAME')]))\r\n\t\t\t\t\t\t$in->help = $this->Errors[$in->atrs['NAME']];\r\n\t\t\t\t\t$in->attr('CLASS', 'editor_input');\r\n\r\n\t\t\t\t\t$frm->AddInput($in);\r\n\t\t\t\t}\r\n\t\t\t\telse if (is_numeric($col)) $frm->AddInput('&nbsp;');\r\n\t\t\t}\r\n\r\n\t\t\tforeach ($this->handlers as $handler)\r\n\t\t\t{\r\n\t\t\t\t//Use plural objects to compliment the joins property.\r\n\t\t\t\t//For some reason I change this to a single item when\r\n\t\t\t\t//it can be multiple.\r\n\r\n\t\t\t\t$handler->GetFields($this, $frm,\r\n\t\t\t\tisset($sel) ? $sel[0][$this->ds->id] : null,\r\n\t\t\t\tisset($sel) ? $sel : null);\r\n\t\t\t}\r\n\r\n\t\t\t$frm->State = $state == STATE_EDIT || $this->type != CONTROL_BOUND\r\n\t\t\t\t? 'Update' : 'Create';\r\n\t\t\t$frm->Description = $ds->Description;\r\n\t\t\t$frm->AddInput(\r\n\t\t\t\t$frm->GetSubmitButton($this->Name.'_action', $frm->State).\r\n\t\t\t\t($state == STATE_EDIT && $this->type == CONTROL_BOUND ?\r\n\t\t\t\t'<input type=\"submit\" name=\"'.$this->Name.'_action\" value=\"Cancel\" class=\"btn\" />'\r\n\t\t\t\t: null)\r\n\t\t\t);\r\n\r\n\t\t\treturn $frm;\r\n\t\t}\r\n\t}", "function guifi_radio_add_link2ap_submit(&$form,&$form_state) {\n $radio_id =$form_state['clicked_button']['#parents'][1];\n $interface_id=$form_state['clicked_button']['#parents'][2];\n guifi_log(GUIFILOG_TRACE,\n sprintf(\"function guifi_radio_add_link2ap_submit(Radio: %d, Interface: %d)\",\n $radio_id, $interface_id),\n $form_state['clicked_button']['#parents']);\n\n $form_state['rebuild'] = TRUE;\n $form_state['action'] = 'guifi_radio_add_link2ap_form';\n\n // initialize the filters\n $form_state['filters'] = array(\n 'dmin' => 0,\n 'dmax' => 10,\n 'search' => NULL,\n 'type' => 'ap/client',\n 'mode' => $form_state['values']['radios'][$radio_id]['mode'],\n 'from_node' => $form_state['values']['nid'],\n 'from_device' => $form_state['values']['id'],\n 'from_radio' => $radio_id,\n 'azimuth' => \"0,360\",\n );\n\n $form_state['link2apInterface'] =\n &$form_state['values']['radios'][$radio_id]['interfaces'][$interface_id];\n\n return;\n}", "public function getFieldInstanceByName($name)\n\t{\n\t\t$moduleName = $this->getModule()->getName(true);\n\t\t$fieldsLabel = $this->getEditFields();\n\t\t$params = ['uitype' => 1, 'column' => $name, 'name' => $name, 'label' => $fieldsLabel[$name], 'displaytype' => 1, 'typeofdata' => 'V~M', 'presence' => 0, 'isEditableReadOnly' => false];\n\t\tswitch ($name) {\n\t\t\tcase 'crmid':\n\t\t\t\t$params['uitype'] = 10;\n\t\t\t\t$params['referenceList'] = ['Contacts'];\n\t\t\t\tbreak;\n\t\t\tcase 'istorage':\n\t\t\t\t$params['uitype'] = 10;\n\t\t\t\t$params['referenceList'] = ['IStorages'];\n\t\t\t\t$params['typeofdata'] = 'V~O';\n\t\t\t\tbreak;\n\t\t\tcase 'status':\n\t\t\t\t$params['uitype'] = 16;\n\t\t\t\t$params['picklistValues'] = [1 => \\App\\Language::translate('PLL_ACTIVE', $moduleName), 0 => \\App\\Language::translate('PLL_INACTIVE', $moduleName)];\n\t\t\t\tbreak;\n\t\t\tcase 'server_id':\n\t\t\t\t$servers = Settings_WebserviceApps_Module_Model::getActiveServers($this->getModule()->typeApi);\n\t\t\t\t$params['uitype'] = 16;\n\t\t\t\tforeach ($servers as $key => $value) {\n\t\t\t\t\t$params['picklistValues'][$key] = $value['name'];\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'type':\n\t\t\t\t$params['uitype'] = 16;\n\t\t\t\t$params['picklistValues'] = [];\n\t\t\t\tforeach ($this->getTypeValues() as $key => $value) {\n\t\t\t\t\t$params['picklistValues'][$key] = \\App\\Language::translate($value, $moduleName);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'language':\n\t\t\t\t$params['typeofdata'] = 'V~O';\n\t\t\t\t$params['uitype'] = 32;\n\t\t\t\t$params['picklistValues'] = \\App\\Language::getAll();\n\t\t\t\tbreak;\n\t\t\tcase 'user_id':\n\t\t\t\t$params['uitype'] = 16;\n\t\t\t\t$params['picklistValues'] = \\App\\Fields\\Owner::getInstance($moduleName)->getAccessibleUsers('', 'owner');\n\t\t\t\tbreak;\n\t\t\tcase 'password_t':\n\t\t\t\t$params['typeofdata'] = 'P~M';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t\treturn Settings_Vtiger_Field_Model::init($moduleName, $params);\n\t}", "function lib4ridora_citation_subtype_form_options() {\n module_load_include('inc', 'xml_form_builder', 'includes/associations');\n $forms = array();\n foreach (xml_form_builder_get_associations(array(), array(), array('MODS')) as $id => $association) {\n $forms[$association['form_name']] = $association['form_name'];\n }\n return $forms;\n}", "public function getFormFiller() {}", "public function getFormFiller() {}", "function form( $instance )\n { \n }", "public function buildUnmanagedForm(FormBuilderInterface $builder)\n {\n $builder\n // Client fields\n ->add('idastro', 'text', [\n 'required' => false,\n 'label' => 'ID Astro',\n ])\n ->add('phones', 'text', [\n 'required' => false,\n 'label' => 'Téléphone',\n ])\n ->add('name', 'text', [\n 'required' => false,\n 'label' => 'Prénom',\n ])\n ->add('mail', 'text', [\n 'required' => false,\n 'label' => 'Adresse mail',\n ])\n ->add('birthdate', 'date', [\n 'label' => 'Date de naissance',\n ] + $this->getDatetimeConfig())\n ->add('page', 'hidden', [\n 'attr' => ['class' => 'js-page-target'],\n ])\n ->add('dateBegin', 'date', [\n 'label' => 'Date d\\'inscription',\n ] + $this->getDatetimeConfig());\n }", "protected function form()\n {\n return Admin::form(Banner::class, function (Form $form) {\n\n $form->display('id', 'ID');\n $form->radio('place','广告类型')->options(['wx'=>'微信公众号二维码','wap_banner'=>'手机端首页轮播图','banner'=>'电脑端首页轮播图'])->default('banner');\n $form->text('sort','广告显示权重')->placeholder('显示权重越大,该广告越靠前显示');\n $form->image('src', '广告图片');\n $form->saving(function(Form $form){\n if(!$form->sort){\n $form->sort=0;\n }\n });\n });\n }", "function ga_formulario_instancia() {\n // ID del metabox\n $metabox_id = 'ga_enviar_receta';\n \n // No aplica el object_id ya que se va a generar automaticamente al crearlo.\n $object_id = 'fake-object-id';\n \n return cmb2_get_metabox($metabox_id, $object_id);\n}", "protected function form()\n {\n $form = new Form(new Banner);\n\n $form->text('title', 'Title');\n $form->image('image', 'Image')->rules('required')->move('images/banners');\n $form->switch('status', 'Published')->default(1);\n\n $form->footer(function ($footer) {\n // disable `View` checkbox\n $footer->disableViewCheck();\n\n // disable `Continue editing` checkbox\n $footer->disableEditingCheck();\n\n // disable `Continue Creating` checkbox\n $footer->disableCreatingCheck();\n\n });\n return $form;\n }", "public function form( $instance ){\n }", "protected abstract function _getBackend();", "public function _loadRealInstance() {}", "protected function form()\n {\n // 创建一个表单\n return Admin::form(Banner::class, function (Form $form) {\n $form->tools(function (Form\\Tools $tools) {\n // 去掉`删除`按钮\n $tools->disableDelete();\n // 去掉`查看`按钮\n $tools->disableView();\n });\n\n $form->text('title', 'banner名称')->rules('required');\n $form->text('link', 'PC 端链接')->rules('required');\n $form->text('mini_link', '小程序链接');\n\n $form->image('image', 'banner图片')->rules('required');\n $form->image('app_image', '移动端banner图片');\n\n $form->text('sort', '排序(数字越小越靠前)')->default(0);\n });\n }", "abstract public function getForm($formId);", "public function get()\n {\n $object = $this->_object;\n $this->_object = $this->_form;\n return $object;\n }", "public function transactionGetForm ();", "abstract protected function getFormType(): string;", "public function getObject() {\n return $this->form->getObject();\n }", "public function loadTheInstance();", "public function model()\n {\n return Farmer_c::class;\n }", "public function driver_bus(){\n return $this->hasOne('App\\Models\\Bus','assistant_1');\n }", "static function _getLibrary() {\n\t\treturn self::webiny()->getConfig()->get('bridges.image', self::$_library);\n\t}", "public function get_instance() {\r\n\t\treturn $this->obj;\r\n\t}", "function form( $instance ) {\r\n\t}", "function form( $instance ) {\r\n\t}", "function dennis_client_field_exclude_client_branding_instance($bundle, $entity_type) {\n return array(\n 'bundle' => $bundle,\n 'default_value' => array(\n 0 => array(\n 'value' => 0,\n ),\n ),\n 'deleted' => '0',\n 'description' => '',\n 'display' => array(\n 'default' => array(\n 'label' => 'above',\n 'settings' => array(),\n 'type' => 'hidden',\n 'weight' => 0,\n ),\n ),\n 'entity_type' => $entity_type,\n 'field_name' => 'field_exclude_client_branding',\n 'label' => 'Exclude client branding on this ' . str_replace('_', ' ', $entity_type),\n 'required' => 0,\n 'settings' => array(\n 'user_register_form' => FALSE,\n ),\n 'widget' => array(\n 'active' => 1,\n 'module' => 'options',\n 'settings' => array(\n 'display_label' => 1,\n ),\n 'type' => 'options_onoff',\n 'weight' => '2.8',\n ),\n );\n}", "public function newAction()\n {\n\n $request=$this->getRequest();\n\n $tipo = $request->get('tipo'); // tipo de contratacion = 1- nombramiento, 2-contrato\n $tipocontratacion = $request->get('tipocontratacion'); // quien se contrata = 1- aspirante, 2- empleado\n $idexp = $request->get('idexp');\n\n $var = $request->get('tipogrid');\n if(isset($var)){$tipogrid=$var;}else{$tipogrid=0;}\n\n $entity = new RefrendaAct();\n $form = $this->createForm(new RefrendaActType(), $entity);\n\n //Camino de migas\n if ($tipogrid == 2){\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem(\"Inicio\", $this->get(\"router\")->generate(\"hello_page\"));\n $breadcrumbs->addItem(\"Expediente\", $this->get(\"router\")->generate(\"pantalla_modulo\",array('id'=>1)));\n $breadcrumbs->addItem(\"Empleado activo\", $this->get(\"router\")->generate(\"pantalla_empleadoactivo\"));\n $breadcrumbs->addItem(\"Nuevo puesto\", $this->get(\"router\")->generate(\"refrendaact\"));\n }\n else{\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem(\"Inicio\", $this->get(\"router\")->generate(\"hello_page\"));\n $breadcrumbs->addItem(\"Expediente\", $this->get(\"router\")->generate(\"pantalla_modulo\",array('id'=>1)));\n if ($tipocontratacion == 1) {//aspirante\n $breadcrumbs->addItem(\"Aspirante\", $this->get(\"router\")->generate(\"pantalla_aspirante\"));\n $breadcrumbs->addItem(\"Registrar aspirante como empleado\", $this->get(\"router\")->generate(\"contratacion\"));\n }\n else { //empleado \n $breadcrumbs->addItem(\"Empleado activo\", $this->get(\"router\")->generate(\"pantalla_empleadoactivo\"));\n $breadcrumbs->addItem(\"Registrar contratación\", $this->get(\"router\")->generate(\"contratacion_empleado\"));\n }\n if ($tipo == 1){ //Ley de salarios\n $breadcrumbs->addItem(\"Registrar nombramiento\", $this->get(\"router\")->generate(\"contratacion_tipo\",array('tipo'=>$tipo,'tipogrid'=>$tipocontratacion,'idexp'=>$idexp)));\n $breadcrumbs->addItem(\"Nuevo puesto\", $this->get(\"router\")->generate(\"contratacion_new\"));\n }\n else if ($tipo == 2){ //Contrato\n $breadcrumbs->addItem(\"Registrar contrato\", $this->get(\"router\")->generate(\"contratacion_tipo\",array('tipo'=>$tipo,'tipogrid'=>$tipocontratacion,'idexp'=>$idexp)));\n $breadcrumbs->addItem(\"Nuevo puesto\", $this->get(\"router\")->generate(\"contratacion_new\"));\n }\n }\n return $this->render('ExpedienteBundle:RefrendaAct:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'tipo' => $tipo,\n 'tipocontratacion' => $tipocontratacion,\n 'idexp' => $idexp,\n 'tipogrid' => $tipogrid\n ));\n }", "static function add_bod_form(): void {\r\n\t\tself::add_acf_inner_field(self::bods, self::bod_form, [\r\n\t\t\t'label' => 'Nomination form',\r\n\t\t\t'type' => 'file',\r\n\t\t\t'instructions' => 'Upload the nomination form as a pdf.',\r\n\t\t\t'required' => 1,\r\n\t\t\t'conditional_logic' => [\r\n\t\t\t\t[\r\n\t\t\t\t\t[\r\n\t\t\t\t\t\t'field' => self::qualify_field(self::bod_finished),\r\n\t\t\t\t\t\t'operator' => '!=',\r\n\t\t\t\t\t\t'value' => '1',\r\n\t\t\t\t\t],\r\n\t\t\t\t],\r\n\t\t\t],\r\n\t\t\t'wrapper' => [\r\n\t\t\t\t'width' => '',\r\n\t\t\t\t'class' => '',\r\n\t\t\t\t'id' => '',\r\n\t\t\t],\r\n\t\t\t'return_format' => 'id',\r\n\t\t\t'library' => 'all',\r\n\t\t\t'min_size' => '',\r\n\t\t\t'max_size' => '',\r\n\t\t\t'mime_types' => '.pdf',\r\n\t\t]);\r\n\t}" ]
[ "0.6226911", "0.6221184", "0.60709274", "0.5868567", "0.5578884", "0.5485785", "0.5461808", "0.5460027", "0.5388528", "0.53154093", "0.52404904", "0.5183814", "0.5161728", "0.5161465", "0.5150575", "0.5140566", "0.5127729", "0.509111", "0.50733495", "0.5071981", "0.50525117", "0.50525117", "0.5032811", "0.5029093", "0.4979572", "0.4979572", "0.49746278", "0.49717042", "0.49485838", "0.49383625", "0.49383625", "0.49236372", "0.49199477", "0.4872483", "0.48722467", "0.4851354", "0.48430336", "0.4827458", "0.48206246", "0.4781119", "0.47424906", "0.47397995", "0.473961", "0.4717821", "0.4713776", "0.47125188", "0.47108066", "0.47040373", "0.46941572", "0.46935362", "0.46621475", "0.46611437", "0.46608388", "0.46508333", "0.4638074", "0.46267897", "0.46246544", "0.4617689", "0.46164748", "0.46090156", "0.4606629", "0.46054688", "0.45945072", "0.45879763", "0.4584929", "0.45809963", "0.45809963", "0.4577518", "0.45759562", "0.45738047", "0.45734861", "0.4572376", "0.45707172", "0.45693892", "0.4568539", "0.4568539", "0.45654956", "0.4564933", "0.45576367", "0.45565474", "0.45558792", "0.45539752", "0.4552691", "0.4544209", "0.45420817", "0.4540773", "0.45395583", "0.45353672", "0.45273414", "0.45261344", "0.45220166", "0.45212805", "0.45212427", "0.45202106", "0.45188075", "0.4515064", "0.4515064", "0.45121446", "0.45116523", "0.4508809" ]
0.7022916
0
Get DB bridge instance for ADT
public function getDBBridgeForInstance(ilADT $a_adt) { $class = $this->initTypeClass($a_adt->getType(), "DBBridge"); return new $class($a_adt); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getActiveRecordBridgeForInstance(ilADT $a_adt)\r\n\t{\r\n\t\t$class = $this->initTypeClass($a_adt->getType(), \"ActiveRecordBridge\");\t\t\r\n\t\treturn new $class($a_adt);\r\n\t}", "private function getDBA() {\n\t\tif ( $this->dba != null ) {\n\t\t\treturn $this->dba;\n\t\t}\n\t\tswitch ( $this->backend ) {\n\t\t\tcase 'mysql' :\n\t\t\t\t$this->dba = ORM::for_table($this->table);\n\t\t\tbreak;\n\t\t\tcase 'mongodb' :\n\t\t\tbreak;\n\t\t\tdefault :\n\t\t\t\tthrow new Exception(\"Invalid backend data store specified.\");\n\t\t\tbreak;\n\t\t}\n\t\treturn $this->dba;\n\t}", "public static function get($db_type='')\n {\n if ($db_type == \"master\")\n {\n static $mdb = null;\n if ( $mdb == null )\n $mdb = new DBConnection($db_type);\n return $mdb;\n }\n else\n {\n static $sdb = null;\n if ( $sdb == null )\n $sdb = new DBConnection($db_type);\n return $sdb;\n }\n\n }", "public function dbInstance();", "public static function getInstance()\n {\n return Doctrine_Core::getTable('AdvertNetwork');\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Alerte_bpi');\n }", "public function getDatabase(): DatabaseInterface;", "function establish_connection() {\n\t \t\tself::$db = Registry()->db = SqlFactory::factory(Config()->DSN);\n\t \t\tself::$has_update_blob = method_exists(self::$db, 'UpdateBlob');\n\t\t\treturn self::$db;\n\t\t}", "public function getInstance(): self\r\n {\r\n if (self::$DB_link === null) {\r\n self::$DB_link = new self();\r\n }\r\n return self::$DB_link;\r\n }", "public static function obtenerint(){\n if (self::$db === null){\n \tself::$db = new self();\n }\n return self::$db;\n }", "public static function conn()\n {\n return (static::inst())::$_db;\n }", "public static function get_dba($dba_id='default') {\n\t if (isset(self::$_dba_pool[$dba_id])) {\n return self::$_dba_pool[$dba_id];\n\t }\n\t \n $key = isset(Doggy_Config::$vars['app.dba.'.$dba_id])? 'app.dba.'.$dba_id: 'app.dba.default';\n $dsn = Doggy_Config::get($key);\n if (empty($dsn)) {\n throw new Doggy_Dba_Exception(\"factroy dba failed,unknown dba_id < $dba_id >\");\n }\n \n $driver = false !== ($i = strpos($dsn, ':')) ? substr($dsn, 0, $i) : $dsn;\n $class = Doggy_Util_Inflector::doggyClassify('Doggy_Dba_Adapter_'.$driver);\n if(!class_exists($class) ){\n throw new Doggy_Dba_Exception('factroy dba failed.<unknow database adpater:'.$driver);\n }\n return self::$_dba_pool[$dba_id] = new $class($dsn);\n\t}", "function &atkGetDb($conn='default', $reset=false, $mode=\"r\")\n{\n\tatkimport(\"atk.db.atkdb\");\n\t$db = &atkDb::getInstance($conn, $reset, $mode);\n\treturn $db;\n}", "public function getDb(int $key = 0) : ?DboInterface\n {\n return $this->getDbFactory()->getConnection($key);\n }", "public static function getDb()\n {\n return Yii::$app->get(\"ddb\");\n }", "public function getDb();", "public function getDbAdapter();", "protected function getDbal_ConnService()\n {\n return $this->services['dbal.conn'] = new \\phpbb\\db\\driver\\factory($this);\n }", "public function getDbalConnection();", "public function db () : Connection {\n return Manager::connection($this->connection());\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Assemblage');\n }", "function blightDB()\n{\n\tstatic $db;\n\tif (!isset($db))\n\t{\n\t\tif (false === ($db = gdo_db_instance('localhost', BLIGHT_USER, BLIGHT_PASS, BLIGHT_DB)))\n\t\t{\n\t\t\tdie('Cannot connect to db!');\n\t\t}\n\t\t$db->setVerbose(false);\n\t\t$db->setLogging(false);\n\t\t$db->setDieOnError(false);\n\t\t$db->setEMailOnError(false);\n\t}\n\treturn $db;\n}", "public static function getDBO() {\n\t\t/*\n\t\t * Check for the required DB configuration parameters\n\t\t */\n\t\tif(!defined('ETH_CONF_DB_HOST')) {\n\t\t\tthrow new Exception('ETH_CONF_DB_HOST configuration not set');\n\t\t}\n\t\tif(!defined('ETH_CONF_DB_USERNAME')) {\n\t\t\tthrow new Exception('ETH_CONF_DB_USERNAME configuration not set');\n\t\t}\n\t\tif(!defined('ETH_CONF_DB_PASSWORD')) {\n\t\t\tthrow new Exception('ETH_CONF_DB_PASSWORD configuration not set');\n\t\t}\n\t\tif(!defined('ETH_CONF_DB_DBNAME')) {\n\t\t\tthrow new Exception('ETH_CONF_DB_DBNAME configuration not set');\n\t\t}\n\n\t\t$db = new mysqli(ETH_CONF_DB_HOST, ETH_CONF_DB_USERNAME,\n\t\t\t\tETH_CONF_DB_PASSWORD, ETH_CONF_DB_DBNAME);\n\t\t\t\t\n\t\tif($db->connect_error){\n\t\t\tthrow new Exception(\n\t\t\t\t\tsprintf('DB Connect Error %d: %s',\n\t\t\t\t\t\t\t$db->connect_errno, $db->connect_error));\n\t\t}\n\n\t\tself::$db = $db;\n\t\treturn self::$db;\n\t}", "public function getDatabaseAdaper()\n {\n return $this->oDatabase;\n }", "public static function getInstance($type = 'base')\n\t{\n\t\tif (isset(self::$cache[$type])) {\n\t\t\treturn self::$cache[$type];\n\t\t}\n\t\t$db = new self(self::getConfig($type));\n\t\t$db->dbType = $type;\n\t\tself::$cache[$type] = $db;\n\t\treturn $db;\n\t}", "protected function getDb()\n\t{\n\t\treturn (new League)->getConnection();\n\t}", "public static function instance() {\n\t\t$classe = get_called_class();\n\t\t$table = str_replace(\"db_\", \"\", $classe);\n\t\t$instance = db::instance(db::table($table));\n\t\treturn $instance;\n\t}", "private function get_bridge()\n\t{\n\t\treturn $this->m_bridge;\n\t}", "public static function getInstance()\r\n {\r\n return Doctrine_Core::getTable('UtoconsultAdvertisement');\r\n }", "public function getConnection() {\n\t\t$db = Config::get('librarydirectory::database.default');\n return static::resolveConnection($db);\n }", "public function get_db_instance() {\n\t\treturn ( ! empty( $this->db ) && $this->db->db_connect() ) ? $this->db : false;\n\t}", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Type_alerte_bpi');\n }", "public function getDBobject(){\r\n return $this->db;\r\n }", "protected function getBdd()\n {\n if (self::$_bdd == null) {\n self::setBdd();\n return self::$_bdd;\n }\n }", "public static function get_instance()\n {\n if (! is_null(self::$db)) {\n return self::$db;\n }\n self::$db = new DB();\n return self::$db;\n }", "public function connectorObj()\n {\n return $this->sdb;\n }", "public static function getInstance()\n {\n if(!isset(self::$_dbObjectInstance))\n {\n $className = get_class();\n self::$_dbObjectInstance = new $className;\n }\n\n return self::$_dbObjectInstance;\n }", "public function getDatabaseConnectorInstance() {\n return new DatabaseConnector($this->config['general']['db']);\n }", "public static function getInstance(){\r\n if (!(self::$instanciaBD instanceof self)){\r\n self::$instanciaBD=new self();\r\n }\r\n return self::$instanciaBD;\r\n }", "public static function get_model_dba() {\n $model_dba_id = Doggy_Config::get('app.model.dba');\n return self::get_dba(empty($model_dba_id)?'default':$model_dba_id);\n\t}", "public function db()\n {\n return $this->getConnection();\n }", "public static function getDb()\r\n\t{\r\n\t\t/* Author -ptr.nov- : HRD */\r\n\t\treturn \\Yii::$app->db2; \r\n\t}", "function get_gdb_resource()\n {\n\treturn DatabaseManager::getInstance();\n }", "static function getDbConnection() {\n\n if (empty(static::$db)) {\n $pdo = Service::get('pdo');\n static::$db = new \\PDO($pdo['dns'], $pdo['user'], $pdo['password']);\n }\n return static::$db;\n }", "function &getDBO() {\n\t\treturn $this->_app->getDBO();\n\t}", "public function getDatabase()\r\n {\r\n return $this->connector->getBusinessDatabase();\r\n }", "private function getDbConnection()\n {\n $config = $this->config;\n $connectionParams = array(\n 'path' => $this->appRoot . '/vpu.db',\n 'driver' => $config['config']['database']['driver']\n );\n return DriverManager::getConnection($connectionParams, new Configuration());\n }", "public static function getDb()\n {\n return Yii::$app->get('tarantool');\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('GeneLink');\n }", "public static function getInstance() {\n return Doctrine_Core::getTable('adHotel');\n }", "protected function db()\n\t\t{\n\t\t\tif( !$this->_db ) {\n\t\t\t\t$this->_db = \\Kalibri::db()->getConnection( $this->connectName );\n\t\t\t}\n\n\t\t\treturn $this->_db;\n\t\t}", "public static function getInstancia() {\n\t\tif (empty(self::$instancia)) {\n\t\t\tself::$instancia = new BD();\n\t\t}\n\t\n\t\treturn self::$instancia;\n\t}", "static public function getDatabaseObject()\n {\n if (getenv(\"OPENSHIFT_MYSQL_DB_HOST\") === false) {\n $_host = \"localhost\";\n $_username = \"root\";\n $_password = \"mantis5c\";\n $_database = \"startbwtracker\";\n } else {\n $_host = getenv(\"OPENSHIFT_MYSQL_DB_HOST\");\n $_username = getenv(\"OPENSHIFT_MYSQL_DB_USERNAME\");\n $_password = getenv(\"OPENSHIFT_MYSQL_DB_PASSWORD\");\n $_database = \"startbwtracker\";\n }\n\n $db = new \\PDO(\n \"mysql:host=$_host;dbname=$_database;\", $_username, $_password\n );\n // set the PDO error mode to exception\n $db->setAttribute(\\PDO::ATTR_ERRMODE, \\PDO::ERRMODE_EXCEPTION);\n\n return $db;\n }", "public function getDb()\n\t{\n\t\t$this->getPDO();\n\t\treturn $this->db;\n\t}", "public static function getInstance()\n {\n return Doctrine_Core::getTable('BetyoloSide');\n }", "public function getConnection(): \\codename\\core\\database\r\n {\r\n return $this->db;\r\n }", "public function getDbConnection()\n {\n $this->conn = Registry::get('db');\n }", "protected function getActiveRecordAdapter() {\n\t\treturn new WSAL_Adapters_MySQL_ActiveRecord( $this->connection );\n\t}", "static public function GetInstance()\n\t{\n\t\tif ( null == self::$m_dbconnection )\n\t\t{\n\t\t\tself::$m_dbconnection = NewADOConnection(self::$ado_db_type);\n\t\t\ttry\n\t\t\t{\n\t\t\t\tself::$m_dbconnection->Connect(self::$db_host,self::$db_user, self::$db_pwd, self::$db_name) ;\n\t\t\t}catch (Exception $e)\n\t\t\t{\n\t\t\t\tdie(\"Could Not Connect Database!\".$e->getMessage());\n\t\t\t}\n\t\t}\n\t\treturn self::$m_dbconnection;\n\t}", "public function getDatabaseHandle() {}", "function get_db( $db = null ) {\n\n\t\tif ( $db == null && !is_null($this->db) ) {\n\t\t\treturn $this->db;\n\t\t}\n\n\t\tif ( is_object( $db ) ) {\n\t\t\t$db = $db->name;\n\t\t}\n\t\t\n\t\t\n\t\tif ( !array_key_exists( $db, $this->dbs ) ) {\n\t\t\t$this->error( 'Invalid Database', 404 );\n\t\t}\n\n\t\treturn $this->dbs[$db];\n\n\t}", "public static function getInstance()\n {\n return Doctrine_Core::getTable('AppInfo');\n }", "public function getDb()\n {\n if ($this->db === null) {\n $this->db = \\Dit\\Database::instance();\n }\n return $this->db;\n }", "protected static function db(){\n\t\treturn DatabasePDO::getCurrentpdo();\n\t}", "public static function getConnection($dsn) {\n\t\tif (isset(self::$_instances[$dsn]))\n\t\t\treturn self::$_instances[$dsn];\n\t\t$driver = false !== ($i = strpos($dsn, ':')) ? substr($dsn, 0, $i) : $dsn;\n\t\t$class = Doggy_Util_Inflector::doggyClassify('Doggy_Dba_Adapter_'.$driver);\n\t\tif(!class_exists($class) ){\n\t\t throw new Doggy_Dba_Exception('Unknow database adpater:'.$driver);\n\t\t}\n\t\treturn self::$_instances[$dsn] = new $class($dsn);\n\t}", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Palabra');\n }", "public function getDb()\r\n {\r\n return $this->db;\r\n }", "public function getDb()\n {\n return $this->db;\n }", "public function getDb()\n {\n return $this->db;\n }", "public function getDb()\n {\n return $this->db;\n }", "function &getDatabase( $id )\n {\n $db =& SynkHelperSynchronizations::getDatabase( $id );\n return $db;\n }", "private function getDB() {\n if ($this->link === false) {\n $connection = $this->connect($this->config[\"host\"], $this->config[\"user\"], $this->config[\"pass\"], $this->config[\"name\"], $this->config[\"port\"]);\n if ($this->isMysqli($connection) AND $connection->errno === 0) {\n $connection->query(\"SET CHARACTER SET \" . $this->config[\"charset\"] . \";\");\n $this->link = $connection;\n }\n }\n\n return $this->link;\n }", "public function updraftplus_get_database_handle() {\n\t\treturn $this->dbh;\n\t}", "function get_pdo_object() {\n return $this->db;\n }", "protected function getAdapter()\n {\n return $this->getConnection()->getConnection();\n }", "protected function getAdapter()\n {\n return $this->getConnection()->getConnection();\n }", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}" ]
[ "0.7011467", "0.66538334", "0.6570967", "0.6403578", "0.63902646", "0.6369858", "0.6368706", "0.62863606", "0.625861", "0.62197703", "0.61985743", "0.619759", "0.61788714", "0.61603236", "0.61416847", "0.61349", "0.6133471", "0.61327225", "0.61229753", "0.6114849", "0.6108568", "0.60917103", "0.60905254", "0.60904616", "0.6080808", "0.6074531", "0.60634756", "0.6057663", "0.60540384", "0.6051446", "0.60248166", "0.6019597", "0.6018821", "0.6018039", "0.60091084", "0.59904015", "0.5984391", "0.59733534", "0.5970268", "0.5966952", "0.5961582", "0.5943809", "0.59401387", "0.5918929", "0.59120905", "0.59074867", "0.59053487", "0.59021807", "0.58936334", "0.5893216", "0.5888626", "0.5887793", "0.5887243", "0.5882667", "0.5879395", "0.5878542", "0.5873057", "0.5871792", "0.58683765", "0.58530927", "0.58520895", "0.58516", "0.5842379", "0.58411485", "0.5826347", "0.5818976", "0.5813236", "0.58068", "0.58068", "0.58068", "0.5803966", "0.58000475", "0.57990634", "0.5798966", "0.57949567", "0.57949567", "0.5794387", "0.5794387", "0.5794387", "0.5793767", "0.5793767", "0.5793767", "0.5793767", "0.5793767", "0.5793767", "0.5793767", "0.5793767", "0.5793767", "0.5793767", "0.5793767", "0.5793767", "0.5793767", "0.5793767", "0.5793767", "0.5793767", "0.5793767", "0.5793767", "0.5793767", "0.5793296", "0.5793296" ]
0.79595876
0
Get presentation bridge instance for ADT
public function getPresentationBridgeForInstance(ilADT $a_adt) { $class = $this->initTypeClass($a_adt->getType(), "PresentationBridge"); return new $class($a_adt); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getActiveRecordBridgeForInstance(ilADT $a_adt)\r\n\t{\r\n\t\t$class = $this->initTypeClass($a_adt->getType(), \"ActiveRecordBridge\");\t\t\r\n\t\treturn new $class($a_adt);\r\n\t}", "public function getDBBridgeForInstance(ilADT $a_adt)\r\n\t{\r\n\t\t$class = $this->initTypeClass($a_adt->getType(), \"DBBridge\");\t\t\r\n\t\treturn new $class($a_adt);\t\r\n\t}", "public function getPresentation();", "protected function _getBridge() {}", "private function get_bridge()\n\t{\n\t\treturn $this->m_bridge;\n\t}", "public function getFormBridgeForInstance(ilADT $a_adt)\r\n\t{\t\t\r\n\t\t$class = $this->initTypeClass($a_adt->getType(), \"FormBridge\");\t\t\r\n\t\treturn new $class($a_adt);\r\n\t}", "public function bridge()\n {\n return new Bridge($this->talker);\n }", "function getBridgeModel() {\n return $this->bridgeModel;\n }", "abstract public function get_instance();", "function getBridgeDhcp() {\n return $this->bridgeDhcp;\n }", "public function makeBridge()\n {\n //Return the bridge\n return app('PersonalityInsightsBridge', ['credentialsName' => $this->getCredentialsName()])->appendHeaders($this->getHeaders());\n }", "public function get_active_instance() {\n\n\n }", "public function getViewInterface(): ViewInterface\n \n {\n// on cherche l'équivalant de ça mais en mode bonne pratique\n \n \n// reflective class\n return (new \\ReflectionClass(PackageView:: class))\n ->newInstanceArgs([]);\n\n }", "public function blueprint()\n {\n return $this->belongsTo('App\\Models\\Blueprint');\n }", "public function activo()\n\t{\n\t\treturn $this->morphOne(\n\t\t\tActivo::class,\n\t\t\t'Activo'\n\t\t);\n\t}", "public function getDisplay();", "public function createDiagramInstance();", "public function obtainable()\n {\n return $this->morphTo();\n }", "public function getOrientClass();", "function &getRepresentative() {\n\t\treturn $this->_representative;\n\t}", "public function displayType(): object\n {\n return $this->displayType;\n }", "public function representer() {\n return $this->belongsTo('Rockit\\Models\\Representer');\n }", "public function present()\n {\n if (! isset($this->presenterInstance)) {\n $this->presenterInstance = (new ReflectionClass($this->presenter))\n ->newInstanceArgs([$this]);\n }\n\n return $this->presenterInstance;\n }", "public function get_active_instance() { \n\n\n\t}", "public function viewable(): MorphTo;", "public function get_display() {\n return $this->view->display_handler;\n }", "function getBridgeGateway() {\n return $this->bridgeGateway;\n }", "static public function getView() {\n\t\treturn self::$defaultInstance;\n\t}", "public function component()\n {\n return $this->morphTo();\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Assemblage');\n }", "public function linkable()\n {\n \treturn $this->morphTo();\n }", "function getBridgeName() {\n return $this->bridgeName;\n }", "public function attachable()\n {\n return $this->morphTo();\n }", "public function getInterface();", "function getDisplay() {\n return $this->display;\n }", "public function get_instance() {\r\n\t\treturn $this->obj;\r\n\t}", "public function getView()\n\t{\n\t\tif(NULL === $this->_view) {\n\t\t\t$this->_view = agoractu_view::getInstance();\n\t\t}\n\t\treturn $this->_view;\n\t}", "public function getInstance(): object;", "protected function _getAppearanceReference() {}", "public static function getInstance()\n {\n return Doctrine_Core::getTable('AdvertNetwork');\n }", "protected function _getAppearanceReference() {}", "protected function _getAppearanceReference() {}", "protected function _getAppearanceReference() {}", "abstract protected function getAdapter();", "abstract protected function getAdapter();", "public function getIndirectObject() {}", "public function getIndirectObject() {}", "public function getMorphClass();", "public function getMorphClass();", "public function getMorphClass();", "public function getDisplay() {\n\t\treturn parent::getDisplay();\n\t}", "protected function newConverterInstance()\n {\n if($this->__converter instanceof IBaseConverter)\n {\n return $this->__converter->newInstance();\n }\n return null;\n }", "public function entity()\n\t{\n\t\treturn $this->morphTo();\n\t}", "public function invoicable()\n {\n return $this->morphTo();\n }", "public function getAdapter();", "public function getAdapter();", "function getOGActor();", "function getOGActor();", "public static function getInstance()\r\n {\r\n return Doctrine_Core::getTable('UtoconsultAdvertisement');\r\n }", "public static function get() {\n if (!isset(Airplane::$airplane))\n Airplane::$airplane = new Airplane();\n return Airplane::$airplane;\n }", "public function toActivityObject();", "public function mediable()\n {\n return $this->morphTo();\n }", "public function getPresentationById($id)\n\t{\n\t\treturn $this->find((int) $id)->current();\n\t}", "function getDisplayManager()\n {\n return $this->displayManager;\n }", "public static function getInstance() {\n return Doctrine_Core::getTable('ReelVideoRecordingFormatType');\n }", "function _wp_oembed_get_object()\n {\n }", "public function getForWebserviceExport()\n {\n $el = parent::getForWebserviceExport();\n if ($this->data[\"internal\"]) {\n if (intval($this->data[\"internalId\"]) > 0) {\n if ($this->data[\"internalType\"] == \"document\") {\n $referencedDocument = Document::getById($this->data[\"internalId\"]);\n if (!$referencedDocument instanceof Document) {\n //detected broken link\n $document = Document::getById($this->getDocumentId());\n }\n } else if ($this->data[\"internalType\"] == \"asset\") {\n $referencedAsset = Asset::getById($this->data[\"internalId\"]);\n if (!$referencedAsset instanceof Asset) {\n //detected broken link\n $document = Document::getById($this->getDocumentId());\n }\n }\n }\n }\n\n $el->data = $this->data;\n return $el;\n }", "public function addressable()\n {\n return $this->morphTo();\n }", "public function addressable()\n {\n return $this->morphTo();\n }", "public function getTemplateBridge()\n {\n return $this->templateBridge;\n }", "public function hybrid() {\n return new OctaHybrid();\n }", "public function item()\n {\n return $this->morphTo();\n }", "public function getSearchBridgeForDefinitionInstance(ilADTDefinition $a_adt_def, $a_range = true, $a_multi = true)\r\n\t{\r\n\t\tif($a_range)\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\t$class = $this->initTypeClass($a_adt_def->getType(), \"SearchBridgeRange\");\t\r\n\t\t\t\treturn new $class($a_adt_def);\t\r\n\t\t\t}\r\n\t\t\tcatch(Exception $e)\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// multi enum search (single) == enum search (multi)\t\t\r\n\t\tif(!$a_multi &&\r\n\t\t\t$a_adt_def->getType() == \"MultiEnum\")\r\n\t\t{\r\n\t\t\t$class = $this->initTypeClass(\"Enum\", \"SearchBridgeMulti\");\t\r\n\t\t\treturn new $class($a_adt_def);\t\r\n\t\t}\t\r\n\t\t\r\n\t\tif($a_multi)\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t$class = $this->initTypeClass($a_adt_def->getType(), \"SearchBridgeMulti\");\t\r\n\t\t\t\treturn new $class($a_adt_def);\t\r\n\t\t\t}\r\n\t\t\tcatch(Exception $e)\r\n\t\t\t{\r\n\r\n\t\t\t}\r\n\t\t}\t\t\t\r\n\t\t$class = $this->initTypeClass($a_adt_def->getType(), \"SearchBridgeSingle\");\t\r\n\t\treturn new $class($a_adt_def);\t\t\t\t\t\r\n\t}", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Designaciones');\n }", "public function model(){\n return $this->morphTo();\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Alerte_bpi');\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('PilotVideo');\n }", "public function ref()\n {\n return $this->morphTo();\n }", "public function format()\n {\n \treturn $this->belongsTo('App\\MatchFormat', 'format_id');\n }", "public function model()\r\n {\r\n return $this->morphTo();\r\n }", "public function presenter()\n {\n return null;\n }", "public function presenter()\n {\n\n return AudioPresenter::class;\n }", "public function getPersona()\n {\n return $this->hasOne(Personas::className(), ['id' => 'persona_id']);\n }", "public function imageable() {\n \treturn $this->morphTo();\n }", "public function model()\n {\n return $this->morphTo();\n }", "public function model()\n {\n return $this->morphTo();\n }", "public function getWidget();", "public function getAutoPresenter()\n {\n return $this->autoPresenter;\n }", "public function locatable()\n {\n return $this->morphTo();\n }", "public function entry()\n {\n return $this->morphTo('entry');\n }", "public function instance();", "public function getInstanceDetail()\n {\n return $this->get(self::_INSTANCE_DETAIL);\n }", "abstract protected function doGetAdapter();", "public abstract function getApiObjectClass();", "public function loadTheInstance();", "public function getDyna()\n {\n return $this->get(self::_DYNA);\n }", "public function getDyna()\n {\n return $this->get(self::_DYNA);\n }", "public function getDyna()\n {\n return $this->get(self::_DYNA);\n }", "public function getDyna()\n {\n return $this->get(self::_DYNA);\n }", "public function getDyna()\n {\n return $this->get(self::_DYNA);\n }" ]
[ "0.6440561", "0.6297715", "0.6102629", "0.6033755", "0.5811633", "0.57800436", "0.5729517", "0.56088495", "0.52797216", "0.5263347", "0.5245963", "0.51340455", "0.5122018", "0.51195294", "0.5107162", "0.51070225", "0.5100116", "0.50740755", "0.5073153", "0.5071852", "0.5071066", "0.5061156", "0.5055176", "0.5047071", "0.5019112", "0.50017077", "0.4986562", "0.49808192", "0.4969646", "0.4963779", "0.49611467", "0.49552613", "0.49462244", "0.49426705", "0.48946738", "0.48670596", "0.4850007", "0.48484045", "0.48364425", "0.4834937", "0.48345986", "0.48345986", "0.48345986", "0.48173845", "0.48173845", "0.48166397", "0.48166397", "0.47968173", "0.47968173", "0.47968173", "0.47816756", "0.4780536", "0.47781476", "0.47664294", "0.47657475", "0.47657475", "0.4757867", "0.4757867", "0.47570717", "0.4754624", "0.47333157", "0.47171256", "0.46976689", "0.46976376", "0.4694745", "0.46896836", "0.46890244", "0.46885476", "0.46885476", "0.46801916", "0.4674139", "0.46702063", "0.46611035", "0.4649719", "0.4637569", "0.4634832", "0.46331114", "0.46284944", "0.4623973", "0.4616641", "0.46116647", "0.45998183", "0.4598415", "0.45965436", "0.45945483", "0.45945483", "0.45938054", "0.45857918", "0.4585646", "0.4579866", "0.45743704", "0.45695555", "0.45686218", "0.45666066", "0.45658827", "0.45658708", "0.45658708", "0.45658708", "0.45658708", "0.45658708" ]
0.78331214
0
Get search bridge instance for ADT definition
public function getSearchBridgeForDefinitionInstance(ilADTDefinition $a_adt_def, $a_range = true, $a_multi = true) { if($a_range) { try { $class = $this->initTypeClass($a_adt_def->getType(), "SearchBridgeRange"); return new $class($a_adt_def); } catch(Exception $e) { } } // multi enum search (single) == enum search (multi) if(!$a_multi && $a_adt_def->getType() == "MultiEnum") { $class = $this->initTypeClass("Enum", "SearchBridgeMulti"); return new $class($a_adt_def); } if($a_multi) { try { $class = $this->initTypeClass($a_adt_def->getType(), "SearchBridgeMulti"); return new $class($a_adt_def); } catch(Exception $e) { } } $class = $this->initTypeClass($a_adt_def->getType(), "SearchBridgeSingle"); return new $class($a_adt_def); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getActiveRecordBridgeForInstance(ilADT $a_adt)\r\n\t{\r\n\t\t$class = $this->initTypeClass($a_adt->getType(), \"ActiveRecordBridge\");\t\t\r\n\t\treturn new $class($a_adt);\r\n\t}", "public function getDBBridgeForInstance(ilADT $a_adt)\r\n\t{\r\n\t\t$class = $this->initTypeClass($a_adt->getType(), \"DBBridge\");\t\t\r\n\t\treturn new $class($a_adt);\t\r\n\t}", "protected function getSearchInstance () {\n $search = Search::getInstance($this->data['attrs']['source_id']);\n\n if ($this->displayNotices($search->getErrors())) {\n return false;\n }\n $this->displayNotices($search->getWarnings(), true);\n\n return $search;\n }", "abstract public function get_instance();", "public function find(string $class): Instantiator;", "public function getInstanceByDefinition(ilADTDefinition $a_def)\r\n\t{\r\n\t\tif(!method_exists($a_def, \"getADTInstance\"))\r\n\t\t{\t\t\t\r\n\t\t\t$class = $this->initTypeClass($a_def->getType());\t\t\r\n\t\t\treturn new $class($a_def);\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn $a_def->getADTInstance();\r\n\t\t}\r\n\t}", "public function getPresentationBridgeForInstance(ilADT $a_adt)\r\n\t{\r\n\t\t$class = $this->initTypeClass($a_adt->getType(), \"PresentationBridge\");\t\t\r\n\t\treturn new $class($a_adt);\t\r\n\t}", "public function getDefinition();", "public function getDefinition();", "function getInstance(Constraint $constraint);", "public function getSearchType() {}", "public function getSearchType() {}", "public function getDefinition() {}", "public static function getInstance()\n {\n if (!self::$search_obj) {\n self::$search_obj = new Search();\n }\n\n return self::$search_obj;\n }", "public static function getSearch($db) {\n\t\t\treturn new SearchToObject($db, static::$_table, static::$_fields, get_called_class());\n\t\t}", "public static function getInstance()\n {\n return Doctrine_Core::getTable('AdvertNetwork');\n }", "public function getDefinitionInstanceByType($a_type)\r\n\t{\r\n\t\t$class = $this->initTypeClass($a_type, \"Definition\");\t\t\r\n\t\treturn new $class();\t\t\r\n\t}", "protected function getSearchable($builder): Searchable\n {\n return $builder->getModel();\n }", "function opdsSearchDescriptor()\n{\n global $app;\n\n $gen = mkOpdsGenerator($app);\n $cat = $gen->searchDescriptor(null, '/opds/searchlist/0/');\n mkOpdsResponse($app, $cat, OpdsGenerator::OPENSEARCH_MIME);\n}", "public function buildDiscovery();", "private function get_bridge()\n\t{\n\t\treturn $this->m_bridge;\n\t}", "public static function new_search_record()\n\t{\n\t\treturn new league_record_search();\n\t}", "public static function getInstance()\n {\n return Doctrine_Core::getTable('NetworkType');\n }", "public function getSearchObject()\n {\n if ($this->search === null)\n {\n $this->setSearchObject('XmlJs');\n }\n\n return $this->search;\n }", "public static function getInstance() {\n return Doctrine_Core::getTable('adHotel');\n }", "protected function search()\n\t{\n\t\treturn Phpfox::getLib('search');\t\n\t}", "public function getInstance(): object;", "public static function search()\n {\n return new DIndexSearch(get_called_class());\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Assemblage');\n }", "public static function getInstance()\r\n {\r\n return Doctrine_Core::getTable('UtoconsultAdvertisement');\r\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('GeneLink');\n }", "public function getInstanceOf(string $class, array $dynamicConfiguration=[]): object|array;", "public function getFormBridgeForInstance(ilADT $a_adt)\r\n\t{\t\t\r\n\t\t$class = $this->initTypeClass($a_adt->getType(), \"FormBridge\");\t\t\r\n\t\treturn new $class($a_adt);\r\n\t}", "public abstract function find();", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Match');\n }", "public function locatable()\n {\n return $this->morphTo();\n }", "protected function _getBridge() {}", "function getBridgeModel() {\n return $this->bridgeModel;\n }", "public function find($class);", "public static function getInstance()\n {\n return Doctrine_Core::getTable('BarbaraClass');\n }", "public function getIndirectObject() {}", "public function getIndirectObject() {}", "function culturefeed_get_searchable_type($name) {\n $options = culturefeed_get_searchable_types();\n return isset($options[$name]) ? $options[$name] : NULL;\n}", "function fluid_edge_get_search() {\n fluid_edge_load_search_template();\n }", "public function get($uid)\n {\n $searcher = SearchBase::getInstance($this->getSearchClass());\n\n return tx_rnbase::makeInstance($searcher->getWrapperClass(), $uid);\n }", "public function createCorrespondingBookModelForSearch() {\n\t\t$searchModel = new Book('search');\n\t\t$searchModel->unsetAttributes();\n\t\t\n\t\t$searchInput = $this->searchInput;\n\t\t\n\t\tif ($searchInput==\"Suggestions\") {\n\t\t\t$searchModel->title = null;\n\t\t} else {\n\t\t\t$searchModel->title = $searchInput;\n\t\t}\n\t\treturn $searchModel;\n\t}", "public function locatable()\n\t{\n\t\treturn $this->morphTo();\n\t}", "public function createDefaultSearchQuery()\n {\n $qB = SearchEngine::getElasticaQueryBuilder();\n\n $keyword = Utility::convertArrayToString($this->searchEvent->getKeyword());\n $where = $this->searchEvent->getWhere();\n\n $keywordQuery = null;\n $whereQuery = null;\n $content = 0;\n if ($where) {\n if ($geoDistance = $this->container->get(\"nearby.handler\")->getGeoDistanceInfoByWhere()) {\n $whereQuery = $qB->query()->bool();\n $whereQuery->addShould(\n $qB->query()->match()->setFieldQuery(\"searchInfo.location\",$where)\n ->setFieldType(\"searchInfo.location\", \"phrase\")\n ->setFieldBoost(\"searchInfo.location\", 2)\n ->setFieldParam('searchInfo.location', 'slop', 30)\n );\n $whereQuery->addShould(\n $qB->query()->geo_distance(\n 'geoLocation',\n [\n 'lat' => $geoDistance['latitude'],\n 'lon' => $geoDistance['longitude'],\n ],\n $geoDistance['radius'])\n );\n $content |= 1;\n } else {\n $whereQuery = $qB->query()->match()->setFieldQuery('searchInfo.location',$where)\n ->setFieldType('searchInfo.location', 'phrase')\n ->setFieldParam('searchInfo.location', 'slop', 30);\n $content |= 1;\n }\n }\n\n if ($keyword) {\n $keywordQuery = $qB->query()->multi_match();\n\n $keywordQuery->setQuery($keyword)\n ->setTieBreaker(0.3)\n ->setOperator(\"and\")\n ->setFields([\n 'friendlyUrl^500',\n 'title.raw^200',\n 'title.analyzed^10',\n 'description^5',\n 'searchInfo.keyword^1',\n 'searchInfo.location^1',\n ]);\n\n $content |= 2;\n }\n\n /* ModStores Hooks */\n HookFire(\"baseconfiguration_before_setup_query\", [\n \"content\" => &$content,\n \"whereQuery\" => &$whereQuery,\n \"keywordQuery\" => &$keywordQuery\n ]);\n\n switch ($content) {\n case 1:\n $query = $whereQuery;\n break;\n case 2:\n $query = $keywordQuery;\n break;\n case 3:\n $query = $qB->query()->bool();\n $query->addMust($keywordQuery);\n $query->addMust($whereQuery);\n break;\n default:\n $query = $qB->query()->match_all();\n break;\n }\n\n /* ModStores Hooks */\n HookFire(\"baseconfiguration_before_return_query\", [\n \"query\" => &$query,\n ]);\n\n return $query;\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('AgreementModelType');\n }", "function voyage_mikado_get_search() {\n\n\t\tif(voyage_mikado_active_widget(false, false, 'mkd_search_opener')) {\n\n\t\t\t$search_type = voyage_mikado_options()->getOptionValue('search_type');\n\n\t\t\tvoyage_mikado_load_search_template();\n\n\t\t}\n\t}", "function edan_search_object_shortcode($atts)\n {\n $edanURL = NULL;\n $nosearch = False;\n\n if($atts)\n {\n if(array_key_exists('url', $atts))\n {\n $edanURL = $atts['url'];\n $nosearch = True;\n }\n }\n\n $call = new edan_object_call();\n $object = new edan_object_view($call->get($edanURL), $nosearch);\n\n return $object->get_content();\n }", "public static function getInstance() {\n if (self::$search_instance === NULL) {\n self::$search_instance = new static();\n self::$search_instance->init();\n }\n\n return self::$search_instance;\n }", "public static function getInstance() {\n return Doctrine_Core::getTable('ReelVideoRecordingFormatType');\n }", "public function _anchored()\n {\n return $this->_classByAlias(Orm::ALIAS_ANCHOR);\n }", "function getSearchEngine($id)\n{\n $sql = \"SELECT * FROM search_engines WHERE id = '\" . sql_escape($id) . \"'\";\n $row = fetchOne($sql);\n return !empty($row) ? $row['name'] : null;\n}", "public function getObject(): mixed\n {\n // how can i derive this class from a string?\n if (!$object = call_user_func('App\\\\'.ucfirst($this->object_type).'::find', $this->object_id)) {\n return $object;\n }\n\n return null;\n }", "public function getInstanceQuery()\n {\n return $this->get(self::_INSTANCE_QUERY);\n }", "public static function instance() {\n static $_instance = null;\n if ($_instance === null) {\n $_instance = new Ontology();\n }\n return $_instance;\n }", "public static function getInstance(){\r\n\r\n\t\t// This method is overriden from the singleton one simply to get correct\r\n\t\t// autocomplete annotations when returning the instance\r\n\t\t$instance = parent::getInstance();\r\n\r\n\t\treturn $instance;\r\n\t}", "public static function getInstance()\n {\n return Doctrine_Core::getTable('CFType');\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Alerte_bpi');\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('AppInfo');\n }", "public function getFindPublicQueryBuilder(): QueryBuilder;", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Revista');\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Type_alerte_bpi');\n }", "public function getSearch();", "public function find() {\n return parent::find();\n }", "private function getSearchDriverForResource()\n {\n if ($this->isResourceValid())\n {\n $driver = new FreebaseSearchDriver(\n $this->container->getParameter(\"freebase_search_base_url\"),\n $this->container->getParameter(\"freebase_api_key\"),\n $this->container->getParameter(\"freebase_topic_base_url\"),\n $this->container->getParameter(\"freebase_base_mql_url\"),\n $this->container->getParameter(\"freebase_image_search\"),\n $this->container->getParameter(\"freebase_languages_to_retrieve\"),\n ''\n );\n $driver->setDefaultLanguage($this->language);\n\n return $driver;\n } else {\n throw new \\Exception(\"No driver found for the resource {$this->resourceToImport}\");\n }\n }", "public function getInterface();", "function search(){\n include($GLOBALS[\"draw_includes_path\"].\"/Reference/.ReferenceSearchTop.html\");\n\n //begin searching\n $get_types = Reference::get_types();\n $filters = Reference::get_filters();\n $counter = count($get_types);\n\n //interpret the search needle (into phrases etc) \n if(strlen($_POST[\"search_needles\"]) > 0){\n $needles = get_needles($_POST[\"search_needles\"]);\n } else {\n $needles = array();\n }\n\n $dark = TRUE;\n\n //get the users reference\n $reference_links = Link::get_links(ANY, $_SESSION[\"user_id\"], LINK_REFERENCE_OF_USER);\n\n for($i = 0; $i < count($reference_links); $i++){\n\n DB::db_query(\"get\", \"SELECT * FROM reference WHERE id='\".$reference_links[$i][\"from_id\"].\"';\");\n if(DB::db_check_result(\"get\") > 0){\n\n //check that its in the gets_type list\n if($counter > 0 && ($data = DB::db_get_array(\"get\")) != FALSE){\n\n if($get_types[$data[\"reference_type\"]]){\n //continue checking\n //change this data variable to an instance of the appropriate class \n\n switch($data[\"reference_type\"]){\n\n case get_type_as_string(TYPE_ARTICLE): \n $ref = new Article;\n break;\n\n case get_type_as_string(TYPE_INPROCEEDINGS):\n $ref = new InProceedings;\n break;\n\n case get_type_as_string(TYPE_INCOLLECTION):\n $ref = new InCollection;\n break;\n\n case get_type_as_string(TYPE_INBOOK):\n $ref = new InBook;\n break;\n\n case get_type_as_string(TYPE_BOOKLET):\n $ref = new Booklet;\n break;\n\n case get_type_as_string(TYPE_THESIS):\n $ref = new Thesis;\n break;\n\n case get_type_as_string(TYPE_TECHREPORT):\n $ref = new TechReport;\n break;\n\n case get_type_as_string(TYPE_MANUAL):\n $ref = new Manual;\n break;\n\n case get_type_as_string(TYPE_UNPUBLISHED):\n $ref = new Unpublished;\n break;\n\n case get_type_as_string(TYPE_MISC):\n $ref = new Misc;\n break;\n }\n\n $ref->load_array($data);\n if($ref->match_string($needles) &&\n $ref->match_states($filters)){\n if($dark){\n $bgcolour = \"search_item_dark\";\n } else {\n $bgcolour = \"search_item_light\";\n }\n $dark = (!$dark);\n\n $ref->search_overview($bgcolour);;\n }\n\n }\n }\n \n } else {\n error(\"No references in database\\n\");\n return FALSE;\n }\n \n }\n\n //print the bottom bit\n include($GLOBALS[\"draw_includes_path\"].\"/Reference/.ReferenceSearchBottom.html\");\n\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('TblArticleRef');\n }", "public function getAdsType()\n {\n return $this->hasOne(AdsType::className(), ['id' => 'ads_type_id']);\n }", "public function InitializeSearch($cn) {\r\n //SetDisplayValues($attributes) \r\n\r\n /* Campos de busqueda */\r\n $this->m_obj->GetField(\"cap_code\")->SetDisplayValues(Array(\"Name\"=>\"cap_code\", \"Label\"=>\"Capacitación Nro\", \"Type\"=>\"int\", \"IsPK\"=>true, \"IsForDB\"=>true, \"Order\"=>101, \"Presentation\"=>\"INT\", \"IsNullable\"=>false));\r\n $this->m_obj->GetField(\"mon_code\")->SetDisplayValues(Array(\"Name\"=>\"mon_code\", \"Label\"=>\"Monitoreo Nro\", \"Type\"=>\"int\", \"IsForDB\"=>true, \"Order\"=>102, \"Presentation\"=>\"INT\"));\r\n $this->m_obj->GetField(\"cir_code\")->SetDisplayValues(Array(\"Name\"=>\"cir_code\", \"Label\"=>\"Circuito\", \"Type\"=>\"int\", \"IsForDB\"=>true, \"Order\"=>103, \"Presentation\"=>\"CIRCUITO_ACTIVO\", \"IsNullable\"=>false, \"IsVisible\"=>true));\r\n $this->m_obj->GetField(\"use_code_operador\")->SetDisplayValues(Array(\"Name\"=>\"use_code_operador\", \"Label\"=>\"Operador\", \"Type\"=>\"int\", \"IsForDB\"=>true, \"Order\"=>104, \"Presentation\"=>\"OPERADOR\", \"IsNullable\"=>false, \"IsVisible\"=>true));\r\n $this->m_obj->GetField(\"use_code_supervisor\")->SetDisplayValues(Array(\"Name\"=>\"use_code_supervisor\", \"Label\"=>\"Supervisor Asignado\", \"Type\"=>\"int\", \"IsForDB\"=>true, \"Order\"=>105, \"Presentation\"=>\"SUPERVISOR\", \"IsNullable\"=>false, \"IsVisible\"=>true));\r\n $this->m_obj->GetField(\"cap_status\")->SetDisplayValues(Array(\"Name\"=>\"cap_status\", \"Label\"=>\"Estado\", \"Size\"=>20, \"IsForDB\"=>true, \"Order\"=>107, \"Presentation\"=>\"CAP_STATUS\", \"InitialValue\"=>\"PENDIENTE\"));\r\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Designaciones');\n }", "public function getInstance(string $name, array $dynamicConfiguration=[]): object|array;", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Agencia');\n }", "protected function _getLdapAdapter()\n {\n // initialize a new LocalHome\n\t $home = TDProject_Core_Model_Utils_SettingUtil::getHome($this->getContainer());\n\t // load the settings if available\n\t $settings = $home->findAll();\n\t // iterate over the settings and return the first one\n\t for($i = 0; $i < $settings->size(); $i++) {\n\t // load the setting\n\t $setting = $settings->get($i);\n // check if LDAP has to be used\n\t if ($setting->getUseLdap()->booleanValue()) {\n // initialize the options\n $options = array(\n 'td' => array(\n 'host' =>\n $setting->getLdapHost()->stringValue(),\n 'accountDomainName' =>\n $setting->getLdapDomain()->stringValue(),\n 'baseDn' =>\n $setting->getLdapDn()->stringValue(),\n 'bindRequiresDn' =>\n $setting->getLdapBindRequired()->booleanValue()\n )\n );\n // initialize the Adapter\n $adapter = new TDProject_Core_Model_Auth_Adapter_Ldap(\n $options,\n $this->getUsername()->stringValue(),\n $this->getPassword()->stringValue()\n );\n // add it to the internal array\n $this->_adapters[] = $adapter->setContainer($this->getContainer());\n\t }\n\t }\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('MedChemBonding');\n }", "public function getForSavedSearches()\n\t{\n##if @BUILDER.strSavedSearchesConnectionID.len##\n\t\treturn $this->byId( \"##@BUILDER.strSavedSearchesConnectionID s##\" );\n##else##\t\t\n\t\treturn $this->getDefault();\n##endif##\n\t}", "public static function getInstance()\n {\n return Doctrine_Core::getTable('HotelChain');\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Type_depot');\n }", "function culturefeed_search_get_active_search_page() {\n if ($type = culturefeed_get_searchable_type_by_path()) {\n return culturefeed_get_search_page($type);\n }\n}", "function listBrand($search){\r\n\r\n $this->app->log->info(__CLASS__ . '::' . __METHOD__);\r\n $dao = new \\PNORD\\Model\\BrandDAO($this->app); \r\n return $dao->listBrand($search); \r\n\r\n }", "public function getInstanceById($id) {\n $definition = $this->getDefinition($id, TRUE);\n if ($definition) {\n return $this->getInstance($definition);\n }\n if (substr($id, 0, 8) === 'regular-') {\n $globals = array_intersect_key($this->getPackagesByGlobal(), array_flip($this->getSystemPackageIds()));\n if ($globals) {\n $global = reset($globals);\n $id = str_replace('regular-', $global->id() . '-', $id);\n $definition = $this->getDefinition($id, TRUE);\n if ($definition) {\n return $this->getInstance($definition);\n }\n }\n }\n return NULL;\n }", "public function getFirst(): LinkInterface;", "public abstract function getApiObjectClass();", "public static function instance()\n {\n global $container;\n return $container->getByType(self::class);\n }", "public function addressable()\n {\n return $this->morphTo();\n }", "public function addressable()\n {\n return $this->morphTo();\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('EbayGame');\n }", "public function getMatcherObject($dataType = '') {\n\n\t\t/** @var $matcher \\TYPO3\\CMS\\Vidi\\Persistence\\Matcher */\n\t\t$matcher = GeneralUtility::makeInstance('TYPO3\\CMS\\Vidi\\Persistence\\Matcher', array(), $dataType);\n\n\t\t// Special case for Grid in the BE using jQuery DataTables plugin.\n\t\t// Retrieve a possible search term from GP.\n\t\t$searchTerm = GeneralUtility::_GP('sSearch');\n\n\t\tif (strlen($searchTerm) > 0) {\n\n\t\t\t$tcaTableService = TcaService::table($dataType);\n\n\t\t\t// try to parse a json query\n\t\t\t$searchTerm = rawurldecode($searchTerm);\n\t\t\t$terms = json_decode($searchTerm, TRUE);\n\n\t\t\tif (is_array($terms)) {\n\n\t\t\t\tforeach ($terms as $term) {\n\t\t\t\t\t$fieldName = key($term);\n\t\t\t\t\t$value = current($term);\n\t\t\t\t\tif ($fieldName === 'text') {\n\t\t\t\t\t\t$matcher->setSearchTerm($value);\n\t\t\t\t\t} elseif (($tcaTableService->field($fieldName)->hasRelation() && is_numeric($value))\n\t\t\t\t\t\t|| $tcaTableService->field($fieldName)->isNumerical()\n\t\t\t\t\t) {\n\t\t\t\t\t\t$matcher->equals($fieldName, $value);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$matcher->likes($fieldName, $value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$matcher->setSearchTerm($searchTerm);\n\t\t\t}\n\t\t}\n\n\t\t// Trigger signal for post processing Matcher Object.\n\t\t$this->emitPostProcessMatcherObjectSignal($matcher);\n\n\t\treturn $matcher;\n\t}", "protected static function getInstance() {\n \n if (self::$oInstance == null) {\n \n self::$oInstance = new AvaliacaoRepository(); \n }\n return self::$oInstance;\n }", "public function find($id)\n {\n $query=\"SELECT id,\".\n \"name,\".\n \"parent,\".\n \"child_order,\".\n \"description,\".\n \"gid \". \t\t \n\t \"FROM label_alias_type \".\n\t \"WHERE id=\".$id;\n\n return($this->selectDB($query, \"Label_alias_type\"));\n }", "public function getDepInstanceByName(string $name): object|null {\n if (isset($this->mapper[$name])) {\n return $this->getDepInstance($this->mapper[$name]);\n }\n return null;\n }", "public function getQueryAdapterClass();", "static public function get($name)\n {\n\n if (!isset(self::$aInstances[$name]))\n {\n // echo \" returning new definition\\n\";\n self::$aInstances[$name] = new DataModel_Definition($name);\n }\n else\n // {\n // echo \" returning existing definition\\n\";\n // }\n // echo \" Count of definitions: \" . count(self::$aInstances) . \"\\n\";\n constraint_modelMustBeCalled(self::$aInstances[$name], $name);\n return self::$aInstances[$name];\n }", "public static function getInstance()\r\n {\r\n return Doctrine_Core::getTable('PluginzsBlogArticle');\r\n }", "public function getInstanceOf(Model $parent, string $type): Node;", "public function getSearchObject()\n {\n $searchObject = new simpleForumTopicSearch();\n $searchObject->setState( $this->toArray() );\n return $searchObject;\n }", "public function getFind()\n {\n return $this->hasOne(FrecuenciaIndicador::className(), ['find_id' => 'find_id']);\n }" ]
[ "0.5672799", "0.55703974", "0.5428149", "0.52475214", "0.51427054", "0.5131958", "0.51317525", "0.5120147", "0.5120147", "0.5118711", "0.51143926", "0.51143926", "0.510476", "0.50948733", "0.5080495", "0.50742376", "0.5065063", "0.5056488", "0.50546724", "0.5035494", "0.5016008", "0.5012873", "0.50064987", "0.4969074", "0.49665785", "0.49610448", "0.49492908", "0.4942666", "0.49107963", "0.49046513", "0.48861176", "0.48297036", "0.4822433", "0.48169455", "0.48116523", "0.4806797", "0.4805527", "0.47885188", "0.47838956", "0.47797427", "0.47693864", "0.47693864", "0.47691992", "0.4768156", "0.47564983", "0.47554472", "0.47545487", "0.47500122", "0.47453132", "0.4741583", "0.4738349", "0.4732762", "0.47263595", "0.47218007", "0.4710782", "0.47100893", "0.46997336", "0.469905", "0.4698502", "0.46970028", "0.46906364", "0.46887872", "0.46756357", "0.4674457", "0.46701643", "0.46483943", "0.46387458", "0.46328306", "0.46302542", "0.46294147", "0.46278372", "0.4609932", "0.4608737", "0.4603145", "0.45989603", "0.4597031", "0.45920974", "0.45904207", "0.45841545", "0.45813778", "0.45793602", "0.4576534", "0.45764533", "0.45709777", "0.4565571", "0.45628032", "0.4561123", "0.4559854", "0.4559854", "0.45578945", "0.45488086", "0.45479634", "0.45453945", "0.45419008", "0.45403126", "0.45386216", "0.4537862", "0.4537413", "0.45301884", "0.45280054" ]
0.66711986
0
Get active record instance for ADT
public function getActiveRecordBridgeForInstance(ilADT $a_adt) { $class = $this->initTypeClass($a_adt->getType(), "ActiveRecordBridge"); return new $class($a_adt); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getInstance()\n {\n return Doctrine_Core::getTable('Actividad');\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('TrOnlineRecord');\n }", "public static function instance() {\n\t\t$classe = get_called_class();\n\t\t$table = str_replace(\"db_\", \"\", $classe);\n\t\t$instance = db::instance(db::table($table));\n\t\treturn $instance;\n\t}", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Agencia');\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('AdManageAttr');\n }", "protected function getActiveRecordAdapter() {\n\t\treturn new WSAL_Adapters_MySQL_ActiveRecord( $this->connection );\n\t}", "public static function getInstance()\r\n {\r\n return Doctrine_Core::getTable('UtoconsultAdvertisement');\r\n }", "public function get_active_instance() {\n\n\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Activity');\n }", "public static function getInstance()\r\n {\r\n return Doctrine_Core::getTable('pan_application');\r\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Encadrant_ere');\n }", "public function getObject()\n {\n $object = Doctrine::getTable($this->getModel())->findOneById($this->getModelId());\n\n return $object;\n }", "public function query()\n {\n if ($model = $this->model) {\n return new $model();\n }\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('AppInfo');\n }", "public static function first()\n\t{\n\t\treturn self::new_instance_records()->first();\n\t}", "public function get_active_instance() { \n\n\n\t}", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Cal');\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('PolozkyObj');\n }", "public static function getInstance()\n {\n\n if (!isset(self::$_instance))\n self::$_instance = new PDOAb();\n return self::$_instance;\n }", "public function ormObject();", "public function getQueryAR()\n {\n // require_once('dbActiveRecord.php');\n // return DbActiveRecord::getSingleton();\n return $this;\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Peca');\n }", "public static function initActiveRecordByType()\r\n\t{\r\n\t\trequire_once \"Services/ADT/classes/ActiveRecord/class.ilADTActiveRecordByType.php\";\r\n\t}", "public static function Create() {\r\n\t\t$cls = get_called_class();\r\n\t\t$model = new $cls();\r\n\t\t$record = new Dbi_Record($model, array());\r\n\t\treturn $record;\r\n\t}", "public static function getInstance()\n {\n return Doctrine_Core::getTable('FakturaObj');\n }", "public function getRecordByPK($pkValue, \\PDO $recordInstancePdoConnection = null): ActiveRecordInterface;", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Domain');\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Novedad');\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('ActivityFields');\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('EiParam');\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('JobeetAffiliate');\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('InvoiceParticularEntry');\n }", "public function __get($table){\n if(!isset($this->dbORM[$table])){\n $this->dbORM[$table] = new DBObject(compact('table')); //Create a new object using the table name \n }\n \n return $this->dbORM[$table];\n }", "public function get_object(): ActiveRecordInterface\n {\n\n if ($this->is_new()) {\n throw new RunTimeException(sprintf(t::_('The method %s() can not be invoked on new instances.'), __METHOD__));\n }\n $class = ActiveRecord::get_class_name($this->object_alias_class_id);\n return new $class($this->object_alias_object_id);\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Offer');\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Alerte_bpi');\n }", "public static function getInstance()\n {\n if(!isset(self::$_dbObjectInstance))\n {\n $className = get_class();\n self::$_dbObjectInstance = new $className;\n }\n\n return self::$_dbObjectInstance;\n }", "public static function getInstance() {\n return Doctrine_Core::getTable('adHotel');\n }", "public static function getInstance() {\n return Doctrine_Core::getTable('PaymentDate');\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('AgreementModelType');\n }", "public function getDBInstance()\n {\n return $this->DBInstance;\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('dakArrangerUser');\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Models_Main_AffiliateProvidedservices');\n }", "public static function findActiveOne($id='')\n {\n $tableName = static::tableName();\n return static::find()->where(['id' => $id])->andWhere([$tableName.'.status' => ActiveRecord::STATUS_ACTIVE])->one();\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Answer');\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Account');\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Program');\n }", "public function getRecord()\n {\n return $this->get(self::_RECORD);\n }", "public static function getInstance()\r\n {\r\n return Doctrine_Core::getTable('contact');\r\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('ActivityLog');\n }", "function ActiveRecord($table)\n\t\t{\n\t\t\tparent::Model();\n\t\t\t$this->record = $table;\n\t\t}", "public function getAccount(): Account\n {\n return $this->model(Account::class);\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Viaje');\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('BarbaraClass');\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Vendas');\n }", "public function getRecord();", "public static function getInstance()\n {\n return Doctrine_Core::getTable('dakEvent');\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('OtraInformacion');\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Assemblage');\n }", "public function getRecord() {}", "public function getRecord() {}", "public function getRecord() {}", "protected function getRecordById(int $id): object\n {\n return $this->db->query(\"SELECT * FROM \" . $this->db_table . \" WHERE id = '\" . $id . \"'\");\n\n }", "public static function getInstance()\r\n {\r\n return Doctrine_Core::getTable('Hospital');\r\n }", "public function findOne() {\n return parent::findOne();\n }", "public static function getInstance() {\n return Doctrine_Core::getTable('ReelVideoRecordingFormatType');\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Item');\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Application_Model_RozwiazanieZadania');\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Palabra');\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Release');\n }", "public function getRecordInstance($module, $auth = true) {\n if ($auth) {\n self::auth();\n }\n \n $record = ZCRMRecord::getInstance($module, null);\n return $record;\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Presta');\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Observation');\n }", "public static function obtenerint(){\n if (self::$db === null){\n \tself::$db = new self();\n }\n return self::$db;\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Pizarra');\n }", "public function get_instance() {\r\n\t\treturn $this->obj;\r\n\t}", "public static function getInstance()\n {\n return Doctrine_Core::getTable('AdvertNetwork');\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('TblArticleRef');\n }", "public function getDBBridgeForInstance(ilADT $a_adt)\r\n\t{\r\n\t\t$class = $this->initTypeClass($a_adt->getType(), \"DBBridge\");\t\t\r\n\t\treturn new $class($a_adt);\t\r\n\t}", "public function activo()\n\t{\n\t\treturn $this->morphOne(\n\t\t\tActivo::class,\n\t\t\t'Activo'\n\t\t);\n\t}", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Models_Solaria_TimeZone');\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Models_Main_CashappPredictiveMatchLevel');\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Ordered');\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Audio');\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('TipoResgate');\n }", "public static function getInstance($type = 'base')\n\t{\n\t\tif (isset(self::$cache[$type])) {\n\t\t\treturn self::$cache[$type];\n\t\t}\n\t\t$db = new self(self::getConfig($type));\n\t\t$db->dbType = $type;\n\t\tself::$cache[$type] = $db;\n\t\treturn $db;\n\t}", "public static function getInstance()\n {\n return Doctrine_Core::getTable(\"Order\");\n }", "protected function get_record()\n\t{\n\t\treturn $this->key ? parent::get_record() : null;\n\t}", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Models_Main_AffiliateCoverage');\n }", "public function dbInstance();", "public static function get_model_dba() {\n $model_dba_id = Doggy_Config::get('app.model.dba');\n return self::get_dba(empty($model_dba_id)?'default':$model_dba_id);\n\t}", "public static function getInstance()\n {\n return Doctrine_Core::getTable('IdeaGoal');\n }", "abstract public function get_instance();", "public static function getInstance()\r\n {\r\n return Doctrine_Core::getTable('OrderProductDetails');\r\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('EbayGame');\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Models_Intranet_InvoicingBatchType');\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Echec_authentification');\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('PsEmployee');\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('StudentAcademicStatus');\n }", "public static function getInstance(): ORM\n {\n if (empty(self::$instance)) {\n self::$instance = new static();\n }\n\n return self::$instance;\n }" ]
[ "0.63890654", "0.6366125", "0.6313488", "0.63093156", "0.629069", "0.6254954", "0.62446594", "0.6192995", "0.61900324", "0.61162394", "0.61070716", "0.6092329", "0.6058042", "0.6052052", "0.6048207", "0.6031779", "0.6027855", "0.60212207", "0.6014998", "0.5984389", "0.596708", "0.5949735", "0.5933703", "0.5930891", "0.5923416", "0.5918977", "0.59104675", "0.59090805", "0.5892996", "0.5889605", "0.58886147", "0.58769125", "0.5863122", "0.58621436", "0.58594346", "0.58345485", "0.5826901", "0.5824317", "0.5821979", "0.5817005", "0.5812525", "0.5800638", "0.5792902", "0.5784", "0.57807815", "0.5776405", "0.57667553", "0.57656384", "0.57511306", "0.5748962", "0.57484686", "0.57417387", "0.573465", "0.5727596", "0.57260996", "0.5720965", "0.57198817", "0.57174546", "0.5713368", "0.571312", "0.5712343", "0.5712343", "0.571183", "0.5708254", "0.5705216", "0.5704885", "0.570056", "0.5686277", "0.56839556", "0.5672164", "0.56706315", "0.56533134", "0.5651134", "0.5648353", "0.5634969", "0.5629698", "0.56283295", "0.56052977", "0.5600967", "0.5599656", "0.5599402", "0.559765", "0.5595032", "0.5593911", "0.5593883", "0.55904466", "0.5589082", "0.5586846", "0.5583271", "0.5573828", "0.557177", "0.55643046", "0.55531013", "0.5549525", "0.5548521", "0.55472857", "0.55384254", "0.5530148", "0.55293256", "0.55259645" ]
0.633572
2
active records Get active record instance
public static function getActiveRecordInstance(ilADTGroupDBBridge $a_properties) { require_once "Services/ADT/classes/ActiveRecord/class.ilADTActiveRecord.php"; return new ilADTActiveRecord($a_properties); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function first()\n\t{\n\t\treturn self::new_instance_records()->first();\n\t}", "public function get_active_instance() {\n\n\n }", "public function get_active_instance() { \n\n\n\t}", "public function query()\n {\n if ($model = $this->model) {\n return new $model();\n }\n }", "public function getRecord();", "public function getRecord() {}", "public function getRecord() {}", "public function getRecord() {}", "public function getQueryAR()\n {\n // require_once('dbActiveRecord.php');\n // return DbActiveRecord::getSingleton();\n return $this;\n }", "public function getRecord()\n {\n return $this->get(self::_RECORD);\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('TrOnlineRecord');\n }", "public function findOne() {\n return parent::findOne();\n }", "public function getRecord(){\n return $this->record;\n }", "public function first() {\n\t\treturn $this->execute()->first();\n\t}", "public static function findActiveOne($id='')\n {\n $tableName = static::tableName();\n return static::find()->where(['id' => $id])->andWhere([$tableName.'.status' => ActiveRecord::STATUS_ACTIVE])->one();\n }", "function getRecord($params=array()){\n\n\t\t$data = $this->_parseSQL();\n\t\t$wrapper =& new SQL_Parser_wrapper($data);\n\t\t$where = array();\n\t\tforeach ( $params as $key=>$value ){\n\t\t\t$tablename = $this->getTableName($key);\n\t\t\tif ( isset($tablename) ) $where[] = '`'.addslashes($tablename).'`.`'.$key.'`=\\''.addslashes($params[$key]).'\\'';\n\t\t}\n\t\t$where = implode(' AND ', $where);\n\t\t$wrapper->addWhereClause($where);\n\t\t$compiler =& $this->_getCompiler();\n\t\t$sql = $compiler->compile($data);\n\t\t$db =& Dataface_DB::getInstance();\n\t\t$res = $db->query($sql);\n\t\tif ( PEAR::isError($res) ) return $res;\n\t\tif ( !$res ) return PEAR::raiseError(mysql_error($this->app->_db));\n\t\tif ( mysql_num_rows($res) == 0 ) return null;\n\t\t\n\t\t$vals = mysql_fetch_assoc($res);\n\t\tmysql_free_result($res);\n\t\treturn $this->newRecord($vals);\n\t\t\n\t}", "public function first()\n\t{\n\t\treturn Model::first();\n\t}", "public static function instance() {\n\t\t$classe = get_called_class();\n\t\t$table = str_replace(\"db_\", \"\", $classe);\n\t\t$instance = db::instance(db::table($table));\n\t\treturn $instance;\n\t}", "protected function getRecordById(int $id): object\n {\n return $this->db->query(\"SELECT * FROM \" . $this->db_table . \" WHERE id = '\" . $id . \"'\");\n\n }", "public function getFromDB() {}", "public function ormObject();", "public function getRecord(){\n \n return $this->record;\n }", "public function active() {\n return $this->hasOne('App\\Models\\Active');\n }", "function Borrow_model()\n\t{\n\t\tparent::Query();\n\t}", "public function modelGetRecord(){\n $id = isset($_GET[\"id\"])&&$_GET[\"id\"] > 0 ? $_GET[\"id\"] : 0;\n $conn = Connection::getInstance();\n // thuc hien truy van\n $query = $conn->query(\"select * from inventory where id=$id\");\n // tra ve mot ban ghi\n return $query->fetch();\n }", "public static function get_query()\n\t{\n\t\treturn self::new_instance_records()->get_query();\n\t}", "public function single(){\r\n $this->execute();\r\n return $this->stmt->fetch(PDO::FETCH_OBJ);\r\n }", "public function getActive()\n {\n return $this->get(self::_ACTIVE);\n }", "protected function get_record()\n\t{\n\t\treturn $this->key ? parent::get_record() : null;\n\t}", "public function getInstanceQuery()\n {\n return $this->get(self::_INSTANCE_QUERY);\n }", "public function model() {\n if ($this->_model !== null)\n return $this->_model;\n return $this->_model = Account::model()->findByPk($this->getId());\n }", "public function single(){\n\t\t$this->execute();\n\t\treturn $this->stmt->fetch(PDO::FETCH_OBJ);\n\t}", "public function getRecord()\n {\n return $this->options['peoplefinder']->getByNUID($this->nu_id);\n }", "public function getRecord()\r\n\t{\r\n\t\treturn $this->record;\r\n\t}", "public function single() {\n $this->execute();\n return $this->stmt->fetch(PDO::FETCH_OBJ);\n }", "public function getForRecord($record);", "private function get()\n {\n $db = 'Ernio\\\\Bankas\\\\' . $this->settings;\n return $db::get();\n }", "public function getLiveRecord() {}", "function &returnRecord()\n\t{\n\t\treturn $this->record;\n\t}", "function &getRecordByID($id){\n global $db;\n\n $sql = \"SELECT * \"\n .\"FROM products \"\n .\"WHERE id = $id\";\n //Basic::EventLog(\"Products->getRecordByID: \".$sql);\n $row =& $db->queryRow($sql);\n return $row;\n }", "function get()\n\t{\n\t\tif (empty($this->use_db)) $this->use_db = false; //use default connection\n\t\t$this->sql = 'SELECT * FROM ' . $this->table;\n\t\t$this->apply_filters();\n\t\t$this->apply_sort();\n\t\treturn $this->fetch_records();\n\t}", "protected function getActiveRecordAdapter() {\n\t\treturn new WSAL_Adapters_MySQL_ActiveRecord( $this->connection );\n\t}", "public function query()\n {\n return Customer::query();\n }", "public function getObject()\n {\n $object = Doctrine::getTable($this->getModel())->findOneById($this->getModelId());\n\n return $object;\n }", "public function getActive()\n {\n return $this->get('active', false);\n }", "public function single()\n {\n $this->executeQuery($this->statement);\n return $this->fetch($this->statement);\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Actividad');\n }", "public static function DB() {\n\n\t\t if (!isset(self::$instance)){\n\t\t \t//self::$db = new Model;\n\t\t \tself::$instance = new self;\n\t\t \t\n\t\t }\n\n\t\t return self::$instance;\n\t\t \n\n\t }", "public function record()\n {\n return $this->belongsTo(\\App\\Model\\Record\\Record::class);\n }", "public function findOne() {\n $this->buildSql();\n $rows = $this->db->findOne($this->sql);\n return $rows;\n }", "public function first()\n\t{\n\t\treturn $this->find()->first();\n\t}", "protected function _getRecord()\r\n\t{\r\n\t\t$oFlexSliderSlider = new FlexSliderSlider($this -> _iId);\r\n\t\treturn $oFlexSliderSlider -> get();\r\n\t}", "public function getCurrentRecord()\n {\n return $this->current_record;\n }", "public function getById() {}", "public static function Create() {\r\n\t\t$cls = get_called_class();\r\n\t\t$model = new $cls();\r\n\t\t$record = new Dbi_Record($model, array());\r\n\t\treturn $record;\r\n\t}", "public static function createQuery()\n\t{\n\t\treturn new ActiveQuery(['modelClass' => get_called_class()]);\n\t}", "public function get(){\n\t\t\t\t\t $this->db->setTablename($this->tablename);\n\t\t\t\t\t ;\n return $this->db->getRows(array(\"where\"=>$condition,\"return_type\"=>\"single\"));\n\t\t\t\t\t }", "public function dbInstance();", "public function single()\n\t{\n\t\t$this->execute();\n\t\treturn $this->stm->fetch(PDO::FETCH_OBJ);\n\t}", "public function get_instance() {\r\n\t\treturn $this->obj;\r\n\t}", "public function getDBInstance()\n {\n return $this->DBInstance;\n }", "public static function getActive()\n {\n $objects = self::getTable();\n return $objects->select('[deleted=0]', 'all', null, null, 'title', 'ASC');\n }", "public function __get($table){\n if(!isset($this->dbORM[$table])){\n $this->dbORM[$table] = new DBObject(compact('table')); //Create a new object using the table name \n }\n \n return $this->dbORM[$table];\n }", "public function modelGetRow($id){\n \t$record = DB::table(\"categories\")->where(\"id\",\"=\",$id)->first();\n \treturn $record;\n }", "function getActive() {\n\t\treturn $this->_Active;\n\t}", "protected function get()\n {\n return $this->getById($this->id);\n }", "public function getDBobject(){\r\n return $this->db;\r\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('PolozkyObj');\n }", "public static function obtenerint(){\n if (self::$db === null){\n \tself::$db = new self();\n }\n return self::$db;\n }", "public function get(){\n\t\t\t\t\t $this->db->setTablename($this->tablename);\n\t\t\t\t\t $condition = array(\"IDP\" =>$this->IDP);\n return $this->db->getRows(array(\"where\"=>$condition,\"return_type\"=>\"single\"));\n\t\t\t\t\t }", "public static function getInstance()\n {\n\n if (!isset(self::$_instance))\n self::$_instance = new PDOAb();\n return self::$_instance;\n }", "public function getQuery(): ActiveQuery\n {\n return ContactData::find();\n }", "public function first(){\n return $this->find(1);\n }", "private function getRecord() {\n\n if (empty($this->property('recordSlug'))) {\n return null;\n }\n\n $pluginManager = PluginManager::instance()->findByIdentifier('Rainlab.Translate');\n \n $record = Record::query();\n\n /**\n * Filter slug\n */\n if ($pluginManager && !$pluginManager->disabled) {\n $record->transWhere('slug', $this->property('recordSlug'));\n } else {\n $record->where('slug', $this->property('recordSlug'));\n }\n\n /**\n * Filter area\n */\n if( $this->property('areaSlug') ) {\n \n $record->whereHas('area', function ($query) {\n\n $query->where('slug', '=', $this->property('areaSlug'));\n });\n }\n\n /**\n * Filter category\n */\n if( $this->property('categorySlug') ) {\n\n if( $this->property('useMainCategory') ) {\n\n $record->whereHas('category', function ($query) use ($pluginManager) {\n\n if ($pluginManager && !$pluginManager->disabled) {\n $query->transWhere('slug', $this->property('categorySlug'));\n } else {\n $query->where('slug', '=', $this->property('categorySlug'));\n }\n });\n }\n\n if( $this->property('useMultiCategories') ) {\n\n $record->whereHas('categories', function ($query) use ($pluginManager) {\n\n if ($pluginManager && !$pluginManager->disabled) {\n $query->transWhere('slug', $this->property('categorySlug'));\n } else {\n $query->where('slug', '=', $this->property('categorySlug'));\n }\n });\n } \n }\n\n /**\n * Filter active only\n */\n if( $this->property('activeOnly') ) {\n $record->isActive();\n }\n\n $recordDetail = $record->first();\n\n return $recordDetail;\n }", "public function instance() {\n\t\n\t\treturn $this;\n\t\n\t}", "function getQuestionRecord($question_id)\n {\n return QuestionBank::where('id','=',$question_id)->first();\n }", "public function getRecordInstance($module, $auth = true) {\n if ($auth) {\n self::auth();\n }\n \n $record = ZCRMRecord::getInstance($module, null);\n return $record;\n }", "function getallrecord()\n\t{\n\t\treturn $this->db->get(\"tblteman\");\n\t\t// fungsi get(\"namatable\") adalah active record ci\n\t}", "public function getById( $id ){\n return $this->model->find($id);\n }", "public function model()\n {\n $model = $this->_model;\n return new $model;\n\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Activity');\n }", "function ActiveRecord($table)\n\t\t{\n\t\t\tparent::Model();\n\t\t\t$this->record = $table;\n\t\t}", "public function getRecord($slug){\n return $this->where(\"slug\", $slug)->first();\n }", "public function getRecordByPK($pkValue, \\PDO $recordInstancePdoConnection = null): ActiveRecordInterface;", "public static function getInstance()\n {\n if(!isset(self::$_dbObjectInstance))\n {\n $className = get_class();\n self::$_dbObjectInstance = new $className;\n }\n\n return self::$_dbObjectInstance;\n }", "public function get() {\n $where = func_get_args();\n $this->_set_where($where);\n\n $this->_callbacks('before_get', array($where));\n\n if ($this->result_mode == 'object') {\n $row = $this->db->get($this->_table())->row();\n } else {\n $row = $this->db->get($this->_table())->row_array();\n }\n\n $row = $this->_callbacks('after_get', array($row));\n\n return $row;\n }", "public function fresh()\n {\n if ($this->hasModel() && $this->exists()) {\n return odb($this->db(), $this->table())->find((int) $this->data['id']);\n }\n\n return $this;\n }", "public function getRecord()\n {\n $entry = $this->getEntry();\n if ($entry) {\n return $entry->getRecord();\n }\n }", "protected function _get_row()\r\n {\r\n $result = $this->db->get()->row_array();\r\n\r\n //execute extends in child class.\r\n $result = $this->_extend_get_row($result);\r\n\r\n return $result;\r\n }", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}" ]
[ "0.6939554", "0.6804903", "0.6641189", "0.66146743", "0.6605447", "0.6516161", "0.65153503", "0.65153503", "0.64461744", "0.6412062", "0.6348409", "0.62574935", "0.6246687", "0.6225461", "0.6220919", "0.62063897", "0.619673", "0.61849815", "0.61756223", "0.6128354", "0.61223245", "0.61129016", "0.608124", "0.6076998", "0.6064149", "0.60432863", "0.60315186", "0.60229766", "0.6011244", "0.60087204", "0.60083073", "0.6001397", "0.5996771", "0.59795177", "0.5978712", "0.59564215", "0.59532243", "0.59510344", "0.59426457", "0.59343696", "0.5931623", "0.59262383", "0.5923382", "0.59126943", "0.59073776", "0.58964247", "0.5896389", "0.58872694", "0.5875938", "0.5872395", "0.5862947", "0.58555466", "0.58546853", "0.5849329", "0.5847689", "0.5845236", "0.5830661", "0.5824313", "0.58196265", "0.5816282", "0.5812695", "0.58080184", "0.5800949", "0.57994515", "0.5794359", "0.5786925", "0.5786187", "0.5781893", "0.57789785", "0.577887", "0.5777593", "0.57661104", "0.576336", "0.57632923", "0.576321", "0.5762496", "0.57623607", "0.5755119", "0.57472575", "0.57426804", "0.5741565", "0.5719722", "0.57102025", "0.5706951", "0.5706091", "0.57039845", "0.57027584", "0.5700933", "0.5700573", "0.569446", "0.569446", "0.569446", "0.569446", "0.569446", "0.569446", "0.569446", "0.569446", "0.569446", "0.569446", "0.569446", "0.569446" ]
0.0
-1
Init active record by type
public static function initActiveRecordByType() { require_once "Services/ADT/classes/ActiveRecord/class.ilADTActiveRecordByType.php"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function __init(string $type = \"PDO\") {\n $this -> __createAdapter($type, static::$table);\n }", "public function __construct(){\n\n\t\t$this->types_model = new Types();\n\t}", "protected function initDatabaseRecord() {}", "private function init() {\r\n settype($this->id, \"int\");\r\n settype($this->name, \"string\");\r\n settype($this->max_players, \"int\");\r\n settype($this->is_over_yet, \"boolean\");\r\n settype($this->players, \"array\");\r\n }", "public function init(string $model_type): Repository;", "public function __construct($modelType, Storage $storage);", "private function init() {\n\t\tlist(, $this->db, $this->table) = explode('_', get_called_class(), 3);\n\t\t$this->db = defined('static::DB') ? static::DB : $this->db;\n\t\t$this->table = defined('static::TABLE') ? static::TABLE : $this->table;\n\t\t$this->pk = defined('static::PK') ? static::PK : 'id';\n\t}", "public function __construct($type = 'mysql')\n {\n $this->conn = \\DbConn::initConnection($type);\n }", "public function initialize()\n {\n $this->setSource('custom_fields_types');\n\n $this->hasMany(\n 'id',\n 'Canvas\\Models\\CustomFieldsTypesSettings',\n 'custom_fields_types_id',\n ['alias' => 'typesSetting']\n );\n }", "public function __construct($type)\n {\n }", "public function __construct($type_row = null)\n {\n if( !is_null($type_row)) {\n $this->id = $type_row instanceof Zend_Db_Table_Row ? $type_row->ID : $type_row['ID'];\n\t\t\t$this->name = $type_row instanceof Zend_Db_Table_Row ? $type_row->NAME : $type_row['NAME'];\n\t\t\t$this->is_show = $type_row instanceof Zend_Db_Table_Row ? $type_row->IS_SHOW : $type_row['IS_SHOW'];\n\t\t\t$this->is_difficult = $type_row instanceof Zend_Db_Table_Row ? $type_row->IS_DIFFICULT : $type_row['IS_DIFFICULT'];\n }\n \n }", "public function init()\r\n {\r\n $this->_helper->db->setDefaultModelName('Item');\r\n }", "function __construct($type='simple')\n {\n $this->type = $type;\n }", "function __construct($type) {\n\t$this->type = $type;\n\t}", "public function __construct()\n\t\t{\n\t\t\t$this->_db_table = new Application_Model_DbTable_TourType();\n\t\t}", "public function init()\n {\n\n // load the utility class name\n $utilityClassName = $this->getUtilityClassName();\n\n // initialize the prepared statements\n $this->eavEntityTypeStmt = $this->getConnection()->prepare($utilityClassName::EAV_ENTITY_TYPES);\n }", "public function init()\n {\n $this->_helper->db->setDefaultModelName('BatchUpload_MappingSet');\n }", "public function __construct($type) {\n $this->type = $type;\n }", "public function __construct($type)\n {\n $this->type=$type;\n }", "public function __construct($type)\n\t{\n\t\t$this->type = $type;\n\t\t$this->cache_time = Kohana::config($this->type.'.cache_time');\n\t}", "protected abstract function initializeEntityType(): string;", "public function __construct($type)\n {\n $this->type = $type;\n }", "public function __construct() {\n\n $this->tableName = \"re_event_type\";\n $this->setColumnsInfo(\"id\", \"int(11)\", 0);\n $this->setColumnsInfo(\"name\", \"varchar(250)\", \"\");\n $this->setColumnsInfo(\"id_space\", \"int(11)\", 0);\n $this->primaryKey = \"id\";\n }", "abstract protected function initializeMappedTypes();", "public static function initModel($modelType){\n $m=new $modelType();\n unset($m);\n }", "public function withType($type)\n {\n $this->_model['type'] = $type;\n return $this;\n }", "public function init()\r\n {\r\n $this->_helper->db->setDefaultModelName('DefaultMetadataValue');\r\n }", "public function __construct($obj = null)\n {\n if( !is_null($obj) && $obj instanceof Zend_Db_Table_Row ) {\n $this->id = $obj->ID;\n $this->name = $obj->NAME;\n }\n \n if(is_array($obj)){\n //echo $obj['TOUR_TYPE_ID'];die;\n $this->id = $obj['ID'];\n if(isset($obj['name'])) $this->name = $obj['NAME'];\n }\n }", "function backup_migrate_crud_type_load($type) {\n $out = NULL;\n $types = backup_migrate_crud_types();\n if (!empty($types[$type])) {\n $info = $types[$type];\n if ($info['include']) {\n backup_migrate_include($info['include']);\n }\n $out = new $info['class'];\n }\n return $out;\n}", "public function __construct ($init)\n {\n if(is_string($init)) //this is suppose to be a table name\n {\n $init = $this->add_table($init);\n $this->base_table = $this->base_models[$init]->_table;\n }\n }", "public static function initialise() {\n \t// We can't modify it in place, else we'll break any logging done inside the SihnonFramework tree\n \t// or other subclass trees.\n \tstatic::$types = parent::$types;\n \t\n \t// Add the new data types for this subclass\n static::$types['job_id'] = 'int'; \n }", "function __construct($id='', $type='current'){\r\n\t\tGLOBAL $strLocal;\r\n\t\tGLOBAL $arrUsrData;\r\n\t\t\r\n\t\t$this->gridName = self::GridName;\t\t\r\n\t\t$this->gridClass = 'headcount_record';\t\t\r\n\t\t$this->register = self::Register;\r\n\t\t\r\n\t\tswitch($type){\r\n\t\t\tcase 'new':\r\n\t\t\t\t$this->table = 'tbl_new_employee';\r\n\t\t\t\t$this->prefix = 'nem';\r\n\t\t\tbreak;\r\n\t\t\tcase 'current':\r\n\t\t\tdefault:\r\n\t\t\t\t$this->table = 'tbl_current_employee';\r\n\t\t\t\t$this->prefix = 'cem';\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\t$this->type = $type;\r\n\t\t\r\n\t\tparent::__construct($id);\r\n\t\t\r\n\t}", "protected function init()\r\n {\r\n $this->table_name = 'libelles';\r\n $this->table_type = 'system';\r\n $this->table_gateway_alias = 'Sbm\\Db\\SysTableGateway\\Libelles';\r\n $this->id_name = array(\r\n 'nature',\r\n 'code'\r\n );\r\n }", "public static function getInstance($type = 'base')\n\t{\n\t\tif (isset(self::$cache[$type])) {\n\t\t\treturn self::$cache[$type];\n\t\t}\n\t\t$db = new self(self::getConfig($type));\n\t\t$db->dbType = $type;\n\t\tself::$cache[$type] = $db;\n\t\treturn $db;\n\t}", "public function __construct($table, $type = null)\n {\n $this->type = null;\n $this->table = $table;\n $this->on = array();\n $this->using = array();\n\n if (null !== $type) {\n $this->type = (string) $type;\n }\n\n $this->quoter = Quoter::instance();\n }", "public function __construct() {\n $this->db = new Database();\n // no need to set $accountType since\n // this is an abstract base class\n }", "protected static function init()\n\t{\n\t\tif( static::$table === null )\n\t\t{\n\t\t\t// set the table name by Model name\n\t\t\t// Ex: UserModel -> users\n\t\t\tstatic::$table = strtolower( preg_replace('/Model$/', '', get_called_class()) ) . \"s\";\n\t\t}\n\t}", "function __construct( $class )\n\t{\n\t\t$this->activeRecord = $class;\n\t}", "public function initialize()\n {\n $this->setSource('tblEntry');\n\n $this->hasOne('userId', '\\Soul\\Model\\User', 'userId', ['alias' => 'user']);\n $this->belongsTo('eventId', '\\Soul\\Model\\Event', 'eventId', ['alias' => 'event']);\n $this->hasOne('paymentId', '\\Soul\\Model\\Payment', 'paymentId', ['alias' => 'payment']);\n }", "private function initActiveRecord() {\n \n require_once (Quantum::QUANTUM_ROOT.'system/lib/activerecord/ActiveRecord.php');\n \n ActiveRecord\\Config::initialize(function($cfg)\n {\n $cfg->set_model_directory(Quantum::QUANTUM_ROOT.'system/models');\n $cfg->set_connections(array('development' => 'mysql://'.Quantum::DATABASE_USER.':'.Quantum::DATABASE_PASS.'@'.Quantum::DATABASE_HOST.'/'.Quantum::DATABASE_NAME.''));\n });\n \n \n }", "public function setType($type)\n {\n $this->model->_type = $type;\n return $this;\n }", "private static function init_active_record() {\n // $config = include(self::file('Config', 'database.php'));\n // $capsule->addConnection($config);\n // $capsule->bootEloquent();\n }", "public function init()\n {\n $this->yatimsModel = new Admin_Model_DbTable_GestYatims();\n $this->dateImpl = new Default_Model_DateImpl();\n }", "protected function init()\n {\n if (!isset($this['fields'])) {\n $model = $base = [];\n if (isset($this->options['base_model']) && $this->options['base_model']) {\n $base = static::getTableInfo($this->options['base_model']) ? : [];\n }\n if (isset($this->options['table_name']) && (!$base || $this->options['table_name'] != $base['table_name'])) {\n $model = $this->getTableInfo($this->options['table_name']) ? : [];\n }\n \n if ($model && $base) {\n $model['ext_table'] = $model['table_name'];\n $model['ext_fields'] = isset($model['master_fields']) ? $model['master_fields'] : array_keys($model['fields']);\n \n $model['master_table'] = $base['table_name'];\n $model['master_fields'] = isset($base['master_fields']) ? $base['master_fields'] : array_keys($base['fields']);\n }\n \n // merge\n $model = ArrayHelper::merge($base, $model);\n $this->setOption($model);\n }\n }", "private static function loadItems($type)\n {\n \tself::$_items[$type]=array();\n \t$models=self::model()->findAll();\n \tforeach($models as $model)\n \t\tself::$_items[$type][$model->id]=$model->name;\n }", "public function init() {\n foreach ($this->_hidden as $col => $name) {\n if ($col == \"transaction_type_id\") {\n parent::createHidden($col);\n }\n }\n\n // Generating fields \n // for Form_Iadmin_TransactionTypeAdd\n foreach ($this->_fields as $col => $name) {\n switch ($col) {\n case \"transaction_type_name\":\n parent::createText($col);\n break;\n case \"nature\":\n parent::createRadioWithoutMultioptions($col);\n break;\n case \"is_adjustment\":\n parent::createCheckbox1($col);\n break;\n default:\n break;\n }\n\n //Generating radio\n // for Form_Iadmin_TransactionTypeAdd\n if (in_array($col, array_keys($this->_radio))) {\n parent::createRadio($col, $this->_radio[$col]);\n }\n }\n }", "private static function instantiate($record) {\n $class_name = get_called_class();\n $object = new $class_name;\n foreach($record as $attribute=>$value) {\n if($object->has_attribute($attribute)) {\n $object->$attribute = $value;\n }\n }\n return $object;\n }", "public function create($type = '') {\n return (object) array(\n 'aid' => '',\n 'type' => $type,\n 'title' => '',\n );\n }", "public function initialize()\n {\n $this->hasMany('id', 'app\\common\\models\\base\\UserProfile', 'user_id', array('alias' => 'UserProfile'));\n $this->hasMany('id', 'app\\common\\models\\base\\UserRoles', 'user_id', array('alias' => 'UserRoles'));\n $this->belongsTo('type_id', 'app\\common\\models\\base\\UserType', 'id', array('alias' => 'UserType'));\n }", "public function __construct()\n {\n $this->typeRepo = new TypesRepository();\n }", "public function setType($type)\n{\n$this->type = $type;\n\nreturn $this;\n}", "public function __construct() {\n $this->Types;\n }", "private static function loadItems($type)\n\t{\n\t\tself::$_items[$type]=array();\n\t\t$models=self::model()->findAll();\n\t\tforeach($models as $model)\n\t\t\tself::$_items[$type][$model->id]=$model->productType->name;\n\t}", "public function make($type);", "function fromDB($value, $type) {\n\t\t//everything is nullable\n\t\tif($value === null) return null;\n\t\t\n\t\tswitch($type) {\n\t\t\tcase 'datetime': // ISO-8601\n\t\t\tcase 'date':\n\t\t\t\treturn new DateTime($value);\n\t\t\tcase 'integer':\n\t\t\t\treturn (int) $value;\n\t\t\tcase 'boolean':\n\t\t\t\treturn (bool) $value;\n\t\t}\n\t\treturn $value;\n\t}", "public function _init($entity_type)\n {\n return TRUE;\n }", "public static function getFromType($type, $params) {\n\t\t$class = implode('', array_map('ucfirst', explode('_', $type))).'DataSource';\n\t\tif(!class_exists($class)) return null;\n\t\t\n\t\treturn new $class($params);\n\t}", "abstract public function setDAO($type);", "public function __construct(){\n $this->db = new Base;\n }", "public function __construct($type = null, $newInfo = null)\n {\n $this->dbInfo = Config::DBInfo();\n $this->connect();\n if (! is_null($type)) {\n $this->type = $type;\n }\n }", "public function __construct() {\n parent::__construct();\n //setting attribute types.\n settype($this->id, \"integer\");\n settype($this->name, \"string\");\n settype($this->question_type_id, \"integer\");\n }", "function __construct()\n {\n if (empty($this->table)) {\n $this->table = get_called_class();\n }\n }", "public function init(BaseModule\\Record $record): void\n\t{\n\t\t$this->appId = $record->controller->app['id'];\n\t\t$this->record = $record->recordModel;\n\t}", "public function init()\r\n {\r\n $dbTable = new Application_Model_DbTable_Fournisseur();\r\n $this->mapper = new Application_Model_Mapper_Fournisseur($dbTable);\r\n }", "private function initializeMappedTypes()\n {\n $property = new \\ReflectionProperty('Fridge\\DBAL\\Platform\\AbstractPlatform', 'mappedTypes');\n $property->setAccessible(true);\n\n $property->setValue($this->platform, array('foo' => Type::INTEGER));\n }", "public function __construct($data, RecordType $recordType = null)\n {\n $this->data = $data;\n $this->recordType = $recordType;\n }", "function init(){\n\t\t/*\n\t\t * Redefine this object, call parent then use addField to specify which fields\n\t\t * you are going to use\n\t\t */\n\t\tparent::init();\n\t\t$this->table_name = get_class($this);\n\t}", "public function __construct($type, $data = null, $connectionName = 'default')\n {\n // Set connection name\n $this->connectionName = $connectionName;\n\n $this->query['type'] = $type;\n\n // Set the prefix\n $this->prefix = $this->connection()->prefix;\n\n // Figure out what to do with the\n // $data parameter.\n switch ($type) {\n case \"SELECT\":\n case \"SELECT DISTINCT\":\n $this->query['select'] = ($data) ? $data : array('*');\n break;\n\n case \"INSERT INTO\":\n $this->query['data'] = $data;\n break;\n\n case \"UPDATE\":\n $this->tableName($data);\n break;\n }\n }", "public function setType($type){ }", "public function initialize()\n {\n $this->setSchema(\"animedb\");\n $this->setSource(\"episodes\");\n $this->hasMany('id', 'Videos', 'episode_id', ['alias' => 'Videos']);\n $this->belongsTo('anime_id', '\\Anime', 'id', ['alias' => 'Anime', 'reusable' => true]);\n $this->allowEmptyStringValues(['title', 'description']);\n $this->skipAttributes(['date']);\n }", "abstract protected function initDataTypes();", "public function init()\n {\n \theader('content-type: text/html; charset=utf8');\n \tdefined('BASE_URL')\t|| define('BASE_URL', Zend_Controller_Front::getInstance()->getBaseUrl());\n \t\r\n \t$db=new Application_Model_DbTable_DbGlobal();\n \t$sql = \"SELECT u.user_type_id,u.user_type FROM `rms_acl_user_type` u where u.`status`=1\";\n \t$results = $db->getGlobalDb($sql);\n\t\tforeach ($results as $key => $r){\n\t\t\t$this->user_typelist[$r['user_type_id']] = $r['user_type']; \n\t\t}\t\t\n }", "public function setType($type)\r\n\t{\r\n\t\t// Check the type\r\n\t\t$type = strtolower($type);\r\n\t\tif(!in_array($type, $this->allowed_types))\r\n\t\t{\r\n\t\t\t$type = 'varchar'; // default to varchar\r\n\t\t}\r\n\t\t\r\n\t\t$name \t\t= 'tienda';\r\n\t\t$eav_suffix = 'eavvalues';\r\n\t\t$this->type = $type;\r\n\t\t\r\n\t\t// Set the correct suffix\r\n\t\t$this->set( '_suffix', $eav_suffix.$type );\r\n\t\t$tbl_name = \"#__{$name}_{$eav_suffix}{$type}\";\r\n\t\t$this->_tbl = $tbl_name;\r\n\t\t\r\n\t\t// Now set the properties!\r\n\t\t$this->setTableProperties();\r\n\t\t\r\n\t\t// Table Type defined: Activate the table\r\n\t\t$this->active = true;\r\n\t}", "public function __construct( string$type='' )\n\t{\n\t\t$this->type= $type;\n\t}", "public function init()\n {\n\t\t$this->user_model = new Application_Model_Users;\n\t\t$this->request_model = new Application_Model_Requests;\n\t\t$this->material_model = new Application_Model_Materials;\n\t\t$this->course_model = new Application_Model_Courses;\n\t\t$this->comment_model = new Application_Model_Comments;\n\t\t$this->category_model = new Application_Model_Categories;\n \t$this->assoc_rules_model = new Application_Model_Assocrules;\n }", "static function init($table = null){\n\t\tif(static::$object_inited){\n\t\t\treturn;\n\t\t}\n if(!static::$db){\n static::$db = DB::get();\n }\n\t\tif($table){\n\t\t\tstatic::$table = $table;\n\t\t}else{\n\t\t\t$class = get_called_class();\n\t\t\tstatic::$table = strtolower(preg_replace('/.+\\\\\\/si', '', $class).'s');\n\t\t}\n self::initFields();\n\t\tstatic::$object_inited = true;\n\t}", "function __construct()\n {\n $this->_table = \"products_locations_type\"; \n }", "public function initialize()\n {\n parent::initialize();\n\n // Create config strings\n $this->config = [\n 'models' => [\n 'Files' => __d('elabs', 'File'),\n 'Notes' => __d('elabs', 'Note'),\n 'Posts' => __d('elabs', 'Article'),\n 'Projects' => __d('elabs', 'Project'),\n 'Albums' => __d('elabs', 'Album'),\n ]\n ];\n\n // Load models\n foreach (array_keys($this->config['models']) as $model) {\n $this->$model = TableRegistry::get($model);\n }\n }", "public function __construct()\n {\n $this->primaryKey = 'ROOM_ID'; // The primary key for the model.\n $this->table = env('DB_ROOM'); // The table associated with the model.\n $this->casts = [ // The attributes that should be cast to native types.\n 'ROOM_MAP_DATA' => 'array'\n ];\n }", "function initiateType()\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n return $this->InitiateType;\n }", "public function setup_types()\n {\n }", "public function create($type)\n {\n //\n }", "public function setType($type) {}", "function __construct($TableName = 'item_type') {\r\n $this->idItem_Type = new DB_Field('idItem_Type', 0, new DbIntSanitizer(), TRUE, TRUE);\r\n $this->Category_Type = new DB_Field('Category_Type', 0, new DbIntSanitizer(), TRUE, TRUE);\r\n $this->Type_Description = new DB_Field('Type_Description', '', new DbStrSanitizer(100), TRUE, TRUE);\r\n $this->Order_Line_Type_Id = new DB_Field('Order_Line_Type_Id', 0, new DbIntSanitizer(), TRUE, TRUE);\r\n\r\n parent::__construct($TableName);\r\n }", "public function initialize()\n {\n parent::initialize();\n $this->setSchema(\"salesDB\");\n $this->setSource(\"questionnaire\");\n $this->hasMany('id', 'App\\Models\\Question', 'questionnaire_id', ['alias' => 'Question']);\n $this->belongsTo('itinerary_type_id', 'App\\Models\\ItineraryType', 'id', ['alias' => 'ItineraryType']);\n $this->belongsTo('client_id', 'App\\Models\\Client', 'id', ['alias' => 'Client']);\n $this->belongsTo('user_created', 'App\\Models\\User', 'id', ['alias' => 'UserCreated']);\n $this->belongsTo('user_updated', 'App\\Models\\User', 'id', ['alias' => 'UserUpdated']);\n $this->belongsTo('questionnaire_type_id', 'App\\Models\\QuestionnaireType', 'id', ['alias' => 'QuestionnaireType']);\n $this->belongsTo('sync_status_id', 'App\\Models\\SyncStatus', 'id', ['alias' => 'SyncStatus']);\n }", "public function __construct(){\n $this->db = new Base;\n }", "function ActiveRecord($table)\n\t\t{\n\t\t\tparent::Model();\n\t\t\t$this->record = $table;\n\t\t}", "public function setType(string $type): self;", "public function setType(string $type): self;", "public function __construct($type=null,$encoding=null){\n $this->handler = new RSALib();\n $this->mode($encoding);\n $this->key($type);\n }", "public function __construct($type, $id = null, $url = null);", "private static function instantiate($record) {\r\n $object = new self;\r\n\t\t\r\n\t// More dynamic, short-form approach:\r\n\tforeach($record as $attribute=>$value){\r\n if($object->has_attribute($attribute)) {\r\n\t $object->$attribute = $value;\r\n }\r\n\t}\r\n\r\n return $object;\r\n }", "private static function instantiate($record) {\r\n $object = new self;\r\n\t\t\r\n\t// More dynamic, short-form approach:\r\n\tforeach($record as $attribute=>$value){\r\n if($object->has_attribute($attribute)) {\r\n\t $object->$attribute = $value;\r\n }\r\n\t}\r\n\r\n return $object;\r\n }", "public static function createModel($type)\n {\n $className = 'app'.d_S.'models'.d_S.ucfirst($type).\"Model\";\n if($className!=NULL)\n {\n return new $className($type);\n }\n else\n {\n echo \"$className Not Found!\";\n }\n }", "public function __construct()\n {\n $this->table = 'tag';\n\t\t$this->model = $db = DB::table($this->table);\n }", "protected function initialize()\n {\n parent::initialize();\n\n $version = \\SQLite3::version();\n $version = $version['versionString'];\n\n $this->relationSupport = version_compare($version, '3.6.19') >= 0;\n\n $this->setSchemaDomainMapping(new Domain(PropelTypes::NUMERIC, 'DECIMAL'));\n $this->setSchemaDomainMapping(new Domain(PropelTypes::LONGVARCHAR, 'MEDIUMTEXT'));\n $this->setSchemaDomainMapping(new Domain(PropelTypes::DATE, 'DATETIME'));\n $this->setSchemaDomainMapping(new Domain(PropelTypes::BINARY, 'BLOB'));\n $this->setSchemaDomainMapping(new Domain(PropelTypes::VARBINARY, 'MEDIUMBLOB'));\n $this->setSchemaDomainMapping(new Domain(PropelTypes::LONGVARBINARY, 'LONGBLOB'));\n $this->setSchemaDomainMapping(new Domain(PropelTypes::BLOB, 'BLOB'));\n $this->setSchemaDomainMapping(new Domain(PropelTypes::CLOB, 'LONGTEXT'));\n $this->setSchemaDomainMapping(new Domain(PropelTypes::OBJECT, 'BLOB'));\n $this->setSchemaDomainMapping(new Domain(PropelTypes::PHP_ARRAY, 'MEDIUMTEXT'));\n $this->setSchemaDomainMapping(new Domain(PropelTypes::ENUM, 'TINYINT'));\n }", "private static function new_instance_records()\n\t{\n\t\t\n\t\t$ClassModel = get_called_class();\n\t\t$model = self::$configs[$ClassModel];\n\n\t\tif(!isset(self::$queryBuilder[$model]))\n\t\t{\n\t\t\tself::$queryBuilder[$model] = new FastReqQueryBuilder(\n\t\t\t\tself::$configs[$model][\"columns\"][\"structures\"],\n\t\t\t\tself::$configs[$model][\"columns\"][\"default_config\"],\n\t\t\t\t$model,\n\t\t\t\tself::$configs[$model][\"relations\"]\n\t\t\t);\n\t\t}\n\n\t\treturn new FastReqScope($model, self::$configs[$model]);\n\t}", "private static function instantiate($record) {\r\r\n $object = new self;\r\r\n\t\tforeach($record as $attribute=>$value){\r\r\n\t\t if($object->has_attribute($attribute)) {\r\r\n\t\t $object->$attribute = $value;\r\r\n\t\t }\r\r\n\t\t}\r\r\n\t\treturn $object;\r\r\n\t}", "public function __construct($table) {\n if(strcmp($table, \"user\") == 0){\n $this->_dbTable = new Application_Model_DbTable_User();\n }\n else{\n $this->_dbTable = new Application_Model_DbTable_Organization();\n }\n \n }", "public function init(){\n $s = $this->schema();\n\n $s->hasMany('roles')\n ->className('net\\mediaslave\\authentication\\app\\models\\Role', true)\n ->thru('net\\mediaslave\\authentication\\app\\models\\UserSettingThruRole', true);\n\n $s->hasMany('users')\n ->className('net\\mediaslave\\authentication\\app\\models\\User', true)\n ->thru('net\\mediaslave\\authentication\\app\\models\\UserSettingThruUser', true);\n\n\n }" ]
[ "0.71986485", "0.6576926", "0.6419527", "0.62899625", "0.62655044", "0.6261549", "0.62429035", "0.6198593", "0.6197844", "0.61652935", "0.6157843", "0.6111789", "0.6106766", "0.60818005", "0.6047299", "0.60472363", "0.6037188", "0.60242766", "0.6020157", "0.6000934", "0.59628344", "0.59450656", "0.59361017", "0.59320444", "0.5907737", "0.58808124", "0.5845206", "0.58125323", "0.57917625", "0.57735366", "0.57704896", "0.57587254", "0.5755641", "0.5751958", "0.5749399", "0.5727391", "0.5715907", "0.570978", "0.568241", "0.5680117", "0.5676399", "0.5674354", "0.5668402", "0.5652789", "0.5645329", "0.5626424", "0.5601548", "0.55984646", "0.55972564", "0.55886984", "0.55770785", "0.5572495", "0.55723816", "0.5571588", "0.55700594", "0.556459", "0.55596876", "0.5558488", "0.55538994", "0.5551761", "0.5550004", "0.5546455", "0.5543656", "0.55340546", "0.5526546", "0.5523024", "0.5522007", "0.55189556", "0.55189323", "0.55091584", "0.55077326", "0.5507236", "0.55017686", "0.550107", "0.5494773", "0.5493236", "0.5478488", "0.54712397", "0.5468053", "0.54670167", "0.54663527", "0.5451748", "0.54428107", "0.54426885", "0.54359305", "0.5433573", "0.54334027", "0.5431255", "0.5431255", "0.54170865", "0.54065907", "0.53901094", "0.53901094", "0.5384251", "0.53806597", "0.53792065", "0.5376455", "0.5370574", "0.53668976", "0.536478" ]
0.75186765
0
Get active record by type instance
public static function getActiveRecordByTypeInstance(ilADTGroupDBBridge $a_properties) { self::initActiveRecordByType(); return new ilADTActiveRecordByType($a_properties); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function findOne($type = null)\n {\n $entities = $this->find($type, 0, 1);\n\n return current($entities);\n }", "public static function getInstance($type = 'base')\n\t{\n\t\tif (isset(self::$cache[$type])) {\n\t\t\treturn self::$cache[$type];\n\t\t}\n\t\t$db = new self(self::getConfig($type));\n\t\t$db->dbType = $type;\n\t\tself::$cache[$type] = $db;\n\t\treturn $db;\n\t}", "public function get($type);", "final protected function getObject($type){\n\t\t\treturn $this->getFactory()->getObject( $this->getRes(), $type );\n\t\t}", "function get_by_type( $type_id )\n {\n $this->db->where('type_id', $type_id);\n $this->db->limit(1);\n return $this->db->get('card_types')->row();\n }", "public function findByType($type)\n {\n /* @var $user UserModel */\n $user = $this->em->getRepository('Xpto\\Entity\\Users\\User')->findBy(\n [\n 'type' => $type,\n 'status' => UserModel::ACTIVE\n ]\n );\n\n return $user;\n }", "public function checkBookType($type = null){\n $result = $this->find()\n ->where(['alias'=> $type]) ->first();;\n return $result;\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Type');\n }", "function go($type = ''){\n\t\t$query = $this->getQuery();\n\t\treturn $this->find_by_sql($query, $type);\n\t}", "public function getObject(): mixed\n {\n // how can i derive this class from a string?\n if (!$object = call_user_func('App\\\\'.ucfirst($this->object_type).'::find', $this->object_id)) {\n return $object;\n }\n\n return null;\n }", "public static function first()\n\t{\n\t\treturn self::new_instance_records()->first();\n\t}", "public function fetchOne( $type = null ){\n if( is_null( $type ) ){\n $type = PDO::FETCH_OBJ;\n }\n\n return $this->stmt->fetch( $type );\n }", "function get_record($recordType, $params = array())\n{\n $record = get_records($recordType, $params, 1);\n return reset($record);\n}", "public function type()\n {\n return $this->hasOne(Type::class);\n }", "function getById(string $schema, string $id, string $type = null): Record\n {\n $schema = $this->quote($schema);\n $query = \"SELECT * FROM $schema WHERE `id` = :id\";\n Log::getInstance()->info(\"Mysql::getById()\", \"About to make a query: ($query) with id=$id\");\n $statement = $this->db->prepare($query);\n $statement->bindValue(':id', $id);\n $statement->execute();\n $data = $statement->fetch(PDO::FETCH_ASSOC);\n if (!$data)\n return new NullRecord($schema);\n\n $record = new SimpleRecord($schema, $data);\n if (null !== $type) {\n $record = $record->getAsType($type);\n }\n\n return $record;\n }", "function backup_migrate_crud_get_item($type, $id) {\n if ($type = backup_migrate_crud_type_load($type)) {\n return $type->item($id);\n }\n}", "protected function type($type)\n {\n return $this->builder->where('type', $type);\n }", "public function get($typeId);", "abstract public function get_instance();", "public function get(string $type): mixed\n {\n if (array_key_exists($type, $this->store)) {\n return $this->store[$type];\n }\n\n return $this->getBinding($type)\n ->getInstance();\n }", "public function getWithType($type)\n {\n return $this->query()->where('type', $type)->online()->get();\n }", "public function type()\n {\n return $this->belongsTo('App\\Type');\n }", "public function getForRecord($record);", "public function get($type)\n {\n return $this->resolve($type);\n }", "public function get_active_instance() {\n\n\n }", "public function type()\n {\n return $this->belongsTo(\\App\\Models\\Type\\Type::class, 'type_id');\n }", "public function get_model( $id, $type )\n {\n global $wpdb;\n\n switch( $type ){\n case 'form':\n return new NF_Database_Models_Form( $wpdb, $id );\n break;\n case 'field':\n return new NF_Database_Models_Field( $wpdb, $id );\n break;\n case 'action':\n return new NF_Database_Models_Action( $wpdb, $id );\n break;\n case 'object':\n return new NF_Database_Models_Object( $wpdb, $id );\n break;\n default:\n return FALSE;\n }\n }", "public function type()\n {\n return self::model();\n }", "public function type()\n {\n return $this->belongsTo(Type::class);\n }", "public function type()\n {\n return $this->belongsTo(Type::class);\n }", "public function type()\n {\n return $this->belongsTo(Type::class);\n }", "public function type()\n {\n return $this->belongsTo(Type::class);\n }", "public function query($type)\n\t{\n\t\treturn $this->pixie->db->query_driver('PDO', $this, $type);\n\t}", "public function type()\n\t{\n\t\treturn $this->oneToOne(__NAMESPACE__ . '\\\\Type', 'id', 'type');\n\t}", "public function get_instance($instance='') { \n\n\t\t$instance = $instance ? $instance : Config::get('mpd_active');\n\t\t$instance = Dba::escape($instance); \n\n\t\t$sql = \"SELECT * FROM `localplay_mpd` WHERE `id`='$instance'\"; \n\t\t$db_results = Dba::query($sql); \n\n\t\t$row = Dba::fetch_assoc($db_results); \n\n\t\treturn $row; \n\n\t}", "function get_records($recordType, $params = array(), $limit = 10)\n{\n return get_db()->getTable($recordType)->findBy($params, $limit);\n}", "public static function get($type)\n {\n }", "public function objectExist($type = 'table')\n {\n switch ($type) {\n case 'table':\n $query = \"select * from all_objects where object_name=? and owner=? and object_type='TABLE'\";\n break;\n case 'function':\n $query = \"select * from all_objects where object_name=? and owner=? and object_type='FUNCTION'\";\n break;\n case 'sequence':\n $query = \"select * from all_objects where object_name=? and owner=? and object_type='SEQUENCE'\";\n break;\n case 'procedure':\n $query = \"select * from all_objects where object_name=? and owner=? and object_type='PROCEDURE'\";\n break;\n default:\n $this->parent->throwError(\"objectExist: type [$type] not defined for {$this->parent->databaseType}\", '');\n return null;\n }\n return $query;\n }", "public function getRecordByPK($pkValue, \\PDO $recordInstancePdoConnection = null): ActiveRecordInterface;", "public function find($type, array $options = []) {\n return $this->getRepository()->find($this, $type, $options);\n }", "static public function objectToQuery($type)\n\t{\n\t\treturn QuickBooks_Utilities::actionToObject($type) . 'Query';\n\t}", "public function getItemByType($type)\n\t{\n\t\t$row = $this->getResource('eventlogs')->getItemByType($type);\n\t\tif ($row === null) {\n\t\t\tthrow new TA_Model_Exception('event log type not found');\n\t\t}\n\t\treturn $row;\n\t}", "public static function getInstance() {\n return Doctrine_Core::getTable('ReelVideoRecordingFormatType');\n }", "function get_instance($class)\n {\n }", "public function getObject()\n {\n $object = Doctrine::getTable($this->getModel())->findOneById($this->getModelId());\n\n return $object;\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('TipoResgate');\n }", "protected function getBy($value, $type) {\n $where = \"\";\n if ($type == \"id\") {\n $where = \"id=\".mysql_real_escape_string($value);\n } else if ($type == \"name\") {\n $where = \"name='\".mysql_real_escape_string($value).\"'\";\n } else {\n throw new Exception(\"Undefined type of the getBy\");\n }\n return $this->db->queryObject(\n \t\"select \n \t\tid as _id, name as _name, uri as _uri, enabled as _enabled,\n \t\tlastChecked as _lastChecked, ovalId as _ovalId \n from \n \tOvalSourceDef \n where\n \t$where\"\n , \"OvalSourceDef\");\n }", "public static function getFromType($type, $params) {\n\t\t$class = implode('', array_map('ucfirst', explode('_', $type))).'DataSource';\n\t\tif(!class_exists($class)) return null;\n\t\t\n\t\treturn new $class($params);\n\t}", "public function get_active_instance() { \n\n\n\t}", "public static function get($type)\n\t{\n\t\tif(!isset(self::$_items[$type]))\n\t\t\tself::loadItems();\n\t\treturn self::$_items[$type];\n\t}", "public function getWith(\n string $type,\n array $params = []\n ): object {\n return $this->getBinding($type)\n ->addParams($params)\n ->getInstance();\n }", "public static function instance() {\n\t\t$classe = get_called_class();\n\t\t$table = str_replace(\"db_\", \"\", $classe);\n\t\t$instance = db::instance(db::table($table));\n\t\treturn $instance;\n\t}", "public static function retrieveByPK($pk, PropelPDO $con = null)\n {\n\n if (null !== ($obj = CastleTypePeer::getInstanceFromPool((string) $pk))) {\n return $obj;\n }\n\n if ($con === null) {\n $con = Propel::getConnection(CastleTypePeer::DATABASE_NAME, Propel::CONNECTION_READ);\n }\n\n $criteria = new Criteria(CastleTypePeer::DATABASE_NAME);\n $criteria->add(CastleTypePeer::ID, $pk);\n\n $v = CastleTypePeer::doSelect($criteria, $con);\n\n return !empty($v) > 0 ? $v[0] : null;\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('CFType');\n }", "public function find( $type, $conditions = array(), $sql = NULL, $bindings = array() )\n\t{\n\t\t//for backward compatibility, allow mismatch arguments:\n\t\tif ( is_array( $sql ) ) {\n\t\t\tif ( isset( $sql[1] ) ) {\n\t\t\t\t$bindings = $sql[1];\n\t\t\t}\n\t\t\t$sql = $sql[0];\n\t\t}\n\t\ttry {\n\t\t\t$beans = $this->convertToBeans( $type, $this->writer->queryRecord( $type, $conditions, $sql, $bindings ) );\n\n\t\t\treturn $beans;\n\t\t} catch ( SQLException $exception ) {\n\t\t\t$this->handleException( $exception );\n\t\t}\n\n\t\treturn array();\n\t}", "public function show($id)\n {\n return $this->type->findOrFail($id);\n }", "public function type()\n {\n return $this->belongsTo('App\\Models\\Properties\\Type');\n }", "public function fetchSingleObj($type = 'object') {\r\n\t\tif (isset ( $this->result )) {\r\n\t\t\tswitch ($type) {\r\n\t\t\t\tcase 'array' :\r\n\t\t\t\t\t\r\n\t\t\t\t\t// fetch a row as array\r\n\t\t\t\t\t$row = $this->result->fetch_array ();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\tcase 'assoc' :\r\n\t\t\t\t\t$row = mysqli_fetch_assoc ( $this->result );\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\tcase 'object' :\r\n\t\t\t\t\r\n\t\t\t\t// fall through...\r\n\t\t\t\t\r\n\t\t\t\tdefault :\r\n\t\t\t\t\t// fetch a row as object\r\n\t\t\t\t\t// $row = $this->result->fetch_object();\r\n\t\t\t\t\t$row = mysqli_fetch_object ( $this->result );\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn $row;\r\n\t\t}\r\n\t\treturn FALSE;\r\n\t}", "public function show(Type $type)\n {\n return $this->showOne($type);\n }", "public function show(Type $type)\n {\n return $this->showOne($type);\n }", "function get_record_by_id($modelName, $recordId)\n{\n return get_db()->getTable(Inflector::camelize($modelName))->find($recordId);\n}", "public function getSourceInstance() {\n\t\t$instance = $this->bean->fetchAs('instance')->source;\n\t\tif ($instance instanceof RedBean_OODBBean && ($instance->id !== 0 || $instance->getMeta('tainted') || !$instance->isEmpty())) {\n\t\t\treturn $instance->box();\n\t\t} elseif ($instance instanceof RedBean_SimpleModel && ($instance->unbox()->id !== 0 || $instance->unbox()->getMeta('tainted') || !$instance->unbox()->isEmpty())) {\n\t\t\treturn $instance;\n\t\t}\n\t\treturn null;\n\t}", "public function getTargetInstance() {\n\t\t$instance = $this->bean->fetchAs('instance')->target;\n\t\tif ($instance instanceof RedBean_OODBBean && ($instance->id !== 0 || $instance->getMeta('tainted') || !$instance->isEmpty())) {\n\t\t\treturn $instance->box();\n\t\t} elseif ($instance instanceof RedBean_SimpleModel && ($instance->unbox()->id !== 0 || $instance->unbox()->getMeta('tainted') || !$instance->unbox()->isEmpty())) {\n\t\t\treturn $instance;\n\t\t}\n\t\treturn null;\n\t}", "static private function _get($type, $id) {\n $objects = self::getStack($type);\n if (empty($objects)) {\n return FALSE;\n }\n if (isset($objects[$id])) {\n return self::convertToOriginalObject($objects[$id]);\n }\n return FALSE;\n }", "public function getForRecord($record)\n {\n $native_field = $this->native_field;\n return $this->foreign_type->getRecordByField(\n $this->foreign_field,\n $record->$native_field\n );\n }", "public function getSliderById($type,$id)\n {\n try{\n return $this->model->where('type','=',$type)->where('uniqueId','=',$id)->first();\n }\n catch(Exception $e){\n throw $e;\n }\n }", "public static function findOne($where, $class){\n $tableName = $class::tableName();\n $attributes = array_keys($where);\n $sql = implode(\"AND \", array_map(fn($attr) => \"$attr = :$attr\", $attributes));\n $statement = self::prepare(\"SELECT * FROM $tableName WHERE $sql\");\n foreach($where as $key => $item){\n $statement->bindValue(\":$key\", $item);\n }\n \n $statement->execute();\n return $statement->fetchObject(static::class);\n }", "static function getProduitByType($type) {\n $sql = \"SELECT * \n FROM PRODUIT\n WHERE typeAvion=:nom_var\";\n $req_prep = Model::$pdo->prepare($sql);\n $req_prep->bindParam(\":nom_var\", $type);\n $req_prep->execute();\n $req_prep->setFetchMode(PDO::FETCH_CLASS, 'ModelProduit');\n return $req_prep->fetchAll();\n }", "public function fetch($type = SQLAnywhereClient::FETCH_OBJECT)\n {\n $data = null;\n if ($this->result) {\n switch ($type) {\n case 'array':\n $data = sasql_fetch_object($this->result);\n break;\n\n case 'assoc':\n $data = sasql_fetch_object($this->result);\n break;\n\n case 'row':\n $data = sasql_fetch_object($this->result);\n break;\n\n case 'field':\n $data = sasql_fetch_object($this->result);\n break;\n\n case 'object':\n $data = sasql_fetch_object($this->result);\n break;\n\n default:\n $data = sasql_fetch_object($this->result);\n break;\n }\n }\n return $data;\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('PolozkyObj');\n }", "public function model()\n {\n return BudgetType::class;\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Models_Intranet_InvoicingBatchType');\n }", "public function first_row($type = 'object')\n\t{\n\t\treturn $this->row(0, $type);\n\t}", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Image_Type');\n }", "public function type(){\n return $this->hasOne(ContactType::class,'id','type_id');\n }", "public function get($query,$array, $type) {\r\n \r\n try{\r\n $q = $this->_db->prepare($query);\r\n $q ->execute($array);\r\n \r\n $class = 'Blog\\Model\\Entity\\\\'.$type;\r\n $donnees = $q->fetch();\r\n return new $class($donnees);\r\n \r\n }\r\n \r\n catch (Exception $e) {\r\n 'erreur'.$e->getMessage();\r\n }\r\n \r\n }", "function backup_migrate_crud_type_load($type) {\n $out = NULL;\n $types = backup_migrate_crud_types();\n if (!empty($types[$type])) {\n $info = $types[$type];\n if ($info['include']) {\n backup_migrate_include($info['include']);\n }\n $out = new $info['class'];\n }\n return $out;\n}", "public static function instance()\n {\n global $container;\n return $container->getByType(self::class);\n }", "public function getRecord($slug){\n return $this->where(\"slug\", $slug)->first();\n }", "public function query()\n {\n if ($model = $this->model) {\n return new $model();\n }\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('TrOnlineRecord');\n }", "function findItem($type, $id)\n {\n foreach ($this->getItems() as $item)\n if ($item->item_id == $id && $item->item_type == $type)\n return $item;\n return null;\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('NetworkType');\n }", "public function getInstanceQuery()\n {\n return $this->get(self::_INSTANCE_QUERY);\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('PluginNoteType');\n }", "public static function get($type) {\n switch ($type) {\n case 'Fundraiser':\n return new Application_Model_CalendarEntryFundraiser();\n break;\n\n case 'Newsletter':\n return new Application_Model_CalendarEntryNewsletter();\n break;\n\n default:\n throw new Zend_Exception('Calendar entry ' . $type . 'does not exists');\n break;\n }\n }", "public function findOne() {\n return parent::findOne();\n }", "public function get($id, $type)\n {\n $stmt = $this->db()->prepare(\"SELECT * FROM toys WHERE type={$type} AND id=:id\");\n $stmt->execute(array(':id' => $id));\n return $stmt->fetch(\\PDO::FETCH_ASSOC);\n }", "protected function fetchType( $type )\n\t{\n\t\tif ( count( $this->typesCache ) )\n\t\t{\n\t\t\treturn $this->typesCache[$type];\n\t\t}\n\t\telse\n\t\t{\n\t\t\tforeach( $this->db->select( '*', 'contenttype' ) AS $contenttype )\n\t\t\t{\n\t\t\t\t$this->typesCache[$contenttype['class']] = $contenttype['contenttypeid'];\n\t\t\t}\n\n\t\t\treturn $this->typesCache[$type];\n\t\t}\n\t}", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Type_alerte_bpi');\n }", "public static function getProfileBy($type, $value) {\r\n $allowed = ['profileID', 'email'];\r\n $profile = null;\r\n \r\n try {\r\n if (!in_array($type, $allowed))\r\n throw new PDOException(\"$type not allowed search criterion for Profile\");\r\n \r\n $db = Database::getDB();\r\n $stmt = $db->prepare(\r\n \"select * from Profiles\r\n where ($type = :$type)\");\r\n $stmt->execute(array(\":$type\" => $value));\r\n \r\n if(count($stmt) > 1)\r\n throw new PDOException(\"Error: multiple results returned\");\r\n \r\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\r\n if ($row !== false)\r\n $profile = new Profile($row);\r\n \r\n } catch (PDOException $e) {\r\n $profile->setError('profilesDB', 'PROFILE_GET_FAILED');\r\n } catch (RuntimeException $e) {\r\n $profile->setError(\"database\", \"DB_CONFIG_NOT_FOUND\");\r\n }\r\n \r\n return $profile;\r\n }", "public static function get($type, $table, array $prm = array()) {\r\n\t\tif ($type == 'table' && array_key_exists($table, self::$tables))\r\n\t\t\treturn self::$tables[$table];\r\n\r\n\t\tself::init();\r\n\r\n\t\tif ($table instanceof db_table) {\r\n\t\t\t$tableName = $table->getName();\r\n\t\t\tif (!array_key_exists('table', $prm))\r\n\t\t\t\t$prm['table'] = $table;\r\n\t\t} else {\r\n\t\t\t$tableName = $table;\r\n\t\t\tif ($type == 'table' && !array_key_exists('name', $prm))\r\n\t\t\t\t$prm['name'] = $table;\r\n\t\t\telse if ($type == 'row' && !array_key_exists('table', $prm)) {\r\n\t\t\t\t$db = array_key_exists('db', $prm)? $prm['db'] : self::getInstance();\r\n\t\t\t\t$prm['table'] = self::get('table', $tableName, array('db'=>$db));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (!($className = self::$cfg->getInArray($type, $tableName)) &&\r\n\t\t\t(!factory::isCreable($className = 'db_'.$type.'_'.$tableName)))\r\n\t\t\t$className = self::$cfg->get($type.'Class');\r\n\r\n\t\tif ($type == 'table') {\r\n\t\t\tself::$tables[$table] = factory::get($className, $prm);\r\n\t\t\treturn self::$tables[$table];\r\n\t\t}\r\n\r\n\t\treturn factory::get($className, $prm);\r\n\t}", "abstract public function getDataInstance($a_type = null);", "public function type()\n\t{\n\t\treturn $this->belongsTo('Lainga9\\BallDeep\\app\\PostType', 'post_type_id');\n\t}", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Actividad');\n }", "static public function get($type, $id = FALSE) {\n self::debug('*GET*');\n // Full collection\n if (!$id) {\n return self::_getStack($type);\n }\n // Id\n return self::_get($type, $id);\n }", "public function getQueryBuilder($type='default') {\n\t\treturn isset($this->queryBuilders[$type]) ? Injector::inst()->create($this->queryBuilders[$type]) : Injector::inst()->create($this->queryBuilders['default']);\n\t}", "function getResourceTypeId($name){\n return sqlSelectOne(\"SELECT * FROM types WHERE type_name='$name'\", 'type_id');\n}", "public function type()\n {\n return $this->belongsTo(AccountingType::class, 'accounting_type_id');\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Models_Solaria_StaffType');\n }", "public function get_instance() {\r\n\t\treturn $this->obj;\r\n\t}" ]
[ "0.6463997", "0.6371282", "0.6360918", "0.62883675", "0.6251028", "0.61414796", "0.6056854", "0.60512775", "0.60190904", "0.5987947", "0.59825766", "0.59322745", "0.5897965", "0.58886963", "0.58833104", "0.5862784", "0.58550763", "0.58211666", "0.5818487", "0.5818309", "0.5791878", "0.5750944", "0.57492757", "0.5746862", "0.57304364", "0.5727723", "0.5723376", "0.57146645", "0.5710077", "0.5710077", "0.5710077", "0.5710077", "0.57100695", "0.57044244", "0.568164", "0.5668295", "0.56617004", "0.56577975", "0.5648449", "0.5640518", "0.5637799", "0.5636782", "0.56345797", "0.56286514", "0.5616869", "0.5565544", "0.5562568", "0.5558724", "0.5552065", "0.5550318", "0.554668", "0.554151", "0.5532519", "0.5511088", "0.55081964", "0.5506992", "0.5506466", "0.55051", "0.55009544", "0.55009544", "0.547362", "0.5470492", "0.54687357", "0.5457927", "0.5456567", "0.5450318", "0.5434866", "0.54299814", "0.5428441", "0.541587", "0.5398789", "0.539513", "0.53914505", "0.5388992", "0.5385555", "0.53801626", "0.53776723", "0.5377319", "0.53609306", "0.53525233", "0.53519726", "0.53483194", "0.5347464", "0.5341263", "0.5341112", "0.5328975", "0.53284156", "0.5327377", "0.53243446", "0.53120154", "0.5304715", "0.530429", "0.5303381", "0.53020644", "0.5299203", "0.52949417", "0.529002", "0.528461", "0.52811587", "0.52729744", "0.5270782" ]
0.0
-1
Deletes an existing Coins model. If deletion is successful, the browser will be redirected to the 'index' page.
public function actionDelete($id) { if($this->findModel($id)->delete()) { return $this->message("删除成功",$this->redirect(['index'])); } else { return $this->message("删除失败",$this->redirect(['index']),'error'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionDelete()\n {\n $id = Yii::$app->request->post('id');\n try {\n $this->findModel($id)->delete();\n } catch (StaleObjectException $e) {\n } catch (NotFoundHttpException $e) {\n } catch (\\Throwable $e) {\n }\n\n return $this->redirect(['index']);\n }", "public function actionDelete()\n\t{\n\t\t// using the default layout 'protected/views/layouts/main.php'\n\t\t\n\t\t\n\t\t$this->checkUser();\n\t\t$this->checkActivation();\n\t//\t$model = new Estate;\n\t\t\n\t\tif($model===null)\n\t\t{\n\t\t\tif(isset($_GET['id']))\n\t\t\t\t$model=Estate::model()->findbyPk($_GET['id']);\n\t\t\tif($model===null)\n\t\t\t\tthrow new CHttpException(404, Yii::t('app', 'The requested page does not exist.'));\n\t\t}\n\t\t\n\t\tEstateImage::deleteAllImages($model->id);\t\n\t\t@unlink(dirname(Yii::app()->request->scriptFile).$model->tour);\n\t\t@unlink(dirname(Yii::app()->request->scriptFile).$model->image);\n\t\t\n\t\t$model->delete();\n\t\t\n\t\t\n\t\tModeratorLogHelper::AddToLog('deleted-estate-'.$model->id,'Удален объект #'.$model->id.' '.$model->title,null,$model->user_id);\n\t\t$this->redirect('/cabinet/index');\n\t\t\n\t}", "public function actionDelete()\n {\n if ($post = Template::validateDeleteForm()) {\n $id = $post['id'];\n $this->findModel($id)->delete();\n }\n return $this->redirect(['index']);\n }", "public function destroyAction() {\n $model = new Application_Model_Compromisso();\n //mando para a model o id de quem sera excluido\n $model->delete($this->_getParam('id'));\n //redireciono\n $this->_redirect('compromisso/index');\n }", "public function actionDelete()\n {\n $id= @$_POST['id'];\n if($this->findModel($id)->delete()){\n echo 1;\n }\n else{\n echo 0;\n }\n\n return $this->redirect(['index']);\n }", "public function actionDelete()\n\t{\n\t parent::actionDelete();\n\t\t$model=$this->loadModel($_POST['id']);\n\t\t $model->delete();\n\t\techo CJSON::encode(array(\n 'status'=>'success',\n 'div'=>'Data deleted'\n\t\t\t\t));\n Yii::app()->end();\n\t}", "public function actionDelete()\n {\n if (!$this->isAdmin()) {\n $this->getApp()->action403();\n }\n\n $request = $this->getApp()->getRequest();\n $id = $request->paramsNamed()->get('id');\n $model = $this->findModel($id);\n if (!$model) {\n $this->getApp()->action404();\n }\n\n $model->delete();\n\n return $this->back();\n }", "public function actionDelete($id)\n { \n $connection = \\Yii::$app->db;\n $transaction = $connection->beginTransaction();\n \n try {\n $model = $this->findModel($id);\n \n $this->deshacer_renglones($model);\n\n $model->delete();\n \n $transaction->commit();\n \n return $this->redirect(['index']);\n\n }\n catch (\\Exception $e) {\n $transaction->rollBack();\n throw $e;\n }\n\n }", "public function actionDelete()\n {\n if ( ($id = Yii::$app->request->post(\"id\")) && $model = Contract::findOne($id) ) {\n $model->delete();\n return json_encode([\n \"message\" => Yii::t(\"app\", \"You deleted contract \" . $model->contract_id),\n \"success\" => true\n ]);\n }\n }", "public function actionDelete($id)\n {\n\t\t$model = $this->findModel($id);\n\t\tif ($model->user->main_wallet_id == $id){\n\t\t\t$model->user->main_wallet_id = '';\n\t\t\t$model->user->save();\n\t\t}\n\n\t\t$model->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete()\n {\n $id = Yii::$app->request->post('id');\n $this->findModel($id)->delete();\n }", "public function deleteAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif ($item) {\n\t\t\t$item->delete();\n\t\t}\n\t\t$this->_helper->redirector('list', null, null, array('model' => $modelName));\n\t}", "public function destroy($id)\n\t{\n\t\t$this->model->destroy($id);\n\n\t\treturn redirect()->route('coins.index')->with('message', 'Item deleted successfully.');\n\t}", "public function actionDelete() {\n $model = new \\UsersModel();\n $login = $this->getParam('login');\n\n if ( $model->delete($login) ) {\n $this->flashMessage('Odstraněno', self::FLASH_GREEN);\n } else {\n $this->flashMessage('Záznam nelze odstranit', self::FLASH_RED);\n }\n\n $this->redirect('default');\n }", "public function actionDelete()\r\n {\r\n $this->_userAutehntication();\r\n\r\n switch($_GET['model'])\r\n {\r\n /* Load the respective model */\r\n case 'posts': \r\n $model = Post::model()->findByPk($_GET['id']); \r\n break; \r\n default: \r\n $this->_sendResponse(501, sprintf('Error: Mode <b>delete</b> is not implemented for model <b>%s</b>',$_GET['model']) );\r\n exit; \r\n }\r\n /* Find the model */\r\n if(is_null($model)) {\r\n // Error : model not found\r\n $this->_sendResponse(400, sprintf(\"Error: Didn't find any model <b>%s</b> with ID <b>%s</b>.\",$_GET['model'], $_GET['id']) );\r\n }\r\n\r\n /* Delete the model */\r\n $response = $model->delete();\r\n if($response>0)\r\n $this->_sendResponse(200, sprintf(\"Model <b>%s</b> with ID <b>%s</b> has been deleted.\",$_GET['model'], $_GET['id']) );\r\n else\r\n $this->_sendResponse(500, sprintf(\"Error: Couldn't delete model <b>%s</b> with ID <b>%s</b>.\",$_GET['model'], $_GET['id']) );\r\n }", "public function actionDelete()\n {\n if(isset($_POST['id'])){\n $id = $_POST['id'];\n $this->findModel($id)->delete();\n echo \"success\";\n }\n }", "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']); \n }", "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']); \n }", "public function actionDelete($id)\n {\n\t\t$model = $this->findModel($id);\n\n\t\t$model->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id){\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id)\n {\n $model = $this->findModel($id);\n $model->delete();\n\n\n return $this->redirect(['index']);\n }", "public function actionDelete()\n {\n return $this->findModel(Yii::$app->request->post('id'))->delete(false);\n }", "public function actionDelete($id) {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "public function actionDelete($id)\n {\n $model = $this->findModel($id);\n $model->delete();\n return $this->redirect(['index']);\n }", "public function actionDelete($id)\n {\n $model = $this->findModel($id);\n $model->delete();\n return $this->redirect(['index']);\n }", "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id)\n {\n // $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id) {\n\t\t$this->findModel($id)->delete();\n\t\treturn $this->redirect(['index']);\n\t}", "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n return $this->redirect(['index']);\r\n }", "public function deleteAction()\n {\n if ($id = $this->getRequest()->getParam('id')) {\n $model = Mage::getModel('alliance_bioactives/bioactive');\n $model->load($id);\n try {\n $model->delete();\n Mage::getSingleton('adminhtml/session')->addSuccess(\n Mage::helper('alliance_bioactives')->__('The bioactive has been deleted.'));\n $this->_redirect('*/*/');\n return;\n }\n catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));\n return;\n }\n }\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('alliance_bioactives')->__('An error occurred while deleting this bioactive.'));\n $this->_redirect('*/*/');\n }", "public function actionDelete($id)\n {\n $model = $this->findModel($id);\n\n $model->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id)\n {\n $model = $this->findModel($id);\n\n $model->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id) {\n $this->findModel($id)->delete();\n return $this->redirect(['index']);\n }", "public function actionDelete($id)\n {\n $model = $this->findModel($id);\n \n $model->delete();\n return $this->redirect([\n 'index'\n ]);\n }", "public function actionDelete($id)\n {\n $model=$this->findModel($id);\n $inmueble_id=$model->inmueble_id;\n $model->delete();\n \n return $this->redirect(['index','id' => $inmueble_id]);\n }", "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n $this->actualizarNumCuenta($id);\n return $this->redirect(['index']);\n }", "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "public function delete() {\n $flg = $this->Seatmodel->delete();\n\n if (!empty($flg)) {\n $this->session->set_flashdata('successmessage', 'Data deleted successfully');\n } else {\n $this->session->set_flashdata('errormessage', 'Oops! Something went wrong');\n }\n\n redirect(base_url('admin-seat-list'));\n }", "public function actionDelete($id)\n {\n\t$model = static::findModel($id);\n\n\t$this->processData($model, 'delete');\n\n\t$model->delete();\n\n \treturn $this->redirect(['index']);\n }", "public function actionDelete()\n\t{\n\t\t$id = intval( Yii::app()->getRequest()->getParam('id') );\n\n\t\tif (!Yii::app()->getRequest()->getIsAjaxRequest() || empty($id))\n\t\t\tthrow new CHttpException(404);\n\n\t\t$model = MainRoom::model()->findByPk($id);\n\t\tif (is_null($model))\n\t\t\tthrow new CHttpException(404);\n\n\t\t$model->status = MainRoom::STATUS_DELETED;\n\t\t$model->save(false);\n\t\tdie ( CJSON::encode( array('success'=>true) ) );\n\n\t}", "public function delete()\n {\n Contest::destroy($this->modelId);\n $this->modalConfirmDeleteVisible = false;\n $this->resetPage();\n }", "public function actionDelete($id)\n\t{\n\t\t$this->findModel($id)->delete();\n\n\t\treturn $this->redirect(['index']);\n\t}", "public function actionDelete($id)\n\t{\n\t\t$this->findModel($id)->delete();\n\n\t\treturn $this->redirect(['index']);\n\t}", "public function actionDelete($id)\n\t{\n\t\t$this->findModel($id)->delete();\n\n\t\treturn $this->redirect(['index']);\n\t}", "public function actionDelete($id)\n\t{\n\t\t$this->findModel($id)->delete();\n\n\t\treturn $this->redirect(['index']);\n\t}", "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\t\t\\Yii::$app->session->setFlash('updated',\\Yii::t('admin', 'Данные успешно удалены'));\r\n return $this->redirect(['index']);\r\n }", "public function actionDelete($id) {\n\t\t$this->findModel($id)->delete();\n\n\t\treturn $this->redirect(['index']);\n\t}", "public function actionDelete($id) {\n\t\t$this->findModel($id)->delete();\n\n\t\treturn $this->redirect(['index']);\n\t}", "public function actionDelete($id)\n {\n $model = $this->findModel($id);\n $model->delete();\n\n return $this->redirect(['index' , 'goods_id' => $model->goods_id]);\n }", "public function actionDelete($id)\n {\n $model=$this->findModel ( $id );\n\t\t$model->is_delete=1;\n\t\t$model->save ();\n\n return $this->redirect(['index']);\n }", "public function actionDeletex($id)\n {\n /* $this->findModel($id)->delete();\n\n return $this->redirect(['index']); */\n }", "public function actionDelete($id)\n {\n if(Yii::$app->user->can('site-clerk'))\n {\n $this->findModel($id)->delete();\n return $this->redirect(['index']);\n }else \n {\n $this->redirect(\\Yii::$app->urlManager->createURL(\"site/login\"));\n }\n \n }", "public function actionDelete($id)\n {\n $model = $this->findModel($id)->delete();\n\n return $this->redirect(['peminjaman/view', 'id_pinjam' => $model->id_pinjam ]);\n }", "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n\n return $this->redirect(['site/verleih']);\n }", "public function actionDelete($id)\n {\n $this->_findModel($id)->delete();\n return $this->redirect(['index']);\n }", "public function actionDelete($id)\n { \n\t\t$model = $this->findModel($id); \n $model->isdel = 1;\n $model->save();\n //$model->delete(); //this will true delete\n \n return $this->redirect(['index']);\n }", "public function actionDelete()\n {\n if (Yii::$app->request->isPost) {\n $id = Yii::$app->request->post('id');\n $this->findModel($id)->unlinkAll('comments', true);\n if($this->findModel($id)->delete()) {\n Yii::$app->session->setFlash('success', 'Статья удалена');\n } else {\n Yii::$app->session->setFlash('error', 'При удалении возникла ошибка');\n }\n }\n return $this->renderIndex();\n }", "public function destroy($id)\n {\n $model = Keranjang::find($id);\n $model->delete();\n return redirect(\"keranjang\");\n }", "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n\n notify()->addSuccess(t('app','Your action is complete.'));\n\n return $this->redirect(['/admin/currencies']);\n }", "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n Yii::$app->session->setFlash('success','Prefactura eliminada correctamente');\n return $this->redirect(['index']);\n }", "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n return $this->redirect(['index']);\n }", "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n return $this->redirect(['index']);\n }", "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n return $this->redirect(['index']);\n }", "public function deleteAction() {\n\t\t\t$this->_forward('index');\n\t\t}", "public function actionDelete($id)\n {\n $model = $this->findModel($id);\n \n $connection = MdlDb::getDbConnection();\n $sql = \"SELECT coaNo\n FROM ms_coa\n where coaNo = '\" . $model->coaNo . \"' \";\n $temp = $connection->createCommand($sql);\n $headResult = $temp->queryAll();\n \n $model->flagActive = 0;\n $model->save();\n return $this->redirect(['index']);\n }", "public function actionDelete($id) {\n\t\t$this->findModel ( $id )->delete ();\n\t\t\n\t\treturn $this->redirect ( [ \n\t\t\t\t'index' \n\t\t] );\n\t}", "public function actionDelete($id) {\n\t\t$this->findModel ( $id )->delete ();\n\t\t\n\t\treturn $this->redirect ( [ \n\t\t\t\t'index' \n\t\t] );\n\t}" ]
[ "0.68401295", "0.6752759", "0.67374176", "0.6615568", "0.65954083", "0.65898204", "0.65854096", "0.6568951", "0.6534552", "0.65126", "0.64915913", "0.6462519", "0.6441085", "0.64198214", "0.64053595", "0.6399127", "0.6329099", "0.6329099", "0.6328673", "0.63234293", "0.6314286", "0.63066894", "0.626914", "0.62675834", "0.62675834", "0.62519705", "0.62519705", "0.62470126", "0.62364", "0.6217214", "0.6207273", "0.62021524", "0.62021524", "0.6192576", "0.61877275", "0.6180266", "0.618026", "0.61787176", "0.61787176", "0.61787176", "0.61787176", "0.61787176", "0.61787176", "0.61787176", "0.61773026", "0.6173526", "0.616636", "0.6160203", "0.61531895", "0.61531895", "0.61531895", "0.61531895", "0.6153027", "0.6153027", "0.6152791", "0.61494994", "0.61494994", "0.6140868", "0.61331165", "0.6131931", "0.6131299", "0.6126924", "0.61219287", "0.61219287", "0.61219287", "0.61219287", "0.61219287", "0.61219287", "0.61219287", "0.61219287", "0.61219287", "0.61219287", "0.61219287", "0.61219287", "0.61219287", "0.61219287", "0.61219287", "0.61219287", "0.61219287", "0.61219287", "0.61219287", "0.61219287", "0.61219287", "0.61219287", "0.61219287", "0.61219287", "0.61219287", "0.61205804", "0.6117177", "0.6116529", "0.61156154", "0.61124516", "0.6111282", "0.6106471", "0.6101945", "0.6101945", "0.6101945", "0.6099023", "0.6094335", "0.60919493", "0.60919493" ]
0.0
-1
Finds the Coins model based on its primary key value. If the model is not found, a 404 HTTP exception will be thrown.
protected function findModel($id) { if (empty($id)) { return new StartPage(); } if (empty($model = StartPage::findOne($id))) { return new StartPage(); } return $model; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function findModel($id)\n {\n if (empty($id)) {\n return new Coins();\n }\n\n if (empty($model = Coins::findOne($id))) {\n return new Coins();\n }\n\n return $model;\n }", "public abstract function find($primary_key, $model);", "protected function findModel($id)\n {\n if (($model = Currency::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if (($model = Currency::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if (($model = Currency::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id) {\n if (($model = Credit::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "private function findModel($key)\n {\n if (null === $key) {\n throw new BadRequestHttpException('Key parameter is not defined in findModel method.');\n }\n\n $modelObject = $this->getNewModel();\n\n if (!method_exists($modelObject, 'findOne')) {\n $class = (new\\ReflectionClass($modelObject));\n throw new UnknownMethodException('Method findOne does not exists in ' . $class->getNamespaceName() . '\\\\' .\n $class->getShortName().' class.');\n }\n\n $result = call_user_func([\n $modelObject,\n 'findOne',\n ], $key);\n\n if ($result !== null) {\n return $result;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "public function find($id){\n\t\t$db = static::getDatabaseConnection();\n\t\t//Create a select query\n\t\t$query = \"SELECT \" . implode(\",\" , static::$columns).\" FROM \" . static::$tableName . \" WHERE id = :id\";\n\t\t//prepare the query\n\t\t$statement = $db->prepare($query);\n\t\t//bind the column id with :id\n\t\t$statement->bindValue(\":id\", $id);\n\t\t//Run the query\n\t\t$statement->execute();\n\n\t\t//Put the associated row into a variable\n\t\t$record = $statement->fetch(PDO::FETCH_ASSOC);\n\n\t\t//If there is not a row in the database with that id\n\t\tif(! $record){\n\t\t\tthrow new ModelNotFoundException();\n\t\t}\n\n\t\t//put the record into the data variable\n\t\t$this->data = $record;\n\t}", "public function loadModel($id) {\n $model = BillCashier::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }", "public static function find( $primaryKey )\n\t{\n\t\tself::init();\n\t\t\n\t\t// Select one item by primary key in Database\n\t\t$result = Database::selectOne(\"SELECT * FROM `\" . static::$table . \"` WHERE `\" . static::$primaryKey . \"` = ?\", $primaryKey);\t\t\n\t\tif( $result == null )\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t// Create & return new object of Model\n\t\treturn self::newItem($result);\n\t}", "protected function findModel($id)\n {\n if (($model = Voucher::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException(Yii::t('app','Không tồn tại trang yêu cầu'));\n }\n }", "protected function findModel($id)\n {\n if (($model = Wallet::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if (($model = Wallet::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if (($model = BitcoinAddress::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException(Yii::t('app', 'The requested page does not exist.'));\n }\n }", "public function loadModel($id)\r\n\t{\r\n\t\t$model=MoneyTransfer::model()->findByPk($id);\r\n\t\tif($model===null)\r\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\r\n\t\treturn $model;\r\n\t}", "public function findModel($clz, $key);", "public function loadModel($id) {\n $model = Calculatepayout::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }", "protected function findWork($id)\n {\n if (($model = CheckoutWork::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('Запрашиваемая работа не найдена!');\n }\n }", "protected function findModel($id)\n {\n if (($model = ShopRates::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findWorkCompetence($id)\n {\n if (($model = CheckoutWorkCompetence::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('Запрашиваемая компетенция по работе не найдена!');\n }\n }", "protected function findModel($id)\n {\n if (($model = Menu::findOne([ 'id' => $id ])) !== null)\n {\n return $model;\n }\n else\n {\n throw new HttpException(404, Yii::t('backend', 'The requested page does not exist.'));\n }\n }", "protected function findModel($id)\n {\n if (($model = Balance::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "function find($id)\n{\n\t$model = $this->newModel(null);\n\treturn $model->find($id);\n}", "public function loadModel($id)\n\t{\n\t\t$model=ChecksInvoices::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "protected function findModel($id)\n {\n if(Yii::$app->session->get('Rules')['comp_id'] ==1){\n if (($model = Customer::findOne(['id' => $id])) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }else{\n\n \n if (($model = Customer::findOne(['id' => $id,'comp_id' => Yii::$app->session->get('Rules')['comp_id']])) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }\n }", "protected function findModel($id)\n {\n if (($model = Cash::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "public function returnFindByPK($id);", "public function loadModel($id) {\n $model = Customers::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }", "public function find($id){\n return $this->model->query()->findOrFail($id);\n }", "protected function findModel($id)\n {\n if (($model = CounterData::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException(Yii::t('app', 'The requested page does not exist.'));\n }", "public function loadModel($id)\n\t{\n $model=Contractor::model()->findByPk($id, array(\n 'with' => array('head', 'addressr')\n ));\n\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "public function loadModel($id)\n\t{\n\t\t$model=Bet::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "protected function findModel($id) {\n $model = Sum::findOne($id);\n\n if ($model !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if (($model = ComingsRepository::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if (($model = Offer::findOne($id)) !== null) {\n return $model;\n } else {\n throw new HttpException(404, 'The requested page does not exist.');\n }\n }", "public function find($id)\n\t{\n\t\treturn $this->model->where(\"id\", \"=\", $id)->first();\n\t}", "public function loadModel($id) {\n $model = MissionCarers::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, Yii::t('texts', 'FLASH_ERROR_404_THE_REQUESTED_PAGE_DOES_NOT_EXIST'));\n return $model;\n }", "protected function findModel($id)\n {\n if (($model = CodeMember::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if (($model = Company::findOne($id)) !== null) {\n\t\t\t\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id) {\n if (($model = CustomerTransactions::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "public function find($model, $id);", "public function loadModel($id)\n\t{\n\t\t$model=Transaction::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "public function loadModel($id)\n {\n $model=CompraCartao::model()->findByPk($id);\n if($model===null)\n throw new CHttpException(404,'The requested page does not exist.');\n return $model;\n }", "public static function findModel($id='')\n {\n $model = static::find()->where(['id' => $id])->one();\n if ($model == null) {\n throw new \\yii\\web\\NotFoundHttpException(Yii::t('app',\"Page not found!\"));\n }\n return $model;\n }", "public function loadModel( $id )\n {\n $model = Account::model()->findByPk( $id );\n if ( $model === null )\n throw new CHttpException( 404, 'The requested page does not exist.' );\n return $model;\n }", "protected function findModel($id) {\n if (($model = Customers::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "public function loadModel($id)\n {\n $model=Seat::model()->findByPk($id);\n if($model===null)\n throw new CHttpException(404,'The requested page does not exist.');\n return $model;\n }", "protected function findModel($id)\n {\n if (($model = CompPrep::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "public function loadModel($id)\n\t{\n\t\t$model=Quote3::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "public function find(int $id)\n {\n return $this->model->findOrFail($id);\n }", "public function loadModel($id) {\n $model = Purchaseitem::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }", "protected function findModel($id)\n\t\t{\n\t\t\tif (($model = PhoneRecord::findOne($id)) !== null) {\n\t\t\t\treturn $model;\n\t\t\t}\n\t\t\t\n\t\t\tthrow new NotFoundHttpException(Yii::t('app', 'Запрашиваемая страница не существует.'));\n\t\t}", "public function loadModel($id)\n\t{\n\t\t$model=Productaccount::model()->findByPk((int)$id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "protected function findModel($id)\n\t{\n\t\tif (($model = AccountInvoice::findOne($id)) !== null) {\n\t\t\treturn $model;\n\t\t} else {\n\t\t\tthrow new NotFoundHttpException('The requested page does not exist.');\n\t\t}\n\t}", "public function loadModel($id)\n\t{\n\t\t$model=Coordocs::model()->findByPk($id+0);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "protected function findModel($id)\n {\n if (($model = Catalog2::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "public function findById() {\n // TODO: Implement findById() method.\n }", "public function find($id)\n {\n return $this->model->findOrFail($id);\n }", "public function find($id)\n {\n return $this->model->findOrFail($id);\n }", "protected function findCompetence($id)\n {\n if (($model = CheckoutCompetence::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('Запрашиваемая компетенция не найдена!');\n }\n }", "protected function findModel($id)\n {\n if (($model = PaidEmployment::findOne($id)) !== null) {\n return $model;\n } else {\n throw new HttpException(404);\n }\n }", "protected function findModel($id)\n {\n if (($model = StoreKasir::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "public function find(int $id): ?Model;", "public function find(int $id): ?Model;", "protected function findModel($id)\n {\n if (($model = SkepPenetapanBcf15::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "public function loadModel($id)\n\t{\n\t\t$model=Account::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "protected function findModel($id) {\n if (($model = TimeBooks::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($key)\n {\n if (($model = NotificationsTemplate::find()->andWhere(['key'=>$key])->one()) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if (($model = Statcompany::find()->where(['shop_id'=>Yii::$app->params['user.current_shop']])->andWhere(['id'=>$id])->one()) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n\t{\n\t\tif (($model = Trailer::findOne($id)) !== null) {\n\t\t\treturn $model;\n\t\t} else {\n\t\t\tthrow new HttpException(404, 'The requested page does not exist.');\n\t\t}\n\t}", "public function coinGetByID(int $id)\n {\n return $this->coinModel->getByID($id);\n //return DB::select('call CoinsGetByID(?)',array($id));\n }", "public function loadModel($id)\n\t{\n\t\t$model=Bills::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "protected function findModel($id)\n {\n if (($model = Company::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if (($model = Company::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if (($model = Company::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "public function loadModel($id)\n\t{\n\t\t$model=ClientInvoice::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "protected function actionGetByPrimaryKey($primaryKey)\n {\n return $this->_static_block->getByPrimaryKey($primaryKey);\n }", "protected function findModel($id)\n {\n if (($model = CursoProger::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id) {\n if (($model = Seller::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if (($model = Account::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException(Yii::t('app', 'The requested page does not exist.'));\n }\n }", "protected function findModel($id)\n {\n if (($model = PoinKebaikan::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "public function loadModel($id)\r\n\t{\r\n\t\t$model=KqxsBac::model()->findByPk($id);\r\n\t\tif($model===null)\r\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\r\n\t\treturn $model;\r\n\t}", "public function loadModel($id) {\r\n $model = ProductStockEntries::model()->findByPk($id);\r\n if ($model === null)\r\n throw new CHttpException(404, 'The requested page does not exist.');\r\n return $model;\r\n }", "public function loadModel($id){\r\r\n\r\r\n\t $model=OrdenConsumo::model()->findByPk($id);\r\r\n\r\r\n\t if($model===null)\r\r\n\t throw new CHttpException(404,'The requested page does not exist.');\r\r\n\t return $model;\r\r\n\r\r\n\t}", "public function returnDetailFindByPK($id);", "public function loadModel($id)\n\t{\n\t\t$model=VendorPayment::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "protected function findModel($id)\n {\n if (($model = PublicNum::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "protected function findModel($id)\n {\n if (($model = Creditortmp::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if (($model = Conlist::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "public function loadModel($id) {\n $model = EbayPriceMonitor::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }", "protected function findModel($id)\n {\n if (($model = Comercios::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findPkSimple($key, $con)\n\t{\n\t\t$sql = 'SELECT `ID`, `USER_ID`, `NAME`, `DESCRIPTION`, `BARE_PATH`, `CLONE_PATH`, `FORKED_FROM_ID`, `FORKED_AT`, `CREATED_AT`, `UPDATED_AT` FROM `repository` WHERE `ID` = :p0';\n\t\ttry {\n\t\t\t$stmt = $con->prepare($sql);\n\t\t\t$stmt->bindValue(':p0', $key, PDO::PARAM_INT);\n\t\t\t$stmt->execute();\n\t\t} catch (Exception $e) {\n\t\t\tPropel::log($e->getMessage(), Propel::LOG_ERR);\n\t\t\tthrow new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), $e);\n\t\t}\n\t\t$obj = null;\n\t\tif ($row = $stmt->fetch(PDO::FETCH_NUM)) {\n\t\t\t$obj = new Repository();\n\t\t\t$obj->hydrate($row);\n\t\t\tRepositoryPeer::addInstanceToPool($obj, (string) $row[0]);\n\t\t}\n\t\t$stmt->closeCursor();\n\n\t\treturn $obj;\n\t}", "protected function findModel($id)\r\n {\r\n if (($model = Citem::findOne($id)) !== null) {\r\n return $model;\r\n } else {\r\n throw new NotFoundHttpException('The requested page does not exist.');\r\n }\r\n }", "protected function findModel($id)\n {\n if (($model = UtilitiesBook::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "public function loadModel($id)\n\t{\n\t\t$model=Ncr::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "public function loadModel($id) {\r\n $model = Statements::model()->findByPk($id);\r\n if ($model === null)\r\n throw new CHttpException(404, 'The requested page does not exist.');\r\n return $model;\r\n }", "public static function findById($id){\n \t$data = self::find($id);\n \tif (!$data) {\n \t\tabort(404);\n \t}\n \treturn $data;\n }", "public static function findById($id){\n \t$data = self::find($id);\n \tif (!$data) {\n \t\tabort(404);\n \t}\n \treturn $data;\n }", "public static function findById($id){\n \t$data = self::find($id);\n \tif (!$data) {\n \t\tabort(404);\n \t}\n \treturn $data;\n }", "protected function findModel($id)\n {\n if (($model = ProvCompras::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "public function loadModel($id)\r\n\t{\r\n\t\t$model=Klient::model()->findByPk($id);\r\n\t\tif($model===null)\r\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\r\n\t\treturn $model;\r\n\t}" ]
[ "0.67781603", "0.64340687", "0.6303363", "0.6303363", "0.6303363", "0.62548906", "0.62514013", "0.6202046", "0.6164167", "0.6127484", "0.6041405", "0.6001315", "0.6001315", "0.5936162", "0.59317225", "0.5917346", "0.59159744", "0.5885853", "0.5879709", "0.586875", "0.5866249", "0.58486253", "0.58471495", "0.58328366", "0.5829898", "0.58263427", "0.58148086", "0.57963866", "0.5795145", "0.5790563", "0.5767897", "0.57673675", "0.5766727", "0.5761296", "0.57586265", "0.5756369", "0.5749025", "0.5737217", "0.57285315", "0.5716693", "0.57159704", "0.5712746", "0.57001483", "0.5699747", "0.569656", "0.5687385", "0.5684914", "0.56746966", "0.5668279", "0.56627154", "0.5661819", "0.56604743", "0.5658834", "0.5657602", "0.5653292", "0.5651038", "0.56507695", "0.5650558", "0.5650558", "0.564648", "0.56401485", "0.56379616", "0.5637949", "0.5637949", "0.5636712", "0.5635773", "0.5634998", "0.5631359", "0.5629433", "0.56272966", "0.56204146", "0.56178737", "0.561787", "0.561787", "0.561787", "0.5617662", "0.5613017", "0.5611564", "0.5608849", "0.5605959", "0.5604997", "0.5604108", "0.5602079", "0.5601315", "0.5591134", "0.5590467", "0.55899256", "0.5580605", "0.55795175", "0.5575363", "0.55747926", "0.55743057", "0.55733037", "0.55723697", "0.557087", "0.5568503", "0.55671054", "0.55671054", "0.55671054", "0.555885", "0.5558042" ]
0.0
-1
End of Page Header
function Table_Headers($header,$w) { //Colors, line width and bold font $this->SetFillColor(153,153,153); $this->SetTextColor(0); $this->SetDrawColor(128,0,0); $this->SetLineWidth(.3); $this->SetFont('Arial','B','7'); //Header //Output table header for($i=0;$i<count($header);$i++) $this->Cell($w[$i],5,$header[$i],1,0,'C',1); $this->Ln(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function endHeader(){\n\t\techo '</h4>';\n\t\techo CHtml::closeTag('div');\n\t}", "public static function after_header() {\r\n\r\n\t}", "public static function end_header()\n\t{\n\t\treturn sprintf('</h%d>',\n\t\t\tmin(6, self::$nivel_cabecalho)\n\t\t);\n\t}", "public function endPage() {}", "public function getHeaderEnd()\n {\n return self::HEADER_END;\n }", "function page_end() {\n\t\t$this->tag= \"</body></html>\";\n\t\treturn $this -> tag;\n\t}", "public function drawEndHeaderPanel()\r\n {\r\n echo '</div>';\r\n }", "function tableheader_close() {\n $this->doc .= '</th>';\n }", "function _endpage()\n\t\t{\n\t\t\t$this->state=1;\n\t\t}", "public function sectionEnd() {}", "public function sectionEnd() {}", "abstract protected function header();", "abstract public function header();", "function close_head()\n{\n close_tag('head', Tab(1), true) ;\n}", "public function addFooter(){\n\n$this->page .= <<<EOD\n<pre>\n$this->title\n</pre>\n</body>\n</html>\nEOD;\n}", "protected function generatePageFooter() \n {\n\t\t\n\t\techo \"</body>\\n\";\n\t\techo \"</html>\\n\";\n // to do: output common end of HTML code\n }", "public function footerAction() {$this->_helper->viewRenderer->setResponseSegment('footer');}", "public function header()\n {\n }", "function endPage () {\n\tglobal $pageEnd;\n\techo $pageEnd;\n}", "abstract protected function footer();", "abstract protected function footer();", "private function printFooter()\n {\n // Nothing to do at the moment\n }", "function Header(){\n\t\t}", "public function header() {\n\t}", "function header() {\n }", "function hr() {\n $this->doc .= '<hr />'.DOKU_LF;\n }", "function Footer()\n {\n date_default_timezone_set('UTC+1');\n //Date\n $tDate = date('F j, Y, g:i:s a');\n // Position at 1.5 cm from bottom\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial', 'I', 12);\n // Text color in gray\n $this->SetTextColor(128);\n // Page number\n $this->Cell(0, 10,utf8_decode('Page ' . $this->PageNo().' \n CHUYC \n '.$tDate.'\n +237 693 553 454\n '.$this->Image(SITELOGO, 189, 280, 10, 10,'', URLROOT)), 0, 0, 'L');\n }", "protected function header()\n {\n\n }", "public function print_footer() {\n // Do nothing.\n }", "protected function footer()\n {\n\n }", "public function footer() {\n\t}", "public function Header(){\n\t\t$this->lineFeed(10);\n\t}", "function Header()\n\t{\n\t\t$this->cabecera_esp();\n\t\t$this->Ln();\n\t}", "function endPage(){\n global $_inContainer, $_pageName, $_loadChosen;\n require('inc/pageend.php');\n}", "public function prePageHeader();", "function Footer()\n\t\t\t\t{\n\t\t\t\t $this->SetY(-15);\n\t\t\t\t // Select Arial italic 8\n\t\t\t\t $this->SetFont('Arial','I',8);\n\t\t\t\t // Print centered page number\n\t\t\t\t $this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C');\n\t\t\t\t}", "protected function makeFooter()\n {\n }", "public function footer()\n {\n }", "public function pfoot() {\n include(dirname(dirname(__FILE__)) . '/ui/footer.php');\n }", "function FooterRR()\n {\n //Posición: a 2 cm del final\n $this->Ln();\n $this->SetY(-12);\n $this->SetFont('Arial','B',6);\n //Número de página\n $this->Cell(190,4,'Sistema de Control de Ventas y Facturacion \"BOUTIQUE DE ZAPATERIA\"','T',0,'L');\n $this->AliasNbPages();\n $this->Cell(0,4,'Pagina '.$this->PageNo(),'T',1,'R');\n }", "function Footer()\n\t{\n\t\t//$this->Image('../imagenes/pie.jpg',15,250,170);\n\t\t$this->AliasNbPages();\n\t\t$this->SetY(-23);\n\t\t\n\t\t$this->SetFont('Arial','B',9);\n\t\t$this->MultiCell(180,5,utf8_decode(''),'0','C');\n\t\t\n\t $this->SetFont('Arial','I',8);\n\t $this->Cell(0,7,'Pag. '.$this->PageNo().' / {nb}',0,1,'C');\n\t}", "function segments_page_header_after() {\n get_template_part( 'templates/content', 'user' );\n}", "public function initPageFooter()\n\t{\n\t\tinclude_once('view/main_page_footer.php');\n\t}", "function footer() {\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial', 'I', 8);\n // Print current and total page numbers\n $this->Cell(0, 10, 'Page ' . $this->PageNo() . '/{nb}', 0, 0, 'C');\n }", "public function header()\n {\n echo \"<!doctype html>\\n<html lang='pt'>\\n<head>\\n\";\n echo \"\\t<meta charset='UTF-8'>\\n\";\n echo \"\\t<title>{$this->controller->getTitle()}</title>\\n\";\n $this->links();\n echo \"</head>\\n<body>\\n\";\n }", "function Footer()\n\t\t\t\t{\n\t\t\t\t\t$this->SetY(-15);\n\t\t\t\t\t//Arial italic 8\n\t\t\t\t\t$this->SetFont('Helvetica','I',8);\n\t\t\t\t\t//Page number\n\t\t\t\t\t$this->Cell(0,10,'Page '.$this->PageNo().'/'.$comp_name,'T',0,'C');\n\t\t\t\t\t$this->SetDrawColor(8, 102, 198);\n\t\t\t\t\tparent::Footer();\n\t\t\t\t}", "protected function generatePageFooter() \r\n {\r\n echo <<<HTML\r\n </article>\r\n <script src=\"CityWok.js\"> </script>\r\n </body>\r\n</html>\r\nHTML;\r\n }", "function printFooter() {\n\tprint <<<ENDOLA\n</body>\n</html>\nENDOLA;\n}", "function pageend()\n{\n echo( \"</body>\\n</html>\\n\" );\n}", "function Footer() {\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial', 'B', 8);\n // Print centered page number\n $this->Cell(0, 5, utf8_decode(\"[Página \") . $this->PageNo() . \"]\", 0, 0, 'L');\n }", "function Footer() {\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial', 'B', 8);\n // Print centered page number\n $this->Cell(0, 5, utf8_decode(\"[Página \") . $this->PageNo() . \"]\", 0, 0, 'L');\n }", "public function end()\n\t\t{\n\t\t\t\\System\\Web\\HTTPResponse::write( '</span>' );\n\t\t}", "function Footer()\n\t{\n\t\t$this->SetY(-15);\n\t\t// Select Arial italic B\n\t\t$this->setfont('Arial','I',14);\n\t\t$this->cell(250,8,\"Proyecto Final, copyright &copy; 2019\",0,0,'c');\n\t\t// Print centered page numbre\n\t\t$this->Cell(0,10,'Pag.'.$this->PageNo(),0,0,'c');\n\t}", "function additionalHeaderStuff() {\n return;\n }", "function doc_end () {\r\n\t}", "function get_html_pre_page_end();", "public static function end()\n\t{\n\t\treturn '\n\t\t</div>\n\t</div>\n</div>\n<!-- CE: End Pagination -->\n';\n\t}", "function Footer()\n\t\t{\n\t\t}", "public function my_addition_to_login_footer() {\n }", "public function Footer(){\n // Posición: a 1,5 cm del final\n $this->SetY(-20);\n // Arial italic 8\n $this->AddFont('Futura-Medium');\n $this->SetFont('Futura-Medium','',10);\n $this->SetTextColor(50,50,50);\n // Número de págin\n $this->Cell(3);\n $this->Cell(0,3,utf8_decode('Generado por GetYourGames'),0,0,\"R\");\n $this->Ln(4);\n $this->Cell(3);\n $this->Cell(0,3,utf8_decode(date(\"d-m-Y g:i a\").' - Página ').$this->PageNo(),0,0,\"R\");\n\n }", "protected function bodyHeader() {\n echo str_repeat(\"\\t\",1) . \"<body>\\n\";\n echo str_repeat(\"\\t\",2) . \"<div id=\\\"page\\\">\\n\";\n echo str_repeat(\"\\t\",3) . \"<header>\\n\";\n echo str_repeat(\"\\t\",4) . \"<h1>Евиденција волонтера</h1>\\n\";\n echo str_repeat(\"\\t\",3) . \"</header>\\n\";\n }", "function display_portal_header()\r\n {\r\n Display :: header(null);\r\n }", "function Footer()\t{\n\t $this->SetY(-15);\n\t // Arial italic 8\n\t $this->SetFont('Arial','I',8);\n\t // Page number\n\t $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n\t}", "function Footer()\n {\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial','I',8);\n // Page number\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n }", "public function Footer()\n {\n // Go to 10 cm from bottom\n $this->SetY(-10);\n // Set font to Open Sans\n $this->SetFont('opensans', 'I', 6);\n // Print centered page number with datetime and timezone\n $this->AliasNbPages('{totalPages}');\n // The timezone of the user is retrieved from their Auth0 user's profile if available, otherwise the server time zone is used\n // related to this trello card https://trello.com/c/OjWZzsGA\n $timezone = ($_SESSION['auth0_user']['https://www.boxtribute.com/timezone']) ? $_SESSION['auth0_user']['https://www.boxtribute.com/timezone'] : date_default_timezone_get();\n\n $dt = new DateTime('now', new DateTimeZone($timezone));\n // This is quick fix for an issue with the alignment of footer text as the library incorrectly calculates the text length when template variables {totalPages} are used\n $totalPages = ($_GET['count'] && 0 != $_GET['count']) ? round(intval($_GET['count']) / 2) : 1;\n $this->Cell(0, 10, 'Page '.$this->PageNo().' of '.$totalPages.' Printed on '.$dt->format('d-m-Y H:i:s').\" {$timezone}\", 0, 0, 'C');\n }", "public function Footer()\n {\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial', 'I', 8);\n // Print centered page number\n $this->Cell(0, 4, utf8_decode('Atenea - Página ' . $this->PageNo()), 0, 0, 'C');\n }", "public function outputBody()\r\n\t{\r\n\t\t$this->header();\r\n\t\tparent::outputBody();\r\n\t}", "public function Footer() {\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial', 'I', 8);\n // Text color in gray\n $this->SetTextColor(128);\n // Page number\n $this->Cell(0, 10, 'Page ' . $this->PageNo() . '/{nb}', 0, 0, 'C');\n }", "function Footer(){\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial','I',8);\n // Page number\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n }", "function Footer() {\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial', 'I', 10);\n // Text color in gray\n $this->SetTextColor(128);\n // Page number\n $this->Cell(0, 10, 'Page ' . $this->PageNo(), 0, 0, 'C');\n }", "protected function footer()\n {\n require SCRIPT_BASE . \"build/rox/templates/footer.php\";\n }", "function section_close() {\n $this->doc .= DOKU_LF.'</div>'.DOKU_LF;\n }", "public function showPageHeader() {\n\n\t\techo $this->getPageHeader();\n\t}", "function Footer()\n {\n $this->SetY(-15);\n //Select Arial Italic 8\n $this->SetFont('Arial','I',8);\n $this->SetX(86,5);\n $this->Write(5, '[ powered by '.$this->web_str.']',$this->web_str);\n //Print centered page number\n $this->Cell(0,10,$this->page_str.' '.$this->PageNo(),0,0);\n }", "function Footer() {\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial','I',8);\n // Print centered page number\n // $this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C');\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n }", "function Footer() {\r\n\t\t\t$this->SetY( -15 );\r\n\t\t\t\r\n\t\t\t//set font to Arial, Bold, size 10\r\n\t\t\t$this->SetFont( 'Arial', 'B', 10 );\r\n\t\t\t\r\n\t\t\t//set font color to blue\r\n\t\t\t$this->SetTextColor( 52, 98, 185 );\r\n\t\t\t\r\n\t\t\t$this->Cell( 0, 10, 'www.iFadey.com', 0, 0, 'L' );\r\n\t\t\t\r\n\t\t\t//set font color to gray\r\n\t\t\t$this->SetTextColor( 150, 150, 150 );\r\n\t\t\t\r\n\t\t\t//write Page No\r\n\t\t\t$this->Cell( 0, 10, 'Page No: ' . $this->PageNo(), 0, 0, 'R' );\r\n\t\t}", "public function Footer() {\r\n $this->SetTextColor(0,0,0);\r\n /* insertamos numero de pagina y total de paginas*/\r\n $this->Cell(0, 10, 'Página '.$this->getAliasNumPage().\r\n ' de un total de '.\r\n $this-> getAliasNbPages(),\r\n 0, false, 'C', 0, '', 0, false, 'T', 'M');\r\n $this->SetDrawColor(0,0,0);\r\n /* dibujamos una linea roja delimitadora del pie de página */\r\n $this->Line(15,282,195,282);\r\n\r\n }", "public function Footer() {\n $this->SetY(-15);\n // Select helvetica italic 8\n $this->SetFont('helvetica', '', 10);\n // Print current and total page numbers\n\n //$this->Cell(0,10,'Page '.$this->pageNo().'/{nb}',0,0,'C');\n\n $this->Cell(0, 4, 'This document shall be deemed uncontrolled unless labelled \"CONTROLLED\"', 0, 0, 'C');\n $this->ln();\n\n $this->Cell($this->w - ($this->w * 0.51), 4, 'User should verify latest', 0, 0, 'R');\n $this->SetFont('helvetica', 'B', 10);\n $this->Cell(0, 4, ' revision.', 0, 0, 'L');\n $this->ln();\n\n $this->SetFont('helvetica', 'I', 7);\n\n $pageNo = 'Page '.$this->getAliasNumPage().' of '.$this->getAliasNbPages();\n $this->Cell(0, 3, $pageNo, 0, 0, 'R');\n }", "function display_header() {}", "function Footer() {\n $this->SetY(-15);\n //Pilih font Arial italic 8\n $this->SetFont('Helvetica', 'I', 8);\n //Tampilkan nomor halaman rata tengah\n $this->Cell(0, 10, 'Page ' . $this->getAliasNumPage() . '/' . $this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');\n }", "public function Header() {\n // si la pagina es diferente de la 2\n // if (count($this->pages) !== 2) \n // {\n // Logo\n $image_file = K_PATH_IMAGES.'logoesen.jpg';\n $this->Image($image_file, 90, 5, 25, '', 'JPG', '', 'T', false, 300, '', false, false, 0, false, false, false);\n // Set font\n $this->SetFont('helvetica', 'B', 20);\n // Title\n //$this->Cell(0, 15, '<< TCPDF Example 003 >>', 0, false, 'C', 0, '', 0, false, 'M', 'M');\n // }\n }", "function Footer()\n\t{\n\t $this->SetY(-15);\n\t //Arial italic 8\n\t $this->SetFont('Arial','I',7);\n\t //Page number\n\t $this->Cell(0,10,utf8_decode('Página ').$this->PageNo().' de {nb}',0,0,'R');\n\t}", "function sloodle_print_footer()\r\n {\r\n global $CFG;\r\n echo \"<p style=\\\"text-align:center; margin-top:32px; font-size:90%;\\\"><a href=\\\"{$CFG->wwwroot}/course/view.php?id={$this->course->id}\\\">&lt;&lt;&lt; \".get_string('backtocoursepage','sloodle').\"</a></h2>\";\r\n sloodle_print_footer($this->course);\r\n }", "function Footer()\n {\n $this->SetY(-6);\n //Arial italic 8\n $this->SetFont('Arial','I',8);\n //Page number\n $this->Cell(0,10,'Página '.$this->PageNo(),0,0,'C');\n }", "function printFooter()\n\t{\n\t\tinclude 'View/Footer.html';\n\t}", "function Footer()\n\t{\n\t\t$this->SetY(-13);\n\t\t// Arial italic 8\n\t\t$this->SetFont('Arial','I',8);\n\t\t// Page number\n\t\t$this->Cell(0,10,'Designed by winnie(+254701008108)',0,0,'C');\n\t\t$this->SetY(-18);\n\t\t$this->Cell(0,10,'www.veranevents.com',0,0,'C');\n\t}", "function Footer(){\n\t\t// Positionnement à 1,5 cm du bas\n\t\t$this->SetY(-15);\n\t\t// Police Arial italique 8\n\t\t$this->SetFont('Arial','I',8);\n\t\t// Numéro de page\n\t\t$this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n\t}", "public function header_output() {\n\n\t\t?>\n\t\t<style type='text/css'>\n\t\t\t#site-footer {\n\t\t\t\tbackground-color:#<?php echo get_theme_mod('footer_bg_color') ?> ;\n\t\t\t}\n\t\t</style>\n\t\t<?php\n\n\n\t}", "public function template_footer() {\n\t\tget_footer( 'course' );\n\t}", "function tablethead_close() {\n $this->doc .= DOKU_TAB.'</thead>'.DOKU_LF;\n }", "function Footer(){\r\n $this->SetY(-15); // Position at 1.5 cm from bottom\r\n $this->SetFont('Arial','I',8); // Arial italic 8\r\n $this->Cell(0,10,'Pagina '.$this->PageNo().'/{nb}',0,0,'C'); // Page number\r\n }", "function getContentFooter() {\n return '';\n }", "function opinionstage_help_resource_load_footer(){\n}", "function udesign_head_bottom() {\r\n do_action('udesign_head_bottom');\r\n}", "function Footer()\n\t{\n\t\t$this->SetY(-15);\n\t\t//buat garis horizontal\n\t\t$this->Line(30,$this->GetY(),185,$this->GetY());\n\t\t//Arial italic 9\n\t\t$this->SetFont('Arial','I',9);\n\t\t//nomor halaman\n\t\t$this->Cell(0,10,'Halaman '.$this->PageNo().' dari {nb}',0,0,'R');\n\t}", "function Footer()\n\t{\n\t $this->SetY(-15);\n\t //Arial italic 8\n\t $this->SetFont('Arial','I',7);\n\t //Page number\n\t $this->Cell(0,10,utf8_decode('PlatSource © '.date('Y')),0,0,'L');\n\t $this->Cell(0,10,utf8_decode('Página ').$this->PageNo().' de {nb}',0,0,'R');\n\t}", "protected function end() {\n // must have space after it\n return 'END ';\n }", "public function Footer() {\n $this->SetY(-15);\n // Set font\n $this->SetFont('helvetica', 'I', 8);\n // Page number\n $this->Cell(0, 10, 'Page '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');\n }", "function Footer(){\n\t\t$this->Cell(190,0,'','T',1,'',true);\n\t\t\n\t\t//Go to 1.5 cm from bottom\n\t\t$this->SetY(-15);\n\t\t\t\t\n\t\t$this->SetFont('Arial','',8);\n\t\t\n\t\t//width = 0 means the cell is extended up to the right margin\n\t\t$this->Cell(0,10,'Page '.$this->PageNo().\" / {pages}\",0,0,'C');\n\t}", "public function Footer() {\n\t\t$this->SetY(-15);\n\t\t// Set font\n\t\t$this->SetFont('helvetica', 'I', 8);\n\t\t// Page number\n\t\t$this->Cell(0, 10, 'Pagina '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');\n\t}", "function Footer()\n\t{\n\t\t$this->SetY(-15);\n\t\t//buat garis horizontal\n\t\t$this->Line(10,$this->GetY(),210,$this->GetY());\n\t\t//Arial italic 9\n\t\t$this->SetFont('Arial','I',9);\n $this->Cell(0,10,'copyright gubugkoding.com Semarang ' . date('Y'),0,0,'L');\n\t\t//nomor halaman\n\t\t$this->Cell(0,10,'Halaman '.$this->PageNo().' dari {nb}',0,0,'R');\n\t}" ]
[ "0.77213377", "0.75642085", "0.7467698", "0.7352255", "0.727965", "0.6980245", "0.6979666", "0.69016623", "0.68502426", "0.6787376", "0.6787376", "0.67381376", "0.67101634", "0.67008936", "0.66994077", "0.66744477", "0.66536444", "0.6646254", "0.66281587", "0.6613058", "0.6613058", "0.660971", "0.6600115", "0.6557598", "0.6529614", "0.65153146", "0.64899516", "0.64827895", "0.64712846", "0.6458206", "0.6448466", "0.64270556", "0.6423463", "0.6419085", "0.6414072", "0.6405056", "0.63908255", "0.63905984", "0.63892335", "0.6384527", "0.63724667", "0.6369976", "0.6354652", "0.6352552", "0.6345289", "0.6341862", "0.6340245", "0.63397026", "0.6326181", "0.63194925", "0.63194925", "0.6312687", "0.63123673", "0.63115484", "0.63077986", "0.6302185", "0.6300454", "0.6296706", "0.6296423", "0.6292035", "0.6253129", "0.6243864", "0.6243237", "0.6243203", "0.62429565", "0.62415653", "0.6231839", "0.62288874", "0.6221778", "0.62208813", "0.6218092", "0.62134516", "0.62126696", "0.62081504", "0.6205177", "0.62027985", "0.61949164", "0.61890846", "0.61771137", "0.61770684", "0.61730444", "0.61730254", "0.6171519", "0.6168295", "0.6156051", "0.6149813", "0.61396927", "0.613659", "0.61329484", "0.6127892", "0.61161816", "0.6113278", "0.61128026", "0.61082256", "0.610098", "0.6097948", "0.6097031", "0.60941076", "0.60783726", "0.6061233", "0.6058451" ]
0.0
-1
Set the array of column widths
function SetWidths($w) { $this->widths=$w; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setColumnsWidth($array) { \n foreach ($array as $elem) {\n if ($elem != \"\")\n $this->columnsWidth[] = \"style=\\\"width:$elem\\\"\";\n else\n $this->columnsWidth[] = \"\";\n }\n }", "public function setColumnsWidth($array) { \r\n foreach ($array as $elem) {\r\n if ($elem != \"\")\r\n $this->columnsWidth[] = \"style=\\\"width:$elem\\\"\";\r\n else\r\n $this->columnsWidth[] = \"\";\r\n }\r\n }", "function SetWidths($w){\r\n \t//Set the array of column widths\r\n \t$this->widths=$w;\r\n }", "function SetWidths($w)\n{\n $this->widths=$w;\n}", "function SetWidths($w)\n{\n $this->widths=$w;\n}", "function SetWidths($w)\n{\n $this->widths=$w;\n}", "function SetWidths($w)\r\n{\r\n $this->widths=$w;\r\n}", "function SetWidths($w) {\n\t$this->widths=$w;\n}", "function SetWidths($w){\n\t $this->widths=$w;\n\t}", "function SetWidths($w)\n{\n\t$this->widths=$w;\n}", "function SetWidths($w)\n{\n\t$this->widths=$w;\n}", "function SetWidths($w)\n{\n\t$this->widths=$w;\n}", "function SetWidths($w)\n {\n $this->widths=$w;\n }", "function SetWidths($w)\n {\n $this->widths=$w;\n }", "function SetWidths($w)\n {\n $this->widths=$w;\n }", "function SetWidths($w)\n {\n $this->widths=$w;\n }", "function SetWidths($w){\n\t\t\t$this->widths=$w;\n\t\t}", "function SetWidths($w)\n\t{\n\t $this->widths=$w;\n\t}", "function SetWidths($w)\n\t{\n\t $this->widths=$w;\n\t}", "function SetWidths($w) {\n\t\t\t$this->widths=$w;\n\t\t}", "function SetWidths($w)\n\t{\n\t\t$this->widths=$w;\n\t}", "function SetWidths($w)\n\t{\n\t\t$this->widths=$w;\n\t}", "function SetWidths($w)\n\t{\n\t\t$this->widths=$w;\n\t}", "function SetWidths($w) {\n $this->widths = $w;\n }", "function SetWidths($w) {\n $this->widths = $w;\n }", "function SetWidths($w) {\n $this->widths = $w;\n }", "function SetWidths($w)\n {\n $this->widths = $w;\n }", "function SetWidths($w)\n {\n $this->widths = $w;\n }", "public function setColWidth($column_start, $column_end, $width, $hidden = false, $format = null) {\n\t}", "function SetWidth()\n\t{\n\t\tif (!func_num_args())\n\t\t{\n\t\t\t// No parameters were passed\n\t\t\treturn NULL;\n\t\t}\n\t\t\n\t\t// Store the width values\n\t\t$this->_arrWidths = func_get_args();\n\n\t\treturn $this->_arrWidths;\n\t}", "public function fieldWidths();", "public function SetWidths($w)\n {\n $this->widths=$w;\n\n }", "public function setWidths(array $widths, $fallback = false) {\n\t\tif ($fallback) {\n\t\t\tforeach ( $this->_widths as $index => $value ) {\n\t\t\t $widths[$index] = $value;\n\t\t\t}\n\t\t}\n\t\t$this->_widths = $widths;\n\n\t\tif ( is_null( $this->_constraintWidth ) ) {\n\t\t\t$this->_constraintWidth = (int) Shell::columns();\n\t\t}\n\t\t$col_count = count( $widths );\n\t\t$col_borders_count = $col_count ? ( ( $col_count - 1 ) * strlen( $this->_characters['border'] ) ) : 0;\n\t\t$table_borders_count = strlen( $this->_characters['border'] ) * 2;\n\t\t$col_padding_count = $col_count * strlen( $this->_characters['padding'] ) * 2;\n\t\t$max_width = $this->_constraintWidth - $col_borders_count - $table_borders_count - $col_padding_count;\n\n\t\tif ( $widths && $max_width && array_sum( $widths ) > $max_width ) {\n\n\t\t\t$avg = floor( $max_width / count( $widths ) );\n\t\t\t$resize_widths = array();\n\t\t\t$extra_width = 0;\n\t\t\tforeach( $widths as $width ) {\n\t\t\t\tif ( $width > $avg ) {\n\t\t\t\t\t$resize_widths[] = $width;\n\t\t\t\t} else {\n\t\t\t\t\t$extra_width = $extra_width + ( $avg - $width );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( ! empty( $resize_widths ) && $extra_width ) {\n\t\t\t\t$avg_extra_width = floor( $extra_width / count( $resize_widths ) );\n\t\t\t\tforeach( $widths as &$width ) {\n\t\t\t\t\tif ( in_array( $width, $resize_widths ) ) {\n\t\t\t\t\t\t$width = $avg + $avg_extra_width;\n\t\t\t\t\t\tarray_shift( $resize_widths );\n\t\t\t\t\t\t// Last item gets the cake\n\t\t\t\t\t\tif ( empty( $resize_widths ) ) {\n\t\t\t\t\t\t\t$width = 0; // Zero it so not in sum.\n\t\t\t\t\t\t\t$width = $max_width - array_sum( $widths );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\t$this->_widths = $widths;\n\t}", "public function setColumnSizes(array $sizes)\n {\n $this->config->setColumnSizes($sizes);\n }", "public function getWidths(array $chars) {}", "protected function applyWidth()\n {\n }", "public function setWidth($width) {}", "public function setWidth($width) {}", "public function setWidth($width) {}", "function TS_VCSC_Testimonials_AdjustColumnWidths() {\r\n echo '<style type=\"text/css\">\r\n .column-previews {text-align: left; width: 175px !important; overflow: hidden;}\r\n .column-ids {text-align: left; width: 60px !important; overflow: hidden;}\r\n </style>';\r\n }", "public function setColumnSizes(array $sizes)\n {\n if (count($sizes) && !is_numeric(key($sizes))) {\n $this->columnSizes = $sizes;\n } else {\n reset($sizes);\n $this->columnSizes = [];\n foreach ($this->header as $key => $value) {\n $this->columnSizes[$key] = current($sizes);\n if (next($sizes) === false)\n break;\n }\n }\n }", "public static function set_column_width($dataDir)\n {\n $workbook = new Workbook($dataDir . 'Book1.xls');\n\n # Accessing the first worksheet in the Excel file\n $worksheet = $workbook->getWorksheets()->get(0);\n $cells = $worksheet->getCells();\n\n # Setting the width of the second column to 17.5\n $cells->setColumnWidth(1, 17.5);\n\n # Saving the modified Excel file in default (that is Excel 2003) format\n $workbook->save($dataDir . \"Set Column Width.xls\");\n\n print \"Set Column Width Successfully.\" . PHP_EOL;\n\n }", "function module_widths(){\r\n}", "function _tableColumnWidth(&$table){\r\n//! @return void\r\n\t$cs = &$table['cells'];\r\n\t$mw = $this->getStringWidth('W');\r\n\t$nc = $table['nc'];\r\n\t$nr = $table['nr'];\r\n\t$listspan = array();\r\n\t//Xac dinh do rong cua cac cell va cac cot tuong ung\r\n\tfor ($j=0;$j<$nc;$j++){\r\n\t\t$wc = &$table['wc'][$j];\r\n\t\tfor ($i=0;$i<$nr;$i++){\r\n\t\t\tif (isset($cs[$i][$j]) && $cs[$i][$j]){\r\n\t\t\t\t$c = &$cs[$i][$j];\r\n\t\t\t\t$miw = $mw;\r\n\t\t\t\t$c['maw']\t= $c['s'];\r\n\t\t\t\tif (isset($c['nowrap']))\t\t\t$miw = $c['maw'];\r\n\t\t\t\tif (isset($c['w'])){\r\n\t\t\t\t\tif ($miw<$c['w'])\t$c['miw'] = $c['w'];\r\n\t\t\t\t\tif ($miw>$c['w'])\t$c['miw'] = $c['w']\t = $miw;\r\n\t\t\t\t\tif (!isset($wc['w'])) $wc['w'] = 1;\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$c['miw'] = $miw;\r\n\t\t\t\t}\r\n\t\t\t\tif ($c['maw'] < $c['miw'])\t\t\t$c['maw'] = $c['miw'];\r\n\t\t\t\tif (!isset($c['colspan'])){\r\n\t\t\t\t\tif ($wc['miw'] < $c['miw'])\t\t$wc['miw']\t= $c['miw'];\r\n\t\t\t\t\tif ($wc['maw'] < $c['maw'])\t\t$wc['maw']\t= $c['maw'];\r\n\t\t\t\t}else $listspan[] = array($i,$j);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t//Xac dinh su anh huong cua cac cell colspan len cac cot va nguoc lai\r\n\t$wc = &$table['wc'];\r\n\tforeach ($listspan as $span){\r\n\t\tlist($i,$j) = $span;\r\n\t\t$c = &$cs[$i][$j];\r\n\t\t$lc = $j + $c['colspan'];\r\n\t\tif ($lc > $nc) $lc = $nc;\r\n\t\t\r\n\t\t$wis = $wisa = 0;\r\n\t\t$was = $wasa = 0;\r\n\t\t$list = array();\r\n\t\tfor($k=$j;$k<$lc;$k++){\r\n\t\t\t$wis += $wc[$k]['miw'];\r\n\t\t\t$was += $wc[$k]['maw'];\r\n\t\t\tif (!isset($c['w'])){\r\n\t\t\t\t$list[] = $k;\r\n\t\t\t\t$wisa += $wc[$k]['miw'];\r\n\t\t\t\t$wasa += $wc[$k]['maw'];\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($c['miw'] > $wis){\r\n\t\t\tif (!$wis){//Cac cot chua co kich thuoc => chia deu\r\n\t\t\t\tfor($k=$j;$k<$lc;$k++) $wc[$k]['miw'] = $c['miw']/$c['colspan'];\r\n\t\t\t}elseif (!count($list)){//Khong co cot nao co kich thuoc auto => chia deu phan du cho tat ca\r\n\t\t\t\t$wi = $c['miw'] - $wis;\r\n\t\t\t\tfor($k=$j;$k<$lc;$k++) \r\n\t\t\t\t\t$wc[$k]['miw'] += ($wc[$k]['miw']/$wis)*$wi;\r\n\t\t\t}else{//Co mot so cot co kich thuoc auto => chia deu phan du cho cac cot auto\r\n\t\t\t\t$wi = $c['miw'] - $wis;\r\n\t\t\t\tforeach ($list as $k)\r\n\t\t\t\t\t$wc[$k]['miw'] += ($wc[$k]['miw']/$wisa)*$wi;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($c['maw'] > $was){\r\n\t\t\tif (!$wis){//Cac cot chua co kich thuoc => chia deu\r\n\t\t\t\tfor($k=$j;$k<$lc;$k++) $wc[$k]['maw'] = $c['maw']/$c['colspan'];\r\n\t\t\t}elseif (!count($list)){//Khong co cot nao co kich thuoc auto => chia deu phan du cho tat ca\r\n\t\t\t\t$wi = $c['maw'] - $was;\r\n\t\t\t\tfor($k=$j;$k<$lc;$k++) \r\n\t\t\t\t\t$wc[$k]['maw'] += ($wc[$k]['maw']/$was)*$wi;\r\n\t\t\t}else{//Co mot so cot co kich thuoc auto => chia deu phan du cho cac cot auto\r\n\t\t\t\t$wi = $c['maw'] - $was;\r\n\t\t\t\tforeach ($list as $k)\r\n\t\t\t\t\t$wc[$k]['maw'] += ($wc[$k]['maw']/$wasa)*$wi;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}", "private function calculateColumnWidth()\r\n {\r\n foreach ($this->data as $y => $row) {\r\n if (is_array($row)) {\r\n foreach ($row as $x => $col) {\r\n $content = preg_replace('#\\x1b[[][^A-Za-z]*[A-Za-z]#', '', $col);\r\n if (!isset($this->columnWidths[$x])) {\r\n $this->columnWidths[$x] = mb_strlen((string)$content, 'UTF-8');\r\n } else {\r\n if (mb_strlen((string)$content, 'UTF-8') > $this->columnWidths[$x]) {\r\n $this->columnWidths[$x] = mb_strlen((string)$content, 'UTF-8');\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n return $this->columnWidths;\r\n }", "function _tableColumnWidth(&$table){\n//! @return void\n\t$cs = &$table['cells'];\n\t$mw = $this->getStringWidth('W');\n\t$nc = $table['nc'];\n\t$nr = $table['nr'];\n\t$listspan = array();\n\t//Xac dinh do rong cua cac cell va cac cot tuong ung\n\tfor($j = 0 ; $j < $nc ; $j++ ) //columns\n {\n\t\t$wc = &$table['wc'][$j];\n\t\tfor($i = 0 ; $i < $nr ; $i++ ) //rows\n {\n\t\t\tif (isset($cs[$i][$j]) && $cs[$i][$j])\n {\n\t\t\t\t$c = &$cs[$i][$j];\n\t\t\t\t$miw = $mw;\n\t\t\t\tif (isset($c['maxs']) and $c['maxs'] != '') $c['s'] = $c['maxs'];\n\t\t\t\t$c['maw']\t= $c['s'];\n\t\t\t\tif (isset($c['nowrap'])) $miw = $c['maw'];\n\t\t\t\tif (isset($c['w']))\n {\n\t\t\t\t\tif ($miw<$c['w'])\t$c['miw'] = $c['w'];\n\t\t\t\t\tif ($miw>$c['w'])\t$c['miw'] = $c['w']\t = $miw;\n\t\t\t\t\tif (!isset($wc['w'])) $wc['w'] = 1;\n\t\t\t\t}\n else $c['miw'] = $miw;\n\t\t\t\tif ($c['maw'] < $c['miw']) $c['maw'] = $c['miw'];\n\t\t\t\tif (!isset($c['colspan']))\n {\n\t\t\t\t\tif ($wc['miw'] < $c['miw'])\t\t$wc['miw']\t= $c['miw'];\n\t\t\t\t\tif ($wc['maw'] < $c['maw'])\t\t$wc['maw']\t= $c['maw'];\n\t\t\t\t}\n else $listspan[] = array($i,$j);\n //Check if minimum width of the whole column is big enough for a huge word to fit\n $auxtext = implode(\"\",$c['text']);\n $minwidth = $this->WordWrap($auxtext,$wc['miw']-2);// -2 == margin\n if ($minwidth < 0 and (-$minwidth) > $wc['miw']) $wc['miw'] = (-$minwidth) +2; //increase minimum width\n if ($wc['miw'] > $wc['maw']) $wc['maw'] = $wc['miw']; //update maximum width, if needed\n\t\t\t}\n\t\t}//rows\n\t}//columns\n\t//Xac dinh su anh huong cua cac cell colspan len cac cot va nguoc lai\n\t$wc = &$table['wc'];\n\tforeach ($listspan as $span)\n {\n\t\tlist($i,$j) = $span;\n\t\t$c = &$cs[$i][$j];\n\t\t$lc = $j + $c['colspan'];\n\t\tif ($lc > $nc) $lc = $nc;\n\t\t\n\t\t$wis = $wisa = 0;\n\t\t$was = $wasa = 0;\n\t\t$list = array();\n\t\tfor($k=$j;$k<$lc;$k++)\n {\n\t\t\t$wis += $wc[$k]['miw'];\n\t\t\t$was += $wc[$k]['maw'];\n\t\t\tif (!isset($c['w']))\n {\n\t\t\t\t$list[] = $k;\n\t\t\t\t$wisa += $wc[$k]['miw'];\n\t\t\t\t$wasa += $wc[$k]['maw'];\n\t\t\t}\n\t\t}\n\t\tif ($c['miw'] > $wis)\n {\n\t\t\tif (!$wis)\n {//Cac cot chua co kich thuoc => chia deu\n\t\t\t\tfor($k=$j;$k<$lc;$k++) $wc[$k]['miw'] = $c['miw']/$c['colspan'];\n\t\t\t}\n elseif(!count($list))\n {//Khong co cot nao co kich thuoc auto => chia deu phan du cho tat ca\n\t\t\t\t$wi = $c['miw'] - $wis;\n\t\t\t\tfor($k=$j;$k<$lc;$k++) $wc[$k]['miw'] += ($wc[$k]['miw']/$wis)*$wi;\n\t\t\t}\n else\n {//Co mot so cot co kich thuoc auto => chia deu phan du cho cac cot auto\n\t\t\t\t$wi = $c['miw'] - $wis;\n\t\t\t\tforeach ($list as $k)\t$wc[$k]['miw'] += ($wc[$k]['miw']/$wisa)*$wi;\n\t\t\t}\n\t\t}\n\t\tif ($c['maw'] > $was)\n {\n\t\t\tif (!$wis)\n {//Cac cot chua co kich thuoc => chia deu\n\t\t\t\tfor($k=$j;$k<$lc;$k++) $wc[$k]['maw'] = $c['maw']/$c['colspan'];\n\t\t\t}\n elseif (!count($list))\n {\n //Khong co cot nao co kich thuoc auto => chia deu phan du cho tat ca\n\t\t\t\t$wi = $c['maw'] - $was;\n\t\t\t\tfor($k=$j;$k<$lc;$k++) $wc[$k]['maw'] += ($wc[$k]['maw']/$was)*$wi;\n\t\t\t}\n else\n {//Co mot so cot co kich thuoc auto => chia deu phan du cho cac cot auto\n\t\t\t\t$wi = $c['maw'] - $was;\n\t\t\t\tforeach ($list as $k)\t$wc[$k]['maw'] += ($wc[$k]['maw']/$wasa)*$wi;\n\t\t\t}\n\t\t}\n\t}\n}", "public function setWidth($width);", "public function setWidth($width);", "function s_m_put_txt_data_order_max_width($columnnames, $rows){\r\n $width = array();\r\n for($k = 0; $k < count($columnnames); $k++){\r\n $width[$k] = strlen($columnnames[$k]) + 1;\r\n }\r\n for($r = 0; $r < count($rows); $r++){\r\n $k = 0;\r\n foreach($rows[$r] as $row){\r\n $width[$k] = max($width[$k], strlen($row) + 1);\r\n $k++;\r\n }\r\n }\r\n return $width;\r\n}", "public function setTableWidth($string) {\r\n $this->tableWidth = \"style=\\\"width:$string\\\"\";\r\n }", "public function setColumnWidths(array $columnWidths)\n {\n $this->optionsManager->setOption(Options::COLUMN_WIDTHS, $columnWidths);\n\n return $this;\n }", "public function setWidth(int $width): ModelDataTableColumnInterface;", "public function setAllTablesSameWidth($value)\n {\n $this->sameWide = $value;\n }", "public function setTableWidth($string) {\n $this->tableWidth = \"style=\\\"width:$string\\\"\";\n }", "private function setColumnLength(array $row, $format = true){\n\t\tforeach($row as $i => $col){\n\t\t\t$len = IO::strlen(IO::render(isset($this->format[$i]) && $format ? $this->format[$i] : '%s', $col));\n\t\t\t$this->columnLength[$i] = $tmp = isset($this->columnLength[$i])\n\t\t\t\t? max($this->columnLength[$i], $len)\n\t\t\t\t: $len;\n\t\t\t$diff = strlen(Color::colorize($this->format[$i])) - Color::strlen($this->format[$i]);\n\t\t\t$this->plainColumnLength[$i] = $tmp - $diff;\n\t\t}\n\t}", "function set_width($width) {\n $this->width = $width;\n }", "public function buttonWidths();", "public function setColumnsSizes($expand, $sizes)\n\t{\n\t\t$columns = array();\n\t\tforeach ((array) $sizes as $name => $width)\n\t\t{\n\t\t\t$name = trim($name);\n\t\t\t$width = is_scalar($width) ? (int) $width : 0;\n\t\t\tif ($name != '' && $width > 0)\n\t\t\t\t$columns[$name] = $width;\n\t\t}\n\n\t\t$this->all_options['views'][$this->currentView]['columns_sizes'] = array(\n\t\t\t'expand' => is_scalar($expand) ? round((float) $expand, 8) : 1,\n\t\t\t'columns' => $columns\n\t\t);\n\t}", "public function setWidth($width) {\r\n $this->width = max(1,$width);\r\n }", "public function colWidth($column) {\n\t}", "function SetRowColumnSpan()\n\t{\n\t\tif ((!func_num_args()) || (!isset($this->_intCurrentRow)))\n\t\t{\n\t\t\t// no parameters were passed or there is no current row\n\t\t\treturn NULL;\n\t\t}\n\t\t\n\t\t// retrieve the width values\n\t\t$arrColSpans = func_get_args();\n\t\t\n\t\t$this->_arrRows[$this->_intCurrentRow]['ColSpans'] = $arrColSpans;\n\n\t\treturn $this->_intCurrentRow;\n\t}", "public function setColumns()\r\n\t{\r\n\t\t$columns = array_filter($this->getRules(), function($rule) {\r\n\t\t\tif($rule instanceof ColumnInterface) {\r\n\t\t\t\treturn $rule;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t$columns = array_map(function(ColumnInterface $rule) {\r\n\t\t\treturn $rule->getTitle();\r\n\t\t}, $columns);\r\n\r\n\t\t$this->columns = $columns;\r\n\t}", "public function labelWidths();", "public function set(array $cols) : void;", "public static function setColumnsAutowidth(Worksheet $sheet, int $columncount) {\n\t\tfor ($i = 0; $i < ($columncount); $i++) {\n\t\t\t$index = Coordinate::stringFromColumnIndex($i);\n\t\t\t$sheet->getColumnDimension($index)->setAutoSize(true);\n\t\t}\n\t}", "public function setWidth($width) {\n\t\t$this->_width=$width;\n\t\t$this->_autoWidth=$width;\n\t}", "function updateSize(){\n $this->cols = exec(\"tput cols\");\n }", "public function column_style() {\n\t\techo '<style>#registered{width: 7%}</style>';\n\t\techo '<style>#wp-last-login{width: 7%}</style>';\n\t\techo '<style>.column-wp_capabilities{width: 8%}</style>';\n\t\techo '<style>.column-blogname{width: 13%}</style>';\n\t\techo '<style>.column-primary_blog{width: 5%}</style>';\n\t}", "function CalcWidths($width,$align)\r\n{\r\n $TableWidth=0;\r\n foreach($this->aCols as $i=>$col)\r\n {\r\n $w=$col['w'];\r\n if($w==-1)\r\n $w=$width/count($this->aCols);\r\n elseif(substr($w,-1)=='%')\r\n $w=$w/100*$width;\r\n $this->aCols[$i]['w']=$w;\r\n $TableWidth+=$w;\r\n }\r\n //Compute the abscissa of the table\r\n if($align=='C')\r\n $this->TableX=max(($this->w-$TableWidth)/2,0);\r\n elseif($align=='R')\r\n $this->TableX=max($this->w-$this->rMargin-$TableWidth,0);\r\n else\r\n $this->TableX=$this->lMargin;\r\n}", "function setSpaceBetweenColumns($spaceBetweenColumns) {\t\t\r\n\t\t$this->spaceBetweenColumns = $spaceBetweenColumns;\r\n\t}", "public function setWidth($value)\n {\n $this->_width = $value;\n }", "protected function getPreviewFrameWidths() {}", "public function setDisplayWidth($width)\n {\n\t\t$err = \"display width can be expressed in two ways: -(m | m,d) \";\n\t\t$err .= \"m and d must be integers \";\n\n\t\tif (is_string($width)) {\n\t\t\t$width = explode(',', $width);\n\t\t\t$max = count($width);\n\t\t\tif (1 === $max) {\n\t\t\t\t$width = $width[0];\n\t\t\t\tif (empty($width) || ! is_numeric($width)) {\n\t\t\t\t\t$err = \"single display width detected but is empty \";\n\t\t\t\t\t$err .= \"or is not an integer\";\n\t\t\t\t\techo \"\\n\", print_r('insert here',1), \"\\n\";exit;\n\t\t\t\t\tthrow new Exception($err);\n\t\t\t\t}\n\t\t\t\t$width =(int)$width;\n\t\t\t}\n\t\t\telse if (2 === $max) {\n\t\t\t\t$m = $width[0];\n\t\t\t\t$d = $width[1];\n\t\t\t\tif (empty($m) || !is_numeric($m) || empty($d) ||\n\t\t\t\t\t! is_numeric($d)) {\n\t\t\t\t\t$err = \"syntax m,d detected but either m or d or \";\n\t\t\t\t\t$err .= \"both is empty or not an integer\";\n\t\t\t\t\tthrow new Exception($err);\n\t\t\t\t}\n\t\t\t\t$m =(int) $m;\n\t\t\t\t$d =(int) $d;\n\t\t\t\t$width = \"$m,$d\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow new Exception($err);\n\t\t\t}\n\t\t}\n\t\telse if (! is_int($width)) {\n\t\t\tthrow new Exception($err);\n\t\t}\n\n\t\treturn $this->addAttribute('display-width', $width);\n\n }", "public function set_columns($cols) { $this->cols = $cols + 0; }", "function AddCol($field=-1,$width=-1,$align='L')\r\n{\r\n\tif($field==-1)\r\n\t{\r\n\t\t$field=count($this->columnProp);\r\n\t}\r\n\r\n\t$this->columnProp[$field]=array('f'=>$field,'w'=>$width,'a'=>$align);\r\n\t#$this->Write(5, \"Ajout de colonne : \".$field.\"/\".$width.\"/\".$align); $this->Ln();\r\n}", "function setColumnSpacing($spacing = 25)\n {\n $spacing = intval($spacing);\n\n $this->column_spacing = $spacing;\n }", "public function setWidth($width) {\n $this->w = $width;\n }", "public function setWidth($width = 40)\n {\n $this->width = $width;\n $this->setAttributes(\"Width\");\n }", "function NumCols() {}", "public function setColumns(array $columns);", "function AddCol($field=-1,$width=-1,$caption='',$align='')\r\n{\r\n if($field==-1)\r\n $field=count($this->aCols);\r\n $this->aCols[]=array('f'=>$field,'c'=>$caption,'w'=>$width,'a'=>$align);\r\n}", "public function applyWidth() {\n $curTarget = $this->width;\n $start = 0;\n $arrayByLine = array();\n $arrayByLineIndex = 0;\n $arraytoPrint = array();\n $temp = \"\";\n $localArray = $this->originalArray;\n \n for ($i = 0; $i < count($this->originalArray); $i++) {\n \n $val = strlen($temp) + strlen($localArray[$i]) + 1; \n \n if (strlen($temp) + strlen($localArray[$i]) + 1 <= $this->width) {\n if (strlen($temp) == 0) {\n $temp = $temp.$localArray[$i];\n } else {\n $temp = $temp.\" \".$localArray[$i];\n }\n } else {\n\n $arrayByLine[$arrayByLineIndex] = $temp;\n $arrayByLineIndex++;\n $i--;\n $temp = \"\";\n }\n \n if ($i == count($this->originalArray) - 1) {\n $arrayByLine[$arrayByLineIndex] = $temp;\n }\n }\n \n $this->textToPrint = $arrayByLine;\n }", "public function setWidth($width)\r\n {\r\n if (is_numeric($width))\r\n {\r\n $this->width = (int)$width;\r\n }\r\n }", "function make_columns($array = array(), $col_limit = 0)\n\t{\n\t\tif ( ! is_array($array) OR count($array) == 0)\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t// Turn off the auto-heading feature since it's doubtful we\n\t\t// will want headings from a one-dimensional array\n\t\t$this->auto_heading = FALSE;\n\n\t\tif ($col_limit == 0)\n\t\t{\n\t\t\treturn $array;\n\t\t}\n\n\t\t$new = array();\n\t\twhile(count($array) > 0)\n\t\t{\n\t\t\t$temp = array_splice($array, 0, $col_limit);\n\n\t\t\tif (count($temp) < $col_limit)\n\t\t\t{\n\t\t\t\tfor ($i = count($temp); $i < $col_limit; $i++)\n\t\t\t\t{\n\t\t\t\t\t$temp[] = '&nbsp;';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$new[] = $temp;\n\t\t}\n\n\t\treturn $new;\n\t}", "function SetRowWidth()\n\t{\n\t\t// FIX IT!\n\t\t// Defining column widths to be applied to a single row, doesn't currently work.\n\t\t// For some annoying reason you can specify the alignment of columns at the <td></td> level, but if you\n\t\t// specify column widths at this level, they get applied to all the other columns\n\t\t// For now just use the SetRowColumnSpan method, although this means you can't add a row that has more columns than previous rows have had\n\t\t\n\t\tif ((!func_num_args()) || (!isset($this->_intCurrentRow)))\n\t\t{\n\t\t\t// no parameters were passed or there is no current row\n\t\t\treturn NULL;\n\t\t}\n\t\t\n\t\t// retrieve the width values\n\t\t$arrRowWidths = func_get_args();\n\t\t\n\t\t$this->_arrRows[$this->_intCurrentRow]['Widths'] = $arrRowWidths;\n\n\t\treturn $this->_intCurrentRow;\n\t}", "function s_m_put_txt_data_order_columnnames($columnnames, $width, $tablename){\r\n if(count($columnnames) == 0){\r\n echo \"Error, no columnnames in $tablename\";\r\n die();\r\n }\r\n // make columnnames same as rows\r\n $columnnames_new = array();\r\n for($k = 0; $k < count($columnnames); $k++){\r\n $columnnames_new[$k] = $columnnames[$k] . str_repeat(\" \", $width[$k] - strlen($columnnames[$k]));\r\n }\r\n return $columnnames_new;\r\n}", "public function setColumns(array $columns);", "public function setWidth($width) {\n\t\t$width = (int) $width;\n\t\t$this->width = (($width > 0) && ($width <= self::MAX_WIDTH)) ? $width : self::DEFAULT_WIDTH;\n\t}", "public static function getTextWidthArray()\n {\n $ret = [\n '100' => '100%',\n '90' => '90%',\n '80' => '80%',\n '70' => '70%',\n '60' => '60%',\n '50' => '50%',\n '40' => '40%',\n '30' => '30%',\n '20' => '20%',\n ];\n\n return $ret;\n }", "private function addColumnsFromArray($array)\n {\n foreach ($array as $key => $value)\n if (is_int($key))\n $this->addColumn($value);\n else\n $this->addColumn($key, $value);\n }", "public function CalculateStyle()\n {\n #$this->col_right_width = $this->window_width - $this->col_left_width - $this->col_gap_width - (2 * $this->window_padding);\n }", "function gssettings_settings_layout_columns( $columns, $screen ) {\n global $_gssettings_settings_pagehook;\n if ( $screen == $_gssettings_settings_pagehook ) {\n $columns[$_gssettings_settings_pagehook] = 1;\n }\n return $columns;\n }", "function RGC_dashboard_columns() {\n add_screen_option(\n 'layout_columns',\n array(\n 'max' => 1,\n 'default' => 1\n )\n );\n}", "public function setColumns($settings = array())\n {\n if (!$settings) {\n $settings = $this->fields;\n }\n $this->Columns = array();\n foreach ($settings as $column => $options) {\n if (!is_string($column)) {\n $column = $options;\n $options = false;\n }\n if (!isset($options['display'])) {\n $options['display'] = true;\n }\n if (strpos($column, '.') === false && $column != 'actions') {\n $column = sprintf('%s.%s', $this->defaultModel, $column);\n }\n if (!isset($options['type'])) {\n if (isset($options['switch'])) {\n $options['type'] = 'switch';\n } else {\n $options['type'] = 'cell';\n }\n }\n $class = ucfirst($options['type']).'Column';\n $this->Columns[$column] = new $class($this, $column, $options);\n }\n }", "function getMinWidths() {\n\t\t$widths = explode(',', $this->MinWidth);\n\t\tsort($widths);\n\n\t\treturn $widths;\n\t}", "protected function _getWidthArray() {}", "public function setWidth($width)\n {\n $this->width = (int) $width;\n }", "public function setAdvanceWidthMax($value) {}", "public function setWidth($width)\n {\n if (is_numeric($width)) {\n $this->width = \"{$width}px\";\n } else {\n $this->width = $width;\n }\n $this->setAttributes(\"Width\");\n }" ]
[ "0.84666574", "0.8461548", "0.7884374", "0.7204073", "0.7204073", "0.7204073", "0.7203653", "0.70085454", "0.69931114", "0.69743675", "0.69743675", "0.69743675", "0.68887454", "0.68887454", "0.68887454", "0.68887454", "0.68604493", "0.67976296", "0.67976296", "0.67714906", "0.6765843", "0.6765843", "0.6765843", "0.67373884", "0.67373884", "0.67373884", "0.6699792", "0.6699792", "0.667122", "0.6606724", "0.6600243", "0.6587161", "0.65806234", "0.6388972", "0.6340554", "0.62467045", "0.6217904", "0.6217904", "0.621776", "0.6208662", "0.619607", "0.618302", "0.6162067", "0.6124283", "0.6121155", "0.6084431", "0.6081296", "0.6081296", "0.60782033", "0.6030062", "0.6020569", "0.60202503", "0.60026515", "0.5978379", "0.59762853", "0.5936252", "0.5921841", "0.58999527", "0.5849262", "0.5841499", "0.5800299", "0.5788654", "0.5761321", "0.56708896", "0.5659597", "0.56419855", "0.56326824", "0.56224203", "0.5619582", "0.5596997", "0.5577754", "0.5570203", "0.55450886", "0.55400836", "0.5521579", "0.5517345", "0.55000466", "0.5479995", "0.5479913", "0.54773974", "0.5460335", "0.54396", "0.54269916", "0.54105777", "0.53966403", "0.5395189", "0.5387288", "0.53721726", "0.5371911", "0.5358737", "0.53386164", "0.532277", "0.5308229", "0.53073764", "0.52965987", "0.5290583", "0.5277889", "0.5259516", "0.5259296" ]
0.7043035
8
Set the array of column alignments
function SetAligns($a) { $this->aligns=$a; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SetAlignment()\n\t{\n\t\tif (!func_num_args())\n\t\t{\n\t\t\t// No parameters were passed\n\t\t\treturn NULL;\n\t\t}\n\t\t\n\t\t// Store the alignment values\n\t\t$this->_arrAlignments = func_get_args();\n\n\t\treturn $this->_arrAlignments;\n\t}", "function SetAligns($a)\n{\n $this->aligns=$a;\n}", "function SetAligns($a)\n{\n $this->aligns=$a;\n}", "function SetAligns($a)\n{\n $this->aligns=$a;\n}", "function SetAligns($a)\n{\n $this->aligns=$a;\n}", "public function setAlign($align) {}", "function SetAligns($a){\r\n \t$this->aligns=$a;\r\n }", "function SetAligns($a) {\n\t$this->aligns=$a;\n}", "function SetAligns($a)\n{\n\t$this->aligns=$a;\n}", "function SetAligns($a)\n{\n\t$this->aligns=$a;\n}", "function SetAligns($a)\n{\n\t$this->aligns=$a;\n}", "function SetAligns($a){\n\t $this->aligns=$a;\n\t}", "function SetAligns($a)\n {\n $this->aligns=$a;\n }", "function SetAligns($a)\n {\n $this->aligns=$a;\n }", "function SetAligns($a)\n\t{\n\t $this->aligns=$a;\n\t}", "function SetAligns($a)\n\t{\n\t $this->aligns=$a;\n\t}", "function SetRowAlignment()\n\t{\n\t\tif ((!func_num_args()) || (!isset($this->_intCurrentRow)))\n\t\t{\n\t\t\t// no parameters were passed or there is no current row\n\t\t\treturn NULL;\n\t\t}\n\t\t\n\t\t// retrieve the alignment values\n\t\t$arrRowAlignments = func_get_args();\n\t\t\n\t\t$this->_arrRows[$this->_intCurrentRow]['Alignments'] = $arrRowAlignments;\n\n\t\treturn $this->_intCurrentRow;\n\t}", "function SetAligns($a) {\n $this->aligns = $a;\n }", "function SetAligns($a) {\n $this->aligns = $a;\n }", "function SetAligns($a) {\n $this->aligns = $a;\n }", "function SetAligns($a) {\n $this->aligns = $a;\n }", "function SetAligns($a){\n\t\t\t$this->aligns=$a;\n\t\t}", "function SetAligns($a)\n {\n $this->aligns = $a;\n }", "function SetAligns($a)\n {\n $this->aligns = $a;\n }", "function SetAligns($a)\n\t{\n\t\t$this->aligns=$a;\n\t}", "function SetAligns($a)\n\t{\n\t\t$this->aligns=$a;\n\t}", "function SetAligns($a)\n\t{\n\t\t$this->aligns=$a;\n\t}", "function SetAligns($a) {\n\t\t\t$this->aligns=$a;\n\t\t}", "private function _setAlign($value) {\n\t\tswitch(strtolower($value)) {\n\t\t\tcase \"left\" : $this->tableMargin = \"margin-right : auto\" ; break ; // Left\n\t\t\tcase \"center\" : $this->tableMargin = \"margin : 0 auto\" ; break ; // Center\n\t\t\tcase \"right\" : $this->tableMargin = \"margin-left : auto\" ; break ; // Right\n\t\t}\n\t}", "public function SetAligns($a)\n {\n $this->aligns=$a;\n\n }", "function setVerticalAlignment($alignment) {\t \r\n\t \tswitch ($alignment) {\t\t \r\n\t\t default: \t\t \r\n\t\t \t$this->alignment = \"\\vertalt \";\r\n\t\t break;\r\n\t\t \r\n\t\t case 'center':\t\t \t\r\n\t\t \t$this->alignment = \"\\vertalc \";\r\n\t\t break;\r\n\t\t \r\n\t\t case 'bottom':\t\t \t\r\n\t\t \t$this->alignment = \"\\vertalb \";\r\n\t\t break;\t\t \r\n\t\t \r\n\t\t case 'justify':\t\t \t\r\n\t\t \t$this->alignment = \"\\vertalj \";\r\n\t\t break;\r\n\t\t}\r\n\t}", "public function setColumns(array $columns);", "public function setColumnsWidth($array) { \r\n foreach ($array as $elem) {\r\n if ($elem != \"\")\r\n $this->columnsWidth[] = \"style=\\\"width:$elem\\\"\";\r\n else\r\n $this->columnsWidth[] = \"\";\r\n }\r\n }", "public function setColumns(array $columns);", "public function setColumnsWidth($array) { \n foreach ($array as $elem) {\n if ($elem != \"\")\n $this->columnsWidth[] = \"style=\\\"width:$elem\\\"\";\n else\n $this->columnsWidth[] = \"\";\n }\n }", "public function align($align){\n\t\tif($align instanceof \\Traversable)\n\t\t\t$align = iterator_to_array($align);\n\t\telseif(func_num_args() > 1)\n\t\t\t$align = func_get_args();\n\n\t\tif(is_array($align))\n\t\t\tforeach($align as $k => $al)\n\t\t\t\t$this->align[$k] = $al === 'center'\n\t\t\t\t\t? STR_PAD_BOTH : ($al === 'right' ? STR_PAD_LEFT : STR_PAD_RIGHT);\n\t\telse\n\t\t\t$this->align = $align === 'center'\n\t\t\t\t? STR_PAD_BOTH : ($align === 'right' ? STR_PAD_LEFT : STR_PAD_RIGHT);\n\n\t\treturn $this;\n\t}", "function setSpaceBetweenColumns($spaceBetweenColumns) {\t\t\r\n\t\t$this->spaceBetweenColumns = $spaceBetweenColumns;\r\n\t}", "public function getAlign() {}", "public function set(array $cols) : void;", "protected function __rm_align__(){\n\t\t$this->align(\"normal\");\n\t}", "function getAlign() { return $this->_align; }", "public function set_columns($cols) { $this->cols = $cols + 0; }", "function wp_apply_alignment_support($block_type, $block_attributes)\n {\n }", "public function setAlignment($val)\n {\n $this->_propDict[\"alignment\"] = $val;\n return $this;\n }", "function setFields($array)\r\n\t{\r\n\t\t$db = new \\Fmw\\Core\\Db();\r\n\t\t$fields = $db->getColumns($this->getTabName($this->defTab));\r\n\t\tif ($fields) {\r\n\t\t\t$colName = false;\r\n\r\n\t\t\tforeach ($fields as $field) {\r\n\t\t\t\t$colName = $field['Field'];\r\n\r\n\t\t\t\tif (isset($array[$field['Field']])) {\r\n\r\n\t\t\t\t\tif ($field['Type'] == 'text') {\r\n\t\t\t\t\t\tif (isFormatedText($field['Field'])) {\r\n\t\t\t\t\t\t\t$array[$colName] = $array[$colName];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$this->$colName = $array[$colName];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private function setColumns(array $columns)\n {\n $this->columns = $columns;\n }", "function setDefaultAlignment($alignment = 'left') {\r\n\t \tswitch ($alignment) {\r\n\t\t case 'left':\r\n\t\t \t$this->alignment = '\\ql';\r\n\t\t break;\r\n\t\t \r\n\t\t case 'center':\r\n\t\t \t$this->alignment = '\\qc';\r\n\t\t break;\r\n\t\t \r\n\t\t case 'right':\r\n\t\t \t$this->alignment = '\\qr';\r\n\t\t break;\r\n\t\t \r\n\t\t case 'justify':\r\n\t\t \t$this->alignment = '\\qj';\r\n\t\t break;\r\n\t\t}\r\n\t}", "public function setImageAlign($value)\n\t{\n\t\t$this->setViewState('ImageAlign',$value,'');\n\t}", "function align($args) {\r\n\t\t$args['selections'] = array('left'=>'Left','center'=>'Center','right'=>'Right');\r\n\t\t$args['multiple'] = false;\r\n\t\t$args['width'] = '85';\r\n\t\t$args['tooltip'] = 'Choose the alignment';\r\n\t\t$this->select($args) ; \r\n\t}", "#[@fromDia(xpath= 'dia:attribute[@name=\"alignment\"]/dia:enum/@val', value= 'int')]\n public function setAlignment($alignment) {\n $this->setEnum('alignment', $alignment);\n }", "public function setNumAlign($align) {\n\t\t$this->setAlignOption('num_align', $align);\n\t}", "public function setColumnSizes(array $sizes)\n {\n if (count($sizes) && !is_numeric(key($sizes))) {\n $this->columnSizes = $sizes;\n } else {\n reset($sizes);\n $this->columnSizes = [];\n foreach ($this->header as $key => $value) {\n $this->columnSizes[$key] = current($sizes);\n if (next($sizes) === false)\n break;\n }\n }\n }", "public function Align(string $alignment)\n {\n return $this->setOption('a', $alignment);\n }", "function setLineBetweenColumns() {\t \r\n\t \t$this->lineBetweenColumns = true;\t\r\n\t}", "function AddCol($field=-1,$width=-1,$align='L')\r\n{\r\n\tif($field==-1)\r\n\t{\r\n\t\t$field=count($this->columnProp);\r\n\t}\r\n\r\n\t$this->columnProp[$field]=array('f'=>$field,'w'=>$width,'a'=>$align);\r\n\t#$this->Write(5, \"Ajout de colonne : \".$field.\"/\".$width.\"/\".$align); $this->Ln();\r\n}", "public function align($value) {\n return $this->setProperty('align', $value);\n }", "protected function updateColumns($value)\r\n {\r\n if ($this->_orientation == orVertical) \r\n { \r\n if ($value > 0)\r\n $this->_columns = $value;\r\n else\r\n $this->_columns = 1;\r\n }\r\n else\r\n {\r\n $columns = count($this->_items);\r\n \r\n if ($columns > 0)\r\n $this->_columns = $columns;\r\n else\r\n $this->_columns = 1;\r\n }\r\n \r\n }", "function SetWidths($w){\r\n \t//Set the array of column widths\r\n \t$this->widths=$w;\r\n }", "public function getAlignmentAllowableValues()\n {\n return [\n self::ALIGNMENT_LEFT,\n self::ALIGNMENT_RIGHT,\n self::ALIGNMENT_CENTER,\n ];\n }", "protected function _configureColumns()\n {\n if (empty($this->columns)) {\n $this->guessColumns();\n }\n $this->_sourceColumns = $this->columns;;\n\n $columnsByKey = [];\n foreach ($this->columns as $column) {\n $columnKey = $this->_getColumnKey($column);\n for ($j = 0; true; $j++) {\n $suffix = ($j) ? '_' . $j : '';\n $columnKey .= $suffix;\n if (!array_key_exists($columnKey, $columnsByKey)) {\n break;\n }\n }\n $columnsByKey[$columnKey] = $column;\n }\n\n $this->columns = $columnsByKey;\n }", "function setColumnSpacing($spacing = 25)\n {\n $spacing = intval($spacing);\n\n $this->column_spacing = $spacing;\n }", "protected function setUpdateArray() {\n $column_names = getColumnNames($this->table_name);\n foreach ($column_names as $column_name) {\n if (isset($_POST[$column_name])) {\n $this->update[$column_name] = Mysql::SQLValue($_POST[$column_name]);\n } else if (isset($_GET[$column_name])) {\n $this->update[$column_name] = Mysql::SQLValue($_GET[$column_name]);\n }\n }\n }", "function SetRowColumnSpan()\n\t{\n\t\tif ((!func_num_args()) || (!isset($this->_intCurrentRow)))\n\t\t{\n\t\t\t// no parameters were passed or there is no current row\n\t\t\treturn NULL;\n\t\t}\n\t\t\n\t\t// retrieve the width values\n\t\t$arrColSpans = func_get_args();\n\t\t\n\t\t$this->_arrRows[$this->_intCurrentRow]['ColSpans'] = $arrColSpans;\n\n\t\treturn $this->_intCurrentRow;\n\t}", "function &addTable($alignment = 'left') {\t \r\n\r\n\t}", "public function getAlign()\n {\n return $this->align;\n }", "public function setColumns(array $columns): void\n {\n foreach ($columns as $column => [$type, $size]) {\n $this->columns[$column] = [(int)$type, (int)$size];\n }\n }", "public function setHeader($array) {\n $this->colName= $array;\n $this->headerWritten= FALSE;\n }", "function setVerticalAlignment($verticalAlignment = 'top') {\t \r\n\t \tswitch ($verticalAlignment) {\t\t \r\n\t\t case 'top':\t\t\t\r\n\t\t\t\t$this->verticalAlignment = '\\clvertalt ';\t \t\t \r\n\t\t break;\r\n\t\t \r\n\t\t case 'center':\r\n\t\t\t\t$this->verticalAlignment = '\\clvertalc ';\t\t \r\n\t\t break;\r\n\t\t \r\n\t\t case 'bottom':\t\t \r\n\t\t\t\t$this->verticalAlignment = '\\clvertalb ';\r\n\t\t break;\r\n\t\t}\r\n\t}", "public function setColumns()\r\n\t{\r\n\t\t$columns = array_filter($this->getRules(), function($rule) {\r\n\t\t\tif($rule instanceof ColumnInterface) {\r\n\t\t\t\treturn $rule;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t$columns = array_map(function(ColumnInterface $rule) {\r\n\t\t\treturn $rule->getTitle();\r\n\t\t}, $columns);\r\n\r\n\t\t$this->columns = $columns;\r\n\t}", "public function setColumnSizes(array $sizes)\n {\n $this->config->setColumnSizes($sizes);\n }", "private function initColumnArrays()\n {\n foreach ($this->columns as $key => $column) {\n $dql = $this->accessor->getValue($column, 'dql');\n $data = $this->accessor->getValue($column, 'data');\n\n $currentPart = $this->entityShortName;\n $currentAlias = $currentPart;\n $metadata = $this->metadata;\n\n if (true === $this->accessor->getValue($column, 'customDql')) {\n $columnAlias = str_replace('.', '_', $data);\n\n // Select\n $selectDql = preg_replace('/\\{([\\w]+)\\}/', '$1', $dql);\n $this->addSelectColumn(null, $selectDql.' '.$columnAlias);\n // Order on alias column name\n $this->addOrderColumn($column, null, $columnAlias);\n // Fix subqueries alias duplication\n $searchDql = preg_replace('/\\{([\\w]+)\\}/', '$1_search', $dql);\n $this->addSearchColumn($column, null, $searchDql);\n } elseif (true === $this->accessor->getValue($column, 'selectColumn')) {\n $parts = explode('.', $dql);\n\n while (count($parts) > 1) {\n $previousPart = $currentPart;\n $previousAlias = $currentAlias;\n\n $currentPart = array_shift($parts);\n $currentAlias = ($previousPart === $this->entityShortName ? '' : $previousPart.'_').$currentPart;\n\n if (!array_key_exists($previousAlias.'.'.$currentPart, $this->joins)) {\n $this->addJoin($previousAlias.'.'.$currentPart, $currentAlias, $this->accessor->getValue($column, 'joinType'));\n }\n\n $metadata = $this->setIdentifierFromAssociation($currentAlias, $currentPart, $metadata);\n }\n\n $this->addSelectColumn($currentAlias, $this->getIdentifier($metadata));\n $this->addSelectColumn($currentAlias, $parts[0]);\n $this->addSearchOrderColumn($column, $currentAlias, $parts[0]);\n } else {\n // Add Order-Field for VirtualColumn\n if ($this->accessor->isReadable($column, 'orderColumn') && true === $this->accessor->getValue($column, 'orderable')) {\n $orderColumn = $this->accessor->getValue($column, 'orderColumn');\n $orderParts = explode('.', $orderColumn);\n if (count($orderParts) < 2) {\n $orderColumn = $this->entityShortName.'.'.$orderColumn;\n }\n $this->orderColumns[] = $orderColumn;\n } else {\n $this->orderColumns[] = null;\n }\n\n // Add Search-Field for VirtualColumn\n if ($this->accessor->isReadable($column, 'searchColumn') && true === $this->accessor->getValue($column, 'searchable')) {\n $searchColumn = $this->accessor->getValue($column, 'searchColumn');\n $searchParts = explode('.', $searchColumn);\n if (count($searchParts) < 2) {\n $searchColumn = $this->entityShortName.'.'.$searchColumn;\n }\n $this->searchColumns[] = $searchColumn;\n } else {\n $this->searchColumns[] = null;\n }\n }\n }\n\n return $this;\n }", "protected function _setupTableMapperArray()\n\t{\n\t\t$this->tableMapperArray = array();\n\t\t\n\t\t$this->tableMapperArray['property_id'] = 'properties';\n\t\t$this->tableMapperArray['external_property_id'] = 'properties';\n\t\t$this->tableMapperArray['sort_order'] = 'properties';\n\t\t\n\t\t$this->tableMapperArray['name'] = 'properties_description';\n\t\t$this->tableMapperArray['admin_name'] = 'properties_description';\n \n\t\t$this->languageDependentMapperArray = array('properties_description');\n\t}", "public static function getTextHorizontalAlignmentArray()\n {\n $ret = [\n 'left' => 'Left',\n 'center' => 'Center',\n 'right' => 'Right',\n ];\n\n return $ret;\n }", "function SetCol($col)\n{\n $this->col=$col;\n $x=10+$col*65;\n $this->SetLeftMargin($x);\n $this->SetX($x);\n}", "public function textAlignmentProvider()\n {\n return [[\"left\"], [\"center\"], [\"right\"], [\"justified\"], [\"none\"]];\n }", "function MultiAlignCell($w,$h,$text,$border=0,$ln=0,$align='L',$fill=false)\n{\n $x = $this->GetX() + $w;\n $y = $this->GetY();\n\n // Make a call to FPDF's MultiCell\n $this->MultiCell($w,$h,$text,$border,$align,$fill);\n\n // Reset the line position to the right, like in Cell\n if( $ln==0 )\n {\n $this->SetXY($x,$y);\n }\n}", "protected function initializeColumnMapping() {\n\t\t// add always available cols for filemetadata\n\t\tforeach ($this->metaColMapping as $damColName => $metaColName) {\n\t\t\t$this->columnMapping[$damColName] = $metaColName;\n\t\t}\n\n\t\t// add additional cols if ext:for filemetadata is installed\n\t\tif (ExtensionManagementUtility::isLoaded('filemetadata')) {\n\t\t\tforeach ($this->additionalMetaColMapping as $damColName => $metaColName) {\n\t\t\t\t$this->columnMapping[$damColName] = $metaColName;\n\t\t\t}\n\t\t}\n\t}", "public function setColumna($col){\n if($col>3 ){\n $this->columna = 3;\n }\n elseif ($col<0) {\n $this->columna = 0;\n }\n else{\n $this->columna = $col;\n }\n }", "function setMirrorMargins() {\t \r\n\t $this->mirrorMargins = true;\r\n\t}", "public function setUnaltered()\n {\n $this->alteredColumns = [];\n }", "public function setColumns($settings = array())\n {\n if (!$settings) {\n $settings = $this->fields;\n }\n $this->Columns = array();\n foreach ($settings as $column => $options) {\n if (!is_string($column)) {\n $column = $options;\n $options = false;\n }\n if (!isset($options['display'])) {\n $options['display'] = true;\n }\n if (strpos($column, '.') === false && $column != 'actions') {\n $column = sprintf('%s.%s', $this->defaultModel, $column);\n }\n if (!isset($options['type'])) {\n if (isset($options['switch'])) {\n $options['type'] = 'switch';\n } else {\n $options['type'] = 'cell';\n }\n }\n $class = ucfirst($options['type']).'Column';\n $this->Columns[$column] = new $class($this, $column, $options);\n }\n }", "public static function getTextVerticalAlignmentArray()\n {\n $ret = [\n 'align-items: flex-start;' => 'Top',\n 'align-items: center;' => 'Center',\n 'align-items: flex-end;' => 'Bottom',\n ];\n\n return $ret;\n }", "function setMargemEsquerda($iNumCol = 4) {\n\n $sComando = chr(27) . chr(108) . \" $iNumCol\";\n parent::addComando($sComando);\n }", "abstract protected function columns(): array;", "public function __construct(string $align = \"left\")\n {\n $this->align = $align;\n }", "function setCellAttributes(array $values)\n\t{\n\t\t$this->attrs = $values;\n\t\treturn $this;\n\t}", "function setCellAttributes(array $values)\n\t{\n\t\t$this->attrs = $values;\n\t\treturn $this;\n\t}", "public function setTextAlign($textAlign) {\n $this->textAlign = $textAlign;\n }", "public function align($align)\n {\n $this->align = $align;\n\n return $this;\n }", "function AddCol($field=-1,$width=-1,$caption='',$align='')\r\n{\r\n if($field==-1)\r\n $field=count($this->aCols);\r\n $this->aCols[]=array('f'=>$field,'c'=>$caption,'w'=>$width,'a'=>$align);\r\n}", "public function setHorizontalAlign($value)\n\t{\n\t\t$this->getStyle()->setHorizontalAlign($value);\n\t}", "private function _setColumns()\n {\n $this->columns = new Pike_Grid_DataSource_Columns();\n\n foreach ($this->_query->getFields() as $field) {\n $this->columns->add($field, null, $field);\n }\n }", "function set_content_columns($table_name) {\n\t\t\t$this->content_columns = $this->content_columns_all = self::$db->table_info($table_name);\n\t\t\t$table_name_i18n = $table_name.$this->i18n_table_suffix;\n\n\t\t\tif($this->is_i18n && self::$db->table_exists($table_name_i18n)) {\n\t\t\t\t$reserved_columns = $this->i18n_reserved_columns;\n\t\t\t\t$this->content_columns_i18n = $i18n_columns = self::$db->table_info($table_name_i18n);\n\t\t\t\t$this->content_columns_all = array_merge($this->content_columns, $i18n_columns);\n\n\t\t\t\tforeach($i18n_columns as $key => $col) {\n\t\t\t\t\tif(in_array($col['name'], $reserved_columns)) {\n\t\t\t\t\t\tunset($i18n_columns[$key]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->i18n_column_names[] = $col['name'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->i18n_table = $table_name_i18n;\n\t\t\t} else {\n\t\t\t\t$this->is_i18n = false;\n\t\t\t}\n\t\t}", "public function set_button_attrs($button_attrs) {\n\t\tif (is_array($button_attrs)) {\n\t\t\t$this->button_cell_attrs = $button_attrs;\n\t\t}\n\t}", "public function setTablesEditArray() {\r\n if(!isset($this->extendedTables)) {\r\n $this->extendedTables = ['mc_cartpay','mc_cartpay_buyer', 'mc_catalog_product', 'mc_catalog_product_content'];\r\n $this->loadModules();\r\n if(!empty($this->mods)) {\r\n foreach ($this->mods as $mod){\r\n if(method_exists($mod,'extendTablesEditArray')) {\r\n $this->extendedTables = array_merge($this->extendedTables,$mod->extendTablesEditArray());\r\n }\r\n }\r\n }\r\n }\r\n }", "public function setLocation($x, $y, $alignment=Zend_Pdf_Cell::ALIGN_LEFT) {\n\t\t$this->_position=$alignment;\n\t\t$this->_x=$x;\n\t\t$this->_y=$y;\n\t\t\n\t}", "public function columnMaps();", "public function SetCellPadding($pad) {\n\t\t$this->cell_padding['L'] = $pad;\n\t\t$this->cell_padding['T'] = $pad;\n\t\t$this->cell_padding['R'] = $pad;\n\t\t$this->cell_padding['B'] = $pad;\n\t}", "function s_m_put_txt_data_order_columnnames($columnnames, $width, $tablename){\r\n if(count($columnnames) == 0){\r\n echo \"Error, no columnnames in $tablename\";\r\n die();\r\n }\r\n // make columnnames same as rows\r\n $columnnames_new = array();\r\n for($k = 0; $k < count($columnnames); $k++){\r\n $columnnames_new[$k] = $columnnames[$k] . str_repeat(\" \", $width[$k] - strlen($columnnames[$k]));\r\n }\r\n return $columnnames_new;\r\n}" ]
[ "0.646107", "0.643756", "0.643756", "0.643756", "0.643756", "0.631971", "0.62340987", "0.6184184", "0.61625123", "0.61625123", "0.61625123", "0.61168545", "0.60073733", "0.60073733", "0.59812677", "0.59812677", "0.5974367", "0.59457725", "0.59457725", "0.59457725", "0.59457725", "0.59400547", "0.59343576", "0.59343576", "0.59104407", "0.59104407", "0.59104407", "0.58953726", "0.57560176", "0.5610983", "0.5517963", "0.55132663", "0.53523", "0.5350798", "0.53410506", "0.53095305", "0.53088045", "0.52963865", "0.5246552", "0.5246037", "0.5211117", "0.51421183", "0.51393664", "0.5111467", "0.50720674", "0.5036037", "0.5031332", "0.50180686", "0.49988332", "0.4987828", "0.49786076", "0.49603647", "0.4942346", "0.49367377", "0.49147213", "0.4910218", "0.49017686", "0.489958", "0.48974156", "0.4874238", "0.486776", "0.48591304", "0.48462427", "0.4828088", "0.4821872", "0.4816885", "0.47994292", "0.47899005", "0.47876775", "0.4769768", "0.47544405", "0.47440642", "0.47397873", "0.47312966", "0.4710393", "0.47023138", "0.46954104", "0.46809596", "0.4679167", "0.46270594", "0.4602992", "0.4601182", "0.45992658", "0.45957518", "0.45928642", "0.4579631", "0.4579631", "0.45749694", "0.4573485", "0.4570067", "0.4569924", "0.45533085", "0.45528337", "0.45496148", "0.45459482", "0.45423472", "0.4534597", "0.45305055", "0.4523048" ]
0.6225126
8
If the height h would cause an overflow, add a new page immediately
function CheckPageBreak($h) { if($this->GetY()+$h>$this->PageBreakTrigger) $this->AddPage($this->CurOrientation); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function CheckPageBreak($h) {\n if ($this->GetY() + $h > $this->PageBreakTrigger)\n $this->AddPage($this->CurOrientation);\n }", "function CheckPageBreak($h) {\n if ($this->GetY() + $h > $this->PageBreakTrigger)\n $this->AddPage($this->CurOrientation);\n }", "function CheckPageBreak($h) {\n if ($this->GetY() + $h > $this->PageBreakTrigger)\n $this->AddPage($this->CurOrientation);\n }", "function CheckPageBreak($h) {\n if ($this->GetY() + $h > $this->PageBreakTrigger)\n $this->AddPage($this->CurOrientation);\n }", "function CheckPageBreak($h)\n {\n if ($this->GetY() + $h > $this->PageBreakTrigger)\n $this->AddPage($this->CurOrientation);\n }", "function CheckPageBreak($h)\n {\n if ($this->GetY() + $h > $this->PageBreakTrigger)\n $this->AddPage($this->CurOrientation);\n }", "function CheckPageBreak($h){\n\t\t\tif($this->GetY()+$h>$this->PageBreakTrigger)\n\t\t\t\t$this->AddPage($this->CurOrientation);\n\t\t}", "function CheckPageBreak($h)\n {\n if($this->GetY()+$h>$this->PageBreakTrigger)\n $this->AddPage($this->CurOrientation);\n }", "function CheckPageBreak($h)\n{\n if($this->GetY()+$h>$this->PageBreakTrigger)\n $this->AddPage($this->CurOrientation);\n}", "function CheckPageBreak($h)\n{\n if($this->GetY()+$h>$this->PageBreakTrigger)\n $this->AddPage($this->CurOrientation);\n}", "function CheckPageBreak($h)\n{\n if($this->GetY()+$h>$this->PageBreakTrigger)\n $this->AddPage($this->CurOrientation);\n}", "function CheckPageBreak($h)\n{\n if($this->GetY()+$h>$this->PageBreakTrigger)\n $this->AddPage($this->CurOrientation);\n}", "function CheckPageBreak($h)\n {\n if($this->GetY()+$h>$this->PageBreakTrigger)\n $this->AddPage($this->CurOrientation);\n }", "function CheckPageBreak($h){\r\n \tif($this->GetY()+$h>$this->PageBreakTrigger)\r\n \t\t$this->AddPage($this->CurOrientation);\r\n }", "function CheckPageBreak($h){\n\t if($this->GetY()+$h>$this->PageBreakTrigger)\n\t $this->AddPage($this->CurOrientation);\n\t}", "public function CheckPageBreak($h){\n if($this->GetY()+$h>$this->PageBreakTrigger)\n $this->AddPage($this->CurOrientation);\n\n }", "function CheckPageBreak($h) {\n\t\t\tif($this->GetY()+$h>$this->PageBreakTrigger)\n\t\t\t\t$this->AddPage($this->CurOrientation);\n\t\t}", "function CheckPageBreak($h)\n{\n\tif($this->GetY()+$h>$this->PageBreakTrigger)\n\t\t$this->AddPage($this->CurOrientation);\n}", "function CheckPageBreak($h)\n{\n\tif($this->GetY()+$h>$this->PageBreakTrigger)\n\t\t$this->AddPage($this->CurOrientation);\n}", "function CheckPageBreak($h)\n{\n\tif($this->GetY()+$h>$this->PageBreakTrigger)\n\t\t$this->AddPage($this->CurOrientation);\n}", "function CheckPageBreak($h)\n\t{\n\t\tif($this->GetY()+$h>$this->PageBreakTrigger)\n\t\t\t$this->AddPage($this->CurOrientation);\n\t}", "function CheckPageBreak($h)\n\t{\n\t\tif($this->GetY()+$h>$this->PageBreakTrigger)\n\t\t\t$this->AddPage($this->CurOrientation);\n\t}", "function CheckPageBreak($h)\n\t{\n\t if($this->GetY()+$h>$this->PageBreakTrigger)\n\t $this->AddPage($this->CurOrientation);\n\t}", "function CheckPageBreak($h)\n\t{\n\t if($this->GetY()+$h>$this->PageBreakTrigger)\n\t $this->AddPage($this->CurOrientation);\n\t}", "function CheckPageBreak1($h)\r\n{\r\n if($this->GetY()+$h>$this->PageBreakTrigger)\r\n $this->AddPage($this->CurOrientation);\r\n}", "function CheckPageBreak($h)\r\n {\r\n if($this->GetY()+$h>$this->PageBreakTrigger) {\r\n $this->AddPage();\r\n $this->Row(array('Směr','Pořad. č. / JID','Datum doručení / Datum vytvoření','Odesílatel/Adresát','Čj. odesilatele','Stručný obsah dokumentu (věc)','Spis.uzel / Zpracovatel','Spis','Způsob vyřízení',\r\n 'Počet listů','Počet příloh a druh','Spis. znak a skart. režim','JID vypravení','Datum vypravení','Spisovna / Vyřazení', 'Poznámka'));\r\n }\r\n }", "function CheckPageBreak($h)\n\t{\n\t\tif($this->GetY()+$h>$this->PageBreakTrigger){\n\t\t\t$this->AddPage($this->CurOrientation);\n\t\t\t$this->SetAutoPageBreak(true,60);\n\t\t\t$this->AliasNbPages();\n\t\t\t$left = 25;\n\t\t\t\n\t\t\t//header\n\n\t\t\t$this->SetFont(\"\", \"B\", 9);\n\t\t\t$this->Cell(0, 12, 'TIRTA INDRA KENCANA');$this->SetX(-100);\n\t\t\t$this->Cell(0, 12, 'Tanggal',0,0,'',true);$this->SetX(-60);\n\t\t\t$this->Cell(5, 12, ':',0,0,'',true);$this->SetX(-50);\n\t\t\t$this->Cell(10, 12, '11/02/2015',0,1,'',true);\n\t\t\t$this->SetFont(\"\", \"B\", 9);\n\t\t\t$this->Cell(0, 12, 'JAKARTA');$this->SetX(-100);\n\t\t\t$this->Cell(0, 12, 'Jam',0,0,'',true);$this->SetX(-60);\n\t\t\t$this->Cell(5, 12, ':',0,0,'',true);$this->SetX(-50);\n\t\t\t$this->Cell(10, 12, '16:45:23',0,1,'',true);$this->SetX(-100);\n\t\t\t$this->Cell(0, 12, 'Halaman',0,0,'',true);$this->SetX(-60);\n\t\t\t$this->Cell(5, 12, ':',0,0,'',true);$this->SetX(-50);\n\t\t\t$this->Cell(10, 12, $this->PageNo(),0,1,'',true);\n\t\t\t$this->Cell(10, 12, $this->total,0,1,'',true);\n\t\t\t$this->Cell(0, 1, \" \", \"B\");\n\t\t\t$this->Ln(10);\n\t\t\t$this->SetFont(\"\", \"B\", 9);\n\t\t\t$this->SetX($left); $this->Cell(0, 10, 'TAGIHAN UNTUK TANDA TERIMA No : 1501177', 0, 1,'C');\n\t\t\t$this->Ln(5);\n\t\t\t$this->SetX($left); $this->Cell(0, 10, 'Nama Barang', 0, 0,'L');\n\t\t\t$this->SetX($left+65); $this->Cell(5, 10, ':', 0, 0,'L');\n\t\t\t$this->SetX($left+80); $this->Cell(30, 10, 'JAGUNG LOUIS DREYFUS', 0, 1,'L');\n\t\t\t$this->SetX($left); $this->Cell(0, 10, 'No P/O', 0, 0,'L');\n\t\t\t$this->SetX($left+65); $this->Cell(5, 10, ':', 0, 0,'L');\n\t\t\t$this->SetX($left+80); $this->Cell(30, 10, '1711060051', 0, 1,'L');\n\t\t\t$this->SetX($left); $this->Cell(0, 10, 'EX Kapal', 0, 0,'L');\n\t\t\t$this->SetX($left+65); $this->Cell(5, 10, ':', 0, 0,'L');\n\t\t\t$this->SetX($left+80); $this->Cell(30, 10, 'GALAXY(PANAMAX)', 0, 1,'L');\n\t\t\t$this->SetX($left); $this->Cell(0, 10, 'Dari', 0, 0,'L');\n\t\t\t$this->SetX($left+65); $this->Cell(5, 10, ':', 0, 0,'L');\n\t\t\t$this->SetX($left+80); $this->Cell(30, 10, 'KAPAL DICIGADING', 0, 1,'L');\n\t\t\t$this->SetX($left); $this->Cell(0, 10, 'Tujuan', 0, 0,'L');\n\t\t\t$this->SetX($left+65); $this->Cell(5, 10, ':', 0, 0,'L');\n\t\t\t$this->SetX($left+80); $this->Cell(30, 10, 'PT. CPI BALARAJA - SHIPMENT(1)', 0, 1,'L');\n\t\t\t$this->SetX($left); $this->Cell(0, 10, 'Angkutan', 0, 0,'L');\n\t\t\t$this->SetX($left+65); $this->Cell(5, 10, ':', 0, 0,'L');\n\t\t\t$this->SetX($left+80); $this->Cell(30, 10, 'PJP', 0, 1,'L');\t\t\t$this->Ln(10);\n\t\t$h = 13;\n\t\t$left = 40;\n\t\t$top = 80;\t\n\t\t#tableheader\n\t\t//$this->SetFillColor(200,200,200);\t\n\t\t$this->SetFillColor(255);\n\t\t$left = $this->GetX();\n\t\t$this->Cell(30,$h+23,'NO',1,0,'L',true);\n\t\t$this->SetX($left += 20); $this->Cell(75, $h+23, 'No S.J.', 1, 0, 'C',true);\n\t\t$this->SetX($left += 75); $this->Cell(50, $h+23, 'Tanggal', 1, 0, 'C',true);\n\t\t$this->SetX($left += 50); $this->Cell(50, $h+23, 'No Polisi', 1, 0, 'C',true);\n\t\t$this->SetX($left += 50); $this->Cell(100, $h+23, 'Nama Sopir', 1, 0, 'C',true);\n\t\t$this->SetX($left += 100); $this->Cell(80, $h+10, 'PENGIRIMAN', 1, 0, 'C',true);\n\t\t$this->SetX($left += 80); $this->Cell(80, $h+10, 'PENERIMAAN', 1, 0, 'C',true);\n\t\t$this->SetX($left += 80); $this->Cell(80, $h+10, 'SELISIH', 1, 1, 'C',true);\n\n\t\t$h = 13;\n\t\t$left = 40;\n\n\t\t#tableheader\n\t\t$this->SetFillColor(255);\n\t\t//$this->SetFillColor(200,200,200);\t\n\t\t$left = $this->GetX();\n\t\t//$this->Cell(20,$h,'NO',1,0,'L',true);\n\t\t$this->SetX($left += 20);// $this->Cell(75, $h, '', 1, 0, 'C',true);\n\t\t$this->SetX($left += 75); //$this->Cell(100, $h, 'NAMA', 1, 0, 'C',true);\n\t\t$this->SetX($left += 50); //$this->Cell(150, $h, 'ALAMAT', 1, 0, 'C',true);\n\t\t$this->SetX($left += 50); //$this->Cell(100, $h, 'EMAIL', 1, 0, 'C',true);\n\t\t$this->SetX($left += 100); $this->Cell(30, $h, 'Bag', 1, 0, 'C',true);\n\t\t$this->SetX($left += 30); $this->Cell(50, $h, 'Quantity', 1, 0, 'C',true);\n\t\t$this->SetX($left += 50); $this->Cell(30, $h, 'Bag', 1, 0, 'C',true);\n\t\t$this->SetX($left += 30); $this->Cell(50, $h, 'Quantity', 1, 0, 'C',true);\n\t\t$this->SetX($left += 50); $this->Cell(30, $h, 'Bag', 1, 0, 'C',true);\n\t\t$this->SetX($left += 30); $this->Cell(50, $h, 'Quantity', 1, 1, 'C',true);\n\t\t$this->SetFont('Arial','',8);\n\t\t$this->SetWidths(array(20,75,50,50,100,30,50,30,50,30,50));\n\t\t$this->SetAligns(array('C','C','C','L','L','C','R','C','R','C','R'));\n\t\t$no = 1; $this->SetFillColor(255);\t\t\t\n\t\t}\n\t}", "function CheckPageBreak($h)\n {\n if($this->GetY()+$h>$this->PageBreakTrigger) {\n $this->AddPage($this->CurOrientation);\n $this->SetFont('Arial','B',8);\n \n $this->Cell(20,5,'USERID','LTRB',0,'C',0);\n $this->Cell(60,5,'NAME','LTRB',0,'C',0);\n $this->Cell(25,5,'DATE','LTRB',0,'C',0);\n $this->Cell(20,5,'WEEKDAY','LTRB',0,'C',0);\n $this->Cell(30,5,'IN','LTRB',0,'C',0);\n $this->Cell(30,5,'OUT','LTRB',0,'C',0);\n\n $this->Ln();\n \n }\n }", "public function newPage($width = 0, $height = 0, $optlist = null);", "private function nextPage() {\n $this->lastPage = array(\n \"vOffset\" => $this->vOffset,\n \"hOffset\" => $this->hOffset,\n );\n $footerToAppend = false;\n $this->currentPageNumber++;\n if (isset($this->pages[$this->currentPageNumber])) {\n $this->currentPage = $this->pages[$this->currentPageNumber];\n $this->vOffset = $this->currentFontSize;\n $this->hOffset = 0;\n } else {\n $this->pages[$this->currentPageNumber] = $this->haruDoc->addPage();\n $this->currentPage = $this->pages[$this->currentPageNumber];\n $this->currentPage->setTextRenderingMode(\\HaruPage::FILL);\n $this->vOffset = $this->currentFontSize;\n $this->hOffset = ($this->hOffset ? $this->hOffset : 0);\n $footerToAppend = true;\n }\n if ($this->currentFont && $this->currentFontSize && $this->currentFontColor) {\n $this->currentPage->setFontAndSize($this->currentFont, $this->currentFontSize);\n $this->setColor($this->currentFontColor[0], $this->currentFontColor[1], $this->currentFontColor[2]);\n }\n if ($footerToAppend && $this->currentPageNumber > 1) {\n $this->currentPage->beginText();\n $this->setFont(self::FONT_NORMAL, 12, array(0,0,0));\n $this->currentPage->textOut($this->PAGE_WIDTH - self::HMARGIN - $this->currentPage->getTextWidth($this->currentPageNumber),\n self::VMARGIN - 30, $this->currentPageNumber);\n $this->revertFont();\n $this->setFont(self::FONT_BOLD, 12, array(0,0,0));\n $this->currentPage->textOut(self::HMARGIN,\n self::VMARGIN - 30, $this->currentBookName);\n $this->revertFont();\n $this->currentPage->endText();\n\n }\n\n }", "function CheckPageBreak($h,$pru)\r\n{\r\n if($this->GetY()+$h>$this->PageBreakTrigger){\r\n $this->AddPage($this->CurOrientation);\r\n\t\t\t\t$x=$this->GetX();\r\n\t\t$this->SetX($pru);\r\n\t\t}\r\n}", "protected function needsNewPage()\n {\n return $this->getY() >= $this->layout['pageMaxY'];\n }", "function NewPage()\n {\n $ypos = $this->GetY();\n if ($ypos > 230){\n $this->AddPage();\n }\n }", "public function ee_breakouts_page_load() {}", "protected function build_page() {\n\t\t\n\t\treturn false;\n\t}", "function\tpunchTable( $_lastLine=false) {\n\t\t$frm\t=\t$this->myDoc->currMasterPage->getFrameByFlowName( \"Auto\") ;\n\t\tfor ( $actRow=$this->myTable->getFirstRow( BRow::RTDataIT) ; $actRow !== FALSE ; $actRow=$this->myTable->getNextRow()) {\n\t\t\tif ( $actRow->isEnabled()) {\n\t\t\t\t$this->punchTableRow( $actRow) ;\n\t\t\t}\n\t\t}\n\t\t$frm->currVerPos\t+=\t1.5 ;\t\t// now add the height of everythign we have output'\n\n\t\t/**\n\t\t * if there's less than 20 mm on this page\n\t\t *\tgoto next page\n\t\t */\n\t\t$remHeight\t=\t$frm->remHeight() ;\n\t\tif ( $remHeight < mmToPt( $this->saveZone) && !$_lastLine) {\n\t\t\t$this->tableFoot() ;\n\t\t\t$this->myDoc->newPage() ;\n\t\t\t$this->tableHead() ;\n\t\t}\n\t}", "function newPage()\n {\n $this->lastPageNumber ++;\n if ($this->lastPageNumber != 1)\n $this->documentBuffer .= \"<br clear=\\\"all\\\" style=\\\"page-break-before: always;\\\">\";\n return $this->lastPageNumber;\n }", "public function drawPage()\n\t\t{\n\t\t}", "abstract protected function view_generatePageContent();", "public function prePageContent();", "protected function newPage()\n {\n $this->addPage();\n $this->variables['page'] = $this->pageNo();\n if ($this->templatePages > 0) {\n $templateIndex = $this->importPage(min($this->pageNo(), $this->templatePages));\n $this->useImportedPage($templateIndex);\n }\n\n $this->setXY($this->layout['pageNoX'], $this->layout['pageNoY']);\n $this->write(5, $this->t('page'));\n $this->setY($this->layout['contentMarginTopPX']);\n }", "function ins_pagebreak()\n\t{\n\t\t// Create the view\n\t\t$view = & $this->getView( 'article', 'html' );\n\n\t\t// Set the layout\n\t\t$view->setLayout( 'pagebreak' );\n\n\t\t// Display the view\n\t\t$view->display();\n\n\t}", "private function buildPage() {\n ob_clean();\n ob_start();\n\n //session_start();\n require_once $this->_template;\n\n $this->_page = ob_get_clean();\n }", "function startPage($size=null, $style = null, $last = false) {\n $str = \"<div style='position:relative;\";\n if(!$last) {\n $str .= \"page-break-after:always;\";\n }\n if(!is_null($size)) {\n switch($size['Size']) {\n case \"8.5x11\":\n $str.= \"width:8.5in;height:11in;\";\n break;\n case \"11x8.5\":\n $str.= \"width:11in;height:8.5;\";\n break;\n case \"8.5x14\":\n $str.= \"width:8.5in;height:14in;\";\n break;\n case \"14:8.5\":\n $str.= \"width:14in;height:8.5in;\";\n break;\n default:\n $str.=(\"width:\".$size['Width'].\"in;height:\".$size['Height'].\"in;\");\n break;\n }\n } \n $str.=\"'>\";\n $str.=\"<div class='pageBuffer'><div class='pageContents' \"; \n //render page style here\n if(!is_null($style)) {\n $str .= \"style='\".$this->renderStyle($style).\"' \";\n }\n $str.=\"><span class='pageFix'>\";\n return $str;\n }", "private function warmUp()\r\n\t{\r\n\t\t$this->loadPage( 1 );\r\n }", "function morepagestable($datas,$lineheight=8) {\n $l = $this->lMargin;\n $startheight = $h = $this->GetY();\n $startpage = $currpage = $this->page;\n // calculate the whole width\n foreach($this->tablewidths AS $width) {\n $fullwidth += $width;\n }\n $this->SetFont('Arial','',6);\n // Now let's start to write the table\n foreach($datas AS $row => $data) {\n $this->page = $currpage;\n // write the horizontal borders\n $this->Line($l,$h,$fullwidth+$l,$h);\n // write the content and remember the height of the highest col\n $posicion = 0;\n $fil=0;\n foreach($data AS $col => $txt) {\n \tif($posicion == 0 AND strpos($txt,\".\")===false){\n \t\t$fil=1;\n \t}\n \t\n \t$posicion++;\n \t$this->SetFillColor(60,100,200);\n \t$this->SetTextColor(0,0,0);\n $this->page = $currpage;\n $this->SetXY($l,$h);\n $this->MultiCell($this->tablewidths[$col],$lineheight,$txt,0,1,$fil);\n $l += $this->tablewidths[$col];\n\t\t\t$this->SetFillColor(0,0,0);\n if($tmpheight[$row.'-'.$this->page] < $this->GetY()) {\n $tmpheight[$row.'-'.$this->page] = $this->GetY();\n }\n if($this->page > $maxpage)\n $maxpage = $this->page;\n }\n\n // get the height we were in the last used page\n $h = $tmpheight[$row.'-'.$maxpage];\n // set the \"pointer\" to the left margin\n $l = $this->lMargin;\n // set the $currpage to the last page\n $currpage = $maxpage;\n }\n // draw the borders\n // we start adding a horizontal line on the last page\n $this->page = $maxpage;\n $this->Line($l,$h,$fullwidth+$l,$h);\n // now we start at the top of the document and walk down\n for($i = $startpage; $i <= $maxpage; $i++) {\n $this->page = $i;\n $l = $this->lMargin;\n $t = ($i == $startpage) ? $startheight : $this->tMargin+140;\n $lh = ($i == $maxpage) ? $h : $this->h-$this->bMargin;\n $this->Line($l,$t,$l,$lh);\n foreach($this->tablewidths AS $width) {\n $l += $width;\n $this->Line($l,$t,$l,$lh);\n }\n }\n // set it to the last page, if not it'll cause some problems\n $this->page = $maxpage;\n}", "abstract protected function render_page_content(): void;", "public function pre_close_body($h)\n {\n \n }", "public function addPage()\n {\n $placements = array(\n array('id' => 'ads.leftbar.banner', 'name' => $this->translate->translate('Left Side')),\n array('id' => 'ads.rightbar.banner', 'name' => $this->translate->translate('Right Side'))\n );\n $this->putitem(\"placements\", $placements);\n\n $view_types = array(\n array('id' => 'serial', 'name' => 'Serial'),\n array('id' => 'carrousel', 'name' => 'Carroussel')\n );\n $this->putitem(\"view_types\", $view_types);\n\n parent::addPage();\n }", "public function addPageBreak() {\n\t\t$this->_elementCollection[] = new PHPWord_Section_PageBreak();\n\t}", "public function writePage()\n\t{\n\t\t$this->SetHeaderMargin(5);\n\t\t$this->SetFooterMargin(30);\n if($this->PageNo() > 1) {\n } else {\n }\n\t\t$this->AddPage('','',true);\n// $t = $this->getCellMargins();\n// var_dump($t);\n $this->setCellPaddings(0,0,0,0);\n\n\t\t$this->writeHTML($this->content, true, false, true, false, '');\n\t}", "static public function createPages() {\n\t\treturn false;\n\t}", "public function createContentAndCopyLivePage() {}", "function AddPage($orientation=''){\n\t\t\tif($this->state==0) $this->Open();\n\t\t\t$family=$this->FontFamily;\n\t\t\t$style=$this->FontStyle.($this->underline ? 'U' : '');\n\t\t\t$size=$this->FontSizePt;\n\t\t\t$lw=$this->LineWidth;\n\t\t\t$dc=$this->DrawColor;\n\t\t\t$fc=$this->FillColor;\n\t\t\t$tc=$this->TextColor;\n\t\t\t$cf=$this->ColorFlag;\n\t\t\tif($this->page>0)\n\t\t\t{\n\t\t\t\t//Page footer\n\t\t\t\t$this->InFooter=true;\n\t\t\t\t$this->Footer();\n\t\t\t\t$this->InFooter=false;\n\t\t\t\t//Close page\n\t\t\t\t$this->_endpage();\n\t\t\t}\n\t\t\t//Start new page\n\t\t\t$this->_beginpage($orientation);\n\t\t\t//Set line cap style to square\n\t\t\t$this->_out('2 J');\n\t\t\t//Set line width\n\t\t\t$this->LineWidth=$lw;\n\t\t\t$this->_out(sprintf('%.2f w',$lw*$this->k));\n\t\t\t//Set font\n\t\t\tif($family)\t$this->SetFont($family,$style,$size);\n\t\t\t//Set colors\n\t\t\t$this->DrawColor=$dc;\n\t\t\tif($dc!='0 G') $this->_out($dc);\n\t\t\t$this->FillColor=$fc;\n\t\t\tif($fc!='0 g') $this->_out($fc);\n\t\t\t$this->TextColor=$tc;\n\t\t\t$this->ColorFlag=$cf;\n\t\t\t//Page header\n\t\t\t$this->Header();\n\t\t\t//Restore line width\n\t\t\tif($this->LineWidth!=$lw)\n\t\t\t{\n\t\t\t\t$this->LineWidth=$lw;\n\t\t\t\t$this->_out(sprintf('%.2f w',$lw*$this->k));\n\t\t\t}\n\t\t\t//Restore font\n\t\t\tif($family)\t$this->SetFont($family,$style,$size);\n\t\t\t//Restore colors\n\t\t\tif($this->DrawColor!=$dc)\n\t\t\t{\n\t\t\t\t$this->DrawColor=$dc;\n\t\t\t\t$this->_out($dc);\n\t\t\t}\n\t\t\tif($this->FillColor!=$fc)\n\t\t\t{\n\t\t\t\t$this->FillColor=$fc;\n\t\t\t\t$this->_out($fc);\n\t\t\t}\n\t\t\t$this->TextColor=$tc;\n\t\t\t$this->ColorFlag=$cf;\n\t\t}", "public function AcceptPageBreak() {\r\n\t\t$this->pagina_nueva = true;\r\n\t return false;\r\n\t}", "function finalizeBottomHTML() {\n\t\t$returnVal = \"\";\n\t\t$returnVal .= \"</div>\\n\"; // Closes Container\n\t\t$returnVal .= \"</body>\\n\";\n\t\t$returnVal .= \"</html>\\n\";\n\t\t$this->_bottomHTML = $returnVal;\n\t}", "function thumbwhere_host_add_page() {\n $controller = entity_ui_controller('thumbwhere_host');\n return $controller->addPage();\n}", "public function createPage()\n {\n $this->currentPage++;\n $this->currentIndex++;\n $this->resetProps();\n /* Create page */\n if ($this->landscape) {\n // A4 format in Landscape orientation\n $this->pdf->begin_page_ext(0, 0, \"width=a4.height height=a4.width\");\n } else {\n // A4 format in Portrait orientation3.\n $this->pdf->begin_page_ext(0, 0, \"width=a4.width height=a4.height\");\n }\n empty($this->createPageTrigger) || call_user_func_array($this->createPageTrigger, $this->createPageTriggerArgs);\n }", "public function createPageAndCopyLiveParentPage() {}", "public function addFooter(){\n\n$this->page .= <<<EOD\n<pre>\n$this->title\n</pre>\n</body>\n</html>\nEOD;\n}", "function quasar_after_page_content(){\n\tglobal $rockthemes_advanced_post_details;\n\t\n\t//Clear any uncleared float\n\techo '<div class=\"clear\"></div>';\n\t\t\n\tif((isset($rockthemes_advanced_post_details['activate_space_under_menu']))){\n\t\tif($rockthemes_advanced_post_details['activate_space_under_menu'] === 'true'){\n\t\t\t//Add extra vertical spacing\n\t\t\techo '<div class=\"vertical-space\"></div>';\n\t\t}\n\t}elseif(!xr_get_option('disable_space_under_header', false)){\n\t\t//Add extra vertical spacing\n\t\techo '<div class=\"vertical-space\"></div>';\n\t}\n\t\n\t//Add an empty div for footer to close. This way both Quasar and 3rd party pages will stay in layout.\n\techo '<div>';\n}", "private function pagProbleem()\n\t{\n\t\t$pageOutput = $this->menu();\n\t\t$pageOutput.= $this->div('open', 'id=\"inhoud\"');\n\t\t$pageOutput.= $this->h1('full', '', 'Er is iets misgelopen!');\n\t\t$pageOutput.= $this->div('close');\n\t\treturn $pageOutput;\n\t}", "function appendPage($pageName, $newPageBody)\n{\n $newPageBody = trim($newPageBody);\n $sFile = getPagePath($pageName);\n if($newPageBody != \"\")\n {\n $f = fopen($sFile, \"at\");\n fwrite($f, \"\\n\\n\\n\\n\");\n fwrite($f, $newPageBody);\n fclose($f);\n }\n else\n {\n @unlink($sFile);\n }\n}", "public function startNewPage()\n {\n }", "abstract function render_page();", "function insertPage()\n\t{\n\t\tglobal $ilCtrl, $lng;\n\t\t\n\t\tinclude_once(\"./Modules/LearningModule/classes/class.ilChapterHierarchyFormGUI.php\");\n\t\t\n\t\t$num = ilChapterHierarchyFormGUI::getPostMulti();\n\t\t$node_id = ilChapterHierarchyFormGUI::getPostNodeId();\n\t\t\n\t\tif (!ilChapterHierarchyFormGUI::getPostFirstChild())\t// insert after node id\n\t\t{\n\t\t\t$parent_id = $this->tree->getParentId($node_id);\n\t\t\t$target = $node_id;\n\t\t}\n\t\telse\t\t\t\t\t\t\t\t\t\t\t\t\t// insert as first child\n\t\t{\n\t\t\t$parent_id = $node_id;\n\t\t\t$target = IL_FIRST_NODE;\n\t\t}\n\n\t\tfor ($i = 1; $i <= $num; $i++)\n\t\t{\n\t\t\t$page = new ilLMPageObject($this->content_object);\n\t\t\t$page->setType(\"pg\");\n\t\t\t$page->setTitle($lng->txt(\"cont_new_page\"));\n\t\t\t$page->setLMId($this->content_object->getId());\n\t\t\t$page->create();\n\t\t\tilLMObject::putInTree($page, $parent_id, $target);\n\t\t}\n\n\t\t$ilCtrl->redirect($this, \"showHierarchy\");\n\t}", "function createPage();", "function output_page($title, $body, $return_value = false) {\n\n // Draw the page\n $output = view('page/shell', array(\n 'title' => $title,\n 'body' => $body\n )\n );\n\n if (!$return_value) {\n // Break long output to avoid a php performance bug\t\t\t\t\t\t\t\n $split_output = str_split($output, 1024);\n\n foreach ($split_output as $chunk)\n echo $chunk;\n }\n else\n return $output;\n}", "function wisdom() {\r\n $this->data['pagebody'] = 'justone';\r\n \r\n $source = $this->quotes->get(6);\r\n \r\n $this->data = array_merge($this->data, $source);\r\n \r\n $this->render();\r\n }", "function get(){\n\t$temp = $this->page;\n\t$this->addFooter();\n\t//restore the page for next call for\n\t$page= $this->page;\n\t$this->page = $temp;\n\n return $this->page;\n}", "function get_html_pre_page_end();", "public function endPage() {}", "protected function fixPage(): void\n {\n if (null !== $this->total) {\n $this->page = \\min($this->page, $this->getLastPage());\n }\n }", "function newPage($pdf) {\r\n global $OrderId, $currentRow, $itemRowStart;\r\n\r\n $currentRow = $itemRowStart;\r\n\r\n $pdf->Addpage();\r\n $pdf->SetFont('Helvetica', 'B', 16);\r\n $pdf->Image('blissLogo.png');\r\n $pdf->Text(20, 43, \"OrderId:\");\r\n $pdf->Text(43, 43, $OrderId);\r\n $pdf->SetFont('Arial', 'I', 10);\r\n $pdf->SetY(266.5);\r\n $pdf->Cell(0, 10, 'Page ' . $pdf->PageNo(), 0, 0, 'C');\r\n $pdf->line( 12,245,190,245);\r\n$pdf->line( 12,267,190,267);\r\n\r\n \r\n}", "function addPage()\n {\n // Reuse the atkAddHandler for the addPage.\n $handler = atknew(\"atk.handlers.atkaddhandler\");\n $handler->setNode($this->m_node);\n return $handler->invoke(\"addPage\");\n }", "function\temptyTableRow ( $_height) {\n\n\t\t$frm\t=\t$this->myDoc->currMasterPage->getFrameByFlowName( \"Auto\") ;\n\n\t\t/**\n\t\t *\n\t\t */\n\t\t$frm->currVerPos\t+=\tmmToPt( $_height) ;\t\t// now add the height of everythign we have output'\n\t}", "private function generateFoot(){\n echo '</div>';\n echo '</div>';\n }", "function udesign_page_content_bottom() {\r\n do_action('udesign_page_content_bottom');\r\n}", "public function adminBodyEnd(): void {\n global $url;\n global $security;\n global $media_admin;\n global $media_manager;\n\n // Check if `new-content` or `edit-content` page is shown\n $page = explode(\"/\", $url->slug())[0];\n if($page === \"new-content\" || $page === \"edit-content\") {\n $this->adminContentArea(); return;\n } else if($media_admin->view !== \"media\" || $media_admin->method !== \"index\") {\n return;\n }\n\n // Get Content\n $content = ob_get_contents();\n ob_end_clean();\n\n // Prepare Query\n if(($absolute = MediaManager::absolute($_GET[\"path\"] ?? DS)) === null) {\n $absolute = PATH_UPLOADS_PAGES;\n $relative = DS;\n } else {\n $relative = MediaManager::relative($absolute);\n }\n if(isset($_GET[\"file\"]) && ($file = MediaManager::absolute($absolute . DS . $_GET[\"file\"])) === null) {\n unset($file);\n }\n\n // Load Admin Page\n ob_start();\n if(isset($file)) {\n include \"admin\" . DS . \"file.php\";\n } else {\n include \"admin\" . DS . \"list.php\";\n }\n\n // Load Modals\n \trequire \"admin\" . DS . \"modal-folder.php\";\n if(PAW_MEDIA_PLUS) {\n require \"admin\" . DS . \"modal-search.php\";\n }\n\n // Get Content\n $add = ob_get_contents();\n ob_end_clean();\n\n // Inject Admin Page\n $regexp = \"/(\\<div class=\\\"col-lg-10 pt-3 pb-1 h-100\\\"\\>)(.*?)(\\<\\/div\\>)/s\";\n $content = preg_replace($regexp, \"$1{$add}$3\", $content);\n print($content);\n }", "function bethel_add_image_to_pages() {\n\tglobal $post;\n\tif ($post) {\n\t\t$image_id = get_post_thumbnail_id ($post->ID);\n\t\tif ($image_id) {\n\t\t\tif ($post->post_type != 'bethel_stories' && $post->page_template != 'stories.php') {\n\t\t\t\t$image = wp_get_attachment_image_src($image_id, 'bethel_supersize');\n\t\t\t\tif ($image) {\n\t\t\t\t\tif ($image[1] < 800) { //width\n\t\t\t\t\t\t$image[2] = round($image [2] / $image[1] * 800);\n\t\t\t\t\t}\n\t\t\t\t\t$image[2] = ($image[2] > 400) ? 400 : $image[2]; //height\n\t\t\t\t\techo \"<style type=\\\"text/css\\\">.entry-header { height: {$image[2]}px; background-image: url('{$image[0]}')}</style>\";\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\techo \"<style type=\\\"text/css\\\">\n .content .entry-header { margin-top: 75px; margin-top: 7.5rem }\n .content .entry-content { padding-top: 25px; padding-top: 2.5rem; }\n </style>\";\n\t\t}\n\t}\n}", "function AddCustomPage($orientation='', $size='')\n {\n if($this->state==0)\n $this->Open();\n $family = $this->FontFamily;\n $style = $this->FontStyle.($this->underline ? 'U' : '');\n $fontsize = $this->FontSizePt;\n $lw = $this->LineWidth;\n $dc = $this->DrawColor;\n $fc = $this->FillColor;\n $tc = $this->TextColor;\n $cf = $this->ColorFlag;\n if($this->page>0)\n {\n // Page footer\n $this->InFooter = true;\n $this->Footer();\n $this->InFooter = false;\n // Close page\n $this->_endpage();\n }\n // Start new page\n $this->_beginpage($orientation,$size);\n // Set line cap style to square\n $this->_out('2 J');\n // Set line width\n $this->LineWidth = $lw;\n $this->_out(sprintf('%.2F w',$lw*$this->k));\n // Set font\n if($family)\n $this->SetFont($family,$style,$fontsize);\n // Set colors\n $this->DrawColor = $dc;\n if($dc!='0 G')\n $this->_out($dc);\n $this->FillColor = $fc;\n if($fc!='0 g')\n $this->_out($fc);\n $this->TextColor = $tc;\n $this->ColorFlag = $cf;\n // Page header\n $this->InHeader = true;\n $this->CustomHeader();\n $this->InHeader = false;\n // Restore line width\n if($this->LineWidth!=$lw)\n {\n $this->LineWidth = $lw;\n $this->_out(sprintf('%.2F w',$lw*$this->k));\n }\n // Restore font\n if($family)\n $this->SetFont($family,$style,$fontsize);\n // Restore colors\n if($this->DrawColor!=$dc)\n {\n $this->DrawColor = $dc;\n $this->_out($dc);\n }\n if($this->FillColor!=$fc)\n {\n $this->FillColor = $fc;\n $this->_out($fc);\n }\n $this->TextColor = $tc;\n $this->ColorFlag = $cf;\n }", "public function initCursedPage() {\n parent::setMedia();\n parent::initHeader();\n parent::initContent();\n parent::initFooter();\n parent::display();\n die();\n }", "public function makePage()\n {\n $db = new DB();\n $page_color = !empty($db->getOptions('page_color')) ? 'style=\"background-color:' . $db->getOptions('page_color') . ';\"' : '';\n $footer_color = !empty($db->getOptions('footer_color')) ? 'style=\"background-color:' . $db->getOptions('footer_color') . ';\"' : '';\n echo '<!DOCTYPE html>\n<html lang=\"en\">\n<head>';\n\n $this->makeMeta();\n $this->setTitle();\n $this->makeStyles();\n $this->makeHeaderScripts();\n echo '<!-- header code -->' . PHP_EOL;\n if (!empty($this->getHeaderCode())) {\n echo $this->getHeaderCode() . PHP_EOL;\n }\n echo '<!-- header code -->' . PHP_EOL;\n echo '</head>\n\n\t\t<body class=\"' . $this->getbodyClass() . '\" ' . $page_color . '>';\n\n echo '<div class=\"main-wrapper\" >';\n if ($this->hasHeader) {\n echo '<header class=\"header\" >';\n if ($this->hasNavbar) {\n require_once 'Navbar.php';\n }\n echo '</header>';\n }\n\n\n//--main content---\n if ($this->hasBreadcrumb) {\n $routes = explode(\"/\", $_SERVER['REQUEST_URI']);\n echo '\n<div class=\"breadcrumb-bar d-print-none\" ' . $footer_color . '>\n\t\t\t\t<div class=\"container-fluid\">\n\t\t\t\t\t<div class=\"row align-items-center\">\n\t\t\t\t\t\t<div class=\"col-md-12 col-12\">\n\t\t\t\t\t\t\t<nav aria-label=\"breadcrumb\" class=\"page-breadcrumb\">\n\t\t\t\t\t\t\t\t<ol class=\"breadcrumb\">\n\t\t\t\t\t\t\t\t\t<li class=\"breadcrumb-item\"><a href=\"' . BASE_PATH . $routes[1] . '/\"><i class=\"bx bx-home-alt\"></i></a></li>';\n\n for ($i = 1; $i < count($routes) - 1; $i++) {\n if ($i != count($routes) - 1) {\n echo '<li class=\"breadcrumb-item\"><a href=\"' . BASE_PATH . $routes[1] . '/' . $routes[$i] . '/\">' . $routes[$i] . '</a></li>';\n } else {\n echo '<li class=\"breadcrumb-item active\">' . $routes[$i] . '</li>';\n }\n }\n echo '\n\t\t\t\t\t\t\t\t</ol>\n\t\t\t\t\t\t\t</nav>\n\t\t\t\t\t\t\t<h2 class=\"breadcrumb-title\">' . $this->getPageTitle() . '</h2>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>';\n }\n echo '<div class=\"content\">';\n echo '<div class=\"container-fluid\">';\n if ($this->isHasContent()) {\n $this->addPageContent($this->getPageContent());\n }\n\n echo '</div></div>';\n\n echo '<!-- above footer code -->' . PHP_EOL;\n\n /*--footer---*/\n if ($this->hasFooter) {\n require_once 'footer.php';\n }\n echo '</div>';\n $this->makeScripts();\n $this->makeFooterScripts();\n if ($this->ishasError()) {\n $this->showPageError();\n }\n\n echo '<!-- footer code -->' . PHP_EOL;\n if (!empty($this->getFooterCode())) {\n echo $this->getFooterCode() . PHP_EOL;\n }\n echo '<!-- footer code -->' . PHP_EOL;\n echo '</body>\n</html>';\n }", "function vgt_ui_create_squeeze_page()\r\n\t\t{?>\r\n\t\t\t\r\n\t\t\t<div id=\"main_container\">\r\n\t\t\t\t<div id=\"left_panel\">\r\n\t\t\t\t<?php echo vgt_activation_reminder();?>\r\n <?php //@vgt_func_get_list_data(); ?>\r\n\r\n\t\t\t\t<div id=\"site_info\">\r\n\t\t\t\t\t<input type=\"text\" name=\"title\" class=\"form-control\" id=\"page_title\" placeholder=\"Set page's title (required)\" />\r\n\r\n\t\t\t\t</div>\r\n\t\r\n\t\r\n\t\t\t\t</div>\r\n\t\t\t\t\r\n\t\t\t\t<div id=\"site_area\">\r\n\t\t\t\t</div>\r\n\t\t\t\t<div style=\"clear:both;\"></div>\r\n\t\t\t\t\r\n\t\t\t</div>\r\n\t\t\t<div id=\"vgt_gallery\" class=\"vgt_gallery\">\r\n\t\t\t\t<!-- Place to put themes thumnails -->\r\n\t\t\t\t<div id=\"nooptin_gallery\">\r\n\t\t\t\t\t<?php vgt_wpl_load_themes(\"nooptin\", \"squeeze\"); ?>\r\n\t\t\t\t</div>\r\n\t\t\t\t\r\n\t\t\t\t<div id=\"optin_gallery\">\r\n\t\t\t\t\t<?php vgt_wpl_load_themes(\"optin\", \"squeeze\"); ?>\r\n\t\t\t\t</div>\r\n\t\t\t\t\r\n\t\t\t</div>\r\n\r\n\r\n\t\t\t\r\n\t\t\t<!-- Get the footer panel -->\t\t\r\n\t\t\t<div id=\"insert_code\">\r\n\t\t\t\t<?php include_once 'code/editcode.txt'; include_once 'code/common.txt'; ?>\r\n\t\t\t\t\r\n\t\t\t</div>\r\n\t\t\t\r\n\t\t<?php }", "function wp_head() {\n\t\tif ( IOS7_Safari_Height_Scroll_Fix::is_required() ) {\n\t\t\t?>\n<!--\nFix for iPad iOS7 slight scroll on 100% body height\nhttp://stackoverflow.com/questions/19012135/ios-7-ipad-safari-landscape-innerheight-outerheight-layout-issue\n-->\n<script>if (navigator.userAgent.match(/iPad;.*CPU.*OS 7_\\d/i)) { jQuery('html').addClass('ipad ios7'); }</script>\n<style>@media (orientation:landscape) { html.ipad.ios7 > body { position: fixed; bottom: 0; width: 100%; height: 672px !important; } }</style>\n\t\t\t<?php\n\t\t}\n\t}", "public function setHeight($height) {}", "private function AddNewPage(){\n try{\n // Updated Time\n $this -> _data['UpdatedTime'] = $GLOBALS['_NOW_'] -> clockDateTime;\n // Encrypt Password\n if (!empty($this -> _data['password'])){\n if ($this -> _data['password'] == \"^Delete\"){\n $this -> _data['password'] = \"\";\n }else{\n $this -> _data['password'] = $GLOBALS['_Security'] -> HashKey($this -> _data['password']);\n $this -> _data['password'] = $GLOBALS['_Security'] -> HashEncryptedWithSalt($this -> _data['password']);\n }\n }\n $this -> db -> Insert('Function', $this -> _data, \"SELECT `FunctionName` FROM `Function` WHERE (`PageUrl` = :pageUrl OR `PageUrl` = :PageUrlIndex)\", \n array(\n \":pageUrl\" => $this -> _data['pageUrl'],\n \":PageUrlIndex\" => $this -> _data['pageUrl'].'/index'\n )\n );\n\n $lastId = $this -> db -> lastInsertId();\n\n $this -> db -> CreateObjectAcl('Function', $lastId, Cores\\_Session::Get('loggedUser') -> id);\n return true;\n }catch (\\Exception $e){\n return $e -> getMessage();\n }\n \n }", "public function addPage() {\n $item = menu_get_item();\n $content = system_admin_menu_block($item);\n\n if (count($content) == 1) {\n $item = array_shift($content);\n drupal_goto($item['href']);\n }\n\n return theme('thumbwhere_host_add_list', array('content' => $content));\n }", "function render_page_container_end()\n\t\t{\n\t\t\t$output = '</div>'; \n\t\t\treturn $output;\n\t\t}", "public function pages_with_bhl()\n {\n if(isset($this->pages_with_bhl)) return $this->pages_with_bhl;\n $this->pages_with_bhl = 0;\n \n $result = $this->mysqli_slave->query(\"SELECT COUNT(DISTINCT(tc.id)) count FROM taxon_concepts tc JOIN taxon_concept_names tcn ON (tc.id=tcn.taxon_concept_id) JOIN page_names pn ON (tcn.name_id=pn.name_id) WHERE tc.published=1 AND tc.supercedure_id=0\");\n if($result && $row=$result->fetch_assoc()) $this->pages_with_bhl = $row['count'];\n return $this->pages_with_bhl;\n }", "function AcceptPageBreak()\n{\n if($this->col<2)\n {\n //Go to next column\n $this->SetCol($this->col+1);\n //Set ordinate to top\n $this->SetY($this->y0);\n //Keep on page\n return false;\n }\n else\n {\n //Go back to first column\n $this->SetCol(0);\n //Page break\n return true;\n }\n}", "function set_height($height) {\n $this->height = $height;\n }", "public function setHeight($height);", "public function setHeight($height);", "static public function page_scrolling() {\n ?>\n\n /**\n * Déclenchement d'événements Google analytics lors du scroll de la page\n *\n * source https://growthrocks.com/blog/scroll-tracking-google-analytics/\n */\n var maxp = 0;\n $d.on('scroll',function(){\n var h = document.documentElement,\n b = document.body,\n st = 'scrollTop',\n sh = 'scrollHeight',\n percent = parseInt ( (h[st] || b[st]) / ((h[sh] || b[sh]) - h.clientHeight) * 100 ),\n // Accès au nom du type de post courant au travers d'une variable \n // globale passée par wp_localize_script\n cpn = sfp_dynamic_external_js.cpn;\n\n // On ne traite que les page de contenu\n if('' === cpn)\n return;\n\n if ( percent >= 25 && maxp < 25 ) {\n console.log('SFP: Scroll de 25%');\n if(typeof gtag=='function'){\n gtag( 'event', 'Scroll de + de 25%', {\n 'event_category' : 'Scroll '+cpn,\n 'event_label' : window.location.href,\n 'non_interaction': true\n });\n }\n }\n else if ( percent >= 50 && maxp < 50 ) {\n console.log('SFP: Scroll de 50%');\n if(typeof gtag=='function'){\n gtag( 'event', 'Scroll de + de 50%', {\n 'event_category' : 'Scroll '+cpn,\n 'event_label' : window.location.href,\n 'non_interaction': true\n });\n }\n }\n else if ( percent >= 75 && maxp < 75 ) {\n console.log('SFP: Scroll de 75%');\n if(typeof gtag=='function'){\n gtag( 'event', 'Scroll de + de 75%', {\n 'event_category' : 'Scroll '+cpn,\n 'event_label' : window.location.href,\n 'non_interaction': true\n });\n }\n }\n else if ( percent >= 90 && maxp < 90 ) {\n console.log('SFP: Scroll de 90%');\n if(typeof gtag=='function'){\n gtag( 'event', 'Scroll de + de 90%', {\n 'event_category' : 'Scroll '+cpn,\n 'event_label' : window.location.href\n });\n }\n }\n\n if ( percent > maxp ) {\n maxp = percent;\n }\n });\n\n <?php\n }", "public function getPageLayout() {}", "public function nextPage($width,$lang,$nextcell,$headertext,$headeralign) {\n\n\t// include text translations\n\tinclude('fixed.php');\n\tinclude('data.php'); // Load Testing Data\n\n\t// Check Amount of Space Left on Page\n\tif ($this->GetY() + $nextcell > 276)\n\t\t{\n\n\t\t// Write Continued on Next Page\n \t$this->SetX(12);\n\t\t$this->MultiCell(array_sum($width), 0, $formatting[$lang]['next_page'], 'T', 'L', 0, 0, '', '', true);\n\n\t\t// Create New Page\n\t\t$this->AddPage('P','A4');\n\t\t$this->Ln(1.2);\n\t\n\t\t// Add Header if Necessary\n\t\tif (isset($headertext)) {\n\t\n\t\t\t$this->TableHeader($headertext, $headeralign, $width, 12);\n\n\t\t}\n\t}\n\n\treturn;\n\n}", "public function add_page() {\n\t\t$icon = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjE4cHgiIGhlaWdodD0iNjE4cHgiIHZpZXdCb3g9IjAgMCA2MTggNjE4IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPgogICAgPGcgaWQ9IlBhZ2UtMSIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPHBhdGggZD0iTTMwOSwwIEM0NzkuNjU2NDk1LDAgNjE4LDEzOC4zNDQyOTMgNjE4LDMwOS4wMDE3NTkgQzYxOCw0NzkuNjU5MjI2IDQ3OS42NTY0OTUsNjE4IDMwOSw2MTggQzEzOC4zNDM1MDUsNjE4IDAsNDc5LjY1OTIyNiAwLDMwOS4wMDE3NTkgQzAsMTM4LjM0NDI5MyAxMzguMzQzNTA1LDAgMzA5LDAgWiBNMTc0LDE3MSBMMTc0LDI2Mi42NzEzNTYgTDE3NS4zMDUsMjY0IEwxNzQsMjY0IEwxNzQsNDQ2IEwyNDEsNDQ2IEwyNDEsMzMwLjkxMyBMMzUzLjk5Mjk2Miw0NDYgTDQ0NCw0NDYgTDE3NCwxNzEgWiBNNDQ0LDI5OSBMMzg5LDI5OSBMNDEwLjQ3NzYxLDMyMSBMNDQ0LDMyMSBMNDQ0LDI5OSBaIE00NDQsMjM1IEwzMjcsMjM1IEwzNDguMjQ1OTE5LDI1NyBMNDQ0LDI1NyBMNDQ0LDIzNSBaIE00NDQsMTcxIEwyNjQsMTcxIEwyODUuMjkwNTEyLDE5MyBMNDQ0LDE5MyBMNDQ0LDE3MSBaIiBpZD0iQ29tYmluZWQtU2hhcGUiIGZpbGw9IiMyQTdERTEiPjwvcGF0aD4KICAgIDwvZz4KPC9zdmc+';\n\t\tadd_menu_page(\n\t\t\t$this->get_name(),\n\t\t\t$this->get_name(),\n\t\t\t$this->capability,\n\t\t\t$this->slug,\n\t\t\t[ $this, 'render_screen' ],\n\t\t\t$icon,\n\t\t\t3\n\t\t);\n\t}", "function writePage($text) {\n //TODO: Write the text to the page.\n return 1;\n }" ]
[ "0.63094914", "0.63094914", "0.63094914", "0.63094914", "0.6265578", "0.6265578", "0.6193789", "0.6178936", "0.61739904", "0.61739904", "0.61739904", "0.61739904", "0.6171177", "0.61668706", "0.6158568", "0.6145702", "0.6143539", "0.61062163", "0.61062163", "0.61062163", "0.6092248", "0.6092248", "0.607645", "0.607645", "0.6062509", "0.58159244", "0.5791974", "0.5710391", "0.5704118", "0.5686041", "0.5623379", "0.5598923", "0.5573989", "0.5436645", "0.53972864", "0.53784496", "0.5372933", "0.5290135", "0.5239303", "0.5167907", "0.51189595", "0.5101241", "0.5099186", "0.50365746", "0.5006309", "0.4994727", "0.49697423", "0.49639305", "0.49546462", "0.49216342", "0.49198103", "0.4916326", "0.49157766", "0.48861697", "0.4857584", "0.48384076", "0.4832486", "0.48108417", "0.47768083", "0.47697932", "0.4758473", "0.47561452", "0.47557938", "0.4754403", "0.4747359", "0.4742687", "0.47395378", "0.47240606", "0.47046524", "0.47044587", "0.4699523", "0.4689676", "0.46892053", "0.46819875", "0.46751183", "0.4674566", "0.4671352", "0.46701252", "0.46634778", "0.46482658", "0.46322724", "0.46190426", "0.46185857", "0.46179676", "0.46053338", "0.45983723", "0.45939928", "0.45823738", "0.45809364", "0.45762393", "0.45702797", "0.45399138", "0.4538849", "0.4538849", "0.452508", "0.45197338", "0.4519647", "0.45087612", "0.4504025" ]
0.6149417
16
Computes the number of lines a MultiCell of width w will take
function NbLines($w,$txt) { $cw=&$this->CurrentFont['cw']; if($w==0) $w=$this->w-$this->rMargin-$this->x; $wmax=($w-2*$this->cMargin)*1000/$this->FontSize; $s=str_replace("\r",'',$txt); $nb=strlen($s); if($nb>0 and $s[$nb-1]=="\n") $nb--; $sep=-1; $i=0; $j=0; $l=0; $nl=1; while($i<$nb) { $c=$s[$i]; if($c=="\n") { $i++; $sep=-1; $j=$i; $l=0; $nl++; continue; } if($c==' ') $sep=$i; $l+=$cw[$c]; if($l>$wmax) { if($sep==-1) { if($i==$j) $i++; } else $i=$sep+1; $sep=-1; $j=$i; $l=0; $nl++; } else $i++; } return $nl; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _countLine($w,$txt){\r\n//! @return int\r\n //Computes the number of lines a MultiCell of width w will take\r\n $cw=&$this->CurrentFont['cw'];\r\n if($w==0) $w=$this->w-$this->rMargin-$this->x;\r\n $wmax=($w-2*$this->cMargin)*1000/$this->FontSize;\r\n $s=str_replace(\"\\r\",'',$txt);\r\n $nb=strlen($s);\r\n if($nb>0 and $s[$nb-1]==\"\\n\") $nb--;\r\n $sep=-1;\r\n $i=$j=$l=0;\r\n $nl=1;\r\n while($i<$nb){\r\n $c=$s[$i];\r\n if($c==\"\\n\"){\r\n $i++;\r\n $sep=-1;\r\n $j=$i;\r\n $l=0;\r\n $nl++;\r\n continue;\r\n }\r\n if($c==' ') $sep=$i;\r\n $l+=$cw[$c];\r\n if($l>$wmax){\r\n if($sep==-1){\r\n if($i==$j) $i++;\r\n }\r\n else $i=$sep+1;\r\n $sep=-1;\r\n $j=$i;\r\n $l=0;\r\n $nl++;\r\n }\r\n else $i++;\r\n\t }\r\n\t return $nl;\r\n}", "public function numberRows($width,string $text):int\n {\n //Computes the MultiCell lines number\n $cw= $this->CurrentFont['cw'];\n if($width==0)\n $width=$this->width-$this->rMargin-$this->x;\n $wmax=($width-2*$this->cMargin)*1000/$this->FontSize;\n $s=str_replace(\"\\r\",'',$text);\n $nb=strlen($s);\n if($nb>0 and $s[$nb-1]==\"\\n\")\n $nb--;\n $sep=-1;\n $i=0;\n $j=0;\n $l=0;\n $linesNumber=1;\n while($i<$nb)\n {\n $c=$s[$i];\n if($c==\"\\n\")\n {\n $i++;\n $sep=-1;\n $j=$i;\n $l=0;\n $linesNumber++;\n continue;\n }\n if($c==' ')\n $sep=$i;\n $l+=$cw[$c];\n if($l>$wmax)\n {\n if($sep==-1)\n {\n if($i==$j)\n $i++;\n }\n else\n $i=$sep+1;\n $sep=-1;\n $j=$i;\n $l=0;\n $linesNumber++;\n }\n else\n $i++;\n }\n return $linesNumber;\n }", "public function getLinesCount();", "function NumRows() {}", "function CellCount() {\n return $this->rows[$this->LastRow]->CellCount();\n }", "public function getCellCount(): int {\n return $this->cellCountY * $this->cellCountX;\n }", "private function getCellLen(array $cells): int\n {\n $total = 0;\n foreach ($cells as $cell) {\n foreach ($cell->childNodes as $tc) {\n if ($tc->nodeName == 'w:tcPr') {\n foreach ($tc->childNodes as $span) {\n if ($span->nodeName == 'w:gridSpan') {\n $total += intval($span->getAttribute('w:val'));\n break;\n }\n }\n break;\n }\n }\n }\n return $total + 1;\n }", "public function numLines()\n {\n if($this->state['numlines']) {\n return $this->state['numlines'];\n } else {\n $numRows = self::numRowsInFile($this->vars['ifn']);\n if($numRows < 100){\n $numRows = self::numRowsInFileAccurate($this->vars['ifn'],$this->vars['delimiter'], $this->vars['quotechar'], $this->vars['escapechar']);\n }\n $this->state['numlines'] = $numRows;\n return $this->state['numlines'];\n }\n }", "public function getRowsSize();", "abstract public function NumRows();", "function RowCount() {}", "public function countLines();", "function NbLines($w, $txt) {\n $cw = &$this->CurrentFont['cw'];\n if ($w == 0)\n $w = $this->w - $this->rMargin - $this->x;\n $wmax = ($w - 2 * $this->cMargin) * 1000 / $this->FontSize;\n $s = str_replace(\"\\r\", '', $txt);\n $nb = strlen($s);\n if ($nb > 0 and $s[$nb - 1] == \"\\n\")\n $nb--;\n $sep = -1;\n $i = 0;\n $j = 0;\n $l = 0;\n $nl = 1;\n while ($i < $nb) {\n $c = $s[$i];\n if ($c == \"\\n\") {\n $i++;\n $sep = -1;\n $j = $i;\n $l = 0;\n $nl++;\n continue;\n }\n if ($c == ' ')\n $sep = $i;\n $l += $cw[$c];\n if ($l > $wmax) {\n if ($sep == -1) {\n if ($i == $j)\n $i++;\n } else\n $i = $sep + 1;\n $sep = -1;\n $j = $i;\n $l = 0;\n $nl++;\n } else\n $i++;\n }\n return $nl;\n }", "function NbLines($w, $txt)\n {\n $cw = &$this->CurrentFont['cw'];\n if ($w == 0)\n $w = $this->w - $this->rMargin - $this->x;\n $wmax = ($w - 2 * $this->cMargin) * 1000 / $this->FontSize;\n $s = str_replace(\"\\r\", '', $txt);\n $nb = strlen($s);\n if ($nb > 0 and $s[$nb - 1] == \"\\n\")\n $nb--;\n $sep = -1;\n $i = 0;\n $j = 0;\n $l = 0;\n $nl = 1;\n while ($i < $nb) {\n $c = $s[$i];\n if ($c == \"\\n\") {\n $i++;\n $sep = -1;\n $j = $i;\n $l = 0;\n $nl++;\n continue;\n }\n if ($c == ' ')\n $sep = $i;\n $l += $cw[$c];\n if ($l > $wmax) {\n if ($sep == -1) {\n if ($i == $j)\n $i++;\n } else\n $i = $sep + 1;\n $sep = -1;\n $j = $i;\n $l = 0;\n $nl++;\n } else\n $i++;\n }\n return $nl;\n }", "function NbLines($w, $txt)\n {\n $cw = &$this->CurrentFont['cw'];\n if ($w == 0)\n $w = $this->w - $this->rMargin - $this->x;\n $wmax = ($w - 2 * $this->cMargin) * 1000 / $this->FontSize;\n $s = str_replace(\"\\r\", '', $txt);\n $nb = strlen($s);\n if ($nb > 0 and $s[$nb - 1] == \"\\n\")\n $nb--;\n $sep = -1;\n $i = 0;\n $j = 0;\n $l = 0;\n $nl = 1;\n while ($i < $nb) {\n $c = $s[$i];\n if ($c == \"\\n\") {\n $i++;\n $sep = -1;\n $j = $i;\n $l = 0;\n $nl++;\n continue;\n }\n if ($c == ' ')\n $sep = $i;\n $l += $cw[$c];\n if ($l > $wmax) {\n if ($sep == -1) {\n if ($i == $j)\n $i++;\n } else\n $i = $sep + 1;\n $sep = -1;\n $j = $i;\n $l = 0;\n $nl++;\n } else\n $i++;\n }\n return $nl;\n }", "function NbLines($w, $txt) {\n $cw = &$this->CurrentFont['cw'];\n if ($w == 0)\n $w = $this->w - $this->rMargin - $this->x;\n $wmax = ($w - 2 * $this->cMargin) * 1000 / $this->FontSize;\n $s = str_replace(\"\\r\", '', $txt);\n $nb = strlen($s);\n if ($nb > 0 and $s[$nb - 1] == \"\\n\")\n $nb--;\n $sep = -1;\n $i = 0;\n $j = 0;\n $l = 0;\n $nl = 1;\n while ($i < $nb) {\n $c = $s[$i];\n if ($c == \"\\n\") {\n $i++;\n $sep = -1;\n $j = $i;\n $l = 0;\n $nl++;\n continue;\n }\n if ($c == ' ')\n $sep = $i;\n $l+=$cw[$c];\n if ($l > $wmax) {\n if ($sep == -1) {\n if ($i == $j)\n $i++;\n } else\n $i = $sep + 1;\n $sep = -1;\n $j = $i;\n $l = 0;\n $nl++;\n } else\n $i++;\n }\n return $nl;\n }", "function NbLines($w, $txt) {\n $cw = &$this->CurrentFont['cw'];\n if ($w == 0)\n $w = $this->w - $this->rMargin - $this->x;\n $wmax = ($w - 2 * $this->cMargin) * 1000 / $this->FontSize;\n $s = str_replace(\"\\r\", '', $txt);\n $nb = strlen($s);\n if ($nb > 0 and $s[$nb - 1] == \"\\n\")\n $nb--;\n $sep = -1;\n $i = 0;\n $j = 0;\n $l = 0;\n $nl = 1;\n while ($i < $nb) {\n $c = $s[$i];\n if ($c == \"\\n\") {\n $i++;\n $sep = -1;\n $j = $i;\n $l = 0;\n $nl++;\n continue;\n }\n if ($c == ' ')\n $sep = $i;\n $l+=$cw[$c];\n if ($l > $wmax) {\n if ($sep == -1) {\n if ($i == $j)\n $i++;\n } else\n $i = $sep + 1;\n $sep = -1;\n $j = $i;\n $l = 0;\n $nl++;\n } else\n $i++;\n }\n return $nl;\n }", "function NbLines($w, $txt) {\n $cw = &$this->CurrentFont['cw'];\n if ($w == 0)\n $w = $this->w - $this->rMargin - $this->x;\n $wmax = ($w - 2 * $this->cMargin) * 1000 / $this->FontSize;\n $s = str_replace(\"\\r\", '', $txt);\n $nb = strlen($s);\n if ($nb > 0 and $s[$nb - 1] == \"\\n\")\n $nb--;\n $sep = -1;\n $i = 0;\n $j = 0;\n $l = 0;\n $nl = 1;\n while ($i < $nb) {\n $c = $s[$i];\n if ($c == \"\\n\") {\n $i++;\n $sep = -1;\n $j = $i;\n $l = 0;\n $nl++;\n continue;\n }\n if ($c == ' ')\n $sep = $i;\n $l+=$cw[$c];\n if ($l > $wmax) {\n if ($sep == -1) {\n if ($i == $j)\n $i++;\n } else\n $i = $sep + 1;\n $sep = -1;\n $j = $i;\n $l = 0;\n $nl++;\n } else\n $i++;\n }\n return $nl;\n }", "function NbLines($w, $txt)\n {\n $cw=&$this->CurrentFont['cw'];\n if($w==0)\n $w=$this->w-$this->rMargin-$this->x;\n $wmax=($w-2*$this->cMargin)*1000/$this->FontSize;\n $s=str_replace(\"\\r\", '', $txt);\n $nb=strlen($s);\n if($nb>0 and $s[$nb-1]==\"\\n\")\n $nb--;\n $sep=-1;\n $i=0;\n $j=0;\n $l=0;\n $nl=1;\n while($i<$nb)\n {\n $c=$s[$i];\n if($c==\"\\n\")\n {\n $i++;\n $sep=-1;\n $j=$i;\n $l=0;\n $nl++;\n continue;\n }\n if($c==' ')\n $sep=$i;\n $l+=$cw[$c];\n if($l>$wmax)\n {\n if($sep==-1)\n {\n if($i==$j)\n $i++;\n }\n else\n $i=$sep+1;\n $sep=-1;\n $j=$i;\n $l=0;\n $nl++;\n }\n else\n $i++;\n }\n return $nl;\n }", "public function nbRows();", "function NbLines($w,$txt)\n\t{\n\t $cw=&$this->CurrentFont['cw'];\n\t if($w==0)\n\t $w=$this->w-$this->rMargin-$this->x;\n\t\t$wmax=($w-2*$this->cMargin)*1000/$this->FontSize;\n \t $s=str_replace(\"\\r\",'',$txt);\n\t $nb=strlen($s);\n\t if($nb>0 and $s[$nb-1]==\"\\n\")\n \t$nb--;\n\t\t$sep=-1;\n \t\t$i=0;\n \t\t$j=0;\n \t\t$l=0;\n \t\t$nl=1;\n \n\t\twhile($i<$nb){\n\t\t $c=$s[$i];\n\t if($c==\"\\n\"){\n\t $i++;\n\t $sep=-1;\n\t $j=$i;\n\t $l=0;\n\t $nl++;\n\t continue;\n\t }\n\n\t if($c==' ')\n\t $sep=$i;\n \t $l+=$cw[$c];\n\t if($l>$wmax){\n\t if($sep==-1){\n if($i==$j)\n $i++;\n \t}\n else\n $i=$sep+1;\n\t $sep=-1;\n \t$j=$i;\n \t$l=0;\n \t$nl++;\n\t }\n\t else\n\t \t$i++;\n\t }\n\t return $nl;\n\t}", "function NbLines($w,$txt)\n{\n $cw=&$this->CurrentFont['cw'];\n if($w==0)\n $w=$this->w-$this->rMargin-$this->x;\n $wmax=($w-2*$this->cMargin)*1000/$this->FontSize;\n $s=str_replace(\"\\r\",'',$txt);\n $nb=strlen($s);\n if($nb>0 and $s[$nb-1]==\"\\n\")\n $nb--;\n $sep=-1;\n $i=0;\n $j=0;\n $l=0;\n $nl=1;\n while($i<$nb)\n {\n $c=$s[$i];\n if($c==\"\\n\")\n {\n $i++;\n $sep=-1;\n $j=$i;\n $l=0;\n $nl++;\n continue;\n }\n if($c==' ')\n $sep=$i;\n $l+=$cw[$c];\n if($l>$wmax)\n {\n if($sep==-1)\n {\n if($i==$j)\n $i++;\n }\n else\n $i=$sep+1;\n $sep=-1;\n $j=$i;\n $l=0;\n $nl++;\n }\n else\n $i++;\n }\n return $nl;\n}", "function NbLines($w,$txt)\n{\n $cw=&$this->CurrentFont['cw'];\n if($w==0)\n $w=$this->w-$this->rMargin-$this->x;\n $wmax=($w-2*$this->cMargin)*1000/$this->FontSize;\n $s=str_replace(\"\\r\",'',$txt);\n $nb=strlen($s);\n if($nb>0 and $s[$nb-1]==\"\\n\")\n $nb--;\n $sep=-1;\n $i=0;\n $j=0;\n $l=0;\n $nl=1;\n while($i<$nb)\n {\n $c=$s[$i];\n if($c==\"\\n\")\n {\n $i++;\n $sep=-1;\n $j=$i;\n $l=0;\n $nl++;\n continue;\n }\n if($c==' ')\n $sep=$i;\n $l+=$cw[$c];\n if($l>$wmax)\n {\n if($sep==-1)\n {\n if($i==$j)\n $i++;\n }\n else\n $i=$sep+1;\n $sep=-1;\n $j=$i;\n $l=0;\n $nl++;\n }\n else\n $i++;\n }\n return $nl;\n}", "function NbLines($w,$txt)\n{\n $cw=&$this->CurrentFont['cw'];\n if($w==0)\n $w=$this->w-$this->rMargin-$this->x;\n $wmax=($w-2*$this->cMargin)*1000/$this->FontSize;\n $s=str_replace(\"\\r\",'',$txt);\n $nb=strlen($s);\n if($nb>0 and $s[$nb-1]==\"\\n\")\n $nb--;\n $sep=-1;\n $i=0;\n $j=0;\n $l=0;\n $nl=1;\n while($i<$nb)\n {\n $c=$s[$i];\n if($c==\"\\n\")\n {\n $i++;\n $sep=-1;\n $j=$i;\n $l=0;\n $nl++;\n continue;\n }\n if($c==' ')\n $sep=$i;\n $l+=$cw[$c];\n if($l>$wmax)\n {\n if($sep==-1)\n {\n if($i==$j)\n $i++;\n }\n else\n $i=$sep+1;\n $sep=-1;\n $j=$i;\n $l=0;\n $nl++;\n }\n else\n $i++;\n }\n return $nl;\n}", "function NbLines($w,$txt)\n{\n $cw=&$this->CurrentFont['cw'];\n if($w==0)\n $w=$this->w-$this->rMargin-$this->x;\n $wmax=($w-2*$this->cMargin)*1000/$this->FontSize;\n $s=str_replace(\"\\r\",'',$txt);\n $nb=strlen($s);\n if($nb>0 and $s[$nb-1]==\"\\n\")\n $nb--;\n $sep=-1;\n $i=0;\n $j=0;\n $l=0;\n $nl=1;\n while($i<$nb)\n {\n $c=$s[$i];\n if($c==\"\\n\")\n {\n $i++;\n $sep=-1;\n $j=$i;\n $l=0;\n $nl++;\n continue;\n }\n if($c==' ')\n $sep=$i;\n $l+=$cw[$c];\n if($l>$wmax)\n {\n if($sep==-1)\n {\n if($i==$j)\n $i++;\n }\n else\n $i=$sep+1;\n $sep=-1;\n $j=$i;\n $l=0;\n $nl++;\n }\n else\n $i++;\n }\n return $nl;\n}", "function NbLines($w,$txt)\r\n{\r\n $cw=&$this->CurrentFont['cw'];\r\n if($w==0)\r\n $w=$this->w-$this->rMargin-$this->x;\r\n $wmax=($w-2*$this->cMargin)*1000/$this->FontSize;\r\n $s=str_replace(\"\\r\",'',$txt);\r\n $nb=strlen($s);\r\n if($nb>0 and $s[$nb-1]==\"\\n\")\r\n $nb--;\r\n $sep=-1;\r\n $i=0;\r\n $j=0;\r\n $l=0;\r\n $nl=1;\r\n while($i<$nb)\r\n {\r\n $c=$s[$i];\r\n if($c==\"\\n\")\r\n {\r\n $i++;\r\n $sep=-1;\r\n $j=$i;\r\n $l=0;\r\n $nl++;\r\n continue;\r\n }\r\n if($c==' ')\r\n $sep=$i;\r\n $l+=$cw[$c];\r\n if($l>$wmax)\r\n {\r\n if($sep==-1)\r\n {\r\n if($i==$j)\r\n $i++;\r\n }\r\n else\r\n $i=$sep+1;\r\n $sep=-1;\r\n $j=$i;\r\n $l=0;\r\n $nl++;\r\n }\r\n else\r\n $i++;\r\n }\r\n return $nl;\r\n}", "function NbLines($w,$txt){\r\n \t$cw=&$this->CurrentFont['cw'];\r\n \tif($w==0)\r\n \t\t$w=$this->w-$this->rMargin-$this->x;\r\n \t$wmax=($w-2*$this->cMargin)*1000/$this->FontSize;\r\n \t$s=str_replace(\"\\r\",'',$txt);\r\n \t$nb=strlen($s);\r\n \tif($nb>0 and $s[$nb-1]==\"\\n\")\r\n \t\t$nb--;\r\n \t$sep=-1;\r\n \t$i=0;\r\n \t$j=0;\r\n \t$l=0;\r\n \t$nl=1;\r\n \twhile($i<$nb)\r\n \t{\r\n \t\t$c=$s[$i];\r\n \t\tif($c==\"\\n\")\r\n \t\t{\r\n \t\t\t$i++;\r\n \t\t\t$sep=-1;\r\n \t\t\t$j=$i;\r\n \t\t\t$l=0;\r\n \t\t\t$nl++;\r\n \t\t\tcontinue;\r\n \t\t}\r\n \t\tif($c==' ')\r\n \t\t\t$sep=$i;\r\n \t\t$l+=$cw[$c];\r\n \t\tif($l>$wmax)\r\n \t\t{\r\n \t\t\tif($sep==-1)\r\n \t\t\t{\r\n \t\t\t\tif($i==$j)\r\n \t\t\t\t\t$i++;\r\n \t\t\t}\r\n \t\t\telse\r\n \t\t\t\t$i=$sep+1;\r\n \t\t\t$sep=-1;\r\n \t\t\t$j=$i;\r\n \t\t\t$l=0;\r\n \t\t\t$nl++;\r\n \t\t}\r\n \t\telse\r\n \t\t\t$i++;\r\n \t}\r\n \treturn $nl;\r\n }", "function NbLines($w,$txt)\n{\n\t$cw=&$this->CurrentFont['cw'];\n\tif($w==0)\n\t\t$w=$this->w-$this->rMargin-$this->x;\n\t$wmax=($w-2*$this->cMargin)*1000/$this->FontSize;\n\t$s=str_replace(\"\\r\",'',$txt);\n\t$nb=strlen($s);\n\tif($nb>0 and $s[$nb-1]==\"\\n\")\n\t\t$nb--;\n\t$sep=-1;\n\t$i=0;\n\t$j=0;\n\t$l=0;\n\t$nl=1;\n\twhile($i<$nb)\n\t{\n\t\t$c=$s[$i];\n\t\tif($c==\"\\n\")\n\t\t{\n\t\t\t$i++;\n\t\t\t$sep=-1;\n\t\t\t$j=$i;\n\t\t\t$l=0;\n\t\t\t$nl++;\n\t\t\tcontinue;\n\t\t}\n\t\tif($c==' ')\n\t\t\t$sep=$i;\n\t\t$l+=$cw[$c];\n\t\tif($l>$wmax)\n\t\t{\n\t\t\tif($sep==-1)\n\t\t\t{\n\t\t\t\tif($i==$j)\n\t\t\t\t\t$i++;\n\t\t\t}\n\t\t\telse\n\t\t\t\t$i=$sep+1;\n\t\t\t$sep=-1;\n\t\t\t$j=$i;\n\t\t\t$l=0;\n\t\t\t$nl++;\n\t\t}\n\t\telse\n\t\t\t$i++;\n\t}\n\treturn $nl;\n}", "function NbLines($w,$txt)\n{\n\t$cw=&$this->CurrentFont['cw'];\n\tif($w==0)\n\t\t$w=$this->w-$this->rMargin-$this->x;\n\t$wmax=($w-2*$this->cMargin)*1000/$this->FontSize;\n\t$s=str_replace(\"\\r\",'',$txt);\n\t$nb=strlen($s);\n\tif($nb>0 and $s[$nb-1]==\"\\n\")\n\t\t$nb--;\n\t$sep=-1;\n\t$i=0;\n\t$j=0;\n\t$l=0;\n\t$nl=1;\n\twhile($i<$nb)\n\t{\n\t\t$c=$s[$i];\n\t\tif($c==\"\\n\")\n\t\t{\n\t\t\t$i++;\n\t\t\t$sep=-1;\n\t\t\t$j=$i;\n\t\t\t$l=0;\n\t\t\t$nl++;\n\t\t\tcontinue;\n\t\t}\n\t\tif($c==' ')\n\t\t\t$sep=$i;\n\t\t$l+=$cw[$c];\n\t\tif($l>$wmax)\n\t\t{\n\t\t\tif($sep==-1)\n\t\t\t{\n\t\t\t\tif($i==$j)\n\t\t\t\t\t$i++;\n\t\t\t}\n\t\t\telse\n\t\t\t\t$i=$sep+1;\n\t\t\t$sep=-1;\n\t\t\t$j=$i;\n\t\t\t$l=0;\n\t\t\t$nl++;\n\t\t}\n\t\telse\n\t\t\t$i++;\n\t}\n\treturn $nl;\n}", "function NbLines($w,$txt)\n{\n\t$cw=&$this->CurrentFont['cw'];\n\tif($w==0)\n\t\t$w=$this->w-$this->rMargin-$this->x;\n\t$wmax=($w-2*$this->cMargin)*1000/$this->FontSize;\n\t$s=str_replace(\"\\r\",'',$txt);\n\t$nb=strlen($s);\n\tif($nb>0 and $s[$nb-1]==\"\\n\")\n\t\t$nb--;\n\t$sep=-1;\n\t$i=0;\n\t$j=0;\n\t$l=0;\n\t$nl=1;\n\twhile($i<$nb)\n\t{\n\t\t$c=$s[$i];\n\t\tif($c==\"\\n\")\n\t\t{\n\t\t\t$i++;\n\t\t\t$sep=-1;\n\t\t\t$j=$i;\n\t\t\t$l=0;\n\t\t\t$nl++;\n\t\t\tcontinue;\n\t\t}\n\t\tif($c==' ')\n\t\t\t$sep=$i;\n\t\t$l+=$cw[$c];\n\t\tif($l>$wmax)\n\t\t{\n\t\t\tif($sep==-1)\n\t\t\t{\n\t\t\t\tif($i==$j)\n\t\t\t\t\t$i++;\n\t\t\t}\n\t\t\telse\n\t\t\t\t$i=$sep+1;\n\t\t\t$sep=-1;\n\t\t\t$j=$i;\n\t\t\t$l=0;\n\t\t\t$nl++;\n\t\t}\n\t\telse\n\t\t\t$i++;\n\t}\n\treturn $nl;\n}", "public function getLineCount() {}", "function NbLines($w,$txt){\n\t\t\t$cw=&$this->CurrentFont['cw'];\n\t\t\tif($w==0)\n\t\t\t\t$w=$this->w-$this->rMargin-$this->x;\n\t\t\t$wmax=($w-2*$this->cMargin)*1000/$this->FontSize;\n\t\t\t$s=str_replace(\"\\r\",'',$txt);\n\t\t\t$nb=strlen($s);\n\t\t\tif($nb>0 and $s[$nb-1]==\"\\n\")\n\t\t\t\t$nb--;\n\t\t\t$sep=-1;\n\t\t\t$i=0;\n\t\t\t$j=0;\n\t\t\t$l=0;\n\t\t\t$nl=1;\n\t\t\twhile($i<$nb)\n\t\t\t{\n\t\t\t\t$c=$s[$i];\n\t\t\t\tif($c==\"\\n\")\n\t\t\t\t{\n\t\t\t\t\t$i++;\n\t\t\t\t\t$sep=-1;\n\t\t\t\t\t$j=$i;\n\t\t\t\t\t$l=0;\n\t\t\t\t\t$nl++;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif($c==' ')\n\t\t\t\t\t$sep=$i;\n\t\t\t\t$l+=$cw[$c];\n\t\t\t\tif($l>$wmax)\n\t\t\t\t{\n\t\t\t\t\tif($sep==-1)\n\t\t\t\t\t{\n\t\t\t\t\t\tif($i==$j)\n\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\t$i=$sep+1;\n\t\t\t\t\t$sep=-1;\n\t\t\t\t\t$j=$i;\n\t\t\t\t\t$l=0;\n\t\t\t\t\t$nl++;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t$i++;\n\t\t\t}\n\t\t\treturn $nl;\n\t\t}", "function GetMultiCellHeight($w, $h, $txt, $border=null, $align='J') {\n\t// $border is un-used, but I kept it in the parameters to keep the call\n\t// to this function consistent with MultiCell()\n\t$cw = &$this->CurrentFont['cw'];\n\tif($w==0)\n\t\t$w = $this->w-$this->rMargin-$this->x;\n\t$wmax = ($w-2*$this->cMargin)*1000/$this->FontSize;\n\t$s = str_replace(\"\\r\",'',$txt);\n\t$nb = strlen($s);\n\tif($nb>0 && $s[$nb-1]==\"\\n\")\n\t\t$nb--;\n\t$sep = -1;\n\t$i = 0;\n\t$j = 0;\n\t$l = 0;\n\t$ns = 0;\n\t$height = 0;\n\twhile($i<$nb)\n\t{\n\t\t// Get next character\n\t\t$c = $s[$i];\n\t\tif($c==\"\\n\")\n\t\t{\n\t\t\t// Explicit line break\n\t\t\tif($this->ws>0)\n\t\t\t{\n\t\t\t\t$this->ws = 0;\n\t\t\t\t$this->_out('0 Tw');\n\t\t\t}\n\t\t\t//Increase Height\n\t\t\t$height += $h;\n\t\t\t$i++;\n\t\t\t$sep = -1;\n\t\t\t$j = $i;\n\t\t\t$l = 0;\n\t\t\t$ns = 0;\n\t\t\tcontinue;\n\t\t}\n\t\tif($c==' ')\n\t\t{\n\t\t\t$sep = $i;\n\t\t\t$ls = $l;\n\t\t\t$ns++;\n\t\t}\n\t\t$l += $cw[$c];\n\t\tif($l>$wmax)\n\t\t{\n\t\t\t// Automatic line break\n\t\t\tif($sep==-1)\n\t\t\t{\n\t\t\t\tif($i==$j)\n\t\t\t\t\t$i++;\n\t\t\t\tif($this->ws>0)\n\t\t\t\t{\n\t\t\t\t\t$this->ws = 0;\n\t\t\t\t\t$this->_out('0 Tw');\n\t\t\t\t}\n\t\t\t\t//Increase Height\n\t\t\t\t$height += $h;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif($align=='J')\n\t\t\t\t{\n\t\t\t\t\t$this->ws = ($ns>1) ? ($wmax-$ls)/1000*$this->FontSize/($ns-1) : 0;\n\t\t\t\t\t$this->_out(sprintf('%.3F Tw',$this->ws*$this->k));\n\t\t\t\t}\n\t\t\t\t//Increase Height\n\t\t\t\t$height += $h;\n\t\t\t\t$i = $sep+1;\n\t\t\t}\n\t\t\t$sep = -1;\n\t\t\t$j = $i;\n\t\t\t$l = 0;\n\t\t\t$ns = 0;\n\t\t}\n\t\telse\n\t\t\t$i++;\n\t}\n\t// Last chunk\n\tif($this->ws>0)\n\t{\n\t\t$this->ws = 0;\n\t\t$this->_out('0 Tw');\n\t}\n\t//Increase Height\n\t$height += $h;\n\n\treturn $height;\n}", "public function NbLines($w,$txt){\n $cw=&$this->CurrentFont['cw'];\n\n if($w==0)\n $w=$this->w-$this->rMargin-$this->x;\n\n $wmax=($w-2*$this->cMargin)*1000/$this->FontSize;\n $s=str_replace(\"\\r\",'',$txt);\n $nb=strlen($s);\n if($nb>0 and $s[$nb-1]==\"\\n\")\n $nb--;\n\n $sep=-1;\n $i=0;\n $j=0;\n $l=0;\n $nl=1;\n\n while($i<$nb)\n {\n\n $c=$s[$i];\n\n if($c==\"\\n\")\n {\n $i++;\n $sep=-1;\n $j=$i;\n $l=0;\n $nl++;\n continue;\n }\n\n if($c == ' ')\n\n $sep=$i;\n $l+=$cw[$c];\n\n if($l > $wmax)\n {\n\n if($sep == -1)\n {\n\n if($i == $j)\n $i++;\n\n }else\n $i=$sep+1;\n\n $sep=-1;\n $j=$i;\n $l=0;\n $nl++;\n\n }else\n\n $i++;\n\n }\n\n return $nl;\n\n }", "function NbLines($w,$txt)\n\t{\n\t $cw=&$this->CurrentFont['cw'];\n\t if($w==0)\n\t $w=$this->w-$this->rMargin-$this->x;\n\t $wmax=($w-2*$this->cMargin)*1000/$this->FontSize;\n\t $s=str_replace(\"\\r\",'',$txt);\n\t $nb=strlen($s);\n\t if($nb>0 and $s[$nb-1]==\"\\n\")\n\t $nb--;\n\t $sep=-1;\n\t $i=0;\n\t $j=0;\n\t $l=0;\n\t $nl=1;\n\t while($i<$nb)\n\t {\n\t $c=$s[$i];\n\t if($c==\"\\n\")\n\t {\n\t $i++;\n\t $sep=-1;\n\t $j=$i;\n\t $l=0;\n\t $nl++;\n\t continue;\n\t }\n\t if($c==' ')\n\t $sep=$i;\n\t $l+=$cw[$c];\n\t if($l>$wmax)\n\t {\n\t if($sep==-1)\n\t {\n\t if($i==$j)\n\t $i++;\n\t }\n\t else\n\t $i=$sep+1;\n\t $sep=-1;\n\t $j=$i;\n\t $l=0;\n\t $nl++;\n\t }\n\t else\n\t $i++;\n\t }\n\t return $nl;\n\t}", "function NbLines($w,$txt)\n\t{\n\t $cw=&$this->CurrentFont['cw'];\n\t if($w==0)\n\t $w=$this->w-$this->rMargin-$this->x;\n\t $wmax=($w-2*$this->cMargin)*1000/$this->FontSize;\n\t $s=str_replace(\"\\r\",'',$txt);\n\t $nb=strlen($s);\n\t if($nb>0 and $s[$nb-1]==\"\\n\")\n\t $nb--;\n\t $sep=-1;\n\t $i=0;\n\t $j=0;\n\t $l=0;\n\t $nl=1;\n\t while($i<$nb)\n\t {\n\t $c=$s[$i];\n\t if($c==\"\\n\")\n\t {\n\t $i++;\n\t $sep=-1;\n\t $j=$i;\n\t $l=0;\n\t $nl++;\n\t continue;\n\t }\n\t if($c==' ')\n\t $sep=$i;\n\t $l+=$cw[$c];\n\t if($l>$wmax)\n\t {\n\t if($sep==-1)\n\t {\n\t if($i==$j)\n\t $i++;\n\t }\n\t else\n\t $i=$sep+1;\n\t $sep=-1;\n\t $j=$i;\n\t $l=0;\n\t $nl++;\n\t }\n\t else\n\t $i++;\n\t }\n\t return $nl;\n\t}", "function NbLines($w,$txt) {\n\t\t\t$cw=&$this->CurrentFont['cw'];\n\t\t\tif($w==0)\n\t\t\t\t$w=$this->w-$this->rMargin-$this->x;\n\t\t\t$wmax=($w-2*$this->cMargin)*1000/$this->FontSize;\n\t\t\t$s=str_replace(\"\\r\",'',$txt);\n\t\t\t$nb=strlen($s);\n\t\t\tif($nb>0 and $s[$nb-1]==\"\\n\")\n\t\t\t\t$nb--;\n\t\t\t$sep=-1;\n\t\t\t$i=0;\n\t\t\t$j=0;\n\t\t\t$l=0;\n\t\t\t$nl=1;\n\t\t\twhile($i<$nb) {\n\t\t\t\t$c=$s[$i];\n\t\t\t\tif($c==\"\\n\") {\n\t\t\t\t\t$i++;\n\t\t\t\t\t$sep=-1;\n\t\t\t\t\t$j=$i;\n\t\t\t\t\t$l=0;\n\t\t\t\t\t$nl++;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif($c==' ')\n\t\t\t\t\t$sep=$i;\n\t\t\t\t$l+=$cw[$c];\n\t\t\t\tif($l>$wmax) {\n\t\t\t\t\tif($sep==-1) {\n\t\t\t\t\t\tif($i==$j)\n\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\t$i=$sep+1;\n\t\t\t\t\t$sep=-1;\n\t\t\t\t\t$j=$i;\n\t\t\t\t\t$l=0;\n\t\t\t\t\t$nl++;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t$i++;\n\t\t\t}\n\t\t\treturn $nl;\n\t\t}", "public function getCellSize(): int {\n return $this->cellSize;\n }", "function NbLines($w,$txt)\n\t{\n\t\t$cw=&$this->CurrentFont['cw'];\n\t\tif($w==0)\n\t\t\t$w=$this->w-$this->rMargin-$this->x;\n\t\t$wmax=($w-2*$this->cMargin)*1000/$this->FontSize;\n\t\t$s=str_replace(\"\\r\",'',$txt);\n\t\t$nb=strlen($s);\n\t\tif($nb>0 and $s[$nb-1]==\"\\n\")\n\t\t\t$nb--;\n\t\t$sep=-1;\n\t\t$i=0;\n\t\t$j=0;\n\t\t$l=0;\n\t\t$nl=1;\n\t\twhile($i<$nb)\n\t\t{\n\t\t\t$c=$s[$i];\n\t\t\tif($c==\"\\n\")\n\t\t\t{\n\t\t\t\t$i++;\n\t\t\t\t$sep=-1;\n\t\t\t\t$j=$i;\n\t\t\t\t$l=0;\n\t\t\t\t$nl++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif($c==' ')\n\t\t\t\t$sep=$i;\n\t\t\t$l+=$cw[$c];\n\t\t\tif($l>$wmax)\n\t\t\t{\n\t\t\t\tif($sep==-1)\n\t\t\t\t{\n\t\t\t\t\tif($i==$j)\n\t\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t$i=$sep+1;\n\t\t\t\t$sep=-1;\n\t\t\t\t$j=$i;\n\t\t\t\t$l=0;\n\t\t\t\t$nl++;\n\t\t\t}\n\t\t\telse\n\t\t\t\t$i++;\n\t\t}\n\t\treturn $nl;\n\t}", "function NbLines($w,$txt)\n\t{\n\t\t$cw=&$this->CurrentFont['cw'];\n\t\tif($w==0)\n\t\t\t$w=$this->w-$this->rMargin-$this->x;\n\t\t$wmax=($w-2*$this->cMargin)*1000/$this->FontSize;\n\t\t$s=str_replace(\"\\r\",'',$txt);\n\t\t$nb=strlen($s);\n\t\tif($nb>0 and $s[$nb-1]==\"\\n\")\n\t\t\t$nb--;\n\t\t$sep=-1;\n\t\t$i=0;\n\t\t$j=0;\n\t\t$l=0;\n\t\t$nl=1;\n\t\twhile($i<$nb)\n\t\t{\n\t\t\t$c=$s[$i];\n\t\t\tif($c==\"\\n\")\n\t\t\t{\n\t\t\t\t$i++;\n\t\t\t\t$sep=-1;\n\t\t\t\t$j=$i;\n\t\t\t\t$l=0;\n\t\t\t\t$nl++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif($c==' ')\n\t\t\t\t$sep=$i;\n\t\t\t$l+=$cw[$c];\n\t\t\tif($l>$wmax)\n\t\t\t{\n\t\t\t\tif($sep==-1)\n\t\t\t\t{\n\t\t\t\t\tif($i==$j)\n\t\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t$i=$sep+1;\n\t\t\t\t$sep=-1;\n\t\t\t\t$j=$i;\n\t\t\t\t$l=0;\n\t\t\t\t$nl++;\n\t\t\t}\n\t\t\telse\n\t\t\t\t$i++;\n\t\t}\n\t\treturn $nl;\n\t}", "function NbLines($w,$txt)\n\t{\n\t\t$cw=&$this->CurrentFont['cw'];\n\t\tif($w==0)\n\t\t\t$w=$this->w-$this->rMargin-$this->x;\n\t\t$wmax=($w-2*$this->cMargin)*1000/$this->FontSize;\n\t\t$s=str_replace(\"\\r\",'',$txt);\n\t\t$nb=strlen($s);\n\t\tif($nb>0 and $s[$nb-1]==\"\\n\")\n\t\t\t$nb--;\n\t\t$sep=-1;\n\t\t$i=0;\n\t\t$j=0;\n\t\t$l=0;\n\t\t$nl=1;\n\t\twhile($i<$nb)\n\t\t{\n\t\t\t$c=$s[$i];\n\t\t\tif($c==\"\\n\")\n\t\t\t{\n\t\t\t\t$i++;\n\t\t\t\t$sep=-1;\n\t\t\t\t$j=$i;\n\t\t\t\t$l=0;\n\t\t\t\t$nl++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif($c==' ')\n\t\t\t\t$sep=$i;\n\t\t\t$l+=$cw[$c];\n\t\t\tif($l>$wmax)\n\t\t\t{\n\t\t\t\tif($sep==-1)\n\t\t\t\t{\n\t\t\t\t\tif($i==$j)\n\t\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t$i=$sep+1;\n\t\t\t\t$sep=-1;\n\t\t\t\t$j=$i;\n\t\t\t\t$l=0;\n\t\t\t\t$nl++;\n\t\t\t}\n\t\t\telse\n\t\t\t\t$i++;\n\t\t}\n\t\treturn $nl;\n\t}", "public function getGridWidth(): int {\n return $this->width;\n }", "public function numLines() {\r\n\t\treturn $this->lines;\r\n\t}", "public function getGridSize();", "function _tableColumnWidth(&$table){\r\n//! @return void\r\n\t$cs = &$table['cells'];\r\n\t$mw = $this->getStringWidth('W');\r\n\t$nc = $table['nc'];\r\n\t$nr = $table['nr'];\r\n\t$listspan = array();\r\n\t//Xac dinh do rong cua cac cell va cac cot tuong ung\r\n\tfor ($j=0;$j<$nc;$j++){\r\n\t\t$wc = &$table['wc'][$j];\r\n\t\tfor ($i=0;$i<$nr;$i++){\r\n\t\t\tif (isset($cs[$i][$j]) && $cs[$i][$j]){\r\n\t\t\t\t$c = &$cs[$i][$j];\r\n\t\t\t\t$miw = $mw;\r\n\t\t\t\t$c['maw']\t= $c['s'];\r\n\t\t\t\tif (isset($c['nowrap']))\t\t\t$miw = $c['maw'];\r\n\t\t\t\tif (isset($c['w'])){\r\n\t\t\t\t\tif ($miw<$c['w'])\t$c['miw'] = $c['w'];\r\n\t\t\t\t\tif ($miw>$c['w'])\t$c['miw'] = $c['w']\t = $miw;\r\n\t\t\t\t\tif (!isset($wc['w'])) $wc['w'] = 1;\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$c['miw'] = $miw;\r\n\t\t\t\t}\r\n\t\t\t\tif ($c['maw'] < $c['miw'])\t\t\t$c['maw'] = $c['miw'];\r\n\t\t\t\tif (!isset($c['colspan'])){\r\n\t\t\t\t\tif ($wc['miw'] < $c['miw'])\t\t$wc['miw']\t= $c['miw'];\r\n\t\t\t\t\tif ($wc['maw'] < $c['maw'])\t\t$wc['maw']\t= $c['maw'];\r\n\t\t\t\t}else $listspan[] = array($i,$j);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t//Xac dinh su anh huong cua cac cell colspan len cac cot va nguoc lai\r\n\t$wc = &$table['wc'];\r\n\tforeach ($listspan as $span){\r\n\t\tlist($i,$j) = $span;\r\n\t\t$c = &$cs[$i][$j];\r\n\t\t$lc = $j + $c['colspan'];\r\n\t\tif ($lc > $nc) $lc = $nc;\r\n\t\t\r\n\t\t$wis = $wisa = 0;\r\n\t\t$was = $wasa = 0;\r\n\t\t$list = array();\r\n\t\tfor($k=$j;$k<$lc;$k++){\r\n\t\t\t$wis += $wc[$k]['miw'];\r\n\t\t\t$was += $wc[$k]['maw'];\r\n\t\t\tif (!isset($c['w'])){\r\n\t\t\t\t$list[] = $k;\r\n\t\t\t\t$wisa += $wc[$k]['miw'];\r\n\t\t\t\t$wasa += $wc[$k]['maw'];\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($c['miw'] > $wis){\r\n\t\t\tif (!$wis){//Cac cot chua co kich thuoc => chia deu\r\n\t\t\t\tfor($k=$j;$k<$lc;$k++) $wc[$k]['miw'] = $c['miw']/$c['colspan'];\r\n\t\t\t}elseif (!count($list)){//Khong co cot nao co kich thuoc auto => chia deu phan du cho tat ca\r\n\t\t\t\t$wi = $c['miw'] - $wis;\r\n\t\t\t\tfor($k=$j;$k<$lc;$k++) \r\n\t\t\t\t\t$wc[$k]['miw'] += ($wc[$k]['miw']/$wis)*$wi;\r\n\t\t\t}else{//Co mot so cot co kich thuoc auto => chia deu phan du cho cac cot auto\r\n\t\t\t\t$wi = $c['miw'] - $wis;\r\n\t\t\t\tforeach ($list as $k)\r\n\t\t\t\t\t$wc[$k]['miw'] += ($wc[$k]['miw']/$wisa)*$wi;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($c['maw'] > $was){\r\n\t\t\tif (!$wis){//Cac cot chua co kich thuoc => chia deu\r\n\t\t\t\tfor($k=$j;$k<$lc;$k++) $wc[$k]['maw'] = $c['maw']/$c['colspan'];\r\n\t\t\t}elseif (!count($list)){//Khong co cot nao co kich thuoc auto => chia deu phan du cho tat ca\r\n\t\t\t\t$wi = $c['maw'] - $was;\r\n\t\t\t\tfor($k=$j;$k<$lc;$k++) \r\n\t\t\t\t\t$wc[$k]['maw'] += ($wc[$k]['maw']/$was)*$wi;\r\n\t\t\t}else{//Co mot so cot co kich thuoc auto => chia deu phan du cho cac cot auto\r\n\t\t\t\t$wi = $c['maw'] - $was;\r\n\t\t\t\tforeach ($list as $k)\r\n\t\t\t\t\t$wc[$k]['maw'] += ($wc[$k]['maw']/$wasa)*$wi;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}", "function NumCols() {}", "function rows_per_segment( $rows ) {\n\t\treturn 50;\n\t}", "public function getNumRows();", "public function Size() {\n return $this->RowCount() * $this->_coln;\n }", "abstract public function getNumRows();", "abstract public function getNumRows();", "public function size() : int\n {\n return $this->m * $this->n;\n }", "function GetMultiCellHeight($w, $h, $txt, $border=null, $align='J') {\n\t\t// $border is un-used, but I kept it in the parameters to keep the call\n\t\t// to this function consistent with MultiCell()\n\t\t$cw = &$this->CurrentFont['cw'];\n\t\tif($w==0)\n\t\t\t$w = $this->w-$this->rMargin-$this->x;\n\t\t$wmax = ($w-2*$this->cMargin)*1000/$this->FontSize;\n\t\t$s = str_replace(\"\\r\",'',$txt);\n\t\t$nb = strlen($s);\n\t\tif($nb>0 && $s[$nb-1]==\"\\n\")\n\t\t\t$nb--;\n\t\t$sep = -1;\n\t\t$i = 0;\n\t\t$j = 0;\n\t\t$l = 0;\n\t\t$ns = 0;\n\t\t$height = 0;\n\t\twhile($i<$nb)\n\t\t{\n\t\t\t// Get next character\n\t\t\t$c = $s[$i];\n\t\t\tif($c==\"\\n\")\n\t\t\t{\n\t\t\t\t// Explicit line break\n\t\t\t\tif($this->ws>0)\n\t\t\t\t{\n\t\t\t\t\t$this->ws = 0;\n\t\t\t\t\t$this->_out('0 Tw');\n\t\t\t\t}\n\t\t\t\t//Increase Height\n\t\t\t\t$height += $h;\n\t\t\t\t$i++;\n\t\t\t\t$sep = -1;\n\t\t\t\t$j = $i;\n\t\t\t\t$l = 0;\n\t\t\t\t$ns = 0;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif($c==' ')\n\t\t\t{\n\t\t\t\t$sep = $i;\n\t\t\t\t$ls = $l;\n\t\t\t\t$ns++;\n\t\t\t}\n\t\t\t$l += $cw[$c];\n\t\t\tif($l>$wmax)\n\t\t\t{\n\t\t\t\t// Automatic line break\n\t\t\t\tif($sep==-1)\n\t\t\t\t{\n\t\t\t\t\tif($i==$j)\n\t\t\t\t\t\t$i++;\n\t\t\t\t\tif($this->ws>0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->ws = 0;\n\t\t\t\t\t\t$this->_out('0 Tw');\n\t\t\t\t\t}\n\t\t\t\t\t//Increase Height\n\t\t\t\t\t$height += $h;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif($align=='J')\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->ws = ($ns>1) ? ($wmax-$ls)/1000*$this->FontSize/($ns-1) : 0;\n\t\t\t\t\t\t$this->_out(sprintf('%.3F Tw',$this->ws*$this->k));\n\t\t\t\t\t}\n\t\t\t\t\t//Increase Height\n\t\t\t\t\t$height += $h;\n\t\t\t\t\t$i = $sep+1;\n\t\t\t\t}\n\t\t\t\t$sep = -1;\n\t\t\t\t$j = $i;\n\t\t\t\t$l = 0;\n\t\t\t\t$ns = 0;\n\t\t\t}\n\t\t\telse\n\t\t\t\t$i++;\n\t\t}\n\t\t// Last chunk\n\t\tif($this->ws>0)\n\t\t{\n\t\t\t$this->ws = 0;\n\t\t\t$this->_out('0 Tw');\n\t\t}\n\t\t//Increase Height\n\t\t$height += $h;\n\n\t\treturn $height;\n\t}", "abstract public function getIntervalColumnCount(): int;", "protected static function getMaxLineWidth($lines)\n {\n if (!is_array($lines)) {\n $lines = [$lines];\n }\n\n $width = 0;\n\n foreach ($lines as $foo => $line) {\n foreach (explode(\"\\n\", $line) as $fooo => $lin) {\n $lin = preg_replace('#\\\\e\\[[0-9]+m#', '', $lin);\n strlen($lin) > $width and $width = strlen($lin);\n }\n }\n\n return $width;\n }", "public function getWidth();", "public function getWidth();", "public function getWidth();", "public function getWidth();", "function _tableColumnWidth(&$table){\n//! @return void\n\t$cs = &$table['cells'];\n\t$mw = $this->getStringWidth('W');\n\t$nc = $table['nc'];\n\t$nr = $table['nr'];\n\t$listspan = array();\n\t//Xac dinh do rong cua cac cell va cac cot tuong ung\n\tfor($j = 0 ; $j < $nc ; $j++ ) //columns\n {\n\t\t$wc = &$table['wc'][$j];\n\t\tfor($i = 0 ; $i < $nr ; $i++ ) //rows\n {\n\t\t\tif (isset($cs[$i][$j]) && $cs[$i][$j])\n {\n\t\t\t\t$c = &$cs[$i][$j];\n\t\t\t\t$miw = $mw;\n\t\t\t\tif (isset($c['maxs']) and $c['maxs'] != '') $c['s'] = $c['maxs'];\n\t\t\t\t$c['maw']\t= $c['s'];\n\t\t\t\tif (isset($c['nowrap'])) $miw = $c['maw'];\n\t\t\t\tif (isset($c['w']))\n {\n\t\t\t\t\tif ($miw<$c['w'])\t$c['miw'] = $c['w'];\n\t\t\t\t\tif ($miw>$c['w'])\t$c['miw'] = $c['w']\t = $miw;\n\t\t\t\t\tif (!isset($wc['w'])) $wc['w'] = 1;\n\t\t\t\t}\n else $c['miw'] = $miw;\n\t\t\t\tif ($c['maw'] < $c['miw']) $c['maw'] = $c['miw'];\n\t\t\t\tif (!isset($c['colspan']))\n {\n\t\t\t\t\tif ($wc['miw'] < $c['miw'])\t\t$wc['miw']\t= $c['miw'];\n\t\t\t\t\tif ($wc['maw'] < $c['maw'])\t\t$wc['maw']\t= $c['maw'];\n\t\t\t\t}\n else $listspan[] = array($i,$j);\n //Check if minimum width of the whole column is big enough for a huge word to fit\n $auxtext = implode(\"\",$c['text']);\n $minwidth = $this->WordWrap($auxtext,$wc['miw']-2);// -2 == margin\n if ($minwidth < 0 and (-$minwidth) > $wc['miw']) $wc['miw'] = (-$minwidth) +2; //increase minimum width\n if ($wc['miw'] > $wc['maw']) $wc['maw'] = $wc['miw']; //update maximum width, if needed\n\t\t\t}\n\t\t}//rows\n\t}//columns\n\t//Xac dinh su anh huong cua cac cell colspan len cac cot va nguoc lai\n\t$wc = &$table['wc'];\n\tforeach ($listspan as $span)\n {\n\t\tlist($i,$j) = $span;\n\t\t$c = &$cs[$i][$j];\n\t\t$lc = $j + $c['colspan'];\n\t\tif ($lc > $nc) $lc = $nc;\n\t\t\n\t\t$wis = $wisa = 0;\n\t\t$was = $wasa = 0;\n\t\t$list = array();\n\t\tfor($k=$j;$k<$lc;$k++)\n {\n\t\t\t$wis += $wc[$k]['miw'];\n\t\t\t$was += $wc[$k]['maw'];\n\t\t\tif (!isset($c['w']))\n {\n\t\t\t\t$list[] = $k;\n\t\t\t\t$wisa += $wc[$k]['miw'];\n\t\t\t\t$wasa += $wc[$k]['maw'];\n\t\t\t}\n\t\t}\n\t\tif ($c['miw'] > $wis)\n {\n\t\t\tif (!$wis)\n {//Cac cot chua co kich thuoc => chia deu\n\t\t\t\tfor($k=$j;$k<$lc;$k++) $wc[$k]['miw'] = $c['miw']/$c['colspan'];\n\t\t\t}\n elseif(!count($list))\n {//Khong co cot nao co kich thuoc auto => chia deu phan du cho tat ca\n\t\t\t\t$wi = $c['miw'] - $wis;\n\t\t\t\tfor($k=$j;$k<$lc;$k++) $wc[$k]['miw'] += ($wc[$k]['miw']/$wis)*$wi;\n\t\t\t}\n else\n {//Co mot so cot co kich thuoc auto => chia deu phan du cho cac cot auto\n\t\t\t\t$wi = $c['miw'] - $wis;\n\t\t\t\tforeach ($list as $k)\t$wc[$k]['miw'] += ($wc[$k]['miw']/$wisa)*$wi;\n\t\t\t}\n\t\t}\n\t\tif ($c['maw'] > $was)\n {\n\t\t\tif (!$wis)\n {//Cac cot chua co kich thuoc => chia deu\n\t\t\t\tfor($k=$j;$k<$lc;$k++) $wc[$k]['maw'] = $c['maw']/$c['colspan'];\n\t\t\t}\n elseif (!count($list))\n {\n //Khong co cot nao co kich thuoc auto => chia deu phan du cho tat ca\n\t\t\t\t$wi = $c['maw'] - $was;\n\t\t\t\tfor($k=$j;$k<$lc;$k++) $wc[$k]['maw'] += ($wc[$k]['maw']/$was)*$wi;\n\t\t\t}\n else\n {//Co mot so cot co kich thuoc auto => chia deu phan du cho cac cot auto\n\t\t\t\t$wi = $c['maw'] - $was;\n\t\t\t\tforeach ($list as $k)\t$wc[$k]['maw'] += ($wc[$k]['maw']/$wasa)*$wi;\n\t\t\t}\n\t\t}\n\t}\n}", "public function getWidth()\n {\n // Support for 'n%', relative to parent\n return $this->parseGlobalValue_h($this->w);\n }", "abstract public function getNumExecutableLines();", "public function getWidth(): int;", "public function getOutlineWidth() {}", "private function getRenderWidth(): int\n {\n if ($this->cli->getWidth() - $this->pos['x'] <= $this->width) {\n return $this->cli->getWidth() - $this->pos['x'];\n }\n\n return $this->width;\n }", "function nbLine($req) {\r\n $crs = $this->query($req) ;\r\n return count($crs->fetchAll()) ;\r\n }", "protected function countMulticolumnElements()\n {\n $select_fields = 'uid, CType';\n $where = 'CType LIKE \"%multicolumn%\" AND deleted = 0';\n $resource = $this->execSelect($select_fields, $where);\n if ($resource === false) {\n $this->results['countMulticolumnElements'] = 0;\n return 0;\n }\n\n $i = 0;\n while ($row = $GLOBALS[\"TYPO3_DB\"]->sql_fetch_assoc($resource)) {\n ++$i;\n }\n $GLOBALS[\"TYPO3_DB\"]->sql_free_result($resource);\n $this->results['countMulticolumnElements'] = $i;\n return $i;\n }", "private function _getTextWidth($fontSize, array $lines) {}", "private function countChunks()\r\n {\r\n\t\t$this->icc_chunks = ceil($this->icc_size / ((float) (self::MAX_BYTES_IN_MARKER - self::ICC_HEADER_LEN)));\r\n }", "public function getWidth() {}", "public function getWidth() {}", "public function getWidth() {}", "public function getWidth() {}", "public function getWidth() {}", "public function getWidth() {}", "public function getWidth() {}", "public function getNumberOfComponents() {}", "public function getNbEleves()\n {\n return $this->nbEleves;\n }", "public function getWidth(): int\n\t{\n\t\treturn $this->processor->getWidth();\n\t}", "public function getSize(){\n return count($this->sides);\n }", "protected function calculateRowsAndColumns() {}", "function size()\n\t{\n\t\treturn $this->nb;\n\t}", "public function getNumGlyphs() {}", "public function getNumGlyphs() {}", "public function numOfRows();", "public function getMaxWidth()\n\t{\n\t\t$box = $this->getBox();\n\t\tif (!$box->isForMeasurement()) {\n\t\t\treturn '0';\n\t\t}\n\t\tif (!$box instanceof LineBox) {\n\t\t\t$style = $this->getBox()->getStyle();\n\t\t\t$childrenWidth = '0';\n\t\t\t// if some of the children overflows\n\t\t\tif ('inline' === $box->getStyle()->getRules('display')) {\n\t\t\t\tforeach ($box->getChildren() as $child) {\n\t\t\t\t\t$childrenWidth = Math::add($childrenWidth, $child->getDimensions()->getOuterWidth());\n\t\t\t\t}\n\t\t\t} elseif (\\count($box->getSourceLines())) {\n\t\t\t\tforeach ($box->getSourceLines() as $line) {\n\t\t\t\t\t$childrenWidth = Math::max($childrenWidth, $line->getChildrenWidth());\n\t\t\t\t}\n\t\t\t\tforeach ($box->getChildren() as $child) {\n\t\t\t\t\tif (!$child instanceof LineBox) {\n\t\t\t\t\t\t$childrenWidth = Math::max($childrenWidth, $child->getDimensions()->getWidth() ?? '0'); // TODO: neither getOuterWidth or getWidth works here\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// TODO: each block and inline-block should have source lines but for now i don't have time so this is just patch\n\t\t\t\tforeach ($box->getChildren() as $child) {\n\t\t\t\t\t$childrenWidth = Math::max($childrenWidth, $child->getDimensions()->getOuterWidth());\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (null !== $this->getWidth()) {\n\t\t\t\t$childrenWidth = Math::add($childrenWidth, $style->getHorizontalMarginsWidth(), $style->getHorizontalBordersWidth(), $style->getHorizontalPaddingsWidth());\n\t\t\t\t$width = Math::add($this->getWidth(), $style->getHorizontalMarginsWidth());\n\t\t\t\treturn Math::max($width, $childrenWidth);\n\t\t\t}\n\t\t\treturn Math::add($childrenWidth, $style->getHorizontalBordersWidth(), $style->getHorizontalPaddingsWidth());\n\t\t}\n\t\treturn $this->getBox()->getChildrenWidth();\n\t}", "public function numRows();", "public function getWidth() {\n return $this->w;\n }", "private function _getNumberOfMetrics() {}", "abstract public function getColumnsCount();", "function MultiCell($w, $h, $txt, $border=0, $align='J', $fill=0, $maxline=0) {\n $cw=&$this->CurrentFont['cw'];\n if($w==0)\n $w=$this->w-$this->rMargin-$this->x;\n $wmax=($w-2*$this->cMargin)*1000/$this->FontSize;\n $s=str_replace(\"\\r\", '', $txt);\n $nb=strlen($s);\n if($nb>0 and $s[$nb-1]==\"\\n\")\n $nb--;\n $b=0;\n if($border)\n {\n if($border==1)\n {\n $border='LTRB';\n $b='LRT';\n $b2='LR';\n }\n else\n {\n $b2='';\n if(is_int(strpos($border, 'L')))\n $b2.='L';\n if(is_int(strpos($border, 'R')))\n $b2.='R';\n $b=is_int(strpos($border, 'T')) ? $b2.'T' : $b2;\n }\n }\n $sep=-1;\n $i=0;\n $j=0;\n $l=0;\n $ns=0;\n $nl=1;\n while($i<$nb)\n {\n //Get next character\n $c=$s[$i];\n if($c==\"\\n\")\n {\n //Explicit line break\n if($this->ws>0)\n {\n $this->ws=0;\n $this->_out('0 Tw');\n }\n $this->Cell($w, $h, substr($s, $j, $i-$j), $b, 2, $align, $fill);\n $i++;\n $sep=-1;\n $j=$i;\n $l=0;\n $ns=0;\n $nl++;\n if($border and $nl==2)\n $b=$b2;\n if ( $maxline && $nl > $maxline ) \n return substr($s, $i);\n continue;\n }\n if($c==' ')\n {\n $sep=$i;\n $ls=$l;\n $ns++;\n }\n $l+=$cw[$c];\n if($l>$wmax)\n {\n //Automatic line break\n if($sep==-1)\n {\n if($i==$j)\n $i++;\n if($this->ws>0)\n {\n $this->ws=0;\n $this->_out('0 Tw');\n }\n $this->Cell($w, $h, substr($s, $j, $i-$j), $b, 2, $align, $fill);\n }\n else\n {\n if($align=='J')\n {\n $this->ws=($ns>1) ? ($wmax-$ls)/1000*$this->FontSize/($ns-1) : 0;\n $this->_out(sprintf('%.3f Tw', $this->ws*$this->k));\n }\n $this->Cell($w, $h, substr($s, $j, $sep-$j), $b, 2, $align, $fill);\n $i=$sep+1;\n }\n $sep=-1;\n $j=$i;\n $l=0;\n $ns=0;\n $nl++;\n if($border and $nl==2)\n $b=$b2;\n if ( $maxline && $nl > $maxline ) \n return substr($s, $i);\n }\n else\n $i++;\n }\n //Last chunk\n if($this->ws>0)\n {\n $this->ws=0;\n $this->_out('0 Tw');\n }\n if($border and is_int(strpos($border, 'B')))\n $b.='B';\n $this->Cell($w, $h, substr($s, $j, $i-$j), $b, 2, $align, $fill);\n $this->x=$this->lMargin;\n return '';\n }", "public function RowCount() {\n return $this->_row == '' ? $this->_rown : $this->_rown + 1;\n }", "protected function calculateRowHeight()\r\n {\r\n return $this->Height / $this->calculateItemsPerColumn();\r\n }", "private function getNbSeatsCustomRow(){\n $nb = 0;\n foreach ($this->rows as $row){\n $nb += $row->getNbSeats();\n }\n return $nb;\n }", "public function getBorderWidth() {}", "static private function numTextLines($st) {\r\n// Temporary -1\r\n $i=-1;\r\n\r\n if ($i == -1) {\r\n return 1;\r\n } else {\r\n $tmpResult = 0;\r\n while ($i != -1) {\r\n $tmpResult++;\r\n $st = $st->substring($i + 1);\r\n $i = $st->indexOf(Language::getString(\"LineSeparator\"));\r\n }\r\n if ($st->length() != 0) {\r\n $tmpResult++;\r\n }\r\n return $tmpResult;\r\n }\r\n }", "public function size() : int\n {\n return $this->numRows() * $this->numColumns();\n }", "public function getNumberOfHMetrics() {}", "protected function calculateItemsPerColumn()\r\n {\r\n $numItems = count($this->items);\r\n if ($this->_columns > 0)\r\n return ceil($numItems / $this->_columns);\r\n else\r\n return 1;\r\n\r\n }" ]
[ "0.7832041", "0.6803364", "0.66419834", "0.65514416", "0.6517452", "0.6490402", "0.63917375", "0.6361387", "0.62462586", "0.6191976", "0.61789393", "0.6149459", "0.6143311", "0.61333185", "0.61333185", "0.6129266", "0.6129266", "0.6129266", "0.6127733", "0.610188", "0.6099326", "0.6096963", "0.6096963", "0.6096963", "0.6096963", "0.60880905", "0.60635746", "0.6043447", "0.6043447", "0.6043447", "0.6043023", "0.60398006", "0.60383695", "0.6038203", "0.6036015", "0.6036015", "0.6034445", "0.60205156", "0.5995663", "0.5995663", "0.5995663", "0.59807825", "0.5974039", "0.5967097", "0.59659606", "0.59457165", "0.5945595", "0.59442556", "0.5917909", "0.5898469", "0.5898469", "0.5893621", "0.5877193", "0.58675194", "0.58201784", "0.57855856", "0.57855856", "0.57855856", "0.57855856", "0.575425", "0.5730512", "0.5727658", "0.57131445", "0.57004184", "0.5694645", "0.5692854", "0.5680465", "0.5672723", "0.5658046", "0.56492347", "0.56492347", "0.56492347", "0.56492347", "0.56492347", "0.56492347", "0.56492347", "0.56339735", "0.56124085", "0.5602246", "0.55815876", "0.55770147", "0.55680615", "0.5566377", "0.5566377", "0.55656916", "0.5560793", "0.5555525", "0.5550292", "0.5549588", "0.55385745", "0.5527521", "0.5503414", "0.550271", "0.5492057", "0.5478593", "0.54756546", "0.54713714", "0.54606426", "0.54558843" ]
0.6070884
27
End of Multi Cell with wrap //// SQL Query /////
function Sytem_Time(){ // system date and time $query1="Select NOW();"; $result = mysql_query($query1) or die (mysql_error()); $num1 = mysql_num_rows($result); for($i=0; $i<$num1; $i++) { $row = mysql_fetch_array($result); $datePosted = $row[$i]; } // end system date return $datePosted; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tablecell_close() {\n $this->doc .= '</td>';\n }", "private function closeCell()\n {\n foreach (array('td', 'th') as $cell) {\n if ($this->elementInScope($cell, true)) {\n $this->inCell(\n array(\n 'name' => $cell,\n 'type' => HTML5::ENDTAG\n )\n );\n\n break;\n }\n }\n }", "function quote_close() {\n $this->doc .= '</div></blockquote>'.DOKU_LF;\n }", "function end_table() {\n if ($this->_cellopen) {\n $this->end_cell();\n }\n // Close any open table rows\n if ($this->_rowopen) {\n $this->end_row();\n }\n ?></table><?php\n echo \"\\n\";\n\n $this->reset_table();\n }", "public function epilog()\n {\n $block = Block::fromString(\n $this->queryContext('inCell') ? '&nbsp;' : \"<br/>\\n\"\n );\n return $block;\n }", "public function body()\n {\n $this->altRow = false;\n $lastBreakValue = null;\n $body[] = '<tbody>';\n $breaks = 0;\n foreach ($this->data as $index => $row) {\n if (!empty($this->tableOptions['break'])) {\n $breakValue = $row[$this->tableOptions['break']];\n if ($breakValue !== $lastBreakValue) {\n $lastBreakValue = $breakValue;\n if ($breaks) {\n $body[] = '</tbody>';\n $body[] = '<tbody class=\"page-break-before\">';\n }\n $breaks++;\n $body[] = $this->buildBreakRow($this->tableOptions['break'], $row);\n // continue;\n }\n }\n $body[] = $this->buildRow($row);\n }\n $body[] = '</tbody>';\n\n $ret = implode(chr(10), $body);\n\n if (!empty($this->tableOptions['totals'])) {\n $ret .= $this->buildTotalsRow();\n }\n\n return $ret;\n }", "public function _end_block()\n\t{\n\t\t//echo '</table>';\n\t}", "public function streamStatementEnd( &$sql, &$newLine ) {\n\t\tif ( $this->delimiter ) {\n\t\t\t$prev = $newLine;\n\t\t\t$newLine = preg_replace( '/' . preg_quote( $this->delimiter, '/' ) . '$/', '', $newLine );\n\t\t\tif ( $newLine != $prev ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "function getQBaseResultLine($free_cells){\r\n\t\tglobal $LANG;\r\n\r\n\t\t$delimeter = $this->extConf['CSV_qualifier'];\r\n\t\t$parter = $delimeter.$this->extConf['CSV_parter'].$delimeter;\r\n\t\t$line = array();\r\n\t\tfor ($i = 0;$i < $free_cells;$i ++){\r\n\t\t\t$line[] = '';\r\n\t\t}\r\n\t\tforeach ($this->results as $nr => $values){\r\n\t\t\t//t3lib_div::devLog('getQbaseResultLine values', 'ke_questionnaire Export Mod', 0, $values);\r\n\t\t\t$line[] = $values['uid'];\r\n\t\t}\r\n\t\treturn $delimeter.implode($parter,$line).$delimeter;\r\n\t}", "function close_bracket()\n {\n $this->ar_where[] = \")\"; \n return $this; \n }", "function close_group_where()\n {\n return $this->close_bracket(); \n }", "function tablerow_close() {\n $this->doc .= DOKU_LF.DOKU_TAB.'</tr>'.DOKU_LF;\n }", "function tabletbody_close() {\n $this->doc .= DOKU_TAB.'</tbody>'.DOKU_LF;\n }", "private function row_foot() {\n\t\t\t\n\t\t$row_foot = '<div class=\"adv_listing_mid\"><hr class=\"listing_divisor\" /></div>'.LB;\n\t\t\t\n\treturn $row_foot;\n\t}", "function singlequoteclosing() {\n global $lang;\n $this->doc .= $lang['singlequoteclosing'];\n }", "function prepareGridData($sql){\n $posStart = 0;\n \n $link = connectDatabase();\n\t\t$result = $link->query($sql);\n\t\t\n ob_clean();\n\t\theader(\"Content-type:text/xml\");\n\t\tprint(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\");\n\t\tprint(\"<rows total_count='\".$result->num_rows.\"' pos='\".$posStart.\"'>\");\n \n if ($result->num_rows > 0) {\n while($row = $result->fetch_row()) {\n print(\"<row id='\".$posStart.\"'>\");\n\n foreach ($row as $key => $value) {\n print(\"<cell><![CDATA[\");\n print($value);\n print(\"]]></cell>\");\n }\n\n print(\"</row>\");\n $posStart++;\n \n }\n } \n print(\"</rows>\");\n\t}", "public static function first_column_close() {\r\n\r\n echo '</div>';\r\n\r\n }", "function endTable()\n {\n if (! $this->tableIsOpen)\n die('ERROR: TABLE IS NOT STARTED');\n \n $this->documentBuffer .= \"</table>\\n\";\n \n $this->tableIsOpen = false;\n $this->tableLastRow = 0;\n }", "function unify_right_side_rows($connect,$right_side,$bindings) {\n\n print_psql(\"<unify_right_side_rows>\");\n print_psql(\"</unify_right_side_rows>\");\n}", "public static function second_column_close() {\r\n\r\n echo '</div>';\r\n\r\n }", "public function docbookFooter()\n {\n $output = <<<'EOS'\n </tbody>\n </tgroup>\n</table>\n\n</section>\n<!--\nvim:se ts=4 sw=4 et:\n-->\n\nEOS;\n\n return $output;\n }", "public function addTableFooter() {\n\t\t// auto width\n\t\tforeach ($this->tableParams['auto_width'] as $col)\n\t\t\t$this->xls->getActiveSheet()->getColumnDimensionByColumn($col)->setAutoSize(true);\n\t\t// filter (has to be set for whole range)\n\t\tif (count($this->tableParams['filter']))\n\t\t\t$this->xls->getActiveSheet()->setAutoFilter(PHPExcel_Cell::stringFromColumnIndex($this->tableParams['filter'][0]).($this->tableParams['header_row']).':'.PHPExcel_Cell::stringFromColumnIndex($this->tableParams['filter'][count($this->tableParams['filter']) - 1]).($this->tableParams['header_row'] + $this->tableParams['row_count']));\n\t\t// wrap\n\t\tforeach ($this->tableParams['wrap'] as $col)\n\t\t\t$this->xls->getActiveSheet()->getStyle(PHPExcel_Cell::stringFromColumnIndex($col).($this->tableParams['header_row'] + 1).':'.PHPExcel_Cell::stringFromColumnIndex($col).($this->tableParams['header_row'] + $this->tableParams['row_count']))->getAlignment()->setWrapText(true);\n\t}", "public function lastRow() {\n\t}", "public function outPutRow($row,&$parsed,&$lastIndent,&$blockedIndent,&$multilineString) {\n\t\t$indent = $this->getIndent($row);\n\t\tif ($blockedIndent>=0) {\n\t\t\tif ($indent==$blockedIndent) {\n\t\t\t\t$blockedIndent = -1;\n\t\t\t} else {\n\t\t\t\t$lastIndent = $indent;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif ($multilineString>=0) {\n\t\t\tif ($indent<=$multilineString) {\n\t\t\t\t$multilineString = -1;\n\t\t\t} else {\n\t\t\t\t$row = '| '.$row;\n\t\t\t}\n\t\t}\n\t\tif ($docType = $this->checkDocType($row)) {\n\t\t\t$parsed .= $docType.PHP_EOL;\n\t\t\t$lastIndent = $indent;\n\t\t\treturn;\n\t\t}\n\t\t$rowData = $this->analyzeRow($row);\n\t\tif (empty($rowData['tag']) && (!empty($rowData['classes']) || !empty($rowData['id']))) $rowData['tag'] = 'div';\n\t\tif (!empty($rowData['parentTag'])) {\n\t\t\t$parsed .= \"\\n\".str_repeat(\"\\t\",$indent).'<'.$rowData['parentTag'].'>';\n\t\t\t$this->htmlTree[$indent][] = $rowData['parentTag']; \n\t\t\t$indent++;\n\t\t}\n\t\tfor ($i=$lastIndent;$i>=$indent;$i--) {\n\t\t\tif (isset($this->htmlTree[$i])) {\n\t\t\t\tforeach ($this->htmlTree[$i] as $tag) {\n\t\t\t\t\tif ($i==$lastIndent && $tag != '!--[if' && preg_match('/<'.$tag.'([^\\n]*)>$/si',$parsed)) {\n\t\t\t\t\t\tif ($tag!='!DOCTYPE') $parsed = mb_substr($parsed,0,mb_strlen($parsed)-1).' />';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ($tag == '!--') $parsed .= \"\\n\".str_repeat(\"\\t\",$i).'-->';\n\t\t\t\t\t\telseif ($tag == '!--[if') $parsed .= \"\\n\".str_repeat(\"\\t\",$i).'<![endif]-->';\n\t\t\t\t\t\telseif ($tag == '?php') $parsed .= \"\\n\".str_repeat(\"\\t\",$i).'?>';\n\t\t\t\t\t\telse $parsed .= \"\\n\".str_repeat(\"\\t\",$i).'</'.$tag.'>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tunset($this->htmlTree[$i]);\n\t\t\t}\n\t\t\tif (isset($this->phpTree[$i])) {\n\t\t\t\tforeach ($this->phpTree[$i] as $p) {\n\t\t\t\t\t$parsed .= \"\\n\".str_repeat(\"\\t\",$i).'<?php } ?>';\n\t\t\t\t}\n\t\t\t\tunset($this->phpTree[$i]);\n\t\t\t}\n\t\t}\n\t\tif (!empty($rowData['blocked'])) {\n\t\t\t$lastIndent = $indent;\n\t\t\t$blockedIndent = $indent;\n\t\t}\n\t\tif (!empty($rowData['multiline'])) {\n\t\t\t$multilineString = $indent;\n\t\t}\n\t\tif (!empty($rowData['tag'])) {\n\t\t\t$this->htmlTree[$indent][] = $rowData['tag'];\n\t\t\t$parsed .= \"\\n\".str_repeat(\"\\t\",$indent).'<'.$rowData['tag'];\n\t\t\tif ($rowData['tag']=='!--[if') {\n\t\t\t\t$parsed .= ' '.$rowData['commentCondition'].']';\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tif (!empty($rowData['id'])) $rowData['params']['id'] = $rowData['id'];\n\t\t\tif (!empty($rowData['classes'])) {\n\t\t\t\tif (empty($rowData['params']['class'])) $rowData['params']['class'] = '';\n\t\t\t\tforeach ($rowData['classes'] as $class) {\n\t\t\t\t\t$rowData['params']['class'] = trim($rowData['params']['class'].' '.$class);\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\tif (!empty($rowData['params'])) {\n\t\t\t\tforeach ($rowData['params'] as $param=>$value) {\n\t\t\t\t\t$aps = is_numeric($value)?'':'\"';\n\t\t\t\t\t$value = preg_replace('/(\\'\\|(.+?)\\|\\'|\"\\|(.+?)\\|\")/','<?php echo $2$3; ?>',$value);\n\t\t\t\t\tif (!empty($rowData['iEsc'])) {\n\t\t\t\t\t\tforeach ($rowData['iEsc'] as $k=>$v) {\n\t\t\t\t\t\t\t$value = preg_replace('/_-_-'.$k.'-_-_/','<?php echo '.$v.'; ?>',$value);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\t$parsed .= ' '.$param.'='.$aps.$value.$aps;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($rowData['tag'] == '!DOCTYPE') {\n\t\t\t\t$parsed .= $rowData['content'];\n\t\t\t\t$rowData['content'] = null;\n\t\t\t}\n\t\t\tif ($rowData['tag'] != '!--' && $rowData['tag'] != '?php') $parsed .= '>';\n\t\t}\n\t\tif (!empty($rowData['content'])) {\n\n\t\t\t$indentTemp = (!empty($rowData['tag']))?str_repeat(\"\\t\",$indent+1):str_repeat(\"\\t\",$indent);\n\t\t\t$rowData['content'] = preg_replace('/(\\'\\|(.+?)\\|\\'|\"\\|(.+?)\\|\")/','<?php echo $2$3; ?>',$rowData['content']);\n\t\t\t\n\t\t\tif (preg_match('/^\\| *(.+)/',$rowData['content'],$content)) {\n\t\t\t\t$parsed .= \"\\n\".$indentTemp.str_replace(' ','&nbsp;&nbsp;',$content[1]);\n\t\t\t} elseif (preg_match('/^= *(.+)/',$rowData['content'],$content)) {\n\t\t\t\t$parsed .=\"\\n\".$indentTemp.'<?php echo '.$content[1].'; ?>';\n\t\t\t} elseif (preg_match('/^- *(.+?)(:)*$/',$rowData['content'],$content)) {\n\t\t\t\t$ending = (!empty($content[2]))?' {':';';\n\t\t\t\tif ($ending == ' {') {\n\t\t\t\t\t$this->phpTree[$indent][] = 1;\n\t\t\t\t}\n\t\t\t\tif (preg_match('/<\\?php } \\?>$/',$parsed) && preg_match('/^ *else/',$content[1])) {\n\t\t\t\t\t$parsed = preg_replace('/<\\?php } \\?>$/','<?php } '.$content[1].$ending.' ?>',$parsed);\n\t\t\t\t} else {\n\t\t\t\t\t$parsed .=\"\\n\".$indentTemp.'<?php '.$content[1].$ending.' ?>';\n\t\t\t\t}\t\t\t\t\n\t\t\t} else {\n\t\t\t\t$parsed .= \"\\n\".$indentTemp.str_replace(' ','&nbsp;&nbsp;',$rowData['content']);\n\t\t\t}\n\t\t}\n\t\t$lastIndent = $indent;\n\t}", "function Latex_Table_Multi_Row($nrows,$text)\n {\n if ($nrows>1)\n {\n $text=\n \"\\\\multirow\".\n \"{\".\n $nrows.\n \"}{*}\".\n \"{\".\n $text.\n \"}\";\n }\n \n return $text;\n }", "protected function end() {\n // must have space after it\n return 'END ';\n }", "function clearSQL($sql, &$isMultiComment){\r\n if ($isMultiComment) {\r\n if (preg_match('#\\*/#sUi', $sql)) {\r\n $sql = preg_replace('#^.*\\*/\\s*#sUi', '', $sql);\r\n $isMultiComment = false;\r\n } else {\r\n $sql = '';\r\n }\r\n if(trim($sql) == ''){\r\n return $sql;\r\n }\r\n }\r\n\r\n $offset = 0;\r\n while (preg_match('{--\\s|#|/\\*[^!]}sUi', $sql, $matched, PREG_OFFSET_CAPTURE, $offset)) {\r\n list($comment, $foundOn) = $matched[0];\r\n if (isQuoted($foundOn, $sql)) {\r\n $offset = $foundOn + strlen($comment);\r\n } else {\r\n if (substr($comment, 0, 2) == '/*') {\r\n $closedOn = strpos($sql, '*/', $foundOn);\r\n if ($closedOn !== false) {\r\n $sql = substr($sql, 0, $foundOn) . substr($sql, $closedOn + 2);\r\n } else {\r\n $sql = substr($sql, 0, $foundOn);\r\n $isMultiComment = true;\r\n }\r\n } else {\r\n $sql = substr($sql, 0, $foundOn);\r\n break;\r\n }\r\n }\r\n }\r\n return $sql;\r\n}", "function poco_product_columns_wrapper_close() {\n echo '</div>';\n }", "function endChildren()\n {\n echo \"</tr>\" . \"\\n\";\n }", "function tabletfoot_close() {\n $this->doc .= DOKU_TAB.'</tfoot>'.DOKU_LF;\n }", "protected static function afterGetFromDB(&$row){}", "function\tendTable() {\n\n\t\t/**\n\t\t *\n\t\t */\n\t\t$frm\t=\t$this->myDoc->currMasterPage->getFrameByFlowName( \"Auto\") ;\n\t\tfor ( $actRow=$this->myTable->getFirstRow( BRow::RTFooterTE) ; $actRow !== FALSE ; $actRow=$this->myTable->getNextRow()) {\n\t\t\t$this->punchTableRow( $actRow) ;\n\t\t}\n\t\t$frm->currVerPos\t+=\t$this->myTable->currVerPos ;\n\t\t$frm->currVerPos\t+=\t1.5 ;\t\t// now add the height of everythign we have output'\n\n\t\t/**\n\t\t * if there's less than 20 mm on this page\n\t\t *\tgoto next page\n\t\t */\n//\t\t$remHeight\t=\t$frm->skipLine(\t$this->myTablePar) ;\n//\t\tif ( $remHeight < mmToPt( $this->saveZone)) {\n//\t\t\t$this->tableFoot() ;\n//\t\t\t$this->myDoc->newPage() ;\n//\t\t\t$this->tableHead() ;\n//\t\t}\n\t}", "private function writeMergedCells(): void\n {\n $mergeCells = $this->phpSheet->getMergeCells();\n $countMergeCells = count($mergeCells);\n\n if ($countMergeCells == 0) {\n return;\n }\n\n // maximum allowed number of merged cells per record\n $maxCountMergeCellsPerRecord = 1027;\n\n // record identifier\n $record = 0x00E5;\n\n // counter for total number of merged cells treated so far by the writer\n $i = 0;\n\n // counter for number of merged cells written in record currently being written\n $j = 0;\n\n // initialize record data\n $recordData = '';\n\n // loop through the merged cells\n foreach ($mergeCells as $mergeCell) {\n ++$i;\n ++$j;\n\n // extract the row and column indexes\n $range = Coordinate::splitRange($mergeCell);\n [$first, $last] = $range[0];\n [$firstColumn, $firstRow] = Coordinate::indexesFromString($first);\n [$lastColumn, $lastRow] = Coordinate::indexesFromString($last);\n\n $recordData .= pack('vvvv', $firstRow - 1, $lastRow - 1, $firstColumn - 1, $lastColumn - 1);\n\n // flush record if we have reached limit for number of merged cells, or reached final merged cell\n if ($j == $maxCountMergeCellsPerRecord || $i == $countMergeCells) {\n $recordData = pack('v', $j) . $recordData;\n $length = strlen($recordData);\n $header = pack('vv', $record, $length);\n $this->append($header . $recordData);\n\n // initialize for next record, if any\n $recordData = '';\n $j = 0;\n }\n }\n }", "function table_end(){\n\techo '</table>';\n}", "public function get_end_cursor()\n {\n }", "public function fetchSqlString();", "function FetchRow() {}", "function render() {\n\t\t$sql = array();\n\t\tforeach ($this->stmts as $type => $stmts) {\n\t\t\tswitch($type) {\n\t\t\t\tcase \"select\":\n\t\t\t\tcase \"select distinct\":\n\t\t\t\t\t$sql[] = strToUpper($type) . \" \" . implode($stmts, \"\\n\") . \" FROM \".implode($this->from, \", \");\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$sql[] = implode($stmts, \"\\n\");\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn implode($sql, \"\\n\").\";\";\n\t}", "private function createTableFooter() {\n\t\treturn \"</table>\\n\";\n\t}", "abstract protected function buildSQL(): string;", "public function make_sql()\n\t{\n\t\ttry{\n\t\t\t$metot = $this->metot;\n\t\t\t$metot = strtolower($metot);\n\t\t\t\n\t\t\tif($metot == \"select\") /* Select için sql oluşturma*/\n\t\t\t{\n\t\t\t\tif ((count($this->tables))== 1)\n\t\t\t\t{\n\t\t\t\t\tfor ($c=1;$c<=(count($this->tables[0])-1);$c++){\n\t\t\t\t\t$col .= $this->tables[0][$c].\", \";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$col = trim($col);\n\t\t\t\t\t$col = substr(\"$col\", 0, -1);\n\t\t\t\t\t$table = $this->tables[0][0]; \n\t\t\t\t\t/*\n\t\t\t\t\t\tvar_dump($col);\n\t\t\t\t\t\tvar_dump($table);\n\t\t\t\t\t\tstring 'id, adsoyad' (length=12)\n\t\t\t\t\t\tstring 'email' (length=5)\n\t\t\t\t\t*/\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tforeach ($this->tables AS $row){\n\t\t\t\t\t\t$table = $row[0];\n\t\t\t\t\t\tfor($c=1; $c<=(count($row)-1);$c++){\n\t\t\t\t\t\t\t$var = trim($row[$c]);\n\t\t\t\t\t\t\t$col .= \"{$table}.{$var}, \";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$col = trim($col);\n\t\t\t\t\t$col = substr($col, 0, -1);\n\t\t\t\t\t$table = $this->tables[0][0]; \n\t\t\t\t\t/*\n\t\t\t\t\t\tvar_dump($col);\n\t\t\t\t\t\tvar_dump($table);\n\t\t\t\t\t\tstring 'email.id, email.adsoyad, blog.id, blog.title' (length=44)\n\t\t\t\t\t\tstring 'email' (length=5)\n\t\t\t\t\t*/\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!is_null($this->join)){\n\t\t\t\t\tforeach($this->join AS $row) {$join .=\" $row \";}\n\t\t\t\t}\n\t\t\t\telse $join = \"\";\n\t\t\t\t\n\t\t\t\tif (!is_null($this->where)) $where = $this->where;\n\t\t\t\telse $where =\"\";\n\t\t\t\t\n\t\t\t\tif (!is_null($this->order)) $order = $this->order;\n\t\t\t\telse $order =\"\";\n\t\t\t\t\n\t\t\t\tif (!is_null($this->group)) $group = $this->group;\n\t\t\t\telse $group =\"\";\n\t\t\t\t\n\t\t\t\tif (!is_null($this->limit)) $limit = $this->limit;\n\t\t\t\telse $limit =\"\";\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$this->sql = $this->metot.\" \". $col.\" FROM \".$table.\" \".$join.\" \".$where.\" \".$group.\" \".$order.\" \".$limit;\n\t\t\t\t/*var_dump($this->sql); string 'SELECT id, adsoyad FROM email WHERE email.id=35 ' (length=53)*/\n\t\t\t} /*if($metot == \"select\")*/\n\t\t\t\n\t\t\tif($metot == \"insert\") /* Insert için sql oluşturma*/\n\t\t\t{\n\t\t\t\tforeach ($this->tables AS $row)\n\t\t\t\t{\n\t\t\t\t\t$table = $row[0];\n\t\t\t\t\t$col = \"\";\n\t\t\t\t\t$colVal = \"\";\n\t\t\t\t\tfor ($c=1;$c<=(count($row)-1);$c++)\n\t\t\t\t\t{\n\t\t\t\t\t\t$col \t.= strstr($row[$c], \"=\", true).\", \";\n\t\t\t\t\t\t$colVal .= substr((strstr($row[$c], \"=\")), 1).\", \";\n\t\t\t\t\t}\n\t\t\t\t\t$col = trim($col);\n\t\t\t\t\t$col = substr($col, 0, -1);\n\t\t\t\t\t$colVal = trim($colVal);\n\t\t\t\t\t$colVal = substr($colVal, 0, -1);\n\t\t\t\t\t\n\t\t\t\t\t$sql[] = \"INSERT INTO {$table} ($col) VALUES ($colVal) \";\n\t\t\t\t}\n\t\t\t\t$this->sql = $sql;\n\t\t\t} /*if($metot == \"insert\")*/\n\t\t\t\n\t\t\tif ($metot == \"update\") /* Update için sql oluşturma*/\n\t\t\t{\n\t\t\t\tif (!is_null($this->where)) $where = $this->where;\n\t\t\t\telse $where =\"\";\n\t\t\t\t\n\t\t\t\tforeach ($this->tables AS $row)\n\t\t\t\t{\n\t\t\t\t\t$table = $row[0];\n\t\t\t\t\t$col = \"\";\n\t\t\t\t\t$colVal = \"\";\n\t\t\t\t\tfor ($c=1;$c<=(count($row)-1);$c++)\n\t\t\t\t\t{\n\t\t\t\t\t\t$col \t.= $row[$c].\", \";\n\t\t\t\t\t}\n\t\t\t\t\t$col = trim($col);\n\t\t\t\t\t$col = substr($col, 0, -1);\n\t\t\t\t\t$sql[] = \"UPDATE {$table} SET {$col} {$where}\";\n\t\t\t\t}\n\t\t\t\t$this->sql = $sql;\n\t\t\t} /*if ($metot == \"update\")*/\n\t\t\t\n\t\t\tif ($metot == \"delete\") /* Delete için sql oluşturma*/\n\t\t\t{\n\t\t\t\tif (!is_null($this->where)) $where = $this->where;\n\t\t\t\telse $where =\"\";\n\t\t\t\t\n\t\t\t\tforeach ($this->tables AS $row)\n\t\t\t\t{\n\t\t\t\t\t$table = $row[0];\n\t\t\t\t\t$col = \"\";\n\t\t\t\t\t$colVal = \"\";\n\t\t\t\t\tfor ($c=1;$c<=(count($row)-1);$c++)\n\t\t\t\t\t{\n\t\t\t\t\t\t$table = $row[0];\n\t\t\t\t\t\t$col = \"\";\n\t\t\t\t\t\t$colVal = \"\";\n\t\t\t\t\t\tfor ($c=1;$c<=(count($row)-1);$c++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$col \t.= strstr($row[$c], \"=\", true).\", \";\n\t\t\t\t\t\t\t$colVal .= substr((strstr($row[$c], \"=\")), 1).\", \";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$col = trim($col);\n\t\t\t\t\t\t$col = substr($col, 0, -1);\n\t\t\t\t\t\t$colVal = trim($colVal);\n\t\t\t\t\t\t$colVal = substr($colVal, 0, -1);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$sql[] = \"DELETE FROM {$table} WHERE ($col) = ($colVal) \";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->sql = $sql;\n\t\t\t} /*if ($metot == \"delete\")*/\n\t\t\t\n\t\t\t$this->run();\n\t\t}\n\t\tcatch(Exception $e){\n\t\t\techo \"Error : \".$e->getMessage() .\"<br/>\".\"File : \".$e->getFile() . \"<br/>\".\"Line : \".$e->getLine() . \"<br/>\";\n\t\t}\n\t}", "function doublequoteclosing() {\n global $lang;\n $this->doc .= $lang['doublequoteclosing'];\n }", "protected function db_end() {\n\t\t\tif ( 'off' === $this->mysql_set ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$this->output_string = '';\n\n\t\t\t$this->output_string .= \"/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\\n\";\n\t\t\t$this->output_string .= \"/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;\\n\";\n\t\t\t$this->output_string .= \"/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;\\n\";\n\n\t\t\t$this->write_output();\n\t\t}", "private function getPositionSubSql() {\n\t\t$table = $this->query->getTableMap()::TABLE_NAME;\n\t\t$sql = \"SELECT Arcucustid, ar3pacctnbr, @rownum := @rownum + 1 AS position FROM $table\";\n\t\t$whereClause = $this->getWhereClauseString();\n\t\tif (empty($whereClause) === false) {\n\t\t\t$sql .= ' WHERE ' . $whereClause;\n\t\t}\n\t\treturn $sql;\n\t}", "public function fetchRow();", "protected function _renderBodyEnd()\n\t{\n\t\treturn ''\n\t\t\t. \"\\n\" . Html::endTag( 'div' );\n\t}", "abstract function getSQL();", "public function getMagicSqlSubQuery(): string;", "public function Next()\n {\n //TODO: SQL Statement passt nach meiner Meinung nach noch nicht immer\n }", "public function Next()\n {\n //TODO: SQL Statement passt nach meiner Meinung nach noch nicht immer\n }", "public function Next()\n {\n //TODO: SQL Statement passt nach meiner Meinung nach noch nicht immer\n }", "function listcontent_close() {\n $this->doc .= '</div>'.DOKU_LF;\n }", "function OutputCell($width,$height,$htmlContent,$border=0,$LineFeedHeight=0,$align='',$fill=0,$cellmargin=3){\r\n\t$this->Cell($width, $height, '', $border, 0, $align, $fill);\r\n\t// on note la position apres la cellule\r\n\t$x = $this->x; $y = $this->y;\r\n\t$lmargin = $this->lMargin;\r\n\t$rmargin = $this->rMargin;\r\n\r\n\t// on se remet en debut de cellule\r\n\t$this->x-=$width;\r\n\t$this->x = $this->x+$cellmargin/2;\r\n\t$this->lMargin = $this->x; // pour que les retour ligne se fassent correctement dans la cellule\r\n\t$this->rMargin = $this->w-$this->x-$width+$cellmargin/2;\r\n\r\n\t$this -> WriteHTML($htmlContent,$LineFeedHeight);\r\n\t// on se remet a la fin de la cellule\r\n\t$this->x = $x; $this->y = $y;\r\n\t$this->lMargin = $lmargin;\r\n\t$this->rMargin = $rmargin;\r\n}", "public function lastCol() {\n\t}", "protected function renderBodyEnd()\n {\n return $this->body . \"\\n\";\n }", "protected function renderBodyEnd()\n {\n return $this->body . \"\\n\";\n }", "public function execute()\n\t{\n\t\t$insert = $this->offer_cells($this->ns, $this->table, $this->mutateSpec, $this->cells);\n\t\t$this->table = NULL;\n\t\t$this->cells = array();\n\t\t$this->mutateSpec = NULL;\n\t\treturn $insert;\n\t}", "function DBFooter($lf, &$dbh)\n {\n printf(\"%sQueries: %d | Time required: %5.3fs%s\",$lf,$dbh->GetQueryCount(),$dbh->GetQueryTime(),$lf);\n }", "function yy_r71(){ $this->_retvalue = new Stmt\\Join('INNER', $this->yystack[$this->yyidx + 0]->minor); }", "public function fetchRow($sql);", "public function fetchRow($sql);", "abstract public function FetchRow();", "function AggregateListRow() {\n\t}", "private function generateRowsCharacters()\n {\n $this->rowsCharacters->add([\"+\"]);\n $rowIndex = 1;\n while ($this->shapeIsNotComplete($rowIndex)) {\n $row = $this->getRow($rowIndex);\n $this->rowsCharacters->add($row);\n $rowIndex++;\n }\n }", "function deleted_close() {\n $this->doc .= '</del>';\n }", "public function getEndColumn()\n {\n return $this->end_column;\n }", "function build_html_table_bottom(){\n\t\t\n\t\t$output = '';\n\t\t\n\t\t$output .= '\n\t\t\t\t\t</table>';\n\t\t\n\t\treturn $output;\n\t\t\n\t}", "public static function end()\n\t{\n\t\treturn '\n\t\t</div>\n\t</div>\n</div>\n<!-- CE: End Pagination -->\n';\n\t}", "function getQBaseLine($free_cells,$question,$answer=array(),$subquestion=0,$column=array(),$dem_field=''){\r\n\t\t//t3lib_div::devLog('getQBaseLine', 'ke_questionnaire Export Mod', 0, array('free'=>$free_cells,'q'=>$question,'type'=>$type,'answer'=>$answer,'subq'=>$subquestion,'col'=>$column,$dem_field));\r\n\t\tglobal $LANG;\r\n\t\t$type = $question['type'];\r\n\r\n\t\t$delimeter = $this->extConf['CSV_qualifier'];\r\n\t\t$parter = $delimeter.$this->extConf['CSV_parter'].$delimeter;\r\n\t\t$line = array();\r\n\t\tfor ($i = 0;$i < $free_cells;$i ++){\r\n\t\t\t$line[] = '';\r\n\t\t}\r\n\r\n\t\t$line_add = '';\r\n\t\t$take = $question['data'];\r\n\t\t\t\t\r\n $question = $question['uid'];\r\n\t\tswitch($type){\r\n\t\t\tcase 'authcode': $line[] = '';\r\n\t\t\t\t\t//t3lib_div::devLog('qbaseline', 'ke_questionnaire Export Mod', 0, $take);\r\n\t\t\t\t\tforeach ($this->results as $nr => $r_data){\r\n\t\t\t\t\t\t$result_id = $r_data['uid'];\r\n\t\t\t\t\t\t$take['results'][$result_id] = str_replace($delimeter,$delimeter.$delimeter,$take['results'][$result_id]);\r\n\t\t\t\t\t\t$line[] = $take['results'][$result_id];\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'fe_user': $line[] = '';\r\n\t\t\t\t\t//t3lib_div::debug($take,'take');\r\n\t\t\t\t\t//t3lib_div::debug($question,'question');\r\n\t\t\t\t\tforeach ($this->results as $nr => $r_data){\r\n\t\t\t\t\t\t$result_id = $r_data['uid'];\r\n\t\t\t\t\t\t$take['results'][$result_id] = str_replace($delimeter,$delimeter.$delimeter,$take['results'][$result_id]);\r\n\t\t\t\t\t\t$line[] = $take['results'][$result_id];\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'start_tstamp': $line[] = '';\r\n\t\t\t\t\t//t3lib_div::devLog('results '.$q_nr, 'ke_questionnaire Export Mod', 0, $this->results);\r\n\t\t\t\t\tforeach ($this->results as $nr => $r_data){\r\n\t\t\t\t\t\t$result_id = $r_data['uid'];\r\n\t\t\t\t\t\t$take['results'][$result_id] = str_replace($delimeter,$delimeter.$delimeter,$take['results'][$result_id]);\r\n\t\t\t\t\t\t$line[] = $take['results'][$result_id];\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'finished_tstamp': $line[] = '';\r\n\t\t\t\t\tforeach ($this->results as $nr => $r_data){\r\n\t\t\t\t\t\t$result_id = $r_data['uid'];\r\n\t\t\t\t\t\t$take['results'][$result_id] = str_replace($delimeter,$delimeter.$delimeter,$take['results'][$result_id]);\r\n\t\t\t\t\t\t$line[] = $take['results'][$result_id];\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'open':\t$line[] = '';\r\n\t\t\t\t\tforeach ($this->results as $nr => $r_data){\r\n\t\t\t\t\t\t$result_id = $r_data['uid'];\r\n\t\t\t\t\t\t$take['results'][$result_id] = str_replace($delimeter,$delimeter.$delimeter,$take['results'][$result_id]);\r\n\t\t\t\t\t\t$line[] = $take['results'][$result_id];\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'closed': $line[] = $answer['title'];\r\n\t\t\t\t\tif (is_array($take)){\r\n\t\t\t\t\t\t//t3lib_div::devLog('getQbaseLine take '.$question, 'ke_questionnaire Export Mod', 0, $take);\r\n\t\t\t\t\t\tforeach ($this->results as $nr => $r_data){\r\n\t\t\t\t\t\t\t$result_id = $r_data['uid'];\r\n\t\t\t\t\t\t\t//t3lib_div::devLog('getQbaseLine take '.$result_id, 'ke_questionnaire Export Mod', 0, $take['answers'][$answer['uid']]['results']);\r\n\t\t\t\t\t\t\tif ($take['answers'][$answer['uid']]['results'][$result_id]){\r\n\t\t\t\t\t\t\t\t$take['answers'][$answer['uid']]['results'][$result_id] = str_replace($delimeter,$delimeter.$delimeter,$take['answers'][$answer['uid']]['results'][$result_id]);\r\n\t\t\t\t\t\t\t\t$line[] = $take['answers'][$answer['uid']]['results'][$result_id];\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$line[] = '';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$line[] = '';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t/*if (is_array($take['answers'][$answer['uid']]['results'])){\r\n\t\t\t\t\t\t//t3lib_div::devLog('getQbaseLine take '.$question, 'ke_questionnaire Export Mod', 0, $take);\r\n\t\t\t\t\t\tforeach ($results as $nr => $result_id){\r\n\t\t\t\t\t\t\t//t3lib_div::devLog('getQbaseLine take '.$result_id, 'ke_questionnaire Export Mod', 0, $take['answers'][$answer['uid']]['results']);\r\n\t\t\t\t\t\t\tif ($take['answers'][$answer['uid']]['results'][$result_id]){\r\n\t\t\t\t\t\t\t\t$take['answers'][$answer['uid']]['results'][$result_id] = str_replace($delimeter,$delimeter.$delimeter,$take['answers'][$answer['uid']]['results'][$result_id]);\r\n\t\t\t\t\t\t\t\t$line[] = $take['answers'][$answer['uid']]['results'][$result_id];\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$line[] = '';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$line[] = '';\r\n\t\t\t\t\t}*/\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'dd_pictures': $line[] = $answer['title'];\r\n\t\t\t\t\tif (is_array($take)){\r\n\t\t\t\t\t\t//t3lib_div::devLog('getQbaseLine take '.$question, 'ke_questionnaire Export Mod', 0, $take);\r\n\t\t\t\t\t\tforeach ($this->results as $nr => $r_data){\r\n\t\t\t\t\t\t\t$result_id = $r_data['uid'];\r\n\t\t\t\t\t\t\t//t3lib_div::devLog('getQbaseLine take '.$result_id, 'ke_questionnaire Export Mod', 0, $take['answers'][$answer['uid']]['results']);\r\n\t\t\t\t\t\t\tif ($take['answers'][$answer['uid']]['results'][$result_id]){\r\n\t\t\t\t\t\t\t\t$take['answers'][$answer['uid']]['results'][$result_id] = str_replace($delimeter,$delimeter.$delimeter,$take['answers'][$answer['uid']]['results'][$result_id]);\r\n\t\t\t\t\t\t\t\t$line[] = $take['answers'][$answer['uid']]['results'][$result_id];\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$line[] = '';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$line[] = '';\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'semantic':\r\n\t\t\tcase 'matrix': $line[] = $column['title'];\r\n\t\t\t\t\tif(is_array($take['subquestions'][$subquestion]['columns'][$column['uid']]['results'])){\r\n\t\t\t\t\t\tforeach ($this->results as $nr => $r_data){\r\n\t\t\t\t\t\t\t$result_id = $r_data['uid'];\r\n\t\t\t\t\t\t\tif ($take['subquestions'][$subquestion]['columns'][$column['uid']]['results'][$result_id]){\r\n\t\t\t\t\t\t\t\t$take['subquestions'][$subquestion]['columns'][$column['uid']]['results'][$result_id] = str_replace($delimeter,$delimeter.$delimeter,$take['subquestions'][$subquestion]['columns'][$column['uid']]['results'][$result_id]);\r\n\t\t\t\t\t\t\t\t$line[] = $take['subquestions'][$subquestion]['columns'][$column['uid']]['results'][$result_id];\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$line[] = '';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$line[] = '';\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'demographic': $line[] = $dem_field;\r\n\t\t\t\t\t//t3lib_div::devLog('getCSVQBase line '.$type.' - '.$dem_field, 'ke_questionnaire Export Mod', 0, $take);\r\n\t\t\t\t\tif (is_array($take['fe_users'][$dem_field]['results'])){\r\n\t\t\t\t\t\tforeach ($this->results as $nr => $r_data){\r\n\t\t\t\t\t\t\t$result_id = $r_data['uid'];\r\n\t\t\t\t\t\t\tif ($take['fe_users'][$dem_field]['results'][$result_id]){\r\n\t\t\t\t\t\t\t\t//t3lib_div::devLog('getCSVQBase line '.$result_id, 'ke_questionnaire Export Mod', 0, $take['fe_users'][$dem_field]);\r\n\t\t\t\t\t\t\t\t$take['fe_users'][$dem_field]['results'][$result_id] = str_replace($delimeter,$delimeter.$delimeter,$take['fe_users'][$dem_field]['results'][$result_id]);\r\n\t\t\t\t\t\t\t\t$take['fe_users'][$dem_field]['results'][$result_id] = preg_replace('#[\\r\\n\\t]#', ' ', $take['fe_users'][$dem_field]['results'][$result_id]);\r\n\t\t\t\t\t\t\t\t$take['fe_users'][$dem_field]['results'][$result_id] = preg_replace('# {2,}#', ' ', $take['fe_users'][$dem_field]['results'][$result_id]);\r\n\t\t\t\t\t\t\t\t$line[] = strip_tags(nl2br($take['fe_users'][$dem_field]['results'][$result_id]));\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$line[] = '';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\t//t3lib_div::devLog('getCSVQBase line '.$type, 'ke_questionnaire Export Mod', 0, $line);\r\n\t\treturn $delimeter.implode($parter,$line).$delimeter.\"\\n\";\r\n\t}", "function yy_r68(){ $this->_retvalue = new Stmt\\Join('INNER', $this->yystack[$this->yyidx + -1]->minor); }", "public function flush() {\n if (empty($this->_row) or empty($this->_row['line']['normal'])) {\n // Nothing to print - each line has to have at least number\n $this->_row = array();\n foreach ($this->columns as $col) {\n $this->_row[$col] = array('normal'=>'', 'info'=>'', 'warning'=>'', 'error'=>'');\n }\n return;\n }\n $ci = 0;\n $ri = 1;\n echo '<tr class=\"r'.$ri.'\">';\n foreach ($this->_row as $key=>$field) {\n foreach ($field as $type=>$content) {\n if ($field[$type] !== '') {\n $field[$type] = '<span class=\"uu'.$type.'\">'.$field[$type].'</span>';\n } else {\n unset($field[$type]);\n }\n }\n echo '<td class=\"cell c'.$ci++.'\">';\n if (!empty($field)) {\n echo implode('<br />', $field);\n } else {\n echo '&nbsp;';\n }\n echo '</td>';\n }\n echo '</tr>';\n foreach ($this->columns as $col) {\n $this->_row[$col] = array('normal'=>'', 'info'=>'', 'warning'=>'', 'error'=>'');\n }\n }", "function sql_batching($sql,$batch_page,$param,$per_page=5,$max_rec=10,$main=0,$start=0) \n\t{\n\t\t$i=0;\n\t\t$temp=0;\n\n\t\t\n\t\t$PER_PAGE=$per_page;\t//DEFINE HOW MANY PAGES TO DISPLAY PER PAGE.\n\t\t$MAX_REC=$max_rec;\t\t//DEFINE HOW MANY ROWS TO DISPALY PER PAGE.\n\n\t\t$cols=count($tbl_heading)+1 ;\n\t\t$selectResult = $this->conn->sql($sql);\n\t\tif(($selectResult)>0)\n\t\t\t$count=mysql_num_rows($selectResult);\n \n\t\telse{\tdie(\"No Data Available\");\t}\n\t\t //print \"count is................\".$count;\n\t\t//variables to display the total number of pages .\n\t\tif(($count%$MAX_REC)==0)\n\t\t{\n\t\t\t$totalPages=($count/$MAX_REC);\n\t\t}\n\t\telse \n\t\t\tif(($count%$MAX_REC)!=0)\n\t\t\t{\n\t\t\t\t$totalPages=(int)($count/$MAX_REC)+1;\n\t\t\t}\n\n\n\t\t$page=(int)($start/$MAX_REC)+1;\n\n\t\t\n\n\t\t$batch_sql=$sql.\" LIMIT \".($start).\", \".$MAX_REC;\n\t\t\n\n\t\t$selectResult = $this->conn->sql($batch_sql) or die (\"Could not select data\");\n\n\t\t//the batched result set\t\t\t\t \t\n\t\t$this->resultset = $selectResult;\n\t\t\n\t\t\n\t\tif(mysql_num_rows($selectResult)>0)\n\t\t{\n\t\t\t\n\t\t\t$this->tmp_present=$start+1;\n\t\t\t\n\n\t\t\t//print \"<table cellspacing='1' cellpadding='2' border='0' width='100%'>\";\n\t\t\t\n\t\t\t//print \"<tr><td colspan='$cols' align='right'>Page $page of $totalPages</td></tr>\";\n\t\t\t\n\t\t\t\n\t\t\t$this->currentpage=$page;\n\t\t\t\n\t\t\t\n\t\t\t$this->noTotalpage=$totalPages;\n\t\t\t\n\n\t\t\t//if($tbl_main_head)\n\t\t\t//\tprint \"<tr><td colspan='$cols' class='$td_color' align=\\\"center\\\">$tbl_main_head</td><tr>\";\n\t\t\t/*print \"<tr>\";\n\t\t\tprint \"\t<td class='$td_color' aling='center'>Sno.</td>\";\n\t\t\tfor($i=0;$i<count($tbl_heading);$i++)\n\t\t\t\tprint \" <td class='$td_color' aling='center'>$tbl_heading[$i]</td>\";\n\t\t\tprint \"</tr>\";*/\n\t\t\t/*while($row=mysql_fetch_row($selectResult))\n\t\t\t{\n\t\t\t\tprint \"<tr>\";\n\t\t\t\tprint \"<td class='$bg_color'>\".$tmp_present++.\"</td>\";\n\t\t\t\tfor($j=0;$j<count($tbl_heading);$j++)\n\t\t\t\t\tprint \"<td class='$bg_color'>$row[$j]</td>\";\n\t\t\t\tprint \"</tr>\";\n\t\t\t}*/\n\t\t\t//print \"<tr>\";\n\t\t\t//print \"<td colspan='$cols' align='center' class='$bg_color'>\";\n\n\t\t\t\n\n\n\t\t\t\t//$page=(int)($start/$MAX_REC)+1;\n\t\t\t\t\n\t\t\t\tif($main!=0){\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$this->navigationbar .= \"<a href='$batch_page?$this->mainvar=\".($main-1).\"&$this->startvar=\".((($main-1)*$MAX_REC*$PER_PAGE)+($PER_PAGE-1)*$MAX_REC).\"&$this->countvar=\".$count.\"&$param'><font color='blue'>Previous</font></a>&nbsp;&nbsp;\";\t\n\t\t\t\t\t\n\t\t\t\t\tfor($i=(1+($main*$PER_PAGE));$i<(1+($main*$PER_PAGE))+$PER_PAGE;$i++){\n\t\t\t\t\t\n\t\t\t\t\t\tif($i==$page){\n\t\t\t\t\t\t\t$this->navigationbar .=\"<font color='red'><b>\".$i.\"</b></font>&nbsp;&nbsp;\";\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tif($i<=$totalPages){\n\t\t\t\t\t\t\t\t$this->navigationbar .= \"<a href='$batch_page?$this->mainvar=\".$main.\"&$this->startvar=\".(($i*$MAX_REC)-$MAX_REC).\"&$this->countvar=\".$count.\"&$param'>\".$i.\"</a>&nbsp;&nbsp;\";\t\n\n\n\t\t\t\t\t\t\t\t/*if(($start==($count-$MAX_REC))){\n\t\t\t\t\t\t\t\t\t$i=$i+1;\n\t\t\t\t\t\t\t\t\tprint \"<a href='index.php?main=\".$main.\"&start=\".(($i*$MAX_REC)-$MAX_REC).\"&count=\".$count.\"'>\".$i.\"</a>&nbsp;&nbsp;\";\t\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}*/\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\t\t\t\t\t\t\t//end of if($i==$page)\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\t\t\t\t\t\t\t\t\t//end for\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t } //end if main\n\t\t\t\t\n\t\t\t\telse{\n\t\t\t\t\tfor($i=(1+($main*3));$i<(1+($main*$PER_PAGE))+$PER_PAGE;$i++){\n\t\t\t\t\t \tif($i==$page){\n\t\t\t\t\t\t\t$this->navigationbar .= \"<font color='red'><b>\".$i.\"</b></font>&nbsp;&nbsp;\";\n\t\t\t\t\t\t\t//print $this->navigationbar;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\t\t\t\t\n\t\t\t\t\t\t\tif($i<=$totalPages){\n\t\t\t\t\t\t\t$this->navigationbar .= \"<a href='$batch_page?$this->mainvar=\".$main.\"&$this->startvar=\".(($i*$MAX_REC)-$MAX_REC).\"&$this->countvar=\".$count.\"&$param'>\".$i.\"</a>&nbsp;&nbsp;\";\t\n\n\t\t\t\t\t\t\t\t\t/*if($start==($count-$MAX_REC)){\n\t\t\t\t\t\t\t\t\t\t$i=$i+1;\n\t\t\t\t\t\t\t\t\t\tprint \"<a href='$batch_page?main=\".$main.\"&start=\".(($i*$MAX_REC)-$MAX_REC).\"&count=\".$count.\"&$param'>\".$i.\"</a>&nbsp;&nbsp;\";\t\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}*/\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t}\t\t\t\t\t\t\t\t//end of else ($i==$page)\n\n\t\t\t\t\t }\t\t\t\t\t\t\t\t\t//end for\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t} //end else\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(($i<=$totalPages)&&($count!=($start+$MAX_REC))){\n\t\t\t\t\t\t$main=$main+1;\n\t\t\t\t\t\t$this->navigationbar .= \"<a href='$batch_page?$this->mainvar=\".$main.\"&$this->startvar=\".(($i*$MAX_REC)-$MAX_REC).\"&$this->countvar=\".$count.\"&$param'><font color='blue'>Next</font></a>\";\t\t\n\n\t\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//print \"</td>\";\n\t\t\t//print \"</tr>\";\n\t\t\t//print \"</table>\";\n\t\t}\t\n\n\t}", "public function finish_database_export() {\n $this->output('</moodle_database>');\n }", "public function addTableFooter() {\n // auto width\n foreach ($this->_tableParams['auto_width'] as $col)\n $this->_xls->getActiveSheet()->getColumnDimensionByColumn($col)->setAutoSize(true);\n\n // filter (has to be set for whole range)\n if (count($this->_tableParams['filter']))\n $this->_xls->getActiveSheet()->setAutoFilter(PHPExcel_Cell::stringFromColumnIndex($this->_tableParams['filter'][0]) . ($this->_tableParams['header_row']) . ':' . PHPExcel_Cell::stringFromColumnIndex($this->_tableParams['filter'][count($this->_tableParams['filter']) - 1]) . ($this->_tableParams['header_row'] + $this->_tableParams['row_count']));\n\n // wrap\n foreach ($this->_tableParams['wrap'] as $col)\n $this->_xls->getActiveSheet()->getStyle(PHPExcel_Cell::stringFromColumnIndex($col) . ($this->_tableParams['header_row'] + 1) . ':' . PHPExcel_Cell::stringFromColumnIndex($col) . ($this->_tableParams['header_row'] + $this->_tableParams['row_count']))->getAlignment()->setWrapText(true);\n\n return $this;\n }", "public function formatQuery($sql) {\r\n\t\t//regex work with a lookahead to avoid splitting things inside single quotes\r\n\t\t$sql = preg_replace(\r\n\t\t\t\t\"/(WHERE|FROM|GROUP BY|HAVING|ORDER BY|LIMIT|OFFSET|UNION|DUPLICATE KEY)(?=(?:(?:[^']*+'){2})*+[^']*+\\z)/\", \"\\n$0\", $sql\r\n\t\t);\r\n\t\t$sql = preg_replace(\r\n\t\t\t\t\"/(INNER|LEFT|RIGHT|CASE|WHEN|END|ELSE|AND)(?=(?:(?:[^']*+'){2})*+[^']*+\\z)/\", \"\\n $0\", $sql);\r\n\t\treturn $sql;\r\n\t}", "function remove_remarks($sql)\n\t{\n\t\t$lines = explode(\"\\n\", $sql);\n\n\t\t// try to keep mem. use down\n\t\t$sql = \"\";\n\n\t\t$linecount = sizeof($lines);\n\t\t$output = \"\";\n\n\t\tfor ($i = 0; $i < $linecount; $i++)\n\t\t{\n\t\t\tif (($i != ($linecount - 1)) || (strlen($lines[$i]) > 0))\n\t\t\t{\n\t\t\t\tif ($lines[$i][0] != \"#\")\n\t\t\t\t{\n\t\t\t\t\t$output .= $lines[$i] . \"\\n\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$output .= \"\\n\";\n\t\t\t\t}\n\t\t\t\t// Trading a bit of speed for lower mem. use here.\n\t\t\t\t$lines[$i] = \"\";\n\t\t\t}\n\t\t}\n\n\t\treturn $output;\n\n\t}", "function Latex_Table_Multi_Col($ncols,$text,$first=1,$spec=\"c\")\n {\n if ($ncols>1)\n {\n if ($first==0) { $spec=\"|\".$spec; }\n $spec.=\"|\";\n \n $text=\n \"\\\\multicolumn{\".\n $ncols.\n \"}{\".$spec.\"}{\".\n $text.\n \"}\";\n }\n \n return $text;\n }", "private function buildQuery(): void\n {\n $this->query = self::CREATE_TABLE;\n\n if ($this->ifNotExists) {\n $this->query .= self::IF_NOT_EXISTS;\n }\n\n $this->query .= $this->table . self::OPENING_BRACKET;\n\n $this->query .= join(', ', $this->columns);\n\n if (!empty($this->keys)) {\n $this->query .= ',' . join(',', $this->keys);\n }\n\n $this->query .= self::CLOSING_BRACKET;\n\n if (!empty($this->engine)) {\n $this->query .= self::ENGINE . $this->engine;\n }\n\n if (!empty($this->charset)) {\n $this->query .= self::CHARSET . $this->charset;\n }\n }", "private function getFooter(){\n\t$out = <<<EOT\n </body>\n </text>\n</TEI>\nEOT;\n\treturn $out;\t\n}", "protected function renderTableSeparateBlock(): string\n {\n return\n '<tbody class=\"skipped\">' .\n '<tr>' .\n '<td></td>' .\n '</tr>' .\n '</tbody>';\n }", "private function getPositionSubSql() {\n\t\t$table = $this->query->getTableMap()::TABLE_NAME;\n\t\t$col = Model::aliasproperty('id');\n\t\t$sql = \"SELECT $col, @rownum := @rownum + 1 AS position FROM $table\";\n\t\t$whereClause = $this->getWhereClauseString();\n\n\t\tif (empty($whereClause) === false) {\n\t\t\t$sql .= ' WHERE ' . $whereClause;\n\t\t}\n\t\treturn $sql;\n\t}", "function tableheader_close() {\n $this->doc .= '</th>';\n }", "function remove_remarks($sql) {\r\n$i=0;\r\nwhile($i<strlen($sql))\r\n {\r\n if($sql[$i]==\"#\" and ($i==0 or $sql[$i-1]==\"\\n\"))\r\n {\r\n $j=1;\r\n if(!isset($sql[$i+$j])) $sql[$i+$j]=\"\"; // 0.1.8\r\n while($sql[$i+$j]!=\"\\n\")\r\n {\r\n ++$j;\r\n if($j+$i >= strlen($sql)) break;\r\n }\r\n $sql=substr($sql,0,$i).substr($sql,$i+$j);\r\n }\r\n ++$i;\r\n }\r\nreturn($sql);\r\n}", "private function terminateLine()\n {\n if ($this->isInline) {\n $this->isInline = false;\n $this->writeToFile('<br>');\n }\n }", "abstract protected function _getSQL(): String;", "public function emptyLine()\n\t{\n\t\t//return \"\\t\\t\\t\".'<td colspan=\"2\">&nbsp;</td>'.\"\\n\";\n\t}", "function FindSQLClause($strSQL, $strBeingSought, $strEndKeywords)\n{\n\t///set_time_limit(10);\n\t//$strBeingSought=\"where\";\n\t//$strEndKeywords=\"group having order limit procedure into for\";\n\t$strLcaseSQL=strtolower($strSQL);\n\t$intSoughtPos=strpos($strLcaseSQL, $strBeingSought);\n\t\n\t$strPossibleClause=substr($strSQL, $intSoughtPos + strlen($strBeingSought));\n\t$intPostEnd=strlen($strPossibleClause);\n\t//echo $intPostEnd; \n\t$intOldPostEnd=-900;\n\twhile($intPostEnd>0 && $intOldPostEnd!=$intPostEnd)\n\t{\n\t\t$intOldPostEnd=$intPostEnd;\n\t\t$intPostEnd=PosInList($strEndKeywords, $strPossibleClause, \" \", true, $quotechar=\"'\");\n\t\t//echo $intPostEnd . \"=poswhere<br>\";\n\t\t$strPossibleClause=substr($strPossibleClause, 0, $intPostEnd);\n\t\t//echo $strPossibleClause . \"=posclaus<br>\"; \n\t}\n\t//echo $strPossibleClause;\n\treturn $strPossibleClause;\n}", "private function spreadsheet_rows($string, $content_num) {\n $rows1 = explode('</table:table-row>', $string);\n array_pop($rows1);\n\n $result_rows = array();\n $ix = 0;\n foreach ($rows1 as $row_text) {\n list($row_text, $cellscontent) = $this->extract_first_tag_str($row_text);\n $row_tag = $this->tag_attr($row_text);\n\n $row_tag['content'] = explode('<table:table-cell', $cellscontent);\n\n /*\n * if cell is spanned columns or rows\n */\n if ($row_tag['content']) {\n if ($row_tag['content'][0] == '') {\n array_shift($row_tag['content']);\n }\n }\n\n foreach ($row_tag['content'] as $cell_content) {\n\n if (strpos($cell_content, '<table:covered-table-cell') === 0) {\n /*\n * Compensation cell before\n */\n\n $covered_list = explode('<table:covered-table-cell', $cell_content);\n\n array_shift($covered_list);\n foreach ($covered_list as $c) {\n $coverTag = $this->tag_attr('<table:covered-table-cell' . $c);\n $coverTag['content'] = false;\n $row_tag['cells'][] = $coverTag;\n }\n }\n\n if ($cell_content[0] == ' ' || $cell_content[0] == '/') {\n /*\n * Обычная ячейка\n */\n $cell_content = '<table:table-cell' . $cell_content;\n $cell_closing_pair_pos = strpos($cell_content, '</table:table-cell>');\n\n if ($cell_closing_pair_pos !== false) {\n /*\n * cell is content\n */\n list($cell_tag_text, $cell_tag_content) = $this->extract_first_tag_str($cell_content);\n $cell_tag = $this->tag_attr($cell_tag_text);\n $cell_tag['content'] = current(explode('</table:table-cell>', $cell_tag_content));\n } else {\n $cell_tag = $this->tag_attr($cell_content);\n $cell_tag['content'] = false;\n }\n $row_tag['cells'][] = $cell_tag;\n\n /*\n * Check compensation cells after cell\n */\n if (strpos($cell_content, '<table:covered-table-cell') !== false) {\n /*\n * Compensation cell before\n */\n $covered_list = explode('<table:covered-table-cell', $cell_content);\n\n array_shift($covered_list);\n foreach ($covered_list as $c) {\n $coverTag = $this->tag_attr('<table:covered-table-cell' . $c);\n $coverTag['content'] = false;\n $row_tag['cells'][] = $coverTag;\n }\n }\n }\n }\n unset($row_tag['content']);\n $row_tag['content_num'] = $content_num;\n $row_tag['content_index'] = $ix;\n if ($ix == 0)\n $row_tag['content_first'] = true;\n if ($ix == count($rows1) - 1)\n $row_tag['content_last'] = true;\n\n $row_tag['repeated'] = false;\n if (empty($row_tag['attr']['table:number-rows-repeated']))\n $result_rows[] = $row_tag;\n else {\n $repeated = (int) $row_tag['attr']['table:number-rows-repeated'];\n if ($repeated > 1000)\n $repeated = 1000;\n $row_tag['repeated'] = true;\n unset($row_tag['attr']['table:number-rows-repeated']);\n for ($i = 0; $i < $repeated; $i++)\n $result_rows[] = $row_tag;\n }\n \n $ix++;\n }\n return $result_rows;\n }", "function _getItemSearchFromStmt() {\n $sql = 'FROM plugin_docman_item AS i'.\n ' LEFT JOIN plugin_docman_version AS v'.\n ' ON (i.item_id = v.item_id)'.\n ' LEFT JOIN plugin_docman_version AS v2'.\n ' ON (v2.item_id = v.item_id AND v.number < v2.number) ';\n return $sql;\n }", "function section_close() {\n $this->doc .= DOKU_LF.'</div>'.DOKU_LF;\n }", "private function getBody(){\n\t\t$tbody=\"\";\n\t\t$tfilter=\"\";\n\t\t\n\t\tif($this->renderEmptyBody){\n\t\t\treturn \"<tbody></tbody>\";\n\t\t}\n\t\t\n\t\t//Si tiene un llamado a la base de datos, obtenemos los datos\n\t\tif($this->hasCallToDataBase){\n\t\t\t$this->getData();\n\t\t}\n\t\t\n\t\tif(!empty($this->data)){\n\t\t\tforeach($this->data as $dataRow){\n\t\t\t\t$tbody.=\"<tr>\";\n\t\t\t\t$counter=0;\n\t\t\t\t\n\t\t\t\t/*Buscamos si el grid tiene alguna columna adicional al principio*/\n\t\t\t\tif(!empty($this->prependedCols)){\n\t\t\t\t\tforeach($this->prependedCols as $col){\n\t\t\t\t\t\t$counter++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tforeach($dataRow as $key=>$data){\n\t\t\t\t\tif(!empty($this->bindedTypes)){\n\t\t\t\t\t\t\n\t\t\t\t\t\t$type=$this->bindedTypes[$key];\n\t\t\t\t\t\t$parameter=$this->bindedTypesParams[$key];\n\t\t\t\t\t\t\n\t\t\t\t\t\tswitch ($type){\n\t\t\t\t\t\t\tcase 'progressbar':\n\t\t\t\t\t\t\t\t$bar=new progressbar(array(\"id\"=>$key));\n\t\t\t\t\t\t\t\t$pje=$data*100;\n\t\t\t\t\t\t\t\t$bar->setBars(array($pje));\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$tbody.=\"<td>\".$bar->render(true).\"</td>\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"link\":\n\t\t\t\t\t\t\t\t$link=new link();\n\t\t\t\t\t\t\t\t$link->replaceFields($dataRow, $parameter);\n\t\t\t\t\t\t\t\t$link->setDisplay($data);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$tbody.=\"<td>\".$link->render(true).\"</td>\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t$tbody.=\"<td>$data</td>\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$tbody.=\"<td>$data</td>\";\n\t\t\t\t\t}\n\t\t\t\t\t$counter++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/*Buscamos si el grid tiene alguna columna adicional al final*/\n\t\t\t\tif(!empty($this->appendedCols)){\n\t\t\t\t\tforeach($this->appendedCols as $col){\n\t\t\t\t\t\t$counter++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$tbody.=\"</tr>\";\n\t\t\t}\n\t\t\t\n\t\t\tif($tfilter!=\"\"){\n\t\t\t\t$tbody=$tfilter.$tbody;\n\t\t\t}\n\t\t\t\n\t\t\t$tbody=\"<tbody>$tbody</tbody>\";\n\t\t}else{\n\t\t\t$tbody=\"<tbody><tr><td colspan=\\\"{$this->cols}\\\"><div class=\\\"alert alert-error\\\">\".velkan::$lang[\"grid_msg\"][\"noDataFound\"].\"</div></td></tr></tbody>\";\n\t\t}\n\t\t\n\t\treturn $tbody;\n\t}", "function inline_archive_right_column_end() {\n\n\techo '</div><!--end .right-->';\n\t\n}", "function setMargemEsquerda($iNumCol = 4) {\n\n $sComando = chr(27) . chr(108) . \" $iNumCol\";\n parent::addComando($sComando);\n }", "public function newLine() {\n\t\t$this->_section=0;\n\t\t$this->_lineNumber++;\n\t\t$this->_text[$this->_lineNumber]=array();\n\t\t$this->_text[$this->_lineNumber][0]['text']='';\n\t\t$this->_text[$this->_lineNumber][0]['encoding']='';\n\t\t$this->_text[$this->_lineNumber][0]['font']=$this->_font;\n\t\t$this->_text[$this->_lineNumber][0]['fontSize']=$this->_fontSize;\n\t\t$this->_text[$this->_lineNumber][0]['width']=0;\n\n\t\t\n\t\t$this->_initializeLine();\n\t\t\n\t\t$this->_text[$this->_lineNumber]['alignment']=$this->_text[$this->_lineNumber-1]['alignment'];\n\t\t//add the last cell's height to the auto height if we have an auto-height box.\n\t\tif ($this->isAutoHeight()) {\n\t\t\t$this->_autoHeight+=$this->_text[$this->_lineNumber-1]['height'];\n\t\t}\n\t}", "public static function getDatabaseEndDDL()\n\t{\n\t\treturn '';\n\t}", "private function beginQuery() {\n $this->sql = 'SELECT sum(inv_total_cost) as total_cost,id,businessname,email,businesstelephone,'\n . 'IFNULL((SELECT SUM(pfp_importo) as pfp_importo FROM plused_fincon_payments where find_in_set(plused_fincon_payments.pfp_bk_id,GROUP_CONCAT(derived_booking_invoice.inv_booking_id)) AND plused_fincon_payments.pfp_dare_avere =\"avere\" ),0) as pfp_import,'\n . 'ROUND((sum(inv_total_cost) - IFNULL((SELECT SUM(pfp_importo) as pfp_importo FROM plused_fincon_payments where find_in_set(plused_fincon_payments.pfp_bk_id,GROUP_CONCAT(derived_booking_invoice.inv_booking_id)) AND plused_fincon_payments.pfp_dare_avere =\"avere\" ),0)), 2) as overdue '\n . 'FROM (SELECT t.* FROM agnt_booking_invoice t INNER JOIN (SELECT inv_total_cost,MAX(inv_invoice_id) AS latest,inv_booking_id FROM agnt_booking_invoice GROUP BY inv_booking_id) t1 ON t1.inv_booking_id=t.inv_booking_id AND t1.latest=t.inv_invoice_id) AS derived_booking_invoice '\n . 'LEFT JOIN agenti ON agenti.id=derived_booking_invoice.inv_agent_id WHERE agenti.status=\"active\" ';\n }", "function AddRowNumber($strSQL, $n)\n{\n\treturn \"select * from (\".$strSQL.\") where rownum<\".($n+1);\n}", "protected function transpileEndEmpty(): string\n {\n return '<?php endif; ?>';\n }", "function ensure_proper_quotation_nesting() {\r\n\t\t//$this->code = OM::ensure_proper_nesting($this->code, 'q');\r\n\t\tReTidy::combine_inline();\r\n\t}", "function show_data(){\n\t\t$tmp = str_replace(\"\\n*\",\"\\n\",trim($this->col_data));\n\t\t$tmp = preg_replace(\"/^\\*/\",\"\",$tmp);\n\t\t$value = explode(\"\\n\",$tmp);\n\t\tif(count($value) > 1) $this->col_data = \"*\".implode(\"\\n*\",$value);\n\t\t#echo $this->col_data.\"\\n\";\n\t\treturn $this->col_data;\n\t}", "function show_data(){\n\t\t$tmp = str_replace(\"\\n*\",\"\\n\",trim($this->col_data));\n\t\t$tmp = preg_replace(\"/^\\*/\",\"\",$tmp);\n\t\t$value = explode(\"\\n\",$tmp);\n\t\tif(count($value) > 1) $this->col_data = \"*\".implode(\"\\n*\",$value);\n\t\t#echo $this->col_data.\"\\n\";\n\t\treturn $this->col_data;\n\t}" ]
[ "0.62118584", "0.5884189", "0.571484", "0.5549765", "0.5487167", "0.54302734", "0.5356242", "0.52908635", "0.5241742", "0.5235592", "0.52257425", "0.52086663", "0.52056617", "0.51697", "0.5127812", "0.51223296", "0.5122152", "0.5118309", "0.50867945", "0.50851434", "0.5070744", "0.5039569", "0.5019715", "0.501743", "0.5010955", "0.5001833", "0.49800596", "0.49702865", "0.4966988", "0.4962844", "0.4960012", "0.49543074", "0.49351695", "0.49332199", "0.48998868", "0.48809773", "0.48801756", "0.48776376", "0.487352", "0.48660612", "0.48453012", "0.4840658", "0.48391095", "0.4834464", "0.48299885", "0.4827255", "0.48100048", "0.48065412", "0.47943532", "0.47943532", "0.47943532", "0.4793954", "0.47786507", "0.47726256", "0.4761346", "0.4761346", "0.47576314", "0.4754947", "0.47544748", "0.4751425", "0.4751425", "0.47337022", "0.4728018", "0.47260484", "0.4722616", "0.47175977", "0.4704529", "0.4699124", "0.4695068", "0.46804565", "0.4678343", "0.46770665", "0.46741104", "0.467043", "0.46702135", "0.4665588", "0.466466", "0.46637484", "0.46585655", "0.46582344", "0.46539128", "0.46520117", "0.46418282", "0.46405992", "0.46341956", "0.46319318", "0.463167", "0.46129543", "0.4610845", "0.46089485", "0.46069095", "0.4606157", "0.46009472", "0.45962512", "0.45962182", "0.45953614", "0.4595201", "0.45908493", "0.4584457", "0.45844078", "0.45844078" ]
0.0
-1
Test that get methods work as expected.
public function testGet() { $all_results = self::$api->getAll(); usleep(AUTH0_PHP_TEST_INTEGRATION_SLEEP); $this->assertNotEmpty($all_results); $expected_client_id = $all_results[0]['client_id'] ?: null; $this->assertNotNull($expected_client_id); $expected_audience = $all_results[0]['audience'] ?: null; $this->assertNotNull($expected_audience); $audience_results = self::$api->getByAudience($expected_audience); usleep(AUTH0_PHP_TEST_INTEGRATION_SLEEP); $this->assertNotEmpty($audience_results); $this->assertEquals($expected_audience, $audience_results[0]['audience']); $client_id_results = self::$api->getByClientId($expected_client_id); usleep(AUTH0_PHP_TEST_INTEGRATION_SLEEP); $this->assertNotEmpty($client_id_results); $this->assertEquals($expected_client_id, $client_id_results[0]['client_id']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test__GetGet()\n\t{\n\t\t$this->assertThat(\n\t\t\t$this->object->objects->get,\n\t\t\t$this->isInstanceOf('JAmazons3OperationsObjectsGet')\n\t\t);\n\t}", "public function testGetFinancialStatementAllUsingGet()\n {\n }", "public function testGetMetadata2UsingGET()\n {\n }", "public function testGetAccountsUsingGET()\n {\n }", "public function testGetMetadata1UsingGET()\n {\n }", "public function testGetSuppliersUsingGET()\n {\n }", "public function testGetAccountUsingGET()\n {\n }", "public function testGetFinancialStatementUsingGet()\n {\n }", "public function testReportsBouncedGet()\n {\n }", "public function testGetMetadata3UsingGET()\n {\n }", "public function test_get()\n\t{\n\t\t$_SERVER['REQUEST_METHOD'] = 'GET';\n\n\t\tPigeon::map(function($r){\n\t\t\t$r->get('posts/(:any)', 'posts/show/$1');\n\t\t\t$r->get('posts/(:num)', 'posts#show');\n\t\t\t$r->get('posts/people', array( 'Posts', 'action' ));\n\t\t});\n\n\t\t$this->assertEquals(array( 'posts/(:any)' => 'posts/show/$1', \n\t\t\t\t\t\t\t\t 'posts/people' => 'posts/action',\n\t\t\t\t\t\t\t\t 'posts/(:num)' => 'posts/show/$1' ), Pigeon::draw());\n\t}", "public function testGetFeatureDetailsUsingGET()\n {\n }", "public function testGetBrandsUsingGET()\n {\n }", "public function testGetPriceBucketsUsingGET()\n {\n }", "public function testGetInstitutionsUsingGET()\n {\n }", "public function testCanGet()\n {\n self::$apcu = [];\n $this->sut->add('myKey', 'myValue');\n $this->assertSame('myValue', $this->sut->get('myKey'));\n }", "public function testGetPromotionCampaignsUsingGET()\n {\n }", "public function testMagicMethodGet() {\n\n\t\t$error = self::$context->connection->hatseflatse;\n\n\t}", "public function testSetGetGet()\n {\n // Create and set empty by default\n $request = new Request();\n $request->unsetGlobals();\n\n // Its empty by default\n $res = $request->getGet(\"nothing\");\n $this->assertEmpty($res);\n\n // Get whole array, empty by default\n $res = $request->getGet();\n $this->assertEmpty($res);\n $this->assertIsArray($res);\n\n // Set a plain value and retrieve it\n $key = \"somekey\";\n $value = \"somevalue\";\n $request->setGet($key, $value);\n $res = $request->getGet($key);\n $this->assertEquals($res, $value);\n\n // Check if value exists or not\n $res = $request->hasGet($key);\n $this->assertTrue($res);\n $res = $request->hasGet(\"nada\");\n $this->assertFalse($res);\n\n // Set a value using an array and retrieve it\n $array = [\n \"key\" => \"value\",\n \"key1\" => \"value1\",\n ];\n $request->setGet($array);\n\n $res = $request->getGet(\"key\");\n $this->assertEquals($res, \"value\");\n\n $res = $request->getGet(\"key1\");\n $this->assertEquals($res, \"value1\");\n }", "public function testSearchUsingGET()\n {\n\n }", "public function testGetter()\n {\n $account = new Account('access-key', 'secret-key', 'api-host');\n $this->assertEquals('access-key', $account->getAccessKey());\n $this->assertEquals('secret-key', $account->getSecretKey());\n $this->assertEquals('api-host', $account->getApiHost());\n }", "public function testGetInstitutionUsingGET()\n {\n }", "public function testUserMeGet()\n {\n }", "public function testGetCategoriesUsingGET()\n {\n }", "public function testReportsReferralsGet()\n {\n }", "public function testGetValue() : void {\n\t\t$this->assertEquals('GET', HttpMethod::Get->value);\n\t}", "public function testGetters()\n {\n $this->entity->fromArray($this->testData);\n\n foreach ($this->expectedGetters as $method => $expectedResult) {\n //var_dump($this->testData, $expectedResult, $this->entity->$method());\n if (is_array($expectedResult)) {\n $this->assertArraysAreSimilar($expectedResult, $this->entity->$method(), $method);\n } elseif (is_object($expectedResult)) {\n $actualObject = var_export($this->entity->$method(), true);\n $expectedObject = var_export($expectedResult, true);\n $this->assertSame($expectedObject, $actualObject, $method);\n } else {\n $this->assertSame($expectedResult, $this->entity->$method(), $method);\n }\n }\n }", "public function testGetPromotionCampaignApplicationUsingGET()\n {\n }", "public function testGeneralResourceGetters()\n {\n $correctValue = 'Flourish and Blotts';\n $get = $this->resource->get('owner');\n $this->assertEquals($correctValue, $get,\n 'get() does not return the correct value');\n $correctRecursiveValue = 'Lord Of The Rings';\n $recursivePath = 'books/0/title';\n $getRecursive = $this->resource->getRecursive($recursivePath);\n $this->assertEquals($correctRecursiveValue, $getRecursive,\n 'getRecursive() does not return the correct value');\n $correctArrayValue = self::$testData['books'][0];\n $resourceValue = $this->resource->getRecursive('books/0')->toArray();\n $this->assertEquals($correctArrayValue, $resourceValue,\n 'getRecursive() does not return the correct value if its not the final node');\n $pathObj = new Path($recursivePath);\n $this->assertEquals($correctRecursiveValue, $this->resource->getRecursive($pathObj),\n 'getRecursive() does not return the correct value if its searched by a Path object');\n }", "public function testGetValue()\n {\n $this->todo('stub');\n }", "public function testProjectProjectIDUsersGet()\n {\n }", "public function testGetAccountPeriodicPaymentsUsingGET()\n {\n }", "public function testGetAccountScheduledPaymentsUsingGET()\n {\n }", "public function setGetTest()\n {\n $id = \"This a weird test\";\n $createdAt = 1;\n $updatedAt = 2;\n $appId = 1337;\n \n $this->_payment->setId($id)->setCreatedAt($createdAt)->setUpdatedAt($updatedAt)->setAppId($appId);\n \n $this->assertEquals($this->_payment->getId(), $id);\n $this->assertEquals($this->_payment->getCreatedAt(), $createdAt);\n $this->assertEquals($this->_payment->getUpdatedAt(), $updatedAt);\n $this->assertEquals($this->_payment->getAppId(), $appId);\n }", "public function testWorkflowsGet()\n {\n }", "public function testReturnOfEntityGetMethods()\n {\n $entity = TreeFactory::createFromArray($this->request);\n\n $this->assertEquals($this->request['id'], $entity->getId());\n $this->assertEquals($this->request['age'], $entity->getAge());\n $this->assertEquals($this->request['type'], $entity->getType());\n\n $this->assertInstanceOf(Bear::class, $entity->getBear());\n\n $this->assertInstanceOf(Carbon::class, $entity->getCreatedAt());\n $this->assertEquals($this->request['created_at'], $entity->getCreatedAt()->toDateTimeString());\n\n $this->assertInstanceOf(Carbon::class, $entity->getUpdatedAt());\n $this->assertEquals($this->request['updated_at'], $entity->getUpdatedAt()->toDateTimeString());\n\n $this->assertInstanceOf(Carbon::class, $entity->getDeletedAt());\n $this->assertEquals($this->request['deleted_at'], $entity->getDeletedAt()->toDateTimeString());\n }", "public function testIndexActionGet()\n {\n $request = $this->di->get(\"request\");\n $request->setGet(\"ip\", \"8.8.8.8\");\n\n\n $res = $this->controller->indexActionGet();\n\n $body = $res->getBody();\n\n // var_dump($body);\n $this->assertInstanceOf(\"Anax\\Response\\ResponseUtility\", $res);\n $this->assertContains(\"Kolla vädret\", $body);\n }", "public function testGetAccountDirectDebitsUsingGET()\n {\n }", "public function testAddGetParam()\n\t{\n\t\t$URL = new URL('http://' . self::TESTHOST . \"/requestInfos.php?getA=hallo\");\n\t\t$Payload = new Payload(new DataAsGET('getB', 'halloB'));\n\n\t\t$Request = new Request($URL, new PUT(), $Payload);\n\t\t$this->assertTrue(\n\t\t\t$Request->getResponseAs(\n\t\t\t\tnew class extends AbstractResponse\n\t\t\t\t{\n\t\t\t\t\tpublic function createByRequest($body, Headerlist $Headers, HTTPStatusCode $Status, \\DateInterval $RequestTime)\n\t\t\t\t\t{\n\t\t\t\t\t\t$bodyArr = json_decode($body, true);\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t$bodyArr['_GET']['getA'] == 'hallo'\n\t\t\t\t\t\t\t&& $bodyArr['_GET']['getB'] == 'halloB'\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t)\n\t\t);\n\t}", "public function testPayersPayerTypeGet()\n {\n }", "public function testGet()\n {\n $object = new \\Webaholicson\\Minimvc\\Core\\Object(['test' => true]);\n \n $this->assertTrue($object->get('test'));\n $this->assertEquals('', $object->get('empty'));\n $this->assertArrayHasKey('test', $object->get());\n }", "public function testEmailCampaignsGet()\n {\n }", "public function testHandlersHandlerTypeCostsGet()\n {\n }", "public function testReportsSpamchecksHistoryGet()\n {\n }", "public function testGetGetParams()\n {\n $expected = array('document' => array('filesize' => 100),\n 'get_test1' => 'true', 'get_test2' => 'go mets');\n $this->assertEquals($expected, $this->_req->getGetParams());\n }", "public function testReportsSummaryGet()\n {\n }", "public function testReportsGet()\n {\n }", "public function testSystemMembersTypesGet()\n {\n\n }", "public function testGet()\n {\n $this->assertEquals('bar' , $this->container->get('foo'));\n $this->assertEquals('notExistent', $this->container->get('bar', 'notExistent'));\n\n }", "public function testInboundDocumentGet()\n {\n }", "public function testCatchAllGet()\n {\n $res = $this->controller->catchAll();\n $this->assertNull($res);\n }", "public function testEmailCampaignHistoryGet()\n {\n }", "public function testWebinarPollGet()\n {\n }", "public function testReportsEmailcreditsHistoryGet()\n {\n }", "public function getGet ();", "public function testIndexActionGet()\n {\n $res = $this->controller->indexActionGet();\n $this->assertContains(\"View all items\", $res->getBody());\n }", "public function testCompanyManagementBackupsGet()\n {\n\n }", "public function testProjectProjectIDUsersUserIDGet()\n {\n }", "public function testGetParameterFromGet(): void\n {\n // setup\n $_GET['get-parameter'] = 'get value';\n\n $requestParams = $this->getRequestParamsMock();\n\n // test body\n /** @var string $param */\n $param = $requestParams->getParam('get-parameter');\n\n // assertions\n $this->assertEquals('get value', $param, 'Value from $_GET must be fetched but it was not');\n }", "public function testWebinarRegistrantsQuestionsGet()\n {\n }", "public function testIndex(){\n\t\t\n\t\t$this->mock->shouldReceive('all')->once();\n\n\t\t$this->call('GET', 'users'); //get: Method , user: url\n\n\t\t$this->assertResponseOk();\n\t}", "public function testUserUserIDGet()\n {\n }", "public function testFetch()\n {\n $this->todo('stub');\n }", "public function testFetch()\n {\n $this->todo('stub');\n }", "public function testProductGet()\r\n {\r\n\t\t$this->json('get', '/api/products/1')->assertStatus(200);\r\n\t}", "public function test_happy_flow_get()\n {\n $_SERVER['REQUEST_METHOD'] = 'GET';\n $_GET['sp-entity-id'] = 'http://mock-sp';\n\n $request = new Request($_GET, $_POST, [], [], [], $_SERVER);\n\n $this->assertTrue($this->validator->isValid($request));\n }", "public function testEmailCampaignGet()\n {\n }", "public function testGetMethods()\n {\n $assoc = Mad_Model_Association_Base::factory('hasMany', 'Articles', array(), new User);\n $expected = array(\n 'articles' => 'getObjects',\n 'articles=' => 'setObjects',\n 'articleIds' => 'getObjectIds',\n 'articleIds=' => 'setObjectIds',\n 'articleCount' => 'getObjectCount',\n 'addArticle' => 'addObject',\n 'replaceArticles' => 'replaceObjects',\n 'deleteArticles' => 'deleteObjects',\n 'clearArticles' => 'clearObjects',\n 'findArticles' => 'findObjects',\n 'buildArticle' => 'buildObject',\n 'createArticle' => 'createObject'\n );\n $this->assertEquals($expected, $assoc->getMethods());\n }", "public function testReportsReputationHistoryGet()\n {\n }", "public function testReportsPaymentsHistoryGet()\n {\n }", "public function test_getById() {\n\n }", "public function testVersionGetters()\n {\n /** @var Version $version */\n $version = Version::get()->first(); // ONLY EVER ONE ELEMENT!\n $this->assertNotNull($version);\n\n $this->outputGetters($version, [ \"id\" ]);\n }", "public function testGetMe()\n {\n\t\t// $this->markTestSkipped('getMe test is working');\n\t\t$response = $this->runApiCall('getMe');\n $this->isOk($response);\n }", "public function testPersistanceGet() {\n\t\t// the values are still retrievable.\n\t\t$this->assertEquals( 'remember', $this->cache->get( 'keep' ) );\n\t}", "public function testRead()\n {\n }", "public function testAccessGetThrowsException()\n\t{\n\t\t$stub = new WidgetStub('foo', array());\n\t\t$hello = $stub->hello;\n\t}", "public function testCustomerInvoicesV2Get()\n {\n }", "public function testReportsReferralsPayoutHistoryGet()\n {\n }", "public function testProjectProjectIDInviteeInviteIDGet()\n {\n }", "public function testWebinarRegistrantGet()\n {\n }", "public function testGetExpert()\n {\n }", "public function testSystemMembersTypesIdGet()\n {\n\n }", "public function testProjectProjectIDInviteGet()\n {\n }", "public function testHandlersHandlerTypeCitiesGet()\n {\n }", "public function test_get_non_existent() {\n $this->_cut->get(1);\n }", "public function testActivityInfoRetrieve()\n {\n }", "public function testDemoteAutomatchUrlUsingGET()\n {\n }", "public function isGet();", "public function testGetters()\n\t\t{\n\t\t$phpToolBox = new PhpToolbox();\n\n\t\t// test getter for Text Class\n\t\t$this->assertNotNull($phpToolBox->getText());\n\t\t$this->assertInstanceOf(Text::class, $phpToolBox->getText());\n\n\t\t// test getter for IO class\n\t\t$this->assertNotNull($phpToolBox->getIO());\n\t\t$this->assertInstanceOf(IO::class, $phpToolBox->getIO());\n\n\t\t// test getter for Datetime class\n\t\t$this->assertNotNull($phpToolBox->getDatetime());\n\t\t$this->assertInstanceOf(Datetime::class, $phpToolBox->getDatetime());\n\t\t}", "protected function doGet()\n {\n }", "public function testMagic() {\n\t\t$client = new \\Esprit\\Transport\\Fake(array(\n\t\t\t'index' => 'twitter',\n\t\t\t'type' => 'tweet'\n\t\t)) ;\n\n\t\t$request = $client->get(array('id' => 1)) ;\n\t\t$body = $request->body() ;\n\t\t$this->assertEquals('twitter',$request->index()) ;\n\t\t$this->assertEquals('tweet',$request->type()) ;\n\n\t\t$client->config('index', 'facebook') ;\n\t\t$request = $client->get(array('id' => 2)) ;\n\t\t$body = $request->body() ;\n\t\t$this->assertEquals('facebook',$request->index()) ;\n\n\t\t// Magic params\n\t\t$request = $client->get(666) ;\n\t\t$body = $request->body() ;\n\t\t$this->assertEquals('facebook',$request->index()) ;\n\t\t$this->assertEquals('tweet',$request->type()) ;\n\t\t$this->assertEquals(666,$body['id']) ;\n\n\t\ttry {\n\t\t\t$client->stats('ouch') ;\n\t\t\t$this->fail() ;\n\t\t} catch (\\Exception $e) {\n\t\t\treturn ;\n\t\t}\n\t}", "public function testGetValue()\n {\n $values = Store::get();\n $response = $this->json('GET', '/api/values');\n $response\n ->assertStatus(200)\n ->assertJsonCount(count($values));\n }", "public function testResponseGet()\n {\n $result = json_decode($this->body, true);\n\n $this->assertEquals($this->response->get('Model'), $result['Model']);\n $this->assertEquals($this->response->get('RequestId'), $result['RequestId']);\n $this->assertEquals($this->response->get('Inexistence'), null);\n $this->assertEquals($this->response->get('Inexistence', 'Inexistence'), 'Inexistence');\n }", "public function testJobGet()\n {\n\n }", "public function testReadMember()\n {\n }", "public static function isGet(): bool {\r\n return static :: isMethod('get');\r\n }", "function get()\n {\n }", "public function testGetMethodsForType()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function testPromoteAutomatchUrlUsingGET()\n {\n }", "public function testEmailCampaignHistoryExportGet()\n {\n }", "public function testGetPatrimonio()\n {\n }" ]
[ "0.7554496", "0.75490654", "0.75325716", "0.75278807", "0.7495102", "0.74765456", "0.7468528", "0.7363385", "0.7360457", "0.73598367", "0.73037773", "0.7292913", "0.7278999", "0.72523546", "0.7247173", "0.72195005", "0.71560836", "0.711672", "0.711043", "0.70800465", "0.70473516", "0.7042041", "0.6989595", "0.69868964", "0.6974452", "0.6970146", "0.69484454", "0.69444793", "0.69231665", "0.6900969", "0.6890298", "0.68622744", "0.68395525", "0.68383634", "0.6829265", "0.6791693", "0.6791437", "0.67838985", "0.6769491", "0.6750726", "0.6738013", "0.6735866", "0.67348737", "0.6725824", "0.67247486", "0.6708559", "0.67070746", "0.6696991", "0.6685206", "0.6673705", "0.6656009", "0.664795", "0.6640296", "0.663996", "0.66224337", "0.6601383", "0.658339", "0.6578914", "0.65748376", "0.6566619", "0.6549784", "0.6539128", "0.653224", "0.653224", "0.653195", "0.6531886", "0.6527957", "0.65269625", "0.65191954", "0.6507973", "0.65074646", "0.6504245", "0.6498754", "0.64933693", "0.64610887", "0.64512384", "0.6450341", "0.6449966", "0.6449431", "0.64480186", "0.64470756", "0.6445836", "0.6444397", "0.64422655", "0.644149", "0.6430885", "0.64275473", "0.64247036", "0.6417227", "0.64158636", "0.6403442", "0.63962215", "0.6381066", "0.63778704", "0.6377095", "0.63705975", "0.6365321", "0.63652825", "0.6362221", "0.6352344", "0.6351168" ]
0.0
-1
Test that pagination parameters are passed to the endpoint.
public function testGetWithPagination() { $expected_count = 2; $results_1 = self::$api->getAll([], 0, $expected_count); usleep(AUTH0_PHP_TEST_INTEGRATION_SLEEP); $this->assertCount($expected_count, $results_1); $expected_page = 1; $results_2 = self::$api->getAll([], $expected_page, 1); usleep(AUTH0_PHP_TEST_INTEGRATION_SLEEP); $this->assertCount(1, $results_2); $this->assertEquals($results_1[$expected_page]['client_id'], $results_2[0]['client_id']); $this->assertEquals($results_1[$expected_page]['audience'], $results_2[0]['audience']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testPagination()\n {\n\n // Set public page length to 2.\n set_option('per_page_public', 2);\n\n $item1 = $this->_item(true, 'Item 1');\n $item2 = $this->_item(true, 'Item 2');\n $item3 = $this->_item(true, 'Item 3');\n $item4 = $this->_item(true, 'Item 4');\n $item5 = $this->_item(true, 'Item 5');\n $item6 = $this->_item(true, 'Item 6');\n\n // --------------------------------------------------------------------\n\n // Page 1.\n $this->dispatch('solr-search');\n\n // Should just list items 1-2.\n $this->assertXpath('//a[@href=\"'.record_url($item1).'\"]');\n $this->assertXpath('//a[@href=\"'.record_url($item2).'\"]');\n $this->assertNotXpath('//a[@href=\"'.record_url($item3).'\"]');\n $this->assertNotXpath('//a[@href=\"'.record_url($item4).'\"]');\n $this->assertNotXpath('//a[@href=\"'.record_url($item5).'\"]');\n $this->assertNotXpath('//a[@href=\"'.record_url($item6).'\"]');\n\n // Should link to page 2.\n $next = public_url('solr-search?page=2');\n $this->assertXpath('//a[@href=\"'.$next.'\"]');\n\n $this->resetResponse();\n $this->resetRequest();\n\n // --------------------------------------------------------------------\n\n // Page 2.\n $_GET['page'] = '2';\n $this->dispatch('solr-search');\n\n // Should just list items 3-4.\n $this->assertNotXpath('//a[@href=\"'.record_url($item1).'\"]');\n $this->assertNotXpath('//a[@href=\"'.record_url($item2).'\"]');\n $this->assertXpath('//a[@href=\"'.record_url($item3).'\"]');\n $this->assertXpath('//a[@href=\"'.record_url($item4).'\"]');\n $this->assertNotXpath('//a[@href=\"'.record_url($item5).'\"]');\n $this->assertNotXpath('//a[@href=\"'.record_url($item6).'\"]');\n\n // Should link to page 3.\n $next = public_url('solr-search?page=3');\n $this->assertXpath('//a[@href=\"'.$next.'\"]');\n\n $this->resetResponse();\n $this->resetRequest();\n\n // --------------------------------------------------------------------\n\n // Page 3.\n $_GET['page'] = '3';\n $this->dispatch('solr-search');\n\n // Should just list items 5-6.\n $this->assertNotXpath('//a[@href=\"'.record_url($item1).'\"]');\n $this->assertNotXpath('//a[@href=\"'.record_url($item2).'\"]');\n $this->assertNotXpath('//a[@href=\"'.record_url($item3).'\"]');\n $this->assertNotXpath('//a[@href=\"'.record_url($item4).'\"]');\n $this->assertXpath('//a[@href=\"'.record_url($item5).'\"]');\n $this->assertXpath('//a[@href=\"'.record_url($item6).'\"]');\n\n // Should link back to page 2.\n $prev = public_url('solr-search?page=2');\n $this->assertXpath('//a[@href=\"'.$prev.'\"]');\n\n // --------------------------------------------------------------------\n\n }", "public function testGETProductsCollectionPaginated()\n {\n $this->assertEquals(\n 4,\n $this->crawler->filter('span:contains(\"Title\")')->count()\n );\n //in the last page have 2 product\n $crawler = $this->client->request('GET', '/?page=8');\n $this->assertEquals(\n 2,\n $crawler->filter('span:contains(\"Title\")')->count()\n );\n }", "public function testGetPositionsWithPagination()\n {\n $client = new Client(['base_uri' => 'http://localhost:8000/api/']);\n $token = $this->getAuthenticationToken();\n $headers = [\n 'Authorization' => 'Bearer ' . $token,\n 'Accept' => 'application/json'\n ];\n $params = [\n 'page' => 2\n ];\n $response = $client->request('GET', 'positions', [\n 'headers' => $headers,\n 'query' => $params\n ]);\n\n $this->assertEquals(200, $response->getStatusCode());\n $this->assertEquals(['application/json; charset=utf-8'], $response->getHeader('Content-Type'));\n $data = json_decode($response->getBody(), true);\n $this->assertEquals(30, count($data));\n\n }", "public function testWithPaginationLimitListPosts()\n {\n $response = $this->jsonUser('GET', '/api/users/posts?limit=8&page=2');\n $response->assertJson([\n 'current_page' => 2,\n 'per_page' => 8,\n 'from' => 9,\n 'to' => 16,\n 'last_page' => 3,\n 'total' => 21,\n ]);\n }", "public function testThatGetAllUsersWithPerPageIsFormattedProperly()\n {\n $api = new MockManagementApi( [\n new Response( 200, self::$headers ),\n new Response( 200, self::$headers ),\n ] );\n\n $api->call()->users()->getAll( [], [], null, null, 10 );\n\n $query = $api->getHistoryQuery();\n $this->assertContains( 'per_page=10', $query );\n\n $api->call()->users()->getAll( [], [], null, null, -10 );\n\n $query = $api->getHistoryQuery();\n $this->assertContains( 'per_page=10', $query );\n }", "public function testGetPagesAndCreatePaginator()\n {\n $i = 0;\n $pageFrom = 1;\n $perPage = 20;\n $totalItems = 400;\n\n $link = $this->createMock(HalLink::class);\n $link\n ->expects($this->once())\n ->method('get')\n ->willReturn($this->getPaginatedResource($i, $pageFrom, $perPage, $totalItems));\n\n $instance = new DomainResourceMock($link);\n\n $count = 0;\n $criterias = ['page' => $pageFrom, 'limit' => $perPage];\n foreach ($instance->getPages($criterias) as $collection) {\n $count++;\n $this->assertInstanceOf(PaginatedResourceCollection::class, $collection);\n }\n\n // NumberItem / ItemPerPage = NumberOfPages,\n // NumberOfPages - (PageToStartAt - 1) = AwaitedNumberOfPages (-1 because page 0 does no exists)\n $this->assertEquals(($totalItems / $perPage) - ($pageFrom - 1), $count);\n }", "public function testThatGetAllUsersWithPageIsFormattedProperly()\n {\n $api = new MockManagementApi( [\n new Response( 200, self::$headers ),\n new Response( 200, self::$headers ),\n ] );\n\n $api->call()->users()->getAll( [], [], null, 10 );\n\n $query = $api->getHistoryQuery();\n $this->assertContains( 'page=10', $query );\n\n $api->call()->users()->getAll( [], [], null, -10 );\n\n $query = $api->getHistoryQuery();\n $this->assertContains( 'page=10', $query );\n }", "public function testPage()\n {\n $index = new Index();\n $query = new Query($index);\n $this->assertSame($query, $query->page(10));\n $elasticQuery = $query->compileQuery()->toArray();\n $this->assertSame(225, $elasticQuery['from']);\n $this->assertSame(25, $elasticQuery['size']);\n\n $this->assertSame($query, $query->page(20, 50));\n $elasticQuery = $query->compileQuery()->toArray();\n $this->assertSame(950, $elasticQuery['from']);\n $this->assertSame(50, $elasticQuery['size']);\n\n $query->limit(15);\n $this->assertSame($query, $query->page(20));\n $elasticQuery = $query->compileQuery()->toArray();\n $this->assertSame(285, $elasticQuery['from']);\n $this->assertSame(15, $elasticQuery['size']);\n }", "public function testCompanyApiPagination()\n {\n $params = [\n 'page' => 2,\n 'limit' => 10,\n ];\n $this->call('GET', '/companies', $params);\n\n $this->seeStatusCode(200);\n $this->seeJsonContains([\n \"from\" => 11,\n \"current_page\" => 2,\n \"per_page\" => 10,\n ]);\n }", "public function test_searchByPage() {\n\n }", "public function testListPagination()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs(User::find(1))\n ->visit('admin/users')\n ->assertSee('Users Gestion')\n ->clickLink('3')\n ->assertSee('GreatRedactor');\n });\n }", "function getPagingParameters()\n {\n }", "abstract public function preparePagination();", "public function testSearchParams()\n {\n $guid = 'TestingGUID';\n $count = 105;\n $pageSize = 100;\n\n $apiResponse = APISuccessResponses::search($guid, $count, $pageSize);\n\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, $apiResponse, 15);\n\n $sw->search();\n $sw->search('testing123');\n $sw->search('', '2017-01-01');\n $sw->search('', '', '2017-01-02');\n $sw->search('', '2017-01-01', '2017-01-02');\n $sw->search('', '', '', 'Kyle');\n $sw->search('', '', '', '', 'Smith');\n $sw->search('', '', '', 'Kyle', 'Smith');\n $sw->search('', '', '', '', '', true);\n $sw->search('', '', '', '', '', false);\n $sw->search('', '', '', '', '', null);\n $sw->search('', '', '', '', '', null, true);\n $sw->search('', '', '', '', '', null, false);\n $sw->search('', '', '', '', '', null, true, 'testing');\n $sw->search('testing123', '', '', '', '', true);\n\n $this->checkGetRequests($container, [\n '/v4/search',\n '/v4/search?templateId=testing123',\n '/v4/search?fromDts=2017-01-01',\n '/v4/search?toDts=2017-01-02',\n '/v4/search?fromDts=2017-01-01&toDts=2017-01-02',\n '/v4/search?firstName=Kyle',\n '/v4/search?lastName=Smith',\n '/v4/search?firstName=Kyle&lastName=Smith',\n '/v4/search?verified=true',\n '/v4/search?verified=false',\n '/v4/search',\n '/v4/search',\n '/v4/search?sort=asc',\n '/v4/search?tag=testing',\n '/v4/search?templateId=testing123&verified=true'\n ]);\n }", "public function test_can_get_all_todos_paginated()\n {\n $this->withoutExceptionHandling();\n\n $response = $this->get('/api/todos');\n $response->assertJson($response->decodeResponseJson());\n $response->assertStatus(200);\n }", "public function testClientsPaginationAsVisitor() {\n\n $this->visit('/clients/get')\n ->seePageIs('/login');\n\n }", "public function testSearchParams() {\n $this->get('/api/VideoTags/search.json?tag_name=frontside');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?rider_id=1');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?sport_id=1');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?tag_id=1');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?trick-slug=frontside-360');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?order=invalidorder');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?order=begin_time');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?order=created');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?order=modified');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?order=best');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?video_tag_id=1');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?tag_slug=myslug');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?trick_slug=1');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?video_tag_ids=1,2,3');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?status=pending,invalidstatus');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?sport_name=snowboard');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?sport_name=snowboard&category_name=jib');\n $this->assertResponseOk();\n }", "function pagination(){}", "public function test119DisplayBookingListAfterClickOnEachLinkOfPagination()\n {\n $ssoData = $this->getSSOData();\n\n // current bookings\n $this->createBookings(20, date('Y-m-d'), 15);\n\n //$this->mockApi($data, 'empty_ok');\n\n $responseBefore = $this->ajax($this->getUrlByParams(['page' => 1, 'per_page' => 10]))->json();\n $responseAfter = $this->ajax($this->getUrlByParams(['page' => 2, 'per_page' => 10]))->json();\n\n $listBefore = $responseBefore['current_list'];\n $listAfter = $responseAfter['current_list'];\n\n $this->assertFalse($listBefore == $listAfter);\n }", "function results_are_paged()\n {\n }", "public function testItemsPerPage()\n {\n $feed = $this->eventFeed;\n\n // Assert that the feed's itemsPerPage is correct\n $this->assertTrue($feed->getItemsPerPage() instanceof Zend_Gdata_Extension_OpenSearchItemsPerPage);\n $this->verifyProperty2($feed, \"itemsPerPage\", \"text\", \"25\");\n }", "public function testIndexAssetPerPage()\n {\n // 1. Mock data\n $admin = $this->admin;\n // 2. Hit Api Endpoint\n $response = $this->actingAs($admin)->get(route('asset.index', ['perPage' => 50]));\n // 3. Verify and Assertion\n $response->assertStatus(Response::HTTP_OK);\n }", "public function testPaginationSimpleBeforeLastPage()\n {\n // init\n $oPagination = new \\Pagination();\n $oPagination->setUrl('http://www.st.ro');\n $oPagination->setPage(19);\n $oPagination->setPerPage(10);\n $oPagination->setItemsNo(200);\n \n //run the test\n $this->invokeMethod($oPagination, 'compute');\n \n // asserts\n $this->assertEquals(20, $oPagination->getMaxPage());\n $this->assertEquals(2, $oPagination->getPrevPages());\n $this->assertEquals(1, $oPagination->getNextPages());\n $this->assertTrue($oPagination->getFirstPage());\n $this->assertFalse($oPagination->getLastPage());\n }", "public function testFacebookPagesRequest()\n {\n $stream = $this->getStream('FacebookPages', '27469195051');\n $response = $stream->getResponse();\n\n $this->checkResponseIntegrity('FacebookPages', $response);\n\n $errors = $stream->getErrors();\n $this->assertTrue(empty($errors));\n }", "public function testPagination()\n {\n $this->browse(function (Browser $browser) {\n $page1_entry = $browser->text('table tr:nth-child(1) td:nth-child(1)');\n\n // move to page 2\n $browser->click('.pagination li:nth-child(3) a');\n\n // verify we are on page 2\n $browser->waitFor('.pagination li:nth-child(3) span');\n $browser->assertSeeIn('.pagination li:nth-child(3) span', '2');\n\n $page2_entry = $browser->text('table tr:nth-child(1) td:nth-child(1)');\n\n // verify content is different\n $this->assertNotEquals($page1_entry, $page2_entry);\n\n // move to page 3 using the next button instead of the page number link\n $browser->click('.pagination li:nth-child(8) a');\n\n // verify we are on page 3\n $browser->waitFor('.pagination li:nth-child(4) span');\n $browser->assertSeeIn('.pagination li:nth-child(4) span', '3');\n\n $page3_entry = $browser->text('table tr:nth-child(1) td:nth-child(1)');\n\n // verify content is different\n $this->assertNotEquals($page2_entry, $page3_entry);\n\n // move back one page using the back button\n $browser->click('.pagination li:nth-child(1) a');\n\n //verify the content is the same since our last visit to this page\n $page2back_entry = $browser->text('table tr:nth-child(1) td:nth-child(1)');\n $this->assertEquals($page2_entry, $page2back_entry);\n });\n }", "public function testPaginationWrongData()\n {\n // init\n $oPagination = new \\Pagination();\n $oPagination->setUrl('abc');\n $oPagination->setPage(20);\n $oPagination->setPerPage(10);\n $oPagination->setItemsNo(200);\n \n $this->assertFalse($this->invokeMethod($oPagination, 'compute'));\n \n // init\n $oPagination = new \\Pagination();\n $oPagination->setUrl('http://www.st.ro');\n $oPagination->setPage(-1);\n $oPagination->setPerPage(10);\n $oPagination->setItemsNo(200);\n \n $this->assertFalse($this->invokeMethod($oPagination, 'compute'));\n \n // init\n $oPagination = new \\Pagination();\n $oPagination->setUrl('http://www.st.ro');\n $oPagination->setPage(20);\n $oPagination->setPerPage(null);\n $oPagination->setItemsNo(200);\n \n $this->assertFalse($this->invokeMethod($oPagination, 'compute'));\n \n // init\n $oPagination = new \\Pagination();\n $oPagination->setUrl('http://www.st.ro');\n $oPagination->setPage(20);\n $oPagination->setPerPage(10);\n $oPagination->setItemsNo('abc');\n \n $this->assertFalse($this->invokeMethod($oPagination, 'compute'));\n }", "public function testGetGetParams()\n {\n $expected = array('document' => array('filesize' => 100),\n 'get_test1' => 'true', 'get_test2' => 'go mets');\n $this->assertEquals($expected, $this->_req->getGetParams());\n }", "public function testPaginationSimpleBeforeBeforeLastPage()\n {\n // init\n $oPagination = new \\Pagination();\n $oPagination->setUrl('http://www.st.ro');\n $oPagination->setPage(18);\n $oPagination->setPerPage(10);\n $oPagination->setItemsNo(200);\n \n //run the test\n $this->invokeMethod($oPagination, 'compute');\n \n // asserts\n $this->assertEquals(20, $oPagination->getMaxPage());\n $this->assertEquals(2, $oPagination->getPrevPages());\n $this->assertEquals(2, $oPagination->getNextPages());\n $this->assertTrue($oPagination->getFirstPage());\n $this->assertTrue($oPagination->getLastPage());\n }", "public function test118DisplayPaginationLinksWhenTotalRecordsHigherThan10()\n {\n $ssoData = $this->getSSOData();\n\n // current bookings\n $this->createBookings(11, date('Y-m-d'), 11);\n\n //$this->mockApi($data, 'empty_ok');\n\n $params = [\n 'page' => 1,\n 'per_page' => 10,\n ];\n $response = $this->ajax($this->getUrlByParams($params))->json();\n\n $this->assertTrue(is_array($response));\n $this->assertArrayHasKey('current_list', $response);\n\n $list = $response['current_list'];\n $totalRowsInList = substr_count($list, '<ul class=\"pagination\"');\n\n $this->assertEquals(1, $totalRowsInList);\n }", "public function testGetOrdersWithCorrectParams()\n {\n echo \"\\n ***** Valid test - param value (page=4 and limit=2) - should get 200 ***** \\n \";\n $params = '{\"origin\": [\"-33.865143\",\"151.209900\"], \"destination\": [\"-37.663712\",\"144.844788\"]}';\n $params = json_decode($params, true);\n $response = $this->json('POST', '/orders', $params);\n \n $params = '{\"origin\": [\"-33.865143\",\"151.209900\"], \"destination\": [\"-37.663712\",\"144.844788\"]}';\n $params = json_decode($params, true);\n $response = $this->json('POST', '/orders', $params);\n \n $params = 'page=1&limit=2';\n $response = $this->json('GET', '/orders?'.$params);\n $response_data = $response->getContent();\n $response->assertStatus(200);\n\n echo \"\\n ***** Valid test - Number or count of response should be less than 2 - should get 200 ***** \\n \";\n $this->assertLessThan(3, count($response_data));\n \n echo \"\\n ***** Valid test - Get Order - Response should contain id, distance and status keys only ***** \\n\";\n $response_data = json_decode($response_data);\n\n foreach ($response_data as $order) {\n $order = (array) $order;\n $this->assertArrayHasKey('id', $order);\n $this->assertArrayHasKey('distance', $order);\n $this->assertArrayHasKey('status', $order);\n }\n }", "public function testGetVesselStatusesWithPagination()\n {\n $client = new Client(['base_uri' => 'http://localhost:8000/api/']);\n $token = $this->getAuthenticationToken();\n $headers = [\n 'Authorization' => 'Bearer ' . $token,\n 'Accept' => 'application/json'\n ];\n $params = [\n 'page' => 1\n ];\n $response = $client->request('GET', 'vessel_statuses', [\n 'headers' => $headers,\n 'query' => $params\n ]);\n\n $this->assertEquals(200, $response->getStatusCode());\n $this->assertEquals(['application/json; charset=utf-8'], $response->getHeader('Content-Type'));\n $data = json_decode($response->getBody(), true);\n $this->assertEquals(7, count($data));\n\n }", "public function testThatGetAllUsersAdditionalParamsAreSent()\n {\n $api = new MockManagementApi( [ new Response( 200, self::$headers ) ] );\n\n $api->call()->users()->getAll( [ '__test_parameter__' => '__test_value__' ] );\n\n $query = $api->getHistoryQuery();\n $this->assertEquals( '__test_parameter__=__test_value__', $query );\n }", "public function paginate_payments_of_the_contract()\n {\n $this->assertEquals(\n self::$contract->payment_paginate(self::$contract, $paginate = 10),\n self::$contract->payment()->paginate($paginate)\n );\n }", "protected function buildPagination() {}", "protected function buildPagination() {}", "public function testGetPages() : void {\n $expected = 0;\n $this->assertEquals($expected, count($this->dataManager->getPages()));\n }", "function testPageQuery() {\n\t$config = getConfig();\n\t$root = getRootPath();\n\t\n\t$http = new \\AutoHttp\\Http($config);\n\t\n\t// Load the test page as a GET using a param array.\n\t$page = $http->getPage($root . '/test/pages/http/params.php', null, array('foo' => 'bar'));\n\t\t\n\t// Make sure the test page received our GET params.\n\tif (strpos($page['body'], '<li>GET foo=bar</li>') === false)\n\t\treturn 'Test page should list the GET parameters from our array.';\n\t\n\t// Load the test page as a GET using a param string.\n\t$page = $http->getPage($root .'/test/pages/http/params.php', null, 'hi=there');\n\t\t\n\t// Make sure the test page received our GET params.\n\tif (strpos($page['body'], '<li>GET hi=there</li>') === false)\n\t\treturn 'Test page should list the GET parameters from our string.';\n\t\n\t// Load the test page as a POST using a param array.\n\t$page = $http->getPage($root .'/test/pages/http/params.php', null, null, array('createUser' => '1'));\n\t\t\n\t// Make sure the test page received our POST params.\n\tif (strpos($page['body'], '<li>POST createUser=1</li>') === false)\n\t\treturn 'Test page should list the POST parameters from our array.';\n\t\n\t// Load the test page as a POST using a param string.\n\t$page = $http->getPage($root .'/test/pages/http/params.php', null, null, 'username=johndoe');\n\t\t\n\t// Make sure the test page received our POST params.\n\tif (strpos($page['body'], '<li>POST username=johndoe</li>') === false)\n\t\treturn 'Test page should list the POST parameters from our string.';\n\t\t\n\treturn true;\t\n}", "public function test_paginator_resolves_correct_page(): void\n {\n $page = 2;\n $perPage = 15;\n\n $expected = new Paginator(new Collection([\n new User(['id' => 1, 'name' => 'Robbie']),\n new User(['id' => 2, 'name' => 'Michael']),\n ]), $perPage, $page);\n\n $this->manager->paginator()->withName(User::class)\n ->remember(10, function () use ($expected): Paginator {\n return $expected;\n });\n\n $this->assertTrue($this->manager->paginator()->has($this->hash(\"paginator:users:$perPage:$page\")));\n\n Paginator::currentPageResolver(function () use ($page) {\n return $page;\n });\n\n $this->assertInstanceOf(Paginator::class, $this->manager->paginator(User::class)->get());\n }", "public function testListingWithFilters()\n {\n $filters[] = ['limit' => 30, 'page' => 30];\n $filters[] = ['listing_type' => 'public'];\n foreach ($filters as $k => $v) {\n $client = static::createClient();\n $client->request('GET', '/v2/story', $v, [], $this->headers);\n $this->assertStatusCode(200, $client);\n\n $response = json_decode($client->getResponse()->getContent(), true);\n $this->assertTrue(is_array($response));\n }\n }", "public function testPathPagination()\n {\n $this->makeData(self::NUMBER_RECORD_CREATE);\n $this->browse(function (Browser $browser) {\n $browser->loginAs($this->user)\n ->visit('/admin/qrcodes?page=' . ceil((self::NUMBER_RECORD_CREATE + 1) / (config('define.qrcodes.limit_rows'))));\n $elements = $browser->elements('#list-qrcodes tbody tr');\n $browser->assertPathIs('/admin/qrcodes')\n ->assertQueryStringHas('page', ceil((self::NUMBER_RECORD_CREATE + 1) / (config('define.qrcodes.limit_rows'))));\n });\n }", "public function testThatGetAllUsersDoesNotOverwritePerPageValue()\n {\n $api = new MockManagementApi( [ new Response( 200, self::$headers ) ] );\n\n $api->call()->users()->getAll( [ 'per_page' => 8 ], [], null, null, 9 );\n\n $query = $api->getHistoryQuery();\n $this->assertContains( 'per_page=8', $query );\n }", "public function test_list_stores_pagination()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs($this->user)\n ->visit(new ListStores());\n $number_page = count($browser->elements('.pagination li')) - 2;\n $this->assertEquals($number_page, ceil((self::NUMBER_RECORD) / (self::ROW_LIMIT)));\n });\n }", "public function get_in_progress_contracts_pagination_returns_in_progress_contracts_by_pagination()\n {\n $this->assertEquals(\n self::$contract->get_in_progress_contracts_pagination($paginate = 10),\n Contract::where('contract_status_id', 2)->paginate($paginate)\n );\n }", "public function getIdsShouldPaginate()\n {\n // Given\n $filter = array(\"sku\" => \"sku1\", \"test\" => \"test1\");\n $sortConfig = new SortConfig(\"under_value\", \"desc\");\n $response1 = array(\n \"meta\" => array(\n \"name\" => \"vendors\",\n \"display_name\" => \"vendors\",\n \"total\" => 150,\n \"count\" => 100,\n \"limit\" => VendorProvider::$PAGINATION_LIMIT,\n \"page\" => 0,\n \"start\" => 0,\n \"end\" => 0\n ),\n \"vendors\" => array(\n array(\"id\" => \"v1\"),\n array(\"id\" => \"v2\"),\n )\n );\n $response2 = array(\n \"meta\" => array(\n \"name\" => \"vendors\",\n \"display_name\" => \"vendors\",\n \"total\" => 150,\n \"count\" => 50,\n \"limit\" => VendorProvider::$PAGINATION_LIMIT,\n \"page\" => 1,\n \"start\" => 0,\n \"end\" => 1\n ),\n \"vendors\" => array(\n array(\"id\" => \"po3\"),\n array(\"id\" => \"po4\"),\n )\n );\n $expectedUrl1 = \"vendors?fields=id&sku=sku1&test=test1&under_value_sort=desc&limit=\".VendorProvider::$PAGINATION_LIMIT.\"&page=0\";\n $expectedUrl2 = \"vendors?fields=id&sku=sku1&test=test1&under_value_sort=desc&limit=\".VendorProvider::$PAGINATION_LIMIT.\"&page=1\";\n $this->_mockApi->expects($this->exactly(2))\n ->method('getResource')\n ->will(\n $this->returnValueMap(\n array(\n array($expectedUrl1, $response1),\n array($expectedUrl2, $response2),\n )\n )\n );\n\n // When\n $result = $this->_vendorProvider->getIds($filter, $sortConfig);\n\n // Then\n $this->assertEquals($result, array(\"v1\", \"v2\", \"po3\", \"po4\"));\n }", "public function paginate_participants_of_the_contract()\n {\n $this->assertEquals(\n self::$contract->participant_paginate(self::$contract, $paginate = 10),\n self::$contract->participant()->paginate($paginate)\n );\n }", "public function testPathPagination()\n { \n $this->makeData(12);\n $this->browse(function (Browser $browser) {\n $browser->visit('/admin/comment?page=2');\n $elements = $browser->elements('#list-table tbody tr');\n $this->assertCount(2, $elements);\n $browser->assertPathIs('/admin/comment');\n $browser->assertQueryStringHas('page', 2);\n });\n }", "public function testCreatePaginatedList(): void\n {\n // given\n $page = 1;\n $dataSetSize = 3;\n $expectedResultSize = 3;\n\n $counter = 0;\n while ($counter < $dataSetSize) {\n $category = new Category();\n $category->setName('Test Category #'.$counter);\n $this->categoryService->save($category);\n\n ++$counter;\n }\n\n // when\n $result = $this->categoryService->createPaginatedList($page);\n\n // then\n $this->assertEquals($expectedResultSize, $result->count());\n }", "public function testFirstPageOnEdge() {\n\t\tAssert::same(\n\t\t\t'|first|1||last|1||prev|1||next|1|',\n\t\t\t(new UI\\AttainablePagination(\n\t\t\t\t1,\n\t\t\t\t50,\n\t\t\t\t50\n\t\t\t))->print(new Output\\FakeFormat(''))->serialization()\n\t\t);\n\t}", "public function testThatGetAllUsersDoesNotOverwritePageValue()\n {\n $api = new MockManagementApi( [ new Response( 200, self::$headers ) ] );\n\n $api->call()->users()->getAll( [ 'page' => 11 ], [], null, 22 );\n\n $query = $api->getHistoryQuery();\n $this->assertContains( 'page=11', $query );\n }", "public function test_list_all_offices_paginated() {\n Office::factory(3)->create();\n\n $response = $this->get('/api/offices');\n\n $response->assertOk();\n\n // Assert the returned json data has 3 items - the ones we created above\n $response->assertJsonCount(3, 'data');\n\n // Assert atleast the ID of the first item is not null\n $this->assertNotNull($response->json('data')[0]['id']);\n\n // Assert there is meta for the paginated results. You can include links as well\n $this->assertNotNull($response->json('meta'));\n\n //dd($response->json());\n\n }", "public function testModSelectCountPages()\n {\n $this->todo('stub');\n }", "public function testSearchUsingGET()\n {\n\n }", "public function testPaginationSimpleLastPage()\n {\n // init\n $oPagination = new \\Pagination();\n $oPagination->setUrl('http://www.st.ro');\n $oPagination->setPage(20);\n $oPagination->setPerPage(10);\n $oPagination->setItemsNo(200);\n \n //run the test\n $this->invokeMethod($oPagination, 'compute');\n \n // asserts\n $this->assertEquals(20, $oPagination->getMaxPage());\n $this->assertEquals(2, $oPagination->getPrevPages());\n $this->assertEquals(0, $oPagination->getNextPages());\n $this->assertTrue($oPagination->getFirstPage());\n $this->assertFalse($oPagination->getLastPage());\n }", "public function testPageIndex()\n {\n $response = $this->actingAs(User::inRandomOrder()->first(), 'api')->json('GET', '/api/pages');\n $response\n ->assertStatus(200)\n ->assertJsonStructure([\n 'meta',\n 'links',\n 'data' => [\n '*' => [\n \"name\",\n \"id\",\n \"slug\",\n ],\n ],\n ]);\n }", "public function parseUrlUsingLimitEnabled()\n {\n $query = new ControllerQuery($this->enabledFilters, '/test');\n $url = $query->setLimit(39)\n ->build();\n\n $this->assertEquals(\n 'http://www.comicvine.com/api/test/?limit=39&offset=0',\n $url\n );\n }", "public function allowPaginate()\n {\n $this->page = $this->dataProvider->getPaginationParams();\n }", "public function paginate()\n {\n }", "public function testIndex()\n {\n Item::factory()->count(20)->create();\n\n $this->call('GET', '/items')\n ->assertStatus(200)\n ->assertJsonStructure([\n 'data' => [\n '*' => [\n 'id',\n 'guid',\n 'name',\n 'email',\n 'created_dates',\n 'updated_dates',\n ]\n ]\n ])\n ->assertJsonPath('meta.current_page', 1);\n\n //test paginate\n $parameters = array(\n 'per_page' => 10,\n 'page' => 2,\n );\n\n $this->call('GET', '/items', $parameters)\n ->assertStatus(200)\n ->assertJsonStructure([\n 'data' => [\n '*' => [\n 'id',\n 'guid',\n 'name',\n 'email',\n 'created_dates',\n 'updated_dates',\n ]\n ]\n ])\n ->assertJsonPath('meta.current_page', $parameters['page'])\n ->assertJsonPath('meta.per_page', $parameters['per_page']);\n }", "public function testClientsPagination() {\n\n // Number of clients to generate\n $numberOfClients = 45;\n\n // Generate one user\n $user = factory(App\\User::class)->create();\n\n // Generate clients\n for ($i = 0; $i < $numberOfClients; $i++) {\n $user->clients()->save(factory(App\\Client::class)->make());\n }\n\n // Get expected results\n $pagination = \\App\\Client::where('user_id', $user->id)->orderby('created_at', 'desc')->paginate(10);\n\n $this->actingAs($user)\n ->get('/clients/get')\n ->seeJson([\n 'total' => $pagination->total(),\n 'per_page' => $pagination->perPage(),\n 'current_page' => $pagination->currentPage(),\n ]);\n\n }", "public function get_paginate(Request $request)\n {\n }", "public function testGetNewStoriesPaginatedFromTheFirstPage()\n {\n $response = $this->json('GET', $this->newStoriesEndpoint.'?page=1');\n\n // It should return a paginated json the same as the baseJsonStructure\n $response\n ->assertStatus(200)\n ->assertJsonStructure($this->baseJsonStructure)\n ->assertJsonFragment($this->baseJsonFragment);\n }", "public function canPaginate(): bool;", "public function testCreatePaginatedListEmptyList(): void\n {\n // given\n $page = 1;\n $expectedResultSize = 0;\n\n $user = $this->simpleUser();\n\n // when\n $result = $this->eventService->createPaginatedList($page, $user);\n\n // then\n $this->assertEquals($expectedResultSize, $result->count());\n }", "public function getPerPage();", "public function youCanUseAPaginatorAsData()\n {\n // Arrange...\n $fruit = $this->createTestModel()->newQuery()->paginate( 1 );\n\n // Act...\n $response = $this->responder->success( $fruit );\n\n // Assert...\n $this->assertEquals( $response->getData( true ), [\n 'status' => 200,\n 'success' => true,\n 'data' => [\n [\n 'name' => 'Mango',\n 'price' => 10,\n 'isRotten' => false\n ]\n ],\n 'pagination' => [\n 'total' => 1,\n 'count' => 1,\n 'perPage' => 1,\n 'currentPage' => 1,\n 'totalPages' => 1\n ]\n ] );\n }", "public function testClientsPaginationFromThirdPageAsVisitor() {\n\n $page = 3;\n\n $this->visit('/clients/get?page=' . $page)\n ->seePageIs('/login');\n\n }", "public function is_paged()\n {\n }", "public function testSetAndGetParams()\n {\n $page = new Zym_Navigation_Page_Mvc(array(\n 'label' => 'foo',\n 'action' => 'index',\n 'controller' => 'index'\n ));\n \n $params = array('foo' => 'bar', 'baz' => 'bat');\n \n $page->setParams($params);\n $this->assertEquals($params, $page->getParams());\n \n $page->setParams();\n $this->assertEquals(array(), $page->getParams());\n \n $page->setParams($params);\n $this->assertEquals($params, $page->getParams());\n \n $page->setParams(array());\n $this->assertEquals(array(), $page->getParams());\n }", "public function paginate($limit, array $params = null);", "public function testPaginationAndESSorting()\n {\n $response = Article::search('*', [\n 'sort' => [\n 'title',\n ],\n ]);\n\n /*\n * Just so it's clear these are in the expected title order,\n */\n $this->assertEquals([\n 'Fast black dogs',\n 'Quick brown fox',\n 'Swift green frogs',\n ], $response->map(function ($a) {\n return $a->title;\n })->all());\n\n /* Response can be used as an array (of the results) */\n $response = $response->perPage(1)->page(2);\n\n $this->assertEquals(1, count($response));\n\n $this->assertInstanceOf(Result::class, $response[0]);\n\n $article = $response[0];\n $this->assertEquals('Quick brown fox', $article->title);\n\n $this->assertEquals('<ul class=\"pagination\">'.\n '<li><a href=\"/?page=1\" rel=\"prev\">&laquo;</a></li> '.\n '<li><a href=\"/?page=1\">1</a></li>'.\n '<li class=\"active\"><span>2</span></li>'.\n '<li><a href=\"/?page=3\">3</a></li> '.\n '<li><a href=\"/?page=3\" rel=\"next\">&raquo;</a></li>'.\n '</ul>', $response->render());\n\n $this->assertEquals(3, $response->total());\n $this->assertEquals(1, $response->perPage());\n $this->assertEquals(2, $response->currentPage());\n $this->assertEquals(3, $response->lastPage());\n }", "public function getPaginated();", "public function get_collection_params() {\n\t\t$params = array();\n\t\t$params['context'] = $this->get_context_param( array( 'default' => 'view' ) );\n\t\t$params['page'] = array(\n\t\t\t'description' => __( 'Current page of the collection.', 'woocommerce' ),\n\t\t\t'type' => 'integer',\n\t\t\t'default' => 1,\n\t\t\t'sanitize_callback' => 'absint',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t\t'minimum' => 1,\n\t\t);\n\t\t$params['per_page'] = array(\n\t\t\t'description' => __( 'Maximum number of items to be returned in result set.', 'woocommerce' ),\n\t\t\t'type' => 'integer',\n\t\t\t'default' => 10,\n\t\t\t'minimum' => 0,\n\t\t\t'maximum' => 100,\n\t\t\t'sanitize_callback' => 'absint',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\t\t$params['after'] = array(\n\t\t\t'description' => __( 'Limit response to resources published after a given ISO8601 compliant date.', 'woocommerce' ),\n\t\t\t'type' => 'string',\n\t\t\t'format' => 'date-time',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\t\t$params['before'] = array(\n\t\t\t'description' => __( 'Limit response to resources published before a given ISO8601 compliant date.', 'woocommerce' ),\n\t\t\t'type' => 'string',\n\t\t\t'format' => 'date-time',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\t\t$params['order'] = array(\n\t\t\t'description' => __( 'Order sort attribute ascending or descending.', 'woocommerce' ),\n\t\t\t'type' => 'string',\n\t\t\t'default' => 'desc',\n\t\t\t'enum' => array( 'asc', 'desc' ),\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\t\t$params['orderby'] = array(\n\t\t\t'description' => __( 'Sort collection by object attribute.', 'woocommerce' ),\n\t\t\t'type' => 'string',\n\t\t\t'default' => 'date',\n\t\t\t'enum' => array(\n\t\t\t\t'date',\n\t\t\t\t'num_items_sold',\n\t\t\t\t'net_total',\n\t\t\t),\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\t\t$params['product_includes'] = array(\n\t\t\t'description' => __( 'Limit result set to items that have the specified product(s) assigned.', 'woocommerce' ),\n\t\t\t'type' => 'array',\n\t\t\t'items' => array(\n\t\t\t\t'type' => 'integer',\n\t\t\t),\n\t\t\t'default' => array(),\n\t\t\t'sanitize_callback' => 'wp_parse_id_list',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\t\t$params['product_excludes'] = array(\n\t\t\t'description' => __( 'Limit result set to items that don\\'t have the specified product(s) assigned.', 'woocommerce' ),\n\t\t\t'type' => 'array',\n\t\t\t'items' => array(\n\t\t\t\t'type' => 'integer',\n\t\t\t),\n\t\t\t'default' => array(),\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t\t'sanitize_callback' => 'wp_parse_id_list',\n\t\t);\n\t\t$params['variation_includes'] = array(\n\t\t\t'description' => __( 'Limit result set to items that have the specified variation(s) assigned.', 'woocommerce' ),\n\t\t\t'type' => 'array',\n\t\t\t'items' => array(\n\t\t\t\t'type' => 'integer',\n\t\t\t),\n\t\t\t'default' => array(),\n\t\t\t'sanitize_callback' => 'wp_parse_id_list',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\t\t$params['variation_excludes'] = array(\n\t\t\t'description' => __( 'Limit result set to items that don\\'t have the specified variation(s) assigned.', 'woocommerce' ),\n\t\t\t'type' => 'array',\n\t\t\t'items' => array(\n\t\t\t\t'type' => 'integer',\n\t\t\t),\n\t\t\t'default' => array(),\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t\t'sanitize_callback' => 'wp_parse_id_list',\n\t\t);\n\t\t$params['coupon_includes'] = array(\n\t\t\t'description' => __( 'Limit result set to items that have the specified coupon(s) assigned.', 'woocommerce' ),\n\t\t\t'type' => 'array',\n\t\t\t'items' => array(\n\t\t\t\t'type' => 'integer',\n\t\t\t),\n\t\t\t'default' => array(),\n\t\t\t'sanitize_callback' => 'wp_parse_id_list',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\t\t$params['coupon_excludes'] = array(\n\t\t\t'description' => __( 'Limit result set to items that don\\'t have the specified coupon(s) assigned.', 'woocommerce' ),\n\t\t\t'type' => 'array',\n\t\t\t'items' => array(\n\t\t\t\t'type' => 'integer',\n\t\t\t),\n\t\t\t'default' => array(),\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t\t'sanitize_callback' => 'wp_parse_id_list',\n\t\t);\n\t\t$params['tax_rate_includes'] = array(\n\t\t\t'description' => __( 'Limit result set to items that have the specified tax rate(s) assigned.', 'woocommerce' ),\n\t\t\t'type' => 'array',\n\t\t\t'items' => array(\n\t\t\t\t'type' => 'integer',\n\t\t\t),\n\t\t\t'default' => array(),\n\t\t\t'sanitize_callback' => 'wp_parse_id_list',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\t\t$params['tax_rate_excludes'] = array(\n\t\t\t'description' => __( 'Limit result set to items that don\\'t have the specified tax rate(s) assigned.', 'woocommerce' ),\n\t\t\t'type' => 'array',\n\t\t\t'items' => array(\n\t\t\t\t'type' => 'integer',\n\t\t\t),\n\t\t\t'default' => array(),\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t\t'sanitize_callback' => 'wp_parse_id_list',\n\t\t);\n\t\t$params['status_is'] = array(\n\t\t\t'description' => __( 'Limit result set to items that have the specified order status.', 'woocommerce' ),\n\t\t\t'type' => 'array',\n\t\t\t'sanitize_callback' => 'wp_parse_slug_list',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t\t'items' => array(\n\t\t\t\t'enum' => $this->get_order_statuses(),\n\t\t\t\t'type' => 'string',\n\t\t\t),\n\t\t);\n\t\t$params['status_is_not'] = array(\n\t\t\t'description' => __( 'Limit result set to items that don\\'t have the specified order status.', 'woocommerce' ),\n\t\t\t'type' => 'array',\n\t\t\t'sanitize_callback' => 'wp_parse_slug_list',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t\t'items' => array(\n\t\t\t\t'enum' => $this->get_order_statuses(),\n\t\t\t\t'type' => 'string',\n\t\t\t),\n\t\t);\n\t\t$params['customer_type'] = array(\n\t\t\t'description' => __( 'Limit result set to returning or new customers.', 'woocommerce' ),\n\t\t\t'type' => 'string',\n\t\t\t'default' => '',\n\t\t\t'enum' => array(\n\t\t\t\t'',\n\t\t\t\t'returning',\n\t\t\t\t'new',\n\t\t\t),\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\t\t$params['refunds'] = array(\n\t\t\t'description' => __( 'Limit result set to specific types of refunds.', 'woocommerce' ),\n\t\t\t'type' => 'string',\n\t\t\t'default' => '',\n\t\t\t'enum' => array(\n\t\t\t\t'',\n\t\t\t\t'all',\n\t\t\t\t'partial',\n\t\t\t\t'full',\n\t\t\t\t'none',\n\t\t\t),\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\t\t$params['extended_info'] = array(\n\t\t\t'description' => __( 'Add additional piece of info about each coupon to the report.', 'woocommerce' ),\n\t\t\t'type' => 'boolean',\n\t\t\t'default' => false,\n\t\t\t'sanitize_callback' => 'wc_string_to_bool',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\t\t$params['order_includes'] = array(\n\t\t\t'description' => __( 'Limit result set to items that have the specified order ids.', 'woocommerce' ),\n\t\t\t'type' => 'array',\n\t\t\t'sanitize_callback' => 'wp_parse_id_list',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t\t'items' => array(\n\t\t\t\t'type' => 'integer',\n\t\t\t),\n\t\t);\n\t\t$params['order_excludes'] = array(\n\t\t\t'description' => __( 'Limit result set to items that don\\'t have the specified order ids.', 'woocommerce' ),\n\t\t\t'type' => 'array',\n\t\t\t'sanitize_callback' => 'wp_parse_id_list',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t\t'items' => array(\n\t\t\t\t'type' => 'integer',\n\t\t\t),\n\t\t);\n\t\t$params['attribute_is'] = array(\n\t\t\t'description' => __( 'Limit result set to orders that include products with the specified attributes.', 'woocommerce' ),\n\t\t\t'type' => 'array',\n\t\t\t'items' => array(\n\t\t\t\t'type' => 'array',\n\t\t\t),\n\t\t\t'default' => array(),\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\t\t$params['attribute_is_not'] = array(\n\t\t\t'description' => __( 'Limit result set to orders that don\\'t include products with the specified attributes.', 'woocommerce' ),\n\t\t\t'type' => 'array',\n\t\t\t'items' => array(\n\t\t\t\t'type' => 'array',\n\t\t\t),\n\t\t\t'default' => array(),\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\treturn $params;\n\t}", "public function testGetTopStoriesPaginatedFromTheFirstPage()\n {\n $response = $this->json('GET', $this->topStoriesEndpoint.'?page=1');\n\n // It should return a paginated json the same as the baseJsonStructure\n $response\n ->assertStatus(200)\n ->assertJsonStructure($this->baseJsonStructure)\n ->assertJsonFragment($this->baseJsonFragment);\n }", "public function testGetNumberOfItems()\n {\n $pu = new Pager(0, 10, 1);\n $this->assertEquals($pu->getNumberOfItems(), 0);\n\n $pu = new Pager(-1, 10, 1);\n $this->assertEquals($pu->getNumberOfItems(), 0);\n\n $pu = new Pager(1, 10, 1);\n $this->assertEquals($pu->getNumberOfItems(), 1);\n }", "public function testGettingParametersFromRoute(): void\n {\n // setup\n $requestParams = $this->getRequestParamsMock();\n\n // test body\n /** @var int $param */\n $param = $requestParams->getParam('rparam');\n\n // assertions\n $this->assertEquals(111, $param);\n }", "public function testTotalPagesGreaterThanDisplayPages()\n {\n $pagination = new Pagination(2,170,10,10);\n $pages = $pagination->getIterator();\n $this->assertEquals(9, $pages->count());\n $pages->seek($pages->count() - 1);\n $this->assertEquals(9, $pages->current());\n $pages->rewind();\n $this->assertEquals(1, $pages->current());\n\n //1 2 3 4 5 6 7 8 9 10 11\n $pagination = new Pagination(6,170,10,12);\n $pages = $pagination->getIterator();\n $this->assertEquals(11, $pages->count());\n $pages->seek($pages->count() - 1);\n $this->assertEquals(11, $pages->current());\n $pages->rewind();\n $this->assertEquals(1, $pages->current());\n\n //3 4 5 6 7 8 9 10 11 12 13\n $pagination = new Pagination(8,170,10,12);\n $pages = $pagination->getIterator();\n $this->assertEquals(11, $pages->count());\n $pages->seek($pages->count() - 1);\n $this->assertEquals(13, $pages->current());\n $pages->rewind();\n $this->assertEquals(3, $pages->current());\n\n //7 8 9 10 11 12 13 14 15 16 17\n $pagination = new Pagination(14,170,10,12);\n $pages = $pagination->getIterator();\n $this->assertEquals(11, $pages->count());\n $pages->seek($pages->count() - 1);\n $this->assertEquals(17, $pages->current());\n $pages->rewind();\n $this->assertEquals(7, $pages->current());\n }", "public function testHasPage() {\n $this->assertEquals(1, $this->users->page());\n }", "public function testSearchApiParams(): void\n {\n $response = $this->getJson('/api/search/stats?searchDate=2030-04-26&searchTerm=l');\n $response->assertStatus(200);\n $response->assertExactJson([\n 'commentsPoints' => [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n 'commitsPoints' => [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n 'pullsPoints' => [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n ]);\n }", "public function test117NoDisplayPaginationLinksWhenTotalRecordsLessThan10()\n {\n $ssoData = $this->getSSOData();\n\n // current bookings\n $this->createBookings(9, date('Y-m-d'), 9);\n\n //$this->mockApi($data, 'empty_ok');\n\n $params = [\n 'page' => 1,\n 'per_page' => 10,\n ];\n $response = $this->ajax($this->getUrlByParams($params))->json();\n\n $this->assertTrue(is_array($response));\n $this->assertArrayHasKey('current_list', $response);\n\n $list = $response['current_list'];\n $totalRowsInList = substr_count($list, '<div class=\"contract_item\"');\n\n $this->assertLessThan(10, $totalRowsInList);\n }", "public function paginate(Request $request);", "public function testBookSearchMustOK()\n {\n $dataSearch = [];\n $dataSearch['search'] = 'TestBook';\n $dataSearch['limit'] = 100;\n $buildParams = http_build_query($dataSearch, PHP_QUERY_RFC1738);\n $url = route('book.index');\n $fullUrl = \"$url?$buildParams\";\n $response = $this->getJson($fullUrl);\n\n $response\n ->assertStatus(200)\n ->assertJsonPath('page_info.total', 1);\n }", "public function testListCategoriesHavePagination()\n {\n $this->makeDataOfListCategories(15);\n $user = $this->makeAdminToLogin();\n $this->browse(function (Browser $browser) use ($user) {\n $browser->loginAs($user)\n ->visit('/admin/categories')\n ->resize(900, 1600)\n ->assertSee('List Categories')\n ->click('.pagination li:nth-child(3) a');\n $elements = $browser->elements('#table-categories tbody tr');\n $this->assertCount(5, $elements);\n $browser->assertQueryStringHas('page', 2);\n $this->assertNotNull($browser->element('.pagination'));\n });\n }", "public function test_search_apartment()\n {\n $response = $this->getJson('/apartments?per_page=5');\n $response->assertStatus(200);\n }", "public function testFetchPageIntegerOffset(){\n $str_gql = \"SELECT * FROM Kind\";\n $obj_request = $this->getBasicFetchRequest();\n $obj_gql_query = $obj_request->mutableGqlQuery();\n $obj_gql_query->setAllowLiteral(TRUE);\n $obj_gql_query->setQueryString($str_gql . \" LIMIT @intPageSize OFFSET @intOffset\");\n\n $obj_arg = $obj_gql_query->addNameArg();\n $obj_arg->setName('intPageSize');\n $obj_arg->mutableValue()->setIntegerValue(11);\n\n $obj_arg_offset = $obj_gql_query->addNameArg();\n $obj_arg_offset->setName('intOffset');\n $obj_arg_offset->mutableValue()->setIntegerValue(22);\n\n $this->apiProxyMock->expectCall('datastore_v4', 'RunQuery', $obj_request, new \\google\\appengine\\datastore\\v4\\RunQueryResponse());\n\n $obj_store = $this->createBasicStore();\n $obj_result = $obj_store->query($str_gql)->fetchPage(11, 22);\n\n $this->assertEquals($obj_result, []);\n $this->apiProxyMock->verify();\n }", "public function testShowRecordPaginate()\n {\n $this->makeData(21);\n $this->browse(function (Browser $browser) {\n $browser->visit('/admin/comment')\n ->resize(1920, 2000)\n ->assertSee('List comment & rating');\n //Count row number in one page \n $elements = $browser->elements('#list-table tbody tr');\n $this->assertCount(10, $elements);\n $this->assertNotNull($browser->element('.pagination'));\n\n //Count page number of pagination\n $paginate_element = $browser->elements('.pagination li');\n $number_page = count($paginate_element)- 2;\n $this->assertTrue($number_page == 3);\n });\n }", "public function testHasPages() {\n $this->assertEquals(1, $this->users->pages());\n }", "public function testLastPageOnEdge() {\n\t\tAssert::same(\n\t\t\t'|first|1||last|2||prev|1||next|2|',\n\t\t\t(new UI\\AttainablePagination(\n\t\t\t\t2,\n\t\t\t\t50,\n\t\t\t\t100\n\t\t\t))->print(new Output\\FakeFormat(''))->serialization()\n\t\t);\n\t}", "public function testTotalPagesLessThanDisplayPagesBeginningPageOne()\n {\n $pagination = new Pagination(1,100,10,12);\n $pages = $pagination->getIterator();\n $this->assertEquals(10, $pages->count());\n $pages->seek($pages->count() - 1);\n $this->assertEquals(10, $pages->current());\n $pages->rewind();\n $this->assertEquals(1, $pages->current());\n\n //1 2 3 4 5 6 7\n $pagination = new Pagination(2,70,10,10);\n $pages = $pagination->getIterator();\n $this->assertEquals(7, $pages->count());\n $pages->seek($pages->count() - 1);\n $this->assertEquals(7, $pages->current());\n $pages->rewind();\n $this->assertEquals(1, $pages->current());\n }", "public function withPagination(LengthAwarePaginator $paginator): void;", "public function testPaginationSimpleThirdPage()\n {\n // init\n $oPagination = new \\Pagination();\n $oPagination->setUrl('http://www.st.ro');\n $oPagination->setPage(3);\n $oPagination->setPerPage(10);\n $oPagination->setItemsNo(100);\n \n //run the test\n $this->invokeMethod($oPagination, 'compute');\n \n // asserts\n $this->assertEquals(10, $oPagination->getMaxPage());\n $this->assertEquals(2, $oPagination->getPrevPages());\n $this->assertEquals(2, $oPagination->getNextPages());\n $this->assertTrue($oPagination->getFirstPage());\n $this->assertTrue($oPagination->getLastPage());\n }", "public function testGetBestStoriesPaginatedFromFirstThePage()\n {\n $response = $this->json('GET', $this->bestStoriesEndpoint.'?page=1');\n\n // It should return a paginated json the same as the baseJsonStructure\n $response\n ->assertStatus(200)\n ->assertJsonStructure($this->baseJsonStructure)\n ->assertJsonFragment($this->baseJsonFragment);\n }", "protected function populateParams() {\r\n $this->pageNum = isset($_GET['p']) ? (int)$_GET['p'] : 0;\r\n $this->status = isset($_GET['status']) ? (int)$_GET['status'] : 0;\r\n if ($this->pageNum < 1) {\r\n $this->pageNum = 1;\r\n }\r\n }", "public function testGetPostParams()\n {\n // simulate a post\n $expected = array('document' => array('name' => 'hey'),\n 'post_test1' => 'false', 'post_test2' => 'go yanks');\n $this->assertEquals($expected, $this->_req->getPostParams());\n }", "public function testPaginationSimpleSecondPage()\n {\n // init\n $oPagination = new \\Pagination();\n $oPagination->setUrl('http://www.st.ro');\n $oPagination->setPage(2);\n $oPagination->setPerPage(10);\n $oPagination->setItemsNo(100);\n \n //run the test\n $this->invokeMethod($oPagination, 'compute');\n \n // asserts\n $this->assertEquals(10, $oPagination->getMaxPage());\n $this->assertEquals(1, $oPagination->getPrevPages());\n $this->assertEquals(2, $oPagination->getNextPages());\n $this->assertFalse($oPagination->getFirstPage());\n $this->assertTrue($oPagination->getLastPage());\n }", "public function testGetIterator()\n {\n $parameters = ['foo' => 'bar', 'bar' => 'foo'];\n $container = new ParameterBag($parameters);\n\n $elements = 0;\n foreach ($container as $parameter => $value) {\n /* Cycle all the parameters to ensure we have all the expected ones */\n ++$elements;\n\n $this->assertEquals($parameters[$parameter], $value);\n }\n #\n # We will also need to ensure that we have the number of elements matching the expected\n $this->assertEquals(count($parameters), $elements);\n }", "public function get_collection_params() {\n\t\t$params = [];\n\t\t$params['context'] = $this->get_context_param();\n\t\t$params['context']['default'] = 'view';\n\n\t\t$params['page'] = array(\n\t\t\t'description' => __( 'Current page of the collection.', 'woocommerce' ),\n\t\t\t'type' => 'integer',\n\t\t\t'default' => 1,\n\t\t\t'sanitize_callback' => 'absint',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t\t'minimum' => 1,\n\t\t);\n\n\t\t$params['per_page'] = array(\n\t\t\t'description' => __( 'Maximum number of items to be returned in result set. Defaults to no limit if left blank.', 'woocommerce' ),\n\t\t\t'type' => 'integer',\n\t\t\t'default' => 10,\n\t\t\t'minimum' => 0,\n\t\t\t'maximum' => 100,\n\t\t\t'sanitize_callback' => 'absint',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['search'] = array(\n\t\t\t'description' => __( 'Limit results to those matching a string.', 'woocommerce' ),\n\t\t\t'type' => 'string',\n\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['after'] = array(\n\t\t\t'description' => __( 'Limit response to resources created after a given ISO8601 compliant date.', 'woocommerce' ),\n\t\t\t'type' => 'string',\n\t\t\t'format' => 'date-time',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['before'] = array(\n\t\t\t'description' => __( 'Limit response to resources created before a given ISO8601 compliant date.', 'woocommerce' ),\n\t\t\t'type' => 'string',\n\t\t\t'format' => 'date-time',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['date_column'] = array(\n\t\t\t'description' => __( 'When limiting response using after/before, which date column to compare against.', 'woocommerce' ),\n\t\t\t'type' => 'string',\n\t\t\t'default' => 'date',\n\t\t\t'enum' => array(\n\t\t\t\t'date',\n\t\t\t\t'date_gmt',\n\t\t\t\t'modified',\n\t\t\t\t'modified_gmt',\n\t\t\t),\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['exclude'] = array(\n\t\t\t'description' => __( 'Ensure result set excludes specific IDs.', 'woocommerce' ),\n\t\t\t'type' => 'array',\n\t\t\t'items' => array(\n\t\t\t\t'type' => 'integer',\n\t\t\t),\n\t\t\t'default' => [],\n\t\t\t'sanitize_callback' => 'wp_parse_id_list',\n\t\t);\n\n\t\t$params['include'] = array(\n\t\t\t'description' => __( 'Limit result set to specific ids.', 'woocommerce' ),\n\t\t\t'type' => 'array',\n\t\t\t'items' => array(\n\t\t\t\t'type' => 'integer',\n\t\t\t),\n\t\t\t'default' => [],\n\t\t\t'sanitize_callback' => 'wp_parse_id_list',\n\t\t);\n\n\t\t$params['offset'] = array(\n\t\t\t'description' => __( 'Offset the result set by a specific number of items.', 'woocommerce' ),\n\t\t\t'type' => 'integer',\n\t\t\t'sanitize_callback' => 'absint',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['order'] = array(\n\t\t\t'description' => __( 'Order sort attribute ascending or descending.', 'woocommerce' ),\n\t\t\t'type' => 'string',\n\t\t\t'default' => 'desc',\n\t\t\t'enum' => array( 'asc', 'desc' ),\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['orderby'] = array(\n\t\t\t'description' => __( 'Sort collection by object attribute.', 'woocommerce' ),\n\t\t\t'type' => 'string',\n\t\t\t'default' => 'date',\n\t\t\t'enum' => array(\n\t\t\t\t'date',\n\t\t\t\t'modified',\n\t\t\t\t'id',\n\t\t\t\t'include',\n\t\t\t\t'title',\n\t\t\t\t'slug',\n\t\t\t\t'price',\n\t\t\t\t'popularity',\n\t\t\t\t'rating',\n\t\t\t\t'menu_order',\n\t\t\t\t'comment_count',\n\t\t\t),\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['parent'] = array(\n\t\t\t'description' => __( 'Limit result set to those of particular parent IDs.', 'woocommerce' ),\n\t\t\t'type' => 'array',\n\t\t\t'items' => array(\n\t\t\t\t'type' => 'integer',\n\t\t\t),\n\t\t\t'default' => [],\n\t\t\t'sanitize_callback' => 'wp_parse_id_list',\n\t\t);\n\n\t\t$params['parent_exclude'] = array(\n\t\t\t'description' => __( 'Limit result set to all items except those of a particular parent ID.', 'woocommerce' ),\n\t\t\t'type' => 'array',\n\t\t\t'items' => array(\n\t\t\t\t'type' => 'integer',\n\t\t\t),\n\t\t\t'sanitize_callback' => 'wp_parse_id_list',\n\t\t\t'default' => [],\n\t\t);\n\n\t\t$params['type'] = array(\n\t\t\t'description' => __( 'Limit result set to products assigned a specific type.', 'woocommerce' ),\n\t\t\t'type' => 'string',\n\t\t\t'enum' => array_merge( array_keys( wc_get_product_types() ), [ 'variation' ] ),\n\t\t\t'sanitize_callback' => 'sanitize_key',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['sku'] = array(\n\t\t\t'description' => __( 'Limit result set to products with specific SKU(s). Use commas to separate.', 'woocommerce' ),\n\t\t\t'type' => 'string',\n\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['featured'] = array(\n\t\t\t'description' => __( 'Limit result set to featured products.', 'woocommerce' ),\n\t\t\t'type' => 'boolean',\n\t\t\t'sanitize_callback' => 'wc_string_to_bool',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['category'] = array(\n\t\t\t'description' => __( 'Limit result set to products assigned a specific category ID.', 'woocommerce' ),\n\t\t\t'type' => 'string',\n\t\t\t'sanitize_callback' => 'wp_parse_id_list',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['category_operator'] = array(\n\t\t\t'description' => __( 'Operator to compare product category terms.', 'woocommerce' ),\n\t\t\t'type' => 'string',\n\t\t\t'enum' => [ 'in', 'not in', 'and' ],\n\t\t\t'default' => 'in',\n\t\t\t'sanitize_callback' => 'sanitize_key',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['tag'] = array(\n\t\t\t'description' => __( 'Limit result set to products assigned a specific tag ID.', 'woocommerce' ),\n\t\t\t'type' => 'string',\n\t\t\t'sanitize_callback' => 'wp_parse_id_list',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['tag_operator'] = array(\n\t\t\t'description' => __( 'Operator to compare product tags.', 'woocommerce' ),\n\t\t\t'type' => 'string',\n\t\t\t'enum' => [ 'in', 'not in', 'and' ],\n\t\t\t'default' => 'in',\n\t\t\t'sanitize_callback' => 'sanitize_key',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['on_sale'] = array(\n\t\t\t'description' => __( 'Limit result set to products on sale.', 'woocommerce' ),\n\t\t\t'type' => 'boolean',\n\t\t\t'sanitize_callback' => 'wc_string_to_bool',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['min_price'] = array(\n\t\t\t'description' => __( 'Limit result set to products based on a minimum price, provided using the smallest unit of the currency.', 'woocommerce' ),\n\t\t\t'type' => 'string',\n\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['max_price'] = array(\n\t\t\t'description' => __( 'Limit result set to products based on a maximum price, provided using the smallest unit of the currency.', 'woocommerce' ),\n\t\t\t'type' => 'string',\n\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['stock_status'] = array(\n\t\t\t'description' => __( 'Limit result set to products with specified stock status.', 'woocommerce' ),\n\t\t\t'type' => 'string',\n\t\t\t'enum' => array_keys( wc_get_product_stock_status_options() ),\n\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['attributes'] = array(\n\t\t\t'description' => __( 'Limit result set to products with selected global attributes.', 'woocommerce' ),\n\t\t\t'type' => 'array',\n\t\t\t'items' => array(\n\t\t\t\t'type' => 'object',\n\t\t\t\t'properties' => array(\n\t\t\t\t\t'attribute' => array(\n\t\t\t\t\t\t'description' => __( 'Attribute taxonomy name.', 'woocommerce' ),\n\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t'sanitize_callback' => 'wc_sanitize_taxonomy_name',\n\t\t\t\t\t),\n\t\t\t\t\t'term_id' => array(\n\t\t\t\t\t\t'description' => __( 'List of attribute term IDs.', 'woocommerce' ),\n\t\t\t\t\t\t'type' => 'array',\n\t\t\t\t\t\t'items' => [\n\t\t\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'sanitize_callback' => 'wp_parse_id_list',\n\t\t\t\t\t),\n\t\t\t\t\t'slug' => array(\n\t\t\t\t\t\t'description' => __( 'List of attribute slug(s). If a term ID is provided, this will be ignored.', 'woocommerce' ),\n\t\t\t\t\t\t'type' => 'array',\n\t\t\t\t\t\t'items' => [\n\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'sanitize_callback' => 'wp_parse_slug_list',\n\t\t\t\t\t),\n\t\t\t\t\t'operator' => array(\n\t\t\t\t\t\t'description' => __( 'Operator to compare product attribute terms.', 'woocommerce' ),\n\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t'enum' => [ 'in', 'not in', 'and' ],\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'default' => [],\n\t\t);\n\n\t\t$params['attribute_relation'] = array(\n\t\t\t'description' => __( 'The logical relationship between attributes when filtering across multiple at once.', 'woocommerce' ),\n\t\t\t'type' => 'string',\n\t\t\t'enum' => [ 'in', 'and' ],\n\t\t\t'default' => 'and',\n\t\t\t'sanitize_callback' => 'sanitize_key',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['catalog_visibility'] = array(\n\t\t\t'description' => __( 'Determines if hidden or visible catalog products are shown.', 'woocommerce' ),\n\t\t\t'type' => 'string',\n\t\t\t'enum' => array( 'any', 'visible', 'catalog', 'search', 'hidden' ),\n\t\t\t'sanitize_callback' => 'sanitize_key',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['rating'] = array(\n\t\t\t'description' => __( 'Limit result set to products with a certain average rating.', 'woocommerce' ),\n\t\t\t'type' => 'array',\n\t\t\t'items' => array(\n\t\t\t\t'type' => 'integer',\n\t\t\t\t'enum' => range( 1, 5 ),\n\t\t\t),\n\t\t\t'default' => [],\n\t\t\t'sanitize_callback' => 'wp_parse_id_list',\n\t\t);\n\n\t\treturn $params;\n\t}", "public function testListQrcodesPagination()\n {\n $this->makeData(self::NUMBER_RECORD_CREATE);\n $this->browse(function (Browser $browser) {\n $browser->loginAs($this->user)\n ->visit('/admin/qrcodes');\n $elements = $browser->elements('#list-qrcodes tbody tr');\n $this->assertCount(config('define.qrcodes.limit_rows'), $elements);\n $this->assertNotNull($browser->element('.pagination'));\n $paginate_element = $browser->elements('.pagination li');\n $number_page = count($paginate_element) - 2;\n $this->assertTrue($number_page == ceil((self::NUMBER_RECORD_CREATE + 1) / (config('define.qrcodes.limit_rows'))));\n });\n }", "public function getPerPage(): int;", "public function testIfCustomerPrepareApiInfoHasProperFormat()\n {\n $this->assertEquals($this->customersInstance->prepareCustomersApiInfo(), json_encode([\n 'data' => $this->customer,\n 'current_page' => 2,\n 'last_page' => 120,\n 'next_page' => 'https://www.example.com/api/retargetingtracker?page=3',\n 'prev_page' => 'https://www.example.com/api/retargetingtracker?page=1'\n ], JSON_PRETTY_PRINT));\n }", "public function testAllMatchesRequest()\n {\n $expectedValue = [\n '/1.0/profiles/default',\n '/1.0/profiles/docker',\n ];\n\n $returnedValue = [\n 'default',\n 'docker',\n ];\n\n $endpoint = $this->getEndpointMock($this->getEndpointClass());\n\n $endpoint->expects($this->once())\n ->method('get')\n ->with('/profiles/')\n ->will($this->returnValue($expectedValue));\n\n $this->assertEquals($returnedValue, $endpoint->all());\n }" ]
[ "0.70548224", "0.67531145", "0.67249376", "0.6706914", "0.6686927", "0.66857654", "0.6682336", "0.6552432", "0.6549364", "0.6505953", "0.64882123", "0.64774555", "0.6447404", "0.6440942", "0.64331806", "0.641788", "0.64111185", "0.63885736", "0.6384449", "0.63785315", "0.635689", "0.6340595", "0.63320285", "0.63016486", "0.6298573", "0.6283766", "0.62783194", "0.6277655", "0.62769127", "0.62608457", "0.62288016", "0.6216633", "0.6212993", "0.6196827", "0.6196827", "0.61803555", "0.6176404", "0.61350876", "0.6096058", "0.60953027", "0.6074048", "0.6051136", "0.60423845", "0.60300034", "0.60230416", "0.6020456", "0.6013962", "0.60113436", "0.60063106", "0.59906846", "0.5969749", "0.5936849", "0.5934641", "0.5916677", "0.5916373", "0.59045786", "0.59032995", "0.58994335", "0.5876072", "0.58750415", "0.5871783", "0.5868271", "0.58676827", "0.5863236", "0.5861716", "0.5860934", "0.5850065", "0.58486", "0.5846974", "0.5844539", "0.5829511", "0.5819037", "0.5810271", "0.5799853", "0.5790482", "0.57894075", "0.57885325", "0.57861906", "0.578427", "0.57638687", "0.57605636", "0.5760306", "0.57602227", "0.5757061", "0.5756715", "0.575641", "0.5755347", "0.57507175", "0.57487196", "0.5743926", "0.5727614", "0.57230026", "0.5710473", "0.57055724", "0.5703252", "0.56950814", "0.5688013", "0.56796265", "0.56767374", "0.56717175" ]
0.7644956
0
Test that the "include_totals" parameter works.
public function testGetAllIncludeTotals() { $expected_page = 0; $expected_count = 2; $results = self::$api->getAll(['include_totals' => true], $expected_page, $expected_count); usleep(AUTH0_PHP_TEST_INTEGRATION_SLEEP); $this->assertArrayHasKey('total', $results); $this->assertEquals($expected_page * $expected_count, $results['start']); $this->assertEquals($expected_count, $results['limit']); $this->assertNotEmpty($results['client_grants']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testTotal()\n {\n\n \t$data = [\n \t\t'base_price' => 10,\n \t\t'spacing_cost' => 10,\n \t\t'work_level_cost' => 50,\n \t\t'urgency_cost' => 20,\n \t\t'number_of_pages' => 5,\n \t\t'total_additional_services_cost' => 10\n \t\t// 'vat' => 100\n \t];\n\n $foo = self::getMethod('calculate');\n $cartService = new CartService();\n $response = $foo->invokeArgs($cartService, [$data]);\n\n $this->assertEquals(410, $response);\n }", "public function testTotalAndCoupon()\n {\n $input = [0, 2, 5, 8];\n $coupon = 0.20;\n\n // Execute total() with the array and the additional value of coupon and save to variable\n $output = $this->Receipt->total($input, $coupon);\n $this->assertEquals(\n 12, // Expected value\n $output, // Value returned by total()\n 'When summing the total should equal 12' // Message to return in case of error\n );\n }", "public function hasTotal() {\n return $this->_has(1);\n }", "public function hasTotal() {\n return $this->_has(1);\n }", "public function hasTotal() {\n return $this->_has(1);\n }", "public function hasTotal() {\n return $this->_has(1);\n }", "public function hasTotal() {\n return $this->_has(1);\n }", "public function allowsExactTotals()\n {\n return $this->allowExactTotals ?? false;\n }", "public function testTotalAmountCalculation(): void\n {\n $order = new Order('consumerIdTest123', '845126849', new \\DateTimeImmutable('midnight'), 'OrderNumber123', 7);\n $order->addOrderLine('productIdTest1', 2, 4.9);\n $order->addOrderLine('productIdTest2', 3, 10.5);\n\n static::assertEquals(41.3, $order->getAmount());\n }", "protected function _initTotals()\n {\n $this->_totals = array();\n $this->_totals['subtotal'] = new Varien_Object(array(\n 'code' => 'subtotal',\n 'value' => $this->getSource()->getSubtotal(),\n 'base_value' => $this->getSource()->getBaseSubtotal(),\n 'bluesnap_value' => $this->getSource()->getBluesnapSubtotal(),\n 'label' => $this->helper('sales')->__('Subtotal')\n ));\n\n /**\n * Add shipping\n */\n if (!$this->getSource()->getIsVirtual() && ((float)$this->getSource()->getShippingAmount() || $this->getSource()->getShippingDescription())) {\n $this->_totals['shipping'] = new Varien_Object(array(\n 'code' => 'shipping',\n 'value' => $this->getSource()->getShippingAmount(),\n 'base_value' => $this->getSource()->getBaseShippingAmount(),\n 'bluesnap_value' => $this->getSource()->getBluesnapShippingAmount(),\n 'label' => $this->helper('sales')->__('Shipping & Handling')\n ));\n }\n\n /**\n * Add discount\n */\n if (((float)$this->getSource()->getDiscountAmount()) != 0) {\n if ($this->getSource()->getDiscountDescription()) {\n $discountLabel = $this->helper('sales')->__('Discount (%s)', $this->getSource()->getDiscountDescription());\n } else {\n $discountLabel = $this->helper('sales')->__('Discount');\n }\n $this->_totals['discount'] = new Varien_Object(array(\n 'code' => 'discount',\n 'value' => $this->getSource()->getDiscountAmount(),\n 'base_value' => $this->getSource()->getBaseDiscountAmount(),\n 'bluesnap_value' => $this->getSource()->getBluesnapDiscountAmount(),\n 'label' => $discountLabel\n ));\n }\n\n $this->_totals['grand_total'] = new Varien_Object(array(\n 'code' => 'grand_total',\n 'strong' => true,\n 'value' => $this->getSource()->getGrandTotal(),\n 'base_value' => $this->getSource()->getBaseGrandTotal(),\n 'bluesnap_value' => $this->getSource()->getBluesnapGrandTotal(),\n 'label' => $this->helper('sales')->__('Grand Total'),\n 'area' => 'footer'\n ));\n\n\n //end parent totals\n\n $this->_totals['paid'] = new Varien_Object(array(\n 'code' => 'paid',\n 'strong' => true,\n 'value' => $this->getSource()->getTotalPaid(),\n 'base_value' => $this->getSource()->getBaseTotalPaid(),\n 'bluesnap_value' => $this->getSource()->getBluesnapTotalPaid(),\n 'label' => $this->helper('sales')->__('Total Paid'),\n 'area' => 'footer'\n ));\n $this->_totals['refunded'] = new Varien_Object(array(\n 'code' => 'refunded',\n 'strong' => true,\n 'value' => $this->getSource()->getTotalRefunded(),\n 'base_value' => $this->getSource()->getBaseTotalRefunded(),\n 'bluesnap_value' => $this->getSource()->getBluesnapTotalRefunded(),\n 'label' => $this->helper('sales')->__('Total Refunded'),\n 'area' => 'footer'\n ));\n $this->_totals['due'] = new Varien_Object(array(\n 'code' => 'due',\n 'strong' => true,\n 'value' => $this->getSource()->getTotalDue(),\n 'base_value' => $this->getSource()->getBaseTotalDue(),\n 'bluesnap_value' => $this->getSource()->getBluesnapTotalDue(),\n\n 'label' => $this->helper('sales')->__('Total Due'),\n 'area' => 'footer'\n ));\n return $this;\n }", "public function testTotalMonthlyPrice()\n {\n }", "public function testAroundCollectTotals()\n {\n $quoteItemId = 1;\n $quoteId = 1;\n $productId = 10;\n $sku = 'sku';\n $expectedSkus = [$sku];\n\n $this->quote->expects($this->atLeastOnce())->method('getData')->willReturn(true);\n $quote = $this->quote;\n $closure = function () use ($quote) {\n return $quote;\n };\n $quoteItem = $this->getMockBuilder(\\Magento\\Quote\\Model\\Quote\\Item::class)\n ->disableOriginalConstructor()\n ->setMethods(['getProductId', 'isDeleted', 'getItemId', 'getSku'])\n ->getMock();\n $quoteItem->expects($this->atLeastOnce())->method('getItemId')->willReturn($quoteItemId);\n $quoteItem->expects($this->atLeastOnce())->method('getProductId')->willReturn($productId);\n $quoteItem->expects($this->atLeastOnce())->method('getSku')->willReturn($sku);\n $quoteItem->expects($this->atLeastOnce())->method('isDeleted')->willReturn(true);\n $this->quote->expects($this->atLeastOnce())->method('getItemsCollection')->willReturn([$quoteItem]);\n $this->quote->expects($this->atLeastOnce())->method('getItemById')->with($quoteItemId)->willReturn($quoteItem);\n $this->quote->expects($this->atLeastOnce())->method('getId')->willReturn($quoteId);\n $this->itemRemove->expects($this->atLeastOnce())->method('setNotificationRemove')\n ->with(\n $quoteId,\n $productId,\n $expectedSkus\n );\n\n $this->quotePlugin->aroundCollectTotals($this->quote, $closure);\n }", "private function dataHasTotal()\n {\n return array_key_exists('total', $this->data);\n }", "public function includesExactTotalCountByDefault()\n {\n return $this->includeExactTotalCountByDefault ?? false;\n }", "public function subtotal();", "public function applyTotals ( ) {\n\t\t# Prepare\n\t\t$InvoiceItem = $this;\n\t\t\n\t\t# Apply Totals\n\t\tBal_Payment_Model_InvoiceItem::applyTotalsModel($InvoiceItem);\n\t\t\n\t\t# Return true\n\t\treturn true;\n\t}", "function client_have_transactions($id)\n{\n $total_transactions = 0;\n $total_transactions += total_rows('tblinvoices', array(\n 'clientid' => $id\n ));\n $total_transactions += total_rows('tblestimates', array(\n 'clientid' => $id\n ));\n $total_transactions += total_rows('tblexpenses', array(\n 'clientid' => $id,\n 'billable' => 1\n ));\n $total_transactions += total_rows('tblproposals', array(\n 'rel_id' => $id,\n 'rel_type' => 'client'\n ));\n\n if ($total_transactions > 0) {\n return true;\n }\n\n return false;\n}", "public static function canDisplaySummaryOfTotalsMenu()\n\t{\n\t\treturn PermissionValidator::hasPermission(PermissionConstants::VIEW_SUMMARY_OF_TOTALS_REPORT);\n\t}", "abstract public function countTotal();", "public function testGetRowsHavingFilterNotSelected() {\n $params = [\n 'report_id' => 'contribution/contributions',\n 'contribution_total_amount_sum_op' => 'lte',\n 'contribution_total_amount_sum_value' => '1000',\n 'group_bys' => [\n 'contribution_financial_type_id' => '1',\n 'contribution_campaign_id' => '1',\n ],\n 'order_bys' => [['column' => 'contribution_source', 'order' => 'ASC']],\n ];\n $this->callAPISuccess('ReportTemplate', 'getrows', $params)['values'];\n }", "public function getGrandTotal();", "protected function _initTotals()\n {\n $source = $this->getSource();\n\n $this->_totals = [];\n $this->_totals['subtotal'] = new \\Magento\\Framework\\DataObject(\n ['code' => 'subtotal', 'value' => $source->getSubtotal(), 'label' => __('Subtotal')]\n );\n\n if ((double)$this->getOrder()->getPayment()->getAdditionalInformation('paypal_custom_fee') != 0) {\n $this->_totals['paypal_fee'] = new \\Magento\\Framework\\DataObject(\n [\n 'code' => 'paypal_fee',\n 'field' => 'paypal_fee',\n 'value' => $this->getOrder()->getPayment()->getAdditionalInformation('paypal_custom_fee'),\n 'label' => $this->getOrder()->getPayment()->getAdditionalInformation('base_paypal_custom_fee_description'),\n ]\n );\n }\n\n\n /**\n * Add discount\n */\n if ((double)$this->getSource()->getDiscountAmount() != 0) {\n if ($this->getSource()->getDiscountDescription()) {\n $discountLabel = __('Discount (%1)', $source->getDiscountDescription());\n } else {\n $discountLabel = __('Discount');\n }\n $this->_totals['discount'] = new \\Magento\\Framework\\DataObject(\n [\n 'code' => 'discount',\n 'field' => 'discount_amount',\n 'value' => $source->getDiscountAmount(),\n 'label' => $discountLabel,\n ]\n );\n }\n\n /**\n * Add shipping\n */\n if (!$source->getIsVirtual() && ((double)$source->getShippingAmount() || $source->getShippingDescription())) {\n $label = __('Shipping & Handling');\n if ($this->getSource()->getCouponCode() && !isset($this->_totals['discount'])) {\n $label = __('Shipping & Handling (%1)', $this->getSource()->getCouponCode());\n }\n\n $this->_totals['shipping'] = new \\Magento\\Framework\\DataObject(\n [\n 'code' => 'shipping',\n 'field' => 'shipping_amount',\n 'value' => $this->getSource()->getShippingAmount(),\n 'label' => $label,\n ]\n );\n }\n\n $this->_totals['grand_total'] = new \\Magento\\Framework\\DataObject(\n [\n 'code' => 'grand_total',\n 'field' => 'grand_total',\n 'strong' => true,\n 'value' => $source->getGrandTotal(),\n 'label' => __('Grand Total'),\n ]\n );\n\n /**\n * Base grandtotal\n */\n if ($this->getOrder()->isCurrencyDifferent()) {\n $this->_totals['base_grandtotal'] = new \\Magento\\Framework\\DataObject(\n [\n 'code' => 'base_grandtotal',\n 'value' => $this->getOrder()->formatBasePrice($source->getBaseGrandTotal()),\n 'label' => __('Grand Total to be Charged'),\n 'is_formated' => true,\n ]\n );\n }\n return $this;\n }", "private function _calculateTotalsIn()\n {\n $inStockStatus = self::$IN_STOCK_STATUS;\n $sql = new SqlStatement();\n $sql->select(array(\n 'af.group_id', \n 'af.product_id', \n 'af.type',\n 'value' => 'IF(type = \\'STOCK_STATUS\\' AND p.quantity > 0, ' . $inStockStatus . ', value)'))\n ->from(array('af' => self::FILTERS_TABLE))\n ->innerJoin(array('p' => 'product'), 'af.product_id = p.product_id')\n ->innerJoin(array('exclude' => self::RESULTS_TABLE), 'af.product_id = exclude.product_id');\n \n if ($this->conditions->price) {\n if ($this->conditions->price->min) {\n $sql->where(\"{$this->subquery->actualPrice} >= ?\", array($this->conditions->price->min));\n }\n if ($this->conditions->price->max) {\n $sql->where(\"{$this->subquery->actualPrice} <= ?\", array($this->conditions->price->max));\n }\n }\n \n if ($this->conditions->rating) {\n $sql->where('ROUND(total) IN ('. implode(',', $this->conditions->rating[0]) . ')');\n }\n \n if ( self::$HIDE_OUT_OF_STOCK ) {\n $sql->leftJoin(array('pov' => 'product_option_value'), 'af.product_id = pov.product_id AND af.value = pov.option_value_id AND af.type = \"OPTION\"')\n ->leftJoin(array('pov1' => 'product_option_value'), 'p.product_id = pov1.product_id')\n ->where('( (pov1.quantity IS NULL AND p.quantity > 0) OR '\n . '(pov1.quantity > 0 AND af.type != \"OPTION\") OR '\n . 'pov.quantity > 0 )')\n ->group(array('af.type', 'group_id', 'value', 'p.product_id'));\n }\n \n $sql2 = new SqlStatement();\n $sql2->select(array(\n 'id' => \"af.group_id\", \n 'val' => 'af.value', \n 'c' => 'COUNT(*)',\n 'type' => 'af.type',\n ))\n ->from(array('af' => $sql))\n ->group(array('af.type', 'af.group_id', 'af.value'));\n \n if (count($this->aggregate)) {\n foreach ($this->aggregate as $type => $group) {\n $sql2->where(\"((af.type = '$type' AND af.group_id NOT IN (\" . implode(',', array_keys($group)) . \")) OR af.type != '$type')\");\n }\n }\n \n $res = $this->db->query($sql2);\n \n return $res->rows;\n }", "public function testCreateFromOrderWithATotalOf10ShouldReturnAnInvoiceWithTotalOf10()\n {\n $order = new Order();\n $order->setTotal(10);\n $invoice = $this->invoiceFactory->createFromOrder($order);\n static::assertEquals(10, $invoice->getTotal());\n }", "function traff_agrupate_subtotals( &$agrupation, $traff_all, $offset, $groupby, $countby)\n{\n\tif( !is_array($countby) ||( count($countby) != 1 && count($countby) != 2))\n\t\treturn false;\n\n\t// Reseteo los contadores de $agrupation.\n\t$agrupation->count = count($countby)==2 ? array(0, 0) : array(0);\n\t$agrupation->subtotal = 0;\n\n\t$c_groupby = $traff_all[ $offset][ $groupby];\n\t\n\tfor( $n = $offset; $n >= 0; $n --)\n\t{\n\t\t$item = $traff_all[ $n];\n\t\n\t\tif( $c_groupby != $item[ $groupby])\n\t\t{\n\t\t\t// Cambio la agrupacion. Este elemento ya no lo consideramos.\n\t\t\tbreak;\n\t\t}\n\n\t\t// Sumamos los contadores.\n\t\t$agrupation->subtotal += ( float)$item['importe'];\n\t\t$agrupation->count[0] += ( float)$item[$countby[0]];\n\t\tif(count($countby) == 2)\n\t\t\t$agrupation->count[1] += ( float)$item[$countby[1]];\n\t}\n\n\treturn true;\n}", "protected function _initTotals()\n {\n $source = $this->getSource();\n\n $this->_totals = array();\n $this->_totals['subtotal'] = new Varien_Object(array(\n 'code' => 'subtotal',\n 'value' => $source->getSubtotal(),\n 'label' => $this->__('Subtotal')\n ));\n\n\n /**\n * Add shipping\n */\n if (!$source->getIsVirtual() && ((float) $source->getShippingAmount() || $source->getShippingDescription()))\n {\n $this->_totals['shipping'] = new Varien_Object(array(\n 'code' => 'shipping',\n 'field' => 'shipping_amount',\n 'value' => $this->getSource()->getShippingAmount(),\n 'label' => $this->__('Shipping & Handling')\n ));\n }\n\n /**\n * Add discount\n */\n if (((float)$this->getSource()->getDiscountAmount()) != 0) {\n if ($this->getSource()->getDiscountDescription()) {\n $discountLabel = $this->__('Discount (%s)', $source->getDiscountDescription());\n } else {\n $discountLabel = $this->__('Discount');\n }\n $this->_totals['discount'] = new Varien_Object(array(\n 'code' => 'discount',\n 'field' => 'discount_amount',\n 'value' => $source->getDiscountAmount(),\n 'label' => $discountLabel\n ));\n }\n\n $this->_totals['grand_total'] = new Varien_Object(array(\n 'code' => 'grand_total',\n 'field' => 'grand_total',\n 'strong'=> true,\n 'value' => $source->getGrandTotal(),\n 'label' => $this->__('Grand Total')\n ));\n\n /**\n * Base grandtotal\n */\n if ($this->getOrder()->isCurrencyDifferent()) {\n $this->_totals['base_grandtotal'] = new Varien_Object(array(\n 'code' => 'base_grandtotal',\n 'value' => $this->getOrder()->formatBasePrice($source->getBaseGrandTotal()),\n 'label' => $this->__('Grand Total to be Charged'),\n 'is_formated' => true,\n ));\n }\n return $this;\n }", "public function testCartTotalAmount()\n {\n $items = new MollieLineItemCollection([\n new MollieLineItem(\n '',\n '',\n 1,\n new LineItemPriceStruct(2.73, 2.73, 0.44, 19),\n '',\n '',\n '',\n ''\n ),\n new MollieLineItem(\n '',\n '',\n 2,\n new LineItemPriceStruct(1, 2, 0.47, 19),\n '',\n '',\n '',\n ''\n ),\n ]);\n\n $this->assertEquals(4.73, $items->getCartTotalAmount());\n }", "final public function addCanMakeATotal(): void\n {\n $this->assertEquals(2, add(1, 1));\n $this->assertEquals(0, add(1, -1));\n $this->assertEquals(-2, add(-1, -1));\n $this->assertEquals(3, add(1, 2));\n $this->assertEquals(-1, add(1, -2));\n $this->assertEquals(1234567940, add(50, 1234567890));\n // Test overflow\n $this->assertEquals(PHP_INT_MIN, add(1, PHP_INT_MAX));\n $this->assertEquals(PHP_INT_MAX, add(-1, PHP_INT_MIN));\n // This add function works on int not floats\n $this->assertEquals(2, add(1.1, 1.1));\n }", "public function testAggregate()\n {\n $client = static::createClient();\n $client->request('GET', '/include.php?part=meta');\n $this->assertContains('href=\"http://localhost/style_', $client->getResponse()->getContent());\n }", "public function testSumAccountBalancePerformsOperation()\n {\n \t//TODO Implement\n// \t$mock = $this->getMock('Financial_Library_Reports_BalanceSheet');\n// \t$mock->expects($this->once())\n// \t\t->method('getSection')\n// \t\t->with($this->equalTo('revenue'));\n\t\t$stubResult = array('fooAccount'=>10.54,'barAccount'=>10,'foobaraccount'=>80);\n\t\t$report = new Financial_Library_Reports_BalanceSheet();\n\t\t$result = $report->sumAccountBalance($stubResult);\n\t\t$this->assertEquals(100.54, $result,'The obtained sum should be the same',0.001);\n }", "public function calculateTotals($ids)\n {\n\n $requestBody = ['purchase_order_ids' => $ids];\n $response = $this->client->request('POST', '/test', ['body' => json_encode($requestBody)]);\n $responseContent = json_decode($response->getBody()->getContents(), true);\n return $responseContent['result'];\n }", "public function get_totals() {\n\t\treturn empty( $this->totals ) ? $this->default_totals : $this->totals;\n\t}", "public function testGroupBySum() {\n $this->groupByTestHelper('sum', [10, 18]);\n }", "public function issetDocumentTotals(): bool\n {\n return isset($this->documentTotals);\n }", "public function calculateTransactionalTotals() \n {\n \treturn 2500;\n }", "public function hasTotalCount() {\n return $this->_has(3);\n }", "public function hasTotalCount() {\n return $this->_has(3);\n }", "public function getTotals($dataObject)\n {\n $totals = array();\n\n $displayWrappingBothPrices = false;\n $displayWrappingIncludeTaxPrice = false;\n $displayCardBothPrices = false;\n $displayCardIncludeTaxPrice = false;\n\n if ($dataObject instanceof Mage_Sales_Model_Order\n || $dataObject instanceof Mage_Sales_Model_Order_Invoice\n || $dataObject instanceof Mage_Sales_Model_Order_Creditmemo) {\n $displayWrappingBothPrices = $this->displaySalesWrappingBothPrices();\n $displayWrappingIncludeTaxPrice = $this->displaySalesWrappingIncludeTaxPrice();\n $displayCardBothPrices = $this->displaySalesCardBothPrices();\n $displayCardIncludeTaxPrice = $this->displaySalesCardIncludeTaxPrice();\n } elseif ($dataObject instanceof Mage_Sales_Model_Quote_Address_Total) {\n $displayWrappingBothPrices = $this->displayCartWrappingBothPrices();\n $displayWrappingIncludeTaxPrice = $this->displayCartWrappingIncludeTaxPrice();\n $displayCardBothPrices = $this->displayCartCardBothPrices();\n $displayCardIncludeTaxPrice = $this->displayCartCardIncludeTaxPrice();\n }\n\n /**\n * Gift wrapping for order totals\n */\n if ($displayWrappingBothPrices || $displayWrappingIncludeTaxPrice) {\n if ($displayWrappingBothPrices) {\n $this->_addTotalToTotals(\n $totals,\n 'gw_order_excl',\n $dataObject->getGwPrice(),\n $dataObject->getGwBasePrice(),\n $this->__('Gift Wrapping for Order (Excl. Tax)')\n );\n }\n $this->_addTotalToTotals(\n $totals,\n 'gw_order_incl',\n $dataObject->getGwPrice() + $dataObject->getGwTaxAmount(),\n $dataObject->getGwBasePrice() + $dataObject->getGwBaseTaxAmount(),\n $this->__('Gift Wrapping for Order (Incl. Tax)')\n );\n } else {\n $this->_addTotalToTotals(\n $totals,\n 'gw_order',\n $dataObject->getGwPrice(),\n $dataObject->getGwBasePrice(),\n $this->__('Gift Wrapping for Order')\n );\n }\n\n /**\n * Gift wrapping for items totals\n */\n if ($displayWrappingBothPrices || $displayWrappingIncludeTaxPrice) {\n $this->_addTotalToTotals(\n $totals,\n 'gw_items_incl',\n $dataObject->getGwItemsPrice() + $dataObject->getGwItemsTaxAmount(),\n $dataObject->getGwItemsBasePrice() + $dataObject->getGwItemsBaseTaxAmount(),\n $this->__('Gift Wrapping for Items (Incl. Tax)')\n );\n if ($displayWrappingBothPrices) {\n $this->_addTotalToTotals(\n $totals,\n 'gw_items_excl',\n $dataObject->getGwItemsPrice(),\n $dataObject->getGwItemsBasePrice(),\n $this->__('Gift Wrapping for Items (Excl. Tax)')\n );\n }\n } else {\n $this->_addTotalToTotals(\n $totals,\n 'gw_items',\n $dataObject->getGwItemsPrice(),\n $dataObject->getGwItemsBasePrice(),\n $this->__('Gift Wrapping for Items')\n );\n }\n\n /**\n * Printed card totals\n */\n if ($displayCardBothPrices || $displayCardIncludeTaxPrice) {\n $this->_addTotalToTotals(\n $totals,\n 'gw_printed_card_incl',\n $dataObject->getGwCardPrice() + $dataObject->getGwCardTaxAmount(),\n $dataObject->getGwCardBasePrice() + $dataObject->getGwCardBaseTaxAmount(),\n $this->__('Printed Card (Incl. Tax)')\n );\n if ($displayCardBothPrices) {\n $this->_addTotalToTotals(\n $totals,\n 'gw_printed_card_excl',\n $dataObject->getGwCardPrice(),\n $dataObject->getGwCardBasePrice(),\n $this->__('Printed Card (Excl. Tax)')\n );\n }\n } else {\n $this->_addTotalToTotals(\n $totals,\n 'gw_printed_card',\n $dataObject->getGwCardPrice(),\n $dataObject->getGwCardBasePrice(),\n $this->__('Printed Card')\n );\n }\n\n return $totals;\n }", "protected function round_at_subtotal() {\n\t\treturn 'yes' === get_option( 'woocommerce_tax_round_at_subtotal' );\n\t}", "public function getSubtotal();", "public function testAroundCollectTotalsForNotNegotiableQuote()\n {\n $this->quote->expects($this->atLeastOnce())->method('getData')->willReturn(false);\n $quote = $this->quote;\n $closure = function () use ($quote) {\n return $quote;\n };\n $this->quote->expects($this->never())->method('getAllItems');\n\n $this->quotePlugin->aroundCollectTotals($this->quote, $closure);\n }", "public function getTotal();", "public function getTotal();", "private function calculate_totals($project='events'){\n \n // Set flag 'something_was_paid', calculate totals\n $this->total = array();\n foreach ($this->rec_visit as $v_id=>$rec){\n foreach($this->money as $item){\n\tif (!($v = (b_posix::is_int(@$rec[$item]) \n\t\t ? $rec[$item]\n\t\t : 0))) continue;\n\tif ((strpos($item,'_r') == (strlen($item)-2)) && ($item != 'total_r')) $this->something_was_paid = True;\n\tif (($project === 'events') || ($project == @$rec['v_projectid'])) @$this->total[$item] += $v;\n }\n }\n }", "public function test_total_products_quantity()\n {\n $order1 = \\App\\Order::find(1);\n $order2 = \\App\\Order::find(2);\n\n $this->assertEquals(9, $this->orders_service->getTotalProductsQuantity($order1));\n $this->assertEquals(3, $this->orders_service->getTotalProductsQuantity($order1, true));\n $this->assertEquals(0, $this->orders_service->getTotalProductsQuantity($order2, false));\n $this->assertEquals(0, $this->orders_service->getTotalProductsQuantity($order2, true));\n }", "public function buildTotals(InvoiceInterface $invoice);", "public function getMinOrderTotal();", "public function testResponseHasTotalCount()\n {\n \t$response = $this->post(route('post-comment.fetch-comments'), [\n \t\t'offset' => 0\n \t]);\n\n \t$response->assertJson(['total_count' => 2], $strict = false);\n }", "public function setGrandTotal($amount);", "public function initTotals() {\n $helper = Mage::helper('cornerdrop_collect');\n\n /** @var Mage_Sales_Block_Order_Totals $parent */\n $parent = $this->getParentBlock();\n $source = $parent->getSource();\n $shipping_address = $source->getShippingAddress();\n if($shipping_address && $helper->isCornerDropAddress($source->getShippingAddress())) {\n $parent->addTotalBefore(\n new Varien_Object(array(\n 'code' => CornerDrop_Collect_Helper_Data::CORNERDROP_FEE_AMOUNT,\n 'value' => $source->getData(CornerDrop_Collect_Helper_Data::CORNERDROP_FEE_AMOUNT),\n 'base_value'=> $source->getData(CornerDrop_Collect_Helper_Data::BASE_CORNERDROP_FEE_AMOUNT),\n 'label' => $helper->getCornerDropFeeLabel()\n )\n ),\n 'shipping'\n );\n }\n }", "function group_totals($data){\n $group_label = $data['record_params']['group_label'];\n $unique_groups = array();\n $sql_records = $data['data'];\n $sub_group_labels = $data['record_params']['sub_group_labels'];\n foreach($sql_records as $record){\n $unique_groups[] = $record->$data['record_params']['group_label'];\n }\n $unique_groups = array_unique($unique_groups);\n $records = array();\n $grand_total = array();\n $grand_total[$group_label] = 'Grand Total';\n foreach($data['record_params']['sub_group_labels'] as $sub_group_label){\n $grand_total[$sub_group_label] = '';\n }\n foreach($data['numeric'] as $numeric_label){\n $grand_total[$numeric_label] = 0;\n }\n foreach($unique_groups as $group){\n $totals = array();\n $totals[$group_label] = ''; \n $record_label = '';\n foreach($data['record_params']['sub_group_labels'] as $sub_group_label){\n $totals[$sub_group_label] = '';\n }\n foreach($data['numeric'] as $numeric_label){\n $totals[$numeric_label] = 0;\n }\n foreach($sql_records as $record){\n if($record->$group_label == $group){\n $records[] = $record;\n foreach($data['numeric'] as $numeric_label){\n if(sizeof($sub_group_labels) > 0)\n $totals[$numeric_label] = $totals[$numeric_label] + $record->$numeric_label;\n $grand_total[$numeric_label] = $grand_total[$numeric_label] + $record->$numeric_label;\n }\n }\n }\n if(sizeof($sub_group_labels) > 0){\n $totals[$group_label] = $group.' Total';\n $records[] = (object)$totals;\n }\n }\n $records[] = (object)$grand_total;\n return $records;\n }", "function calcTotals(){\n\t\t\n\t\tif($this->Review == true){/*\n\t\t\t$getRate = new sql_processor($this->DB,$this->Conn,$this->Gateway);\n\t\t\t$getRate->mysql(\"SELECT `tax_percent` FROM `billship_tax_states` WHERE `tax_state` = '\".$this->CustBill['State'].\"';\");\n\t\t\t$getRate->mssql(\"SELECT tax_percent FROM billship_tax_states WHERE tax_state = '\".$this->CustBill['State'].\"';\");\n\t\t\tif($getRate->TotalRows() != 0){ $getRate = $getRate->Rows();\n\t\t\t\t$this->Totals['Tax'] += $this->Totals['Taxable'] * ($getRate[0]['tax_percent']/100);\n\t\t\t}\n\t\t\t$getRate = new sql_processor($this->DB,$this->Conn,$this->Gateway);\n\t\t\t$getRate->mysql(\"SELECT `tax_count_percent` FROM `billship_tax_county` WHERE `tax_count_zip` = '\".$this->CustBill['Zip'].\"';\");\n\t\t\t$getRate->mssql(\"SELECT tax_count_percent FROM billship_tax_county WHERE tax_count_zip = '\".$this->CustBill['Zip'].\"';\");\n\t\t\tif($getRate->TotalRows() != 0){ $getRate = $getRate->Rows();\n\t\t\t\t$this->Totals['Tax'] += $this->Totals['Taxable'] * ($getRate[0]['tax_count_percent']/100);\n\t\t\t}\n\t\t\t\n\t\t\tif($this->Totals['Ship2'] > 0){\n\t\t\t\t$getRate = new sql_processor($this->DB,$this->Conn,$this->Gateway);\n\t\t\t\t$getRate->mysql(\"SELECT `ship_limit_price`, `ship_limit_percent` FROM `billship_shipping_limits` WHERE `ship_limit_start_price` >= '\".$this->Totals['Total'].\"';\");\n\t\t\t\t$getRate->mssql(\"SELECT ship_limit_price, ship_limit_percent FROM billship_shipping_limits WHERE ship_limit_start_price >= '\".$this->Totals['Total'].\"';\");\n\t\t\t\t\t\t\t\n\t\t\t\tif($getRate->TotalRows() == 0){\n\t\t\t\t\t$getRate->mysql(\"SELECT `ship_limit_price`, `ship_limit_percent` FROM `billship_shipping_limits` WHERE `ship_limit_upper` = 'y';\");\n\t\t\t\t\t$getRate->mssql(\"SELECT ship_limit_price, ship_limit_percent FROM billship_shipping_limits WHERE ship_limit_upper = 'y';\");\n\t\t\t\t}\n\t\t\t\t$getRate = $getRate->Rows();\n\t\t\t\t$test_1 = $getRate[0]['ship_limit_price'];\n\t\t\t\t$test_2 = $this->Totals['Total']*($getRate[0]['ship_limit_percent']/100);\n\t\t\t\t\n\t\t\t\t$getRate = new sql_processor($this->DB,$this->Conn,$this->Gateway);\n\t\t\t\t$getRate->mysql(\"SELECT `ship_limit_price`, `ship_limit_percent` FROM `billship_shipping_limits` WHERE `ship_limit_start_weight` >= '$weight';\");\n\t\t\t\t$getRate->mssql(\"SELECT ship_limit_price, ship_limit_percent FROM billship_shipping_limits WHERE ship_limit_start_weight >= '$weight';\");\n\t\t\t\t$getRate = $getRate->Rows();\n\t\t\t\t\n\t\t\t\t$test_3 = $getRate[0]['ship_limit_price'];\n\t\t\t\t$test_4 = $total*($getRate[0]['ship_limit_percent']/100);\n\t\t\t\t\n\t\t\t\t$this->Totals['Ship2'] = ($test_1 < $test_2) ? $test_2 : $test_1;\n\t\t\t\t$this->Totals['Ship2'] = ($this->Totals['Ship2'] < $test_3) ? $test_3 : $this->Totals['Ship2'];\n\t\t\t\t$this->Totals['Ship2'] = ($this->Totals['Ship2'] < $test_4) ? $test_4 : $this->Totals['Ship2'];\n\t\t\t\tif(strlen(trim($this->Totals['Ship2'])) > 0) $this->Totals['Ship'] = $this->Totals['Ship2'];\n\t\t\t}\n\t\t*/\n\t\t}\n\t\t$this->Totals['Grand'] = $this->Totals['Total']+$this->Totals['Ship']+$this->Totals['Tax']-$this->Totals['Disc']+$this->Totals['Ext']+$this->Totals['Freight'];\n\t}", "protected function _initTotals()\n {\n $this->_totals = array();\n\n //overridden store ship\n $storeship = Bm_Cmon::getWholesalerShipping($this->getOrder()->getRealOrderId());\n\n\n $_subtotal = 0;\n foreach ($this->getOrder()->getAllItems() as $orderItem) {\n\n \tif(Bm_Cmon::checkSkuOwner($orderItem->getSku())){\n \t\t$_subtotal+= $orderItem->getQtyOrdered()*$orderItem->getOriginalPrice();\n\n \t}\n \n \n\n }\n\n $this->_totals['subtotal'] = new Varien_Object(array(\n 'code' => 'subtotal',\n 'value' => $_subtotal,\n 'base_value'=> $this->getSource()->getBaseSubtotal(),\n 'label' => $this->helper('sales')->__('Subtotal')\n ));\n\n /**\n * overridden ship value\n */\n if (!$this->getSource()->getIsVirtual() && ((float) $this->getSource()->getShippingAmount() || $this->getSource()->getShippingDescription()))\n {\n \n $this->_totals['shipping'] = new Varien_Object(array(\n 'code' => 'shipping',\n 'value' => $storeship['value'], //$this->getSource()->getShippingAmount(),\n 'base_value'=> $this->getSource()->getBaseShippingAmount(),\n 'label' => $this->helper('sales')->__('Shipping & Handling')\n ));\n }\n\n /**\n * Add discount\n */\n\n /*\n if (((float)$this->getSource()->getDiscountAmount()) != 0) {\n if ($this->getSource()->getDiscountDescription()) {\n $discountLabel = $this->helper('sales')->__('Discount (%s)', $this->getSource()->getDiscountDescription());\n } else {\n $discountLabel = $this->helper('sales')->__('Discount');\n }\n $this->_totals['discount'] = new Varien_Object(array(\n 'code' => 'discount',\n 'value' => $this->getSource()->getDiscountAmount(),\n 'base_value'=> $this->getSource()->getBaseDiscountAmount(),\n 'label' => $discountLabel\n ));\n }\n\t\t*/\n\n\t\t//FIXME: implements discount logic\n $this->_totals['grand_total'] = new Varien_Object(array(\n 'code' => 'grand_total',\n 'strong' => true,\n 'value' => $_subtotal+$this->getSource()->getDiscountAmount()*(-1)+$storeship['value'],\n 'base_value'=> $this->getSource()->getBaseGrandTotal(),\n 'label' => $this->helper('sales')->__('Grand Total'),\n 'area' => 'footer'\n ));\n\n return $this;\n }", "public function testWithTwoItemsValuedAt10ShouldHaveATotalOf20()\n {\n $item1 = $this->makeStubShoppingCartItemWithPrice(10);\n $item2 = $this->makeStubShoppingCartItemWithPrice(10);\n $this->cart->addItem($item1);\n $this->cart->addItem($item2);\n\n $this->assertEquals(20, $this->cart->total());\n }", "public function isIncludedInDisplayPrice();", "private function initializeSubtotals()\n {\n if (!isset($this->data->subtotals)) {\n $this->data->subtotals = new stdClass();\n }\n }", "public function testAggregateMemberBalances()\n {\n }", "protected function get_is_total(): bool\n\t{\n\t\treturn $this->start === 0 && $this->end === $this->total - 1;\n\t}", "public function formattedTotal(): string;", "public function getBaseGrandTotal();", "private function getTotalsForDisplay()\n {\n\t\tif(\\Cart2Quote\\License\\Model\\License::getInstance()->isValid()) {\n\t\t\t$quote = $this->getQuote();\n $totals = [];\n $store = $this->getSource()->getStore();\n if ($this->_taxConfig->displaySalesTaxWithGrandTotal($store)) {\n return [];\n }\n $tax = 0;\n foreach ($quote->getAllVisibleItems() as $item) {\n $tax = $tax + $item->getTaxAmount();\n }\n //add shipping tax\n if ($quote->getShippingAddress()->getShippingTaxAmount()) {\n $tax = $tax + $quote->getShippingAddress()->getShippingTaxAmount();\n }\n if ($this->_taxConfig->displaySalesFullSummary($store)) {\n $totals = $this->getFullTaxInfo();\n }\n $tax = $quote->formatPriceTxt($tax);\n $totals = array_merge($totals, parent::getTotalsForDisplay());\n $totals[0]['amount'] = $tax;\n return $totals;\n\t\t}\n\t}", "public function total();", "public function total();", "public function total();", "public function isIncludedInPrice();", "function getTotalsForDisplay()\n {\n $amount = $this->getSource()->formatPriceTxt($this->getAmount());\n\n if ($this->getAmountPrefix()) {\n $amount = $this->getAmountPrefix() . $amount;\n }\n\n $title = __($this->getTitle());\n if ($this->getTitleSourceField()) {\n $label = $title . ' (' . $this->getTitleDescription() . '):';\n } else {\n $label = $title . ':';\n }\n\n $fontSize = $this->getFontSize() ? $this->getFontSize() : 7;\n $total = ['amount' => $amount, 'label' => $label, 'font_size' => $fontSize];\n return [$total];\n }", "public function testFindSum()\n {\n\n $json = Scraper::start();\n $array = json_decode($json, true);\n //print_r($array['total']);\n $input = $array['results'];\n $total = $array['total'];\n\n $sumFinder = new SumFinderClass($input);\n $this->assertEquals($total, $sumFinder->findSum());\n }", "abstract public function prepareTotalCount();", "public function ensureTotals($Event, $Event_type){\n\t\t# Check\n\t\tif ( !in_array($Event_type,array('preSave')) ) {\n\t\t\t# Not designed for these events\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t# Fetch\n\t\t$InvoiceItem = $Event->getInvoker();\n\t\t\n\t\t# --------------------------\n\t\t# Ensure\n\t\t\n\t\t# Apply Totals\n\t\t$InvoiceItem->applyTotals();\n\t\t\n\t\t# --------------------------\n\t\t\n\t\t# Return true\n\t\treturn true;\n\t}", "protected function _toHtml()\n {\n /** @var $totalsXmlObj Mage_XmlConnect_Model_Simplexml_Element */\n $totalsXmlObj = Mage::getModel('xmlconnect/simplexml_element', '<totals></totals>');\n\n foreach ($this->getQuote()->getTotals() as $total) {\n $code = $total->getCode();\n if ($code == 'giftwrapping') {\n continue;\n }\n\n $title = '';\n $value = null;\n $renderer = $this->_getTotalRenderer($code)->setTotal($total);\n\n switch ($code) {\n case 'subtotal':\n if ($renderer->displayBoth()) {\n $title = $this->__('Subtotal (Excl. Tax)');\n $this->_addTotalDataToXmlObj(\n $totalsXmlObj, $code . '_excl_tax', $title, $total->getValueExclTax()\n );\n\n $code = $code . '_incl_tax';\n $title = $this->__('Subtotal (Incl. Tax)');\n $value = $total->getValueInclTax();\n }\n break;\n case 'shipping':\n if ($renderer->displayBoth()) {\n $title = $renderer->getExcludeTaxLabel();\n $this->_addTotalDataToXmlObj(\n $totalsXmlObj, $code . '_excl_tax', $title, $renderer->getShippingExcludeTax()\n );\n\n $code = $code . '_incl_tax';\n $title = $renderer->getIncludeTaxLabel();\n $value = $renderer->getShippingIncludeTax();\n } else if ($renderer->displayIncludeTax()) {\n $value = $renderer->getShippingIncludeTax();\n } else {\n $value = $renderer->getShippingExcludeTax();\n }\n break;\n case 'grand_total':\n $grandTotalExlTax = $renderer->getTotalExclTax();\n $displayBoth = $renderer->includeTax() && $grandTotalExlTax >= 0;\n if ($displayBoth) {\n $title = $this->__('Grand Total (Excl. Tax)');\n $this->_addTotalDataToXmlObj(\n $totalsXmlObj, $code . '_excl_tax', $title, $grandTotalExlTax\n );\n $code = $code . '_incl_tax';\n $title = $this->__('Grand Total (Incl. Tax)');\n }\n break;\n case 'giftwrapping':\n foreach ($renderer->getValues() as $title => $value) {\n $this->_addTotalDataToXmlObj($totalsXmlObj, $code, $title, $value);\n }\n continue 2;\n case 'giftcardaccount':\n $cards = $renderer->getTotal()->getGiftCards();\n if (!$cards) {\n $cards = $renderer->getQuoteGiftCards();\n }\n if ($renderer->getTotal()->getValue()) {\n foreach ($cards as $cardCode) {\n $title = $this->__('Gift Card (%s)', $cardCode['c']);\n $value = $cardCode['c'];\n $totalXmlObj = $totalsXmlObj->addChild($code);\n $totalXmlObj->addChild('title', $totalsXmlObj->escapeXml($title));\n $totalXmlObj->addChild('value', $value);\n $value = Mage::helper('xmlconnect')->formatPriceForXml($cardCode['a']);\n $formattedValue = $this->getQuote()->getStore()->formatPrice($value, false);\n $totalXmlObj->addChild('formated_value', '-' . $formattedValue);\n }\n }\n continue 2;\n default:\n break;\n }\n if (empty($title)) {\n $title = $total->getTitle();\n }\n if (null === $value) {\n $value = $total->getValue();\n }\n if (null !== $value) {\n $this->_addTotalDataToXmlObj($totalsXmlObj, $code, $title, $value);\n }\n }\n\n return $this->getReturnObjectFlag() ? $totalsXmlObj : $totalsXmlObj->asNiceXml();\n }", "public function getSummaryOfTotalsReport()\n\t{\n\t\treturn view('reports.summary-of-totals', [\n\t\t\t\t'from_date' => null,\n\t\t\t\t'to_date' => null,\n\t\t\t\t'total_properties' => null,\n\t\t\t\t'totals_per_seller_status' => null,\n\t\t\t\t'totals_per_property_status' => null,\n\t\t\t\t'totals_per_area' => null,\n\t\t\t\t'totals_per_greater_area' => null,\n\t\t\t\t'generated' => false\n\t\t]);\n\t}", "function showTransactionResult()\r\n{\r\n global $config;\r\n $items_subtotal = 0; //init\r\n $extras_subtotal = 0; //init\r\n \r\n /*\r\n echo '<pre>';\r\n var_dump($_POST);\r\n echo'</pre>';\r\n */\r\n \r\n //start ITEMS ordered table\r\n //date format May 13, 2018, 1:16 am\r\n $html = '\r\n\r\n <h2>\r\n <span>Order Details</span>\r\n </h2>\r\n\r\n <p style=\"margin-left:1rem; margin-top:0;\">Order Date: ' . date(\"F j, Y, g:i a\") . '</p>\r\n <div class=\"menuitem\">\r\n <h3 style=\"margin-top:0;\">Items Ordered:</h3>\r\n <table style=\"width:100%\">\r\n <tr>\r\n <th>Item Name</th>\r\n <th>Qty</th>\r\n <th>Price</th>\r\n <th>Item Total</th>\r\n </tr>\r\n ';\r\n \r\n //this foreach block generates the table rows of ITEMS ordered\r\n foreach ($_POST as $key => $value) \r\n {\r\n //check $key is an item or a topping\r\n if (substr($key,0,5) == 'item_') {\r\n \r\n //get qty, cast as int\r\n $quantity = (int)$value;\r\n \r\n //check if there is an order for this item\r\n if ($quantity > 0) {\r\n \r\n //seperate string with _ as the delimiter\r\n $key_array = explode('_',$key);\r\n \r\n //cast item number as an integer\r\n $key_id = (int)$key_array[1];\r\n \r\n //get price, cast as float\r\n $price = (float)$config->items[$key_id - 1]->Price;\r\n \r\n //get name\r\n $name = $config->items[$key_id - 1]->Name;\r\n \r\n //calculate total for this item\r\n $item_total = $quantity * $price;\r\n \r\n //add to over items subtotal\r\n $items_subtotal += $item_total;\r\n \r\n //money format\r\n $price_output = money_format('%.2n', $price);\r\n $item_total_output = money_format('%.2n', $item_total);\r\n \r\n $html .= '\r\n <tr>\r\n <td>' . $name . '</td>\r\n <td>' . $quantity . '</td>\r\n <td>' . $price_output . '</td>\r\n <td>' . $item_total_output . '</td>\r\n </tr>\r\n ';\r\n }\r\n }\r\n }\r\n \r\n //money format\r\n $items_subtotal_output = money_format('%.2n', $items_subtotal);\r\n \r\n //finish ITEMS table\r\n $html .= '\r\n <tr class=\"tabletotal\">\r\n <td colspan=3 class=\"tabletotaltitle\">Items Subtotal: </td>\r\n <td>' . $items_subtotal_output . '</td>\r\n </tr>\r\n </table>\r\n '; \r\n \r\n //start EXTRAS ordered table\r\n $extras_html = '\r\n <h3>Extras Ordered:</h3>\r\n <table style=\"width:100%\">\r\n <tr>\r\n <th>Extra</th>\r\n\r\n <th>Qty</th>\r\n\r\n <th>Price</th>\r\n </tr>\r\n ';\r\n \r\n //this foreach block generates the table rows of EXTRAS ordered\r\n foreach ($_POST as $key => $value) \r\n {\r\n if (substr($key,0,7) == 'extras_') {\r\n \r\n foreach ($value as $extra_key => $extra) {\r\n \r\n //seperate string with _ as the delimiter\r\n $key_array = explode('_',$key);\r\n \r\n //cast item number as an integer\r\n $key_id = (int)$key_array[1];\r\n \r\n $associated_item_key = 'item_' . $key_id;\r\n \r\n $quantity_of_extra = $_POST[$associated_item_key];\r\n \r\n $extra_subtotal = $quantity_of_extra * 0.25; //calculates subtotal of each particular extra\r\n \r\n $extras_subtotal += $extra_subtotal; //adds to overall subtotal of all extras\r\n \r\n $extra_subtotal_output = money_format('%.2n', $extra_subtotal);\r\n\r\n //add row to EXTRAS table\r\n $extras_html .= '\r\n <tr>\r\n <td>' . $extra . '</td>\r\n\r\n <td>' . $quantity_of_extra . '</td>\r\n <td>' . $extra_subtotal_output . '</td>\r\n\r\n </tr>\r\n ';\r\n }\r\n }\r\n }\r\n \r\n //money format\r\n $extras_subtotal_output = money_format('%.2n', $extras_subtotal);\r\n \r\n //finish EXTRAS table\r\n $extras_html .='\r\n <tr class=\"tabletotal\">\r\n\r\n <td colspan=\"2\" class=\"tabletotaltitle\">Extras Subtotal: </td>\r\n\r\n <td>' . $extras_subtotal_output . '</td>\r\n </tr>\r\n </table>\r\n </div>\r\n ';\r\n \r\n if ($extras_subtotal == 0) {\r\n $extras_html = '\r\n <h3>Extras Ordered:</h3>\r\n <p>No extras were ordered.</p>\r\n </div>\r\n ';\r\n }\r\n \r\n $html .= $extras_html;\r\n \r\n //calculate tax & totals\r\n $order_subtotal = $items_subtotal + $extras_subtotal;\r\n $tax = $order_subtotal * .101; //10.1%\r\n $grand_total = $order_subtotal + $tax;\r\n \r\n //money format\r\n $order_subtotal = money_format('%.2n', $order_subtotal);\r\n $tax = money_format('%.2n', $tax);\r\n $grand_total = money_format('%.2n', $grand_total);\r\n\r\n //display order summary\r\n $html .= '\r\n <div class=\"menuitem\">\r\n <h3 style=\"margin-top:0;\">Order Summary:</h3>\r\n <table style=\"width:100%\">\r\n <tr>\r\n <td>Item(s) Subtotal: </td>\r\n <td>' . $items_subtotal_output . '</td>\r\n </tr>\r\n <tr>\r\n <td>Extra(s) Subtotal: </td>\r\n <td>' . $extras_subtotal_output . '</td>\r\n </tr>\r\n <tr>\r\n <td>Order Subtotal: </td>\r\n <td>' . $order_subtotal . '</td>\r\n </tr>\r\n <tr>\r\n <td>Tax: </td>\r\n <td>' . $tax . '</td>\r\n </tr>\r\n <tr class=\"tabletotal\">\r\n <td>Grand Total: </td>\r\n <td>' . $grand_total . '</td>\r\n </tr>\r\n </table>\r\n </div>\r\n ';\r\n\r\n\r\n return $html;\r\n}", "public function testGetPayItems()\n {\n }", "public function testGetBatchStatistics()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function testSum()\n {\n $this->assertEquals(6, $this->object->sum(function ($item) {\n return $item;\n }));\n }", "public function assertTotalNumberOfRows($gridId, $expectedNumberOfRows) {\n $this->getTest()->assertEquals($expectedNumberOfRows, $this->getTotalNumberOfRows($gridId));\n }", "public function testGetUserrecordingsSummary()\n {\n }", "public function totals($sums){\r\n\r\n $queryData=$this->queryData;\r\n $queryData['page']=1;\r\n $pageQuery=$this->getPageScope($this, $this->getQueryData($queryData));\r\n\r\n return $this->getTotals($pageQuery, $this->getQueryData($queryData), $sums);\r\n }", "public function testTotalMensalidade()\n {\n $res = (new Client())->request(\n 'GET',\n self::ROUTE_API_TOTAL_MENSALIDADE,\n [\n 'headers' => [\n 'Authorization' => env(\"PERSONAL_AUTH_KEY\"),\n 'Accept' => 'application/json'\n ]\n ]\n );\n $totalMensalidade = json_decode((string) $res->getBody());\n $this->assertGreaterThan(0, $totalMensalidade->total);\n }", "public function __tallyUpInvoice() {\n\n $this->__itemTotals();\n\n $subTotal = $this->__subtotal($this->request->data['items']);\n\n //$taxTotal = $this->__tax($subTotal, $this->request->data['Invoice']['taxRate']);\n\n //$taxTotal = $this->__tax($this->request->data['items']);\n\n //$this->request->data['total'] = $subTotal + $taxTotal;\n $this->request->data['total'] = $subTotal;\n\n //$this->request->data['subTotal'] = $subTotal;\n\n //$this->request->data['taxTotal'] = $taxTotal;\n\n return true;\n }", "public function testBillingInvoices()\n {\n }", "public function hasSummaries() {\n return $this->_has(1);\n }", "public function hasSummaries() {\n return $this->_has(1);\n }", "public function hasSummaries() {\n return $this->_has(1);\n }", "public function testGetListTotalWithArcoToken()\n {\n // Populate data\n $arcoID = $this->_populateArco();\n $tlID = $this->_populateTL();\n $dealerID = $this->_populateDealer();\n $dealerAccountID = $this->_populateDealerAccount();\n $branchID = $this->_populateBranch();\n \n // Create token\n $token = str_random(5);\n $encryptedToken = $this->token->encode($arcoID, $token);\n \n $params = [\n 'token' => $encryptedToken \n ];\n\n // Do request\n $response = $this->call('GET', '/api/1.5.0/news-total', $params);\n $result = json_decode($response->getContent(), true);\n\n // Verify\n $this->assertTrue(array_key_exists('result', $result));\n }", "protected function calculateGrandTotal()\n {\n $this->grandTotal = $this->subTotal + $this->gst + $this->unit->securityDeposit;\n }", "public function calculate_cart_total()\r\n\t{\r\n\t\t$cart_total = 0;\r\n\t\t$cart_total += $this->flexi->cart_contents['summary']['item_summary_total'];\r\n\t\t$cart_total += $this->flexi->cart_contents['summary']['shipping_total'];\r\n\t\t$cart_total += $this->flexi->cart_contents['summary']['surcharge_total'];\r\n\t\t$cart_total += (! $this->flexi_cart->cart_prices_inc_tax()) ? $this->flexi->cart_contents['summary']['tax_total'] : 0; \r\n\t\t\r\n\t\t$this->flexi->cart_contents['summary']['total'] = $this->format_calculation($cart_total);\r\n\t\t\t\t\r\n\t\treturn TRUE; \r\n\t}", "public function get_totals( $in_cents = false ) {\n\t\treturn $in_cents ? $this->totals : wc_remove_number_precision_deep( $this->totals );\n\t}", "public function testSortOrderByTotal()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs($this->user)\n ->visit('/admin/orders')\n ->click('#sort-by-total');\n\n $ordersSortAsc = Order::orderBy('total', 'ASC')->pluck('total')->toArray();\n\n for ($i = 1; $i <= 5; $i++) {\n $selector = \".table tbody tr:nth-child($i) td:nth-child(4)\";\n $this->assertEquals($browser->text($selector), number_format($ordersSortAsc[$i-1]));\n }\n\n $browser->click('#sort-by-total');\n $ordersSortDesc = Order::orderBy('total', 'DESC')->pluck('total')->toArray();\n\n for ($i = 1; $i <= 5; $i++) {\n $selector = \".table tbody tr:nth-child($i) td:nth-child(4)\";\n $this->assertEquals($browser->text($selector), number_format($ordersSortDesc[$i-1]));\n }\n });\n }", "abstract protected function prepareTotalCount();", "public function testThatGetAllUsersIncludeFieldsIsFormattedProperly()\n {\n $api = new MockManagementApi( [ new Response( 200, self::$headers ) ] );\n\n $api->call()->users()->getAll( [], [ 'field3', 'field4' ], true );\n\n $query = $api->getHistoryQuery();\n $this->assertContains( 'fields=field3,field4', $query );\n $this->assertContains( 'include_fields=true', $query );\n }", "public function addBasketGrandTotalParams()\n {\n $oBasket = $this->getBasket();\n $oRequest = $this->getPayPalRequest();\n\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_NAME0\", $this->getLang()->translateString(\"OEPAYPAL_GRAND_TOTAL\"));\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_AMT0\", $this->_formatFloat($oBasket->getSumOfCostOfAllItemsPayPalBasket()));\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_QTY0\", 1);\n }", "public function testPostTaxTotal()\n {\n $items = [1, 2, 5, 8];\n $tax = 0.20;\n $coupon = null;\n\n // Create a mock receipt class\n $Receipt = $this->getMockBuilder('TDD\\Receipt')\n ->setMethods(['tax', 'total'])\n ->getMock();\n\n // Make sure that the total method in mock Receipt will return 10.00\n $Receipt->expects($this->once())// Total assumes it will be called once\n ->method('total')\n ->with($items, $coupon)// Make sure total is called with these values\n ->will($this->returnValue(10.00));\n\n // Make sure that the tax method in mock Receipt will return 1.00\n $Receipt->expects($this->once())// Tax assumes it will be called once\n ->method('tax')\n ->with(10.00, $tax)// Make sure tax is called with these values\n ->will($this->returnValue(1.00));\n\n // Execute postTaxTotal with random values\n $result = $Receipt->postTaxTotal([1, 2, 5, 8], 0.20, null);\n $this->assertEquals(\n 11.00, // Expected value\n $result // Value returned by postTaxTotal() using mocked values 10.00 and 1.00\n );\n }", "public function testGetRowsFilterCustomData() {\n $this->enableAllComponents();\n $ids = $this->createCustomGroupWithField([]);\n $contacts = $this->createContacts(2);\n foreach ($contacts as $contact) {\n $contribution = $this->callAPISuccess('Contribution', 'create', [\n 'total_amount' => 4,\n 'financial_type_id' => 'Donation',\n 'contact_id' => $contact['id'],\n ]);\n $this->callAPISuccess('Contact', 'create', ['id' => $contact['id'], 'custom_' . $ids['custom_field_id'] => $contribution['id']]);\n }\n\n $params = [\n 'report_id' => 'contribution/contributions',\n 'fields' => ['contribution_id'],\n 'custom_' . $ids['custom_field_id'] . '_op' => 'eq',\n 'custom_' . $ids['custom_field_id'] . '_value' => $contribution['id'],\n ];\n $rows = $this->callAPISuccess('ReportTemplate', 'getrows', $params)['values'];\n $this->assertEquals(1, count($rows));\n }", "public function testReportsSummaryGet()\n {\n }", "function totals()\n\t{\n\t\treturn $this->_tour_voucher_contents['totals'];\n\t}", "public function testGetListTotalWithTLToken()\n {\n // Populate data\n $tlID = $this->_populateTL();\n $dealerID = $this->_populateDealer();\n $dealerAccountID = $this->_populateDealerAccount();\n $branchID = $this->_populateBranch();\n\n // Create token\n $token = str_random(5);\n $encryptedToken = $this->token->encode($tlID, $token);\n \n $params = [\n 'token' => $encryptedToken \n ];\n\n // Do request\n $response = $this->call('GET', '/api/1.5.0/news-total', $params);\n $result = json_decode($response->getContent(), true);\n\n // Verify\n $this->assertTrue(array_key_exists('result', $result));\n }", "function recalculatingPaymentTotals() {\n $invoice_objects_table = TABLE_PREFIX . 'invoice_objects';\n $payments_table = TABLE_PREFIX . 'payments';\n\n // set balance due to invoice total\n DB::execute('UPDATE ' . $invoice_objects_table . ' SET balance_due = total');\n\n $total_payments = DB::execute('SELECT parent_id AS invoice_id, SUM(amount) AS paid_amount FROM ' . $payments_table . ' WHERE parent_type = ? AND status = ? GROUP BY parent_id ORDER BY parent_id ASC', 'Invoice', 'Paid');\n if ($total_payments) {\n foreach ($total_payments as $total_payment) {\n $invoice_id = $total_payment['invoice_id'];\n $paid_amount = $total_payment['paid_amount'];\n $invoice_total = DB::executeFirstCell('SELECT total FROM ' . $invoice_objects_table . ' WHERE id = ? AND type = ?', $invoice_id, 'Invoice');\n $balance_due = $invoice_total - $paid_amount;\n DB::execute('UPDATE ' . $invoice_objects_table . ' SET balance_due = ?, paid_amount = ? WHERE id = ? AND type = ?', $balance_due, $paid_amount, $invoice_id, 'Invoice');\n } // foreach\n } // if\n }", "function count_total_filtered()\n {\n $this->_get_datatables_query_payment();\n $query = $this->company_db->get();\n return $query->num_rows();\n }", "public function createTotalsFromSums() {\n $subtotal = $this->ItemSubtotalSum;\n $this->data['Order']['subtotal'] = $subtotal;\n\n $tax = sprintf('%0.2f', $subtotal * $this->ShipmentTaxPercent * $this->Taxable);\n $this->data['Order']['tax'] = $tax;\n\n $this->data['Order']['total'] = $subtotal + $tax + $this->ShipmentSum;\n\n $this->data['Order']['order_item_count'] = $this->ItemCount;\n\n $this->data['Order']['weight'] = $this->ItemWeightSum;\n\n return array_intersect_key(\n $this->data['Order'],\n array(\n 'subtotal' => NULL,\n 'tax' => NULL,\n 'order_item_count' => NULL,\n 'weight' => NULL,\n 'total' => NULL,\n )\n );\n }" ]
[ "0.6468725", "0.61584353", "0.61541104", "0.61541104", "0.61541104", "0.61541104", "0.61541104", "0.6009728", "0.59305", "0.5900423", "0.5868993", "0.58609045", "0.5784935", "0.5773006", "0.57543004", "0.57496685", "0.57306576", "0.5725652", "0.5710329", "0.5680534", "0.56702113", "0.56289095", "0.5623014", "0.56225854", "0.5575959", "0.55566245", "0.55418396", "0.5486859", "0.54719216", "0.54541767", "0.5429237", "0.54192305", "0.5412737", "0.5392911", "0.53755045", "0.5353935", "0.5353935", "0.5352436", "0.5340444", "0.533251", "0.5322978", "0.53212315", "0.53212315", "0.53173745", "0.53065056", "0.53020495", "0.529552", "0.5279334", "0.5270623", "0.5256591", "0.5254979", "0.5254064", "0.5250145", "0.5210911", "0.52094644", "0.5199182", "0.51927614", "0.5184853", "0.5181045", "0.5176208", "0.5173769", "0.5156119", "0.5156119", "0.5156119", "0.5153782", "0.51536155", "0.51520914", "0.5147319", "0.5140326", "0.5133512", "0.5130898", "0.5123876", "0.51157725", "0.51104283", "0.5109244", "0.51076084", "0.5106985", "0.5101034", "0.5100352", "0.5092341", "0.50899845", "0.50877607", "0.50877607", "0.50877607", "0.50752914", "0.50662196", "0.5062367", "0.5052262", "0.5050549", "0.5048485", "0.5046543", "0.50417286", "0.5025984", "0.50250167", "0.5021321", "0.50125206", "0.5010775", "0.5006672", "0.4993069", "0.49874774" ]
0.7849056
0
Test that we can create, update, and delete a Client Grant.
public function testCreateUpdateDeleteGrant() { $client_id = self::$env['APP_CLIENT_ID']; $audience = self::$apiIdentifier; // Create a Client Grant with just one of the testing scopes. $create_result = self::$api->create($client_id, $audience, [self::$scopes[0]]); usleep(AUTH0_PHP_TEST_INTEGRATION_SLEEP); $this->assertArrayHasKey('id', $create_result); $this->assertEquals($client_id, $create_result['client_id']); $this->assertEquals($audience, $create_result['audience']); $this->assertEquals([self::$scopes[0]], $create_result['scope']); $grant_id = $create_result['id']; // Test patching the created Client Grant. $update_result = self::$api->update($grant_id, self::$scopes); usleep(AUTH0_PHP_TEST_INTEGRATION_SLEEP); $this->assertEquals(self::$scopes, $update_result['scope']); // Test deleting the created Client Grant. $delete_result = self::$api->delete($grant_id); usleep(AUTH0_PHP_TEST_INTEGRATION_SLEEP); $this->assertNull($delete_result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_machine_user_can_perform_client_credentials_grant() {\n\n $user = factory(User::class)->create();\n\n $createdClientResponse = $this->log_in_and_create_client_for_user($user);\n\n // so you can logout for client credentials grant!\n auth()->logout();\n\n $response = $this->json('post', '/oauth/token', [\n 'grant_type' => 'client_credentials',\n 'client_id' => $createdClientResponse->json('id'),\n 'client_secret' => $createdClientResponse->json('secret'),\n 'scope' => '*',\n ])->assertJson([\n 'token_type' => 'Bearer',\n ])->assertJsonStructure([\n 'token_type',\n 'expires_in',\n 'access_token',\n ]);\n\n }", "public function testCreateClient() {\n\n $this->withoutMiddleware();\n\n // Generate one user and one client\n $user = factory(App\\User::class)->create();\n $client = factory(App\\Client::class)->make(['phone_number' => '0725433317']);\n\n $this->actingAs($user)\n ->post('/clients/create', ['name' => $client->name, 'phone' => $client->phone_number])\n ->seeJson(['success' => true]);\n\n }", "public function testDeleteClient() {\n\n // Generate user and client\n $user = factory(App\\User::class)->create();\n $client = $user->clients()->save(factory(App\\Client::class)->make());\n\n $this->actingAs($user)\n ->get('/clients/' . $client->id . '/delete')\n ->seeJson(['success' => true]);\n\n }", "public function testCreateGrantExceptions()\n {\n $throws_missing_client_id_exception = false;\n try {\n self::$api->create('', self::$apiIdentifier, []);\n } catch (CoreException $e) {\n $throws_missing_client_id_exception = $this->errorHasString($e, 'Empty or invalid \"client_id\" parameter');\n }\n\n $this->assertTrue($throws_missing_client_id_exception);\n\n $throws_missing_audience_exception = false;\n try {\n self::$api->create(self::$env['APP_CLIENT_ID'], '', []);\n } catch (CoreException $e) {\n $throws_missing_audience_exception = $this->errorHasString($e, 'Empty or invalid \"audience\" parameter');\n }\n\n $this->assertTrue($throws_missing_audience_exception);\n }", "public function test_SaveClientOK(){\n\t\t// Popula variável com os dados do cliente\n\t\t$cliente = $this->dataGenerator->getCliente();\n\t\t// Popula dados da requisição\n\t\t$this->populateData($cliente['Cliente']['login'], $cliente['Cliente']['raw_password']);\n\t\t// Envia requisição e armazena resposta\n\t\t$response = $this->sendRequest($this->fullURL, 'POST', $this->data);\n\t\t// Valida se os campos de resposta são válidos\n\t\t$this->assertNotNull($response);\n\t\t$this->assertNotEmpty($response);\n\t\t$this->assertNotNull($response['client_id']);\n\t\t$this->assertNotEmpty($response['client_id']);\n\t\t// Extrai os dados do cliente retornados\n\t\t$clientId = $response['client_id'];\n\t\t// Busca na base esse cliente, para compara se a senha foi gerada corretamente\n\t\t$dataBaseClient = $this->Cliente->findById($clientId);\n\t\t// Valida se encontrou o cliente com o id retornado\n\t\t$this->assertNotNull($dataBaseClient);\n\t\t$this->assertNotEmpty($dataBaseClient);\n\t\t// Valida os dados da base com o objeto do cliente \n\t\t$this->assertEquals($cliente['Cliente']['tipo'], $dataBaseClient['Cliente']['tipo']);\n\t\t$this->assertEquals($cliente['Cliente']['login'], $dataBaseClient['Cliente']['login']);\n\t\t$this->assertEquals($cliente['Cliente']['senha'], $dataBaseClient['Cliente']['senha']);\n\t\t$this->assertEquals($cliente['Cliente']['ativo'], $dataBaseClient['Cliente']['ativo']);\n\t}", "public function testCreate(): void\n {\n $factory = new ClientFactory(\n $cache = $this->createMock(CacheItemPoolInterface::class),\n $logger = new BufferingLogger()\n );\n\n $client = $factory->create(\n [\n 'client_id' => uniqid(),\n 'client_secret' => uniqid(),\n 'project' => uniqid(),\n 'scope' => ['manage_project']\n ],\n [\n 'locale' => 'de',\n 'languages' => ['de']\n ]\n );\n\n static::assertInstanceOf(Client::class, $client);\n }", "public function testQuarantineCreate()\n {\n\n }", "public function testAuthenticationsInweboIdPut()\n {\n }", "public function testAdd()\n\t{\n\t\t$client = static::createClient(array(), array(\n\t\t 'PHP_AUTH_USER' => 'jr',\n\t\t 'PHP_AUTH_PW' => 'jr',\n\t\t));\n\t\t$client->followRedirects();\n\n\t\t$crawler = $client->request('GET', '/client/add');\n\n\t\t$form = $crawler->selectButton('flyd_dashboardbundle_client_save')->form();\n\n\t\t// définit certaines valeurs\n\t\t$form['flyd_dashboardbundle_client[name]'] \t\t= 'Entreprise de test';\n\t\t$form['flyd_dashboardbundle_client[job]'] \t\t= 'Job de test';\n\n\t\t// soumet le formulaire\n\t\t$crawler = $client->submit($form);\n\n\n\t\t$this->assertEquals(1, $crawler->filter('html:contains(\"Client bien enregistré.\")')->count());\n\t}", "public function testReAuthoriseAccountUsingPATCH()\n {\n }", "public function testLogin(){\n $client00 = static::createClient();\n $client00->request('POST', '/booking/calendar');\n \n $this->assertEquals(\n 405, //METHOD NOT ALLOWED\n $client00->getResponse()->getStatusCode()\n );\t\t\n \n $client01 = $this->createAuthorizedClient();\n $client01->request('POST','/booking/calendar');\n $this->assertEquals(\n 405, //METHOD NOT ALLOWED\n $client01->getResponse()->getStatusCode()\n );\t\n //Requests con GET\n $client02 = $this->createAuthorizedClient();\n $client02->request('GET','/booking/calendar');\n $this->assertEquals(\n 200, //OK\n $client02->getResponse()->getStatusCode()\n ); \n //Usuario no autorizado\n $client03 = static::createClient();\n $client03->request('GET', '/booking/calendar');\n \n //redireccionado porque no tiene los permisos necesarios\n $this->assertTrue($client03->getResponse()->isRedirect()); \n }", "public function testBaseUserACL() :void\n {\n $generator = Factory::create();\n\n $data = [\n \"params\" => [\n \"name\" => $generator->name\n ],\n \"options\" => [\n \"simplifiedParams\" => true\n ]\n ];\n\n /** Login with right password **/\n $response = $this->json('POST', '/auth/authenticate', ['email' => env('BASE_USER_EMAIL'), 'password' => env('BASE_USER_PASSWORD')]);\n $tokenResult = $response->decodeResponseJson();\n $response->assertResponseStatus(200);\n\n /** Free port acl **/\n $response = $this->json('GET', '/auth/me', [], ['HTTP_AUTHORIZATION'=>'Bearer ' . $tokenResult['token']]);\n $result = $response->decodeResponseJson();\n $this->assertEquals($result['email'], env('BASE_USER_EMAIL'));\n\n /** Posting artist as a admin **/\n $response = $this->json('POST', '/contexts/admin/artists', $data, ['HTTP_AUTHORIZATION'=>'Bearer ' . $tokenResult['token']]);\n $result = $response->decodeResponseJson();\n $response->assertResponseStatus(201);\n /** This means the records is to be inserted and admin has access **/\n //$this->assertEquals($result['message'], 'Transaction commit failed because the transaction has been marked for rollback only.');\n }", "public function testGetAuthorizationRoleSubjectgrants()\n {\n }", "public function contract_belongs_to_client()\n {\n $this->assertEquals(self::$contract->client->id, self::$contract->client_id);\n }", "public function testClientIsCreatedWithConstructor(): void\r\n {\r\n $tx = $this->getTx();\r\n $client = $this->client;\r\n\r\n $transaction = new Transaction($tx, $client);\r\n $client = $transaction->getClient();\r\n\r\n $this->assertNotNull($client);\r\n $this->assertEquals(\\FOXRP\\Rippled\\Client::class, \\get_class($client));\r\n }", "public function testValidCredentialsInHeader()\n {\n $server = $this->getTestServer();\n $headers = array('HTTP_AUTHORIZATION' => 'Basic '.base64_encode('Test Client ID:TestSecret'), 'REQUEST_METHOD' => 'POST');\n $params = array('grant_type' => 'client_credentials');\n $request = new Request(array(), $params, array(), array(), array(), $headers);\n $token = $server->grantAccessToken($request, new Response());\n\n $this->assertNotNull($token);\n $this->assertArrayHasKey('access_token', $token);\n $this->assertNotNull($token['access_token']);\n\n // create using PHP Authorization Globals\n $headers = array('PHP_AUTH_USER' => 'Test Client ID', 'PHP_AUTH_PW' => 'TestSecret', 'REQUEST_METHOD' => 'POST');\n $params = array('grant_type' => 'client_credentials');\n $request = new Request(array(), $params, array(), array(), array(), $headers);\n $token = $server->grantAccessToken($request, new Response());\n\n $this->assertNotNull($token);\n $this->assertArrayHasKey('access_token', $token);\n $this->assertNotNull($token['access_token']);\n }", "public function testPutAuthorizationRoleUsersAdd()\n {\n }", "public function run()\n {\n // Default user\n\n $user = User::first();\n\n Client::insert([\n // Authorization Code grant client\n\n [\n 'id' => '229f9dfd-8a91-4dfa-90db-00ba966ed1ef',\n 'user_id' => $user->id,\n 'name' => 'dev-auth-code-grant-client',\n 'secret' => 'BZQVA2FBPNPhAc0BtqCjndQVSA1TQUJMzJADJrdt',\n 'redirect' => '',\n 'personal_access_client' => false,\n 'password_client' => false,\n 'revoked' => false,\n 'created_at' => now(),\n 'updated_at' => now(),\n ],\n\n // Password grant client\n\n [\n 'id' => '1bf0b03e-1c62-45e3-bf18-c5989cb43dde',\n 'user_id' => $user->id,\n 'name' => 'dev-password-grant-client',\n 'secret' => 'S8xqNQxus0L4cCJA8lQ4nKLayIQjfc4YOXz9MSWp',\n 'redirect' => '',\n 'personal_access_client' => false,\n 'password_client' => true,\n 'revoked' => false,\n 'created_at' => now(),\n 'updated_at' => now(),\n ],\n ]);\n\n // Personal access token client\n\n $client = new Client();\n // $client->id = '84031037-7d29-491a-99ac-340ff14e1001';\n $client->user_id = $user->id;\n $client->name = 'dev-personal-client';\n $client->secret = 'ViSqJ6if7ZgUK6ysaBZF61MKb8bYPRIdjOTzK7oT';\n $client->redirect = '';\n $client->personal_access_client = true;\n $client->password_client = false;\n $client->revoked = false;\n $client->save();\n\n $personal_client = new PersonalAccessClient();\n $personal_client->client()->associate($client);\n $client->save();\n }", "public function testEdit()\n\t{\n\t\t$client = static::createClient(array(), array(\n\t\t 'PHP_AUTH_USER' => 'jr',\n\t\t 'PHP_AUTH_PW' => 'jr',\n\t\t));\n\t\t$client->followRedirects();\n\n\t\t// On clique sur le lien entreprise de test\n\t\t$crawler = $client->request('GET', '/clients');\n\t\t$link = $crawler->filter('.bloc__title a:contains(\"Entreprise de test\")')->first()->link();\n\t\t$crawler = $client->click($link);\n\t\t//On vérifie qu'on est bien sur la bonne page\n\t\t$this->assertEquals(1, $crawler->filter('h1:contains(\"Entreprise de test\")')->count());\n\n\t\t// On clique sur le bouton modifier\n\t\t$link = $crawler->filter('.btn--edit')->first()->link();\n\t\t$crawler = $client->click($link);\n\t\t//On vérifie qu'on est bien sur la bonne page\n\t\t$this->assertEquals(1, $crawler->filter('.breadcrumb:contains(\"Modifier\")')->count()); \n\n\t\t// On modifie le métier\n\t\t$form = $crawler->selectButton('Enregistrer')->form();\n\t\t$form['flyd_dashboardbundle_client[job]'] \t= 'Job de test modifié ' . rand(1,4);\n\t\t$crawler = $client->submit($form);\t\n\n\n\t\t//On vérifie que ça a marché\n\t\t$this->assertEquals(1, $crawler->filter('html:contains(\"Client bien enregistré.\")')->count());\n\n\t}", "public function client_setter_and_getter()\n {\n // Arrange\n $service = new Service;\n $client = new Client;\n\n // Act\n $returned = $service->setClient($client)->getClient();\n\n // Assert\n $this->assertEquals($client, $returned);\n }", "public function testGetToken()\n {\n $client = new Client();\n\n $body['grant_type'] = \"client_credentials\";\n $user = 'testclient';\n $pass = 'testpass';\n $res = $client->post($this->baseUrl . '/token', [ \n 'form_params' => $body,\n 'auth' => [$user, $pass] \n ]);\n\n $code = $res->getStatusCode();\n $body = $res->getBody();\n\n $this->assertEquals(200, $code);\n }", "public function testDeleteNotExistentClient() {\n\n // Generate user\n $user = factory(App\\User::class)->create();\n\n $this->actingAs($user)\n ->get('/clients/' . rand(1,999) . '/delete')\n ->seeJson(['success' => false]);\n\n }", "public function setClientId(string $clientId): AuthorizationInterface;", "public function testSetClient()\n {\n $change = new Change($this->p4);\n $change->setDescription('test')->save();\n $oldClient = $change->getClient();\n\n $this->p4->getService('clients')->grab();\n $change->setClient($this->p4->getClient());\n $change->save();\n $this->p4->getService('clients')->release();\n\n $this->assertFalse(\n $oldClient == Change::fetch($change->getId(), $this->p4)->getClient(),\n 'expected client change to have saved.'\n );\n }", "public function testAclMiddleware():void\n {\n $generator = Factory::create();\n $em = $this->em();\n $conn = $em->getConnection();\n $conn->beginTransaction();\n try {\n /** Register user via the guest endpoint **/\n $response = $this->json(\n 'POST', '/contexts/guest/users',\n [\n \"params\" => [\n 'email' => $generator->safeEmail,\n 'firstName'=> $generator->firstName,\n 'middleInitial'=>'X',\n 'lastName'=> $generator->lastName,\n 'age' => $generator->randomNumber(2),\n 'gender' => 1,\n 'weight' => 210,\n 'height' => 180.34,\n 'phoneNumber' => \"+1 757-571-2711\",\n 'lifestyle' => 1,\n 'password' => $this->password,\n 'job' => $generator->jobTitle,\n 'address' => $generator->address,\n 'locale' => \"en\"\n ],\n \"options\" => [\n \"email\" => false,\n \"g-recaptcha-response-omit\" => env('GOOGLE_RECAPTCHA_SKIP_CODE') /** skipping recaptcha with a key **/\n ]\n ]\n );\n $userResult = $response->decodeResponseJson();\n $this->assertArrayHasKey('id', $userResult);\n\n /** Making sure user has email verification entry **/\n $emailVerificationRepository = new EmailVerificationRepository();\n $emailVerification = $emailVerificationRepository->findOneBy([\"user\" => $userResult[\"id\"]]);\n $this->assertEquals( $emailVerification->getUser()->getId(), $userResult['id']);\n $this->assertEquals( $emailVerification->getVerified(), false);\n\n /** Email verification endpoint **/\n $response = $this->json(\n 'PUT', \"/contexts/guest/email-verification/\" . $emailVerification->getId(),\n [\n \"params\" => [ \"verified\" => true ],\n \"options\" => [ \"simplifiedParams\" => true ]\n ]\n );\n $response->assertResponseStatus(200);\n\n /** Making sure user has user has role entry of 'user' **/\n $userRepository = new UserRepository();\n /** @var User $user */\n $user = $userRepository->find($userResult[\"id\"]);\n $this->assertEquals( $user->getId(), $userResult['id']);\n $this->assertEquals( $user->getRoles()[0]->getName(), 'user');\n\n /** Login with wrong password **/\n $response = $this->json('POST', '/auth/authenticate', ['email' => $user->getEmail(), 'password' => 'wrong_password']);\n $response->assertResponseStatus(401);\n\n /** Login with right password **/\n $response = $this->json('POST', '/auth/authenticate', ['email' => $user->getEmail(), 'password' => $this->password]);\n $tokenResult = $response->decodeResponseJson();\n $response->assertResponseStatus(200);\n\n /** Free port acl **/\n $response = $this->json('GET', '/auth/me', [], ['HTTP_AUTHORIZATION'=>'Bearer ' . $tokenResult['token']]);\n $result = $response->decodeResponseJson();\n $this->assertEquals($result['email'], $user->getEmail());\n\n $data = [\n \"params\" => [\n \"name\" => $generator->name\n ],\n \"options\" => [\n \"simplifiedParams\" => true\n ]\n ];\n\n /** Posting artist as a quest **/\n $response = $this->json('POST', '/contexts/guest/artists', $data, ['HTTP_AUTHORIZATION'=>'Bearer ' . $tokenResult['token']]);\n $response->assertResponseStatus(405);\n\n /** Posting artist as a user **/\n $response = $this->json('POST', '/contexts/user/artists', $data, ['HTTP_AUTHORIZATION'=>'Bearer ' . $tokenResult['token']]);\n $result = $response->decodeResponseJson();\n $response->assertResponseStatus(500);\n\n /** Posting artist as a admin **/\n $response = $this->json('POST', '/contexts/admin/artists', $data, ['HTTP_AUTHORIZATION'=>'Bearer ' . $tokenResult['token']]);\n $response->assertResponseStatus(403);\n\n /** Posting artist as a super-admin **/\n $response = $this->json('POST', '/contexts/super-admin/artists', $data, ['HTTP_AUTHORIZATION'=>'Bearer ' . $tokenResult['token']]);\n $response->assertResponseStatus(404);\n $conn->rollBack();\n } catch (Exception $e) {\n $conn->rollBack();\n throw $e;\n }\n }", "public function testPutAuthorizationRole()\n {\n }", "public function testAddEditDeleteOffer()\n {\n \t$characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\t $charactersLength = strlen($characters);\n\t $name = '';\n\t for ($i = 0; $i < 8; $i++) {\n\t $name .= $characters[rand(0, $charactersLength - 1)];\n\t }\n\n \t$new_offer = array(\n \t\t\"name\" => $name,\n \t\t\"price\" => 123,\n \t\t\"nb_videos\" => 123,\n \t\t\"storage_allowed\" => 123\n \t);\n\n $client = static::createClient();\n $crawler = $client->request(\n \t'POST',\n \t'/offer/add',\n\t\t $new_offer,\n\t\t array(),\n\t\t array(\n\t\t 'HTTP_X-Auth-Token' => 'b9030ce5a6a63aa9afab0ca69dbc7349fce8c1e46c3795d956',\n\t\t 'CONTENT_TYPE' => 'application/json',\n\t\t )\n\t\t);\n\n\t\t$response = $client->getResponse()->getContent();\n\t\t$response = json_decode($response);\n\n // Response must be JSON\n $this->assertTrue(\n\t\t $client->getResponse()->headers->contains(\n\t\t 'Content-Type',\n\t\t 'application/json'\n\t\t ),\n\t\t 'the \"Content-Type\" header is \"application/json\"' // optional message shown on failure\n\t\t);\n\n // The HTTP status code must be 200\n\t\t$this->assertEquals(\n\t\t 201,\n\t\t $client->getResponse()->getStatusCode()\n\t\t);\n\n // Response must be JSON\n $this->assertTrue(\n\t\t isset( $response->{'offer_id'} ),\n\t\t 'the \"offer_id\" data is part of the response' // optional message shown on failure\n\t\t);\n\n\t\t// Get the ID of the newly created offer\n\t\t$offer_id = $response->{'offer_id'};\n\n\n\n\t\t// Test the edition of the offer\n\t\t// Set the new Data\n\t\t// Set a name for the offer\n \t$characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\t $charactersLength = strlen($characters);\n\t $name = '';\n\t for ($i = 0; $i < 8; $i++) {\n\t $name .= $characters[rand(0, $charactersLength - 1)];\n\t }\n\n \t$new_data = array(\n \t\t\"name\" => $name,\n \t\t\"price\" => 456,\n \t\t\"nb_videos\" => 0,\n \t\t\"storage_allowed\" => 456\n \t);\n\n $crawler = $client->request(\n \t'PUT',\n \t'/offer/'.$offer_id.'/edit',\n\t\t $new_data,\n\t\t array(),\n\t\t array(\n\t\t 'HTTP_X-Auth-Token' => 'b9030ce5a6a63aa9afab0ca69dbc7349fce8c1e46c3795d956',\n\t\t 'CONTENT_TYPE' => 'application/json',\n\t\t )\n\t\t);\n\n // Response must be JSON\n $this->assertTrue(\n\t\t $client->getResponse()->headers->contains(\n\t\t 'Content-Type',\n\t\t 'application/json'\n\t\t ),\n\t\t 'the \"Content-Type\" header is \"application/json\"' // optional message shown on failure\n\t\t);\n\n // The HTTP status code must be 200\n\t\t$this->assertEquals(\n\t\t 200,\n\t\t $client->getResponse()->getStatusCode()\n\t\t);\n\n\n\n\t\t// Test the deletion of the offer\n $crawler = $client->request(\n \t'DELETE',\n \t'/offer/'.$offer_id.'/delete',\n\t\t array(),\n\t\t array(),\n\t\t array(\n\t\t 'HTTP_X-Auth-Token' => 'b9030ce5a6a63aa9afab0ca69dbc7349fce8c1e46c3795d956',\n\t\t 'CONTENT_TYPE' => 'application/json',\n\t\t )\n\t\t);\n\n\t\t$response = $client->getResponse()->getContent();\n\t\t$response = json_decode($response);\n\n // The HTTP status code must be 200\n\t\t$this->assertEquals(\n\t\t 204,\n\t\t $client->getResponse()->getStatusCode()\n\t\t);\n }", "function testClient()\n{\n\t//adds client to the database\n\tcreateClient('The Business', '1993-06-20', 'LeRoy', 'Jenkins', '1234567890', '[email protected]', 'The streets', 'Las Vegas', 'NV');\n\t\n\t//gets client's information\n\techo \"<h3>Client Info</h3>\";\n\ttest(\"SELECT ClientContact.*, StartDate FROM Client, ClientContact WHERE (Client.clientname=ClientContact.clientname)\");\n\t\n\t//adds client purchase to the database\n\tcreateClientPurchase('The Business','0000-00-00 10-30-00', '2015-02-14');\n\t\n\t//gets client's purchase information\n\techo \"<h3>Client Purchases</h3>\";\n\ttest(\"SELECT * FROM ClientPurchases\");\n\n\t//gets client's information with their purchase information\n\techo \"<h3>Client Info With Purchases</h3>\";\n\ttest(\"SELECT ClientContact.*, StartDate, PurchaseID, HoursPurchased, PurchaseDate FROM Client, ClientContact, ClientPurchases WHERE (Client.clientname=ClientContact.clientname) AND (Client.clientname=ClientPurchases.clientname)\");\n\t\n\t//deletes client's purchase\n\tdeleteClientPurchase('The Business');\n\ttest(\"SELECT * FROM ClientPurchases\");\n\n\t//deletes client\n\tdeleteClient('The Business');\n\ttest(\"SELECT * FROM Client c, ClientPurchases cp, ClientContact cc WHERE (c.ClientName=cp.ClientName)\");\t\n}", "public function testCreateUserGranted()\n {\n $client = $this->createAuthorizedClient('admin');\n $crawler = $client->request('GET', '/issue/view/' . $this->getReference('issue-test')->getCode());\n\n // Page has Comments form\n $this->assertEquals(1, $crawler->filter('html:contains(\"Comments\")')->count());\n\n $form = $crawler->selectButton('Add')->form([\n 'sbts_comment_form[body]' => 'Test comment',\n ]);\n\n $client->followRedirects(true);\n $crawler = $client->submit($form);\n\n // Added comment appear on the page\n $this->assertEquals(1, $crawler->filter('html:contains(\"Test comment\")')->count());\n }", "public function testDeleteClientWithInvalidId() {\n\n // Generate user\n $user = factory(App\\User::class)->create();\n\n $this->actingAs($user)\n ->get('/clients/' . str_shuffle('ab12') . '/delete')\n ->seeJson(['success' => false]);\n\n }", "public function testGetClient()\n {\n $transport = new Transport();\n $this->assertInstanceOf(Client::class, $transport->getClient());\n }", "public function testValidateResourceWithValidToken()\n {\n $client = new OAuth2\\Client(CLIENT_ID, CLIENT_SECRET, OAuth2\\Client::AUTH_TYPE_AUTHORIZATION_BASIC);\n\n // Here you can define any other params that you want to pass.\n $params = array();\n\n // Generating Token\n $tokenResponse = $client->getAccessToken(TOKEN_URI, OAuth2\\Client::GRANT_TYPE_CLIENT_CREDENTIALS, $params);\n $httpCode = $tokenResponse['code'];\n \n $client->setAccessToken($tokenResponse['result']['access_token']);\n // Setting Up the access Token Type to client Object\n $client->setAccessTokenType(OAuth2\\Client::ACCESS_TOKEN_BEARER);\n\n // Finally fetching resource from Resource URL using access token\n $resourceResponse = $client->fetch('https://api.fronter.com/clients/'.CLIENT_ID);\n $checkClientId = $resourceResponse['result']['client_id'];\n\n $this->assertEquals($checkClientId, CLIENT_ID);\n }", "public function testCanGetClientFromResource()\n {\n $invoicesResource = $this->client->Invoices();\n\n $this->assertInstanceOf(\n Client::class,\n $invoicesResource->getClient()\n );\n }", "public function testGetRequest()\n {\n $admin = $this->getAdminUser();\n $user = factory(\\App\\User::class)->create();\n $grade = factory(\\App\\Grade::class)->create();\n $userGrade = UserGrade::create([\n 'user_id' => $user->id,\n 'grade_id' => $grade->id\n ]);\n $response = $this->actingAs($user)->call('GET', \"/api/user/{$user->id}/grade\");\n $this->assertEquals(200, $response->status());\n }", "public function testDeleteAuthorizationRole()\n {\n }", "public function testDeleteChallenge()\n {\n }", "public function testDeleteNetworkMerakiAuthUser()\n {\n }", "public function createUpdateClient(): void\n {\n $ClientEntity = new Client();\n foreach ($this->fieldsToFill as $field) {\n $result = $this->getCreateInput(\n sprintf(self::INSERT_BASE_MESSAGE, $field['label']),\n [ClientValidation::class, sprintf('isValid%s', $field['fieldName'])],\n [$ClientEntity, sprintf('set%s', $field['fieldName'])]\n );\n if (!$result) {\n print \"Returning to the main menu.\";\n\n return;\n }\n }\n $this->repository->persist($ClientEntity);\n print \"New client registered with success!\\n\";\n }", "public function testCreateClientAsVisitor() {\n\n $this->withoutMiddleware();\n\n // Generate client\n $client = factory(App\\Client::class)->make();\n\n $this->post('/clients/create', ['name' => $client->name, 'phone' => $client->phone_number])\n ->seeJson(['success' => false]);\n\n }", "public function testPutAuthorizationDivision()\n {\n }", "public function testSetCreationClient() {\n\n $obj = new Collaborateurs();\n\n $obj->setCreationClient(true);\n $this->assertEquals(true, $obj->getCreationClient());\n }", "public function testDeleteEnrollmentRequest()\n {\n }", "public function testApproveValidIdGetForHrAndAdmin() {\n\t\t$this->setExpectedException('MethodNotAllowedException');\n\t\t$userRoles = [\n\t\t\tUSER_ROLE_USER | USER_ROLE_HUMAN_RESOURCES => 'hr',\n\t\t\tUSER_ROLE_USER | USER_ROLE_ADMIN => 'admin',\n\t\t];\n\t\t$opt = [\n\t\t\t'method' => 'GET',\n\t\t];\n\t\tforeach ($userRoles as $userRole => $userPrefix) {\n\t\t\t$userInfo = [\n\t\t\t\t'role' => $userRole,\n\t\t\t\t'prefix' => $userPrefix,\n\t\t\t];\n\t\t\t$this->applyUserInfo($userInfo);\n\t\t\t$this->generateMockedController();\n\t\t\t$url = [\n\t\t\t\t'controller' => 'deferred',\n\t\t\t\t'action' => 'approve',\n\t\t\t\t'4',\n\t\t\t];\n\t\t\tif (!empty($userPrefix)) {\n\t\t\t\t$url['prefix'] = $userPrefix;\n\t\t\t\t$url[$userPrefix] = true;\n\t\t\t}\n\t\t\t$this->testAction($url, $opt);\n\t\t}\n\t}", "public function testCreateNetworkMerakiAuthUser()\n {\n }", "public function createClient(): Client;", "public function testProjectProjectIDUsersUserIDRolePut()\n {\n }", "public function editclientAction()\n {\n $identity = Zend_Auth::getInstance()->getIdentity();\n $role = $identity->role;\n\n $request = $this->getRequest();\n $service = new App_Service_Member();\n\n // A client is displayed read-only if the user is not a normal member (e.g., if they're a\n // treasurer).\n $this->view->readOnly = ($role === App_Roles::TREASURER);\n\n if ($this->_hasParam('id')) {\n // Editing an existing client.\n $id = $this->_getParam('id');\n\n $this->view->pageTitle = $this->view->readOnly ? 'View Client' : 'Edit Client';\n $this->view->form = new Application_Model_Member_ClientForm($id, $this->view->readOnly);\n\n if (!$request->isPost()) {\n // If the user hasn't submitted the form yet, load client info from the database.\n $this->view->form->setClient($service->getClientById($id));\n $this->view->form->setHouseholders($service->getHouseholdersByClientId($id));\n $this->view->form->setEmployers($service->getEmployersByClientId($id));\n }\n } else {\n // Adding a new client.\n if ($this->view->readOnly) {\n throw new DomainException('Only members can add new clients');\n }\n\n $this->view->pageTitle = 'New Client';\n $this->view->form = new Application_Model_Member_ClientForm();\n\n $client = new Application_Model_Impl_Client();\n\n // Possibly using name information from map action.\n $client\n ->setFirstName(App_Formatting::emptyToNull($this->_getParam('firstName')))\n ->setLastName(App_Formatting::emptyToNull($this->_getParam('lastName')));\n\n if (!$request->isPost() && $this->_hasParam('street') && $this->_hasParam('city')\n && $this->_hasParam('state')) {\n // Using address information from map action.\n $addr = new Application_Model_Impl_Addr();\n $addr\n ->setStreet($this->_getParam('street'))\n ->setApt(App_Formatting::emptyToNull($this->_getParam('apt')))\n ->setCity($this->_getParam('city'))\n ->setState($this->_getParam('state'))\n ->setZip(App_Formatting::emptyToNull($this->_getParam('zip')))\n ->setParish(App_Formatting::emptyToNull($this->_getParam('parish')));\n\n $client->setCurrentAddr($addr);\n }\n\n $this->view->form->setClient($client);\n }\n\n // If this isn't a post request, then we're done.\n if (!$request->isPost()) {\n return;\n }\n\n // Ensure that only members can edit clients.\n if ($this->view->readOnly) {\n throw new DomainException('Only members can edit existing clients');\n }\n\n // Re-add existing form data.\n $data = $request->getPost();\n\n $this->view->form->preValidate($data);\n $this->view->form->populate($data);\n\n // If the user just submitted the form, make some validation goodness happen.\n // If the user requested that we add or remove a household member or employer, or if form\n // validation failed, then we're done here.\n if ($this->view->form->handleAddRemoveRecords($data)\n || !$this->view->form->isValid($data)) {\n return;\n }\n\n // If we passed validation, insert or update the database as required.\n $client = $this->view->form->getClient();\n\n $changedHouseholders = $this->view->form->getChangedHouseholders();\n $changedEmployers = $this->view->form->getChangedEmployers();\n\n $user = new Application_Model_Impl_User();\n $user->setUserId(Zend_Auth::getInstance()->getIdentity()->user_id);\n\n if ($this->_hasParam('id')) {\n // Update an existing client.\n $removedHouseholders = $this->view->form->getRemovedHouseholders();\n $removedEmployers = $this->view->form->getRemovedEmployers();\n\n if ($this->view->form->isMaritalStatusChange() && $client->isMarried()) {\n // If an existing client gets married, then we need to track the creation date and\n // creating user for the newly entered spouse.\n $client->getSpouse()\n ->setUser($user)\n ->setCreatedDate(date('Y-m-d'));\n }\n\n if ($client->isDoNotHelp() && $client->getDoNotHelp()->getUser() === null) {\n // If an existing client was added to the do-not-help list, then we need to track\n // the date added and adding user.\n $client->getDoNotHelp()\n ->setUser($user)\n ->setDateAdded(date('Y-m-d'));\n }\n\n $client = $service->editClient(\n $client,\n $changedHouseholders,\n $changedEmployers,\n $removedHouseholders,\n $removedEmployers,\n $this->view->form->isMove(),\n $this->view->form->isMaritalStatusChange()\n );\n } else {\n // Add a new client.\n $client\n ->setUser($user)\n ->setCreatedDate(date('Y-m-d'));\n\n if ($client->isMarried()) {\n $client->getSpouse()\n ->setUser($user)\n ->setCreatedDate(date('Y-m-d'));\n }\n\n $client = $service->createClient($client, $changedHouseholders, $changedEmployers);\n }\n\n $this->_helper->redirector('viewClient', App_Resources::MEMBER, null, array(\n 'id' => $client->getId(),\n ));\n }", "public function testEditUser()\n {\n }", "public function testEditAuthenticated()\n {\n // cria um usuário\n $user = factory(User::class)->create([\n 'password' => bcrypt('123456'),\n ]);\n\n // cria um contato\n $contact = factory(Contact::class)->make();\n\n // salva um contato para o usuário\n $user->contacts()->save($contact);\n\n // tenta fazer o login\n $response = $this->post('/api/auth/login', [\n 'email' => $user->email,\n 'password' => '123456'\n ]);\n\n // verifica se foi gerado o token\n $response->assertJson([\n \"status\" => \"success\",\n ]);\n\n // pega token de resposta\n $token = $response->headers->get('Authorization');\n\n // tenta salvar o um contato\n $response = $this->withHeaders([\n 'Authorization' => \"Bearer $token\",\n ])->put('/api/v1/contacts/' . $contact->id, [\n 'id' => $contact->id,\n 'name' => 'Testando contatos',\n 'email' => $contact->email,\n 'telephone' => 123456789,\n ]);\n\n $response->assertStatus(200);\n }", "public function testPrivs()\n {\n return true; ///< Every client sees only it's own information\n }", "public function testQuarantineDeleteById()\n {\n\n }", "public function testMembersAndClientsCount()\n {\n $afiveone_id = $this->accounts->insert([\n 'subdomain' => 'afiveone',\n 'url' => 'https://afiveone.activecollab.com',\n 'license_key' => '123',\n ])[0];\n\n $this->assertEquals(1, $this->accounts->count());\n $this->assertEquals(1, $afiveone_id);\n\n list ($owner_id, $member_id, $subcontractor_id, $client1_id, $client2_id) = $this->users->insert(\n [ 'acid' => 1001, 'email' => '[email protected]', 'role' => 'Owner' ],\n [ 'acid' => 1002, 'email' => '[email protected]', 'role' => 'Member' ],\n [ 'acid' => 1003, 'email' => '[email protected]', 'role' => 'Subcontractor' ],\n [ 'acid' => 1004, 'email' => '[email protected]', 'role' => 'Client' ],\n [ 'acid' => 1005, 'email' => '[email protected]', 'role' => 'Client' ]\n );\n\n $this->assertEquals(1, $owner_id);\n $this->assertEquals(2, $member_id);\n $this->assertEquals(3, $subcontractor_id);\n $this->assertEquals(4, $client1_id);\n $this->assertEquals(5, $client2_id);\n\n $afiveone_users = $this->accounts->usersBelongingTo(1);\n\n $this->assertInstanceOf('ActiveCollab\\Resistance\\Storage\\Relationship\\BelongingTo', $afiveone_users);\n\n $this->assertEquals(0, $this->accounts->getFieldValue(1, 'members_count'));\n $this->assertEquals(0, $this->accounts->getFieldValue(1, 'clients_count'));\n\n // ---------------------------------------------------\n // Add members\n // ---------------------------------------------------\n\n $afiveone_users->add($owner_id, $member_id, $subcontractor_id);\n\n $this->assertEquals(3, $this->accounts->getFieldValue(1, 'members_count'));\n $this->assertEquals(0, $this->accounts->getFieldValue(1, 'clients_count'));\n\n // ---------------------------------------------------\n // Add clients\n // ---------------------------------------------------\n\n $afiveone_users->add($client1_id, $client2_id);\n\n $this->assertEquals(3, $this->accounts->getFieldValue(1, 'members_count'));\n $this->assertEquals(2, $this->accounts->getFieldValue(1, 'clients_count'));\n\n // ---------------------------------------------------\n // Remove one member and one client\n // ---------------------------------------------------\n\n $afiveone_users->remove($subcontractor_id);\n $afiveone_users->remove($client1_id);\n\n $this->assertEquals(2, $this->accounts->getFieldValue(1, 'members_count'));\n $this->assertEquals(1, $this->accounts->getFieldValue(1, 'clients_count'));\n\n // ---------------------------------------------------\n // Clear\n // ---------------------------------------------------\n\n $afiveone_users->clear();\n\n $this->assertEquals(0, $this->accounts->getFieldValue(1, 'members_count'));\n $this->assertEquals(0, $this->accounts->getFieldValue(1, 'clients_count'));\n }", "public function testEdit()\n {\n $client = $this->createAuthorizedClient();\n $crawler = $client->request('GET', '/persona/1/edit');\n $form = $crawler->selectButton('Update')->form();\n $form['persona[Apellidos]'] = 'Testy';\n $crawler = $client->submit($form);\n $this->assertTrue($client->getResponse()->isRedirect());\n $crawler = $client->followRedirect();\n\n //edit teniendo en cuenta los datos de una persona\n $persona = self::$kernel->getContainer()->get('doctrine')->getRepository('App\\Entity\\Persona')->findOneBy(array(\n 'Nombre' => 'Celia',\n 'Apellidos' => 'Cruz',\n 'Cargo' => 'Boss',\n 'Correo' => '[email protected]',\n 'Telefono' => '123456789',\n 'Local_id' => '1',\n 'Departamento' => '1',\n ));\n\n $personaID = $persona->getNumero_Empleado();\n $this->assertNotNull($personaID);\t//El cliente está insertado\n\n $crawler = $client->request('GET', '/persona/'.$personaID.'/edit');\n $form = $crawler->selectButton('Update')->form();\n $form['persona[Nombre]'] = 'Celia';\n $form['persona[Apellidos]'] = 'Cruz';\n $form['persona[Cargo]'] = 'Boss';\n $form['persona[Correo]'] = '[email protected]';\n $form['persona[Telefono]'] = '123456665';\n $form['persona[Local_id]'] = '1';\n $form['persona[Departamento]'] = '1';\n\n $crawler = $client->submit($form);\n\n //verificacion de que se hayan cambiado los datos\n $personaVerificacion = self::$kernel->getContainer()->get('doctrine')->getRepository('App\\Entity\\Persona')->findOneBy(array(\n 'Nombre' => 'Celia',\n 'Apellidos' => 'Cruz',\n 'Cargo' => 'Boss',\n 'Correo' => '[email protected]',\n 'Telefono' => '123456665',\n 'Local_id' => '1',\n 'Departamento' => '1',\n ));\n $this->assertNotNull($personaVerificacion);\n\n //persona que no existe\n $crawler = $client->request('GET', '/clientes/1246548788/edit');\n //no encuentra el archivo porque no existe\n $this->assertEquals(404, $client->getResponse()->getStatusCode()\n );\n }", "public function testAuthenticationsInweboIdGet()\n {\n }", "public function testParticipantsMePasswordPut()\n {\n }", "public function testGetClient()\n {\n $client = $this->object->getClient();\n\n $this->assertInstanceOf('GuzzleHttp\\ClientInterface', $client);\n $this->assertSame($this->client, $client);\n }", "public function testAuthorization(){\n $this->client->request('POST', '/api',[\n 'method' => 'createTransaction',\n 'user_id' => '0',\n 'token' => 'xxxxx',\n 'category_id' => '2',\n 'cost' => '123123',\n 'note' => 'asdadasgfa asfas ',\n ]);\n $data = json_decode($this->client->getResponse()->getContent(), true);\n $this->assertEquals(0, $data['success']);\n $this->assertEquals('User not found', $data['message']);\n\n $this->client->request('POST', '/api',[\n 'method' => 'createTransaction',\n 'user_id' => '-1',\n 'token' => 'xxxxx',\n 'category_id' => '2',\n 'cost' => '123123',\n 'note' => '',\n ]);\n $data = json_decode($this->client->getResponse()->getContent(), true);\n $this->assertEquals(0, $data['success']);\n $this->assertEquals('User not found', $data['message']);\n\n $this->client->request('POST', '/api',[\n 'method' => 'createTransaction',\n 'user_id' => '1',\n 'token' => 'xxxxx',\n 'category_id' => '2',\n 'cost' => '123123',\n 'note' => 'Test note',\n ]);\n $data = json_decode($this->client->getResponse()->getContent(), true);\n $this->assertEquals(0, $data['success']);\n $this->assertEquals('Request Fail,logout or sign in again', $data['message']);\n\n //Token of user already in database\n $this->client->request('POST', '/api',[\n 'method' => 'createTransaction',\n 'user_id' => '1',\n 'token' => '73a395f4b62a75ba12512e2d2b3b6dac',\n 'category_id' => '2',\n 'cost' => '123123',\n 'note' => 'Test note',\n ]);\n $data = json_decode($this->client->getResponse()->getContent(), true);\n $this->assertEquals(1, $data['success']);\n }", "public function testHexonetClient1()\n {\n $cl = CF::getClient([\n \"registrar\" => \"HEXONET\"\n ]);\n $this->assertInstanceOf(CL::class, $cl);\n }", "public function testNew()\n {\n $clientNoAuth = static::createClient();\n $clientNoAuth->request('GET', '/clientes/new');\n //redireccion a main\n $this->assertEquals(302, $clientNoAuth->getResponse()->getStatusCode());\n\n //caso con todo bien, redirección a /departamento/ y bien agregado el nuevo departamento.\n $client = $this->createAuthorizedClient();\n $crawler = $client->request('GET', '/persona/new');\n $form = $crawler->selectButton('Guardar')->form();\n $form['persona[Nombre]'] = 'Celia';\n $form['persona[Apellidos]'] = 'Cruz';\n $form['persona[Cargo]'] = 'Boss';\n $form['persona[Correo]'] = '[email protected]';\n $form['persona[Telefono]'] = '123456789';\n $form['persona[Local_id]'] = '1';\n $form['persona[Departamento]'] = '1';\n\n $crawler = $client->submit($form);\n $this->assertTrue($client->getResponse()->isRedirect());\n $crawler = $client->followRedirect();\n }", "function testDeleteSecurity() \r\n\t{\r\n\t\t$dbh = $this->dbh;\r\n\t\t$anonymous = new AntUser($dbh, USER_ANONYMOUS); // should only be a member of the everyone group\r\n\r\n\t\t$obj = new CAntObject($dbh, \"customer\", null, $this->user);\r\n\t\t$obj->setValue(\"name\", \"my test\");\r\n\t\t$cid = $obj->save(false);\r\n\t\tunset($obj);\r\n\r\n\t\t$obj = new CAntObject($dbh, \"customer\", $cid, $anonymous);\r\n\t\t$this->assertFalse($obj->remove());\r\n\t\tunset($obj);\r\n\r\n\t\t$obj = new CAntObject($dbh, \"customer\", $cid, $this->user);\r\n\t\t$obj->remove();\r\n\t\t$obj->remove();\r\n\t}", "public function testCreateClientWithEmptyFields() {\n\n $this->withoutMiddleware();\n\n // Generate user\n $user = factory(App\\User::class)->create();\n\n $this->actingAs($user)\n ->post('/clients/create')\n ->seeJson(['success' => false]);\n\n }", "public function testCreateClientWithoutName() {\n\n $this->withoutMiddleware();\n\n // Generate user\n $user = factory(App\\User::class)->create();\n\n $this->actingAs($user)\n ->post('/clients/create', ['phone' => '0725433317'])\n ->seeJson(['success' => false]);\n\n }", "public function testDeleteRequest()\n {\n $admin = $this->getAdminUser();\n $userGrade = factory(\\App\\UserGrade::class)->create();\n $response = $this->actingAs($admin)->call(\"DELETE\", \"/api/user/{$userGrade->user_id}/grade/{$userGrade->id}\");\n $this->assertEquals(200, $response->status());\n }", "public function testCNRClient()\n {\n $cl = CF::getClient([\n \"registrar\" => \"CNR\"\n ]);\n $this->assertInstanceOf(CL::class, $cl);\n }", "public function testAuthenticationServiceAuthenticationUpdate()\n {\n }", "public function testAuthenticationsEmailIdPut()\n {\n }", "public function test_auth_code_redemption_with_scope() {\n\t\tstatic::$test_auth_code['scope'] = 'create update';\n\t\t$code = $this->set_auth_code();\n\t\t$response = $this->create_form( 'POST', \n\t\t\t\tarray(\n\t\t\t\t\t'grant_type' => 'authorization_code',\n\t\t\t\t\t'code' => $code,\n\t\t\t\t\t'client_id' => 'https://app.example.com',\n\t\t\t\t\t'redirect_uri' => 'https://app.example.com/redirect',\n\t\t\t\t)\n\t\t);\n\t\t$this->assertEquals( 200, $response->get_status(), 'Response: ' . wp_json_encode( $response ) );\n\t\t$data = $response->get_data();\n\t\t$this->assertArrayNotHasKey( 'access_token', $data );\n\t\t$this->assertEquals( \n\t\t\tarray( \n\t\t\t\t'me' => get_author_posts_url( static::$author_id ),\n\t\t\t), \n\t\t\t$data, \n\t\t\t'Response: ' . wp_json_encode( $data ) \n\t\t);\n\t\t// Reset Just in Case.\n\t\tunset( static::$test_auth_code['scope'] );\n\t}", "public function testGetNetworkMerakiAuthUser()\n {\n }", "public function testSetCodeClient() {\n\n $obj = new FichesControlesEntetes();\n\n $obj->setCodeClient(\"codeClient\");\n $this->assertEquals(\"codeClient\", $obj->getCodeClient());\n }", "public function create_contracts_for_one_legal_client()\n {\n $client_id = factory(Legal::class, 'active')->create()->client_id;\n factory(Contract::class, 'in_progress_legal', 2)->create(['client_id' => $client_id]);\n factory(Contract::class, 'finished_legal', 2)->create(['client_id' => $client_id]);\n }", "public function testEditUser()\n {\n\n }", "function set_laravel_passport_grant_client_token()\n {\n DB::table('oauth_clients')\n ->where('id', 2)\n ->update(['secret' => 'dLdsIf3nPMWJC4gOCNcsUn5pBSv5tTPSaU51Gu2F']);\n }", "public function testGetTokenWithValidClientId()\n {\n $client = new OAuth2\\Client(CLIENT_ID, CLIENT_SECRET, OAuth2\\Client::AUTH_TYPE_AUTHORIZATION_BASIC);\n\n // Here you can define any other params that you want to pass.\n $params = array();\n\n // Generating Token\n $tokenResponse = $client->getAccessToken(TOKEN_URI, OAuth2\\Client::GRANT_TYPE_CLIENT_CREDENTIALS, $params);\n $httpCode = $tokenResponse['code'];\n $this->assertEquals($httpCode, 200);\n }", "public function testGetReplenishmentById()\n {\n }", "public function edit(Client $client)\n {\n //\n }", "public function edit(Client $client)\n {\n //\n }", "public function edit(Client $client)\n {\n //\n }", "public function edit(Client $client)\n {\n //\n }", "public function edit(Client $client)\n {\n //\n }", "public function edit(Client $client)\n {\n //\n }", "public function edit(Client $client)\n {\n //\n }", "public function edit(Client $client)\n {\n //\n }", "public function edit(Client $client)\n {\n //\n }", "public function testGetAuthorizationPermissions()\n {\n }", "public function testCreateClientWithoutPhoneNumber() {\n\n $this->withoutMiddleware();\n\n // Generate one user and one client\n $user = factory(App\\User::class)->create();\n $client = factory(App\\Client::class)->make();\n\n $this->actingAs($user)\n ->post('/clients/create', ['name' => $client->name])\n ->seeJson(['success' => true]);\n\n }", "public function testAuthenticationServiceAuthenticationCreate()\n {\n }", "public function testDeleteRole()\n {\n }", "public function testRequestEnrollment()\n {\n }", "public function testImplicitClient()\n {\n $reqData = [\n 'response_type' => AccessToken::RESPONSE_IMPLICIT,\n 'client_id' => 1,\n 'scope' => 'default',\n 'redirect_uri' => ClientsSeeder::REDIRECT_URI_TEST_CLIENT,\n ];\n /** @var \\Tests\\Functional\\AuthTest $data */\n $data = $this->get('/authorize?'.\\http_build_query($reqData));\n\n $data->seeHeader('location');\n $url = \\parse_url($data->response->headers->get('location'));\n\n $this->assertContains('access_token', $url['fragment'], true);\n $this->assertContains('bearer', \\mb_strtolower($url['fragment']), true);\n $this->assertContains('token_type', $url['fragment'], true);\n $this->assertContains('expires_in', $url['fragment'], true);\n }", "public function actionCreateAdmin($client)\n {\t\t\n\t\tBaseActiveRecord::setClient($client);\n\t\n\t\t//create response\n\t\t$response = Yii::$app->response;\n\t\t\n\t\t//options for bcrypt\n\t\t$options = [\n\t\t\t'cost' => 12,\n\t\t];\n\t\t\n\t\t$password = 'mdavis';\n\t\t$hashedPass = password_hash($password, PASSWORD_BCRYPT, $options);\n\t\t\n\t\t//build user data\n\t\t$userData = [\n\t\t\t'UserCreatedUID' => 'command generated',\n\t\t\t'UserCreatedDate' => BaseActiveController::getDate(),\n\t\t\t'UserComments' => 'Dev Admin',\n\t\t\t'UserActiveFlag' => 1,\n\t\t\t'UserFirstName' => 'Michael',\n\t\t\t'UserLastName' => 'Davis',\n\t\t\t'UserPassword' => $hashedPass,\n\t\t\t'UserEmployeeType' => 'Employee',\n\t\t\t'UserCompanyName' => 'Southern Cross',\n\t\t\t'UserCompanyPhone' => '770-40-1746',\n\t\t\t'UserName' => 'mdavis',\n\t\t\t'UserAppRoleType' => 'Admin',\n\t\t\t'UserPhone' => '706-340-8368',\n\t\t];\n\t\t\n\t\t$scUser = new SCUser();\n\t\t$scUser->attributes = $userData;\n\t\t\n\t\tif($scUser->save())\n\t\t{\n\t\t\t//assign rbac role\n\t\t\t// $auth = Yii::$app->authManager;\n\t\t\t// if($userRole = $auth->getRole($scUser[\"UserAppRoleType\"]))\n\t\t\t// {\n\t\t\t\t// $auth->assign($userRole, $scUser[\"UserID\"]);\n\t\t\t// }\n\t\t\t//TODO add user project relationship\n\t\t}\n }", "public function testPostAuthorizationRole()\n {\n }", "public function testActivateForGuest(): void\n {\n // Request\n $response = $this->put('api/v1/outroCards/activate/1');\n\n // Check response status\n $response->assertStatus(401);\n }", "public function testDeleteUser()\n {\n }", "public function testGetAuthorizationRole()\n {\n }", "public function testCreateClientWithTooShortName() {\n\n $this->withoutMiddleware();\n\n // Generate user\n $user = factory(App\\User::class)->create();\n\n $this->actingAs($user)\n ->post('/clients/create', ['name' => 'ab'])\n ->seeJson(['success' => false]);\n\n }", "public function testAddAuthentication();", "public function testAddAnonymus()\n {\n \t$user = factory(User::class)->create()''\n \t$response = $this->get('add');\n \t$response->assertStatus(200);\n \n }", "public function testPatchAuthorizationRole()\n {\n }", "public function testCanSelfEditUser()\n {\n $faker = \\Faker\\Factory::create();\n $user = factory(User::class)->create();\n $user->activate();\n $newName = $faker->name;\n $newEmail = $faker->email;\n $newPass = bcrypt(\"newsecret\");\n Auth::login($user);\n \n $this->put('/api/v1/user/'.$user->id, ['name' => $newName], ['HTTP_X-Requested-With' => 'XMLHttpRequest'])\n ->assertJson([\n 'user' => [\n 'name' => $newName,\n 'email' => $user->email,\n ]\n ]);\n $this->put('/api/v1/user/'.$user->id, ['name' => $user->name, 'email' => $newEmail], ['HTTP_X-Requested-With' => 'XMLHttpRequest'])\n ->assertJson([\n 'user' => [\n 'name' => $user->name,\n 'email' => $newEmail,\n ]\n ]);\n $this->put('/api/v1/user/'.$user->id, ['password' => $newPass, 'password_confirmation' => $newPass], ['HTTP_X-Requested-With' => 'XMLHttpRequest'])\n ->assertJson([\n 'user' => [\n 'name' => $user->name,\n 'email' => $newEmail,\n ]\n ]);\n $this->assertDatabaseHas('users', [\n 'name' => $user->name,\n 'email' => $newEmail,\n ]);\n }", "public function testPutAuthorizationRoleUsersRemove()\n {\n }" ]
[ "0.6682855", "0.664292", "0.66278887", "0.6474675", "0.63155806", "0.619589", "0.6142597", "0.6067689", "0.6056032", "0.6029367", "0.60248876", "0.5914911", "0.5910681", "0.5909496", "0.5839494", "0.5836691", "0.58031607", "0.5800475", "0.58004636", "0.579917", "0.57944465", "0.5791261", "0.57847905", "0.57840407", "0.5775942", "0.5775267", "0.57692486", "0.5767239", "0.5732625", "0.5727718", "0.5724615", "0.5723401", "0.57201195", "0.57133555", "0.56932217", "0.5681009", "0.5680007", "0.5679698", "0.5678303", "0.5647726", "0.56403446", "0.5637181", "0.56364673", "0.5626028", "0.56191456", "0.56078744", "0.56034636", "0.55986345", "0.5594659", "0.559442", "0.55805075", "0.5579132", "0.5573491", "0.5568753", "0.55644995", "0.5551519", "0.5550813", "0.5549059", "0.5543139", "0.5542668", "0.55392194", "0.55326676", "0.5532142", "0.5528227", "0.5513893", "0.5510468", "0.5504483", "0.5502016", "0.54997134", "0.549944", "0.5495418", "0.5495002", "0.5494353", "0.5483945", "0.54837716", "0.54837716", "0.54837716", "0.54837716", "0.54837716", "0.54837716", "0.54837716", "0.54837716", "0.54837716", "0.54800254", "0.5476037", "0.547538", "0.5471324", "0.54703885", "0.5469755", "0.54696006", "0.54685014", "0.54582995", "0.5454546", "0.54534394", "0.5447338", "0.54438144", "0.5442283", "0.5442166", "0.54303974", "0.5428575" ]
0.7718429
0
Test that create method throws errors correctly.
public function testCreateGrantExceptions() { $throws_missing_client_id_exception = false; try { self::$api->create('', self::$apiIdentifier, []); } catch (CoreException $e) { $throws_missing_client_id_exception = $this->errorHasString($e, 'Empty or invalid "client_id" parameter'); } $this->assertTrue($throws_missing_client_id_exception); $throws_missing_audience_exception = false; try { self::$api->create(self::$env['APP_CLIENT_ID'], '', []); } catch (CoreException $e) { $throws_missing_audience_exception = $this->errorHasString($e, 'Empty or invalid "audience" parameter'); } $this->assertTrue($throws_missing_audience_exception); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testCreatedException()\n {\n $this->expectException(DomainException::class);\n County::create('County One',0, 200);\n }", "public function create()\n\t{\n\t\treturn $this->fail(lang('RESTful.notImplemented', ['create']), 501);\n\t}", "public function test_create_fail()\n {\n $response = $this->withHeaders([\n 'Accept' => 'application/json',\n ])->post('api/comments');\n\n $response->assertStatus(422);\n\n }", "public function testExceptionConfiFileNotFound() {\r\n $this->model->create($this->post());\r\n }", "public function testCreateUnsuccessfulReason()\n {\n }", "public function test_create()\n\t{\n\t\tlist($id, $affected) = $this->model->create(array(\n\t\t\t'user_id' => '1',\n\t\t\t'role_id' => '1'\n\t\t));\n\n\t\t$this->assertSame(0, $id); // No primary key...\n\t\t$this->assertSame(1, $affected);\n\t}", "public function it_cant_create_invalid()\n {\n $this->shouldThrow('\\Aspire\\DIC\\Exception\\NotFoundException')->duringGet('SomeClassThatDoesNotExist');\n }", "public function testHandleCreateValidationError()\n {\n // Set parameter and remove branch name\n $params = $this->customBranchData;\n unset($params['name']);\n \n $this->withSession($this->adminSession)\n ->call('POST', '/branch/create', $params, [], [], ['HTTP_REFERER' => '/branch/create']);\n \n $this->assertRedirectedTo('/branch/create');\n $this->assertSessionHasErrors();\n $this->assertHasOldInput();\n }", "public function testHandleCreateValidationError()\n {\n // Set parameter and remove dealer account name\n $params = $this->customDealerAccountData;\n unset($params['name']);\n \n $this->withSession($this->adminSession)\n ->call('POST', '/dealer-account/create', $params, [], [], ['HTTP_REFERER' => '/dealer-account/create']);\n \n $this->assertRedirectedTo('/dealer-account/create');\n $this->assertSessionHasErrors();\n $this->assertHasOldInput();\n }", "public function test_it_cannot_create_invalid_model()\n {\n // we attempt to create an invalid model\n //\n // $forms = [\n // 'Name' => [ 'text' => 'Kelt' ],\n // 'Email' => [ 'text' => '[email protected]' ],\n // ];\n\n // $model = $this->ModelMapper->create('DvsUser', $pageVersionId = 1, $forms);\n\n // dd($model->toArray());\n }", "public function testQuarantineCreate()\n {\n\n }", "public function testCreate()\n\t{\n\t\t$this->dispatchWithExpectedException(\"/comment/create\", 'Bootstrap_Service_Exception_Authorization');\n\t}", "public function testCannotBeCreatedFromInvalidEmailAddress()\n {\n\n }", "public function testCreateFailure()\n {\n FactoryGirl::create('Bar');\n }", "public function testBlankCreate() {\n $testUserRank = new UserRank();\n\n // Set expected exception\n $this->expectException(BlankObjectException::class);\n\n // Trigger it\n try {\n $testUserRank->create();\n } catch(BlankObjectException $e) {\n $this->assertEquals('Cannot store a blank User Rank.', $e->getMessage());\n }\n }", "public function testItDoesntCreateANewUserWithInvalidData()\n {\n $data = factory(User::class)->make([\n \"address\" => [\n \"city\" => \"springfield\",\n \"country\" => \"united states of america\",\n \"state\" => \"missouri\",\n \"street\" => \"1742 evergreen terrace\",\n ]\n ]);\n\n $this->actingAs($this->user)\n ->postJson(\n \"api/v1/users/\",\n $data->only([\n \"email\",\n \"address\",\n \"lastname\",\n \"tenant_id\",\n ])\n )\n ->assertStatus(422);\n }", "public function testCreation()\n {\n $this->module->enableRegistration = false;\n\n $this->specify(\"we have create user if registration disabled\", function () {\n $user = new User([\n 'email' => '[email protected]',\n 'password' => 'password',\n 'name' => 'Test user',\n ]);\n expect(\"we can create user if registration disabled\", $user->create())->true();\n $this->tester->dontSeeEmailIsSent();\n //create() on existing user throw \\RuntimeException\n $user->create();\n }, ['throws' => new \\RuntimeException]);\n\n $this->module->enableRegistration = true;\n $this->specify(\"we have create user with register email\", function () {\n $user = new User([\n 'email' => '[email protected]',\n 'password' => 'password',\n 'name' => 'Test user 2',\n ]);\n expect(\"we can create user if registration disabled\", $user->create(true))->true();\n /** @var TestMailer $message */\n /** @var yii\\swiftmailer\\Message $message */\n $this->tester->seeEmailIsSent();\n $message = $this->tester->grabLastSentEmail();\n expect(\"we must see email\", $message)->notNull();\n expect(\"we must see email to user\", $message->getTo())->hasKey($user->email);\n expect(\"we must see registration email\", $message->getSubject())->contains('register');\n });\n\n $this->specify(\"we have create user wit autogenerated password\", function () {\n $user = new User([\n 'email' => '[email protected]',\n 'name' => 'Test user',\n ]);\n expect(\"we can create user with autogenerated password\", $user->create())->true();\n });\n\n $this->specify(\"we have create user without name\", function () {\n $user = new User([\n 'email' => '[email protected]',\n 'password' => 'password',\n ]);\n expect(\"we can't create user without name\", $user->create())->false();\n expect(\"we can see error `name`\", $user->getErrors())->hasKey('name');\n });\n }", "public function test_create__invalid_class()\n {\n\n (new ElementFactory())->create(['attributes' => ['type' => ElementFactory::class, 'name' => '']]);\n }", "public function testVerifyCreateError()\n {\n $response = $this->withHeaders([\n 'X-Header' => 'Value',\n ])->post('/login', [\n 'name' => 'admin',\n 'password' => 'wrong'\n ]);\n\n $response->assertSessionHasErrors();\n $response->assertStatus(302);\n $response->assertSee('Redirect');\n $response->assertRedirect('/');\n }", "public function test_it_does_not_create_a_new_user_if_validation_fails()\n {\n $user = ['given_name' => 'Andrew', 'family_name' => 'Hook'];\n\n $response = $this->call('POST', '/users', $user);\n\n $this->assertEquals(422, $response->status());\n $this->assertJsonStringEqualsJsonString(json_encode(['email' => ['The email field is required.']]), $response->getContent());\n }", "public function testCreate()\n\t{\n\t\t$user = new User();\n\n\t\t$this->assertFalse($user->save());\n\n\t\t$this->assertGreaterThan(0, $user->validationErrors->get('first_name'));\n\t\t$this->assertGreaterThan(0, $user->validationErrors->get('last_name'));\n\t\t$this->assertGreaterThan(0, $user->validationErrors->get('email'));\n\t\t$this->assertGreaterThan(0, $user->validationErrors->get('rut'));\n\t\t$this->assertGreaterThan(0, $user->validationErrors->get('password'));\n\t\t$this->assertGreaterThan(0, $user->validationErrors->get('birthday'));\n\n\t\t//Creating model with invalid attributes\n\t\t$user = new User();\n\t\t$user->first_name = '12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890';\n\t\t$user->last_name = '12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890';\n\t\t$user->email = 'abcdef';\n\t\t$user->rut = '48170393-1';\n\t\t$user->password = '12345678';\n\t\t$user->password_confirmation = '123456';\n\t\t$user->birthday = '1987';\n\n\t\t$this->assertFalse($user->save());\n\n\t\t$this->assertGreaterThan(0, $user->validationErrors->get('first_name'));\n\t\t$this->assertGreaterThan(0, $user->validationErrors->get('last_name'));\n\t\t$this->assertGreaterThan(0, $user->validationErrors->get('email'));\n\t\t$this->assertGreaterThan(0, $user->validationErrors->get('rut'));\n\t\t$this->assertGreaterThan(0, $user->validationErrors->get('password'));\n\t\t$this->assertGreaterThan(0, $user->validationErrors->get('birthday'));\n\n\t\t//Creating model with valid attributes\n\t\t$user = new User();\n\t\t$user->first_name = 'Jai';\n\t\t$user->last_name = 'me';\n\t\t$user->email = '[email protected]';\n\t\t$user->rut = '23.845.771-8';\n\t\t$user->password = '12345678';\n\t\t$user->password_confirmation = '12345678';\n\t\t$user->birthday = '1972-03-29';\n\n\t\t$this->assertTrue($user->save());\n\n\t\t$this->assertTrue(is_int($user->id));\n\t}", "public function testSaveCreate()\n {\n $user = User::findOne(1002);\n\n $this->specify('Error create attempt', function() use ($user) {\n $project = Project::findOne(1002); // not owned by the provided user\n $oldVersionsCount = $project->getVersions()->count();\n\n $model = new VersionForm($user, [\n 'scenario' => VersionForm::SCENARIO_CREATE,\n 'projectId' => $project->id,\n 'title' => 'Some very long title...Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam dignissim, lorem in bibendum.',\n 'type' => 0,\n 'subtype' => 0,\n 'retinaScale' => 'invalid_value',\n 'autoScale' => 'invalid_value',\n ]);\n\n $result = $model->save();\n\n verify('Model should not succeed', $result)->null();\n verify('Error message should be set', $model->errors)->hasKey('projectId');\n verify('Title error message should be set', $model->errors)->hasKey('title');\n verify('Type error message should be set', $model->errors)->hasKey('type');\n verify('Subtype error message should not be set because not valid type is set', $model->errors)->hasntKey('subtype');\n verify('AutoScale error message should be set', $model->errors)->hasKey('autoScale');\n verify('RetinaScale error message should be set', $model->errors)->hasKey('retinaScale');\n verify('Project versions count should not change', $project->getVersions()->count())->equals($oldVersionsCount);\n });\n\n $this->specify('Success create attempt', function() use ($user) {\n $project = Project::findOne(1001);\n $oldVersionsCount = $project->getVersions()->count();\n\n $model = new VersionForm($user, [\n 'scenario' => VersionForm::SCENARIO_CREATE,\n 'projectId' => $project->id,\n 'title' => 'My new test version title',\n 'type' => Version::TYPE_DESKTOP,\n 'autoScale' => true,\n 'retinaScale' => true,\n ]);\n\n $result = $model->save();\n\n verify('Model should succeed and return an instance of Version', $result)->isInstanceOf(Version::className());\n verify('Model should not have any errors', $model->errors)->isEmpty();\n verify('Version projectId should match', $result->projectId)->equals(1001);\n verify('Project versions count should increased', $project->getVersions()->count())->equals($oldVersionsCount + 1);\n verify('Version title should match', $result->title)->equals('My new test version title');\n verify('Version type should be set', $result->type)->equals(Version::TYPE_DESKTOP);\n verify('Version scaleFactor should be set', $result->scaleFactor)->equals(Version::RETINA_SCALE_FACTOR);\n verify('Version subtype should not be set', $result->subtype)->null();\n });\n }", "public function create()\n {\n throw new Exception('Not yet implemented');\n }", "public function checkIsValidForCreate() {\n $errors = array();\n if (strlen($this->email) < 5) {\n $errors[\"email\"] = i18n(\"You must write your email\");\n }\n if (sizeof($errors)>0){\n throw new ValidationException($errors, \"user is not valid\");\n }\n }", "public function createOneUserFail()\n {\n $data = [\n \"id\" => \"A0000002\",\n \"user_name\" => \"Nguyen Van A\",\n \"email\" => \"[email protected]\",\n \"password\" => \"helloKitty\",\n \"role_id\" => 3,\n \"status\" => 3\n ];\n $user = User::whereId('A0000001')->first();\n $response = $this->actingAs($user, 'sanctum')\n ->putJson('/users/A0000001', $data);\n $response->assertStatus(422);\n $response->assertJsonValidationErrors('id', 'user_res_msg');\n $response->assertJsonValidationErrors('role_id', 'user_res_msg');\n }", "public function testCreatesAValidItem()\n {\n $item = $this->createItem();\n $this->assertInstanceOf('App\\Domain\\Entity\\Item', $item);\n }", "public function test_create_user_invalid_name()\n {\n $response = $this->json('POST', '/user_create',\n [\n 'name' => str_repeat('a', 51), \n 'email' => $this->email,\n 'password' => $this->password]);\n $response\n ->assertStatus(200)\n ->assertExactJson([\n $this->all_message => $this->user_create_invalid_name,\n ]);\n }", "public function test_create_item() {}", "public function test_create_item() {}", "public function testError()\n {\n TestUtil::setupCassette('errors/errors.yml');\n\n // Create a bad shipment so we can work with errors\n try {\n self::$client->shipment->create();\n } catch (ApiException $error) {\n $this->assertEquals(422, $error->getHttpStatus());\n $this->assertEquals('PARAMETER.REQUIRED', $error->code);\n $this->assertEquals('Missing required parameter.', $error->getMessage());\n $this->assertEquals(['field' => 'shipment', 'message' => 'cannot be blank'], $error->errors[0]);\n $this->assertEquals('{\"error\":{\"code\":\"PARAMETER.REQUIRED\",\"message\":\"Missing required parameter.\",\"errors\":[{\"field\":\"shipment\",\"message\":\"cannot be blank\"}]}}', $error->getHttpBody()); // phpcs:ignore\n\n // We check that the pretty printed output is the same here, leave the odd formatting as\n // it is here and do not auto-format the next few lines.\n $error->prettyPrint();\n $this->expectOutputString('PARAMETER.REQUIRED (422): Missing required parameter.\nField errors:\n field: shipment\n message: cannot be blank\n\n');\n }\n }", "public function testNewFixtureInvalid()\n {\n $e = null;\n try {\n $fixture = new Mad_Test_Fixture_Base($this->_conn, 'does_not_exist');\n } catch (Exception $e) {}\n\n $this->assertTrue($e instanceof Mad_Test_Exception);\n }", "public function testAllowCreate()\n {\n $createFalse = LogEntry::create()->canCreate(null);\n $this->assertFalse($createFalse);\n $this->logInWithPermission('ADMIN');\n $createFalse = LogEntry::create()->canCreate();\n $this->assertFalse($createFalse);\n }", "public function testIs20200519CustomerCreatableThrowInvalidArgumentException()\n {\n $this->expectException(\\Xendit\\Exceptions\\InvalidArgumentException::class);\n $params = [\n 'reference_id' => self::REFERENCE_ID\n ];\n\n Customers::createCustomer($params);\n }", "public function testNewGameError()\n {\n $user = factory(UserModel::class)->create();\n\n $generatedHand = \"b c d e f\";\n\n\n $response = $this->postJson('/api/v1/newgame', ['userId' => $user->id, 'userCardSequence' => $generatedHand]);\n\n $response\n ->assertStatus(422)\n ->assertJsonStructure([\n 'message',\n 'errors'\n ]);\n }", "public function create()\n {\n return 'can`t create ';\n }", "private static function assertCreateValidations(array $input)\n {\n // Verify that rut is correct\n if (!self::validateRut((int)$input['rut'], $input['rut_dv']))\n {\n throw new InvalidParametersException(['rut' => 'The rut is not valid']);\n }\n\n // Verify that you have not associated a rut for the same custoumer\n /*if (Account::where('customer_id', $input['customer_id'])->where('rut', $input['rut'])->first())\n {\n throw new ResourceAlreadyExistsException(\"rut \" . $input['rut'] . $input['rut_dv'], ['rut' => 'Rut must be unique']);\n }*/\n\n // Verify that there is no other account with the same email\n if (Account::where('email', $input['email'])->first())\n {\n throw new ResourceAlreadyExistsException(\"email \" . $input['email'], ['email' => 'Email must be unique']);\n }\n }", "public function testItCanCreateEntity()\n {\n $values = [\n 'first_name' => 'First name account',\n 'last_name' => 'Last name account',\n 'email' => '[email protected]',\n ];\n $ignore = [\n 'is_active' => false,\n 'is_superuser' => true,\n 'is_staff' => true,\n ];\n $password = 'testpass';\n\n $entity = $this->accountService->create(array_merge(\n $values,\n ['password' => $password],\n $ignore\n ));\n $data = $entity->toArray();\n\n $this->assertDatabaseHas('user_users', $values);\n $this->assertInstanceOf(User::class, $entity);\n $this->assertTrue(Hash::check($password, $entity->password));\n $this->assertTrue($entity->is_active);\n $this->assertFalse($entity->is_superuser);\n $this->assertFalse($entity->is_staff);\n\n foreach ($this->dataStructure() as $key) {\n $this->assertArrayHasKey($key, $data);\n }\n }", "public function testRefuseCreation()\n {\n $newActor = new \\eddie\\Models\\Actor();\n $newActor->save();\n }", "public function testExcepcionSiSeCreaEmpleadoConDniVacio(){\n\t\t\t$this->expectException(\\Exception::class);\n\t\t\t$emp= $this-> crear(null, null,$dni=\"\");\n\t\t}", "public function testCreate()\n {\n /**\n * @todo IMPLEMENT THIS\n */\n $factory = new components\\Factory();\n //Success\n $this->assertEquals($factory->create(\"github\"), new components\\platforms\\Github([]));\n $this->assertEquals($factory->create(\"github\"), new components\\platforms\\Github([]));\n $this->assertEquals($factory->create(\"gitlab\"), new components\\platforms\\Gitlab([]));\n $this->assertEquals($factory->create(\"bitbucket\"), new components\\platforms\\Bitbucket([]));\n //Exception Case\n $this->expectException(\\LogicException::class);\n $platform = $factory->create(\"Fake\");\n\n }", "public function testStoreUserValidationError()\n {\n $user = User::factory()->create();\n\n $data = [\n 'name' => $this->faker->name,\n 'type' => 'admin',\n ];\n\n $response = $this->actingAs($user, 'api')\n ->postJson('/api/user', $data);\n\n $response->assertStatus(422);\n }", "public function check_create_person_validation()\n {\n\n $person = [];\n $this->signInAsRelationshipsManager('api');\n $response = $this->json('POST','api/v1/person/', $person);\n $response->assertStatus(422)\n ->assertJson( [\n 'message' => 'The given data was invalid.',\n 'errors' => [\n 'givenName' => [\n 'The given name field is required.'\n ],\n \"surname1\" => [\n \"The surname1 field is required.\"\n ],\n \"identifier\" => [\n \"The identifier field is required.\"\n ],\n \"identifier_type\" => [\n \"The identifier type field is required.\"\n ]\n\n ]\n ]);\n }", "public function testCreate() \n\t{\n\t\t$spot=$this->createSpot(\"Too many characters in this message, haha it's gonna be hard to exceed it because I don't have a whole lot of things to type lol! Anyway I should probably go now\");\n\t\t$this->assertFalse($spot);\n\n\t\t$spot=$this->createSpot();\n\t\t$this->assertObjectHasAttribute('id', $spot, 'Spot not created properly');\n\t}", "public function testShouldFailIFARegistrationIsCreatedWithoutSource() {\n $this->expectException(\\PDOException::class);\n \n $entity = new Registration;\n $entity->registrant_id = $this->getRegistrant()->id;\n $entity->type = 'PLAYER' ;\n $entity->league = 'league';\n $entity->org_name = 'Oranization...';\n $entity->org_state = 'NY';\n $entity->season = '2017';\n $entity->external_id = 'myexternalid';\n $entity->right_to_market = true;\n $entity->team_gender = 'Male';\n $entity->team_name = 'A-Team';\n $entity->school_district = 'school district';\n $entity->school_state = 'school sate';\n $entity->first_name = 'Firt name';\n $entity->middle_name = 'Middle name';\n $entity->last_name = 'Last Name';\n $entity->email = '[email protected]';\n $entity->gender = 'Male';\n $entity->city = 'California';\n $entity->zip_code = '234141234123';\n $entity->birth_date = '11/27/1984';\n $entity->phone_number = '1234567890';\n $entity->game_type = 'SOME';\n $entity->level = 'LEVEL';\n $entity->state = 'CALIFORNIA';\n $entity->address_first_line = 'An Address 1234';\n $entity->county = 'A county';\n\n $entity->save();\n }", "public function testUnvalidCreateTodo()\n {\n $response = $this->json('POST', '/todos', [\n 'content' => $this->todo['content'],\n 'is_active' => $this->todo['is_active'],\n ], [\n 'apikey' => $this->apiAuth['uuid'],\n 'Authorization' => 'Bearer ' . $this->token,\n ]);\n\n $response->assertResponseStatus(422);\n $response->seeJsonStructure([\n 'message',\n 'errors' => [\n 'is_completed'\n ],\n ]);\n }", "public function testCreateFormFail(): void\n {\n $this->post(route('form.store'), [])\n ->assertStatus(400)\n ->assertJson([\n 'success' => false,\n 'message' => __('messages.validation_failed'),\n 'data' => true\n ]);\n }", "public function testIfProcessCreationWithInvalidFormatThrowsTheRightException()\n {\n $this->setExpectedException('CloudConvert\\Exceptions\\ApiException', 'This conversiontype is not supported!', 400);\n $this->setExpectedException('CloudConvert\\Exceptions\\ApiBadRequestException', 'This conversiontype is not supported!', 400);\n\n $this->api->createProcess(array(\n 'inputformat' => 'invalid',\n 'outputformat' => 'pdf',\n ));\n }", "public function test_it_should_throw_an_exception_on_invalid_url()\n {\n SourceFactory::create('unknown');\n }", "public function testIs20201031CustomerCreatableThrowInvalidArgumentException()\n {\n $this->expectException(\\Xendit\\Exceptions\\InvalidArgumentException::class);\n $params = [\n 'reference_id' => self::REFERENCE_ID,\n 'api-version' => '2020-10-31'\n ];\n\n Customers::createCustomer($params);\n }", "public function testCreateChangesetFailure()\n\t{\n\t\t$changeset = array\n\t\t(\n\t\t\t\tarray\n\t\t\t\t(\n\t\t\t\t\t\t\"comment\" => \"my changeset comment\",\n\t\t\t\t\t\t\"created_by\" => \"JOsm\"\n\t\t\t\t),\n\t\t\t\tarray\n\t\t\t\t(\n\t\t\t\t\t\t\"A\" => \"a\",\n\t\t\t\t\t\t\"B\" => \"b\"\n\t\t\t\t)\n\t\t);\n\n\t\t$returnData = new stdClass;\n\t\t$returnData->code = 500;\n\t\t$returnData->body = $this->errorString;\n\n\t\t$path = 'changeset/create';\n\n\t\t$this->client->expects($this->once())\n\t\t->method('put')\n\t\t->with($path)\n\t\t->will($this->returnValue($returnData));\n\n\t\t$this->object->createChangeset($changeset);\n\t}", "public function testSaveFailed() {\n $startDate = Date::today()->addWeek();\n\n /** @var Course $course */\n $course = $this->mockModel(Course::class);\n $teacher = $this->mockModel(Teacher::class);\n\n $this->mockCoursePossible($teacher, $startDate);\n $this->mockLessons();\n $course->shouldReceive(['save' => false])->between(1, 1);\n\n $courseSpec = $this->mockCreateSpec($startDate, null, $course);\n\n $this->assertException(function() use ($courseSpec, $teacher) {\n $this->courseService->createCourse($courseSpec, $teacher);\n }, CourseException::class, CourseException::SAVE_FAILED);\n }", "public function testExcepcionSiSeCreaEmpleadoConNombreVacio(){\n\t\t\t$this->expectException(\\Exception::class);\n\t\t\t$emp= $this-> crear($nombre=\"\");\n\t\t}", "public function testCreate()\n {\n $model = $this->makeFactory();\n \n $this->json('POST', static::ROUTE, $model->toArray(), [\n 'Authorization' => 'Token ' . self::getToken()\n ])\n ->seeStatusCode(JsonResponse::HTTP_CREATED) \n ->seeJson($model->toArray());\n }", "public function test_create_user_invalid_email()\n {\n\n $response = $this->json('POST', '/user_create',\n [\n 'name' => $this->name,\n 'email' => 'test' . rand(1, 10), \n 'password' => $this->password]);\n $response\n ->assertStatus(200)\n ->assertExactJson([\n $this->all_message => $this->user_create_invalid_email,\n ]);\n }", "public function cant_create_with_wrong_status()\n {\n $project = factory(Project::class)->raw(['status' => $this->faker->word]);\n $this->post('/api/projects', $project)->assertStatus(422)->assertJsonStructure([\n 'errors' => [\n 'status',\n ],\n ]);\n }", "public function testSaveUnableToCreateFile(): void\n {\n $this->expectException(NotWritableException::class);\n $this->expectExceptionMessage('Unable to create file `' . DS . 'noExisting`');\n $this->getThumbCreatorInstance('400x400.jpg')->resize(200)->save(['target' => DS . 'noExisting']);\n }", "public function assertApiUserCanBeCreated()\n {\n $user = '';\n\n try {\n $user = $this->createApiUser();\n } catch (Exception $e) {\n $msg = 'User could not be created with factory.';\n echo $msg.\"\\n\";\n }\n\n $this->assertTrue(is_object($user));\n }", "public function testShouldFailIFARegistrationIsCreatedWithoutRegistrant() {\n $this->expectException(\\PDOException::class);\n\n $entity = new Registration;\n $entity->source_id = $this->getSource()->id;\n $entity->type = 'PLAYER' ;\n $entity->league = 'league';\n $entity->org_name = 'Oranization...';\n $entity->org_state = 'NY';\n $entity->season = '2017';\n $entity->external_id = 'myexternalid';\n $entity->right_to_market = true;\n $entity->team_gender = 'Male';\n $entity->team_name = 'A-Team';\n $entity->school_district = 'school district';\n $entity->school_state = 'school sate';\n $entity->first_name = 'Firt name';\n $entity->middle_name = 'Middle name';\n $entity->last_name = 'Last Name';\n $entity->email = '[email protected]';\n $entity->gender = 'Male';\n $entity->city = 'California';\n $entity->zip_code = '234141234123';\n $entity->birth_date = '11/27/1984';\n $entity->phone_number = '1234567890';\n $entity->game_type = 'SOME';\n $entity->level = 'LEVEL';\n $entity->state = 'CALIFORNIA';\n $entity->address_first_line = 'An Address 1234';\n $entity->county = 'A county';\n\n $entity->save();\n }", "public function testCanValidateCreateOperationForMultipleDomains() {\n\n $ukDomain = \"validationdomain.uk\";\n $comDomain = \"validationdomain.com\";\n $owner = new DomainNameContact();\n\n $createDescriptor = new DomainNameCreateDescriptor(array($ukDomain, $comDomain), 1, $owner, array(\"monkeynameserver\"));\n\n $validationErrors = $this->api->domains()->validate($createDescriptor);\n\n $this->assertTrue(is_array($validationErrors[$ukDomain]));\n $this->assertTrue(isset($validationErrors[$ukDomain][\"DOMAIN_INVALID_OWNER_CONTACT\"]));\n $this->assertTrue(isset($validationErrors[$ukDomain][\"DOMAIN_INVALID_NAMESERVER_FORMAT\"]));\n\n $this->assertTrue(is_array($validationErrors[$comDomain]));\n $this->assertTrue(isset($validationErrors[$comDomain][\"DOMAIN_INVALID_OWNER_CONTACT\"]));\n $this->assertTrue(isset($validationErrors[$comDomain][\"DOMAIN_INVALID_NAMESERVER_FORMAT\"]));\n\n $this->assertTrue($validationErrors[$comDomain][\"DOMAIN_INVALID_NAMESERVER_FORMAT\"] instanceof TransactionError);\n\n }", "public function checkIsValidForCreate() {\n $errors = array();\n /*if (strlen($this->email) < 5) {\n $errors[\"register-email\"] = \"You must write your email\";\n }*/\n if (sizeof($errors)>0){\n throw new ValidationException($errors, \"Notification is not valid\");\n }\n }", "public function testInsertUser()\n {\n // Validate the request...\n\n $record = factory(\\App\\User::class)->make();\n\n\n $this->assertTrue($record->save());\n\n }", "public function testInvalidCreateUser(array $invalidUser)\n {\n // Mock UserRepository because it is used by the validation logic.\n // Empty mock would do the trick as well it would just return null on non defined functions.\n // If findUserByEmail returns null, validation thinks the user doesn't exist which has to be the case\n // when creating a new user.\n $this->mock(UserRepository::class)->method('findUserByEmail')->willReturn(null);\n // todo in validation testing do a specific unit test to test the behaviour when email already exists\n\n /** @var UserService $service */\n $service = $this->container->get(UserService::class);\n\n $this->expectException(ValidationException::class);\n\n $service->createUser(new User(new ArrayReader($invalidUser)));\n }", "public function testCreateFailPrivateConstructor() {\n $this->expectException(Exception::class);\n $this->_createCreator()->create(ConstructTest\\PrivateConstruct::class);\n }", "public function create()\n {\n throw new LogicException('Invalid call to \"create\" method. Need to call the \"instance\" method.');\n }", "public function testExcepcionSiSeCreaEmpleadoConDniQueContengaLetras(){\n\t\t\t$this->expectException(\\Exception::class);\n\t\t\t$emp= $this-> crear(null, null, \"4kh123l\");\n\t\t}", "public function Create()\n\t\t{\n\t\t\tthrow new Exception('Create object not supported');\n\t\t}", "public function testIfCreationIsCorrect(){ \n \n $this->assertEquals(-1, $this->status->getStatusId()); \n $this->assertEquals('default_status', $this->status->getStatusName());\n \n }", "public function test_crear_proceso_nombre_codigo_existentes()\n {\n\n Artisan::call('migrate:fresh');\n Artisan::call('db:seed');\n \n $user = factory(User::class)->create();\n $this->actingAs($user);\n\n $proceso1 = factory(Proceso::class)->create(['nombre'=>'Proceso 1','codigo'=>'AAAC']);\n\n $result = $this->post(route('procesos.store'),['nombre'=>'Proceso 1','codigo'=>'AAAC']);\n\n $result->assertSessionHasErrors();\n }", "public function testExcepcionSiSeCreaEmpleadoConApellidoVacio(){\n\t\t\t$this->expectException(\\Exception::class);\n\t\t\t$emp= $this-> crear($nombre=\"Franco\", $Apellido=\"\");\n\t\t}", "public function test_create_user_success()\n {\n if( User::where('email',$this->email)->exists()){\n User::where('email',$this->email)->delete();\n }\n $response = $this->json('POST', '/user_create',\n [\n 'name' => $this->name,\n 'email' => $this->email,\n 'password' => $this->password]);\n $response\n ->assertStatus(200)\n ->assertExactJson([\n $this->all_message => $this->user_create_success,\n ]);\n }", "public function create()\n {\n\n \n }", "public function testErrors() {\n $numberOfErrors = 3;\n $generalError = new Error(\"This is the message\");\n $missingArgumentError = new MissingArgumentError(\"This is the message\", \"Argument Name\", \"Some amazing argument type\");\n $invalidIdentifierError = new InvalidIdentifierError(\"This is the message\", \"This is the given identifier - sweet\");\n\n $response = new Response();\n $response->addError($generalError);\n $response->addError($missingArgumentError);\n $response->addError($invalidIdentifierError);\n $errors = $response->errors();\n\n $this->assertEquals($numberOfErrors, count($errors));\n $this->assertEquals($generalError, $errors[0]);\n $this->assertEquals($missingArgumentError, $errors[1]);\n $this->assertEquals($invalidIdentifierError, $errors[2]);\n }", "public function test_user_created()\n {\n $this->wrongCredentials = false;\n $credentials = self::DEFAULT_CREDENTIALS;\n $user = $this->registerService->registerUser($credentials);\n $this->assertInstanceOf(User::class, $user);\n $this->assertEquals($credentials['email'], $user->email);\n $this->assertEquals($credentials['name'], $user->name);\n\n }", "public function testItCreatesANewUserWithValidData()\n {\n $data = factory(User::class)->make([\n \"tenant_id\" => $this->user->tenant->id,\n \"address\" => [\n \"city\" => \"springfield\",\n \"country\" => \"united states of america\",\n \"state\" => \"missouri\",\n \"street\" => \"1742 evergreen terrace\",\n ]\n ]);\n\n $response = $this->actingAs($this->user)\n ->postJson(\n \"api/v1/users/\",\n $data->only([\n \"address\",\n \"email\",\n \"firstname\",\n \"lastname\",\n \"tenant_id\",\n ])\n )->assertOk();\n \n $user = User::all()->last();\n\n $response\n ->assertJson([\n \"id\" => $user->id,\n \"firstname\" => $user->firstname,\n \"lastname\" => $user->lastname,\n ]);\n }", "public function testCanBeCreated()\n {\n $subject = $this->createInstance();\n\n $this->assertInstanceOf(static::TEST_SUBJECT_CLASSNAME, $subject, 'A valid instance of the test subject could not be created.');\n $this->assertInstanceOf('OutOfRangeException', $subject, 'Subject is not a valid out of range exception.');\n $this->assertInstanceOf('Dhii\\Exception\\OutOfRangeExceptionInterface', $subject, 'Subject does not implement required interface.');\n }", "public\n function create()\n {\n //\n }", "public function test_can_create_user() {\n\n $data = [\n 'name' => $this->faker->name,\n 'position' => $this->faker->randomElement(['Developer', 'FullStack', 'Manager']),\n 'department' => $this->faker->randomElement(['Backend', 'Frontend', 'Accounts', 'HR', 'Design']),\n 'active' => $this->faker->randomElement([1, 0]),\n ];\n\n $this->post(route('user.store'), $data)\n ->assertStatus(201)\n ->assertJson($data, false);\n }", "public function testCreate()\n\t{\n\t\t// Remove the following lines when you implement this test.\n\t\t$this->markTestIncomplete(\n\t\t\t'This test has not been implemented yet.'\n\t\t);\n\t}", "public function testException()\n {\n throw new ThumbNotFoundException;\n }", "public function test_message_can_be_created() {\n\n $this->assertInstanceOf(Message::class, $this->message);\n $this->assertDatabaseHasMessageWithPublicId($this->message->getPublicId());\n\n }", "public function testValidationFail() {\n $nbRecords = $this->Links->find('all')->count();\n //Build bad data with an empty token\n $badData = $this->goodData;\n $badData['title'] = '';\n\n $this->Links->save($this->Links->newEntity($badData));\n //Check no data has been inserted\n $this->assertEquals($nbRecords, $this->Links->find('all')->count(),\n 'Bad data has not been inserted');\n }", "public function testBookCreatedSuccessfully()\n {\n $book = factory(Book::class)->make();\n \n $payload = [\n 'title' => $book->title,\n 'isbn' => $book->isbn,\n 'published_at' => $book->published_at,\n ];\n\n $this->json('post', '/api/books/create', $payload, $this->getHeaders())\n ->assertStatus(200)\n ->assertJsonStructure([\n 'message'\n ]);\n }", "public function testCardCreationFieldsAreRequired()\n {\n $user = factory('App\\User')->create();\n\n $response = $this->actingAs($user, 'api')\n ->withHeader('Accept', 'application/json')\n ->post(route('api.cards.store'), []);\n\n $response->assertJsonValidationErrors(['name', 'currency', 'type']);\n }", "public function test_calledCreateMethod_withValidParameters_argumentsHasBeenSetted()\n {\n $dataContainerMock = $this->getDataConteinerMock();\n\n $sut = DataWrapper::create(\n 200,\n \"Ok\",\n \"copyright\",\n \"attribution text\",\n \"attribution HTML\",\n $dataContainerMock,\n \"etag\"\n );\n\n $this->assertEquals(200, $sut->getCode());\n $this->assertEquals(\"Ok\", $sut->getStatus());\n $this->assertEquals(\"copyright\", $sut->getCopyright());\n $this->assertEquals(\"attribution text\", $sut->getAttributionText());\n $this->assertEquals(\"attribution HTML\", $sut->getAttributionHTML());\n $this->assertEquals(\"etag\", $sut->getEtag());\n }", "public function testErrors() { \n $onFact = new onFact\\Api(ONFACT_TEST_KEY);\n $productgroup = array( // Empty productgroup\n 'Productgroup' => array( \n ) \n ); \n $id = $onFact->Productgroups->add($productgroup); \n $this->assertFalse($id);\n \n $this->assertArrayContainsArray(\n array(\n 'name'=>array('notEmptyCreate')\n ), \n $onFact->Productgroups->getErrors()\n );\n }", "public function testErrorMessage()\n {\n $this->throwErrorException();\n\n // test if code actually gets here\n $this->assertTrue(true);\n }", "public function testCreateExistingDbFails()\n {\n if (! $this->_url) $this->markTestSkipped(\"Test requires a CouchDb server set up - see TestConfiguration.php\");\n \n list($host, $port, $dbname) = $this->_getUrlParts();\n $dbname = trim($dbname, '/');\n \n try {\n $db = Sopha_Db::createDb($dbname, $host, $port);\n $this->fail(\"createDb was expected to fail with a 409 error code\");\n } catch (Sopha_Db_Exception $e) {\n $this->assertEquals(412, $e->getCode(), \"Error code is not 409\");\n }\n }", "public function create()\n {\n abort( 404 );\n }", "function testCreate() {\n # fails due to not verified...\n $this->aRequest['email'] = '[email protected]';\n $this->assertFalse($this->oObject->create());\n\n # but verified users works\n $this->aRequest['email'] = '[email protected]';\n $this->assertTrue($this->oObject->create());\n $this->oObject->destroy(session_id());\n }", "public function test_can_create_city()\n {\n\n\n $data = [\n 'name' => 'Lapáš',\n 'id_state' => factory(State::class)->create()->id,\n ];\n $this->withoutExceptionHandling();\n $this->json('POST', route('cities.store'), $data)\n ->assertStatus(201)\n ->assertJson($data);\n\n\n }", "public function create()\n {\n //\n\n \n }", "public function create()\n {\n //\n }", "public function create()\n {\n //\n }", "public function create()\n {\n //\n }", "public function create()\n {\n //\n }", "public function create()\n {\n //\n }", "public function create()\n {\n //\n }", "public function create()\n {\n //\n }", "public function create()\n {\n //\n }", "public function create()\n {\n //\n }" ]
[ "0.7649306", "0.7294477", "0.7200737", "0.71371174", "0.71354246", "0.7016177", "0.7015628", "0.6975069", "0.6965918", "0.69426477", "0.6902013", "0.6862566", "0.6816115", "0.6748471", "0.6737254", "0.6724987", "0.669673", "0.6691872", "0.66804904", "0.66707915", "0.6661572", "0.66592914", "0.66058254", "0.66015834", "0.65517294", "0.6550047", "0.65485257", "0.6545192", "0.6545192", "0.65344447", "0.65275216", "0.65257597", "0.65204686", "0.6515079", "0.64958024", "0.6479179", "0.6478084", "0.6465299", "0.6459529", "0.6450998", "0.64464134", "0.6426684", "0.6397291", "0.6393475", "0.63927037", "0.6381957", "0.6381066", "0.6368947", "0.63665813", "0.6359934", "0.6345707", "0.6343874", "0.6338023", "0.6335462", "0.6329777", "0.63277906", "0.632667", "0.6324401", "0.6316579", "0.631275", "0.6308617", "0.6307215", "0.62923473", "0.62854064", "0.62811494", "0.62678117", "0.626611", "0.6251847", "0.62421393", "0.6225682", "0.6224859", "0.6221475", "0.622009", "0.6219012", "0.6217477", "0.621707", "0.6213472", "0.6211401", "0.6206067", "0.61992395", "0.61861384", "0.6175387", "0.61751527", "0.61728543", "0.6170459", "0.61676806", "0.6160578", "0.61603004", "0.61595756", "0.61560553", "0.61553437", "0.6154882", "0.6154882", "0.6154882", "0.6154882", "0.6154882", "0.6154882", "0.6154882", "0.6154882", "0.6154882" ]
0.6320508
58
Indexes Duplicates like so: $array["$movie_name ($year)"][$provider]
public function get_collated_movie_list_with_details() { $movies = $this->movies; $error_messages = array(); foreach ($this->movie_providers as $provider_name => $provider) { list($movies[$provider_name], $new_error_messages) = $this->cache_logic_get_movies_list_by_provider_keyed_by_name_and_year($provider_name); $error_messages = array_merge($error_messages, $new_error_messages); } foreach ($movies as $provider_name => $provider_movies) { foreach ($provider_movies as $name_and_year => $movie) { $id = $movie->ID; list($movie, $error_messages) = $this->cache_logic_get_movie_details_by_provider_and_id($provider_name, $id); $name_and_year = $movie->get_display_name(); $movies[$provider_name][$name_and_year] = $movie; } } $all_movies = $this->collate_multiple_provider_movie_lists_by_name_and_year($movies); return $all_movies; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_movies_with_duplicate_name_per_year_get_a_year()\n {\n $search = $this->getimdbsearch();\n $results = $search->search('Home 2015', array(TitleSearch::MOVIE));\n $this->assertIsArray($results);\n\n $found = false;\n foreach ($results as $result) {\n if (\"2224026\" == $result->imdbid()) {\n $this->assertInstanceOf('\\Imdb\\Title', $result);\n $this->assertEquals(\"2224026\", $result->imdbid());\n $this->assertEquals(\"Home\", $result->title());\n $this->assertEquals(2015, $result->year());\n $found = true;\n }\n }\n $this->assertTrue($found, \"Did not find Home(II) 2015 in search results\");\n\n $wrongMovieType = false;\n foreach ($results as $result) {\n if ($result->movietype() !== TitleSearch::MOVIE) {\n $wrongMovieType = true;\n }\n }\n $this->assertFalse($wrongMovieType, \"Should only return \". TitleSearch::MOVIE);\n }", "public function getSpoil($array) {\n $client = new \\AlgoliaSearch\\Client('KMJ42U25W4', '1458f0776b9eb5750afc6566782ce6c9');\n $index = $client->initIndex('movies');\n\n $tweets = DB::table('tweet')->get();\n foreach ($array as $key => $value) {\n\n foreach ($tweets as $key => $value) {\n $query = (object) $index->search($value->movie_title);\n\n $spoil = $query->hits[0][\"spoil\"];\n\n if(is_array($spoil)) {\n $rand = array_rand($spoil, 1);\n $response = $spoil[$rand];\n } else {\n $response = $spoil;\n }\n\n DB::table('tweet')->update(\n ['spoil' => $response]\n );\n }\n\n }\n }", "function SyncNameWithIndex($array)\n{\n\t$final_array = array();\n\n\tif(is_array($array))\n\t{\n\t\tforeach ($array as $key => $value) {\n\t\t\t$final_array[] = $key;\n\t\t}\n\t\treturn $final_array;\n\t}\n\telse{\n\t\treturn false;\n\t}\n}", "private function genSearchIndex()\n\t{\n\t\t/*\n\t\t * The big array we want to fill ;)\n\t\t */\n\t\t$index = array();\n\t\t\n\t\t/*\n\t\t * Buddies Load persons in the index array that connected with the user\n\t\t */\n\t\t\n\t\t$model = loadModel('buddy');\n\t\tif($buddies = $model->listBuddies())\n\t\t{\n\t\t\t$result = array();\n\t\t\tforeach ($buddies as $b)\n\t\t\t{\n\t\t\t\t$img = '/img/avatar-mini.png';\n\t\t\t\t\n\t\t\t\tif(!empty($b['photo']))\n\t\t\t\t{\n\t\t\t\t\t$img = img($b['photo']);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$result[] = array(\n\t\t\t\t\t'name' => $b['name'].' '.$b['nachname'],\n\t\t\t\t\t'teaser' => '',\n\t\t\t\t\t'img' => $img,\n\t\t\t\t\t'click' => 'chat(\\''.$b['id'].'\\');',\n\t\t\t\t\t'id' => $b['id'],\n\t\t\t\t\t'search' => array(\n\t\t\t\t\t\t$b['name'],$b['nachname']\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t\t$index[] = array(\n\t\t\t\t'title' => 'Menschen die Du kennst',\n\t\t\t\t'key' => 'buddies',\n\t\t\t\t'result' => $result\n\t\t\t);\n\t\t}\n\t\t\n\t\t/*\n\t\t * Groups load Groups connected to the user in the array\n\t\t*/\n\t\t$model = loadModel('groups');\n\t\tif($groups = $model->listMyGroups())\n\t\t{\n\t\t\t$result = array();\n\t\t\tforeach ($groups as $b)\n\t\t\t{\n\t\t\t\t$img = '/img/groups.png';\n\t\t\t\tif(!empty($b['photo']))\n\t\t\t\t{\n\t\t\t\t\t$img = 'images/' . str_replace('photo/','photo/thumb_',$b['photo']);\n\t\t\t\t}\n\t\t\t\t$result[] = array(\n\t\t\t\t\t\t'name' => $b['name'],\n\t\t\t\t\t\t'teaser' => tt($b['teaser'],65),\n\t\t\t\t\t\t'img' => $img,\n\t\t\t\t\t\t'href' => '/?page=bezirk&bid='.$b['id'].'&sub=forum',\n\t\t\t\t\t\t'search' => array(\n\t\t\t\t\t\t\t$b['name']\n\t\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t\t$index[] = array(\n\t\t\t\t\t'title' => 'Deine Gruppen',\n\t\t\t\t\t'result' => $result\n\t\t\t);\n\t\t}\n\t\t\n\t\t/*\n\t\t * Betriebe load food stores connected to the user in the array\n\t\t */\n\t\t$model = loadModel('betrieb');\n\t\tif($betriebe = $model->listMyBetriebe())\n\t\t{\n\t\t\t$result = array();\n\t\t\tforeach ($betriebe as $b)\n\t\t\t{\n\t\t\t\t$result[] = array(\n\t\t\t\t\t\t'name' => $b['name'],\n\t\t\t\t\t\t'teaser' => $b['str'].' '.$b['hsnr'].', '.$b['plz'].' '.$b['stadt'],\n\t\t\t\t\t\t'href' => '/?page=fsbetrieb&id='.$b['id'],\n\t\t\t\t\t\t'search' => array(\n\t\t\t\t\t\t\t$b['name'],$b['str']\n\t\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t\t$index[] = array(\n\t\t\t\t\t'title' => 'Deine Betriebe',\n\t\t\t\t\t'result' => $result\n\t\t\t);\n\t\t}\n\t\t\n\t\t/*\n\t\t * Bezirke load Bezirke connected to the user in the array\n\t\t*/\n\t\t$model = loadModel('bezirk');\n\t\tif($bezirke = $model->listMyBezirke())\n\t\t{\n\t\t\t$result = array();\n\t\t\tforeach ($bezirke as $b)\n\t\t\t{\n\t\t\t\t$result[] = array(\n\t\t\t\t\t\t'name' => $b['name'],\n\t\t\t\t\t\t'teaser' => '',\n\t\t\t\t\t\t'img' => false,\n\t\t\t\t\t\t'href' => '/?page=bezirk&bid='.$b['id'].'&sub=forum',\n\t\t\t\t\t\t'search' => array(\n\t\t\t\t\t\t\t\t$b['name']\n\t\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t\t$index[] = array(\n\t\t\t\t\t'title' => 'Deine Bezirke',\n\t\t\t\t\t'result' => $result\n\t\t\t);\n\t\t}\n\t\t\n\t\t/*\n\t\t * Get or set an individual token as filename for the public json file\n\t\t*/\n\t\tif($token = S::user('token'))\n\t\t{\n Storage::disk('searchindex')->put($token . '.json', json_encode($index));\n\t\t\treturn $token;\n\t\t}\n\t\t\n\t\t\n\t\treturn false;\n\t}", "function paperIndex($order = 'title')\n{\n $result = mysql_query(\"select code, paper_title title \n from paper \n order by \".$order);\n /* Iteration to get all info about paper */\n for ($i=0; $row = mysql_fetch_array($result);$i++){\n /* Iteration to get all paper's author(s) */\n $temporal = mysql_query(\"select a.author_name name, a.author_lastname lastname, \n a.author_webpage webpage \n from author a, authoring at \n where at.code_author = a.code and at.code_paper = \".$row['code'].\"\n order by at.author_order\");\n\n for ($j=0; $tmp_row = mysql_fetch_array($temporal); $j++){\n $author[$j] = array('name' => $tmp_row['name'], \n\t\t\t 'lastname' => $tmp_row['lastname'], \t\t\t\n\t\t\t 'webpage' => $tmp_row['webpage']);\n }\n /*Iteration to get all paper's tutor(s) */\n $temporal = mysql_query(\"select t.tutor_name name, t.tutor_lastname lastname, \n t.tutor_webpage webpage \n from tutor t, tutoring tu \n where tu.code_tutor = t.code and tu.code_paper = \".$row['code']);\n for ($j=0; $tmp_row = mysql_fetch_array($temporal); $j++){\n $tutor[$j] = array('name' => $tmp_row['name'], \n\t\t\t 'lastname' => $tmp_row['lastname'], \t\t\t\n\t\t\t 'webpage' => $tmp_row['webpage']);\n\n\n }\n\n /* Here we put together all the information */\n $paper[$i] = array(\t'code' => $row['code'],\n\t\t\t'title' => $row['title'],\n\t\t\t'author' => $author,\n\t\t\t'tutor' => $tutor);\n unset($tutor);\n unset($author);\n }\t\n return $paper;\n}", "public static function array_duplicate_values ($array)\r\n\t{\r\n\t\t$checkKeysUniqueComparison = create_function ('$value', 'if ($value > 1) return true;');\r\n\t\t$result = array_keys (array_filter (array_count_values ($array), $checkKeysUniqueComparison));\r\n\t\treturn $result;\r\n\t}", "public function memcache_get_movies_list_by_provider_keyed_by_id($provider_name) {\n $found = false;\n $error_messages = array();\n $searchkeyvalues = array(\"provider\" => $provider_name, \"movies\" => \"movies\",\n \"keyed_by\" => \"id\");\n // Try memcached first, \n if ($this->verbose == true) {\n echo \"<br/>Trying memcached for movies list \" . $provider_name;\n }\n\n list($found, $movies_keyed_by_id, $error_message) = $this->memcache_store->get_search($searchkeyvalues);\n\n\n $error_messages[] = $error_message;\n\n if ($found == true) {\n if ($this->verbose == true) {\n echo \"<br/>Found movies list in memcached\";\n }\n }\n\n if ($found == false) {\n if ($this->verbose == true) {\n echo \"<br/>Didn't find movies list in memcached \";\n }\n list($movies_keyed_by_id, $new_error_messages) = $this->curl_get_movies_list_by_provider_keyed_by_id_retry($provider_name);\n\n $error_messages = array_merge($error_messages, $new_error_messages);\n\n if ($movies_keyed_by_id != array()) {\n if ($this->verbose == true) {\n echo \"<br/>Storing movies list in memcached \";\n }\n\n $this->memcache_store->store_search($searchkeyvalues, $movies_keyed_by_id, $this->memcache_expiry);\n }\n }\n\n return array($movies_keyed_by_id, $error_messages);\n }", "public static function unique_array($arr) {\n\t\t$common = null;\n\n\t\tsort($arr);\n \treset($arr);\n \t$newarr = array ();\n \t$i = 0;\n \t$counter = 1;\n\n $element = current($arr);\n\n if (Config::getInstance() -> INDEX_NUMBERS == false) {\n $pattern = \"/[0-9]+/\";\n } else {\n $pattern = \"/[ ]+/\";\n }\n\n $regs = Array ();\n for ($n = 0; $n < sizeof($arr); $n ++) {\n //check if word is long enough, does not contain characters as defined in $pattern and is not a common word\n //to eliminate/count multiple instance of words\n $next_in_arr = next($arr);\n\n if (strlen($next_in_arr) >= Config::getInstance() -> MIN_WORD_LENGTH || !$next_in_arr) {\n\n if (Config::getInstance() -> CASE_SENSITIVE == true) { // compare words by means of upper and lower case characters (e.g. for Chinese language)\n if ($next_in_arr != $element) {\n if (strlen($element) >= Config::getInstance() -> MIN_WORD_LENGTH && !preg_match($pattern, $element) && ($common[$element] != 1)) {\n if (preg_match(\"/^(-|\\\\\\')(.*)/\", $element, $regs))\n $element = $regs[2];\n\n if (preg_match(\"/(.*)(\\\\\\'|-)$/\", $element, $regs))\n $element = $regs[1];\n \t\t\t\t\t\t\t$newarr[$i] = new \\BrightSearch\\Keyword($element, $counter);\n $element = current($arr);\n $i ++;\n $counter = 1;\n } else {\n $element = $next_in_arr;\n $counter = 1; // otherwise the count will be the amount of skipped words\n }\n } else {\n if ($counter < Config::getInstance() -> WORD_UPPER_BOUND)\n $counter ++;\n }\n\n } else { // compare all words only using lower case characters\n\n if ($next_in_arr != $element) {\n if (strlen($element) >= Config::getInstance() -> MIN_WORD_LENGTH && !preg_match($pattern, $element) && ($common[strtolower($element)] != 1)) {\n if (preg_match(\"/^(-|\\\\\\')(.*)/\", $element, $regs))\n $element = $regs[2];\n\n if (preg_match(\"/(.*)(\\\\\\'|-)$/\", $element, $regs))\n $element = $regs[1];\n\n \t\t\t\t\t\t\t$newarr[$i] = new \\BrightSearch\\Keyword($element, $counter);\n $element = current($arr);\n $i ++;\n $counter = 1;\n } else {\n $element = $next_in_arr;\n $counter = 1; // otherwise the count will be the amount of skipped words\n }\n } else {\n if ($counter < Config::getInstance() -> WORD_UPPER_BOUND)\n $counter ++;\n }\n }\n }\n }\n\n \treturn $newarr;\n }", "public function run()\n {\n //\n $movies = [\n ['mov_id'=>901,'mov_title'=>'Vertigo','mov_year'=>1958,'mov_time'=>128,'mov_lang'=>'English','mov_dt_rel'=>'1958-08-24','mov_rel_country'=>'UK'],\n ['mov_id'=>902,'mov_title'=>'The Innocents','mov_year'=>1961,'mov_time'=>100,'mov_lang'=>'English','mov_dt_rel'=>'1962-02-19','mov_rel_country'=>'SW'],\n ['mov_id'=>903,'mov_title'=>'Lawrence of Arabia','mov_year'=>1962,'mov_time'=>216,'mov_lang'=>'English','mov_dt_rel'=>'1962-12-11','mov_rel_country'=>'UK'],\n ['mov_id'=>904,'mov_title'=>'The Deer Hunter','mov_year'=>1978,'mov_time'=>183,'mov_lang'=>'English','mov_dt_rel'=>'1979-03-08','mov_rel_country'=>'UK'],\n ['mov_id'=>905,'mov_title'=>'Amadeus','mov_year'=>1984,'mov_time'=>160,'mov_lang'=>'English','mov_dt_rel'=>'1985-01-07','mov_rel_country'=>'UK'],\n ['mov_id'=>906,'mov_title'=>'Blade Runner','mov_year'=>1982,'mov_time'=>117,'mov_lang'=>'English','mov_dt_rel'=>'1982-09-09','mov_rel_country'=>'UK'],\n ['mov_id'=>907,'mov_title'=>'Eyes Wide Shut','mov_year'=>1999,'mov_time'=>159,'mov_lang'=>'English','mov_dt_rel'=>null,'mov_rel_country'=>'UK'],\n ['mov_id'=>908,'mov_title'=>'The Usual Suspects','mov_year'=>1995,'mov_time'=>106,'mov_lang'=>'English','mov_dt_rel'=>'1995-08-25','mov_rel_country'=>'UK'],\n ['mov_id'=>909,'mov_title'=>'Chinatown','mov_year'=>1974,'mov_time'=>130,'mov_lang'=>'English','mov_dt_rel'=>'1974-08-09','mov_rel_country'=>'UK'],\n ['mov_id'=>910,'mov_title'=>'Boogie Nights','mov_year'=>1997,'mov_time'=>155,'mov_lang'=>'English','mov_dt_rel'=>'1998-02-16','mov_rel_country'=>'UK'],\n ['mov_id'=>911,'mov_title'=>'Annie Hall','mov_year'=>1977,'mov_time'=>93,'mov_lang'=>'English','mov_dt_rel'=>'1977-04-20','mov_rel_country'=>'USA'],\n ['mov_id'=>912,'mov_title'=>'Princess Mononoke','mov_year'=>1997,'mov_time'=>134,'mov_lang'=>'Japanese','mov_dt_rel'=>'2001-10-19','mov_rel_country'=>'UK'],\n ['mov_id'=>913,'mov_title'=>'The Shawshank Redemption','mov_year'=>1994,'mov_time'=>142,'mov_lang'=>'English','mov_dt_rel'=>'1995-02-17','mov_rel_country'=>'UK'],\n ['mov_id'=>914,'mov_title'=>'American Beauty','mov_year'=>1999,'mov_time'=>122,'mov_lang'=>'English','mov_dt_rel'=>null,'mov_rel_country'=>'UK'],\n ['mov_id'=>915,'mov_title'=>'Titanic','mov_year'=>1997,'mov_time'=>194,'mov_lang'=>'English','mov_dt_rel'=>'1998-01-23','mov_rel_country'=>'UK'],\n ['mov_id'=>916,'mov_title'=>'Good Will Hunting','mov_year'=>1997,'mov_time'=>126,'mov_lang'=>'English','mov_dt_rel'=>'1998-06-03','mov_rel_country'=>'UK'],\n ['mov_id'=>917,'mov_title'=>'Deliverance','mov_year'=>1972,'mov_time'=>109,'mov_lang'=>'English','mov_dt_rel'=>'1982-10-05','mov_rel_country'=>'UK'],\n ['mov_id'=>918,'mov_title'=>'Trainspotting','mov_year'=>1996,'mov_time'=>94,'mov_lang'=>'English','mov_dt_rel'=>'1996-02-23','mov_rel_country'=>'UK'],\n ['mov_id'=>919,'mov_title'=>'The Prestige','mov_year'=>2006,'mov_time'=>130,'mov_lang'=>'English','mov_dt_rel'=>'2006-11-10','mov_rel_country'=>'UK'],\n ['mov_id'=>920,'mov_title'=>'Donnie Darko','mov_year'=>2001,'mov_time'=>113,'mov_lang'=>'English','mov_dt_rel'=>null,'mov_rel_country'=>'UK'],\n ['mov_id'=>921,'mov_title'=>'Slumdog Millionaire','mov_year'=>2008,'mov_time'=>120,'mov_lang'=>'English','mov_dt_rel'=>'2009-01-09','mov_rel_country'=>'UK'],\n ['mov_id'=>922,'mov_title'=>'Aliens','mov_year'=>1986,'mov_time'=>137,'mov_lang'=>'English','mov_dt_rel'=>'1986-08-29','mov_rel_country'=>'UK'],\n ['mov_id'=>923,'mov_title'=>'Beyond the Sea','mov_year'=>2004,'mov_time'=>118,'mov_lang'=>'English','mov_dt_rel'=>'2004-11-26','mov_rel_country'=>'UK'],\n ['mov_id'=>924,'mov_title'=>'Avatar','mov_year'=>2009,'mov_time'=>162,'mov_lang'=>'English','mov_dt_rel'=>'2009-12-17','mov_rel_country'=>'UK'],\n ['mov_id'=>926,'mov_title'=>'Seven Samurai','mov_year'=>1954,'mov_time'=>207,'mov_lang'=>'Japanese','mov_dt_rel'=>'1954-04-26','mov_rel_country'=>'JP'],\n ['mov_id'=>927,'mov_title'=>'Spirited Away','mov_year'=>2001,'mov_time'=>125,'mov_lang'=>'Japanese','mov_dt_rel'=>'2003-09-12','mov_rel_country'=>'UK'],\n ['mov_id'=>928,'mov_title'=>'Back to the Future','mov_year'=>1985,'mov_time'=>116,'mov_lang'=>'English','mov_dt_rel'=>'1985-12-04','mov_rel_country'=>'UK'],\n ['mov_id'=>925,'mov_title'=>'Braveheart','mov_year'=>1995,'mov_time'=>178,'mov_lang'=>'English','mov_dt_rel'=>'1995-09-08','mov_rel_country'=>'UK'],\n ];\n\n DB::table('movie')->insert($movies);\n\n }", "function movieArray(){\n $movieObject = [\n 'ACT' => [\n 'title' => \"The Girl in the Spiders Web\",\n 'rating' => \"MA15+\",\n 'description' => \"Lisbeth Salander, the cult figure and title character of the acclaimed Millennium book series created by Stieg Larsson, will return to the screen in The Girl in the Spider’s Web, a first-time adaptation of the recent global bestseller. Golden Globe winner Claire Foy, the star of “The Crown,” will play the outcast vigilante defender under the direction of Fede Alvarez, the director of 2016’s breakout thriller Don’t Breathe; the screenplay adaptation is by Steven Knight and Fede Alvarez & Jay Basu.\",\n 'poster' => \"girl_in_the_spiders_web.png\",\n 'trailer' => \"https://www.youtube.com/embed/XKMSP9OKspQ?controls=0\",\n 'sessions' => [\n 'wednesday' => '9PM',\n 'thursday' => '9PM',\n 'friday' => '9PM',\n 'saturday' => '6PM',\n 'sunday' => '6PM'\n ]\n ],\n 'RMC' => [\n 'title' => \"A Star Is Born\",\n 'rating' => \"M\",\n 'description' => \"In this new take on the tragic love story, he plays seasoned musician Jackson Maine, who discovers—and falls in love with—struggling artist Ally (Gaga). She has just about given up on her dream to make it big as a singer... until Jack coaxes her into the spotlight. But even as Ally’s career takes off, the personal side of their relationship is breaking down, as Jack fights an ongoing battle with his own internal demons.\",\n 'poster' => \"a_star_is_born.png\",\n 'trailer' => \"https://www.youtube.com/embed/nSbzyEJ8X9E?controls=0\",\n 'sessions' => [\n 'monday' => '6PM',\n 'tuesday' => '6PM',\n 'saturday' => '3PM',\n 'sunday' => '3PM'\n ]\n ],\n 'ANM' => [\n 'title' => \"Ralph Breaks the Internet\",\n 'rating' => \"PG\",\n 'description' => \"Ralph Breaks the Internet: Wreck-It Ralph 2” leaves Litwak’s video arcade behind, venturing into the uncharted, expansive and thrilling world of the internet—which may or may not survive Ralph’s wrecking. Video game bad guy Ralph (voice of John C. Reilly) and fellow misfit Vanellope von Schweetz (voice of Sarah Silverman) must risk it all by traveling to the world wide web in search of a replacement part to save Vanellope’s video game, Sugar Rush.\",\n 'poster' => \"ralph_breaks_the_internet.png\",\n 'trailer' => \"https://www.youtube.com/embed/_BcYBFC6zfY?controls=0\",\n 'sessions' => [\n 'monday' => '12PM',\n 'tuesday' => '12PM',\n 'wednesday' => '6PM',\n 'thursday' => '6PM',\n 'friday' => '6PM',\n 'saturday' => '12PM',\n 'sunday' => '12PM'\n ]\n ],\n 'AHF' => [\n 'title' => \"Boy Erased\",\n 'rating' => \"MA15+\",\n 'description' => \" “Boy Erased” tells the story of Jared (Hedges), the son of a Baptist pastor in a small American town, who is outed to his parents (Kidman and Crowe) at age 19. Jared is faced with an ultimatum: attend a conversion therapy program – or be permanently exiled and shunned by his family, friends, and faith. Boy Erased is the true story of one young man’s struggle to find himself while being forced to question every aspect of his identity.\",\n 'poster' => \"boy_erased.png\",\n 'trailer' => \"https://www.youtube.com/embed/-B71eyB_Onw?controls=0\",\n 'sessions' => [\n 'wednesday' => '12PM',\n 'thursday' => '12PM',\n 'friday' => '12PM',\n 'saturday' => '9PM',\n 'sunday' => '9PM'\n ]\n ]\n ];\n return $movieObject;\n}", "function authorIndex()\n{\n $result = mysql_query(\"select code, author_lastname lastname, author_name name \n from author \n order by author_lastname\");\n for ($i=0; $row = mysql_fetch_array($result);$i++){\n $author[$i] = array('code' => $row['code'],\n\t\t\t'name' => $row['name'], \n\t\t\t'lastname'=> $row['lastname']);\n }\t\n return $author;\n}", "private function makeTableNamesArray($array){\n\n \t\t$tableNames;\n \t \t$count = 0;\n\n \t\n\t \tforeach($array as $row){\n\t $searchElement = $row['table_name'];\n\t if($count !=0 && $searchElement != $tableNames[$count-1] ){\n\t $tableNames[$count]=$searchElement;\n\t $count++;\n\t }\n\t else if ($count == 0){\n\t $tableNames[0] = $array[0]['table_name'];\n\t $count++;\n\t }\n\n\t }\n\n \treturn $tableNames;\n \t}", "function is_index_array($array, $index)\n{\n\tif( is_array($array) )\n\t{\n\t\tforeach($array as $key => $value)\n\t\t{\n\t\t\tif(isset($value[$index]))\n\t\t\t{\n\t\t\t\t$new_array[$value[$index]] = $value;\n\t\t\t}\n\t\t}\n\t\treturn $new_array;\n\t}\n}", "public function searchByName($name){\n $projections=$this->getAllProjectionsGroup();\n $arrayFinded = array();\n foreach ($projections as $value) {\n $movie=$value->getMovie();\n if (stripos($movie->getTitle(),$name)!==false)\n {\n array_push($arrayFinded,$value);\n }\n }\n return $arrayFinded; \n }", "function match_venues_to_used_meta($venue_array){\n\tglobal $wpdb;\n\t//build query array\n\tforeach($venue_array as $id => $title){\n\t\t$query[$id] = \"SELECT post_id FROM $wpdb->postmeta WHERE meta_value='$id'\";\n\t}\n\t//run queries\n\tforeach ($query as $id => $query){\n\t\t$post_ID_query[$id]= $wpdb->get_results($query);\n\t}\n\t//find lengths of arrays(to establish if they have been used in posts)\n\tforeach ($post_ID_query as $id=>$count){\n\t\t$counted[$id]=count($count);\n\t}\n\t//remove all elements that equal 0, and place key's as value\n\tforeach ($counted as $id=>$count){\n\t\tif($count>0){\n\t\t\t$used_venue[]=$id;\n\t\t};\n\t}\n\t//get final $id=>$title array of used venues\n\tforeach ($venue_array as $id=>$title){\n\t\tif(in_array($id,$used_venue)){\n\t\t\t$final_used_venue_list[$id]=$title;\n\t\t}\n\t}\n\t\n\treturn $final_used_venue_list;\n}", "function indexBy ($field)\n {\n $this->A = array_indexBy ($this->A, $field);\n return $this;\n }", "public static function findDuplicateEntries($rowData)\n {\n // For all modes, limit to the same department owner_acronym\n\n $totalDuplicates = 0;\n\n // mode 1: same contract_value, same gen_vendor_normalized, same raw_contract_date\n $duplicateRows = DB::table('l_contracts')\n ->where('owner_acronym', '=', $rowData['owner_acronym'])\n ->where('gen_is_duplicate', '=', 0)\n ->where('gen_is_error', '=', 0)\n ->where('contract_value', '=', $rowData['contract_value'])\n ->where('gen_vendor_normalized', '=', $rowData['gen_vendor_normalized'])\n ->where('raw_contract_date', '=', $rowData['raw_contract_date'])\n ->whereNotNull('source_fiscal')\n ->orderBy('source_fiscal', 'asc')\n ->orderBy('id', 'asc')\n ->pluck('id');\n\n if ($duplicateRows->count() > 1) {\n // Then, there's duplicates based on this method.\n $totalDuplicates += self::markDuplicateEntries($rowData['owner_acronym'], $duplicateRows, 1);\n }\n\n\n // mode 2: same contract_value, same gen_vendor_normalized, same reference_number, same gen_start_year\n // (in case the raw contract dates are formatted inconsistently or missing)\n $duplicateRows = DB::table('l_contracts')\n ->where('owner_acronym', '=', $rowData['owner_acronym'])\n ->where('gen_is_duplicate', '=', 0)\n ->where('gen_is_error', '=', 0)\n ->where('contract_value', '=', $rowData['contract_value'])\n ->where('gen_vendor_normalized', '=', $rowData['gen_vendor_normalized'])\n ->where('reference_number', '=', $rowData['reference_number'])\n ->where('gen_start_year', '=', $rowData['gen_start_year'])\n ->whereNotNull('source_fiscal')\n ->orderBy('source_fiscal', 'asc')\n ->orderBy('id', 'asc')\n ->pluck('id');\n\n if ($duplicateRows->count() > 1) {\n // Then, there's duplicates based on this method.\n $totalDuplicates += self::markDuplicateEntries($rowData['owner_acronym'], $duplicateRows, 2);\n }\n\n // mode 3: same gen_vendor_normalized and same reference_number\n // (in case both the raw contract dates and the vendor names are input inconsistently)\n $duplicateRows = DB::table('l_contracts')\n ->where('owner_acronym', '=', $rowData['owner_acronym'])\n ->where('gen_is_duplicate', '=', 0)\n ->where('gen_is_error', '=', 0)\n ->where('contract_value', '=', $rowData['contract_value'])\n ->where('reference_number', '=', $rowData['reference_number'])\n ->whereNotNull('source_fiscal')\n ->orderBy('source_fiscal', 'asc')\n ->orderBy('id', 'asc')\n ->pluck('id');\n\n if ($duplicateRows->count() > 1) {\n // Then, there's duplicates based on this method.\n $totalDuplicates += self::markDuplicateEntries($rowData['owner_acronym'], $duplicateRows, 3);\n }\n\n return $totalDuplicates;\n }", "function quiz_report_index_by_keys($datum, $keys, $keysunique=true){\n if (!$datum){\n return $datum;\n }\n $key = array_shift($keys);\n $datumkeyed = array();\n foreach ($datum as $data){\n if ($keys || !$keysunique){\n $datumkeyed[$data->{$key}][]= $data;\n } else {\n $datumkeyed[$data->{$key}]= $data;\n }\n }\n if ($keys){\n foreach ($datumkeyed as $datakey => $datakeyed){\n $datumkeyed[$datakey] = quiz_report_index_by_keys($datakeyed, $keys, $keysunique);\n }\n }\n return $datumkeyed;\n}", "function test_getArrayByName() {\r\n\t\t$rowset = array(array(\"memberClassId\" => 1, \"memberClassName\" => \"reader\"),\r\n\t\t\t\tarray(\"memberClassId\" => 2, \"memberClassName\" => \"nosher\"));\r\n\t\t$myArray = MemberClassesDB::getArray($rowset, \"memberClassName\", \"memberClassId\");\r\n\t\t$this->assertEqual($myArray['reader'], 1, \r\n\t\t \"Should return 1 for key of reader but returned \".$myArray['reader']);\r\n\t\t$this->assertEqual($myArray['nosher'], 2,\r\n\t\t\t\t\"Should return 2 for key of nosher but returned \".$myArray['nosher']);\r\n\t}", "function ldap_key_by ($i_array, $key) {\n\t$result = array();\n\tforeach ($i_array as $record) {\n\t\tif (!isset($record[$key]))\n\t\t\tcontinue;\n\t\t$result[$record[$key]] = $record;\n\t}\nreturn($result);\n}", "private function searchableNames()\n {\n $pests = Pest::all();\n\n $searchableNames = new SearchableName();\n\n foreach(range(1,300) as $index)\n {\n SearchableName::create([\n\n 'searchable_type' => 'App\\Models\\Pest',\n\n 'name' => $this->faker->word . ' ' . $this->faker->colorName\n ]);\n }\n\n $searchableNamesIds = $searchableNames->pests()->lists('id')->toArray();\n\n foreach(range(1,400) as $index) {\n\n $pests[rand(1, 199)]->searchableNames()->attach($this->faker->randomElement($searchableNamesIds));\n }\n }", "public function arrayMergeKeepsIndexesAfterMerge() {}", "function Pluf_Model_RemoveDuplicates($array)\n{\n $res = array();\n foreach ($array as $model) {\n if (!Pluf_Model_InArray($model, $res)) {\n $res[] = $model;\n }\n }\n return $res;\n}", "function add_artist(&$artists, $new_artists) {\n foreach($new_artists as $new_artist_name => $new_artist_data) {\n if (!array_key_exists($new_artist_name, $artists)) {\n $artists[$new_artist_name] = $new_artist_data;\n }\n }\n}", "public function buildIndex();", "function eventcard_array($array, $pmv, $eventid, $__repeatInterval){\n\t\t\t\t$array['evorsvp']= array(\n\t\t\t\t\t'event_id' => $eventid,\n\t\t\t\t\t'value'=>'tt',\n\t\t\t\t\t'__repeatInterval'=>(!empty($__repeatInterval)? $__repeatInterval:0)\n\t\t\t\t);\n\t\t\t\treturn $array;\n\t\t\t}", "function filtrar(&$array, $clave_orden ) {\n $array_filtrado = array(); \n foreach($array as $index=>$array_value) {\n $value = $array_value[$clave_orden];\n unset($array_value[$clave_orden]);\n\t$array_filtrado[$value][] = $array_value;\n }\n $array = $array_filtrado; \n}", "function index_array($array, $index, $multi = FALSE)\n{\n\tif( is_array($array) )\n\t{\n\t\t// if multikey = TRUE\n\t\tif($multi == TRUE)\n\t\t{\n\t\t\t// loop through array\n\t\t\tforeach($array as $key => $value)\n\t\t\t{\n\t\t\t\tif(isset($value[$index]))\n\t\t\t\t{\n\t\t\t\t\t$new_array[$value[$index]][$key] = $value;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$new_array['noindex'][$key] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// if unique keys expected\n\t\telse\n\t\t{\n\t\t\t// loop through array\n\t\t\tforeach($array as $key => $value)\n\t\t\t{\n\t\t\t\tif(isset($value[$index]))\n\t\t\t\t{\n\t\t\t\t\t$new_array[$value[$index]] = $value;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$new_array['noindex'][$key] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// check if array exists\n\t\tif( isset($new_array) && is_array($new_array) )\n\t\t{\n\t\t\treturn $new_array;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// if array does not exists return empty array\n\t\t\treturn array(null);\n\t\t}\n\t}\n}", "public function findIfSamePPAdded($criteria, $dataarray){\n\t\t$index = array();\n\t\tif(!empty($dataarray)){\n\t\t\tforeach($dataarray as $key => $value){\n\t\t\t\t//echo \"<br/>\".$criteria['client_id'].\" = \".$value['client_id'].\" & \".$criteria['client_case_id'].\" = \".$value['client_case_id'].\" & \".$criteria['team_loc'] .\" == \". $value['team_loc'].\" && \".$criteria['pricing_id'].\" == \".$value['pricing_id'].\" && \".$criteria['unit_price_id'].\" == \".$value['unit_price_id'].\" && \".$criteria['final_rate'].\" == \".$value['final_rate'];\n\t\t\t\tif($criteria['client_id'] == $value['client_id'] && $criteria['client_case_id'] == $value['client_case_id'] && $criteria['team_loc'] == $value['team_loc'] && $criteria['pricing_id'] == $value['pricing_id'] && $criteria['unit_price_id'] == $value['unit_price_id'] && $criteria['final_rate'] == $value['final_rate']){\n\t\t\t\t\t$index['key'] = $key;\n\t\t\t\t\t$index['quantity'] = $value['quantity'];\n\t\t\t\t\t$index['pricing_id'] = $value['pricing_id'];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $index;\n\t}", "function findIt(array $seq){\n//make an associative array for each entry but..\n//if the key exists, then increase the count of that array by one\n\n//for each thing, see if a key exists\n//if it does then add to it,\n//else make a new key\n $keyArray = Array();\n\n for($i=0; $i<count($seq); $i++){\n \n if(array_key_exists($seq[$i], $keyArray)){\n $keyArray[$seq[$i]] += 1;\n }\n else{\n $keyArray[$seq[$i]] = 1;\n }\n }\n\n// return $keyArray;\n\n foreach($keyArray as $entry => $value){\n\n if($value % 2 != 0){\n return $entry;\n\n }\n }\n\n}", "public function providerMatches()\n {\n return array(\n array('[DBNL] One Piece - 179 - A Raid! The Tin Tyrant and Tin Plate Wapol! [x264][D1F15206].mkv', 1, 179,'format8'),\n array('12 Oz. Mouse - S2E01 - Bowtime.avi', 2, 1, 'format1'),\n array('fdsgdfgdfgdf s01E3', 1, 3,'format1'),\n array('s1e01 - Hired.avi', 1, 1, 'format1'),\n array('24 - 5x01 (HR.HDTV).avi', 5, 1,'format2'),\n array('24 s01e01 - 0000-0100 PAL DVD.mkv', 1, 1, 'format1'),\n array('24 S07E23 720p BluRay DTS x264-CtrlHD.mkv', 7, 23,'format1'),\n array('24.618.hr.hdtv.xvid-tvff.avi', 6, 18,'format5'),\n array('30 Rock S01E01 720p WEB-DL DD5.1 AVC-CtrlHD.mkv', 1, 01,'format1'),\n array('30 Rock S04E01 Season Four 720p WEB-DL H.264 DD5.1.mkv', 4, 1,'format1'),\n array('3rd Rock from the Sun - 1x01 - Brains and Eggs.avi', 1, 1,'format2'),\n array('at.s03e01.tvrip-miragetv.avi', 3,1,'format1'),\n array('Im Alan Partridge - S01E01 - A Room With An Alan [dd].avi', 1, 1,'format1'),\n array('american.dad.316.pdtv-0tv.avi', 3, 16,'format5'),\n array('American Dad! - 1x01 - Pilot (pdtv).avi', 1, 1,'format2'),\n array('astroboy.1980s.02.the.birth.of.astro.boy-dvdrip.xvid.avi', 1, 2,'format6'),\n array('Bakemonogatari_Ep02_[1080p,BluRay,x264]_-_qIIq-THORA.mkv', 1, 2,'format4'),\n array('[DBNL] One Piece - 079 - A Raid! The Tin Tyrant and Tin Plate Wapol! [x264][D1F15206].mkv', 1, 79,'format8'),\n array('[DBNL] One Piece - 179 - A Raid! The Tin Tyrant and Tin Plate Wapol! [x264][D1F15206].mkv', 1, 179,'format8'),\n array('One Piece - 001 - I m Luffy! The Man Whos Gonna Be King of the Pirates! [x264][857DCFD6].mkv',1,1,'format8'),\n array('S02E03.mkv',2,3,'format1'),\n array('08 - A Pinky And The Brain Christmas.mpg',1,8,'format10'),\n array('Planetes.07.PSNR.mkv',1,7,'format6'),\n array('BUFFY THE VAMPIRE SLAYER - S01 E01 - WELCOME TO THE HELLMOUTH NTSC DVD DD2.0 x264 MMI.mkv',1,1,'format1'),\n array('408 - Manners.avi',4,8,'format5'),\n array('Carlos.2010.E03.720p.BluRay.x264-CiNEFiLE.mkv',1,3,'format4'),\n array('Episode 718 Whats Up Doc.avi',7,18,'format5'),\n array('Clannad_Ep05_[1080p,BluRay,x264]_-_THORA.mkv',1,5,'format4'),\n array('Code_Geass_R2_Picture_Drama_S00E13_0.923_[1080p,BluRay,x264]_-_THORA.mkv',0,13,'format1'),\n array('Shin Chan - Episode 06.avi',1,6,'format7'),\n array('2e06-Belief.mkv',2,6,'format1'),\n array('[moo-shi]_Desert_Punk_-_01[DVD][H264.AAC][17FC7F0C].mkv',1,1,'format8'),\n array('Dragons Den S07E01 - 2009-07-15 - 720p-h264-ac3-subs.mkv',7,1,'format1'),\n array('DragonsDen-2007ChristmasSpecial-S05E10.avi',5,10,'format1'),\n array('Dragons\\' Den - s6e1.avi',6,1,'format1'),\n array('EFC 0107 - Resurrection.avi',1,7,'format9'),\n array('Elfen Lied - 01 - A Chance Encounter.mkv',1,1,'format6'),\n array('E05.720p.BluRay.x264-fty.mkv',1,5,'format4'),\n array('Episode 7 - Bolognese sauce.jpg',1,7,'format7'),\n array('xpatriots.24.0815.720p.hdtv.x264-dimension.mkv',8,15,'format9'),\n array('king.of.the.hill.1306.pdtv-lol.avi',13,6,'format9'),\n array('TG1302.mkv',13,2,'format9'),\n array('EFC 0104 - Avatar.avi',1,4,'format9'),\n array('south.park.1202.dsr-0tv.avi',12,2,'format9'),\n array('Hellsing 04v2 [anime fin][6BD62B96].ogm',1,4,'format11'),\n array('Extras.2005.PAL.DVD.S02EE02.AC3.x264-sJR.mkv',2,2,'format14'),\n array('(W_B) SDF Macross 31(x264)(6BD62B96).mkv',1,31,'format12'),\n array('Star Trek Deep Space Nine s02extra03 - Sketchbook NTSC DVD x264 DD2.0-JCH.mkv',2,3,'format13'),\n );\n }", "function courseIndex()\n{\n $result = mysql_query('select c.course_name course, p.code code,\n p.paper_title title\n from paper p, course c\n where p.paper_course = c.code\n order by c.course_name, p.paper_title');\n \n /* Iteration to get all info about the paper */\n for ($i=0; $row = mysql_fetch_array($result);$i++){\n /* Iteration to get all paper's author(s) */\n $temporal = mysql_query(\"select a.author_name name, a.author_lastname lastname, \n a.author_webpage webpage \n from author a, authoring at \n where at.code_author = a.code and at.code_paper = \".$row['code'].\"\n order by at.author_order\");\n\n for ($j=0; $tmp_row = mysql_fetch_array($temporal); $j++){\n $author[$j] = array('name' => $tmp_row['name'], \n\t\t\t 'lastname' => $tmp_row['lastname'], \t\t\t\n\t\t\t 'webpage' => $tmp_row['webpage']);\n }\n /*Iteration to get all paper's tutor(s) */\n $temporal = mysql_query(\"select t.tutor_name name, t.tutor_lastname lastname, \n t.tutor_webpage webpage \n from tutor t, tutoring tu \n where tu.code_tutor = t.code and tu.code_paper = \".$row['code']);\n for ($j=0; $tmp_row = mysql_fetch_array($temporal); $j++){\n $tutor[$j] = array('name' => $tmp_row['name'], \n\t\t\t 'lastname' => $tmp_row['lastname'], \t\t\t\n\t\t\t 'webpage' => $tmp_row['webpage']);\n\n\n }\n\n /* Here we put together all the information */\n $paper[$i] = array(\t'code' => $row['code'],\n\t\t\t'title' => $row['title'],\n\t\t\t'course' => $row['course'],\n\t\t\t'author' => $author,\n\t\t\t'tutor' => $tutor);\n unset($tutor);\n unset($author);\n }\t\n return $paper;\n}", "function searchByInfo($array){\n\t\t$sql = \"SELECT * FROM Client WHERE\";\n\t\t$keys = array_keys($array);\n\t\tfor ($i = 0; $i< count($keys); $i++){\n\t\t\tif ($i==0){\n\t\t\t\t$sql = $sql.\" \".$keys[$i].\" LIKE '\".$array[$keys[$i]].\"'\";\n\t\t\t} else {\n\t\t\t\t$sql = $sql.\" AND \".$keys[$i].\" LIKE '\".$array[$keys[$i]].\"'\";\n\t\t\t}\n\t\t}\n\t\t$result = mysql_query($sql) or die(mysql_error());\n\t\t$i = 0;\n\t\twhile ($info = mysql_fetch_array($result,MYSQL_ASSOC)){//While more results\n\t\t\t$toReturn[$i] = $info;\n\t\t\t$i++;\n\t\t}\n\t\treturn $toReturn;\n\t}", "public static function byArray(array $array) {}", "function isIndexed() ;", "function cleanNamefromERMObject(array $array, string $name){\n $basicname=$name;\n $i=1;\n while(checkredundantNamefromERMObjects($array, $name)) {\n $i++;\n $name = $basicname . $i;\n }\n return $name;\n\n}", "function map_title( $ra ){\n\t\t# otherwise you must reference by number, this is not a good pattern\n\t\t$ra['title'] = trim($ra[0]);\n\t\t$ra['year'] = trim($ra[1]);\n\t\t$ra['score'] = trim($ra[2]);\n\t\t$ra['total_reviews'] = trim($ra[3]);\n\t\treturn $ra;\n\t}", "function get_years_to_search() {\n global $DB;\n $sql = \"SELECT date AS fecha FROM {report_user_statistics};\";\n $dates = $DB->get_records_sql($sql);\n $result = array();\n foreach ($dates as $date) {\n $fecha = new DateTime(\"@$date->fecha\");\n $result[$fecha->format('Y')] = $fecha->format('Y');\n }\n return $result;\n}", "public function searchAddSlidesToArray( $searchterm, &$arr ) {\r\n $recordingids = array();\r\n $recidToIndex = array();\r\n foreach( $arr as $key => $row ) {\r\n if ( isset( $row['type'] ) and $row['type'] != 'recording' )\r\n continue;\r\n\r\n $recordingids[] = $row['id'];\r\n $recidToIndex[ $row['id'] ] = $key;\r\n $arr[ $key ]['slides'] = array();\r\n }\r\n\r\n if ( empty( $recordingids ) )\r\n return $arr;\r\n\r\n // egyet kivonunk a positionsec-bol hogy biztosan lassuk a slidot\r\n $slides = $this->db->query(\"\r\n SELECT\r\n of.*,\r\n IF(of.positionsec = 0, 0, positionsec -1) AS positionsec\r\n FROM\r\n ocr_frames AS of,\r\n recordings AS r\r\n WHERE\r\n r.id = of.recordingid AND\r\n r.ocrstatus = 'onstorage' AND\r\n of.status = 'onstorage' AND\r\n of.recordingid IN('\" . implode(\"', '\", $recordingids ) . \"') AND\r\n of.ocrtext IS NOT NULL AND\r\n LENGTH(of.ocrtext) > 0 AND\r\n of.ocrtext LIKE $searchterm\r\n ORDER BY of.recordingid, of.positionsec\r\n \");\r\n foreach( $slides as $row ) {\r\n $key = $recidToIndex[ $row['recordingid'] ];\r\n $arr[ $key ]['slides'][] = $row;\r\n }\r\n\r\n return $arr;\r\n }", "function appeared_once($arr)\n{\n $array_count_values = array_count_values($arr);\n\n $single_time_comming_values_array = [];\n\n foreach ($array_count_values as $key => $val) {\n\n if ($val == 1) {\n $single_time_comming_values_array[] = $key;\n }\n }\n\n return $single_time_comming_values_array;\n}", "function produceOId(&$array) {\n for ($i = 0;$i < count($array);$i++) {\n if (!isset($array[$i]->_id)) continue;\n $array[$i]->_id = $array[$i]->_id->__toString();\n }\n\n}", "protected function _getDuplicated($names)\n {\n $matched = $results = array();\n\n /* If there is only 1 array, simply return it. */\n if (count($names) < 2) {\n return $names[0];\n }\n\n for ($i = 0; $i < count($names); ++$i) {\n if (is_array($names[$i])) {\n $results = array_merge($results, $names[$i]);\n }\n }\n\n $search = array_count_values($results);\n foreach ($search as $key => $value) {\n if ($value > 1) {\n $matched[] = $key;\n }\n }\n\n return $matched;\n }", "function yy_r122(){\n $this->_retvalue = ['unique', $this->yystack[$this->yyidx + -1]->minor, $this->yystack[$this->yyidx + 0]->minor];\n }", "function gaMatch_addPlayerResult($kidPlayerId, $win, $draw, $lost) {\n //??????????????????? does record already exist - what if player change ?????????\n $match = array_search ( $kidPlayerId , $this->gamatch_gamePlayerMap);\n if ($match === FALSE) {\n $newGame = new stdData_gameUnit_extended;\n $newGame->stdRec_loadRow($row);\n $this->gamatch_gamePlayerMap[$newGame->game_kidPeriodId] = $newGame;\n ++$this->game_opponents_count;\n $this->game_opponents_kidPeriodId[] = $kidPlayerId;\n $this->game_opponents_wins[] = $win;\n $this->game_opponents_draws[] = $draw;\n $this->game_opponents_losts[] = $lost;\n $this->gagArrayGameId[] = 0;\n } else {\n $this->game_opponents_wins[$match] += $win;\n $this->game_opponents_draws[$match] += $draw;\n $this->game_opponents_losts[$match] += $lost;\n }\n}", "function acf_add_array_key_prefix($array, $prefix)\n{\n}", "function array_unique_renumber($somearray){\n $tmparr = array_unique($somearray);\n $i=0;\n foreach ($tmparr as $v) {\n $newarr[$i] = $v;\n $i++;\n }\n return $newarr;\n}", "public function titleArray($names);", "public function run()\n {\n $artistas = array('Alan Rickman','Alejandro G. Iñárritu','Alfie Allen','Amy Adams','Anthony Hopkins','Anya Taylor-Joy','Arnold Schwarzenegger','Ben Affleck','Bill Camp','Billy Zane','Bonnie Bedelia','Bruce Willis','Carrie-Anne Moss','Chad Stahelski','Charlize Theron','Chloe Pirrie','Chris Hemsworth','Chris Pine','Christopher Nolan','Christopher Walken','Connie Nielsen','Dafne Keen','Daniel Stern','Djimon Hounsou','Edward Furlong','Edward Zwick','Elliot Page','Gal Gadot','Gary Sinise','George Miller','Giancarlo Esposito','Gina Carano','Harrison Ford','Helen Hunt','Henry Cavill','Hugh Jackman','James Cameron','James Mangold','Jason Momoa','Jennifer Connelly','Jim Carrey','Joaquin Phoenix','Joe Pesci','John Hughes','John McTiernan','Jon Favreau','Jonah Hill','Joseph Gordon-Levitt','Kate Winslet','Keanu Reeves','Kelley','Kenneth Branagh','Kristen Wiig','Lana Wachowski','Laurence Fishburne','Leonardo DiCaprio','Linda Hamilton','Macaulay Culkin','Margot Robbie','Martin Scorsese','Michael Biehn ','Michael Nyqvist','Natalie Portman','Nicholas Hoult','Patrick Stewart','Patty Jenkins','Paul Sanchez','Pedro Pascal','Ridley Scott','Robert De Niro','Robert Zemeckis','Robin Wright','Ron Howard','Russell Crowe','Rutger Hauer','Scott Frank','Sean Young','Steven Spielberg','Taylor Momsen','Todd Phillips','Tom Hanks','Tom Hardy','Will Poulter','Zack Snyder','Zazie Beetz');\n foreach ($artistas as $nomArtista) {\n $artista = new Artista();\n $artista->nombre = $nomArtista;\n $artista->save();\n }\n }", "public function filterSpecificCategories($array){\n\n $newArray = [];\n\n foreach($array as $key => $value){\n $cat = trim(strtolower(strstr($value->getArticleID()->getCategory(), ' ')));\n if($cat == \"world news\" || $cat == \"football\"/* ||$cat == \"fashion\" || $cat == \"technology\"*/){\n //test fashion whs technology $numb raus? film und politics guuut 0.8\n $newArray[$key] = $value;\n }\n\n /* if($cat == \"sport\"|| $cat == \"football\" || $cat == \"culture\" || $cat == \"art and design\"){\n $newArray[$key] = $value;\n }*/\n\n /*if( $cat == \"sport\" || $cat == \"uk news\" || $cat == \"opinion\" || $cat == \"society\" || $cat == \"business\" ||\n $cat == \"politics\" || $cat == \"world news\" || $cat == \"life and style\" || $cat == \"environment\" || $cat == \"technology\"\n ||$cat == \"television & radio\" || $cat == \"culture\" || $cat == \"art and design\" || $cat == \"film\" || $cat == \"books\"\n ||$cat == \"us news\" || $cat == \"football\" || $cat == \"fashion\" || $cat == \"travel\" || $cat == \"science\"/*){ //20 categories\n $newArray[$key] = $value;\n }*/\n\n /* if( $cat == \"us news\" || $cat == \"technology\" || $cat == \"science\" || $cat == \"sport\" || $cat == \"opinion\" ||\n $cat == \"world news\" || $cat == \"football\" || $cat == \"politics\" || $cat == \"fashion\" || $cat == \"television & radio\"\n ||$cat == \"culture\" || $cat == \"environment\" || $cat == \"art and design\" || $cat == \"life and style\" || $cat == \"travel\"/*\n || $cat == \"books\" || $cat == \"uk news\" || $cat == \"business\" || $cat == \"film\" || $cat == \"society\"){ //20 categories\n $newArray[$key] = $value;\n }\n */\n\n }\n\n\n return $newArray;\n }", "function array_counts($arr,$key,$data = 'rows')\n {\n foreach($arr as $item) {\n $item['rows'] =1;\n if (!isset($res[$item[$key]])) {\n $res[$item[$key]] = $item;\n }else{\n $res[$item[$key]][$data] +=$item['rows'] ;\n }\n }\n return $res;\n }", "function checkForDuplicateUnique(){\n $_ufields_arr = explode(\",\", $this->listSettings->GetItem(\"MAIN\", \"UNIQUE_FIELDS\"));\n $check_fields = true;\n for ($i = 0; $i < sizeof($_ufields_arr); $i ++) {\n list ($_field[$i], $_value[$i]) = explode(\"=\", $_ufields_arr[$i]);\n if (strlen($_value[$i])) {\n $check_fields = false;\n $_query_arr[$_field[$i]] = $_value[$i];\n if ($this->_data[$_field[$i]] == $_value[$i]) {\n $check_fields = true;\n }\n }\n else {\n $_query_arr[$_field[$i]] = $this->_data[$_field[$i]];\n }\n }\n if ($check_fields) {\n $_data = $this->Storage->GetByFields($_query_arr, null);\n }\n else {\n $_data = array();\n }\n if (! empty($_data)) {\n if (($this->item_id != $_data[$this->key_field])) {\n if ($this->Kernel->Errors->HasItem($this->library_ID, \"RECORD_EXISTS\")) {\n $_error_section = $this->library_ID;\n }\n else {\n $_error_section = \"GlobalErrors\";\n }\n $this->validator->SetCustomError($_ufields_arr, \"RECORD_EXISTS\", $_error_section);\n }\n }\n }", "function getUnique_alignments($alignments) {\n $key_array = array();\n $temp_array = array();\n $alignment_size = count($alignments);\n for ($i = 0; $i < $alignment_size; $i++) {\n //if have not seen alignment in array then insert it.\n if (!in_array($alignments[$i]['optimal']['match_score'], $key_array, true)) {\n array_push($temp_array, $alignments[$i]);\n array_push($key_array, $alignments[$i]['optimal']['match_score']);\n }\n }\n\n return $temp_array;\n}", "public function yearProvider()\n {\n return array(\n // year = 1\n array('11111111111111111', array(2001, 2031)),\n // year = K\n array('1M8GDM9AXKP042788', array(1989, 2019)),\n // year = 3\n array('5GZCZ43D13S812715', array(2003, 2033)),\n // invalid year\n array('5GZCZ43D1US812715', array())\n );\n }", "function removeDuplicates(array $arr, string $userInput): array\n{\n $columnKey = extractHeaderKey($arr, $userInput);\n\n $occurrences = [];\n return array_filter($arr, function (array $row) use (&$occurrences, $columnKey) {\n if (!array_search($row[$columnKey], $occurrences)) {\n $occurrences[] = $row[$columnKey];\n return true;\n }\n\n return false;\n });\n}", "public function array_icount_values($array) {\n //create new output array of style date : # occurences\n //cycle through given dates, initializing to date : 1 except if duplicate\n //if duplicate, add +1 to occurence\n //return array\n \n $outarray = array();\n //array(\t'0'\t => array('id' => '666', 'make'\t => 'Boeing')\n\n $count = -1;\n foreach ($array as $key=>$value) {\n if (!isset($outarray[$value['date']])) {\n \n $outarray[++$count] = array('date' => $value['date'], \n 'count' => 1);\n } else {\n foreach ($outarray as $key2 => $value2 ) {\n if ($value2['date'] == $value['date']) {\n $value2['count'] += 1;\n }\n }\n }\n }\n \n return $outarray;\n }", "function getAllTagsFromAlbum_multi_unique($array) {\n\tforeach ($array as $k=>$na)\n\t$new[$k] = serialize($na);\n\t$uniq = array_unique($new);\n\tforeach($uniq as $k=>$ser)\n\t$new1[$k] = unserialize($ser);\n\treturn ($new1);\n}", "function theme_moove_order_courses_by_shortname(&$array_courses){\n\n $grouped_courses_array = array();\n $regular_courses_array = array();\n $no_regular_courses_array = array();\n $counter = 0;\n\n foreach($array_courses as $key=>&$course){\n\n $idcourse = $course->id;\n $timecreated = $this->theme_moove_get_timecreated_course($idcourse);\n $timemodified = $this->theme_moove_get_timemodified_course($idcourse);\n $categoryid = $this->theme_moove_get_course_category($idcourse);\n\n $course->timecreated = $timecreated;\n $course->timemodified = $timemodified;\n $course->categoryid = $categoryid;\n\n // Validación para cursos regulares\n if($course->categoryid >= 30001 && $course->categoryid <= 30999){\n\n array_push($regular_courses_array, $course);\n\n $explode_course_shortname = explode(\"-\", $course->shortname);\n\n // Se verifica que tenga en su nombre corto la especificación de fecha de creación\n // una vez identificada se le añade como atributo al curso\n if(count($explode_course_shortname) && preg_match(\"/^20/\", $explode_course_shortname[3])){\n $date_course = substr($explode_course_shortname[3], 0, -3);\n $course->date_course = $date_course;\n }\n\n }else{\n // Cursos no regulares\n array_push($no_regular_courses_array, $course);\n }\n }\n\n $this->array_sort_by($regular_courses_array, 'timecreated', $order = SORT_DESC);\n $this->array_sort_by($no_regular_courses_array, 'timecreated', $order = SORT_DESC);\n\n $grouped_courses_array['regular_courses'] = $regular_courses_array;\n $grouped_courses_array['no_regular_courses'] = $no_regular_courses_array;\n\n return $grouped_courses_array;\n }", "public function offsetExists($index);", "private function createArray()\n {\n $this->makeGroupBy()->makeSearch()->normalize();\n }", "protected function fillMovie()\r\n {\r\n $providers = array();\r\n foreach (array_unique($this->providerCodes) as $pc) {\r\n $provider = $this->getProviderFromCode($pc);\r\n if ($provider->providesForLanguage($this->getLanguage())) {\r\n $providers[$pc] = $this->getProviderFromCode($pc);\r\n }\r\n }\r\n \r\n $detailsByProvider = array();\r\n foreach ($this->detailsAdded as $detailArr) {\r\n if ($detailArr['provider']) {\r\n if (!isset($providers[$detailArr['provider']])) {\r\n $providers[$detailArr['provider']] = $this->getProviderFromCode($detailArr['provider']);\r\n }\r\n isset($detailsByProvider[$detailArr['provider']]) || $detailsByProvider[$detailArr['provider']] = array();\r\n $detailsByProvider[$detailArr['provider']][] = $detailArr['code'];\r\n } else {\r\n foreach ($providers as $provider) {\r\n if ($provider->provides($detailArr['code'])) {\r\n isset($detailsByProvider[$provider->getCode()]) || $detailsByProvider[$provider->getCode()] = array();\r\n $detailsByProvider[$provider->getCode()][] = $detailArr['code'];\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n \r\n foreach ($detailsByProvider as $providerCode => $detailCodes) {\r\n $providers[$providerCode]->fillMovie($this->getLanguage(), $this->movie, $detailCodes);\r\n }\r\n \r\n return $this->movie;\r\n }", "public function isIndexed() {}", "public function isIndexed() {}", "public function isIndexed() {}", "function getTermHits($searchTerm,$organism_version_id){\n $searchTerm =trim($searchTerm);global $con;$hits=array();\n if(!$con)$con=getConnection();\n $query=\"select distinct t.transcript_id,transcript_name,t.gene_prediction_id from gene_by_annotation g, transcript_by_annotation t \n where gene_name ='$searchTerm' and g.organism_version_id=$organism_version_id and g.transcript_id=t.transcript_id\n and g.organism_version_id=t.organism_version_id\";\n $result = mysql_query($query,$con);\n if($result){\n while($row = mysql_fetch_assoc($result)){\n $hits[]=array('id'=>$row[\"transcript_id\"],\n 'name'=>$row[\"transcript_name\"],\n 'prediction_id'=>$row[\"gene_prediction_id\"]);\n }\n }\n if(count($hits)<=0){ \n $query=\"select distinct transcript_id,transcript_name,gene_prediction_id from transcript_by_annotation \";\n $query .=\" where transcript_name ='$searchTerm' and organism_version_id=$organism_version_id \";\n $result = mysql_query($query,$con);\n if($result){\n while($row = mysql_fetch_assoc($result)){\n $hits[]=array('id'=>$row[\"transcript_id\"],\n 'name'=>$row[\"transcript_name\"],'prediction_id'=>$row[\"gene_prediction_id\"]);\n }\n } \n }\n elseif(count($hits)<=0){ //check if cc founders transcript_name\n $query=\"select distinct t.transcript_id,t.transcript_name,t.gene_prediction_id \n from transcript_by_annotation t,cc_founders_transcripts c\n where c.transcript_name='$searchTerm' and t.organism_version_id=$organism_version_id and c.gene_prediction_id = t.gene_prediction_id \n and t.transcript_name=c.transcript_id \";\n $result = mysql_query($query,$con);\n if($result){ \n while($row = mysql_fetch_assoc($result)){ \n $hits[]=array('id'=>$row[\"transcript_id\"],\n 'name'=>$row[\"transcript_name\"],\n 'prediction_id'=>$row[\"gene_prediction_id\"]);\n }\n }\n }\n elseif(count($hits)<=0){ //check if cc founders gene_id\n $query=\"select distinct t.transcript_id,t.transcript_name,t.gene_prediction_id\"; \n $query.=\" from gene_by_annotation g,cc_founders_genes c,transcript_by_annotation t\n where c.gene_id ='$searchTerm' and c.gene_name=g.gene_name and g.gene_prediction_id=c.gene_prediction_id \n and g.organism_version_id=$organism_version_id and g.transcript_id=t.transcript_id \n and g.organism_version_id=t.organism_version_id \"; \n $result = mysql_query($query,$con);\n if($result){ \n while($row = mysql_fetch_assoc($result)){ \n $hits[]=array('id'=>$row[\"transcript_id\"],\n 'name'=>$row[\"transcript_name\"],\n 'prediction_id'=>$row[\"gene_prediction_id\"]);\n }\n }\n }\n return $hits;\n}", "function faculty_get_publications( $metaArray ) {\n $publicationArray = [];\n\n if ( isset( $metaArray['publications'] ) && $metaArray['publications'][0] > 0 ) {\n for ( $i=0; $i < $metaArray['publications'][0]; $i++ ) { \n $publication = [\n 'citation' => $metaArray['publications_'.$i.'_citation'][0],\n 'year' => $metaArray['publications_'.$i.'_year'][0],\n 'link' => $metaArray['publications_'.$i.'_link'][0],\n ];\n\n array_push( $publicationArray, $publication);\n }\n }\n\n return $publicationArray;\n}", "public static function extendCategoryNameInItems(Goose|Connect $self, array $index): array\n {\n if (count($index ?? []) <= 0) return [];\n foreach ($index as $k => $v)\n {\n if (!($v->category_srl ?? false))\n {\n $v->category_name = '';\n continue;\n }\n $category = $self->model->getItem((object)[\n 'table' => 'categories',\n 'field' => 'name',\n 'where' => 'srl='.(int)$v->category_srl,\n ])->data;\n $v->category_name = $category->name ?? '';\n }\n return $index;\n }", "function build_index($topics) {\n\t$keys = array_keys($topics);\n\tprint_r($topics[$keys[0]]);\n\t//get name of top level subject/topic\n\tif (count($keys) > 0) {\n\t\t$parts = explode(\"/\", remove_last_slash($keys[0]));\n\t\t$topLevel = $parts[count($parts) - 1];\n\t\t$isUpdate = false;\n\t\t//If the topic index exists, treate this as an update. Otherwise, create new index\n\t\tif (check_existing_standards($topLevel, false)) {\n\t\t\techo \"<p><b>This subject index exists! Checking for updates...</b></p>\";\n\t\t\t$isUpdate = true;\n\t\t}\n\t\telse {\n\t\t\techo \"<p><b>A new subject index will be created for \".$topics[$keys[0]][\"http://purl.org/dc/elements/1.1/title\"][0][\"value\"]. \"</b></p>\";\n\t\t\t\n\t\t}\n\t\tparse_json_topics($topics, $isUpdate);\n\t} else echo \"<p>Could not read document!</p>\";\n\t\n\t\n}", "function oneplace($Group, $Array){\n\tglobal $log;\n\tfor ($num=1;$num<=9;$num++){\n\t\t$found='';\n\t\tforeach($Group as $index=>$Cell){\n\t\t\t$r=$Cell['row'];\n\t\t\t$c=$Cell['column'];\n\t\t\t$val=$Array[$r][$c];\n\t\t\tif(strpos($val,\"$num\") !== false){\n\t\t\t\t$found.=\"$index\";\n\t\t\t}\n\t\t}\n\t\tif (strlen($found)==1){\n\t\t\t$log.= 'p';\n\t\t\t$found=(int) $found;\n\t\t\t$r=$Group[$found]['row'];\n\t\t\t$c=$Group[$found]['column'];\n\t\t\t$Array[$r][$c]=\"$num\";\n\t\t}\n\t}\n\treturn $Array;\n}", "public function providerMatches()\n {\n return array(\n array('24 - 5x01 (HR.HDTV).avi', 5, 1),\n array('3rd Rock from the Sun - 1x01 - Brains and Eggs.avi', 1, 1),\n array('American Dad! - 1x01 - Pilot (pdtv).avi', 1, 1),\n array('The X Factor - 1x02 - Mooman (ll).avi',1,2),\n );\n }", "function key(){ \r\n\t return key($this->array); \r\n\t }", "function searchMoviesFromCinema($sCinema, array $aCinemas, array $aMovies)\n{\n $aSearchMovies = array();\n foreach ($aCinemas[$sCinema]['rooms'] as $iMovieId) {\n $aSearchMovies[] = $aMovies[$iMovieId];\n }\n\n return $aSearchMovies;\n}", "public function filterByGenre($genresArray,$projectionList)\n {\n $newArray = array();\n foreach ($projectionList as $proj) {\n $jaja = 0;\n $movie=$proj->getMovie();\n $genresMovie = $movie->getGenres();\n foreach ($genresMovie as $genM) {\n foreach ($genresArray as $strGen) {\n if ($strGen == $genM->getName()) {\n $jaja++;\n }\n }\n }\n if ($jaja == count($genresArray)) {\n $newArray[] = $proj;\n }\n }\n return $newArray;\n }", "function dedupe_using_hollis_id($docs) {\n $deduped_docs = array();\n foreach ($docs as $doc) {\n $in_array = False;\n foreach ($deduped_docs as $deduped_doc) {\n if ($deduped_doc['name'] == $doc['name']) {\n $in_array= True;\n }\n }\n if (!$in_array) {\n $deduped_docs[] = $doc;\n }\n }\n return $deduped_docs;\n }", "public function run()\n {\n $records = [\n [\n 1,\n \"bibendum ullamcorper. Duis cursus, diam\",\n \"Mary\",\n \"8.52\",\n \"2017-01-27\",\n 5,\n \"O4Z 8B7\",\n 4,\n 1,\n \"Nunc ut\",\n 34,\n 1,\n 3,\n \"2018-07-08\",\n 3,\n \"Stacey\",\n \"2017-12-17\",\n 0,\n \"DLD48QLXRP\",\n 2020,\n 'Town',\n 10.22\n ],\n [\n 2,\n \"eu neque\",\n \"Hilary\",\n \"5.73\",\n \"2017-10-01\",\n 2,\n \"Q8P 7H4\",\n 4,\n 1,\n \"sollicitudin adipiscing ligula.\",\n 139,\n 0,\n null,\n null,\n 1,\n \"Sara\",\n \"2017-01-24\",\n 0,\n \"YMQ15QJ5AZ\",\n 2018,\n 'State',\n 10.22\n ],\n [\n 3,\n \"varius. Nam porttitor scelerisque neque. Nullam\",\n \"Noah\",\n \"2.93\",\n \"2017-07-13\",\n 3,\n \"A6V 2I1\",\n 5,\n 4,\n \"mattis semper, dui lectus\",\n 158,\n 1,\n 1,\n \"2018-02-02\",\n 2,\n \"Griffin\",\n \"2017-01-10\",\n 1,\n \"YWK78JJ5HZ\",\n 2019,\n 'Town',\n 5.22\n ],\n [\n 4,\n \"Etiam ligula\",\n \"Alana\",\n \"6.48\",\n \"2016-12-22\",\n 3,\n \"N0G 9K9\",\n 2,\n 4,\n \"egestas. Fusce\",\n 221,\n 1,\n 1,\n \"2018-02-24\",\n 3,\n \"Georgia\",\n \"2017-04-23\",\n 1,\n \"IUC41XA0JC\",\n 2025,\n 'Town',\n 0.00\n ],\n [\n 5,\n \"arcu. Sed et\",\n \"Avram\",\n \"6.78\",\n \"2017-12-31\",\n 4,\n \"C2M 8V4\",\n 5,\n 3,\n \"scelerisque scelerisque dui.\",\n 160,\n 0,\n null,\n null,\n 2,\n \"Deacon\",\n \"2017-10-22\",\n 1,\n \"AJU13OV8UJ\",\n 2024,\n 'State',\n 50.00\n ],\n [\n 6,\n \"odio a purus. Duis elementum, dui quis\",\n \"Rosalyn\",\n \"2.61\",\n \"2018-02-07\",\n 2,\n \"Z1C 7Z0\",\n 1,\n 3,\n \"sed pede nec ante\",\n 64,\n 1,\n 1,\n \"2018-10-09\",\n 2,\n \"Jasper\",\n \"2017-01-03\",\n 0,\n \"KGE89KI6DU\",\n 2019,\n 'Federal',\n 9.402\n ],\n [\n 7,\n \"magna. Ut tincidunt orci quis lectus. Nullam, est\",\n \"Althea\",\n \"7.57\",\n \"2018-08-16\",\n 5,\n \"L9T 3Y5\",\n 5,\n 1,\n \"lacinia orci, consectetuer euismod est\",\n 128,\n 0,\n null,\n null,\n 2,\n \"Marvin\",\n \"2017-09-20\",\n 1,\n \"GLW83AB1OV\",\n 2025,\n 'Town',\n 6.49\n ],\n [\n 8,\n \"lectus sit\",\n \"Christopher\",\n \"5.74\",\n \"2018-08-26\",\n 1,\n \"U9Y 6H2\",\n 3,\n 2,\n \"tristique neque venenatis\",\n 219,\n 1,\n 2,\n \"2017-08-03\",\n 1,\n \"Amity\",\n \"2018-09-17\",\n 0,\n \"KUU44PCBMV\",\n 2017,\n 'State',\n 7.43\n ],\n [\n 9,\n \"faucibus orci luctus et ultrices posuere; Donec\",\n \"Rogan\",\n \"3.63\",\n \"2018-03-08\",\n 3,\n \"E5P 2S8\",\n 2,\n 4,\n \"neque pellentesque massa lobortis\",\n 127,\n 1,\n 3,\n \"2018-10-12\",\n 3,\n \"Hedwig\",\n \"2017-06-25\",\n 0,\n \"EXV74CV0ZZ\",\n 2021,\n 'Federal',\n 2.32\n ],\n [\n 10,\n \"pede et risus. Quisque\",\n \"Caesar\",\n \"1.58\",\n \"2017-08-26\",\n 4,\n \"F8O 2P4\",\n 2,\n 4,\n \"Donec vitae erat vel\",\n 171,\n 0,\n null,\n null,\n 1,\n \"Emery\",\n \"2017-06-24\",\n 0,\n \"YKN72ZQ6NI\",\n 2018,\n 'State',\n 10.22\n ],\n [\n 11,\n \"sapien imperdiet ornare. In faucibus.\",\n \"Caleb\",\n \"6.85\",\n \"2017-04-16\",\n 1,\n \"N6K 1T6\",\n 2,\n 1,\n \"non, feugiat nec, diam. Duis\",\n 202,\n 0,\n null,\n null,\n 1,\n \"Cora\",\n \"2018-04-05\",\n 1,\n \"UDO93WDR8G\",\n 2020,\n 'State',\n 10.22\n ],\n [\n 12,\n \"Nunc sed orci lobortis\",\n \"Nathan\",\n \"3.95\",\n \"2016-11-24\",\n 2,\n \"Q5Y 8W3\",\n 4,\n 1,\n \"a, malesuada id, erat. Etiam\",\n 81,\n 0,\n null,\n null,\n 2,\n \"Damian\",\n \"2018-05-03\",\n 0,\n \"QM48OHY0NI\",\n 2018,\n 'State',\n 10.22\n ],\n [\n 13,\n \"porttitor interdum. Sed auctor odio a\",\n \"Selma\",\n \"2.10\",\n \"2018-06-05\",\n 4,\n \"X5T 3A1\",\n 1,\n 2,\n \"Nunc mauris. Morbi\",\n 105,\n 0,\n null,\n null,\n 3,\n \"Freya\",\n \"2017-10-30\",\n 0,\n \"EFH52JMO6M\",\n 2019,\n 'State',\n 10.22\n ],\n [\n 14,\n \"Duis cursus, diam at pretium aliquet, metus erat\",\n \"Gloria\",\n \"1.23\",\n \"2017-01-29\",\n 2,\n \"U2V 1A7\",\n 2,\n 4,\n \"dictum mi, ac mattis\",\n 121,\n 0,\n null,\n null,\n 2,\n \"Jerome\",\n \"2018-09-18\",\n 1,\n \"DCT55JIU2C\",\n 2018,\n 'State',\n 10.22\n ],\n [\n 15,\n \"lobortis risus. In mi pede, nonummy ut, molestie\",\n \"Oprah\",\n \"1.76\",\n \"2017-01-31\",\n 3,\n \"D9X 1F4\",\n 4,\n 3,\n \"faucibus leo, in lobortis tellus\",\n 124,\n 0,\n null,\n null,\n 5,\n \"Barclay\",\n \"2018-03-15\",\n 0,\n \"EQH65GTE4L\",\n 2018,\n 'State',\n 10.22\n ],\n [\n 16,\n \"sem. Pellentesque ut ipsum ac mi eleifend egestas.\",\n \"Jade\",\n \"8.02\",\n \"2017-06-20\",\n 5,\n \"U7B 7Q0\",\n 2,\n 4,\n \"id enim. Curabitur massa.\",\n 125,\n 1,\n 1,\n \"2017-12-22\",\n 3,\n \"Bruno\",\n \"2018-09-15\",\n 0,\n \"LAR03LAD1M\",\n 2022,\n 'State',\n 10.22\n ],\n [\n 17,\n \"diam vel arcu. Curabitur ut odio vel est tempor\",\n \"Britanni\",\n \"2.07\",\n \"2016-12-24\",\n 5,\n \"J6Y 6N0\",\n 5,\n 4,\n \"Fusce\",\n 220,\n 0,\n null,\n null,\n 2,\n \"Sybill\",\n \"2017-03-16\",\n 1,\n \"ZLH43DGE0L\",\n 2024,\n 'State',\n 10.22\n ],\n [\n 18,\n \"ut\",\n \"Amal\",\n \"1.27\",\n \"2017-05-17\",\n 4,\n \"G1C 2N9\",\n 1,\n 3,\n \"lobortis\",\n 235,\n 0,\n null,\n null,\n 5,\n \"Risa\",\n \"2018-04-27\",\n 0,\n \"TZD23DXK0U\",\n 2022,\n 'State',\n 10.22\n ],\n [\n 19,\n \"molestie. Sed id risus quis diam luctus lobortis.\",\n \"Nolan\",\n \"2.25\",\n \"2018-08-21\",\n 2,\n \"G1I 9I7\",\n 5,\n 1,\n \"ridiculus\",\n 155,\n 1,\n 3,\n \"2018-06-05\",\n 4,\n \"Eleanor\",\n \"2017-06-13\",\n 0,\n \"IPG08DQI2O\",\n 2022,\n 'State',\n 10.22\n ],\n [\n 20,\n \"rutrum\",\n \"Basil\",\n \"3.25\",\n \"2016-12-25\",\n 5,\n \"Y7H 2K2\",\n 3,\n 3,\n \"mi enim, condimentum eget, volutpat\",\n 195,\n 1,\n 3,\n \"2018-04-28\",\n 5,\n \"Winter\",\n \"2018-08-16\",\n 0,\n \"EAU79FKK8Y\",\n 2023,\n 'State',\n 10.22\n ]\n ];\n\n $count = count($records);\n\n foreach ($records as $key => $record) {\n Asset::insert([\n 'created_at' => Carbon\\Carbon::now()->subDays($count)->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->subDays($count)->toDateTimeString(),\n 'description' => $record[1],\n 'owner' => $record[2],\n 'purchase_price' => $record[3],\n 'purchase_date' => $record[4],\n 'group_id' => $record[5],\n 'serial_number' => $record[6],\n 'location_id' => $record[7],\n 'warranty_id' => $record[8],\n 'notes' => $record[9],\n 'estimated_life_months' => $record[10],\n 'is_out_of_service' => $record[11],\n 'out_of_service_id' => $record[12],\n 'out_of_service_date' => $record[13],\n 'vendor_id' => $record[14],\n 'assigned_to' => $record[15],\n 'assigned_date' => $record[16],\n 'is_computer' => $record[17],\n 'tag' => $record[18],\n 'scheduled_retirement_year' => $record[19],\n 'funding_source' => $record[20],\n 'percent_federal_participation' => $record[21]\n ]);\n $count--;\n }\n }", "public function duplicateSemesterInfo($data) {\n// $this->db->select('campusName'); \n $qu = $this->db->get_where($this->_table, array('semester' => $data['semester']));\n $reault = $qu->row_array();\n return $reault;\n }", "public function cleanDuplicates( );", "function checkredundantNamefromERMObjects(array $array, string $name){\n $result = false;\n foreach ($array as $element){\n if($element->getName()==$name){\n $result = true;\n }\n }\n return $result;\n\n}", "function ic_mark_duplicate_titles( $data, $postarr ) {\n\tif ( 'invite_codes' !== $data['post_type'] ) {\n\t\treturn $data;\n\t}\n\n\t$title = $data['post_title'];\n\t$code_exists = get_page_by_title( $title, OBJECT, 'invite_codes' );\n\tif ( $code_exists ) {\n\t\t$data['post_title'] .= '-duplicate';\n\t\t$data['post_status'] = 'draft';\n\t}\n\treturn $data;\n}", "function uniqueCC($thearray){\n foreach ($thearray as $key => $val4){\n if(isset($val4[\"Country_Code\"])){\n $bycc[] = $val4[\"Country_Code\"];\n } \n }\n$toreturn = array_unique($bycc);\nreturn $toreturn;\n}", "function filterByGenre($originalArray, $genere){\r\n $filtered = [];\r\n\r\n foreach ($originalArray as $album) {\r\n if($album['genre'] === $genere){\r\n $filtered[] = $album;\r\n }\r\n }\r\n return $filtered;\r\n}", "protected function isIndexed($array){\n $flag='';\n foreach ($array as $key => $v) {\n if(!(is_int($key))){\n $flag = 1;\n }\n \n }\n if($flag == 1){\n return FALSE;\n }else{\n return TRUE;\n }\n }", "function duplication2(Array $array) {\n if (empty($array)) {\n return FALSE;\n }\n foreach ($array as $key => $val) {\n if ($key != $val) {\n // not in 0 ~ n-1\n if (!isset($array[ $val ])) {\n return FALSE;\n }\n if ($val == $array[ $val ]) {\n return $val;\n } else {\n $tmp = $array[ $val ];\n $array[ $val ] = $val;\n $array[ $key ] = $tmp;\n }\n }\n }\n\n return 'no duplicate numbers.';\n}", "function array_iunique($array) {\n return array_intersect_key($array,array_unique(\n array_map(strtolower,$array)));\n }", "function get_all_by_key_by_year(){\n\t\t$sql = \"SELECT * \n\t\t\t\tFROM evs_database.evs_set_form_attitude\n\t\t\t\tWHERE sft_pos_id = ? AND sft_pay_id = ?\";\n $query = $this->db->query($sql, array($this->sft_pos_id, $this->sft_pay_id));\n\t\treturn $query;\n\n\t}", "public function offsetExists($index)\n {\n }", "function ss_hammerOID_pollers_indexes() {\n\n $return_arr = array();\n\t\t\n\t$rows = db_fetch_assoc(\"SELECT id FROM poller\");\n\n\n for ($i=0;($i<sizeof($rows));$i++) {\n $return_arr[$i] = $rows[$i]['id'];\n }\n\n return $return_arr;\n}", "public function findPlayerIndex($arr, $player){\n\t\t//var_dump($arr);\n\t\t//echo $player;\n\t\tforeach ($arr as $k => $id) {\n\t\t\tif($id['player_id'] == $player){\n\t\t\t\t$this->key = $k;\n\t\t\t\treturn $this->key;\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "function studentNameSearch($sessionID, $name){\r\n\t\t$name = str_replace(' ', '%', $name);\r\n\t\t$results = array();\r\n\t\tfor($i=0; $i<sizeof($name); $i++){\r\n\t\t\t$query = \"SELECT ID, CONCAT(FIRST_NAME, ' ', MIDDLE_NAME, ' ', LAST_NAME) AS FullName FROM X_PNSY_STUDENT WHERE\r\n\t\t\t\t\tCONCAT(FIRST_NAME, ' ', MIDDLE_NAME, ' ', LAST_NAME) LIKE '%$name%'\";\r\n\t\t\t\t$result = mysql_query($query);\r\n\t\t\t\t//Cycles through the rows of $result and puts them into $results in the proper format.\r\n\t\t\t\tfor($j=0; $thisResult = mysql_fetch_assoc($result); $j++){\r\n\t\t\t\t\tif(!array_key_exists($thisResult['ID'], $results)){\r\n\t\t\t\t\t\t$results[$thisResult['ID']] = $thisResult['FullName'];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t}\r\n\t\treturn $results;\r\n\t}", "static function get_duplicates(array $array): array {\n return array_unique(array_diff_assoc($array, array_unique($array)));\n }", "public function create_hashtag()\n {\n $hashtag = array();\n $art_sql = \"SELECT category_id,REPLACE(art_category,' ','') as art_category FROM ailee_art_category WHERE art_category != 'other';\";\n $art_cat_data = $this->db->query($art_sql)->result();\n echo \"<pre>\";\n // print_r($art_cat_data);\n foreach ($art_cat_data as $_art_cat_data) {\n $res = preg_replace(\"/[^a-zA-Z0-9]/\", \"\", $_art_cat_data->art_category);\n $_art_cat_data->art_hashtag = strtolower($res);\n $hashtag[] = strtolower($res);\n // print_r($_art_cat_data);\n }\n\n $jt_sql = \"SELECT title_id,name FROM ailee_job_title WHERE status = 'publish';\";\n $job_title_data = $this->db->query($jt_sql)->result();\n echo \"<pre>\";\n // print_r($job_title_data);\n foreach ($job_title_data as $_job_title_data) {\n $res = preg_replace(\"/[^a-zA-Z0-9]/\", \"\", $_job_title_data->name);\n $_job_title_data->jt_hashtag = strtolower($res);\n $hashtag[] = strtolower($res);\n // print_r($_job_title_data);\n }\n\n $s_sql = \"SELECT skill_id,skill FROM ailee_skill WHERE status = '1' AND ( type='1' OR type='2');\";\n $skill_data = $this->db->query($s_sql)->result();\n echo \"<pre>\";\n // print_r($skill_data);\n foreach ($skill_data as $_skill_data) {\n $res = preg_replace(\"/[^a-zA-Z0-9]/\", \"\", $_skill_data->skill);\n $_skill_data->jt_hashtag = strtolower($res);\n $hashtag[] = strtolower($res);\n // print_r($_skill_data);\n }\n // print_r($hashtag);\n $main_hashtag = array_values(array_unique($hashtag));\n foreach ($main_hashtag as $key => $value) {\n $data = array(\n 'hashtag' => $value,\n 'status' => '1',\n 'created_date' => date('Y-m-d H:i:s', time()),\n 'modify_date' => date('Y-m-d H:i:s', time()),\n );\n print_r($data);\n $hashtag_id = $this->common->insert_data_getid($data, 'hashtag');\n }\n }", "public function __construct($_title, $_year)\n {\n $this->title = $_title;\n $this->year = $_year;\n self::$counter++; // incremento il contatore ogni volta che agggiungo un'istanza \n }", "private function staggeredSearch($inputArray = []) {\n $results = [];\n $exactMatchesResults = [];\n $pinyinResults = [];\n $translationResults = [];\n \n\n // Exact pinyin results, items that match exactly\n foreach ($inputArray as $inputItem) {\n\n $exactMatchesResults = \\App\\Character::where('pinyin', $inputItem)\n ->orWhere('pinyin_normalised', $inputItem)->orderBy('freq', 'asc')->get();\n\n // for each result in the above collections, add to results array\n\n foreach($exactMatchesResults as $result) {\n if (! in_array($result, $results)) {\n array_push($results, $result);\n }\n }\n }\n\n // pinyin results using \"like\" operator\n foreach ($inputArray as $inputItem) {\n \n $pinyinResults = \\App\\Character::where('pinyin', 'like', '%' . $inputItem .'%')\n ->orWhere('pinyin_normalised', 'like', '%' . $inputItem .'%')->orderBy('freq', 'asc')->get();\n\n // for each result in the above collections, add to results array\n\n foreach($pinyinResults as $result) {\n if (! in_array($result, $results)) {\n array_push($results, $result);\n }\n }\n }\n\n // translation and heisig results using \"like\" operator\n foreach ($inputArray as $inputItem) {\n\n $translationResults = \\App\\Character::where('heisig_keyword', 'like', '%' . $inputItem .'%')\n ->orWhere('translations', 'like', '%' . $inputItem .'%')\n ->orWhere('heisig_number', 'like', '%' . $inputItem .'%')->get();\n\n // for each result in the above collections, add to results array\n foreach($translationResults as $result) {\n if (! in_array($result, $results)) {\n array_push($results, $result);\n }\n }\n }\n\n return $results;\n }", "protected function arrayKey() {\n\t\tif ( !empty($this->array[$this->indent]) ) {\n\t\t\t$this->array_index[$this->indent]++;\n\t\t\t$this->key($this->array_index[$this->indent]);\n\t\t}\n\t}", "public function loop()\n {\n \n $collection = collect(['renato' => 30, 'lisa' => 31, 'leidy' => 23, 'alexandre' => 3, 'renato' => 30, 'lisa' => 31, 'leidy' => 23, 'renato' => 30]);\n //$collection = $collection->duplicates();\n $collection->each(function($item, $key) {\n print_r($key); \n });\n \n }", "public function date_duplication($date)\n\t\t{\n\t\t\t$sql=\"SELECT * FROM `covid_data` WHERE `pub_date`='$date' \";\n\t\t\t$row=array();\n\t\t\t$stmt = $this->con->prepare($sql);\n\t\t\t$stmt->execute();\n\t\t\t$row=$stmt->fetchAll();\n\t\t\treturn $row;\n\t\t}", "private function makePKAttributesArray($array){\n\n \t\t$PKAttributes;\n \t\t$count = 0;\n \t\t$referenceTableKeys = $this->tableNames;\n \t\t$refTableKeyCount = count($referenceTableKeys);\n\n\n \t\tforeach($array as $row){\n \t\t\t$searchElement = $row['table_name'];\n\t if($count !=0 && $searchElement != $tableNames[$count-1] ){\n\t \tfor($i=0;$i<$refTableKeyCount;$i++){\n\t \t\tif($row['table_name'] == $referenceTableKeys[$i] ){\n\t \t\t\t$PKAttributes[$count]=array($row['table_name'] => $row['column_name']);\n\t \t\t}\n\t \t}\n\t \t$tableNames[$count]=$searchElement;\n\t \t$count++;\n\t }\n\t else if ($count == 0){\n\t \tfor($i=0;$i<$refTableKeyCount;$i++){\n\t \t\tif($row['table_name'] == $referenceTableKeys[$i] ){\n\t \t\t\t$PKAttributes[$count]=array($row['table_name'] => $row['column_name']);\n\t \t\t}\n\t \t}\n\t \t$tableNames[0] = $array[0]['table_name'];\n\t \t$count++;\n\t }\n\t }\n\n\t //removes indexed keys and returns a clean array\n\t $PKtemp;\n \t\tforeach ($PKAttributes as $array){\n \t\t\tforeach ($array as$tableName=>$PK){\n \t\t\t\t$PKtemp[$tableName]=$PK;\n \t\t\t}\n \t\t}\n\n \t\t$PKAttributes = $PKtemp;\n\t return $PKAttributes;\n \t}", "function getIndex() ;", "function get1Genre() {\n\n $db = connectDB();\n\n $query = (\"\n SELECT g.genre, COUNT(g.movie_id) as MovieCount FROM movies_genres g\n GROUP BY g.genre HAVING COUNT(g.movie_id) =\n (SELECT COUNT(g2.movie_id) tc FROM movies_genres g2\n GROUP BY g2.genre ORDER BY tc DESC LIMIT 1)\n \");\n\n $prep = $db->prepare(\"$query\");\n $prep->execute();\n\n $result = array(\"from\" => \"1genre\", \"data\" => array());\n\n foreach($prep as $row) {\n array_push($result[\"data\"], array(\n \"genre\" => $row[\"genre\"],\n \"count\" => $row[\"MovieCount\"]\n ));\n }\n\n header(\"Content-Type: application/json\");\n echo json_encode($result);\n\n closeDB($db);\n\n}", "protected function generateIndex(array $csv, $primaryKey)\n {\n $index = array();\n for ($i = 0; $i < count($csv) - 1; $i++) {\n $index[ $csv[ $i ][ $primaryKey ] ] = $i;\n }\n\n return $index;\n }", "public function run()\n {\n \n\n \\DB::table('movie_reviews')->delete();\n \n \\DB::table('movie_reviews')->insert(array (\n 0 => \n array (\n 'id' => 1,\n 'movie_id' => 2,\n 'user_id' => 1,\n 'rating' => 5,\n 'rating_description' => 'Lorem ipsum is simply dummy text',\n 'helpful_count' => 10,\n 'unhelpful_count' => 2,\n 'created_at' => '2017-01-25 07:03:55',\n 'updated_at' => '2017-01-25 07:04:26',\n 'deleted_at' => NULL,\n ),\n 1 => \n array (\n 'id' => 3,\n 'movie_id' => 1,\n 'user_id' => 2,\n 'rating' => 4,\n 'rating_description' => 'Lorem ipsum is simply dummy text',\n 'helpful_count' => 6,\n 'unhelpful_count' => 3,\n 'created_at' => '2017-01-25 10:31:13',\n 'updated_at' => '2017-01-25 10:31:13',\n 'deleted_at' => NULL,\n ),\n 2 => \n array (\n 'id' => 4,\n 'movie_id' => 1,\n 'user_id' => 1,\n 'rating' => 3,\n 'rating_description' => 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries',\n 'helpful_count' => 4,\n 'unhelpful_count' => 2,\n 'created_at' => '2017-01-25 11:34:56',\n 'updated_at' => '2017-01-25 11:34:56',\n 'deleted_at' => NULL,\n ),\n 3 => \n array (\n 'id' => 5,\n 'movie_id' => 3,\n 'user_id' => 3,\n 'rating' => 4,\n 'rating_description' => 'If you\\'ve watched and liked Film\\'s trailer then you will get all expected things in Film just like me. Excellent Writing, High on Emotions, Good Direction, Heart Touching concept and last but not the least Kaabil hits your heart and melts it.',\n 'helpful_count' => 6,\n 'unhelpful_count' => 2,\n 'created_at' => '2017-01-31 05:55:29',\n 'updated_at' => '2017-01-31 05:55:29',\n 'deleted_at' => NULL,\n ),\n 4 => \n array (\n 'id' => 6,\n 'movie_id' => 3,\n 'user_id' => 1,\n 'rating' => 4,\n 'rating_description' => 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries',\n 'helpful_count' => 5,\n 'unhelpful_count' => 5,\n 'created_at' => '2017-01-31 07:54:41',\n 'updated_at' => '2017-01-31 07:54:41',\n 'deleted_at' => NULL,\n ),\n 5 => \n array (\n 'id' => 7,\n 'movie_id' => 3,\n 'user_id' => 2,\n 'rating' => 3,\n 'rating_description' => 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries',\n 'helpful_count' => 8,\n 'unhelpful_count' => 4,\n 'created_at' => '2017-01-31 07:55:03',\n 'updated_at' => '2017-01-31 07:55:03',\n 'deleted_at' => NULL,\n ),\n ));\n \n \n }" ]
[ "0.5577337", "0.4683959", "0.46682495", "0.4599428", "0.45880413", "0.45753264", "0.45324612", "0.4510924", "0.4510479", "0.44979447", "0.4473694", "0.44175297", "0.4411343", "0.43881652", "0.43605217", "0.43367344", "0.42892995", "0.42819673", "0.42708978", "0.42610693", "0.4256704", "0.4246907", "0.423374", "0.41938516", "0.41791785", "0.41789058", "0.41774568", "0.41617757", "0.41595438", "0.4141578", "0.4138288", "0.4123031", "0.4120418", "0.41201913", "0.41175705", "0.4110117", "0.4109831", "0.41091663", "0.41031972", "0.40983987", "0.4097426", "0.4094158", "0.40882182", "0.40878052", "0.40850994", "0.4079199", "0.40775102", "0.40749437", "0.4064252", "0.40562493", "0.4055051", "0.40535122", "0.40534306", "0.40506727", "0.40483505", "0.40474504", "0.4046551", "0.404394", "0.40426338", "0.40421286", "0.40421003", "0.40416315", "0.40415615", "0.403888", "0.4035083", "0.40292984", "0.4027343", "0.40244883", "0.40167034", "0.40126133", "0.40083104", "0.40075403", "0.40073186", "0.40055904", "0.40015727", "0.3997311", "0.39936996", "0.39934635", "0.39829913", "0.39820153", "0.39801756", "0.39773086", "0.39760014", "0.39712515", "0.39670315", "0.39652607", "0.39610153", "0.39565113", "0.39520776", "0.39507845", "0.39441174", "0.39427397", "0.3936098", "0.39329654", "0.39286754", "0.39245275", "0.39237493", "0.39166683", "0.39132962", "0.3910903" ]
0.41853112
24
Indexes Duplicates like so: $array["$movie_name ($year)"][$provider]
public function get_collated_movie_list() { $movies = $this->movies; $error_messages = array(); foreach ($this->movie_providers as $provider_name => $provider) { list($movies[$provider_name], $new_error_messages) = $this->cache_logic_get_movies_list_by_provider_keyed_by_name_and_year($provider_name); $error_messages = array_merge($error_messages, $new_error_messages); } $all_movies = $this->collate_multiple_provider_movie_lists_by_name_and_year($movies); return array($all_movies, $error_messages); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_movies_with_duplicate_name_per_year_get_a_year()\n {\n $search = $this->getimdbsearch();\n $results = $search->search('Home 2015', array(TitleSearch::MOVIE));\n $this->assertIsArray($results);\n\n $found = false;\n foreach ($results as $result) {\n if (\"2224026\" == $result->imdbid()) {\n $this->assertInstanceOf('\\Imdb\\Title', $result);\n $this->assertEquals(\"2224026\", $result->imdbid());\n $this->assertEquals(\"Home\", $result->title());\n $this->assertEquals(2015, $result->year());\n $found = true;\n }\n }\n $this->assertTrue($found, \"Did not find Home(II) 2015 in search results\");\n\n $wrongMovieType = false;\n foreach ($results as $result) {\n if ($result->movietype() !== TitleSearch::MOVIE) {\n $wrongMovieType = true;\n }\n }\n $this->assertFalse($wrongMovieType, \"Should only return \". TitleSearch::MOVIE);\n }", "public function getSpoil($array) {\n $client = new \\AlgoliaSearch\\Client('KMJ42U25W4', '1458f0776b9eb5750afc6566782ce6c9');\n $index = $client->initIndex('movies');\n\n $tweets = DB::table('tweet')->get();\n foreach ($array as $key => $value) {\n\n foreach ($tweets as $key => $value) {\n $query = (object) $index->search($value->movie_title);\n\n $spoil = $query->hits[0][\"spoil\"];\n\n if(is_array($spoil)) {\n $rand = array_rand($spoil, 1);\n $response = $spoil[$rand];\n } else {\n $response = $spoil;\n }\n\n DB::table('tweet')->update(\n ['spoil' => $response]\n );\n }\n\n }\n }", "function SyncNameWithIndex($array)\n{\n\t$final_array = array();\n\n\tif(is_array($array))\n\t{\n\t\tforeach ($array as $key => $value) {\n\t\t\t$final_array[] = $key;\n\t\t}\n\t\treturn $final_array;\n\t}\n\telse{\n\t\treturn false;\n\t}\n}", "private function genSearchIndex()\n\t{\n\t\t/*\n\t\t * The big array we want to fill ;)\n\t\t */\n\t\t$index = array();\n\t\t\n\t\t/*\n\t\t * Buddies Load persons in the index array that connected with the user\n\t\t */\n\t\t\n\t\t$model = loadModel('buddy');\n\t\tif($buddies = $model->listBuddies())\n\t\t{\n\t\t\t$result = array();\n\t\t\tforeach ($buddies as $b)\n\t\t\t{\n\t\t\t\t$img = '/img/avatar-mini.png';\n\t\t\t\t\n\t\t\t\tif(!empty($b['photo']))\n\t\t\t\t{\n\t\t\t\t\t$img = img($b['photo']);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$result[] = array(\n\t\t\t\t\t'name' => $b['name'].' '.$b['nachname'],\n\t\t\t\t\t'teaser' => '',\n\t\t\t\t\t'img' => $img,\n\t\t\t\t\t'click' => 'chat(\\''.$b['id'].'\\');',\n\t\t\t\t\t'id' => $b['id'],\n\t\t\t\t\t'search' => array(\n\t\t\t\t\t\t$b['name'],$b['nachname']\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t\t$index[] = array(\n\t\t\t\t'title' => 'Menschen die Du kennst',\n\t\t\t\t'key' => 'buddies',\n\t\t\t\t'result' => $result\n\t\t\t);\n\t\t}\n\t\t\n\t\t/*\n\t\t * Groups load Groups connected to the user in the array\n\t\t*/\n\t\t$model = loadModel('groups');\n\t\tif($groups = $model->listMyGroups())\n\t\t{\n\t\t\t$result = array();\n\t\t\tforeach ($groups as $b)\n\t\t\t{\n\t\t\t\t$img = '/img/groups.png';\n\t\t\t\tif(!empty($b['photo']))\n\t\t\t\t{\n\t\t\t\t\t$img = 'images/' . str_replace('photo/','photo/thumb_',$b['photo']);\n\t\t\t\t}\n\t\t\t\t$result[] = array(\n\t\t\t\t\t\t'name' => $b['name'],\n\t\t\t\t\t\t'teaser' => tt($b['teaser'],65),\n\t\t\t\t\t\t'img' => $img,\n\t\t\t\t\t\t'href' => '/?page=bezirk&bid='.$b['id'].'&sub=forum',\n\t\t\t\t\t\t'search' => array(\n\t\t\t\t\t\t\t$b['name']\n\t\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t\t$index[] = array(\n\t\t\t\t\t'title' => 'Deine Gruppen',\n\t\t\t\t\t'result' => $result\n\t\t\t);\n\t\t}\n\t\t\n\t\t/*\n\t\t * Betriebe load food stores connected to the user in the array\n\t\t */\n\t\t$model = loadModel('betrieb');\n\t\tif($betriebe = $model->listMyBetriebe())\n\t\t{\n\t\t\t$result = array();\n\t\t\tforeach ($betriebe as $b)\n\t\t\t{\n\t\t\t\t$result[] = array(\n\t\t\t\t\t\t'name' => $b['name'],\n\t\t\t\t\t\t'teaser' => $b['str'].' '.$b['hsnr'].', '.$b['plz'].' '.$b['stadt'],\n\t\t\t\t\t\t'href' => '/?page=fsbetrieb&id='.$b['id'],\n\t\t\t\t\t\t'search' => array(\n\t\t\t\t\t\t\t$b['name'],$b['str']\n\t\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t\t$index[] = array(\n\t\t\t\t\t'title' => 'Deine Betriebe',\n\t\t\t\t\t'result' => $result\n\t\t\t);\n\t\t}\n\t\t\n\t\t/*\n\t\t * Bezirke load Bezirke connected to the user in the array\n\t\t*/\n\t\t$model = loadModel('bezirk');\n\t\tif($bezirke = $model->listMyBezirke())\n\t\t{\n\t\t\t$result = array();\n\t\t\tforeach ($bezirke as $b)\n\t\t\t{\n\t\t\t\t$result[] = array(\n\t\t\t\t\t\t'name' => $b['name'],\n\t\t\t\t\t\t'teaser' => '',\n\t\t\t\t\t\t'img' => false,\n\t\t\t\t\t\t'href' => '/?page=bezirk&bid='.$b['id'].'&sub=forum',\n\t\t\t\t\t\t'search' => array(\n\t\t\t\t\t\t\t\t$b['name']\n\t\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t\t$index[] = array(\n\t\t\t\t\t'title' => 'Deine Bezirke',\n\t\t\t\t\t'result' => $result\n\t\t\t);\n\t\t}\n\t\t\n\t\t/*\n\t\t * Get or set an individual token as filename for the public json file\n\t\t*/\n\t\tif($token = S::user('token'))\n\t\t{\n Storage::disk('searchindex')->put($token . '.json', json_encode($index));\n\t\t\treturn $token;\n\t\t}\n\t\t\n\t\t\n\t\treturn false;\n\t}", "function paperIndex($order = 'title')\n{\n $result = mysql_query(\"select code, paper_title title \n from paper \n order by \".$order);\n /* Iteration to get all info about paper */\n for ($i=0; $row = mysql_fetch_array($result);$i++){\n /* Iteration to get all paper's author(s) */\n $temporal = mysql_query(\"select a.author_name name, a.author_lastname lastname, \n a.author_webpage webpage \n from author a, authoring at \n where at.code_author = a.code and at.code_paper = \".$row['code'].\"\n order by at.author_order\");\n\n for ($j=0; $tmp_row = mysql_fetch_array($temporal); $j++){\n $author[$j] = array('name' => $tmp_row['name'], \n\t\t\t 'lastname' => $tmp_row['lastname'], \t\t\t\n\t\t\t 'webpage' => $tmp_row['webpage']);\n }\n /*Iteration to get all paper's tutor(s) */\n $temporal = mysql_query(\"select t.tutor_name name, t.tutor_lastname lastname, \n t.tutor_webpage webpage \n from tutor t, tutoring tu \n where tu.code_tutor = t.code and tu.code_paper = \".$row['code']);\n for ($j=0; $tmp_row = mysql_fetch_array($temporal); $j++){\n $tutor[$j] = array('name' => $tmp_row['name'], \n\t\t\t 'lastname' => $tmp_row['lastname'], \t\t\t\n\t\t\t 'webpage' => $tmp_row['webpage']);\n\n\n }\n\n /* Here we put together all the information */\n $paper[$i] = array(\t'code' => $row['code'],\n\t\t\t'title' => $row['title'],\n\t\t\t'author' => $author,\n\t\t\t'tutor' => $tutor);\n unset($tutor);\n unset($author);\n }\t\n return $paper;\n}", "public static function array_duplicate_values ($array)\r\n\t{\r\n\t\t$checkKeysUniqueComparison = create_function ('$value', 'if ($value > 1) return true;');\r\n\t\t$result = array_keys (array_filter (array_count_values ($array), $checkKeysUniqueComparison));\r\n\t\treturn $result;\r\n\t}", "public function memcache_get_movies_list_by_provider_keyed_by_id($provider_name) {\n $found = false;\n $error_messages = array();\n $searchkeyvalues = array(\"provider\" => $provider_name, \"movies\" => \"movies\",\n \"keyed_by\" => \"id\");\n // Try memcached first, \n if ($this->verbose == true) {\n echo \"<br/>Trying memcached for movies list \" . $provider_name;\n }\n\n list($found, $movies_keyed_by_id, $error_message) = $this->memcache_store->get_search($searchkeyvalues);\n\n\n $error_messages[] = $error_message;\n\n if ($found == true) {\n if ($this->verbose == true) {\n echo \"<br/>Found movies list in memcached\";\n }\n }\n\n if ($found == false) {\n if ($this->verbose == true) {\n echo \"<br/>Didn't find movies list in memcached \";\n }\n list($movies_keyed_by_id, $new_error_messages) = $this->curl_get_movies_list_by_provider_keyed_by_id_retry($provider_name);\n\n $error_messages = array_merge($error_messages, $new_error_messages);\n\n if ($movies_keyed_by_id != array()) {\n if ($this->verbose == true) {\n echo \"<br/>Storing movies list in memcached \";\n }\n\n $this->memcache_store->store_search($searchkeyvalues, $movies_keyed_by_id, $this->memcache_expiry);\n }\n }\n\n return array($movies_keyed_by_id, $error_messages);\n }", "public static function unique_array($arr) {\n\t\t$common = null;\n\n\t\tsort($arr);\n \treset($arr);\n \t$newarr = array ();\n \t$i = 0;\n \t$counter = 1;\n\n $element = current($arr);\n\n if (Config::getInstance() -> INDEX_NUMBERS == false) {\n $pattern = \"/[0-9]+/\";\n } else {\n $pattern = \"/[ ]+/\";\n }\n\n $regs = Array ();\n for ($n = 0; $n < sizeof($arr); $n ++) {\n //check if word is long enough, does not contain characters as defined in $pattern and is not a common word\n //to eliminate/count multiple instance of words\n $next_in_arr = next($arr);\n\n if (strlen($next_in_arr) >= Config::getInstance() -> MIN_WORD_LENGTH || !$next_in_arr) {\n\n if (Config::getInstance() -> CASE_SENSITIVE == true) { // compare words by means of upper and lower case characters (e.g. for Chinese language)\n if ($next_in_arr != $element) {\n if (strlen($element) >= Config::getInstance() -> MIN_WORD_LENGTH && !preg_match($pattern, $element) && ($common[$element] != 1)) {\n if (preg_match(\"/^(-|\\\\\\')(.*)/\", $element, $regs))\n $element = $regs[2];\n\n if (preg_match(\"/(.*)(\\\\\\'|-)$/\", $element, $regs))\n $element = $regs[1];\n \t\t\t\t\t\t\t$newarr[$i] = new \\BrightSearch\\Keyword($element, $counter);\n $element = current($arr);\n $i ++;\n $counter = 1;\n } else {\n $element = $next_in_arr;\n $counter = 1; // otherwise the count will be the amount of skipped words\n }\n } else {\n if ($counter < Config::getInstance() -> WORD_UPPER_BOUND)\n $counter ++;\n }\n\n } else { // compare all words only using lower case characters\n\n if ($next_in_arr != $element) {\n if (strlen($element) >= Config::getInstance() -> MIN_WORD_LENGTH && !preg_match($pattern, $element) && ($common[strtolower($element)] != 1)) {\n if (preg_match(\"/^(-|\\\\\\')(.*)/\", $element, $regs))\n $element = $regs[2];\n\n if (preg_match(\"/(.*)(\\\\\\'|-)$/\", $element, $regs))\n $element = $regs[1];\n\n \t\t\t\t\t\t\t$newarr[$i] = new \\BrightSearch\\Keyword($element, $counter);\n $element = current($arr);\n $i ++;\n $counter = 1;\n } else {\n $element = $next_in_arr;\n $counter = 1; // otherwise the count will be the amount of skipped words\n }\n } else {\n if ($counter < Config::getInstance() -> WORD_UPPER_BOUND)\n $counter ++;\n }\n }\n }\n }\n\n \treturn $newarr;\n }", "public function run()\n {\n //\n $movies = [\n ['mov_id'=>901,'mov_title'=>'Vertigo','mov_year'=>1958,'mov_time'=>128,'mov_lang'=>'English','mov_dt_rel'=>'1958-08-24','mov_rel_country'=>'UK'],\n ['mov_id'=>902,'mov_title'=>'The Innocents','mov_year'=>1961,'mov_time'=>100,'mov_lang'=>'English','mov_dt_rel'=>'1962-02-19','mov_rel_country'=>'SW'],\n ['mov_id'=>903,'mov_title'=>'Lawrence of Arabia','mov_year'=>1962,'mov_time'=>216,'mov_lang'=>'English','mov_dt_rel'=>'1962-12-11','mov_rel_country'=>'UK'],\n ['mov_id'=>904,'mov_title'=>'The Deer Hunter','mov_year'=>1978,'mov_time'=>183,'mov_lang'=>'English','mov_dt_rel'=>'1979-03-08','mov_rel_country'=>'UK'],\n ['mov_id'=>905,'mov_title'=>'Amadeus','mov_year'=>1984,'mov_time'=>160,'mov_lang'=>'English','mov_dt_rel'=>'1985-01-07','mov_rel_country'=>'UK'],\n ['mov_id'=>906,'mov_title'=>'Blade Runner','mov_year'=>1982,'mov_time'=>117,'mov_lang'=>'English','mov_dt_rel'=>'1982-09-09','mov_rel_country'=>'UK'],\n ['mov_id'=>907,'mov_title'=>'Eyes Wide Shut','mov_year'=>1999,'mov_time'=>159,'mov_lang'=>'English','mov_dt_rel'=>null,'mov_rel_country'=>'UK'],\n ['mov_id'=>908,'mov_title'=>'The Usual Suspects','mov_year'=>1995,'mov_time'=>106,'mov_lang'=>'English','mov_dt_rel'=>'1995-08-25','mov_rel_country'=>'UK'],\n ['mov_id'=>909,'mov_title'=>'Chinatown','mov_year'=>1974,'mov_time'=>130,'mov_lang'=>'English','mov_dt_rel'=>'1974-08-09','mov_rel_country'=>'UK'],\n ['mov_id'=>910,'mov_title'=>'Boogie Nights','mov_year'=>1997,'mov_time'=>155,'mov_lang'=>'English','mov_dt_rel'=>'1998-02-16','mov_rel_country'=>'UK'],\n ['mov_id'=>911,'mov_title'=>'Annie Hall','mov_year'=>1977,'mov_time'=>93,'mov_lang'=>'English','mov_dt_rel'=>'1977-04-20','mov_rel_country'=>'USA'],\n ['mov_id'=>912,'mov_title'=>'Princess Mononoke','mov_year'=>1997,'mov_time'=>134,'mov_lang'=>'Japanese','mov_dt_rel'=>'2001-10-19','mov_rel_country'=>'UK'],\n ['mov_id'=>913,'mov_title'=>'The Shawshank Redemption','mov_year'=>1994,'mov_time'=>142,'mov_lang'=>'English','mov_dt_rel'=>'1995-02-17','mov_rel_country'=>'UK'],\n ['mov_id'=>914,'mov_title'=>'American Beauty','mov_year'=>1999,'mov_time'=>122,'mov_lang'=>'English','mov_dt_rel'=>null,'mov_rel_country'=>'UK'],\n ['mov_id'=>915,'mov_title'=>'Titanic','mov_year'=>1997,'mov_time'=>194,'mov_lang'=>'English','mov_dt_rel'=>'1998-01-23','mov_rel_country'=>'UK'],\n ['mov_id'=>916,'mov_title'=>'Good Will Hunting','mov_year'=>1997,'mov_time'=>126,'mov_lang'=>'English','mov_dt_rel'=>'1998-06-03','mov_rel_country'=>'UK'],\n ['mov_id'=>917,'mov_title'=>'Deliverance','mov_year'=>1972,'mov_time'=>109,'mov_lang'=>'English','mov_dt_rel'=>'1982-10-05','mov_rel_country'=>'UK'],\n ['mov_id'=>918,'mov_title'=>'Trainspotting','mov_year'=>1996,'mov_time'=>94,'mov_lang'=>'English','mov_dt_rel'=>'1996-02-23','mov_rel_country'=>'UK'],\n ['mov_id'=>919,'mov_title'=>'The Prestige','mov_year'=>2006,'mov_time'=>130,'mov_lang'=>'English','mov_dt_rel'=>'2006-11-10','mov_rel_country'=>'UK'],\n ['mov_id'=>920,'mov_title'=>'Donnie Darko','mov_year'=>2001,'mov_time'=>113,'mov_lang'=>'English','mov_dt_rel'=>null,'mov_rel_country'=>'UK'],\n ['mov_id'=>921,'mov_title'=>'Slumdog Millionaire','mov_year'=>2008,'mov_time'=>120,'mov_lang'=>'English','mov_dt_rel'=>'2009-01-09','mov_rel_country'=>'UK'],\n ['mov_id'=>922,'mov_title'=>'Aliens','mov_year'=>1986,'mov_time'=>137,'mov_lang'=>'English','mov_dt_rel'=>'1986-08-29','mov_rel_country'=>'UK'],\n ['mov_id'=>923,'mov_title'=>'Beyond the Sea','mov_year'=>2004,'mov_time'=>118,'mov_lang'=>'English','mov_dt_rel'=>'2004-11-26','mov_rel_country'=>'UK'],\n ['mov_id'=>924,'mov_title'=>'Avatar','mov_year'=>2009,'mov_time'=>162,'mov_lang'=>'English','mov_dt_rel'=>'2009-12-17','mov_rel_country'=>'UK'],\n ['mov_id'=>926,'mov_title'=>'Seven Samurai','mov_year'=>1954,'mov_time'=>207,'mov_lang'=>'Japanese','mov_dt_rel'=>'1954-04-26','mov_rel_country'=>'JP'],\n ['mov_id'=>927,'mov_title'=>'Spirited Away','mov_year'=>2001,'mov_time'=>125,'mov_lang'=>'Japanese','mov_dt_rel'=>'2003-09-12','mov_rel_country'=>'UK'],\n ['mov_id'=>928,'mov_title'=>'Back to the Future','mov_year'=>1985,'mov_time'=>116,'mov_lang'=>'English','mov_dt_rel'=>'1985-12-04','mov_rel_country'=>'UK'],\n ['mov_id'=>925,'mov_title'=>'Braveheart','mov_year'=>1995,'mov_time'=>178,'mov_lang'=>'English','mov_dt_rel'=>'1995-09-08','mov_rel_country'=>'UK'],\n ];\n\n DB::table('movie')->insert($movies);\n\n }", "function movieArray(){\n $movieObject = [\n 'ACT' => [\n 'title' => \"The Girl in the Spiders Web\",\n 'rating' => \"MA15+\",\n 'description' => \"Lisbeth Salander, the cult figure and title character of the acclaimed Millennium book series created by Stieg Larsson, will return to the screen in The Girl in the Spider’s Web, a first-time adaptation of the recent global bestseller. Golden Globe winner Claire Foy, the star of “The Crown,” will play the outcast vigilante defender under the direction of Fede Alvarez, the director of 2016’s breakout thriller Don’t Breathe; the screenplay adaptation is by Steven Knight and Fede Alvarez & Jay Basu.\",\n 'poster' => \"girl_in_the_spiders_web.png\",\n 'trailer' => \"https://www.youtube.com/embed/XKMSP9OKspQ?controls=0\",\n 'sessions' => [\n 'wednesday' => '9PM',\n 'thursday' => '9PM',\n 'friday' => '9PM',\n 'saturday' => '6PM',\n 'sunday' => '6PM'\n ]\n ],\n 'RMC' => [\n 'title' => \"A Star Is Born\",\n 'rating' => \"M\",\n 'description' => \"In this new take on the tragic love story, he plays seasoned musician Jackson Maine, who discovers—and falls in love with—struggling artist Ally (Gaga). She has just about given up on her dream to make it big as a singer... until Jack coaxes her into the spotlight. But even as Ally’s career takes off, the personal side of their relationship is breaking down, as Jack fights an ongoing battle with his own internal demons.\",\n 'poster' => \"a_star_is_born.png\",\n 'trailer' => \"https://www.youtube.com/embed/nSbzyEJ8X9E?controls=0\",\n 'sessions' => [\n 'monday' => '6PM',\n 'tuesday' => '6PM',\n 'saturday' => '3PM',\n 'sunday' => '3PM'\n ]\n ],\n 'ANM' => [\n 'title' => \"Ralph Breaks the Internet\",\n 'rating' => \"PG\",\n 'description' => \"Ralph Breaks the Internet: Wreck-It Ralph 2” leaves Litwak’s video arcade behind, venturing into the uncharted, expansive and thrilling world of the internet—which may or may not survive Ralph’s wrecking. Video game bad guy Ralph (voice of John C. Reilly) and fellow misfit Vanellope von Schweetz (voice of Sarah Silverman) must risk it all by traveling to the world wide web in search of a replacement part to save Vanellope’s video game, Sugar Rush.\",\n 'poster' => \"ralph_breaks_the_internet.png\",\n 'trailer' => \"https://www.youtube.com/embed/_BcYBFC6zfY?controls=0\",\n 'sessions' => [\n 'monday' => '12PM',\n 'tuesday' => '12PM',\n 'wednesday' => '6PM',\n 'thursday' => '6PM',\n 'friday' => '6PM',\n 'saturday' => '12PM',\n 'sunday' => '12PM'\n ]\n ],\n 'AHF' => [\n 'title' => \"Boy Erased\",\n 'rating' => \"MA15+\",\n 'description' => \" “Boy Erased” tells the story of Jared (Hedges), the son of a Baptist pastor in a small American town, who is outed to his parents (Kidman and Crowe) at age 19. Jared is faced with an ultimatum: attend a conversion therapy program – or be permanently exiled and shunned by his family, friends, and faith. Boy Erased is the true story of one young man’s struggle to find himself while being forced to question every aspect of his identity.\",\n 'poster' => \"boy_erased.png\",\n 'trailer' => \"https://www.youtube.com/embed/-B71eyB_Onw?controls=0\",\n 'sessions' => [\n 'wednesday' => '12PM',\n 'thursday' => '12PM',\n 'friday' => '12PM',\n 'saturday' => '9PM',\n 'sunday' => '9PM'\n ]\n ]\n ];\n return $movieObject;\n}", "function authorIndex()\n{\n $result = mysql_query(\"select code, author_lastname lastname, author_name name \n from author \n order by author_lastname\");\n for ($i=0; $row = mysql_fetch_array($result);$i++){\n $author[$i] = array('code' => $row['code'],\n\t\t\t'name' => $row['name'], \n\t\t\t'lastname'=> $row['lastname']);\n }\t\n return $author;\n}", "private function makeTableNamesArray($array){\n\n \t\t$tableNames;\n \t \t$count = 0;\n\n \t\n\t \tforeach($array as $row){\n\t $searchElement = $row['table_name'];\n\t if($count !=0 && $searchElement != $tableNames[$count-1] ){\n\t $tableNames[$count]=$searchElement;\n\t $count++;\n\t }\n\t else if ($count == 0){\n\t $tableNames[0] = $array[0]['table_name'];\n\t $count++;\n\t }\n\n\t }\n\n \treturn $tableNames;\n \t}", "function is_index_array($array, $index)\n{\n\tif( is_array($array) )\n\t{\n\t\tforeach($array as $key => $value)\n\t\t{\n\t\t\tif(isset($value[$index]))\n\t\t\t{\n\t\t\t\t$new_array[$value[$index]] = $value;\n\t\t\t}\n\t\t}\n\t\treturn $new_array;\n\t}\n}", "public function searchByName($name){\n $projections=$this->getAllProjectionsGroup();\n $arrayFinded = array();\n foreach ($projections as $value) {\n $movie=$value->getMovie();\n if (stripos($movie->getTitle(),$name)!==false)\n {\n array_push($arrayFinded,$value);\n }\n }\n return $arrayFinded; \n }", "function match_venues_to_used_meta($venue_array){\n\tglobal $wpdb;\n\t//build query array\n\tforeach($venue_array as $id => $title){\n\t\t$query[$id] = \"SELECT post_id FROM $wpdb->postmeta WHERE meta_value='$id'\";\n\t}\n\t//run queries\n\tforeach ($query as $id => $query){\n\t\t$post_ID_query[$id]= $wpdb->get_results($query);\n\t}\n\t//find lengths of arrays(to establish if they have been used in posts)\n\tforeach ($post_ID_query as $id=>$count){\n\t\t$counted[$id]=count($count);\n\t}\n\t//remove all elements that equal 0, and place key's as value\n\tforeach ($counted as $id=>$count){\n\t\tif($count>0){\n\t\t\t$used_venue[]=$id;\n\t\t};\n\t}\n\t//get final $id=>$title array of used venues\n\tforeach ($venue_array as $id=>$title){\n\t\tif(in_array($id,$used_venue)){\n\t\t\t$final_used_venue_list[$id]=$title;\n\t\t}\n\t}\n\t\n\treturn $final_used_venue_list;\n}", "function indexBy ($field)\n {\n $this->A = array_indexBy ($this->A, $field);\n return $this;\n }", "public static function findDuplicateEntries($rowData)\n {\n // For all modes, limit to the same department owner_acronym\n\n $totalDuplicates = 0;\n\n // mode 1: same contract_value, same gen_vendor_normalized, same raw_contract_date\n $duplicateRows = DB::table('l_contracts')\n ->where('owner_acronym', '=', $rowData['owner_acronym'])\n ->where('gen_is_duplicate', '=', 0)\n ->where('gen_is_error', '=', 0)\n ->where('contract_value', '=', $rowData['contract_value'])\n ->where('gen_vendor_normalized', '=', $rowData['gen_vendor_normalized'])\n ->where('raw_contract_date', '=', $rowData['raw_contract_date'])\n ->whereNotNull('source_fiscal')\n ->orderBy('source_fiscal', 'asc')\n ->orderBy('id', 'asc')\n ->pluck('id');\n\n if ($duplicateRows->count() > 1) {\n // Then, there's duplicates based on this method.\n $totalDuplicates += self::markDuplicateEntries($rowData['owner_acronym'], $duplicateRows, 1);\n }\n\n\n // mode 2: same contract_value, same gen_vendor_normalized, same reference_number, same gen_start_year\n // (in case the raw contract dates are formatted inconsistently or missing)\n $duplicateRows = DB::table('l_contracts')\n ->where('owner_acronym', '=', $rowData['owner_acronym'])\n ->where('gen_is_duplicate', '=', 0)\n ->where('gen_is_error', '=', 0)\n ->where('contract_value', '=', $rowData['contract_value'])\n ->where('gen_vendor_normalized', '=', $rowData['gen_vendor_normalized'])\n ->where('reference_number', '=', $rowData['reference_number'])\n ->where('gen_start_year', '=', $rowData['gen_start_year'])\n ->whereNotNull('source_fiscal')\n ->orderBy('source_fiscal', 'asc')\n ->orderBy('id', 'asc')\n ->pluck('id');\n\n if ($duplicateRows->count() > 1) {\n // Then, there's duplicates based on this method.\n $totalDuplicates += self::markDuplicateEntries($rowData['owner_acronym'], $duplicateRows, 2);\n }\n\n // mode 3: same gen_vendor_normalized and same reference_number\n // (in case both the raw contract dates and the vendor names are input inconsistently)\n $duplicateRows = DB::table('l_contracts')\n ->where('owner_acronym', '=', $rowData['owner_acronym'])\n ->where('gen_is_duplicate', '=', 0)\n ->where('gen_is_error', '=', 0)\n ->where('contract_value', '=', $rowData['contract_value'])\n ->where('reference_number', '=', $rowData['reference_number'])\n ->whereNotNull('source_fiscal')\n ->orderBy('source_fiscal', 'asc')\n ->orderBy('id', 'asc')\n ->pluck('id');\n\n if ($duplicateRows->count() > 1) {\n // Then, there's duplicates based on this method.\n $totalDuplicates += self::markDuplicateEntries($rowData['owner_acronym'], $duplicateRows, 3);\n }\n\n return $totalDuplicates;\n }", "function quiz_report_index_by_keys($datum, $keys, $keysunique=true){\n if (!$datum){\n return $datum;\n }\n $key = array_shift($keys);\n $datumkeyed = array();\n foreach ($datum as $data){\n if ($keys || !$keysunique){\n $datumkeyed[$data->{$key}][]= $data;\n } else {\n $datumkeyed[$data->{$key}]= $data;\n }\n }\n if ($keys){\n foreach ($datumkeyed as $datakey => $datakeyed){\n $datumkeyed[$datakey] = quiz_report_index_by_keys($datakeyed, $keys, $keysunique);\n }\n }\n return $datumkeyed;\n}", "function test_getArrayByName() {\r\n\t\t$rowset = array(array(\"memberClassId\" => 1, \"memberClassName\" => \"reader\"),\r\n\t\t\t\tarray(\"memberClassId\" => 2, \"memberClassName\" => \"nosher\"));\r\n\t\t$myArray = MemberClassesDB::getArray($rowset, \"memberClassName\", \"memberClassId\");\r\n\t\t$this->assertEqual($myArray['reader'], 1, \r\n\t\t \"Should return 1 for key of reader but returned \".$myArray['reader']);\r\n\t\t$this->assertEqual($myArray['nosher'], 2,\r\n\t\t\t\t\"Should return 2 for key of nosher but returned \".$myArray['nosher']);\r\n\t}", "function ldap_key_by ($i_array, $key) {\n\t$result = array();\n\tforeach ($i_array as $record) {\n\t\tif (!isset($record[$key]))\n\t\t\tcontinue;\n\t\t$result[$record[$key]] = $record;\n\t}\nreturn($result);\n}", "private function searchableNames()\n {\n $pests = Pest::all();\n\n $searchableNames = new SearchableName();\n\n foreach(range(1,300) as $index)\n {\n SearchableName::create([\n\n 'searchable_type' => 'App\\Models\\Pest',\n\n 'name' => $this->faker->word . ' ' . $this->faker->colorName\n ]);\n }\n\n $searchableNamesIds = $searchableNames->pests()->lists('id')->toArray();\n\n foreach(range(1,400) as $index) {\n\n $pests[rand(1, 199)]->searchableNames()->attach($this->faker->randomElement($searchableNamesIds));\n }\n }", "public function arrayMergeKeepsIndexesAfterMerge() {}", "function Pluf_Model_RemoveDuplicates($array)\n{\n $res = array();\n foreach ($array as $model) {\n if (!Pluf_Model_InArray($model, $res)) {\n $res[] = $model;\n }\n }\n return $res;\n}", "function add_artist(&$artists, $new_artists) {\n foreach($new_artists as $new_artist_name => $new_artist_data) {\n if (!array_key_exists($new_artist_name, $artists)) {\n $artists[$new_artist_name] = $new_artist_data;\n }\n }\n}", "public function get_collated_movie_list_with_details() {\n $movies = $this->movies;\n $error_messages = array();\n\n foreach ($this->movie_providers as $provider_name => $provider) {\n\n list($movies[$provider_name], $new_error_messages) = $this->cache_logic_get_movies_list_by_provider_keyed_by_name_and_year($provider_name);\n $error_messages = array_merge($error_messages, $new_error_messages);\n }\n\n foreach ($movies as $provider_name => $provider_movies) {\n foreach ($provider_movies as $name_and_year => $movie) {\n $id = $movie->ID;\n list($movie, $error_messages) = $this->cache_logic_get_movie_details_by_provider_and_id($provider_name, $id);\n $name_and_year = $movie->get_display_name();\n $movies[$provider_name][$name_and_year] = $movie;\n }\n }\n\n $all_movies = $this->collate_multiple_provider_movie_lists_by_name_and_year($movies);\n\n return $all_movies;\n }", "public function buildIndex();", "function eventcard_array($array, $pmv, $eventid, $__repeatInterval){\n\t\t\t\t$array['evorsvp']= array(\n\t\t\t\t\t'event_id' => $eventid,\n\t\t\t\t\t'value'=>'tt',\n\t\t\t\t\t'__repeatInterval'=>(!empty($__repeatInterval)? $__repeatInterval:0)\n\t\t\t\t);\n\t\t\t\treturn $array;\n\t\t\t}", "function filtrar(&$array, $clave_orden ) {\n $array_filtrado = array(); \n foreach($array as $index=>$array_value) {\n $value = $array_value[$clave_orden];\n unset($array_value[$clave_orden]);\n\t$array_filtrado[$value][] = $array_value;\n }\n $array = $array_filtrado; \n}", "function index_array($array, $index, $multi = FALSE)\n{\n\tif( is_array($array) )\n\t{\n\t\t// if multikey = TRUE\n\t\tif($multi == TRUE)\n\t\t{\n\t\t\t// loop through array\n\t\t\tforeach($array as $key => $value)\n\t\t\t{\n\t\t\t\tif(isset($value[$index]))\n\t\t\t\t{\n\t\t\t\t\t$new_array[$value[$index]][$key] = $value;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$new_array['noindex'][$key] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// if unique keys expected\n\t\telse\n\t\t{\n\t\t\t// loop through array\n\t\t\tforeach($array as $key => $value)\n\t\t\t{\n\t\t\t\tif(isset($value[$index]))\n\t\t\t\t{\n\t\t\t\t\t$new_array[$value[$index]] = $value;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$new_array['noindex'][$key] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// check if array exists\n\t\tif( isset($new_array) && is_array($new_array) )\n\t\t{\n\t\t\treturn $new_array;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// if array does not exists return empty array\n\t\t\treturn array(null);\n\t\t}\n\t}\n}", "public function findIfSamePPAdded($criteria, $dataarray){\n\t\t$index = array();\n\t\tif(!empty($dataarray)){\n\t\t\tforeach($dataarray as $key => $value){\n\t\t\t\t//echo \"<br/>\".$criteria['client_id'].\" = \".$value['client_id'].\" & \".$criteria['client_case_id'].\" = \".$value['client_case_id'].\" & \".$criteria['team_loc'] .\" == \". $value['team_loc'].\" && \".$criteria['pricing_id'].\" == \".$value['pricing_id'].\" && \".$criteria['unit_price_id'].\" == \".$value['unit_price_id'].\" && \".$criteria['final_rate'].\" == \".$value['final_rate'];\n\t\t\t\tif($criteria['client_id'] == $value['client_id'] && $criteria['client_case_id'] == $value['client_case_id'] && $criteria['team_loc'] == $value['team_loc'] && $criteria['pricing_id'] == $value['pricing_id'] && $criteria['unit_price_id'] == $value['unit_price_id'] && $criteria['final_rate'] == $value['final_rate']){\n\t\t\t\t\t$index['key'] = $key;\n\t\t\t\t\t$index['quantity'] = $value['quantity'];\n\t\t\t\t\t$index['pricing_id'] = $value['pricing_id'];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $index;\n\t}", "function findIt(array $seq){\n//make an associative array for each entry but..\n//if the key exists, then increase the count of that array by one\n\n//for each thing, see if a key exists\n//if it does then add to it,\n//else make a new key\n $keyArray = Array();\n\n for($i=0; $i<count($seq); $i++){\n \n if(array_key_exists($seq[$i], $keyArray)){\n $keyArray[$seq[$i]] += 1;\n }\n else{\n $keyArray[$seq[$i]] = 1;\n }\n }\n\n// return $keyArray;\n\n foreach($keyArray as $entry => $value){\n\n if($value % 2 != 0){\n return $entry;\n\n }\n }\n\n}", "public function providerMatches()\n {\n return array(\n array('[DBNL] One Piece - 179 - A Raid! The Tin Tyrant and Tin Plate Wapol! [x264][D1F15206].mkv', 1, 179,'format8'),\n array('12 Oz. Mouse - S2E01 - Bowtime.avi', 2, 1, 'format1'),\n array('fdsgdfgdfgdf s01E3', 1, 3,'format1'),\n array('s1e01 - Hired.avi', 1, 1, 'format1'),\n array('24 - 5x01 (HR.HDTV).avi', 5, 1,'format2'),\n array('24 s01e01 - 0000-0100 PAL DVD.mkv', 1, 1, 'format1'),\n array('24 S07E23 720p BluRay DTS x264-CtrlHD.mkv', 7, 23,'format1'),\n array('24.618.hr.hdtv.xvid-tvff.avi', 6, 18,'format5'),\n array('30 Rock S01E01 720p WEB-DL DD5.1 AVC-CtrlHD.mkv', 1, 01,'format1'),\n array('30 Rock S04E01 Season Four 720p WEB-DL H.264 DD5.1.mkv', 4, 1,'format1'),\n array('3rd Rock from the Sun - 1x01 - Brains and Eggs.avi', 1, 1,'format2'),\n array('at.s03e01.tvrip-miragetv.avi', 3,1,'format1'),\n array('Im Alan Partridge - S01E01 - A Room With An Alan [dd].avi', 1, 1,'format1'),\n array('american.dad.316.pdtv-0tv.avi', 3, 16,'format5'),\n array('American Dad! - 1x01 - Pilot (pdtv).avi', 1, 1,'format2'),\n array('astroboy.1980s.02.the.birth.of.astro.boy-dvdrip.xvid.avi', 1, 2,'format6'),\n array('Bakemonogatari_Ep02_[1080p,BluRay,x264]_-_qIIq-THORA.mkv', 1, 2,'format4'),\n array('[DBNL] One Piece - 079 - A Raid! The Tin Tyrant and Tin Plate Wapol! [x264][D1F15206].mkv', 1, 79,'format8'),\n array('[DBNL] One Piece - 179 - A Raid! The Tin Tyrant and Tin Plate Wapol! [x264][D1F15206].mkv', 1, 179,'format8'),\n array('One Piece - 001 - I m Luffy! The Man Whos Gonna Be King of the Pirates! [x264][857DCFD6].mkv',1,1,'format8'),\n array('S02E03.mkv',2,3,'format1'),\n array('08 - A Pinky And The Brain Christmas.mpg',1,8,'format10'),\n array('Planetes.07.PSNR.mkv',1,7,'format6'),\n array('BUFFY THE VAMPIRE SLAYER - S01 E01 - WELCOME TO THE HELLMOUTH NTSC DVD DD2.0 x264 MMI.mkv',1,1,'format1'),\n array('408 - Manners.avi',4,8,'format5'),\n array('Carlos.2010.E03.720p.BluRay.x264-CiNEFiLE.mkv',1,3,'format4'),\n array('Episode 718 Whats Up Doc.avi',7,18,'format5'),\n array('Clannad_Ep05_[1080p,BluRay,x264]_-_THORA.mkv',1,5,'format4'),\n array('Code_Geass_R2_Picture_Drama_S00E13_0.923_[1080p,BluRay,x264]_-_THORA.mkv',0,13,'format1'),\n array('Shin Chan - Episode 06.avi',1,6,'format7'),\n array('2e06-Belief.mkv',2,6,'format1'),\n array('[moo-shi]_Desert_Punk_-_01[DVD][H264.AAC][17FC7F0C].mkv',1,1,'format8'),\n array('Dragons Den S07E01 - 2009-07-15 - 720p-h264-ac3-subs.mkv',7,1,'format1'),\n array('DragonsDen-2007ChristmasSpecial-S05E10.avi',5,10,'format1'),\n array('Dragons\\' Den - s6e1.avi',6,1,'format1'),\n array('EFC 0107 - Resurrection.avi',1,7,'format9'),\n array('Elfen Lied - 01 - A Chance Encounter.mkv',1,1,'format6'),\n array('E05.720p.BluRay.x264-fty.mkv',1,5,'format4'),\n array('Episode 7 - Bolognese sauce.jpg',1,7,'format7'),\n array('xpatriots.24.0815.720p.hdtv.x264-dimension.mkv',8,15,'format9'),\n array('king.of.the.hill.1306.pdtv-lol.avi',13,6,'format9'),\n array('TG1302.mkv',13,2,'format9'),\n array('EFC 0104 - Avatar.avi',1,4,'format9'),\n array('south.park.1202.dsr-0tv.avi',12,2,'format9'),\n array('Hellsing 04v2 [anime fin][6BD62B96].ogm',1,4,'format11'),\n array('Extras.2005.PAL.DVD.S02EE02.AC3.x264-sJR.mkv',2,2,'format14'),\n array('(W_B) SDF Macross 31(x264)(6BD62B96).mkv',1,31,'format12'),\n array('Star Trek Deep Space Nine s02extra03 - Sketchbook NTSC DVD x264 DD2.0-JCH.mkv',2,3,'format13'),\n );\n }", "function courseIndex()\n{\n $result = mysql_query('select c.course_name course, p.code code,\n p.paper_title title\n from paper p, course c\n where p.paper_course = c.code\n order by c.course_name, p.paper_title');\n \n /* Iteration to get all info about the paper */\n for ($i=0; $row = mysql_fetch_array($result);$i++){\n /* Iteration to get all paper's author(s) */\n $temporal = mysql_query(\"select a.author_name name, a.author_lastname lastname, \n a.author_webpage webpage \n from author a, authoring at \n where at.code_author = a.code and at.code_paper = \".$row['code'].\"\n order by at.author_order\");\n\n for ($j=0; $tmp_row = mysql_fetch_array($temporal); $j++){\n $author[$j] = array('name' => $tmp_row['name'], \n\t\t\t 'lastname' => $tmp_row['lastname'], \t\t\t\n\t\t\t 'webpage' => $tmp_row['webpage']);\n }\n /*Iteration to get all paper's tutor(s) */\n $temporal = mysql_query(\"select t.tutor_name name, t.tutor_lastname lastname, \n t.tutor_webpage webpage \n from tutor t, tutoring tu \n where tu.code_tutor = t.code and tu.code_paper = \".$row['code']);\n for ($j=0; $tmp_row = mysql_fetch_array($temporal); $j++){\n $tutor[$j] = array('name' => $tmp_row['name'], \n\t\t\t 'lastname' => $tmp_row['lastname'], \t\t\t\n\t\t\t 'webpage' => $tmp_row['webpage']);\n\n\n }\n\n /* Here we put together all the information */\n $paper[$i] = array(\t'code' => $row['code'],\n\t\t\t'title' => $row['title'],\n\t\t\t'course' => $row['course'],\n\t\t\t'author' => $author,\n\t\t\t'tutor' => $tutor);\n unset($tutor);\n unset($author);\n }\t\n return $paper;\n}", "function searchByInfo($array){\n\t\t$sql = \"SELECT * FROM Client WHERE\";\n\t\t$keys = array_keys($array);\n\t\tfor ($i = 0; $i< count($keys); $i++){\n\t\t\tif ($i==0){\n\t\t\t\t$sql = $sql.\" \".$keys[$i].\" LIKE '\".$array[$keys[$i]].\"'\";\n\t\t\t} else {\n\t\t\t\t$sql = $sql.\" AND \".$keys[$i].\" LIKE '\".$array[$keys[$i]].\"'\";\n\t\t\t}\n\t\t}\n\t\t$result = mysql_query($sql) or die(mysql_error());\n\t\t$i = 0;\n\t\twhile ($info = mysql_fetch_array($result,MYSQL_ASSOC)){//While more results\n\t\t\t$toReturn[$i] = $info;\n\t\t\t$i++;\n\t\t}\n\t\treturn $toReturn;\n\t}", "public static function byArray(array $array) {}", "function isIndexed() ;", "function cleanNamefromERMObject(array $array, string $name){\n $basicname=$name;\n $i=1;\n while(checkredundantNamefromERMObjects($array, $name)) {\n $i++;\n $name = $basicname . $i;\n }\n return $name;\n\n}", "function map_title( $ra ){\n\t\t# otherwise you must reference by number, this is not a good pattern\n\t\t$ra['title'] = trim($ra[0]);\n\t\t$ra['year'] = trim($ra[1]);\n\t\t$ra['score'] = trim($ra[2]);\n\t\t$ra['total_reviews'] = trim($ra[3]);\n\t\treturn $ra;\n\t}", "function get_years_to_search() {\n global $DB;\n $sql = \"SELECT date AS fecha FROM {report_user_statistics};\";\n $dates = $DB->get_records_sql($sql);\n $result = array();\n foreach ($dates as $date) {\n $fecha = new DateTime(\"@$date->fecha\");\n $result[$fecha->format('Y')] = $fecha->format('Y');\n }\n return $result;\n}", "public function searchAddSlidesToArray( $searchterm, &$arr ) {\r\n $recordingids = array();\r\n $recidToIndex = array();\r\n foreach( $arr as $key => $row ) {\r\n if ( isset( $row['type'] ) and $row['type'] != 'recording' )\r\n continue;\r\n\r\n $recordingids[] = $row['id'];\r\n $recidToIndex[ $row['id'] ] = $key;\r\n $arr[ $key ]['slides'] = array();\r\n }\r\n\r\n if ( empty( $recordingids ) )\r\n return $arr;\r\n\r\n // egyet kivonunk a positionsec-bol hogy biztosan lassuk a slidot\r\n $slides = $this->db->query(\"\r\n SELECT\r\n of.*,\r\n IF(of.positionsec = 0, 0, positionsec -1) AS positionsec\r\n FROM\r\n ocr_frames AS of,\r\n recordings AS r\r\n WHERE\r\n r.id = of.recordingid AND\r\n r.ocrstatus = 'onstorage' AND\r\n of.status = 'onstorage' AND\r\n of.recordingid IN('\" . implode(\"', '\", $recordingids ) . \"') AND\r\n of.ocrtext IS NOT NULL AND\r\n LENGTH(of.ocrtext) > 0 AND\r\n of.ocrtext LIKE $searchterm\r\n ORDER BY of.recordingid, of.positionsec\r\n \");\r\n foreach( $slides as $row ) {\r\n $key = $recidToIndex[ $row['recordingid'] ];\r\n $arr[ $key ]['slides'][] = $row;\r\n }\r\n\r\n return $arr;\r\n }", "function appeared_once($arr)\n{\n $array_count_values = array_count_values($arr);\n\n $single_time_comming_values_array = [];\n\n foreach ($array_count_values as $key => $val) {\n\n if ($val == 1) {\n $single_time_comming_values_array[] = $key;\n }\n }\n\n return $single_time_comming_values_array;\n}", "function produceOId(&$array) {\n for ($i = 0;$i < count($array);$i++) {\n if (!isset($array[$i]->_id)) continue;\n $array[$i]->_id = $array[$i]->_id->__toString();\n }\n\n}", "protected function _getDuplicated($names)\n {\n $matched = $results = array();\n\n /* If there is only 1 array, simply return it. */\n if (count($names) < 2) {\n return $names[0];\n }\n\n for ($i = 0; $i < count($names); ++$i) {\n if (is_array($names[$i])) {\n $results = array_merge($results, $names[$i]);\n }\n }\n\n $search = array_count_values($results);\n foreach ($search as $key => $value) {\n if ($value > 1) {\n $matched[] = $key;\n }\n }\n\n return $matched;\n }", "function yy_r122(){\n $this->_retvalue = ['unique', $this->yystack[$this->yyidx + -1]->minor, $this->yystack[$this->yyidx + 0]->minor];\n }", "function gaMatch_addPlayerResult($kidPlayerId, $win, $draw, $lost) {\n //??????????????????? does record already exist - what if player change ?????????\n $match = array_search ( $kidPlayerId , $this->gamatch_gamePlayerMap);\n if ($match === FALSE) {\n $newGame = new stdData_gameUnit_extended;\n $newGame->stdRec_loadRow($row);\n $this->gamatch_gamePlayerMap[$newGame->game_kidPeriodId] = $newGame;\n ++$this->game_opponents_count;\n $this->game_opponents_kidPeriodId[] = $kidPlayerId;\n $this->game_opponents_wins[] = $win;\n $this->game_opponents_draws[] = $draw;\n $this->game_opponents_losts[] = $lost;\n $this->gagArrayGameId[] = 0;\n } else {\n $this->game_opponents_wins[$match] += $win;\n $this->game_opponents_draws[$match] += $draw;\n $this->game_opponents_losts[$match] += $lost;\n }\n}", "function acf_add_array_key_prefix($array, $prefix)\n{\n}", "function array_unique_renumber($somearray){\n $tmparr = array_unique($somearray);\n $i=0;\n foreach ($tmparr as $v) {\n $newarr[$i] = $v;\n $i++;\n }\n return $newarr;\n}", "public function titleArray($names);", "public function run()\n {\n $artistas = array('Alan Rickman','Alejandro G. Iñárritu','Alfie Allen','Amy Adams','Anthony Hopkins','Anya Taylor-Joy','Arnold Schwarzenegger','Ben Affleck','Bill Camp','Billy Zane','Bonnie Bedelia','Bruce Willis','Carrie-Anne Moss','Chad Stahelski','Charlize Theron','Chloe Pirrie','Chris Hemsworth','Chris Pine','Christopher Nolan','Christopher Walken','Connie Nielsen','Dafne Keen','Daniel Stern','Djimon Hounsou','Edward Furlong','Edward Zwick','Elliot Page','Gal Gadot','Gary Sinise','George Miller','Giancarlo Esposito','Gina Carano','Harrison Ford','Helen Hunt','Henry Cavill','Hugh Jackman','James Cameron','James Mangold','Jason Momoa','Jennifer Connelly','Jim Carrey','Joaquin Phoenix','Joe Pesci','John Hughes','John McTiernan','Jon Favreau','Jonah Hill','Joseph Gordon-Levitt','Kate Winslet','Keanu Reeves','Kelley','Kenneth Branagh','Kristen Wiig','Lana Wachowski','Laurence Fishburne','Leonardo DiCaprio','Linda Hamilton','Macaulay Culkin','Margot Robbie','Martin Scorsese','Michael Biehn ','Michael Nyqvist','Natalie Portman','Nicholas Hoult','Patrick Stewart','Patty Jenkins','Paul Sanchez','Pedro Pascal','Ridley Scott','Robert De Niro','Robert Zemeckis','Robin Wright','Ron Howard','Russell Crowe','Rutger Hauer','Scott Frank','Sean Young','Steven Spielberg','Taylor Momsen','Todd Phillips','Tom Hanks','Tom Hardy','Will Poulter','Zack Snyder','Zazie Beetz');\n foreach ($artistas as $nomArtista) {\n $artista = new Artista();\n $artista->nombre = $nomArtista;\n $artista->save();\n }\n }", "public function filterSpecificCategories($array){\n\n $newArray = [];\n\n foreach($array as $key => $value){\n $cat = trim(strtolower(strstr($value->getArticleID()->getCategory(), ' ')));\n if($cat == \"world news\" || $cat == \"football\"/* ||$cat == \"fashion\" || $cat == \"technology\"*/){\n //test fashion whs technology $numb raus? film und politics guuut 0.8\n $newArray[$key] = $value;\n }\n\n /* if($cat == \"sport\"|| $cat == \"football\" || $cat == \"culture\" || $cat == \"art and design\"){\n $newArray[$key] = $value;\n }*/\n\n /*if( $cat == \"sport\" || $cat == \"uk news\" || $cat == \"opinion\" || $cat == \"society\" || $cat == \"business\" ||\n $cat == \"politics\" || $cat == \"world news\" || $cat == \"life and style\" || $cat == \"environment\" || $cat == \"technology\"\n ||$cat == \"television & radio\" || $cat == \"culture\" || $cat == \"art and design\" || $cat == \"film\" || $cat == \"books\"\n ||$cat == \"us news\" || $cat == \"football\" || $cat == \"fashion\" || $cat == \"travel\" || $cat == \"science\"/*){ //20 categories\n $newArray[$key] = $value;\n }*/\n\n /* if( $cat == \"us news\" || $cat == \"technology\" || $cat == \"science\" || $cat == \"sport\" || $cat == \"opinion\" ||\n $cat == \"world news\" || $cat == \"football\" || $cat == \"politics\" || $cat == \"fashion\" || $cat == \"television & radio\"\n ||$cat == \"culture\" || $cat == \"environment\" || $cat == \"art and design\" || $cat == \"life and style\" || $cat == \"travel\"/*\n || $cat == \"books\" || $cat == \"uk news\" || $cat == \"business\" || $cat == \"film\" || $cat == \"society\"){ //20 categories\n $newArray[$key] = $value;\n }\n */\n\n }\n\n\n return $newArray;\n }", "function array_counts($arr,$key,$data = 'rows')\n {\n foreach($arr as $item) {\n $item['rows'] =1;\n if (!isset($res[$item[$key]])) {\n $res[$item[$key]] = $item;\n }else{\n $res[$item[$key]][$data] +=$item['rows'] ;\n }\n }\n return $res;\n }", "function checkForDuplicateUnique(){\n $_ufields_arr = explode(\",\", $this->listSettings->GetItem(\"MAIN\", \"UNIQUE_FIELDS\"));\n $check_fields = true;\n for ($i = 0; $i < sizeof($_ufields_arr); $i ++) {\n list ($_field[$i], $_value[$i]) = explode(\"=\", $_ufields_arr[$i]);\n if (strlen($_value[$i])) {\n $check_fields = false;\n $_query_arr[$_field[$i]] = $_value[$i];\n if ($this->_data[$_field[$i]] == $_value[$i]) {\n $check_fields = true;\n }\n }\n else {\n $_query_arr[$_field[$i]] = $this->_data[$_field[$i]];\n }\n }\n if ($check_fields) {\n $_data = $this->Storage->GetByFields($_query_arr, null);\n }\n else {\n $_data = array();\n }\n if (! empty($_data)) {\n if (($this->item_id != $_data[$this->key_field])) {\n if ($this->Kernel->Errors->HasItem($this->library_ID, \"RECORD_EXISTS\")) {\n $_error_section = $this->library_ID;\n }\n else {\n $_error_section = \"GlobalErrors\";\n }\n $this->validator->SetCustomError($_ufields_arr, \"RECORD_EXISTS\", $_error_section);\n }\n }\n }", "function getUnique_alignments($alignments) {\n $key_array = array();\n $temp_array = array();\n $alignment_size = count($alignments);\n for ($i = 0; $i < $alignment_size; $i++) {\n //if have not seen alignment in array then insert it.\n if (!in_array($alignments[$i]['optimal']['match_score'], $key_array, true)) {\n array_push($temp_array, $alignments[$i]);\n array_push($key_array, $alignments[$i]['optimal']['match_score']);\n }\n }\n\n return $temp_array;\n}", "public function yearProvider()\n {\n return array(\n // year = 1\n array('11111111111111111', array(2001, 2031)),\n // year = K\n array('1M8GDM9AXKP042788', array(1989, 2019)),\n // year = 3\n array('5GZCZ43D13S812715', array(2003, 2033)),\n // invalid year\n array('5GZCZ43D1US812715', array())\n );\n }", "function removeDuplicates(array $arr, string $userInput): array\n{\n $columnKey = extractHeaderKey($arr, $userInput);\n\n $occurrences = [];\n return array_filter($arr, function (array $row) use (&$occurrences, $columnKey) {\n if (!array_search($row[$columnKey], $occurrences)) {\n $occurrences[] = $row[$columnKey];\n return true;\n }\n\n return false;\n });\n}", "public function array_icount_values($array) {\n //create new output array of style date : # occurences\n //cycle through given dates, initializing to date : 1 except if duplicate\n //if duplicate, add +1 to occurence\n //return array\n \n $outarray = array();\n //array(\t'0'\t => array('id' => '666', 'make'\t => 'Boeing')\n\n $count = -1;\n foreach ($array as $key=>$value) {\n if (!isset($outarray[$value['date']])) {\n \n $outarray[++$count] = array('date' => $value['date'], \n 'count' => 1);\n } else {\n foreach ($outarray as $key2 => $value2 ) {\n if ($value2['date'] == $value['date']) {\n $value2['count'] += 1;\n }\n }\n }\n }\n \n return $outarray;\n }", "function getAllTagsFromAlbum_multi_unique($array) {\n\tforeach ($array as $k=>$na)\n\t$new[$k] = serialize($na);\n\t$uniq = array_unique($new);\n\tforeach($uniq as $k=>$ser)\n\t$new1[$k] = unserialize($ser);\n\treturn ($new1);\n}", "function theme_moove_order_courses_by_shortname(&$array_courses){\n\n $grouped_courses_array = array();\n $regular_courses_array = array();\n $no_regular_courses_array = array();\n $counter = 0;\n\n foreach($array_courses as $key=>&$course){\n\n $idcourse = $course->id;\n $timecreated = $this->theme_moove_get_timecreated_course($idcourse);\n $timemodified = $this->theme_moove_get_timemodified_course($idcourse);\n $categoryid = $this->theme_moove_get_course_category($idcourse);\n\n $course->timecreated = $timecreated;\n $course->timemodified = $timemodified;\n $course->categoryid = $categoryid;\n\n // Validación para cursos regulares\n if($course->categoryid >= 30001 && $course->categoryid <= 30999){\n\n array_push($regular_courses_array, $course);\n\n $explode_course_shortname = explode(\"-\", $course->shortname);\n\n // Se verifica que tenga en su nombre corto la especificación de fecha de creación\n // una vez identificada se le añade como atributo al curso\n if(count($explode_course_shortname) && preg_match(\"/^20/\", $explode_course_shortname[3])){\n $date_course = substr($explode_course_shortname[3], 0, -3);\n $course->date_course = $date_course;\n }\n\n }else{\n // Cursos no regulares\n array_push($no_regular_courses_array, $course);\n }\n }\n\n $this->array_sort_by($regular_courses_array, 'timecreated', $order = SORT_DESC);\n $this->array_sort_by($no_regular_courses_array, 'timecreated', $order = SORT_DESC);\n\n $grouped_courses_array['regular_courses'] = $regular_courses_array;\n $grouped_courses_array['no_regular_courses'] = $no_regular_courses_array;\n\n return $grouped_courses_array;\n }", "public function offsetExists($index);", "private function createArray()\n {\n $this->makeGroupBy()->makeSearch()->normalize();\n }", "protected function fillMovie()\r\n {\r\n $providers = array();\r\n foreach (array_unique($this->providerCodes) as $pc) {\r\n $provider = $this->getProviderFromCode($pc);\r\n if ($provider->providesForLanguage($this->getLanguage())) {\r\n $providers[$pc] = $this->getProviderFromCode($pc);\r\n }\r\n }\r\n \r\n $detailsByProvider = array();\r\n foreach ($this->detailsAdded as $detailArr) {\r\n if ($detailArr['provider']) {\r\n if (!isset($providers[$detailArr['provider']])) {\r\n $providers[$detailArr['provider']] = $this->getProviderFromCode($detailArr['provider']);\r\n }\r\n isset($detailsByProvider[$detailArr['provider']]) || $detailsByProvider[$detailArr['provider']] = array();\r\n $detailsByProvider[$detailArr['provider']][] = $detailArr['code'];\r\n } else {\r\n foreach ($providers as $provider) {\r\n if ($provider->provides($detailArr['code'])) {\r\n isset($detailsByProvider[$provider->getCode()]) || $detailsByProvider[$provider->getCode()] = array();\r\n $detailsByProvider[$provider->getCode()][] = $detailArr['code'];\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n \r\n foreach ($detailsByProvider as $providerCode => $detailCodes) {\r\n $providers[$providerCode]->fillMovie($this->getLanguage(), $this->movie, $detailCodes);\r\n }\r\n \r\n return $this->movie;\r\n }", "public function isIndexed() {}", "public function isIndexed() {}", "public function isIndexed() {}", "function getTermHits($searchTerm,$organism_version_id){\n $searchTerm =trim($searchTerm);global $con;$hits=array();\n if(!$con)$con=getConnection();\n $query=\"select distinct t.transcript_id,transcript_name,t.gene_prediction_id from gene_by_annotation g, transcript_by_annotation t \n where gene_name ='$searchTerm' and g.organism_version_id=$organism_version_id and g.transcript_id=t.transcript_id\n and g.organism_version_id=t.organism_version_id\";\n $result = mysql_query($query,$con);\n if($result){\n while($row = mysql_fetch_assoc($result)){\n $hits[]=array('id'=>$row[\"transcript_id\"],\n 'name'=>$row[\"transcript_name\"],\n 'prediction_id'=>$row[\"gene_prediction_id\"]);\n }\n }\n if(count($hits)<=0){ \n $query=\"select distinct transcript_id,transcript_name,gene_prediction_id from transcript_by_annotation \";\n $query .=\" where transcript_name ='$searchTerm' and organism_version_id=$organism_version_id \";\n $result = mysql_query($query,$con);\n if($result){\n while($row = mysql_fetch_assoc($result)){\n $hits[]=array('id'=>$row[\"transcript_id\"],\n 'name'=>$row[\"transcript_name\"],'prediction_id'=>$row[\"gene_prediction_id\"]);\n }\n } \n }\n elseif(count($hits)<=0){ //check if cc founders transcript_name\n $query=\"select distinct t.transcript_id,t.transcript_name,t.gene_prediction_id \n from transcript_by_annotation t,cc_founders_transcripts c\n where c.transcript_name='$searchTerm' and t.organism_version_id=$organism_version_id and c.gene_prediction_id = t.gene_prediction_id \n and t.transcript_name=c.transcript_id \";\n $result = mysql_query($query,$con);\n if($result){ \n while($row = mysql_fetch_assoc($result)){ \n $hits[]=array('id'=>$row[\"transcript_id\"],\n 'name'=>$row[\"transcript_name\"],\n 'prediction_id'=>$row[\"gene_prediction_id\"]);\n }\n }\n }\n elseif(count($hits)<=0){ //check if cc founders gene_id\n $query=\"select distinct t.transcript_id,t.transcript_name,t.gene_prediction_id\"; \n $query.=\" from gene_by_annotation g,cc_founders_genes c,transcript_by_annotation t\n where c.gene_id ='$searchTerm' and c.gene_name=g.gene_name and g.gene_prediction_id=c.gene_prediction_id \n and g.organism_version_id=$organism_version_id and g.transcript_id=t.transcript_id \n and g.organism_version_id=t.organism_version_id \"; \n $result = mysql_query($query,$con);\n if($result){ \n while($row = mysql_fetch_assoc($result)){ \n $hits[]=array('id'=>$row[\"transcript_id\"],\n 'name'=>$row[\"transcript_name\"],\n 'prediction_id'=>$row[\"gene_prediction_id\"]);\n }\n }\n }\n return $hits;\n}", "function faculty_get_publications( $metaArray ) {\n $publicationArray = [];\n\n if ( isset( $metaArray['publications'] ) && $metaArray['publications'][0] > 0 ) {\n for ( $i=0; $i < $metaArray['publications'][0]; $i++ ) { \n $publication = [\n 'citation' => $metaArray['publications_'.$i.'_citation'][0],\n 'year' => $metaArray['publications_'.$i.'_year'][0],\n 'link' => $metaArray['publications_'.$i.'_link'][0],\n ];\n\n array_push( $publicationArray, $publication);\n }\n }\n\n return $publicationArray;\n}", "public static function extendCategoryNameInItems(Goose|Connect $self, array $index): array\n {\n if (count($index ?? []) <= 0) return [];\n foreach ($index as $k => $v)\n {\n if (!($v->category_srl ?? false))\n {\n $v->category_name = '';\n continue;\n }\n $category = $self->model->getItem((object)[\n 'table' => 'categories',\n 'field' => 'name',\n 'where' => 'srl='.(int)$v->category_srl,\n ])->data;\n $v->category_name = $category->name ?? '';\n }\n return $index;\n }", "function build_index($topics) {\n\t$keys = array_keys($topics);\n\tprint_r($topics[$keys[0]]);\n\t//get name of top level subject/topic\n\tif (count($keys) > 0) {\n\t\t$parts = explode(\"/\", remove_last_slash($keys[0]));\n\t\t$topLevel = $parts[count($parts) - 1];\n\t\t$isUpdate = false;\n\t\t//If the topic index exists, treate this as an update. Otherwise, create new index\n\t\tif (check_existing_standards($topLevel, false)) {\n\t\t\techo \"<p><b>This subject index exists! Checking for updates...</b></p>\";\n\t\t\t$isUpdate = true;\n\t\t}\n\t\telse {\n\t\t\techo \"<p><b>A new subject index will be created for \".$topics[$keys[0]][\"http://purl.org/dc/elements/1.1/title\"][0][\"value\"]. \"</b></p>\";\n\t\t\t\n\t\t}\n\t\tparse_json_topics($topics, $isUpdate);\n\t} else echo \"<p>Could not read document!</p>\";\n\t\n\t\n}", "function oneplace($Group, $Array){\n\tglobal $log;\n\tfor ($num=1;$num<=9;$num++){\n\t\t$found='';\n\t\tforeach($Group as $index=>$Cell){\n\t\t\t$r=$Cell['row'];\n\t\t\t$c=$Cell['column'];\n\t\t\t$val=$Array[$r][$c];\n\t\t\tif(strpos($val,\"$num\") !== false){\n\t\t\t\t$found.=\"$index\";\n\t\t\t}\n\t\t}\n\t\tif (strlen($found)==1){\n\t\t\t$log.= 'p';\n\t\t\t$found=(int) $found;\n\t\t\t$r=$Group[$found]['row'];\n\t\t\t$c=$Group[$found]['column'];\n\t\t\t$Array[$r][$c]=\"$num\";\n\t\t}\n\t}\n\treturn $Array;\n}", "public function providerMatches()\n {\n return array(\n array('24 - 5x01 (HR.HDTV).avi', 5, 1),\n array('3rd Rock from the Sun - 1x01 - Brains and Eggs.avi', 1, 1),\n array('American Dad! - 1x01 - Pilot (pdtv).avi', 1, 1),\n array('The X Factor - 1x02 - Mooman (ll).avi',1,2),\n );\n }", "function key(){ \r\n\t return key($this->array); \r\n\t }", "function searchMoviesFromCinema($sCinema, array $aCinemas, array $aMovies)\n{\n $aSearchMovies = array();\n foreach ($aCinemas[$sCinema]['rooms'] as $iMovieId) {\n $aSearchMovies[] = $aMovies[$iMovieId];\n }\n\n return $aSearchMovies;\n}", "public function filterByGenre($genresArray,$projectionList)\n {\n $newArray = array();\n foreach ($projectionList as $proj) {\n $jaja = 0;\n $movie=$proj->getMovie();\n $genresMovie = $movie->getGenres();\n foreach ($genresMovie as $genM) {\n foreach ($genresArray as $strGen) {\n if ($strGen == $genM->getName()) {\n $jaja++;\n }\n }\n }\n if ($jaja == count($genresArray)) {\n $newArray[] = $proj;\n }\n }\n return $newArray;\n }", "function dedupe_using_hollis_id($docs) {\n $deduped_docs = array();\n foreach ($docs as $doc) {\n $in_array = False;\n foreach ($deduped_docs as $deduped_doc) {\n if ($deduped_doc['name'] == $doc['name']) {\n $in_array= True;\n }\n }\n if (!$in_array) {\n $deduped_docs[] = $doc;\n }\n }\n return $deduped_docs;\n }", "public function run()\n {\n $records = [\n [\n 1,\n \"bibendum ullamcorper. Duis cursus, diam\",\n \"Mary\",\n \"8.52\",\n \"2017-01-27\",\n 5,\n \"O4Z 8B7\",\n 4,\n 1,\n \"Nunc ut\",\n 34,\n 1,\n 3,\n \"2018-07-08\",\n 3,\n \"Stacey\",\n \"2017-12-17\",\n 0,\n \"DLD48QLXRP\",\n 2020,\n 'Town',\n 10.22\n ],\n [\n 2,\n \"eu neque\",\n \"Hilary\",\n \"5.73\",\n \"2017-10-01\",\n 2,\n \"Q8P 7H4\",\n 4,\n 1,\n \"sollicitudin adipiscing ligula.\",\n 139,\n 0,\n null,\n null,\n 1,\n \"Sara\",\n \"2017-01-24\",\n 0,\n \"YMQ15QJ5AZ\",\n 2018,\n 'State',\n 10.22\n ],\n [\n 3,\n \"varius. Nam porttitor scelerisque neque. Nullam\",\n \"Noah\",\n \"2.93\",\n \"2017-07-13\",\n 3,\n \"A6V 2I1\",\n 5,\n 4,\n \"mattis semper, dui lectus\",\n 158,\n 1,\n 1,\n \"2018-02-02\",\n 2,\n \"Griffin\",\n \"2017-01-10\",\n 1,\n \"YWK78JJ5HZ\",\n 2019,\n 'Town',\n 5.22\n ],\n [\n 4,\n \"Etiam ligula\",\n \"Alana\",\n \"6.48\",\n \"2016-12-22\",\n 3,\n \"N0G 9K9\",\n 2,\n 4,\n \"egestas. Fusce\",\n 221,\n 1,\n 1,\n \"2018-02-24\",\n 3,\n \"Georgia\",\n \"2017-04-23\",\n 1,\n \"IUC41XA0JC\",\n 2025,\n 'Town',\n 0.00\n ],\n [\n 5,\n \"arcu. Sed et\",\n \"Avram\",\n \"6.78\",\n \"2017-12-31\",\n 4,\n \"C2M 8V4\",\n 5,\n 3,\n \"scelerisque scelerisque dui.\",\n 160,\n 0,\n null,\n null,\n 2,\n \"Deacon\",\n \"2017-10-22\",\n 1,\n \"AJU13OV8UJ\",\n 2024,\n 'State',\n 50.00\n ],\n [\n 6,\n \"odio a purus. Duis elementum, dui quis\",\n \"Rosalyn\",\n \"2.61\",\n \"2018-02-07\",\n 2,\n \"Z1C 7Z0\",\n 1,\n 3,\n \"sed pede nec ante\",\n 64,\n 1,\n 1,\n \"2018-10-09\",\n 2,\n \"Jasper\",\n \"2017-01-03\",\n 0,\n \"KGE89KI6DU\",\n 2019,\n 'Federal',\n 9.402\n ],\n [\n 7,\n \"magna. Ut tincidunt orci quis lectus. Nullam, est\",\n \"Althea\",\n \"7.57\",\n \"2018-08-16\",\n 5,\n \"L9T 3Y5\",\n 5,\n 1,\n \"lacinia orci, consectetuer euismod est\",\n 128,\n 0,\n null,\n null,\n 2,\n \"Marvin\",\n \"2017-09-20\",\n 1,\n \"GLW83AB1OV\",\n 2025,\n 'Town',\n 6.49\n ],\n [\n 8,\n \"lectus sit\",\n \"Christopher\",\n \"5.74\",\n \"2018-08-26\",\n 1,\n \"U9Y 6H2\",\n 3,\n 2,\n \"tristique neque venenatis\",\n 219,\n 1,\n 2,\n \"2017-08-03\",\n 1,\n \"Amity\",\n \"2018-09-17\",\n 0,\n \"KUU44PCBMV\",\n 2017,\n 'State',\n 7.43\n ],\n [\n 9,\n \"faucibus orci luctus et ultrices posuere; Donec\",\n \"Rogan\",\n \"3.63\",\n \"2018-03-08\",\n 3,\n \"E5P 2S8\",\n 2,\n 4,\n \"neque pellentesque massa lobortis\",\n 127,\n 1,\n 3,\n \"2018-10-12\",\n 3,\n \"Hedwig\",\n \"2017-06-25\",\n 0,\n \"EXV74CV0ZZ\",\n 2021,\n 'Federal',\n 2.32\n ],\n [\n 10,\n \"pede et risus. Quisque\",\n \"Caesar\",\n \"1.58\",\n \"2017-08-26\",\n 4,\n \"F8O 2P4\",\n 2,\n 4,\n \"Donec vitae erat vel\",\n 171,\n 0,\n null,\n null,\n 1,\n \"Emery\",\n \"2017-06-24\",\n 0,\n \"YKN72ZQ6NI\",\n 2018,\n 'State',\n 10.22\n ],\n [\n 11,\n \"sapien imperdiet ornare. In faucibus.\",\n \"Caleb\",\n \"6.85\",\n \"2017-04-16\",\n 1,\n \"N6K 1T6\",\n 2,\n 1,\n \"non, feugiat nec, diam. Duis\",\n 202,\n 0,\n null,\n null,\n 1,\n \"Cora\",\n \"2018-04-05\",\n 1,\n \"UDO93WDR8G\",\n 2020,\n 'State',\n 10.22\n ],\n [\n 12,\n \"Nunc sed orci lobortis\",\n \"Nathan\",\n \"3.95\",\n \"2016-11-24\",\n 2,\n \"Q5Y 8W3\",\n 4,\n 1,\n \"a, malesuada id, erat. Etiam\",\n 81,\n 0,\n null,\n null,\n 2,\n \"Damian\",\n \"2018-05-03\",\n 0,\n \"QM48OHY0NI\",\n 2018,\n 'State',\n 10.22\n ],\n [\n 13,\n \"porttitor interdum. Sed auctor odio a\",\n \"Selma\",\n \"2.10\",\n \"2018-06-05\",\n 4,\n \"X5T 3A1\",\n 1,\n 2,\n \"Nunc mauris. Morbi\",\n 105,\n 0,\n null,\n null,\n 3,\n \"Freya\",\n \"2017-10-30\",\n 0,\n \"EFH52JMO6M\",\n 2019,\n 'State',\n 10.22\n ],\n [\n 14,\n \"Duis cursus, diam at pretium aliquet, metus erat\",\n \"Gloria\",\n \"1.23\",\n \"2017-01-29\",\n 2,\n \"U2V 1A7\",\n 2,\n 4,\n \"dictum mi, ac mattis\",\n 121,\n 0,\n null,\n null,\n 2,\n \"Jerome\",\n \"2018-09-18\",\n 1,\n \"DCT55JIU2C\",\n 2018,\n 'State',\n 10.22\n ],\n [\n 15,\n \"lobortis risus. In mi pede, nonummy ut, molestie\",\n \"Oprah\",\n \"1.76\",\n \"2017-01-31\",\n 3,\n \"D9X 1F4\",\n 4,\n 3,\n \"faucibus leo, in lobortis tellus\",\n 124,\n 0,\n null,\n null,\n 5,\n \"Barclay\",\n \"2018-03-15\",\n 0,\n \"EQH65GTE4L\",\n 2018,\n 'State',\n 10.22\n ],\n [\n 16,\n \"sem. Pellentesque ut ipsum ac mi eleifend egestas.\",\n \"Jade\",\n \"8.02\",\n \"2017-06-20\",\n 5,\n \"U7B 7Q0\",\n 2,\n 4,\n \"id enim. Curabitur massa.\",\n 125,\n 1,\n 1,\n \"2017-12-22\",\n 3,\n \"Bruno\",\n \"2018-09-15\",\n 0,\n \"LAR03LAD1M\",\n 2022,\n 'State',\n 10.22\n ],\n [\n 17,\n \"diam vel arcu. Curabitur ut odio vel est tempor\",\n \"Britanni\",\n \"2.07\",\n \"2016-12-24\",\n 5,\n \"J6Y 6N0\",\n 5,\n 4,\n \"Fusce\",\n 220,\n 0,\n null,\n null,\n 2,\n \"Sybill\",\n \"2017-03-16\",\n 1,\n \"ZLH43DGE0L\",\n 2024,\n 'State',\n 10.22\n ],\n [\n 18,\n \"ut\",\n \"Amal\",\n \"1.27\",\n \"2017-05-17\",\n 4,\n \"G1C 2N9\",\n 1,\n 3,\n \"lobortis\",\n 235,\n 0,\n null,\n null,\n 5,\n \"Risa\",\n \"2018-04-27\",\n 0,\n \"TZD23DXK0U\",\n 2022,\n 'State',\n 10.22\n ],\n [\n 19,\n \"molestie. Sed id risus quis diam luctus lobortis.\",\n \"Nolan\",\n \"2.25\",\n \"2018-08-21\",\n 2,\n \"G1I 9I7\",\n 5,\n 1,\n \"ridiculus\",\n 155,\n 1,\n 3,\n \"2018-06-05\",\n 4,\n \"Eleanor\",\n \"2017-06-13\",\n 0,\n \"IPG08DQI2O\",\n 2022,\n 'State',\n 10.22\n ],\n [\n 20,\n \"rutrum\",\n \"Basil\",\n \"3.25\",\n \"2016-12-25\",\n 5,\n \"Y7H 2K2\",\n 3,\n 3,\n \"mi enim, condimentum eget, volutpat\",\n 195,\n 1,\n 3,\n \"2018-04-28\",\n 5,\n \"Winter\",\n \"2018-08-16\",\n 0,\n \"EAU79FKK8Y\",\n 2023,\n 'State',\n 10.22\n ]\n ];\n\n $count = count($records);\n\n foreach ($records as $key => $record) {\n Asset::insert([\n 'created_at' => Carbon\\Carbon::now()->subDays($count)->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->subDays($count)->toDateTimeString(),\n 'description' => $record[1],\n 'owner' => $record[2],\n 'purchase_price' => $record[3],\n 'purchase_date' => $record[4],\n 'group_id' => $record[5],\n 'serial_number' => $record[6],\n 'location_id' => $record[7],\n 'warranty_id' => $record[8],\n 'notes' => $record[9],\n 'estimated_life_months' => $record[10],\n 'is_out_of_service' => $record[11],\n 'out_of_service_id' => $record[12],\n 'out_of_service_date' => $record[13],\n 'vendor_id' => $record[14],\n 'assigned_to' => $record[15],\n 'assigned_date' => $record[16],\n 'is_computer' => $record[17],\n 'tag' => $record[18],\n 'scheduled_retirement_year' => $record[19],\n 'funding_source' => $record[20],\n 'percent_federal_participation' => $record[21]\n ]);\n $count--;\n }\n }", "public function duplicateSemesterInfo($data) {\n// $this->db->select('campusName'); \n $qu = $this->db->get_where($this->_table, array('semester' => $data['semester']));\n $reault = $qu->row_array();\n return $reault;\n }", "public function cleanDuplicates( );", "function checkredundantNamefromERMObjects(array $array, string $name){\n $result = false;\n foreach ($array as $element){\n if($element->getName()==$name){\n $result = true;\n }\n }\n return $result;\n\n}", "function ic_mark_duplicate_titles( $data, $postarr ) {\n\tif ( 'invite_codes' !== $data['post_type'] ) {\n\t\treturn $data;\n\t}\n\n\t$title = $data['post_title'];\n\t$code_exists = get_page_by_title( $title, OBJECT, 'invite_codes' );\n\tif ( $code_exists ) {\n\t\t$data['post_title'] .= '-duplicate';\n\t\t$data['post_status'] = 'draft';\n\t}\n\treturn $data;\n}", "function uniqueCC($thearray){\n foreach ($thearray as $key => $val4){\n if(isset($val4[\"Country_Code\"])){\n $bycc[] = $val4[\"Country_Code\"];\n } \n }\n$toreturn = array_unique($bycc);\nreturn $toreturn;\n}", "function filterByGenre($originalArray, $genere){\r\n $filtered = [];\r\n\r\n foreach ($originalArray as $album) {\r\n if($album['genre'] === $genere){\r\n $filtered[] = $album;\r\n }\r\n }\r\n return $filtered;\r\n}", "protected function isIndexed($array){\n $flag='';\n foreach ($array as $key => $v) {\n if(!(is_int($key))){\n $flag = 1;\n }\n \n }\n if($flag == 1){\n return FALSE;\n }else{\n return TRUE;\n }\n }", "function duplication2(Array $array) {\n if (empty($array)) {\n return FALSE;\n }\n foreach ($array as $key => $val) {\n if ($key != $val) {\n // not in 0 ~ n-1\n if (!isset($array[ $val ])) {\n return FALSE;\n }\n if ($val == $array[ $val ]) {\n return $val;\n } else {\n $tmp = $array[ $val ];\n $array[ $val ] = $val;\n $array[ $key ] = $tmp;\n }\n }\n }\n\n return 'no duplicate numbers.';\n}", "function array_iunique($array) {\n return array_intersect_key($array,array_unique(\n array_map(strtolower,$array)));\n }", "function get_all_by_key_by_year(){\n\t\t$sql = \"SELECT * \n\t\t\t\tFROM evs_database.evs_set_form_attitude\n\t\t\t\tWHERE sft_pos_id = ? AND sft_pay_id = ?\";\n $query = $this->db->query($sql, array($this->sft_pos_id, $this->sft_pay_id));\n\t\treturn $query;\n\n\t}", "public function offsetExists($index)\n {\n }", "function ss_hammerOID_pollers_indexes() {\n\n $return_arr = array();\n\t\t\n\t$rows = db_fetch_assoc(\"SELECT id FROM poller\");\n\n\n for ($i=0;($i<sizeof($rows));$i++) {\n $return_arr[$i] = $rows[$i]['id'];\n }\n\n return $return_arr;\n}", "public function findPlayerIndex($arr, $player){\n\t\t//var_dump($arr);\n\t\t//echo $player;\n\t\tforeach ($arr as $k => $id) {\n\t\t\tif($id['player_id'] == $player){\n\t\t\t\t$this->key = $k;\n\t\t\t\treturn $this->key;\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "function studentNameSearch($sessionID, $name){\r\n\t\t$name = str_replace(' ', '%', $name);\r\n\t\t$results = array();\r\n\t\tfor($i=0; $i<sizeof($name); $i++){\r\n\t\t\t$query = \"SELECT ID, CONCAT(FIRST_NAME, ' ', MIDDLE_NAME, ' ', LAST_NAME) AS FullName FROM X_PNSY_STUDENT WHERE\r\n\t\t\t\t\tCONCAT(FIRST_NAME, ' ', MIDDLE_NAME, ' ', LAST_NAME) LIKE '%$name%'\";\r\n\t\t\t\t$result = mysql_query($query);\r\n\t\t\t\t//Cycles through the rows of $result and puts them into $results in the proper format.\r\n\t\t\t\tfor($j=0; $thisResult = mysql_fetch_assoc($result); $j++){\r\n\t\t\t\t\tif(!array_key_exists($thisResult['ID'], $results)){\r\n\t\t\t\t\t\t$results[$thisResult['ID']] = $thisResult['FullName'];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t}\r\n\t\treturn $results;\r\n\t}", "static function get_duplicates(array $array): array {\n return array_unique(array_diff_assoc($array, array_unique($array)));\n }", "public function create_hashtag()\n {\n $hashtag = array();\n $art_sql = \"SELECT category_id,REPLACE(art_category,' ','') as art_category FROM ailee_art_category WHERE art_category != 'other';\";\n $art_cat_data = $this->db->query($art_sql)->result();\n echo \"<pre>\";\n // print_r($art_cat_data);\n foreach ($art_cat_data as $_art_cat_data) {\n $res = preg_replace(\"/[^a-zA-Z0-9]/\", \"\", $_art_cat_data->art_category);\n $_art_cat_data->art_hashtag = strtolower($res);\n $hashtag[] = strtolower($res);\n // print_r($_art_cat_data);\n }\n\n $jt_sql = \"SELECT title_id,name FROM ailee_job_title WHERE status = 'publish';\";\n $job_title_data = $this->db->query($jt_sql)->result();\n echo \"<pre>\";\n // print_r($job_title_data);\n foreach ($job_title_data as $_job_title_data) {\n $res = preg_replace(\"/[^a-zA-Z0-9]/\", \"\", $_job_title_data->name);\n $_job_title_data->jt_hashtag = strtolower($res);\n $hashtag[] = strtolower($res);\n // print_r($_job_title_data);\n }\n\n $s_sql = \"SELECT skill_id,skill FROM ailee_skill WHERE status = '1' AND ( type='1' OR type='2');\";\n $skill_data = $this->db->query($s_sql)->result();\n echo \"<pre>\";\n // print_r($skill_data);\n foreach ($skill_data as $_skill_data) {\n $res = preg_replace(\"/[^a-zA-Z0-9]/\", \"\", $_skill_data->skill);\n $_skill_data->jt_hashtag = strtolower($res);\n $hashtag[] = strtolower($res);\n // print_r($_skill_data);\n }\n // print_r($hashtag);\n $main_hashtag = array_values(array_unique($hashtag));\n foreach ($main_hashtag as $key => $value) {\n $data = array(\n 'hashtag' => $value,\n 'status' => '1',\n 'created_date' => date('Y-m-d H:i:s', time()),\n 'modify_date' => date('Y-m-d H:i:s', time()),\n );\n print_r($data);\n $hashtag_id = $this->common->insert_data_getid($data, 'hashtag');\n }\n }", "public function __construct($_title, $_year)\n {\n $this->title = $_title;\n $this->year = $_year;\n self::$counter++; // incremento il contatore ogni volta che agggiungo un'istanza \n }", "private function staggeredSearch($inputArray = []) {\n $results = [];\n $exactMatchesResults = [];\n $pinyinResults = [];\n $translationResults = [];\n \n\n // Exact pinyin results, items that match exactly\n foreach ($inputArray as $inputItem) {\n\n $exactMatchesResults = \\App\\Character::where('pinyin', $inputItem)\n ->orWhere('pinyin_normalised', $inputItem)->orderBy('freq', 'asc')->get();\n\n // for each result in the above collections, add to results array\n\n foreach($exactMatchesResults as $result) {\n if (! in_array($result, $results)) {\n array_push($results, $result);\n }\n }\n }\n\n // pinyin results using \"like\" operator\n foreach ($inputArray as $inputItem) {\n \n $pinyinResults = \\App\\Character::where('pinyin', 'like', '%' . $inputItem .'%')\n ->orWhere('pinyin_normalised', 'like', '%' . $inputItem .'%')->orderBy('freq', 'asc')->get();\n\n // for each result in the above collections, add to results array\n\n foreach($pinyinResults as $result) {\n if (! in_array($result, $results)) {\n array_push($results, $result);\n }\n }\n }\n\n // translation and heisig results using \"like\" operator\n foreach ($inputArray as $inputItem) {\n\n $translationResults = \\App\\Character::where('heisig_keyword', 'like', '%' . $inputItem .'%')\n ->orWhere('translations', 'like', '%' . $inputItem .'%')\n ->orWhere('heisig_number', 'like', '%' . $inputItem .'%')->get();\n\n // for each result in the above collections, add to results array\n foreach($translationResults as $result) {\n if (! in_array($result, $results)) {\n array_push($results, $result);\n }\n }\n }\n\n return $results;\n }", "protected function arrayKey() {\n\t\tif ( !empty($this->array[$this->indent]) ) {\n\t\t\t$this->array_index[$this->indent]++;\n\t\t\t$this->key($this->array_index[$this->indent]);\n\t\t}\n\t}", "public function loop()\n {\n \n $collection = collect(['renato' => 30, 'lisa' => 31, 'leidy' => 23, 'alexandre' => 3, 'renato' => 30, 'lisa' => 31, 'leidy' => 23, 'renato' => 30]);\n //$collection = $collection->duplicates();\n $collection->each(function($item, $key) {\n print_r($key); \n });\n \n }", "public function date_duplication($date)\n\t\t{\n\t\t\t$sql=\"SELECT * FROM `covid_data` WHERE `pub_date`='$date' \";\n\t\t\t$row=array();\n\t\t\t$stmt = $this->con->prepare($sql);\n\t\t\t$stmt->execute();\n\t\t\t$row=$stmt->fetchAll();\n\t\t\treturn $row;\n\t\t}", "private function makePKAttributesArray($array){\n\n \t\t$PKAttributes;\n \t\t$count = 0;\n \t\t$referenceTableKeys = $this->tableNames;\n \t\t$refTableKeyCount = count($referenceTableKeys);\n\n\n \t\tforeach($array as $row){\n \t\t\t$searchElement = $row['table_name'];\n\t if($count !=0 && $searchElement != $tableNames[$count-1] ){\n\t \tfor($i=0;$i<$refTableKeyCount;$i++){\n\t \t\tif($row['table_name'] == $referenceTableKeys[$i] ){\n\t \t\t\t$PKAttributes[$count]=array($row['table_name'] => $row['column_name']);\n\t \t\t}\n\t \t}\n\t \t$tableNames[$count]=$searchElement;\n\t \t$count++;\n\t }\n\t else if ($count == 0){\n\t \tfor($i=0;$i<$refTableKeyCount;$i++){\n\t \t\tif($row['table_name'] == $referenceTableKeys[$i] ){\n\t \t\t\t$PKAttributes[$count]=array($row['table_name'] => $row['column_name']);\n\t \t\t}\n\t \t}\n\t \t$tableNames[0] = $array[0]['table_name'];\n\t \t$count++;\n\t }\n\t }\n\n\t //removes indexed keys and returns a clean array\n\t $PKtemp;\n \t\tforeach ($PKAttributes as $array){\n \t\t\tforeach ($array as$tableName=>$PK){\n \t\t\t\t$PKtemp[$tableName]=$PK;\n \t\t\t}\n \t\t}\n\n \t\t$PKAttributes = $PKtemp;\n\t return $PKAttributes;\n \t}", "function getIndex() ;", "function get1Genre() {\n\n $db = connectDB();\n\n $query = (\"\n SELECT g.genre, COUNT(g.movie_id) as MovieCount FROM movies_genres g\n GROUP BY g.genre HAVING COUNT(g.movie_id) =\n (SELECT COUNT(g2.movie_id) tc FROM movies_genres g2\n GROUP BY g2.genre ORDER BY tc DESC LIMIT 1)\n \");\n\n $prep = $db->prepare(\"$query\");\n $prep->execute();\n\n $result = array(\"from\" => \"1genre\", \"data\" => array());\n\n foreach($prep as $row) {\n array_push($result[\"data\"], array(\n \"genre\" => $row[\"genre\"],\n \"count\" => $row[\"MovieCount\"]\n ));\n }\n\n header(\"Content-Type: application/json\");\n echo json_encode($result);\n\n closeDB($db);\n\n}", "protected function generateIndex(array $csv, $primaryKey)\n {\n $index = array();\n for ($i = 0; $i < count($csv) - 1; $i++) {\n $index[ $csv[ $i ][ $primaryKey ] ] = $i;\n }\n\n return $index;\n }", "public function run()\n {\n \n\n \\DB::table('movie_reviews')->delete();\n \n \\DB::table('movie_reviews')->insert(array (\n 0 => \n array (\n 'id' => 1,\n 'movie_id' => 2,\n 'user_id' => 1,\n 'rating' => 5,\n 'rating_description' => 'Lorem ipsum is simply dummy text',\n 'helpful_count' => 10,\n 'unhelpful_count' => 2,\n 'created_at' => '2017-01-25 07:03:55',\n 'updated_at' => '2017-01-25 07:04:26',\n 'deleted_at' => NULL,\n ),\n 1 => \n array (\n 'id' => 3,\n 'movie_id' => 1,\n 'user_id' => 2,\n 'rating' => 4,\n 'rating_description' => 'Lorem ipsum is simply dummy text',\n 'helpful_count' => 6,\n 'unhelpful_count' => 3,\n 'created_at' => '2017-01-25 10:31:13',\n 'updated_at' => '2017-01-25 10:31:13',\n 'deleted_at' => NULL,\n ),\n 2 => \n array (\n 'id' => 4,\n 'movie_id' => 1,\n 'user_id' => 1,\n 'rating' => 3,\n 'rating_description' => 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries',\n 'helpful_count' => 4,\n 'unhelpful_count' => 2,\n 'created_at' => '2017-01-25 11:34:56',\n 'updated_at' => '2017-01-25 11:34:56',\n 'deleted_at' => NULL,\n ),\n 3 => \n array (\n 'id' => 5,\n 'movie_id' => 3,\n 'user_id' => 3,\n 'rating' => 4,\n 'rating_description' => 'If you\\'ve watched and liked Film\\'s trailer then you will get all expected things in Film just like me. Excellent Writing, High on Emotions, Good Direction, Heart Touching concept and last but not the least Kaabil hits your heart and melts it.',\n 'helpful_count' => 6,\n 'unhelpful_count' => 2,\n 'created_at' => '2017-01-31 05:55:29',\n 'updated_at' => '2017-01-31 05:55:29',\n 'deleted_at' => NULL,\n ),\n 4 => \n array (\n 'id' => 6,\n 'movie_id' => 3,\n 'user_id' => 1,\n 'rating' => 4,\n 'rating_description' => 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries',\n 'helpful_count' => 5,\n 'unhelpful_count' => 5,\n 'created_at' => '2017-01-31 07:54:41',\n 'updated_at' => '2017-01-31 07:54:41',\n 'deleted_at' => NULL,\n ),\n 5 => \n array (\n 'id' => 7,\n 'movie_id' => 3,\n 'user_id' => 2,\n 'rating' => 3,\n 'rating_description' => 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries',\n 'helpful_count' => 8,\n 'unhelpful_count' => 4,\n 'created_at' => '2017-01-31 07:55:03',\n 'updated_at' => '2017-01-31 07:55:03',\n 'deleted_at' => NULL,\n ),\n ));\n \n \n }" ]
[ "0.5577337", "0.4683959", "0.46682495", "0.4599428", "0.45880413", "0.45753264", "0.45324612", "0.4510924", "0.4510479", "0.44979447", "0.4473694", "0.44175297", "0.4411343", "0.43881652", "0.43605217", "0.43367344", "0.42892995", "0.42819673", "0.42708978", "0.42610693", "0.4256704", "0.4246907", "0.423374", "0.41938516", "0.41853112", "0.41791785", "0.41789058", "0.41774568", "0.41617757", "0.41595438", "0.4141578", "0.4138288", "0.4123031", "0.4120418", "0.41201913", "0.41175705", "0.4110117", "0.4109831", "0.41091663", "0.41031972", "0.40983987", "0.4097426", "0.4094158", "0.40882182", "0.40878052", "0.40850994", "0.4079199", "0.40775102", "0.40749437", "0.4064252", "0.40562493", "0.4055051", "0.40535122", "0.40534306", "0.40506727", "0.40483505", "0.40474504", "0.4046551", "0.404394", "0.40426338", "0.40421286", "0.40421003", "0.40416315", "0.40415615", "0.403888", "0.4035083", "0.40292984", "0.4027343", "0.40244883", "0.40167034", "0.40126133", "0.40083104", "0.40075403", "0.40073186", "0.40055904", "0.40015727", "0.3997311", "0.39936996", "0.39934635", "0.39829913", "0.39820153", "0.39801756", "0.39773086", "0.39760014", "0.39712515", "0.39670315", "0.39652607", "0.39610153", "0.39565113", "0.39520776", "0.39507845", "0.39441174", "0.39427397", "0.3936098", "0.39329654", "0.39286754", "0.39245275", "0.39237493", "0.39166683", "0.39132962", "0.3910903" ]
0.0
-1
unused TODO: Break down into get and put
public function memcache_get_movies_list_by_provider_keyed_by_id($provider_name) { $found = false; $error_messages = array(); $searchkeyvalues = array("provider" => $provider_name, "movies" => "movies", "keyed_by" => "id"); // Try memcached first, if ($this->verbose == true) { echo "<br/>Trying memcached for movies list " . $provider_name; } list($found, $movies_keyed_by_id, $error_message) = $this->memcache_store->get_search($searchkeyvalues); $error_messages[] = $error_message; if ($found == true) { if ($this->verbose == true) { echo "<br/>Found movies list in memcached"; } } if ($found == false) { if ($this->verbose == true) { echo "<br/>Didn't find movies list in memcached "; } list($movies_keyed_by_id, $new_error_messages) = $this->curl_get_movies_list_by_provider_keyed_by_id_retry($provider_name); $error_messages = array_merge($error_messages, $new_error_messages); if ($movies_keyed_by_id != array()) { if ($this->verbose == true) { echo "<br/>Storing movies list in memcached "; } $this->memcache_store->store_search($searchkeyvalues, $movies_keyed_by_id, $this->memcache_expiry); } } return array($movies_keyed_by_id, $error_messages); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract function get();", "abstract public function get() ;", "abstract public function get();", "abstract public function get();", "abstract public function get();", "abstract public function get();", "abstract public function get();", "abstract public function get();", "abstract protected function alter_get($name);", "public function put();", "public function put();", "abstract public function retrieve();", "function get()\n {\n }", "protected function _get($name) {}", "public function get( /* void */ );", "function getItem() ;", "function get($key);", "public function get();", "public function get();", "public function get();", "public function get();", "public function get();", "public function get();", "public function get();", "public function get();", "public function get();", "public function get();", "public function get();", "public function get();", "public function get();", "public function get();", "public function get();", "public function get();", "public function get();", "public function get();", "public function getGet ();", "function put() \n {\n \n }", "public function get() {}", "public function get() {}", "public function get() {}", "public function get() {}", "public function get() {}", "abstract public function get ($key);", "function get_value() {return $this->get();}", "abstract function get ($item);", "abstract public function get($key);", "public function __get($key) {\n\t}", "function __get($name)\n { return $this->$name = $this->$name();\n }", "private function write($key,$value) {\r\n}", "public function __get($value);", "public function __get($key);", "public function __get($key);", "abstract public function __get($part);", "abstract protected function handle_get($name);", "public function __get($param);", "public function __get($key)\n {\n }", "public function __get($key)\n {\n }", "abstract protected function retrieve($key);", "public function get_data()\n\t\t{\t\t// Should there be a common method for this?\n\t\t}", "private function read($key){\r\n}", "public function __get($name) {\n\t\t//if (array_key_exists($name, $this->data)) {\n\t\treturn $this->data->get($name);\n\t\t//}\n\t}", "public function get($key)\n {\n }", "public function read(){\r\n foreach ($this as $key=>$valor){\r\n $this->$key= Request::req($key);\r\n }\r\n }", "#[Pure]\n public function getPutData() {}", "function __get($name) {\n\t\treturn $this->object[$name];\n\t}", "function _get(&$key){\n switch($key){\n case 'value': case 'val': $key = $this->get(); return TRUE;\n case 'settings': $key = $this->set; return TRUE;\n case 'isset': case 'key': $key = $this->$key; return TRUE;\n case 'status': case 'isok': case 'msg': \n $key = $this->$key(); return TRUE;\n case 'val_init': \n $key = $this->s_get($key); return TRUE;\n\n }\n return FALSE;\n }", "function __get($name) {\n if(array_key_exists($name, $this->nmap)) {\n return $this->nmap[$name];\n } else {\n return;\n }\n }", "function __get($name) {\n if(array_key_exists($name, $this->nmap)) {\n return $this->nmap[$name];\n } else {\n return;\n }\n }", "abstract protected function getDirectGetters();", "public function cacheGet() {\n }", "public function __get($name){\r\n }", "public function testDestiny2GetItem()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "function __get($name)\n {\n }", "public function get( $key );", "function get($name){ \n \t return $this->result[$name]; \n \t}", "abstract protected function handle_set($name,$value);", "abstract protected function setRequiredGetters();", "public function __get($key)\n {\n }", "public function __get($key)\n {\n }", "public function __get($key)\n {\n }", "public function __get($key)\n {\n }", "public function __get($name = \"\");", "private function cacheFetch() {\n //$data = cache_get($this->id, 'cache');;\n $data = NULL;\n if ($data) {\n foreach ($this->properties as $prop) {\n if (isset($data->data[$prop]) && !empty($data->data[$prop])) {\n $this->$prop = $data->data[$prop];\n }\n }\n }\n }", "function get($key) {\n\t\t/* stub */\n\t\treturn false;\n\t}", "public function __get($key){\r\n\r\n $method = 'get' . ucfirst($key);\r\n\r\n $this->$key = $this->$method();\r\n\r\n return $this->$key;\r\n }", "function __get( $key )\n {\n \t//Kint::dump($this->fields);\n return $this->fields[ $key ];\n }", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);" ]
[ "0.70916957", "0.7083901", "0.6912749", "0.6912749", "0.6912749", "0.6912749", "0.6912749", "0.6912749", "0.6329277", "0.61808896", "0.61808896", "0.6149985", "0.6129177", "0.6003", "0.59629816", "0.5945499", "0.59389096", "0.5930002", "0.5930002", "0.5930002", "0.5930002", "0.5930002", "0.5930002", "0.5930002", "0.5930002", "0.5930002", "0.5930002", "0.5930002", "0.5930002", "0.5930002", "0.5930002", "0.5930002", "0.5930002", "0.5930002", "0.5930002", "0.5898722", "0.58764917", "0.5861047", "0.58567685", "0.58567685", "0.58567685", "0.58567685", "0.58097106", "0.5809613", "0.58089924", "0.5761983", "0.57240206", "0.57171714", "0.571629", "0.5714918", "0.5702617", "0.5702617", "0.5689543", "0.5668147", "0.5657747", "0.5649889", "0.5649889", "0.5633625", "0.56185573", "0.56140935", "0.56139207", "0.56074923", "0.5589763", "0.55763924", "0.55591977", "0.55439126", "0.55360997", "0.55360997", "0.5514748", "0.5475891", "0.547316", "0.5470948", "0.5468751", "0.5463782", "0.54528683", "0.5448933", "0.5445989", "0.54448533", "0.54448533", "0.54448533", "0.54448533", "0.5444026", "0.5404499", "0.5399856", "0.53975517", "0.5396145", "0.53852046", "0.53852046", "0.53852046", "0.53852046", "0.53852046", "0.53852046", "0.53852046", "0.53852046", "0.53852046", "0.53852046", "0.53852046", "0.53852046", "0.53852046", "0.53852046", "0.53852046" ]
0.0
-1
/ parse the response
function parse_response_array($string) { $response_string_array = explode("&", $string); $proper_array = array(); foreach ($response_string_array as $value) { list($key, $val) = explode("=", $value); $val = urldecode($val); $proper_array["$key"] = $val; } unset($key); unset($val); return $proper_array; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function parseResponse() {\n $headers = Strings::split(substr($this->response, 0, $this->info['header_size']), \"~[\\n\\r]+~\", PREG_SPLIT_NO_EMPTY);\n $this->headers = static::parseHeaders($headers);\n $this->body = substr($this->response, $this->info['header_size']);\n $this->response = NULL;\n }", "abstract function parse_api_response();", "abstract protected function parseResponse($response);", "function http_parse_response()\n\t{\n\t\tlist($headers, $body) = explode(\"\\r\\n\\r\\n\", $this->http_response, 2);\n\t\t$this->http_parse_headers($headers);\n\n\t\tif(isset($this->http_response_headers['Transfer-Encoding']) && 'chunked' == $this->http_response_headers['Transfer-Encoding']):\n \t\t$this->http_response_body = $this->http_chunked_decode($body);\n\t\telse:\n\t\t\t$this->http_response_body = $body;\n\t\tendif;\n\n\t\t$this->http_set_content_type($this->http_default_content_type);\n\t}", "protected function parseResponse()\n {\n // get the status code from response.\n $statusCode = $this->httpResponse->getStatusCode();\n\n // set as error, if http status code is not between 200 and 299 (inclusive).\n $this->networkError = !($statusCode >= 200 && $statusCode <= 299);\n\n // decode the response body.\n $body = $this->decodeBody();\n\n // stop when no body is present.\n if ($body) {\n // parse the response id from the body.\n $this->id = (int) array_get($body, 'id', null);\n\n // set as error when there is a an error key and it's not null.\n $this->isError = array_get($body, 'error', null) !== null;\n\n // parse the response data, from result or error.\n $this->data = collect(array_get($body, $this->isError ? 'error' : 'result', []));\n }\n\n // just return the response body.\n return $this->body;\n }", "function parse_response($response)\n {\n $data = $response->getBody();\n\n // Note we could not use Guzzle XML method becuase Endicia does not return valid XML it seems\n $sxe = new SimpleXMLElement($data);\n\n if ($sxe->status == 0) {\n $return_data = array();\n $return_data['Status'] = (string)$sxe->Status;\n $return_data['Base64LabelImage'] = (string)$sxe->Base64LabelImage;\n $return_data['TrackingNumber'] = (string)$sxe->TrackingNumber;\n $return_data['FinalPostage'] = (string)$sxe->FinalPostage;\n $return_data['TransactionID'] = (string)$sxe->TransactionID;\n $return_data['PostmarkDate'] = (string)$sxe->PostmarkDate;\n $return_data['DeliveryTimeDays'] = (string)$sxe->PostagePrice->DeliveryTimeDays;\n\t $return_data['error'] = (string)$data;\n \n\t\treturn $return_data;\n } else {\n return array('status' => 'error', 'message' => $sxe);\n }\n }", "protected function parseResponse()\n {\n $data = simplexml_load_string($this->body);\n \n $this->data = $data;\n }", "public function parseResponse() {\r\r\n\r\r\n return true;\r\r\n }", "public function getParsedResponse()\n {\n return json_decode($this->response);\n }", "function parse() {\r\n\t\t/* JSON */\r\n\t\tif (strpos ( $this->response_content_type, \"application/json\" ) !== false) {\r\n\t\t\t$this->response_parsed = json_decode($this->response_body);\r\n\t\t\t/* JSON STREAM */\r\n\t\t} elseif (strpos ( $this->response_content_type, \"json-stream\" ) !== false) {\r\n\t\t\t$stream = split ( \"\\n\", $this->response_body );\r\n\t\t\tif (count ( $stream ) < $stream [0] ['ResultLength']) {\r\n\t\t\t\t// echo \"Invalid JSON Stream. Result Length:\".count($stream);\r\n\t\t\t\t$this->client->status_code = 400;\r\n\t\t\t\t$GLOBALS ['ResultStack']->pushNew ( \"Invalid JSON Stream\", ERROR );\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t$jsonServer = new JSON ( JSON_LOOSE_TYPE );\r\n\t\t\t$this->response_parsed = array ();\r\n\t\t\tforeach ( $stream as $line )\r\n\t\t\t\t$this->response_parsed [] = $jsonServer->decode ( $line );\r\n\t\t\t/* DEFAULT */\r\n\t\t} else {\r\n\t\t\t$this->response_parsed = $this->response_body;\r\n\t\t}\r\n\t}", "private function parse_curl_response()\n {\n $this->status_code = curl_getinfo($this->curl_handle, CURLINFO_HTTP_CODE);\n #$this->http_info = array_merge($this->http_info, curl_getinfo($this->curl_handle));\n\n $header_size = curl_getinfo($this->curl_handle, CURLINFO_HEADER_SIZE);\n\n // Capture the HTTP response headers\n $this->http_response_headers = substr($this->curl_response, 0, $header_size);\n\n // Capture the HTTP response body\n $this->http_body = substr($this->curl_response, $header_size);\n\n if(!$this->do_not_exit)\n {\n $this->_check_valid_response($this->http_body);\n }\n //close connection\n curl_close($this->curl_handle);\n }", "function _parseResponse($res) {\n\n\t\t// set defaults\n\t\t$response = $this->response;\n\t\t$response['raw']['response'] = $res;\n\n\t\t// parse header\n\t\tif (preg_match(\"/^(.+\\r\\n)(.*)(?<=\\r\\n)\\r\\n/Us\", $res, $match)) {\n\t\t\t\n\t\t\tlist($null, $response['raw']['status-line'], $response['raw']['header']) = $match;\n\t\t\t$response['raw']['body'] = substr($res, strlen($match[0]));\n\n\t\t\tif (preg_match(\"/(.+) ([0-9]{3}) (.+)\\r\\n/DU\", $response['raw']['status-line'], $match)) {\n\t\t\t\t$response['status']['http-version'] = $match[1];\n\t\t\t\t$response['status']['code'] = (int) $match[2];\n\t\t\t\t$response['status']['reason-phrase'] = $match[3];\n\t\t\t}\n\n\t\t\t$response['header'] = $this->_parseHeader($response['raw']['header']);\n\t\t\t$response['body'] = $response['raw']['body'];\n\n\t\t\tif (!empty($response['header'])) {\n\t\t\t\t$response['cookies'] = $this->parseCookies($response['header']);\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\t$response['body'] = $res;\n\t\t\t$response['raw']['body'] = $res;\n\t\t}\n\n\t\tif (isset($response['header']['Transfer-Encoding']) && $response['header']['Transfer-Encoding'] == 'chunked') {\n\t\t\t$response['body'] = $this->_decodeChunkedBody($response['body']);\n\t\t}\n\n\t\tforeach ($response['raw'] as $field => $val) {\n\t\t\tif ($val === '') {\n\t\t\t\t$response['raw'][$field] = null;\n\t\t\t}\n\t\t}\n\n\t\treturn $response;\n\t}", "function parse_response($response){ \r\n \r\n list($response_headers,$response_body) = explode(\"\\r\\n\\r\\n\",$response,2); \r\n $response_header_lines = explode(\"\\r\\n\",$response_headers); \r\n \r\n // first line of headers is the HTTP response code \r\n $http_response_line = array_shift($response_header_lines); \r\n if (preg_match('/^HTTP\\/[0-9]\\.[0-9a-z] ([0-9]{3})/i',$http_response_line,$matches)) { \r\n $response_code = $matches[1]; \r\n }\r\n // put the rest of the headers in an array \r\n $response_header_array = array(); \r\n foreach ($response_header_lines as $header_line) { \r\n list($header,$value) = explode(': ',$header_line,2); \r\n $response_header_array[$header] = $value; \r\n } \r\n \r\n return array($response_code,$response_header_array,$response_body); \r\n}", "public function _parseResponce()\n\t\t{\n\t\t\t$pattern = \"/(link_cropped_no\\\" target=\\\"_blank\\\" href=\\\")(.{0,255})(\\\" )/i\";\n\t\t\tpreg_match_all($pattern, $this->responce, $out);\n\t\t\t$this->content = (!empty($out['2'])) ? array_splice($out['2'], false, AMOUNT_OF_RESULTS) : array();\n\t\t}", "function MesiboParseResponse($response) {\n\t$result = json_decode($response, true);\n\tif(is_null($result)) \n\t\treturn false;\n\treturn $result;\n}", "protected function _parseResponse($response) {\n\t\t$headers = substr($response, 0, strpos($response, \"\\r\\n\\r\\n\"));\n\t\t$body = substr($response, strlen($headers));\n\t\t\n\t\t//split up the headers\n\t\t$parts = preg_split(\"/\\r?\\n/\", $headers, -1, PREG_SPLIT_NO_EMPTY);\n\t\t$heads = array();\n\t\tfor ($i = 1, $total = sizeof($parts); $i < $total; $i++ ) {\n\t\t\tlist($name, $value) = explode(': ', $parts[$i]);\n\t\t\t$heads[$name] = $value;\n\t\t}\n\t\tif (array_key_exists('Set-Cookie', $heads)) {\n\t\t\t$this->setCookie($heads['Set-Cookie']);\n\t\t}\n\t\t$this->__setInfo('responseHeaders', $heads);\n\t\t\n\t\t$this->response['headers'] = $heads;\n\t\t$this->response['body'] = trim($body);\t\t\n\t}", "public function parse()\r\n\t{\r\n\t\tif(is_string($this->_raw)) {\r\n\t\t\t$response = self::toArray($this->_format, $this->_raw);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$response = $this->_raw;\r\n\t\t}\r\n\r\n\t\tif(!empty($response['error_code'])) {\r\n\t\t\tthrow new MediaMonks_Service_Hyves_Response_Exception($response['error_message'], $response['error_code']);\r\n\t\t}\r\n\t\t\r\n\t\tif(null == $this->_method && !empty($response['method'])) {\r\n\t\t\t$this->_method = $response['method'];\r\n\t\t\tunset($response['method']);\r\n\t\t}\r\n\t\t\r\n\t\t$this->_info = $response['info'];\r\n\t\tunset($response['info']);\r\n\t\t\r\n\t\t$this->_body = $response;\r\n\t\t\r\n\t\t// pagination\r\n\t\tif(!empty($this->_info['totalresults'])) {\r\n\t\t\t$this->_paginated = true;\r\n\t\t}\r\n\t\t\r\n\t\t$this->_parsed = true;\r\n\t\treturn $this;\r\n\t}", "protected function analyzeResponse() {\n\t\tvar_dump($this->curlResponse);\n\t\t$parts = explode(\"\\r\\n\\r\\n\", $this->curlResponse);\n\n\t\t$response_body = array_pop($parts);\n\t\t$response_headers = implode('', $parts);\n\t\t$http_status_code = $this->curl->getinfo(CURLINFO_HTTP_CODE); \n\n\t\treturn array(trim($response_headers), trim($response_body), $http_status_code);\n\t}", "public function parseResponse($response)\n {\n // Parse the response and set the last response and headers.\n $info = curl_getinfo($this->ch);\n $this->__last_response_headers = substr(\n $response,\n 0,\n $info['header_size']\n );\n $this->__last_response = substr($response, $info['header_size']);\n }", "public function getParsedResponse()\n {\n return $this->parsedResponse;\n }", "public function parseResponse($message);", "private function parseResponse($response){\n if($response['status'] == true) {\n $parsedResponse = new SimpleXMLElement($response['httpResponse']);\n if(isset($parsedResponse->error)){\n $this->setFailedReason((string)$parsedResponse->error->error_msg);\n return false; \n }else {\n $arrayResponse = array();\n \n if(isset($parsedResponse->transaction))\n $elements = $parsedResponse->transaction->children();\n else\n $elements = $parsedResponse->children();\n \n foreach($elements as $tag => $tagValue){\n $arrayResponse[$tag] = $tagValue->__toString();\n }\n \n return $arrayResponse;\n }\n }else {\n //server timeout error\n $this->setFailedReason('RESPONSE_TIMEOUT');\n return false;\n } \n }", "public function testParseResponse() {\n $data = $this->dl->parseResponse($this->sampleData, \"JSON\");\n $this->assertion($data['zip'], \"37931\", \"Parsed zip should equal 37931.\");\n $this->assertion($data['conditions'], \"clear sky\", \"Parsed conditions should equal clear sky.\");\n $this->assertion($data['pressure'], \"1031\", \"Parsed pressure should equal 1031.\");\n $this->assertion($data['temperature'], \"35\", \"Parsed temperature should equal 35.\");\n $this->assertion($data['windDirection'], \"ESE\", \"Parsed wind direction should equal ESE.\");\n $this->assertion($data['windSpeed'], \"1.06\", \"Parsed wind speed should equal 1.06.\");\n $this->assertion($data['humidity'], \"80\", \"Parsed humidity should equal 80.\");\n $this->assertion($data['timestamp'], \"1518144900\", \"Parsed timestamp should equal 1518144900.\");\n }", "public function parse_response($resp)\n {\n if ($resp['data']==null)\n {\n return ['error'=>404, 'message'=>'Data from youtube not found'];\n }\n else\n {\n return ['error'=>0, 'data'=>$resp['data']];\n }\n }", "protected function parse()\n {\n if ($this->isParsed) {\n return;\n }\n\n if ($this->response->isServerError()) {\n throw new ResponseException(\"nic.ru server error\");\n }\n\n $contentType = $this->response->getHeader(\"Content-Type\");\n\n if (!preg_match(\"/^.*text\\/plain.*$/ui\", $contentType)) {\n throw new ResponseException(\"Incorrect Content-Type of response: {$contentType}\");\n }\n\n if (!$this->response->isOk()) {\n throw new ResponseException(\"Incorrect response code: {$this->response->getStatusCode()}\");\n }\n\n $content = $this->getRawContent();\n $contentParts = explode(\"\\r\\n\\r\\n\", $content);\n\n if (empty($contentParts)) {\n throw new ResponseException(\"Incorrect response: {$content}\");\n }\n\n if (count($contentParts) == 0) {\n throw new ResponseException(\"Response header is empty!\");\n }\n\n $this->parseHeader(trim($contentParts[0]));\n $this->parseBody(trim($contentParts[1]));\n\n $this->isParsed = true;\n }", "private function getResponse() {\n $this->response['status_code'] = $this->status->getStatusCode();\n $this->response['reason_phrase'] = $this->status->getReasonPhrase();\n \n $this->readHeaders();\n }", "public function parse()\n\t{\n\t\t//we don't need to hit the API everytime parse is called\n\t\tif (!$this->response)\n\t\t\t$this->response = $this->request->execute();\n\t\t\n\t\treturn $this->invokeParserMethod();\t\n\t}", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse();", "protected function _parse_respone($response)\n {\n $response = explode(self::RESPONSE_SEPARATOR, rtrim($response, self::RESPONSE_SEPARATOR));\n if ( is_array($response) ) {\n $this->response['status'] = $response[0];\n if ( $this->response['status'] == self::RESPONSE_OK ) {\n unset($response[0]);\n $this->response['data'] = $response;\n } else {\n $this->response['error'] = $response[1];\n }\n }\n }", "public function getResponse() {\n \n parse_str($this->response, $return);\n return $return;\n }", "public function decode($response);", "function parseResponse($response){\n $res = array();\n $r = explode(':', $response);\n\n switch($r[0]){\n case 'd':\n if($r[1] == 'err') {\n $res['danger'] = 'Could not delete the desired element.';\n }\n elseif($r[1] == 'ok') {\n $res['success'] = 'Element permanently deleted.';\n }\n break;\n default:\n break;\n }\n return $res;\n }", "protected function parseResponse($response)\n\t{\n\t\t$this->params = array();\n\t\t\n\t\tif (empty($response)) {\n\t\t\tthrow new OAuthException('Some error occurred when do http request', -1);\n\t\t}\n\t\t\n\t\t$pos = strpos($response, \"\\r\\n\\r\\n\");\n\t\t$header = substr($response, 0, $pos);\n\t\t$body = trim(substr($response, $pos + 4));\n\t\t\n\t\t$status = substr($header, 0, strpos($header, \"\\r\\n\"));\n\t\tif (preg_match('/^HTTP\\/\\d\\.\\d\\s([\\d]+)\\s(.*)$/', $status, $matches)) {\n\t\t\t$code = intval($matches[1]);\n\t\t\t$status = $matches[2];\n\t\t\tif ($code == 400 || $code == 401 || $code == 500) {\n\t\t\t\tthrow new OAuthException($body, $code);\n\t\t\t} elseif ($code == 200) {\n\t\t\t\tparse_str($body, $this->params);\n\t\t\t} else {\n\t\t\t\tthrow new OAuthException($status, $code);\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new OAuthException('Invalid http response', -1);\n\t\t}\n\t}", "private function parse()\n {\n if ($this->isError()) {\n // error parsing\n if (empty($this->body) || !isset($this->body['errors'])) {\n // response body isn't an error object, return a custom one\n $error = new Entity\\Error();\n $error->message = \"Error $this->http_status\";\n $error->name = \"INVALID REQUEST\";\n $error->at = \"\";\n $this->objects[] = $error;\n } else {\n // parse error\n $errors = $this->body['errors'];\n foreach ($errors as $error) {\n $this->objects[] = Entity\\Error::parse($error);\n }\n }\n } else if (isset($this->body['card'])) {\n // card parsing\n $cards = $this->body['card'];\n foreach ($cards as $card) {\n $this->objects[] = Entity\\Card::parse($card);\n }\n } else if (isset($this->body['paymentmethod'])) {\n // payment parsing\n $this->objects[] = Entity\\Payment::parse($this->body);\n if (isset($this->body['subscription_plan'])) {\n // subscription also found, payment is a subscription\n $this->objects[] = Entity\\Subscription::parse($this->body['subscription_plan']);\n }\n } else if (isset($this->body['vendor'])) {\n // vendor parsing\n $this->objects[] = Entity\\Vendor::parse($this->body['vendor']);\n } else if (isset($this->body['item'])) {\n // item parsing\n $this->objects[] = Entity\\Item::parse($this->body['item']);\n } else if (isset($this->body['refunded'])) {\n // refund parsing, same as payment\n $this->objects[] = Entity\\Payment::parse($this->body);\n } else if (isset($this->body['subscription_plan'])) {\n // subscription parsing\n $this->objects[] = Entity\\Subscription::parse($this->body['subscription_plan']);\n } else if (isset($this->body['deleted'])) {\n // nothing to return\n } else {\n throw new \\RuntimeException('Could not recognize response type');\n }\n }", "public function response() {\n return json_decode($this->response);\n }", "private function parse_result(){\n return json_decode($this->result);\n }", "protected function process_response() {\n\t\t\t$this->response['response']['Message'] = isset($this->response['response']['Message']) ? $this->response['response']['Message'] : '';\n\t\t\t$this->response['response']['error'] = (strpos(strtolower($this->response['response']['Message']), 'invalid') !== false) ? true : $this->response['response']['error'];\n\t\t\t$this->response['response']['error'] = (strpos(strtolower($this->response['response']['Message']), 'the item code was specified more than once') !== false) ? true : $this->response['response']['error'];\n\t\t\t$this->response['response']['Level1Code'] = $this->request['Level1Code'];\n\t\t\t\n\t\t\tif (!$this->response['response']['error']) { // IF Error is False\n\t\t\t\tif (in_array($this->response['server']['http_code'], array('200', '201', '202', '204'))) {\n\t\t\t\t\t$this->log_sendlogitem($this->request['Level1Code']);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->log_error($this->response['response']['Message']);\n\t\t\t}\n\t\t}", "protected final function parse_model_response($data = NULL) {\n \t$parsed = false;\n\t\tswitch ($this->request_method) {\n\t\t\tcase 'read':\n\t\t\t\t$parsed = $this->parse_model_response_read($data);\t\t\t\t\t\n\t\t\tbreak;\t\t\t\t\n\t\t\tcase 'create':\t\n\t\t\t\t$parsed = $this->parse_model_response_create($data);\t\t\t\t\t\n\t\t\tbreak;\n\t\t\tcase 'update':\n\t\t\t\t$parsed = $this->parse_model_response_update($data);\t\t\t\t\t\n\t\t\tbreak;\n\t\t\tcase 'delete':\n\t\t\t\t$parsed = $this->parse_model_response_delete($data);\t\t\t\t\t\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\tif($parsed === false) {\n\t\t\t$this->set_error( 355, 'No response was parsed' );\n\t\t\treturn;\t\n\t\t}\n\t\t\n\t\t$this->parsed_model_response = $parsed;\n }", "protected function parseGetResponse()\n\t{\n\t\t$body = $this->decodedBody();\n\n\t\t//check and throw errors\n\t\t$this->validateErrorsInBody($body);\n\n\t\t$this->setDataFromBody($body);\n\t\t$this->setMetaFromBody($body);\n\n\t\treturn true;\n\t}", "public function getRawResponse();", "public function parseErrors(Response $response);", "public function getResponse() {}", "public function getResponse() {}", "public function getResponseData();", "abstract protected function parseResponse(ResponseInterface $response);", "private function parseResult()\n {\n $code = $this->statusCode;\n\n if($code == \"01\")\n {\n $this->success = true;\n $this->message = \"Payment Successful\";\n }\n elseif($code == \"515\")\n {\n $this->success = false;\n $this->message = \"This number does not have a mobile money account\";\n }\n elseif($code == \"529\")\n {\n $this->success = false;\n $this->message = \"You don't have enough money in your account. Please Recharge\";\n }\n elseif($code == \"100\")\n {\n $this->success = false;\n $this->message = \"Transaction Failed. Declined by user.\";\n }\n else{\n $this->success = false;\n $this->message = \"Unknown Response\";\n }\n }", "function processResponse($strResponse) {\n\t\tlist($theHeaders, $theBody) = explode(\"\\r\\n\\r\\n\", $strResponse, 2);\n\t\treturn array('headers' => $theHeaders, 'body' => $theBody);\n\t}", "public function getResponse() {\n if($this->response) {\n $response = explode($this->responseDelimeter, $this->response);\n if(is_array($response)) {\n return $response;\n }\n else {\n return '';\n } \n }\n else {\n return '';\n }\n }", "protected function parse_response($response) {\n $length = strlen(PHP_INT_MAX);\n $response = preg_replace('/\"(id|in_reply_to_status_id)\":(\\d{' . $length . ',})/', '\"\\1\":\"\\2\"', $response);\n return json_decode($response, TRUE);\n }", "abstract public function processResponse($response);", "public function & GetResponse ();", "function get_response() {\n return $this->response;\n }", "private function ParseResponse($response)\n {\n\n $xml = new SimpleXMLElement($response->getBody());\n\n foreach ($xml->entry as $entry) {\n //https://www.electrictoolbox.com/php-simplexml-element-attributes/\n if ((string) $entry->category->attributes()->term === $this->ghType) {\n\n //instead of returning the simpleXMlElement in an array i pulled the strings'\n //not sure if this matters but it is less data sent back to the ajax success function\n $tmp[] = array(\n $this->FixUuid($entry->id),\n (string)$entry->title,\n );\n // echo (json_encode('id: ' . $entry->id . ' title: ' . $entry->title) .\"<br /> <br />\");\n \n }\n \n }\n\n $this->response = json_encode($tmp);\n }", "public function prepareResponse();", "protected function curl_parse ( $response )\r\n\t{\r\n\t\tif (empty($response))\r\n\t\t{\r\n\t\t\treturn array();\r\n\t\t}\r\n\t\r\n\t\t@list($headers,$body) = explode(\"\\r\\n\\r\\n\",$response,2);\r\n\t\t$lines = explode(\"\\r\\n\",$headers);\r\n\t\r\n\t\tif (preg_match('@^HTTP/[0-9]\\.[0-9] +100@', $lines[0]))\r\n\t\t{\r\n\t\t\t/* HTTP/1.x 100 Continue\r\n\t\t\t * the real data is on the next line\r\n\t\t\t*/\r\n\t\t\t@list($headers,$body) = explode(\"\\r\\n\\r\\n\",$body,2);\r\n\t\t\t$lines = explode(\"\\r\\n\",$headers);\r\n\t\t}\r\n\t\r\n\t\t// first line of headers is the HTTP response code\r\n\t\t$http_line = array_shift($lines);\r\n\t\tif (preg_match('@^HTTP/[0-9]\\.[0-9] +([0-9]{3})@', $http_line, $matches))\r\n\t\t{\r\n\t\t\t$code = $matches[1];\r\n\t\t}\r\n\t\r\n\t\t// put the rest of the headers in an array\r\n\t\t$headers = array();\r\n\t\tforeach ($lines as $l)\r\n\t\t{\r\n\t\t\tlist($k, $v) = explode(': ', $l, 2);\r\n\t\t\t$headers[strtolower($k)] = $v;\r\n\t\t}\r\n\t\r\n\t\treturn array( 'code' => $code, 'headers' => $headers, 'body' => $body);\r\n\t}", "public function get_response()\n {\n return $this->response; \n }", "protected function parseResponse() \n {\n if (($line=fgets($this->socket)) === false) {\n throw new Exception('Failed reading data from redis socket.'); \n }\n $type=$line[0];\n $line=substr($line, 1, -2);\n switch ($type) {\n case '+': // Status reply\n return true;\n case '-': // Error reply\n throw new Exception('Redis error: '.$line);\n case ':': // Integer reply\n // no cast to int as it is in the range of a signed 64 bit integer\n return $line;\n case '$': // Bulk replies\n if ($line=='-1') {\n return null; \n }\n $length=$line+2;\n $data='';\n while ($length>0) {\n if (($block=fread($this->socket, $length))===false) {\n throw new Exception(\n 'Failed reading data from redis connection socket.'\n ); \n }\n $data.=$block;\n $length-= function_exists('mb_strlen')\n ? mb_strlen($block, '8bit')\n : strlen($block);\n }\n return substr($data, 0, -2);\n case '*': // Multi-bulk replies\n $count=(int)$line;\n $data=array();\n for ($i=0;$i<$count;$i++) {\n $data[]=$this->parseResponse(); \n }\n return $data;\n default:\n throw new Exception('Unable to parse data received from redis.');\n }\n }", "public function getResponse($response) {\r\n\r\n\r\n }", "protected function _response() {}", "abstract public function response();", "function getResponse();", "function getResponse();", "private function _getResponse( $link ) {\n App::import('Core', 'HttpSocket');\n $HttpSocket = new HttpSocket();\n $response = $HttpSocket->get($link); \n \n //Remove non ascii chars - JSON will break because Meetup allows non-ascii characters \n //hack from http://www.stemkoski.com/php-remove-non-ascii-characters-from-a-string/ \n $response = str_replace(\"\\n\",\"[NEWLINE]\",$response); \n $response = preg_replace('/[^(\\x20-\\x7F)]*/','', $response); \n $response = str_replace(\"[NEWLINE]\",\"\\n\",$response); \n \n //decode the returned JSON into a PHP array \n $my_array = json_decode( $response, true ); \n\n return( $my_array ); \n\n }", "public function responseParser($response, $homebookmaker, $awaybookmaker) {\n // TODO implement here\n }", "protected function parse() {}", "private function process(HttpSocketResponse $response)\n\t{\n\t\t$result = array();\n\t\tif (!empty($response)) {\n\t\t\t$body = $response->body();\n\t\t\tswitch ($this->format) {\n\t\t\t\tcase 'xml':\n\t\t\t\t\t$xml = Xml::build($body);\n\t\t\t\t\t$temp = Xml::toArray($xml);\n\t\t\t\t\t$result = array('Yourls' => $temp['result']);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'json':\n\t\t\t\t\t$result = array('Yourls' => json_decode($body, true));\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$result = $body;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn $result;\n\t}", "public function getResponse(){\n \n return $this->response;\n \n }", "protected function decodedBody()\n\t{\n\t\ttry {\n\t\t\treturn $this->response->json();\n\t\t} catch (Exception $e) {\n\t\t\tthrow new ParserException($e->getMessage(), $e->getCode());\n\t\t}\n\t}", "protected function _parse_response($data)\n\t{\n\t\t// Since this module currently uses POST to make the gateway request\n\t\t// We know our current object can be simply typecasted back to an array.\n\t\t// IF THIS EVER CHANGES, USE $this->payments->arrayize_object($data);\n\t\t$results = explode('&',urldecode($data));\n\t\tforeach($results as $result)\n\t\t{\n\t\t\tlist($key, $value) = explode('=', $result);\n\t\t\t$gateway_response[$key]=$value;\n\t\t}\t\t\n\t\t\n\t\t$details = (object) array();\n\t\t$details->timestamp = gmdate('c');\n\t\t$details->gateway_response = $gateway_response; // Full Gateway Response\t\t\n\t\t\n\t\t//Set response types\n\t\t$response_types = array(\n\t\t\t'E' => $this->payments->payment_type.'_gateway_failure', \n\t\t\t'1' => $this->payments->payment_type.'_success', \n\t\t\t'0' => $this->payments->payment_type.'_local_failure'\n\t\t);\n\t\t\n\t\t// Default to Failure if data is not what is expected\n\t\t$status = 'failure';\n\t\t\n\t\t// Setup Final Response \n\t\tif(isset($gateway_response['MESSAGE']))\n\t\t{\t\t\n\t\t\t$details->reason = $gateway_response['MESSAGE'];\n\t\t}\n\t\t\n\t\tif(isset($gateway_response['STATUS']))\n\t\t{\n\t\t\t$details->status = $gateway_response['STATUS']; // The request can be successful, yet have the card be declined\n\t\t}\n\t\t\n\t\t// Setup additional properties if successful\n\t\tif(isset($gateway_response['TRANS_ID']))\n\t\t{\n\t\t\t$details->identifier = $gateway_response['TRANS_ID'];\n\t\t}\n\t\t\t\t\n\t\t// Return Local Response, because we didn't get an expected response from server\n\t\tif( ! isset($gateway_response['STATUS'], $gateway_response['MESSAGE']))\n\t\t{\n\t\t\t// @todo - Don't know if this should be a different response than \"gateway\" \n\t\t\treturn $this->payments->return_response($status, $response_types['E'], 'gateway_response', $details);\n\t\t}\n\t\t\t\t\n\t\t// Possible Responses are 1 = Approved, 0 = Decline, 'E' = Error\n\t\t$is_success = ($data['STATUS'] === '1');\n\t\t\n\t\t// Setup Response\n\t\t$status = ($is_success) ? 'success': 'failure';\n\t\t$response = $response_types[$gateway_response['STATUS']];\n\t\t\n\t\t// Send it back!\t\n\t\treturn $this->payments->return_response($status, $response, 'gateway_response', $details);\n\t}", "public function getRawResponse() {\n\t}", "protected function parseResponse($ch)\n {\n $result = curl_getinfo($ch);\n\n $result['handle'] = $ch;\n $result['data'] = $this->findNodeDataAndDetach($ch);\n\n if ($result['download_content_length'] > 0 ||\n $result['header_size'] > 0) {\n $content = curl_multi_getcontent($ch);\n\n if ($result['header_size'] > 0) {\n list($header, $body) = explode(\"\\r\\n\\r\\n\", $content, 2);\n if ($this->parse_response_header) {\n $result['header'] = $this->parseResponseHeader($header);\n } else {\n $result['header'] = $header;\n }\n $result['body'] = $body;\n } else {\n $result['body'] = $content;\n }\n }\n\n $result['errno'] = curl_errno($ch);\n $result['error'] = curl_error($ch);\n if (function_exists('curl_strerror')) {\n $result['strerror'] = curl_strerror($result['errno']);\n }\n return $result;\n }", "protected function parseResponse($response)\n {\n do {\n $parts = preg_split('|(?:\\r?\\n){2}|m', $response, 2);\n $again = false;\n\n if (isset($parts[1]) && preg_match(\"|^HTTP/1\\.[01](.*?)\\r\\n|mi\", $parts[1])) {\n $response = $parts[1];\n $again = true;\n }\n } while ($again);\n\n // remove rewrite's proxy headers\n if (stripos($response, self::PROXY_REWRITE_HEADER) !== false) {\n $response = str_ireplace(self::PROXY_REWRITE_HEADER, '', $response);\n }\n\n return $response;\n }", "private function getResponse() {\n\t\t$packed_len = stream_get_contents($this->id, 4); //The first 4 bytes contain our N-packed length\n\t\t$hdr = unpack('Nlen', $packed_len);\n\t\t$len = $hdr['len'];\n\t\t$this->xmlResponse = stream_get_contents($this->id, $len);\n\t}", "function parseResponse($response) {\r\n\t\t$begin = 0;\r\n\t\t$end = 0;\r\n\t\t$start = null;\r\n\t\t$value = null;\r\n\t\t$map;\r\n\t\t// responseMap = new HashMap();\r\n\t\t$response = trim ( $response );\r\n\t\t$pos = strpos ( $response, \"<\" ) == 0;\r\n\t\tif ($response == null || (strlen ( $response ) < 0) || $pos === false) {\r\n\t\t\t// // echo \"returned\";\r\n\t\t\treturn null;\r\n\t\t} else {\r\n\t\t\t// // echo \"else \";\r\n\t\t\tdo {\r\n\t\t\t\t\r\n\t\t\t\tif ((strpos ( $response, '<' ) !== false) && (strpos ( $response, '>' ) !== false)) {\r\n\t\t\t\t\t$start = substr ( $response, ($ind = strpos ( $response, \"<\" )) + 1, ((strpos ( $response, \">\" ) - 1) - $ind) );\r\n\t\t\t\t\t$mapKey = substr ( $response, ($ind = strpos ( $response, \">\" )) + 1, ((strpos ( $response, \"</\" . $start . \">\" ) - 1) - $ind) );\r\n\t\t\t\t\t// // echo \"<br/> strrsdfdpos\".(strrpos($response,\">\"));\r\n\t\t\t\t\t$response = substr ( $response, $from = strpos ( $response, \"</\" . $start . \">\" ) + strlen ( $start ) + 3, strrpos ( $response, \">\" ) - $from + 1 );\r\n\t\t\t\t\t// // echo \"<br/> from \".$from;\r\n\t\t\t\t\t// // echo \"<br/> start------- \".$start;\r\n\t\t\t\t\t// // echo \"--------\".$mapKey;\r\n\t\t\t\t\t$maps [$start] = $mapKey;\r\n\t\t\t\t\t\r\n\t\t\t\t\t// // echo \"------ response====\".htmlspecialchars($response).\"<br/>\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// // echo \"here\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t} while ( strlen ( $response ) > 0 );\r\n\t\t}\r\n\t\t\r\n\t\t// // echo \"<br/>MAPPPPPPPS \".var_dump($maps);\r\n\t\treturn $maps;\r\n\t}", "public function getResponse() {\n }", "public function parseResponse($response_object){\n $retval = null;\n if (is_object($response_object)) {\n if (!empty($response_object->data)){\n $temp_array = drupal_json_decode($response_object->data);\n $retval = (object)$temp_array;\n }\n }\n return $retval;\n }", "public function parseResponse($responseString) {\n $dom = new DOMDocument();\n $dom->preserveWhiteSpace = FALSE;\n if(@$dom->loadXML($responseString)){\n $xmlconvert = new xmlconvert();\n $objconvert = new objconvert();\n $OLS_obj = $xmlconvert->xml2obj($dom);\n $badgerfish = $objconvert->obj2json($OLS_obj);\n return parent::parseResponse($badgerfish);\n }\n else{\n throw new Exception('failed to parse response from openorder: ' . $responseString);\n }\n }", "public function getResponse() {\n\t}", "function parse_response($raw_data, $data_type) {\r\n if ($data_type == 'json') {\r\n $parsed_data = json_decode($raw_data);\r\n }\r\n else if ($data_type == 'xml') {\r\n $namespace_pattern = '/([<\\/\\s])[a-z]+\\:/';\r\n $clean_data = preg_replace($namespace_pattern, '\\1', $raw_data);\r\n if ($clean_data[0] == '<') {\r\n $parsed_data = simplexml_load_string($clean_data);\r\n }\r\n else {\r\n $parsed_data = false;\r\n }\r\n }\r\n return $parsed_data;\r\n }", "function parse_authorize_payment_response($response) {\n // check total length\n if (sizeof($response)<51){\n return result_response_parse_error('response length error :' . sizeof($response));\n }\n // check STX\n if ($response[0]!=STX) {\n return result_response_parse_error('response STX error');\n }\n // check command\n if ($response[1]!=CMD_AUTHORIZE_PAYMENT) {\n return result_response_parse_error('response CMD error');\n }\n // check checksum\n $data = array_slice($response,2,47);\n $checksum = calc_checksum(CMD_AUTHORIZE_PAYMENT,$data);\n if ($checksum!=$response[49]) {\n return result_response_parse_error('response CHECKSUM error');\n }\n // check ETX\n if ($response[50]!=ETX) {\n return result_response_parse_error('response ETX error');\n }\n $rdata = array();\n // get ticket\n $ticket_data = array_slice($data,0,8);\n $rdata['ticket'] = bytes_to_string($ticket_data);\n // get receipt\n $receipt_data = array_slice($data,8,10);\n $rdata['receipt'] = bytes_to_string($receipt_data);\n // value, as parking fee, in sen\n $value_data = array_slice($data,18,6);\n $rdata['value'] = intval(bytes_to_string($value_data));\n // gst, as parking fee gst\n $gst_data = array_slice($data,24,4);\n $rdata['gst'] = intval(bytes_to_string($gst_data));\n // pdate, as payment datatime\n $pdate_data = array_slice($data,28,12);\n $rdata['pdate'] = bytes_to_string($pdate_data);\n // grace period,\n $grace_data = array_slice($data,40,3);\n $rdata['grace'] = intval(bytes_to_string($grace_data));\n // status\n $statu_data = array_slice($data,43,4);\n $rdata['status'] = bytes_to_string($statu_data);\n return result_success_data($rdata);\n}", "public function getResponse(){\n switch($this->format){\n case 'json':\n $this->response_type = 'application/json';\n return $this -> getJSON();\n break;\n case 'xml':\n $this->response_type = 'text/xml';\n return $this -> getXML();\n break;\n default:\n $this->response_type = 'application/json';\n return $this -> getJSON();\n break;\n }\n }", "static public function parse_plain_response($s)\n {\n parse_str($s, $a);\n return $a;\n }", "public function getResponse()\n {\n }", "public function response ();", "public function parse();", "public function parse();", "public function parse();", "public function get_response()\n\t{\n\t\treturn $this->response;\n\t}", "public function get_response()\n\t{\n\t\treturn $this->response;\n\t}", "protected function _handleResponse(){\n $this->_results[] = array(\n 'http_code' => $this->getInfoHTTPCode(),\n 'response' => $this->getResponse(),\n 'server' => $this->getUrl()\n );\n }", "public function getResponse() : array;" ]
[ "0.81643206", "0.81230325", "0.7904068", "0.7804625", "0.7563842", "0.7549407", "0.7455809", "0.7264202", "0.72639376", "0.7238908", "0.717791", "0.7171854", "0.71452177", "0.7117078", "0.7050187", "0.6987313", "0.6923118", "0.6918776", "0.6905822", "0.6904758", "0.6888165", "0.68729925", "0.6851099", "0.68382746", "0.68213224", "0.6817041", "0.6804643", "0.6786237", "0.6786237", "0.6786237", "0.6786237", "0.6786237", "0.6786237", "0.6786237", "0.6786237", "0.6786237", "0.6786237", "0.6786237", "0.6778694", "0.6761337", "0.6680318", "0.6663248", "0.664947", "0.6648269", "0.66478324", "0.6636866", "0.6608939", "0.6608536", "0.65853", "0.65687454", "0.6546633", "0.6534018", "0.6534018", "0.652066", "0.6519875", "0.65178806", "0.650811", "0.6468697", "0.6465292", "0.6463749", "0.64566416", "0.64444697", "0.6442582", "0.6439902", "0.64170194", "0.64008605", "0.6393809", "0.6393188", "0.6369557", "0.63557273", "0.6336488", "0.6336488", "0.6292338", "0.62796396", "0.6277468", "0.6266822", "0.6248577", "0.623991", "0.6225962", "0.6223669", "0.6212622", "0.621217", "0.6198043", "0.61930054", "0.6192803", "0.6185775", "0.61668694", "0.6157056", "0.61520046", "0.6151428", "0.61458766", "0.61422795", "0.613554", "0.613325", "0.6128715", "0.6128715", "0.6128715", "0.6123639", "0.6123639", "0.61130255", "0.61097187" ]
0.0
-1
Index Page for this controller. Maps to the following URL or or Since this controller is set as the default controller in config/routes.php, it's displayed at So any other public methods not prefixed with an underscore will map to /index.php/welcome/
public function index() { session_start(); if(!isset ($_SESSION['id_usuario']) == true) { unset ($_SESSION['id_usuario']); unset ($_SESSION['email']); unset ($_SESSION['nome']); $this->load->view('login_view'); }else{ redirect("dashboard/"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index () {\n $view = new WelcomeIndex();\n $view->display();\n }", "public function index()\n\t{\n\t\treturn view(\"welcome\");\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome');\n\t}", "public function action_index()\r\n\t{\r\n\t\t$this->title = 'Welcome';\r\n\t\t$this->template->content = View::factory('index');\r\n\t}", "public function index()\n\t{\n\t\treturn view('welcome');\n\t}", "public function index()\n\t{\n\t\treturn view('welcome');\n\t}", "public function indexAction()\n\t{\n\t\t//echo 'Hello from the index action in the Home controller!';\n\t\t\n\t\t/*View::render('Home' . DS . 'index.php', [\n\t\t\t\"name\" => \"Laura\",\n\t\t\t\"colours\" => [\"red\", \"green\", \"blue\"]\n\t\t]);*/\n\t\t\n\t\t// View::renderTemplate('Home' . DS . 'index.html', [\n\t\t// \t\"name\" => \"Laura\",\n\t\t// \t\"colours\" => [\"red\", \"green\", \"blue\"]\n // ]);\n \n\t\t$this->showRouteParams();\n\t\t// echo \"Hello, World!\";\n }", "public function index()\n\t{\n\t\t//Default view\n\t\t$this->load->view('index.html');\n\t}", "function index() {\n\n // This page cannot be accessed without providing a page\n // the routes.php file will not allow the page to be accessed\n // $route['pages/(:any)'] = 'pages/view/$';\n redirect('/', 'refresh');\n\n }", "public function Index()\n\t{\n\t\t$this->views->SetTitle('Index Controller');\n\t\t$this->views->AddView('index/index.tpl.php', array(),'primary');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('default/index');\n\t}", "public function index() {\n\t\t$this->display('index');\n\t}", "public function index()\n\t{\t\n\n\t\t$this->load->view('welcome_message');\n\t}", "public function indexAction()\n {\n $arr = [\n 'title' => 'Welcome',\n 'data' => [\n 'name' => 'PHP FRAMEWORK',\n ]\n ];\n View::renderTemplate('Welcome/index.html', $arr);\n }", "public function index()\n\t{\n\t\t$this->load->view('index');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('index');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('index');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('index');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('index');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('index');\n }", "public function show_index()\n {\n return view('welcome');\n }", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function Index()\n {\n $this->standardView('Index');\n }", "public function index()\n {\n return view('main.welcome');\n }", "public function index()\n {\n // return view('welcome');\n }", "public function index()\n {\n $this->load->view('index');\n }", "public function index()\n {\n // return view('welcome');\n \n }", "public function index()\n\t{\n\t\t$this->load->view('home');\n\t}", "public function index()\n\t{\n\t\techo \"Nothing !\";\n\t}", "public function index() {\n \n return view('welcome');\n }", "public function index()\n {\n return view('pages.welcome');\n }", "public function Index()\n {\n \treturn view(\"index\");\n\t}", "public function index()\n {\n $this->load->view('welcome_message');\n }", "public function index()\n {\n $this->load->view('welcome_message');\n }", "public function index()\n {\n\t\t/*$this->layout->setTitle('Welcome to our Blog');\n\t\t$this->layout->showView('welcome/about.php');*/\n\t\techo 'hello I\\'m using codeigniter';\n }", "public function index() {\n\n\t\tif(!empty($_GET['page'])) {\n\t\t\tif($_GET['page'] == 'home') {\n\t\t\t\t(new HomeController)->home();\n\t\t\t} elseif($_GET['page'] == 'about-me') {\n\t\t\t\t(new HomeController)->aboutMe();\n\t\t\t}\n\t\t} else {\n\t\t\t(new HomeController)->home();\n\t\t}\n\t}", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n\t{\n\t\treturn view('pages/home');\n\t}", "public function index()\n {\n return \"INDEX PAGE\";\n }", "public function index()\n\t{\n\t\treturn view('home');\n\t}", "public function index()\n\t{\n\t\treturn view('home');\n\t}", "public function index()\n {\n SEOMeta::setTitle('Trusted Mortgage & Remortgage Solutions In UK - SmartMortgages UK');\n SEOMeta::setDescription('Home Page Description: For competitive mortgage and remortgage quotes around the UK at affordable rates, speak to one of our expert credit consultants and get a mortgage. For more visit us today.');\n\n return view('welcome');\n }", "function index() {\n \n parent::index();\n\n\t\t$data['user_id'] = $this->tank_auth->get_user_id();\n\t\t$data['username'] = $this->tank_auth->get_username();\n\t\t$data['main_content_view'] = $this->load->view('welcome', $data, true);\n $this->render_template($data);\n\t}", "public function index()\n\t{\n\t\t$this->title = 'My Index Action';\n\n\t\treturn new View('basic/index');\n\t}", "public function index()\n\t{\n\t\t$data['title'] = 'Home | Welcome to AEY';\n\t\t$data ['view_page'] = 'homepage';\n\n\t\t$this->load->view('site', $data);\n\t}", "public function index()\n {\n\n return view('welcome');\n\n }", "public function actionIndex(){ \n $this->view(\"index.php\");\n }", "public function index() {\n $this->registry->template->module = 'welcome';\n \n /*** load the index template ***/\n $this->registry->template->show('index');\n }", "public function actionIndex()\n\t{\n\t $this->pageTitle = 'Get Started';\n\t\t$this->render('index');\n\t}", "public function index()\n {\n return view('front.welcome');\n }", "public function index()\n\t{\n\t\treturn $this->traces();\n\t\treturn view('welcome');\n\t}", "public function index()\n\t{\n\t\t$this->loadViews(\"index\");\n\t}", "public function index() {\n\t\t$this->title = 'Home';\n\t\t$this->pageData['pages'] = Page::getAll();\n\t\t$this->render('index');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('home/home');\n\t}", "public function index() \n\t{\n\t\t$this->_render_hod_view('home');\n\t}", "public function index()\r\n\t{\r\n\t\techo \"index\";\r\n\t}", "public function index()\n\t{\n\t\t$this->twig->display('welcome/index.html', []);\n\t}", "public function Index() {\n $this->Display();\n }", "public function index()\r\n {\r\n View::render('home');\r\n }", "public function index()\n {\n $title = 'Welcome Page';\n return view($this->view . '.home', compact('title'));\n }", "public function index()\n\t{\n\t\t//\n\t\techo'index';\n\t}", "public function index() {\n $this->getView('navigation', array('pagename' => 'Welcome'));\n $this->getView('welcome');\n $this->getView('footer');\n }", "public function index()\n {\n return view(\"home\");\n }", "public function home()\n\t{\n\t\t$this->load->view('index_view');\n\t}", "function index() {\n $this->renderView(\"index\");\n }", "public function index()\n\t{\n\t\treturn view('index');\n\t}", "function index()\r\n\t{\r\n\t\t$this->view(); \r\n\t}", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n\n\n\n return view('welcome');\n }", "public function index() {\n\t\t$page = Page::getInstance();\n\t\t$session = Session::getInstance();\n\t\t$page->setPageTitle('Method index notfound');\n\t\t$session->setFlash('Chaque controller doit avoir une m&eacute;thode index', 'error');\n\t}", "public function index()\r\n\t{\r\n\t\t//\r\n\t}", "public function index() {\n\t\t// render the view (/view/main/index.php)\n\t\t$this->view->render(\"main\", \"index\");\n\t}", "public function index()\n {\n return View(\"pages.home\");\n }", "public function index()\n {\n // Nothing to do\n }", "public function index(){\n return view('welcome');\n }", "public function index()\n\t{\n\t\t//\n\t}", "public function index()\n\t{\n\t\t//\n\t}", "public function index()\n\t{\n\t\t//\n\t}", "public function index()\n\t{\n\t\t//\n\t}" ]
[ "0.7655508", "0.74145436", "0.7396173", "0.7317418", "0.72283363", "0.72283363", "0.71903646", "0.7166857", "0.7151917", "0.7145717", "0.7108151", "0.70780236", "0.70754886", "0.70406276", "0.70306057", "0.70306057", "0.70306057", "0.70306057", "0.70306057", "0.69742966", "0.6968103", "0.69477713", "0.69477713", "0.69477713", "0.69477713", "0.69477713", "0.69477713", "0.69477713", "0.69477713", "0.69477713", "0.69477713", "0.69477713", "0.69477713", "0.69477713", "0.69316655", "0.6926416", "0.6911975", "0.6901835", "0.6894632", "0.6876047", "0.6858327", "0.68569815", "0.68399274", "0.6803998", "0.6802956", "0.6802956", "0.6796031", "0.6790225", "0.6767983", "0.6767983", "0.6767983", "0.6767983", "0.6767983", "0.6767983", "0.6767983", "0.6767983", "0.6767983", "0.6767983", "0.6767983", "0.6766831", "0.6764303", "0.6761992", "0.6761992", "0.67514986", "0.675126", "0.67485875", "0.67429", "0.67388356", "0.6729889", "0.6717446", "0.67143476", "0.6711851", "0.6704955", "0.6700333", "0.6693287", "0.66756153", "0.666292", "0.6661336", "0.6650874", "0.66305923", "0.6622069", "0.661396", "0.66047865", "0.6598352", "0.6595009", "0.65937525", "0.65860605", "0.65768355", "0.6576564", "0.657412", "0.65545326", "0.6547276", "0.6545392", "0.6544484", "0.65438914", "0.654184", "0.6517758", "0.65157586", "0.65157586", "0.65157586", "0.65157586" ]
0.0
-1
Define the model's default state.
public function definition() { return [ 'about_ar' => $this->faker->sentence(3), 'about_en' => $this->faker->sentence(3), 'about_id' => $this->faker->sentence(3), 'our_vision_ar' => $this->faker->sentence(3), 'our_vision_en' => $this->faker->sentence(3), 'our_vision_id' => $this->faker->sentence(3), 'our_goals_ar' => $this->faker->sentence(3), 'our_goals_en' => $this->faker->sentence(3), 'our_goals_id' => $this->faker->sentence(3), 'meta_title_ar' => 'about_meta_title_ar', 'meta_title_en' => 'about_meta_title_en', 'meta_title_id' => 'about_meta_title_id', 'meta_descrption_ar' => 'about_meta_descrption_ar', 'meta_descrption_en' => 'about_meta_descrption_en', 'meta_descrption_id' => 'about_meta_descrption_id', 'admin_id' => 1, ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getDefaultState()\r\n\t{\r\n\t}", "static function get_default_state();", "public function getDefaultUserState();", "private function setDefaultStates(): void\n {\n foreach ($this->arr_attributes as $strParamName) {\n $this->states[$strParamName] = $this->params->get($strParamName, 0);\n }\n }", "abstract protected function getDefaultModel();", "public function applyDefaultValues()\n {\n $this->is_active = false;\n $this->is_closed = false;\n }", "protected function getDefaultModelObject() : void\n {\n return;\n }", "public function applyDefaultValues()\n {\n $this->active = false;\n }", "protected function makeDefault()\n {\n $this->options = [];\n $this->menuSource = MenuSource::STATIC_SOURCE;\n $this->action = new Action(ActionType::MENU(), 'Default menu name', 'Default menu text');\n }", "public function set()\n {\n\t\tif ($this->model->state())\n $this->model->set();\n }", "public function __default()\n\t{\n\n\t}", "protected function initial_set_default() {\n\t\tif ( isset( $this->field[ 'config' ][ 'default' ] ) ) {\n\t\t\t$this->default = $this->field[ 'config' ][ 'default' ];\n\t\t} else {\n\t\t\t$this->default = '';\n\t\t}\n\t}", "public function applyDefaultValues()\n\t{\n\t\t$this->type = 1;\n\t\t$this->total_index = 0;\n\t\t$this->is_published = true;\n\t\t$this->is_featured = false;\n\t\t$this->comments_count = 0;\n\t}", "public function setModelDefaults() \n {\n if (!empty($this->model->defaultFieldValues())) {\n \n foreach($this->model->defaultFieldValues() as $field => $defaultValue) {\n\n $this->model->$field = $defaultValue;\n }\n } \n }", "function getDefaultState(){\r\n\t\t$this->db->select('*');\r\n\t\t$this->db->where(array('is_default'=>true));\r\n\t\t$recordSet = $this->db->get(TBL_MST_STATES);\r\n\t\t$data=$recordSet->result() ;\r\n\t\treturn $data[0]->id;\r\n\t}", "public function setValueDefault()\n {\n $this->isActive = true;\n $this->createdAt = new \\DateTime();\n }", "public function applyDefaultValues()\n {\n $this->deleted = false;\n $this->amount = 1;\n $this->amountevaluation = 0;\n $this->defaultstatus = 0;\n $this->defaultdirectiondate = 0;\n $this->defaultenddate = 0;\n $this->defaultpersoninevent = 0;\n $this->defaultpersonineditor = 0;\n $this->maxoccursinevent = 0;\n $this->showtime = false;\n $this->ispreferable = true;\n $this->isrequiredcoordination = false;\n $this->isrequiredtissue = false;\n $this->mnem = '';\n }", "public function getDefaultStateName() {\n return $this->values->get('DefaultStateName');\n }", "public function default() {\n \n $this->data = ModuleConfig::settings();\n // [Module_Data]\n }", "public static function bootStateMachine()\n {\n static::creating(function ($model) {\n $fieldState = $model->getFieldState();\n if (empty($model->$fieldState)) {\n $model->$fieldState = $model->getInitialState();\n }\n $model->beforeTransition($model->fromTransition, $model->toTransition);\n $model->setStateChangeAt();\n });\n static::created(function ($model) {\n $model->afterTransition($model->fromTransition, $model->toTransition);\n });\n static::saving(function ($model) {\n $model->beforeTransition($model->fromTransition, $model->toTransition);\n $model->setStateChangeAt();\n });\n static::saved(function ($model) {\n $model->afterTransition($model->fromTransition, $model->toTransition);\n });\n }", "function _setModelState()\r\n {\r\n $state = parent::_setModelState(); \r\n $app = JFactory::getApplication();\r\n $model = $this->getModel( $this->get('suffix') );\r\n $ns = $this->getNamespace();\r\n\r\n $state['filter_id_from'] = $app->getUserStateFromRequest($ns.'id_from', 'filter_id_from', '', '');\r\n $state['filter_id_to'] = $app->getUserStateFromRequest($ns.'id_to', 'filter_id_to', '', '');\r\n $state['filter_name'] = $app->getUserStateFromRequest($ns.'name', 'filter_name', '', '');\r\n $state['filter_enabled'] = $app->getUserStateFromRequest($ns.'enabled', 'filter_enabled', '', '');\r\n $state['filter_taxclass'] = $app->getUserStateFromRequest($ns.'taxclass', 'filter_taxclass', '', '');\r\n $state['filter_shippingtype'] = $app->getUserStateFromRequest($ns.'shippingtype', 'filter_shippingtype', '', '');\r\n \r\n foreach (@$state as $key=>$value)\r\n {\r\n $model->setState( $key, $value ); \r\n }\r\n return $state;\r\n }", "public function getInitialState(): StateContract\n {\n return $this->newState(['value' => 1]);\n }", "public function state();", "public function setUserDefaultStatus($userDefaultStatus);", "public function setStateModel($stateModel) {}", "public function getBaseState() {}", "public function init()\r\n {\r\n $this->_helper->db->setDefaultModelName('DefaultMetadataValue');\r\n }", "public function set_to_default()\n\t{\n\t\t// SimpleDB requires a value for every attribue...\n\t\t$this->_name = NULL;\n\t\t$this->_contextid = NULL;\n\t\t$this->_userid = NULL;\n $this->_deleted = 0;\n\t\t$this->_lastmodified = 0;\t\n\t}", "public function create_default() {\n if (!$this->model->has_default()) {\n $default_data = [\n 'id' => 1,\n 'name' => 'Beregu',\n 'desc' => 'team vs team',\n ];\n $this->model->create_default($default_data);\n\n $default_data = [\n 'id' => 2,\n 'name' => 'Individu',\n 'desc' => 'individu vs individu',\n ];\n $this->model->create_default($default_data);\n }\n }", "public function __construct(State $model)\n\t{\n\t\t$this->model = $model;\n\t}", "public function getStateModel() {}", "public function set_default_data() {\n\t\t$this->button_text_color = '#FFFFFF';\n\t\t$this->button_background_color = '#6699CC';\n\n\t\t$this->header_text_color = '#FFFFFF';\n\t\t$this->header_background_color = '#6699CC';\n\n\t\t$this->button_text = 'Do Not Sell My Data';\n\n\t\t$this->publish_status = 'Draft';\n\t\t$this->last_published = '';\n\n\t\t$this->ot_logo = '';\n\t\t$this->display_position = 'right';\n\t\t$this->floating_button\t= '';\n\t\t$this->isLinkEnabled \t= 'textlink';\n\t}", "public function applyDefaultValues()\n\t{\n\t\t$this->points = '0';\n\t\t$this->type = 0;\n\t\t$this->hidden = 0;\n\t\t$this->relationship_status = 0;\n\t\t$this->show_email = 1;\n\t\t$this->show_gender = 1;\n\t\t$this->show_hometown = 1;\n\t\t$this->show_home_phone = 1;\n\t\t$this->show_mobile_phone = 1;\n\t\t$this->show_birthdate = 1;\n\t\t$this->show_address = 1;\n\t\t$this->show_relationship_status = 1;\n\t\t$this->credit = 0;\n\t\t$this->login = 0;\n\t}", "public function initializeDefaults()\n {\n }", "public function applyDefaultValues()\n\t{\n\t\t$this->ativo = true;\n\t\t$this->tipo_acesso = 'M';\n\t\t$this->estado_civil = 'O';\n\t\t$this->nivel_acesso = '1';\n\t\t$this->usuario_validado = false;\n\t}", "public function setDefaultAttribute($value){\n $this->attributes['default'] = ($value === 'true' || $value ? true : false);\n}", "private function _set_default()\r\n\t{\r\n\t\tif($this->input->post('default'))\r\n\t\t{\r\n\t\t\t$this->db->update('showcases',array('default' => 0));\r\n\t\t\t$this->db->where('id', $this->input->post('default'));\r\n\t\t\t$this->db->update('showcases',array('default' => 1));\r\n\t\t\t\r\n\t\t\t$this->set_message('success', 'Vetrina predefinita aggiornata con successo!');\r\n\t\t\tredirect($this->list);\r\n\t\t}\r\n\t}", "public function applyDefaultValues()\n {\n $this->is_not = false;\n $this->rank = 0;\n }", "public function __default()\r\n \t{\r\n \t if( self::isArg( 'notifwindow') )\r\n \t {\r\n $this->view = \"common_notifwindow\";\r\n \t $this->viewArgs['table'] = self::getArg( \"table\", AT_posint, true );\r\n \t }\r\n \t else\r\n \t {\r\n $this->view = \"dummygame_dummygame\";\r\n self::trace( \"Complete reinitialization of board game\" );\r\n }\r\n \t}", "private function _load_default_model(){\n\n\t\t$default_model_name = strtolower(get_class($this)) . '_model';\n\n\t\tif(file_exists(APPPATH . 'models/' . $default_model_name . '.php')){\n\n\t\t\t$this->load->model($default_model_name, strtolower(get_class($this)));\n\t\t\t$this->_default_model = strtolower(get_class($this));\n\t\t}\n\n\t}", "public function model()\n {\n return State::class;\n }", "public function model()\n {\n return State::class;\n }", "public function getDefault();", "public function setDefaultValues()\n\t{\t\t\n\t\t\t \n\t}", "protected function initialiseModel()\n {\n parent::initialiseModel();\n\n $this->SelectedTab = 0;\n }", "final protected function _defaults(){\n if(! $this->_defaults) return;\n foreach($this->_defaults as $conf => $default_value){\n if(! self::inform($conf)) self::define($conf, $default_value);\n }\n }", "public function useDefaults()\n\t{\n\t\t$this->use_defaults = true;\n\t}", "public function set_behaviors_default_data() {\n\n\t\t$this->is_google_personalize_enabled = 'checked';\n\t\t$this->google_confirmation_title = 'Personalized advertisements';\n\t\t$this->google_confirmation_message = 'Turning this off will opt you out of personalized advertisements delivered from Google on this website.';\n\t\t$this->confirmbutton = 'Confirm';\n\t\t$this->is_email_enabled = 'checked';\n\t\t$this->email_address = '';\n\t\t$this->popup_main_title = 'Do Not Sell My Personal Information';\n\t\t$this->link_text = 'Privacy Policy';\n\t\t$this->link_url = '';\n\t\t$this->privacy_policy_message = 'Exercise your consumer rights by contacting us below';\n\t\t$this->is_phone_enabled = 'checked';\n\t\t$this->phone_number = '';\n\t\t$this->form_link_text = 'Exercise Your Rights';\n\t\t$this->form_link_url = '';\n\t\t$this->form_enable = 'checked';\n\t\t$this->publish_status = 'Draft';\n\t\t$this->last_published = '';\n\t\t$this->selectuseroption\t\t\t\t = 'All';\n\t\t$this->isIABEnabled \t\t\t\t = 'checked';\n\t\t$this->isLSPAenable \t\t\t\t = '';\n\t}", "public function makeDefault() {\n $this->update([\n 'color' => null,\n 'size' => null\n ]);\n }", "public function applyDefaultData()\n {\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance();\n $config = $objectManager->get('\\Magento\\Framework\\App\\Config\\ScopeConfigInterface');\n\n $this->setsup_is_active(1);\n $this->setsup_locale($config->getValue('general/locale/code'));\n $this->setsup_currency($config->getValue('currency/options/base'));\n $this->setsup_country($config->getValue('general/country/default'));\n\n return $this;\n }", "protected function setDefaultValues()\n {\n parent::setDefaultValues();\n\t}", "public function setDefaultStateName($stateName) {\n $this->values->put('DefaultStateName', $stateName);\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function applyDefaultValues()\n {\n $this->jml_lantai = '1';\n $this->asal_data = '1';\n $this->last_sync = '1901-01-01 00:00:00';\n }", "function init() {\n $this->options['selected'] = isset($this->options['value']) ?\n true : @(bool)$this->options['default'];\n }", "public function __construct()\n {\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n $this->applyDefaultValues();\n }", "public function init() {\n\t\t// use this method to initialize default values.\n\t}", "public function applyDefaultValues()\n\t{\n\t}", "public function applyDefaultValues()\n\t{\n\t}", "public function applyDefaultValues()\n\t{\n\t}", "protected function cliModelInit()\n {\n }", "function getDefaultValue() \n {\n return $this->getValueByFieldName( 'statevar_default' );\n }", "public function __default()\r\n {\r\n if( self::isArg( 'notifwindow') ) {\r\n $this->view = \"common_notifwindow\";\r\n $this->viewArgs['table'] = self::getArg( \"table\", AT_posint, true );\r\n } else {\r\n $this->view = \"thecrew_thecrew\";\r\n self::trace( \"Complete reinitialization of board game\" );\r\n }\r\n }", "public function toggleDefault()\n {\n $this->language->default = ! $this->language->default;\n }", "public static function set_default_values() {\n\t\t?>\n\t\tcase \"nu_phone\" :\n\t\t\tfield.label = \"Phone\";\n\t\t\tfield.isRequired = true;\n\t\t\tfield.description = \"Numbers only. e.g. 8885551212\";\n\t\t\tbreak;\n\t\t<?php\n\t}", "function post_model_init($from_cache = FALSE)\n {\n }", "public static function preModel(){\n\t\t\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "protected function get_default() {\n\t\treturn false;\n\t}", "protected function setDefaultTemplate(): void\n {\n $this->setDefaultData(function(Generator $faker) {\n return [\n 'password' => 'xx',\n 'username' => $faker->email,\n 'modified' => time(),\n // set the model's default values\n // For example:\n // 'name' => $faker->lastName\n ];\n });\n }", "function setDefault($value)\n {\n $this->_defValue = $value;\n }", "public function __default()\r\n {\r\n if (self::isArg('notifwindow')) {\r\n $this->view = \"common_notifwindow\";\r\n $this->viewArgs['table'] = self::getArg(\"table\", AT_posint, true);\r\n } else {\r\n $this->view = \"lettertycoon_lettertycoon\";\r\n self::trace(\"Complete reinitialization of board game\");\r\n }\r\n }", "protected function setDefaults()\n {\n return;\n }", "public function defaultData();", "public function getStatesModel()\n\t{\n\t\treturn $this->statesModel = new StatesModel();\n\t}", "public function getDefaultValue();", "public function getDefaultValue();", "public function applyDefaultValues()\n\t{\n\t\t$this->closed = 0;\n\t\t$this->lastfmid = 0;\n\t\t$this->hasphotos = 0;\n\t}", "public function applyDefaultValues()\n\t{\n\t\t$this->platform = 'pc';\n\t\t$this->experience_score = 0;\n\t\t$this->up_votes = 0;\n\t\t$this->down_votes = 0;\n\t\t$this->is_guest = 0;\n\t\t$this->is_admin = 0;\n\t\t$this->today_votes = 0;\n\t\t$this->email_on = 1;\n\t}", "private function getStateDefaultStatus($state)\n {\n\t\tif(\\Cart2Quote\\License\\Model\\License::getInstance()->isValid()) {\n\t\t\t$status = false;\n $stateNode = $this->_getState($state);\n if ($stateNode) {\n $status = $this->quoteStatusFactory->create()->loadDefaultByState($state);\n $status = $status->getStatus();\n }\n return $status;\n\t\t}\n\t}" ]
[ "0.77757794", "0.72255844", "0.6857964", "0.67950636", "0.67661", "0.6433752", "0.64074224", "0.63712305", "0.61876214", "0.61864567", "0.6159088", "0.61543477", "0.6153316", "0.61428887", "0.6116904", "0.61084956", "0.6106097", "0.60391295", "0.60389197", "0.6019848", "0.5986674", "0.59860927", "0.5976762", "0.59668744", "0.59477085", "0.5901205", "0.58822954", "0.5878731", "0.5871747", "0.5848243", "0.58415335", "0.58413815", "0.5833248", "0.5825086", "0.58250594", "0.5806455", "0.58058864", "0.58041453", "0.58029646", "0.57660234", "0.57429475", "0.57429475", "0.57427984", "0.57279396", "0.5711024", "0.5692638", "0.5673827", "0.566948", "0.5664214", "0.5660662", "0.56602883", "0.5649529", "0.56371003", "0.56371003", "0.56371003", "0.56371003", "0.56371003", "0.56371003", "0.56371003", "0.56371003", "0.56371003", "0.5635351", "0.5633597", "0.5625998", "0.5625998", "0.5625998", "0.5625998", "0.5625998", "0.56185526", "0.5617039", "0.5617039", "0.5617039", "0.559846", "0.5595863", "0.5588903", "0.5571013", "0.5570181", "0.55631495", "0.55542296", "0.5544705", "0.5544705", "0.5544705", "0.5544705", "0.5544705", "0.5544705", "0.5544705", "0.5544705", "0.5544705", "0.5544705", "0.55306304", "0.5529163", "0.55278975", "0.5527834", "0.55129236", "0.55105746", "0.5509279", "0.5508973", "0.5508973", "0.5507722", "0.55054384", "0.5486495" ]
0.0
-1
/$query = $this>db>get('tb_collection'); return $query>result_array();
public function getAllCollection() { return $this->db->get('tb_collection')->result_array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function collection() {\n \t$db = $this->db;\n\t\t$sql = $this->sql();\n\t\t$rows = $db::execute($sql);\n\t\t$model = $this->model;\n\t\treturn new \\Collection($model::arrayFactoryFromRows($rows));\n\t}", "public function getCollection($table)\n {\n $sql = 'SELECT * FROM '.$table;\n $result = $this->db->query($sql);\n if($result){\n $ret = array();\n while($data = $result->fetch_assoc()){\n $ret[] = $data;\n }\n $result->close();\n return $ret;\n }else{\n return false;\n }\n }", "public function get_collections()\n\t{\t\t\n\t\t$query = $this->db->get('collections');\n\t\treturn $query->result_array();\n\t}", "public function getCollection() ;", "public function getAll() : Collection;", "public function fetchAll(){\r\n$table=$this->getTable();\r\nreturn $this->fetch_array($this->query(\"SELECT * FROM {$table}\"));\r\n}", "function get_all()\n {\n return $this->db->get($this->table)->result();\n }", "function dbcollection($query, $start = 0, $count = 20) {\n $resrows = array();\n $ii = 0;\n\n $result = dbquery($query . \" limit %d, %d\", $start, $count);\n while ($result && $row = dbfetch($result, DB_NUM)) {\n if (count($row) == 1) {\n // don't keep arrays\n $row = array_shift($row);\n }\n $resrows[$start + $ii] = $row;\n $ii++;\n }\n\n return $resrows;\n}", "function getTWord() {\n //printVar($idStr);\n $mongo = new MongoDB\\Driver\\Manager();\n $query = new MongoDB\\Driver\\Query([], []);\n $cursor = $mongo->executeQuery('callaut.av_search', $query);\n $posts = [];\n foreach ($cursor as $document) {\n //printVar($document);\n //die();\n array_push($posts, json_decode(MongoDB\\BSON\\toJSON(MongoDB\\BSON\\fromPHP($document))));\n \n }\n return $posts;\n \n }", "function get_all(){\n $this->load();\n return $this->query;\n }", "function db_get($sql) {\n $results = db_query($sql);\n $records = array();\n while($rec=db_fetch($results)) {\n $records[]=$rec;\n }\n return $records;\n}", "static function finda($collection, $query = array(), $options = array()) {\r\n\t\t$result = self::find($collection, $query, $options);\r\n\t\t$array = array();\r\n\t\tforeach ($result as $val) {\r\n\t\t\t$array[] = $val;\r\n\t\t}\r\n\t\treturn $array;\r\n\t}", "function get_data()\n\t{\n\t\t$query = $this->db->get(\"Testing\");\n\n\t\treturn $query;\n\t}", "public function queryselect() {\r\n // we should load the database (autoload)\r\n $this->load->database();\r\n $query = $this->db->query('SELECT * FROM crud');\r\n return $query->result_array();\r\n //$result = $query->result_array();\r\n //return $result;\r\n }", "function db_driver_result($resource)\n{\n global $_db;\n\n $results = array();\n while ($data = pg_fetch_array($resource, null, PGSQL_ASSOC)) {\n $results[] = $data;\n }\n\n return $results;\n}", "public function get()\n {\n return self::fetchAll();\n }", "public function fetchArray();", "public function fetchArray();", "public function fetchAll();", "public function fetchAll();", "public function fetchAll();", "public function fetchAll();", "static function finda($collection, $query = array(), $options = array()) {\n $result = self::find($collection, $query, $options);\n $array = array();\n foreach ($result as $val) {\n $array[] = $val;\n }\n return $array;\n }", "public function getCollection();", "public function getCollection();", "public function getCollection();", "public function getCollection();", "function dbGetAll(){\r\n global $db_query;\r\n return $db_query->fetchAll(PDO::FETCH_ASSOC); \r\n}", "public function query() {\n\t\treturn Documents::instance()->query();\n\t}", "function get_ttcollection_w($id){\n\t\t$sQuery=\"SELECT ttcollection_w.CollectionIdW,clientes.cli_des,ttcollection_w.CollectionTotalPayment,\n ttcollection_w.UserCode,ttcollection_w.CustCode,ttcollection_w.CollectionDate,ttcollection_w.CollectionNote,\n ttcollection_w.fecha_a,usuario.nombre,usuario.apellido\n FROM ttcollection_w\n INNER JOIN clientes ON ttcollection_w.CustCode = clientes.co_cli\n INNER JOIN usuario ON ttcollection_w.UserCode = usuario.usuario\n WHERE ttcollection_w.CollectionStatus = $id\";\n\t\t$result=mysql_query($sQuery) or die(mysql_error());\n\t\t$i=0;\n\t\twhile($row=mysql_fetch_array($result)){\n\t\t\tforeach($row as $key=>$value){\n\t\t\t\t$res_array[$i][$key]=$value;\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\t\treturn($res_array);\t\n\t}", "public function get(){\n\n if(is_null($this->columns)) $this->columns = ['*'];\n $select_statement = $this->grammer->compileSelect($this);\n \n \n $result = $this->connection->get($select_statement); \n \n if(!empty($this->model)){\n \n return $this->return_results_objects($result);\n\n }else{\n \n return $this->return_result_as_array($result);\n }\n \n }", "function retrieveAllRiver(){\n $data = $this->db->retrieveAllRiver();\n return $data;\n }", "function currentBlogs() {\n global $blogCollection;\n $result = $blogCollection->find()->sort(array(\"blogId\" => -1));\n\n //showMe((iterator_to_array($result)));\n\n $arrayOfBlogs = array();\n\n foreach($result as $key => $val) {\n //showMe($val['blogId']);\n //array_push($arrayOfBlogs, $val['blogId']);\n $arrayOfBlogs[$val['blogId']] = $val['blogId'];\n }\n\n return $arrayOfBlogs;\n}", "public function fetchAllForBase3();", "public function getCollection()\n {\n $collection = trim(str_replace('\\\\', '_', $this->collection), '_');\n return $this->$collection()\n ->setDatabase($this->database)\n ->setTable($this->table)\n ->setModel($this->model)\n ->set($this->getRows());\n }", "function fetch_array()\n {\n return mysql_fetch_array($this->_queryResource, MYSQL_ASSOC);\n }", "public function all(){ \n $arraytoret = array();\n $query='select *\n from Usuario';\n $results = $this->driver->exec($query);\n return $this->factory($results);\n}", "public function resultset(){\n\t\t$this->execute() ;\n\t\treturn $this->statement->fetchAll(PDO::FETCH_ASSOC) ;\n\t}", "public function getCollectionQuery(): Builder;", "public function fetchAll(){\n\t\treturn $this->instance->fetchAll();\n\t}", "public function getCollection()\n {\n\n $State = State::select('tbl_state.*');\n return $State->get();\n }", "function d_getCollectionData($collection) {\n\t$result = array();\n\tforeach($collection as $v) {\n\t\t$item = array();\n\t\tforeach($v as $k2 => $v2) {\n\t\t\t$item[ $k2 ] = $v2;\n\t\t}\n\t\tif (isset($v->fid)) $item['fid'] = $v->fid; \n\t\t$result[] = $item;\n\t}\n\treturn $result;\n}", "public function get_all ();", "public function fetchQuery(){\n $bag=array();\n while($row=$this->select->fetch_assoc()){\n array_push($bag,$row);\n // or $bag[]=$row\n }\n return $bag;\n }", "public function retrieveAll(){\r\n $conn = new ConnectionManager();\r\n $pdo = $conn->getConnection();\r\n \r\n\r\n // Add your codes here\r\n\r\n\r\n return $result;\r\n }", "function getTopics()\n {\n\n $topics = \"SELECT * from topics\";\n $topicsresult = $this->ds->select($topics); \n //print_r($topicsresult);\n return $topicsresult;\n }", "function get_all_records(){\n\t\tglobal $db;\n\t\t$sql=\"SELECT * FROM $this->table order by id asc\";\n\t\t$db->query($sql);\n\t\t$row=$db->fetch_assoc_all();\n\t\treturn $row;\n\t}", "public function resultaSet(){\n $this->execute();\n return $this->statemet->fetchAll(PDO::FETCH_OBJ);\n }", "public function fetch()\n {\n return (array)$this->query();\n }", "function db_fetch($results) {\r\n\r\n\treturn mysql_fetch_array($results);\r\n\t\r\n}", "function all_users()\r\n\t{\r\n\t\t//$this->mongo_db->select('*');\r\n\t\t//$this->mongo_db->from('users');\r\n\t\t// \r\n\t\t//$query = $this->mongo_db->get();\r\n\t\t//return $query->result_array();\r\n\t\t\r\n\t\t//connect to mongodb collection (i.e., table) named as ‘surfinme_index’\r\n\t\t$collection \t= $this->mongo_db->db->selectCollection('settings');\r\n \t//selecting records from the collection - surfinme_index\r\n \t$result\t\t= $collection->find();\r\n\t\tforeach($result as $data) \r\n\t\t{ \r\n\t\t\t//display the records \r\n\t\t\tvar_dump($data);\r\n\t\t} \r\n\t\t\r\n\t}", "function get()\n\t{\n\t\tif (empty($this->use_db)) $this->use_db = false; //use default connection\n\t\t$this->sql = 'SELECT * FROM ' . $this->table;\n\t\t$this->apply_filters();\n\t\t$this->apply_sort();\n\t\treturn $this->fetch_records();\n\t}", "public function getAll(){\n\t\treturn $this->db->get($this->table);\n\t}", "function obtenerArray(){\r\n\t\treturn mysql_fetch_array( $this->rs() );\r\n\t}", "function recuperer_bsm_entier(){\n global $db;\n $sql = \"SELECT * FROM bsm \";\n $req = $db->prepare($sql);\n $req-> execute();\n $results = array();\n while($rows = $req->fetchObject()){\n $results[] = $rows;\n }\n return $results;\n}", "public function results()\r\n\t{\r\n\t\treturn $this->model->get($this->select);\r\n\t}", "public function results(): array;", "function get_all() {\n\t\t\n\t\t$query = $this->db->get('admin');\n $q = $query->result_array();\n\t return $q;\n\t}", "function AllReponces(){\n return $this->db->get($this->reponce)->result();\n }", "public function fetchAll()\n {\n }", "public function fetch_objects($query);", "public function fetchResult();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "protected function getCollection($collection){\r\n return $this->{$this->db}->$collection;\r\n }", "public function get(){\n\t\t\t\t\t $this->db->setTablename($this->tablename);\n\t\t\t\t\t $condition = array(\"ide\" =>$this->ide);\n return $this->db->getRows(array(\"where\"=>$condition,\"return_type\"=>\"single\"));\n\t\t\t\t\t }", "function FetchIT()\n {\n $sql=\"SELECT * FROM INVT_T_INSP_HEAD\";\n return $this->db->query($sql, $return_object = TRUE)->result_array(); \n }", "public function index()\n {\n $items = DB::collection('crudevolutions')->get();\n return $items;\n\n }", "public function fetch_array($result_set){\n return mysql_fetch_array($result_set);\n \n }", "public function myFindAll(){\n // $queryBuilder = $this->createQueryBuilder('a');\n // $query = $queryBuilder->getQuery();\n // $results = $query->getResult();\n return $this->createQueryBuilder('a')->getQuery()->getResult;\n }", "function get_all(){\r\n\t\t$rows = array();\r\n\t\twhile($row = $this->get_row()){\r\n\t\t\t$rows[] = $row;\r\n\t\t}\r\n\t\treturn $rows;\r\n\t}", "public function get(){\n\t\t\t\t\t $this->db->setTablename($this->tablename);\n\t\t\t\t\t ;\n return $this->db->getRows(array(\"where\"=>$condition,\"return_type\"=>\"single\"));\n\t\t\t\t\t }", "public function fetch_arrays($query);", "public function all(){\n\n $a= parent::bdd()->query(\"SELECT * FROM auteur\");\n $b= $a->fetchall(\\PDO::FETCH_OBJ);\n\n return $b;\n\n }", "public function getAll(){\n\t\t\t//return $this->db->get('item'); \n\t\t}", "public abstract function fetchAll();", "public function getSocialConnectItemsList()\n {\n //collection\n\n //SELECT * FROM MYTABLE\n $collection = $this->_ItemFactory->getCollection();\n $collection->addFieldToFilter(\"status\", 1);\n $collection->setOrder(\"Sort_Order\", 'DESC');\n //$collection->getSelect() use print query\n return ($collection->count()) ? $collection : null;\n }" ]
[ "0.7017653", "0.6901569", "0.67929614", "0.67762166", "0.6691817", "0.6596962", "0.65945613", "0.656072", "0.65531754", "0.6491643", "0.64909357", "0.64734757", "0.6461831", "0.64484036", "0.64322704", "0.64143544", "0.6387219", "0.6387219", "0.6370071", "0.6370071", "0.6370071", "0.6370071", "0.63623214", "0.6361543", "0.6361543", "0.6361543", "0.6361543", "0.63438225", "0.6293875", "0.62910885", "0.6281451", "0.6262955", "0.62409645", "0.62355155", "0.6235351", "0.6230681", "0.62283164", "0.6216061", "0.62063146", "0.61937815", "0.6193704", "0.61829877", "0.61823493", "0.61766", "0.6172874", "0.6169389", "0.6168754", "0.6145155", "0.6139771", "0.6139256", "0.61389476", "0.6137504", "0.61343926", "0.6129058", "0.6128322", "0.6119216", "0.6117046", "0.6109156", "0.6106244", "0.6103591", "0.60930073", "0.60929567", "0.6086466", "0.6086466", "0.6086466", "0.6086466", "0.6086466", "0.6086466", "0.6086466", "0.6086466", "0.6086466", "0.6086466", "0.6086466", "0.6086466", "0.6086466", "0.6086466", "0.6086466", "0.6086466", "0.6086466", "0.6086466", "0.6086466", "0.6086466", "0.6086466", "0.6086466", "0.6086466", "0.6086466", "0.6086466", "0.60791487", "0.6069692", "0.60670525", "0.6062191", "0.60595435", "0.60595", "0.60540897", "0.6052989", "0.605116", "0.6049122", "0.60442597", "0.6037334", "0.6034776" ]
0.7420564
0
Display a listing of the resource.
public function index(Channel $channel, ThreadFilters $filters,Trending $trending) { $threads = $this->getThreads($filters, $channel); if (request()->wantsJson()){ return $threads; } return view('threads.index',[ 'threads' => $threads, 'trending' => $trending->get() ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create() { return view('threads.create'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request,Recaptcha $recaptcha) { $this->validate($request, [ 'title' => 'required', new Spamfree, 'body' => 'required', new Spamfree, 'channel_id' => 'required|exists:channels,id', 'g-recaptcha-response' => 'required',$recaptcha ]); $response = Http::asForm()->post('https://www.google.com/recaptcha/api/siteverify', [ 'secret' => config('services.recaptcha.secret'), 'response' => $request->input('g-recaptcha-response'), 'remoteip' => request()->ip() ]); $thread = Thread::create([ 'user_id' => Auth::id(), 'channel_id' => $request->channel_id, 'title' => $request->title, 'body' => $request->body, 'slug' => $request->title ]); return redirect($thread->path()) ->with('flash','Your thread has been published'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function show($channelId,Thread $thread,Trending $trending) { if(auth()->check()){ $key = sprintf("users.%s.visits.%s",auth()->id(),$thread->id); cache()->forever($key, Carbon::now()); } $trending->push($thread); $thread->increment('visits'); return view('threads.show', compact('thread')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit(Thread $thread) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit() \n\t{\n UserModel::authentication();\n\n //get the user's information \n $user = UserModel::user();\n\n\t\t$this->View->Render('user/edit', ['user' => $user]);\n }" ]
[ "0.78557473", "0.76946205", "0.72731614", "0.7241571", "0.71700776", "0.70650244", "0.7052897", "0.698311", "0.69465625", "0.6944826", "0.69399333", "0.69286525", "0.69031185", "0.68969506", "0.68969506", "0.6878258", "0.6862812", "0.6859171", "0.68560475", "0.68436426", "0.6834711", "0.6810601", "0.680613", "0.6804975", "0.68015367", "0.6795471", "0.6791821", "0.6791821", "0.6787303", "0.6783644", "0.67790574", "0.67766285", "0.6767741", "0.67610145", "0.67455536", "0.67455536", "0.6744367", "0.6743159", "0.6739656", "0.67351145", "0.67246765", "0.67128825", "0.6692859", "0.66916454", "0.6687554", "0.66875297", "0.6687494", "0.6684443", "0.668203", "0.66689324", "0.66680384", "0.6664605", "0.6664605", "0.66621166", "0.66604865", "0.66589504", "0.6655767", "0.66542184", "0.665213", "0.66422516", "0.6631665", "0.663077", "0.6627607", "0.6627607", "0.66193914", "0.6618503", "0.66160196", "0.66146857", "0.6609641", "0.6608315", "0.6605284", "0.6595882", "0.65947276", "0.6594626", "0.65895563", "0.6589339", "0.6587281", "0.65805006", "0.6579201", "0.6579166", "0.657641", "0.6576111", "0.65740323", "0.65692765", "0.6568046", "0.6567221", "0.6565346", "0.6560687", "0.6560687", "0.6560384", "0.65577257", "0.65569293", "0.65558636", "0.6555392", "0.65553015", "0.65542984", "0.655418", "0.6554106", "0.6547678", "0.65473104", "0.6543329" ]
0.0
-1
Remove the specified resource from storage.
public function destroy($channel,Thread $thread) { $this->authorize('update',$thread); $thread->delete(); if (request()->wantsJson()){ return response([],204); } return redirect('/threads'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
Get all grades from DB for a job.
public function getAll($jobCode) { return DB::table('job_grades') ->selectRaw( 'grade_code as "code",'. 'grades.name as "name",'. 'coalesce(job_grades.bottom_rate, grades.bottom_rate) as "bottomRate",'. 'coalesce(job_grades.mid_rate, grades.mid_rate) as "midRate",'. 'coalesce(job_grades.top_rate, grades.top_rate) as "topRate"' ) ->join('grades', 'grades.code', '=', 'grade_code') ->where([ ['job_code', $jobCode] ]) ->get(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAll()\n {\n // $now = Carbon::now();\n return\n DB::table('grades')\n ->select(\n 'id',\n 'eff_begin as effBegin',\n 'eff_end as effEnd',\n 'code',\n 'name',\n 'ordinal',\n 'bottom_rate as bottomRate',\n 'mid_rate as midRate',\n 'top_rate as topRate'\n )\n ->where([\n ['tenant_id', $this->requester->getTenantId()],\n ['company_id', $this->requester->getCompanyId()]\n ])\n ->get();\n }", "public function get_grades() {\n return $this->grades;\n }", "protected /*array<int, int>*/ function getGrades(/*int*/ $aid)\n\t{\n\t\t$query = $this->db->prepare(\"\n\t\t\tSELECT * FROM `grades` WHERE `assignmentid` = :aid;\n\t\t\")->execute(array(\n\t\t\t':aid' => $aid\n\t\t));\n\n\t\t$grades = array();\n\n\t\tforeach($query as $row)\n\t\t\t$grades[$row['studentid']] = $row['grade'];\n\n\t\treturn $grades;\n\t}", "public function index()\n {\n //Función Inicial que redirige a la vista index de grades\n //Retorna una lista con todos los grades existentes\n $grade = Grade::all();\n return $grade;\n }", "protected /*array<int, int>*/ function getAllGrades($studentid) {\n\t\t$query = $this->db->prepare(\"SELECT * FROM `grades` WHERE `studentid` = ?;\")->execute([$studentid]);\n\t\t$grades = array();\n\n\t\tforeach ($query as $row) {\n\t\t\t$grades[(int) $row['assignmentid']] = (int) $row['grade'];\n\t\t}\n\n\t\treturn $grades;\n\t}", "public function getGrades($studentId)\n {\n $st = $this->conn->prepare('SELECT grade FROM grades WHERE student_id = ?');\n $st->bindParam(1, $studentId);\n $st->execute();\n $output = [];\n while ($row = $st->fetch(\\PDO::FETCH_OBJ)) {\n $output[] = $row;\n }\n return $output;\n }", "public function getGradeById($id = 0)\n {\n if ($id === 0)\n {\n $query = $this->db->get('grade');\n return $query->result_array();\n }\n\n $query = $this->db->get_where('grade', array('grade_id' => $id));\n return $query->row_array();\n }", "public function grades()\n {\n return $this->hasMany('App\\Model\\Grade', 'student_id');\n }", "function retrieveSubmissionGrades($submit_id)\n{\n global $CFG, $PDOX;\n if ( $submit_id === false ) return false;\n $grades_received = $PDOX->allRowsDie(\n \"SELECT grade_id, points, note, displayname, email, rating\n FROM {$CFG->dbprefix}peer_grade AS G\n JOIN {$CFG->dbprefix}lti_user as U\n ON G.user_id = U.user_id\n WHERE G.submit_id = :SID\n ORDER BY points DESC\",\n array( ':SID' => $submit_id)\n );\n return $grades_received;\n}", "public function getJobgrade()\n\t\t{\n\t\t\treturn $this->hasOne(Jobgrade::className(), ['JOBGRADE_ID' => 'JOBGRADE_ID']);\n\t\t}", "public function getAllInActive()\n {\n return\n DB::table('grades')\n ->select(\n 'id',\n 'eff_begin as effBegin',\n 'eff_end as effEnd',\n 'code',\n 'name',\n 'ordinal',\n 'bottom_rate as bottomRate',\n 'mid_rate as midRate',\n 'top_rate as topRate'\n )\n ->where([\n ['tenant_id', $this->requester->getTenantId()],\n ['company_id', $this->requester->getCompanyId()],\n ['eff_end', '<', Carbon::now()]\n ])\n ->get();\n }", "public function getGradeAttribute()\n {\n if (is_null($this->scores)) {\n return;\n } \n\n return [];\n }", "public function getAllGpa() {\n $academicYears = StudentRegisterCourse::query()\n ->where('student_id', $this->id)\n ->select('academic_year_id')\n ->distinct('academic_year_id')\n ->pluck('academic_year_id')\n ->toArray();\n foreach ($academicYears as $item) {\n $terms = StudentRegisterCourse::query()\n ->where('student_id', $this->id)\n ->where('academic_year_id', $item)\n ->select('term_id')\n ->distinct('term_id')\n ->pluck('term_id')\n ->toArray();\n foreach ($terms as $term) {\n $gpaCalculator = new GpaCalculator($this, $item, $term);\n $gpa = $gpaCalculator->getGPA();\n $this->storeGpa($this->id, $item, $term, $gpa);\n }\n }\n }", "public function grades()\n {\n $grades = DB::table('grade_level')->get();\n\n return view('grades.id', ['grade_level' => $grades]);\n }", "function get_all_gradable_items() {\n\n global $CFG;\n \n $sql = \"SELECT a.id, a.name, a.description as summary, a.course, c.id as cmid\n FROM {$CFG->prefix}assignment a\n INNER JOIN {$CFG->prefix}course_modules c\n ON a.id = c.instance\n WHERE c.module = {$this->mainobject->modulesettings['assignment']->id}\n AND c.visible = 1\n AND a.course IN ({$this->mainobject->course_ids})\n ORDER BY a.id\";\n\n $assignments = get_records_sql($sql);\n $this->assessments = $assignments;\n \n }", "public function get_all_grade_letters($courseid) {\n global $remotedb;\n $sql = \"SELECT l.letter, con.id\n FROM {grade_letters} l\n JOIN {context} con ON l.contextid = con.id AND con.contextlevel=50\n AND con.instanceid=?\";\n $params = array($courseid);\n $letters = $remotedb->get_records_sql($sql, $params);\n $out = '';\n if ($letters) {\n foreach ($letters as $letter) {\n $out .= $letter->letter . \", \";\n }\n } else {\n $defaultletters = grade_get_letters();\n $revdef = array_reverse($defaultletters);\n foreach ($revdef as $letter) {\n $out .= $letter . \", \";\n }\n }\n return chop($out, ', ');\n }", "public function getGrads()\n {\n return $this->hasMany(Grade::className(), ['gradId' => 'GradId'])->viaTable('mitgliedergrade', ['MitgliedId' => 'MitgliederId']);\n }", "private function getResults($gid)\n\t{\n\t\t$arr = array();\n\t\t$sid = $_SESSION['uid'];\n\t\t$db = Db::getLink();\n\t\t$stmt = $db->prepare(\n\t\t\t\"SELECT `assessment`.`name` , `results`.`grade`, `assessment`.`isDraft`\n\t\t\tFROM `results`\n\t\t\tLEFT JOIN `assessment` ON `assessment`.`id` = `results`.`aid`\n\t\t\tWHERE `results`.`sid` = ? AND `assessment`.`moid` IN\n\t\t\t(SELECT `group`.`moid` FROM `group` WHERE `group`.`id` = ?);\"\n\t\t);\n\t\t$stmt->bind_param('ii', $sid, $gid);\n\t\t$stmt->execute();\n\t\t$stmt->bind_result($aname, $grade, $isDraft);\n\t\twhile ($stmt->fetch()) {\n\t\t\tif($isDraft) {\n\t\t\t\t$arr[$aname] = 'Not published';\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$arr[$aname] = $grade . '%';\n\t\t\t}\n\t\t}\n\t\treturn $arr;\n\t}", "function get_grade_letters() {\n global $COURSE;\n $context = get_context_instance(CONTEXT_COURSE, $COURSE->id);\n $letters = grade_get_letters($context);\n }", "public function index($student_id = NULL, $course_id = NULL)\n\t{\n\t\t// Log DB interaction\n\t\tLog::info('DB: Get all grades for student ' . $student_id . ' in course ' . $course_id);\n\n\t\t$grades = array(\n\t\t\t0 => array(\n\t\t\t\t'id' => 1,\n\t\t\t\t'exam_id' => 2,\n\t\t\t\t'score' => 92\n\t\t\t),\n\t\t\t1 => array(\n\t\t\t\t'id' => 2,\n\t\t\t\t'exam_id' => 12,\n\t\t\t\t'score' => 72\n\t\t\t)\n\t\t);\n\n\t\t// Calucated average = $this->getAverage($grades);\n\t\t$average = array(\n\t\t\t0 => array(\n\t\t\t\t'score' => 82,\n\t\t\t\t'type' => 'final' // type = enum(current, final)\n\t\t\t)\n\t\t);\n\n\t\t// Return\n\t\treturn Response::json(array(\n\t\t\t'error' => false,\n\t\t\t'grades' => $grades,\n\t\t\t'average' => $average),\n\t\t\t200\n\t\t);\n\t}", "public static function getGradesEN($withKeys=false)\n\t\t{\n\t\t\t$connection = Connection::getConnection();\n\t\t\t$statement = $connection->prepare(\"SELECT id,name_en as name,age FROM scholar_level\");\n\t\t\t$statement->setFetchMode(PDO::FETCH_ASSOC);\n\t\t\t$statement->execute();\n\n\t\t\t$content = [];\n\n\t\t\twhile ($row = $statement->fetch()) {\n\t\t\t\tif($withKeys)\n\t\t\t\t{\n\t\t\t\t\t$content[$row[\"id\"]] = $row;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$content[] = $row;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $content;\n\t\t}", "public function getGradesForClass($class_id) {\n return $this->get('get_grades_for_class', ['class_id' => $class_id]);\n }", "public function getMgfSelectionGrades()\n {\n return $this->hasMany(MgfSelectionGrade::className(), ['criterion_id' => 'id']);\n }", "function questionnaire_get_user_grades($questionnaire, $userid=0) {\n global $DB;\n $params = array();\n $usersql = '';\n if (!empty($userid)) {\n $usersql = \"AND u.id = ?\";\n $params[] = $userid;\n }\n\n $sql = \"SELECT a.id, u.id AS userid, r.grade AS rawgrade, r.submitted AS dategraded, r.submitted AS datesubmitted\n FROM {user} u, {questionnaire_attempts} a, {questionnaire_response} r\n WHERE u.id = a.userid AND a.qid = $questionnaire->id AND r.id = a.rid $usersql\";\n return $DB->get_records_sql($sql, $params);\n}", "function escape_get_user_grades($escape, $userid=0) {\n global $CFG, $DB;\n\n $params = array(\"escapeid\" => $escape->id,\"escapeid2\" => $escape->id);\n\n if (!empty($userid)) {\n $params[\"userid\"] = $userid;\n $params[\"userid2\"] = $userid;\n $user = \"AND u.id = :userid\";\n $fuser = \"AND uu.id = :userid2\";\n }\n else {\n $user=\"\";\n $fuser=\"\";\n }\n\n if ($escape->retake) {\n if ($escape->usemaxgrade) {\n $sql = \"SELECT u.id, u.id AS userid, MAX(g.grade) AS rawgrade\n FROM {user} u, {escape_grades} g\n WHERE u.id = g.userid AND g.escapeid = :escapeid\n $user\n GROUP BY u.id\";\n } else {\n $sql = \"SELECT u.id, u.id AS userid, AVG(g.grade) AS rawgrade\n FROM {user} u, {escape_grades} g\n WHERE u.id = g.userid AND g.escapeid = :escapeid\n $user\n GROUP BY u.id\";\n }\n unset($params['escapeid2']);\n unset($params['userid2']);\n } else {\n // use only first attempts (with lowest id in escape_grades table)\n $firstonly = \"SELECT uu.id AS userid, MIN(gg.id) AS firstcompleted\n FROM {user} uu, {escape_grades} gg\n WHERE uu.id = gg.userid AND gg.escapeid = :escapeid2\n $fuser\n GROUP BY uu.id\";\n\n $sql = \"SELECT u.id, u.id AS userid, g.grade AS rawgrade\n FROM {user} u, {escape_grades} g, ($firstonly) f\n WHERE u.id = g.userid AND g.escapeid = :escapeid\n AND g.id = f.firstcompleted AND g.userid=f.userid\n $user\";\n }\n\n return $DB->get_records_sql($sql, $params);\n}", "public function getAllAppliedJobsBySpecificJobId($jobId)\n\t{\n\t\t$sql=$this->db->query(\"SELECT * FROM `appplied_jobs` WHERE `job_id`='\".$jobId.\"' ORDER BY `id` ASC \");\n\t\treturn $sql->fetchAll();\n\t}", "public function get_user_course_grades($batchsize = 50, $lastid = null, $starttime = 0, $endtime = null) {\r\n global $DB;\r\n\r\n $batchsize = clean_param($batchsize, PARAM_INT);\r\n $starttime = clean_param($starttime, PARAM_INT);\r\n\r\n $sqlparams = array();\r\n\r\n if ($batchsize > 50) {\r\n $batchsize = 50;\r\n }\r\n if (!is_null($lastid)) {\r\n $lastid = clean_param($lastid, PARAM_INT);\r\n $lastidsql = \" AND l.id > :lastid\";\r\n $sqlparams['lastid'] = $lastid;\r\n } else {\r\n $lastidsql = '';\r\n }\r\n if (is_null($endtime)) {\r\n $endtime = time() - 1;\r\n } else {\r\n $endtime = clean_param($endtime, PARAM_INT);\r\n }\r\n if ($starttime > $endtime) {\r\n throw new Exception(\"The start time ($starttime) cannot be more than the end time ($endtime)\");\r\n }\r\n\r\n $sqlparams = array_merge($sqlparams, array(\r\n 'siteid' => SITEID,\r\n 'starttime' => $starttime,\r\n 'endtime' => $endtime,\r\n ));\r\n $sql = \"SELECT l.*, l.course AS courseid, u.username, u.idnumber AS useridnumber, c.idnumber AS courseidnumber,\r\n u1.username AS mt1username, u2.username AS mt2username, u3.username AS mt3username,\r\n u4.username AS mt4username, u5.username AS mt5username, u6.username AS mt6username,\r\n u7.username AS finalgradeusername, u8.username AS expiredateusername,\r\n u9.username AS lastaccessusername, u9.username AS neverattendedusername\r\n FROM {block_intelligent_learning} l\r\n INNER JOIN {user} u ON l.userid = u.id\r\n INNER JOIN {course} c ON l.course = c.id\r\n LEFT OUTER JOIN {user} u1 ON l.mt1userid = u1.id\r\n LEFT OUTER JOIN {user} u2 ON l.mt2userid = u2.id\r\n LEFT OUTER JOIN {user} u3 ON l.mt3userid = u3.id\r\n LEFT OUTER JOIN {user} u4 ON l.mt4userid = u4.id\r\n LEFT OUTER JOIN {user} u5 ON l.mt5userid = u5.id\r\n LEFT OUTER JOIN {user} u6 ON l.mt6userid = u6.id\r\n LEFT OUTER JOIN {user} u7 ON l.finalgradeuserid = u7.id\r\n LEFT OUTER JOIN {user} u8 ON l.expiredateuserid = u8.id\r\n LEFT OUTER JOIN {user} u9 ON l.lastaccessuserid = u9.id\r\n LEFT OUTER JOIN {user} u10 ON l.neverattendeduserid = u10.id\r\n WHERE l.course != :siteid\r\n AND l.timemodified > :starttime\r\n AND l.timemodified < :endtime\r\n $lastidsql\r\n ORDER BY l.id ASC\";\r\n\r\n try {\r\n $grades = $DB->get_records_sql($sql, $sqlparams, 0, $batchsize);\r\n } catch (dml_exception $e) {\r\n throw new Exception(\"Couldn't read grades from database\");\r\n }\r\n\r\n if (!$grades) {\r\n $grades = array();\r\n $lastid = '';\r\n } else {\r\n $last = end($grades);\r\n $lastid = $last->id;\r\n }\r\n return $this->response->user_get_user_course_grades($grades, $batchsize, $lastid, $starttime, $endtime);\r\n }", "public static function getGradeById($id)\n\t\t{\n\t\t\t$connection = Connection::getConnection();\n\t\t\t$statement = $connection->prepare(\"SELECT id,name_fr as name,age FROM scholar_level WHERE id = ?\");\n\t\t\t$statement->setFetchMode(PDO::FETCH_ASSOC);\n\t\t\t$statement->bindParam(1, $id);\n\t\t\t$statement->execute();\n\n\t\t\t$content = [];\n\n\t\t\tif ($row = $statement->fetch()) {\n\t\t\t\t$content = $row;\n\t\t\t\t// $content[$row[\"id\"]] = $row;\n\t\t\t}\n\n\t\t\treturn $content;\n\t\t}", "public function getLov()\n {\n $now = Carbon::now();\n return\n DB::table('grades')\n ->select(\n 'code',\n 'name'\n )\n ->where([\n ['tenant_id', '=', $this->requester->getTenantId()],\n ['company_id', '=', $this->requester->getCompanyId()],\n ['eff_begin', '<=', $now],\n ['eff_end', '>=', $now]\n ])\n ->get();\n }", "public function grades()\n {\n return $this->belongsTo(Grade::class);\n }", "function getGrade() {\n return $this->fulfillment['grade_result'];\n }", "public function get_data() {\n global $remotedb, $USER;\n $userid = optional_param('userid', 0, PARAM_INT); // User id.\n if (empty($userid)) {\n $userid = $USER->id;\n }\n $this->content = new stdClass();\n $params = array();\n $now = time();\n // Get any grade items entered directly in the Gradebook.\n $sql = \"SELECT DISTINCT c.id AS courseid,\n c.shortname, \n c.fullname AS coursename,\n gg.itemid AS gradeitemid,\n gi.itemname AS assessmentname,\n gg.finalgrade AS grade,\n gi.itemtype AS gi_itemtype,\n gi.itemmodule AS assessmenttype,\n gi.iteminstance AS gi_iteminstance,\n gi.gradetype AS gradetype,\n gi.scaleid,\n gi.aggregationcoef2 AS weighting,\n gi.display AS display,\n gi.decimals AS decimals,\n -1 AS assignid,\n -1 AS assignmentid,\n -1 AS teamsubmission,\n -1 AS submissiondate,\n -1 AS duedate,\n gi.itemname AS assessmentlink,\n -1 AS reviewattempt,\n -1 AS reviewmarks,\n -1 AS reviewoverallfeedback,\n -1 AS tiiobjid,\n -1 AS subid,\n -1 AS subpart,\n -1 AS partname,\n -1 AS usegrademark,\n gg.feedback AS feedbacklink,\n gi.grademax AS highestgrade,\n gg.userid,\n -1 AS groupid,\n -1 AS assigngradeid,\n -1 AS contextid,\n '' AS activemethod,\n -1 AS nosubmissions,\n '' AS status,\n '' AS onlinetext,\n -1 as sumgrades\n FROM {course} c\n JOIN {grade_items} gi ON c.id=gi.courseid\n AND itemtype='manual' AND (gi.hidden != 1 AND gi.hidden < ?)\n JOIN {grade_grades} gg ON gi.id=gg.itemid AND gg.userid = ?\n AND (gg.hidden != 1 AND gg.hidden < ?)\n WHERE c.visible=1 AND c.showgrades = 1 \";\n array_push($params, $now, $userid, $now);\n if ($this->mod_is_available(\"assign\")) {\n $sql .= \"UNION SELECT DISTINCT c.id AS courseid,\n c.shortname, \n c.fullname AS coursename,\n gg.itemid AS gradeitemid,\n gi.itemname AS assessmentname,\n gg.finalgrade AS grade,\n gi.itemtype AS gi_itemtype,\n gi.itemmodule AS assessmenttype,\n gi.iteminstance AS gi_iteminstance,\n gi.gradetype AS gradetype,\n gi.scaleid,\n gi.aggregationcoef2 AS weighting,\n gi.display AS display,\n gi.decimals AS decimals,\n a.id AS assignid,\n cm.id AS assignmentid,\n a.teamsubmission,\n su.timemodified AS submissiondate,\n a.duedate AS duedate,\n a.name AS assessmentlink,\n -1 AS reviewattempt,\n -1 AS reviewmarks,\n -1 AS reviewoverallfeedback,\n -1 AS tiiobjid,\n -1 AS subid,\n -1 AS subpart,\n -1 AS partname,\n -1 AS usegrademark,\n gg.feedback AS feedbacklink,\n gi.grademax AS highestgrade,\n gg.userid,\n su.groupid,\n ag.id AS assigngradeid,\n con.id AS contextid,\n ga.activemethod,\n a.nosubmissions AS nosubmissions,\n su.status,\n apc.value AS onlinetext,\n -1 as sumgrades\n FROM {course} c\n JOIN {grade_items} gi ON c.id=gi.courseid\n AND itemtype='mod' AND (gi.hidden != 1 AND gi.hidden < ?)\n JOIN {grade_grades} gg ON gi.id=gg.itemid AND gg.userid = ? \n AND (gg.hidden != 1 AND gg.hidden < ?)\n JOIN {course_modules} cm ON gi.iteminstance=cm.instance\n JOIN {context} con ON cm.id = con.instanceid AND con.contextlevel=70\n JOIN {modules} m ON cm.module = m.id AND gi.itemmodule = m.name AND gi.itemmodule = 'assign'\n JOIN {assign} a ON a.id=gi.iteminstance\n JOIN mdl_assign_plugin_config apc on a.id = apc.assignment AND apc.name='enabled' AND plugin = 'onlinetext'\n JOIN {assign_grades} ag ON a.id = ag.assignment AND ag.userid=?\n JOIN mdl_assign_user_flags auf ON a.id = auf.assignment AND auf.workflowstate = 'released'\n AND auf.userid = ? OR a.markingworkflow = 0\n JOIN {grading_areas} ga ON con.id = ga.contextid\n LEFT JOIN {assign_submission} su ON a.id = su.assignment AND su.userid = ?\n WHERE c.visible=1 AND c.showgrades = 1 AND cm.visible=1 \";\n array_push($params, $now, $userid, $now, $userid, $userid, $userid);\n }\n if ($this->mod_is_available(\"quiz\")) {\n $sql .= \"UNION SELECT DISTINCT c.id AS courseid,\n c.shortname, \n c.fullname AS coursename,\n gg.itemid AS gradeitemid,\n gi.itemname AS assessmentname,\n gg.finalgrade AS grade,\n gi.itemtype AS gi_itemtype,\n gi.itemmodule AS assessmenttype,\n gi.iteminstance AS gi_iteminstance,\n gi.gradetype AS gradetype,\n gi.scaleid,\n gi.aggregationcoef2 AS weighting,\n gi.display AS display,\n gi.decimals AS decimals,\n a.id AS assignid,\n cm.id AS assignmentid,\n -1 AS teamsubmission,\n gg.timecreated AS submissiondate,\n a.timeclose AS duedate,\n a.name AS assessmentlink,\n a.reviewattempt AS reviewattempt,\n a.reviewmarks AS reviewmarks,\n a.reviewoverallfeedback AS reviewoverallfeedback,\n -1 AS tiiobjid,\n -1 AS subid,\n -1 AS subpart,\n -1 AS partname,\n -1 AS usegrademark,\n gg.feedback AS feedbacklink,\n gi.grademax AS highestgrade,\n gg.userid,\n -1 AS groupid,\n -1 AS assigngradeid,\n con.id AS contextid,\n ga.activemethod,\n -1 AS nosubmissions,\n '' AS status,\n '' AS onlinetext,\n a.sumgrades as sumgrades\n FROM {course} c\n JOIN {grade_items} gi ON c.id=gi.courseid AND itemtype='mod'\n AND (gi.hidden != 1 AND gi.hidden < ?)\n JOIN {grade_grades} gg ON gi.id=gg.itemid AND gg.userid = ?\n AND (gg.hidden != 1 AND gg.hidden < ?)\n JOIN {course_modules} cm ON gi.iteminstance=cm.instance\n JOIN {context} con ON cm.id = con.instanceid AND con.contextlevel=70\n JOIN {modules} m ON cm.module = m.id AND gi.itemmodule = m.name AND gi.itemmodule = 'quiz'\n JOIN {quiz} a ON a.id=gi.iteminstance\n LEFT JOIN {grading_areas} ga ON con.id = ga.contextid\n WHERE c.visible=1 AND c.showgrades = 1 AND cm.visible=1 \";\n array_push($params, $now, $userid, $now);\n }\n if ($this->mod_is_available(\"workshop\")) {\n $sql .= \"UNION SELECT DISTINCT c.id AS courseid,\n c.shortname, \n c.fullname AS coursename,\n gg.itemid AS gradeitemid,\n gi.itemname AS assessmentname,\n gg.finalgrade AS grade,\n gi.itemtype AS gi_itemtype,\n gi.itemmodule AS assessmenttype,\n gi.iteminstance AS gi_iteminstance,\n gi.gradetype AS gradetype,\n gi.scaleid,\n gi.aggregationcoef2 AS weighting,\n gi.display AS display,\n gi.decimals AS decimals,\n a.id AS assignid,\n cm.id AS assignmentid,\n -1 AS teamsubmission,\n su.timemodified AS submissiondate,\n a.submissionend AS duedate,\n a.name AS assessmentlink,\n -1 AS reviewattempt,\n -1 AS reviewmarks,\n -1 AS reviewoverallfeedback,\n -1 AS tiiobjid,\n su.id AS subid, \n -1 AS subpart,\n -1 AS partname,\n -1 AS usegrademark,\n gg.feedback AS feedbacklink,\n gi.grademax AS highestgrade,\n gg.userid,\n -1 AS groupid,\n -1 AS assigngradeid,\n con.id AS contextid,\n ga.activemethod,\n a.nattachments AS nosubmissions,\n '' AS status,\n '' AS onlinetext,\n -1 as sumgrades\n FROM {course} c\n JOIN {grade_items} gi ON c.id=gi.courseid AND itemtype='mod'\n AND (gi.hidden != 1 AND gi.hidden < ?)\n JOIN {grade_grades} gg ON gi.id=gg.itemid AND gg.userid = ?\n AND (gg.hidden != 1 AND gg.hidden < ?)\n JOIN {course_modules} cm ON gi.iteminstance=cm.instance\n JOIN {context} con ON cm.id = con.instanceid AND con.contextlevel=70\n JOIN {modules} m ON cm.module = m.id AND gi.itemmodule = m.name AND gi.itemmodule = 'workshop'\n JOIN {workshop} a ON gi.iteminstance = a.id AND a.phase = 50\n JOIN {workshop_submissions} su ON a.id = su.workshopid AND su.authorid=?\n LEFT JOIN {grading_areas} ga ON con.id = ga.contextid\n WHERE c.visible=1 AND c.showgrades = 1 AND cm.visible=1 \";\n array_push($params, $now, $userid, $now, $userid);\n }\n if ($this->mod_is_available(\"turnitintool\")) {\n $sql .= \"UNION SELECT DISTINCT c.id AS courseid,\n c.shortname, \n c.fullname AS coursename,\n gg.itemid AS gradeitemid,\n gi.itemname AS assessmentname,\n su.submission_grade AS grade,\n gi.itemtype AS gi_itemtype,\n gi.itemmodule AS assessmenttype,\n gi.iteminstance AS gi_iteminstance,\n gi.gradetype AS gradetype,\n gi.scaleid,\n gi.aggregationcoef2 AS weighting,\n gi.display AS display,\n gi.decimals AS decimals,\n -1 AS assignid,\n cm.id AS assignmentid,\n -1 AS teamsubmission,\n su.submission_modified AS submissiondate, \n tp.dtdue AS duedate,\n su.submission_title AS assessmentlink, \n -1 AS reviewattempt,\n -1 AS reviewmarks,\n -1 AS reviewoverallfeedback,\n su.submission_objectid AS tiiobjid,\n su.id AS subid,\n su.submission_part AS subpart, \n tp.partname,\n t.usegrademark,\n gg.feedback AS feedbacklink, \n tp.maxmarks AS highestgrade,\n su.userid,\n -1 AS groupid,\n -1 AS assigngradeid,\n con.id AS contextid,\n ga.activemethod,\n t.numparts AS nosubmissions,\n '' AS status,\n '' AS onlinetext,\n -1 as sumgrades\n FROM {course} c\n JOIN {grade_items} gi ON c.id=gi.courseid AND itemtype='mod'\n AND (gi.hidden != 1 AND gi.hidden < ?) \n JOIN {course_modules} cm ON gi.iteminstance=cm.instance AND c.id=cm.course\n JOIN {context} con ON cm.id = con.instanceid AND con.contextlevel=70\n JOIN {modules} m ON cm.module = m.id AND gi.itemmodule = m.name AND gi.itemmodule = 'turnitintool'\n JOIN {grade_grades} gg ON gi.id=gg.itemid AND gg.userid = ?\n AND (gg.hidden != 1 AND gg.hidden < ?)\n JOIN {turnitintool} t ON t.id=gi.iteminstance\n JOIN {turnitintool_submissions} su ON t.id = su.turnitintoolid AND su.userid = ?\n JOIN {turnitintool_parts} tp ON su.submission_part = tp.id AND tp.dtpost < ? \n LEFT JOIN {grading_areas} ga ON con.id = ga.contextid \n WHERE c.visible = 1 AND c.showgrades = 1 AND cm.visible=1 \";\n array_push($params, $now, $userid, $now, $userid, $now);\n }\n if ($this->mod_is_available(\"turnitintooltwo\")) {\n $sql .= \"UNION SELECT DISTINCT c.id AS courseid,\n c.shortname, \n c.fullname AS coursename,\n gg.itemid AS gradeitemid,\n gi.itemname AS assessmentname,\n su.submission_grade AS grade,\n gi.itemtype AS gi_itemtype,\n gi.itemmodule AS assessmenttype,\n gi.iteminstance AS gi_iteminstance,\n gi.gradetype AS gradetype,\n gi.scaleid,\n gi.aggregationcoef2 AS weighting,\n gi.display AS display,\n gi.decimals AS decimals,\n -1 AS assignid,\n cm.id AS assignmentid,\n -1 AS teamsubmission,\n su.submission_modified AS submissiondate,\n tp.dtdue AS duedate,\n su.submission_title AS assessmentlink,\n -1 AS reviewattempt, \n -1 AS reviewmarks,\n -1 AS reviewoverallfeedback,\n su.submission_objectid AS tiiobjid,\n su.id AS subid,\n su.submission_part AS subpart, \n tp.partname, \n t.usegrademark,\n gg.feedback AS feedbacklink,\n tp.maxmarks AS highestgrade,\n su.userid,\n -1 AS groupid,\n -1 AS assigngradeid,\n con.id AS contextid,\n ga.activemethod,\n t.numparts AS nosubmissions,\n '' AS status,\n '' AS onlinetext,\n -1 as sumgrades\n FROM {course} c\n JOIN {grade_items} gi ON c.id=gi.courseid AND itemtype='mod'\n AND (gi.hidden != 1 AND gi.hidden < ?)\n JOIN {course_modules} cm ON gi.iteminstance=cm.instance AND c.id=cm.course\n JOIN {context} con ON cm.id = con.instanceid AND con.contextlevel=70\n JOIN {modules} m ON cm.module = m.id AND gi.itemmodule = m.name AND gi.itemmodule = 'turnitintooltwo'\n JOIN {grade_grades} gg ON gi.id=gg.itemid AND gg.userid = ?\n AND (gg.hidden != 1 AND gg.hidden < ?)\n JOIN {turnitintooltwo} t ON t.id=gi.iteminstance\n JOIN {turnitintooltwo_submissions} su ON t.id = su.turnitintooltwoid AND su.userid = ?\n JOIN {turnitintooltwo_parts} tp ON su.submission_part = tp.id AND tp.dtpost < ?\n LEFT JOIN {grading_areas} ga ON con.id = ga.contextid \n WHERE c.visible = 1 AND c.showgrades = 1 AND cm.visible=1 \";\n array_push($params, $now, $userid, $now, $userid, $now);\n }\n //$sql .= \" ORDER BY duedate\";\n // Get a number of records as a moodle_recordset using a SQL statement.\n $rs = $remotedb->get_recordset_sql($sql, $params, $limitfrom = 0, $limitnum = 0);\n return $rs;\n }", "public function index()\n {\n // return all data\n $grades = Grade::all();\n\n //return list of grades\n return view('grades.index')->with('grades', $grades);\n }", "public function getAll()\n\t{\n\t\treturn $this->_db->query('SELECT applicants.*, ats_jobs.id AS job_id,\n\t\t\t\t\t\t\t\t\tats_jobs.uristub, ats_jobs.category,\n\t\t\t\t\t\t\t\t\tats_jobs.location, ats_jobs.name AS job_name\n\t\t\t\t\t\t\t\t\tFROM applicants\n\t\t\t\t\t\t\t\t\tINNER JOIN ats_jobs ON (applicants.job_id = ats_jobs.id)\n\t\t\t\t\t\t\t\t\tORDER BY applicants.created_ts DESC')->fetchAll();\n\t}", "public function gradesHistory()\n {\n return $this->hasMany('App\\Models\\GradesHistory');\n }", "public function index()\n {\n $grades = Grade::all();\n return view('pages.Grades.index', compact('grades'));\n }", "public function getAllJobs()\n {\n $conn = new DBConnect();\n $dbObj = $conn->getDBConnect();\n $this->DAO = new JobHistoryDAO($dbObj);\n $this->DAO2 = new SecurityDAO($dbObj);\n $username = Session::get('currentUser');\n $userID = $this->DAO2->getUserIDByUsername($username);\n return $this->DAO->getAllJobs($userID);\n }", "function getAllGradeStudySchoolOption($option=1,$schoolOption){\r\n \t$db = $this->getAdapter();\r\n \t$_db = new Application_Model_DbTable_DbGlobal();\r\n \t$lang = $_db->currentlang();\r\n \tif($lang==1){// khmer\r\n \t\t$grade = \"i.title\";\r\n \t\t$degree = \"it.title\";\r\n \t}else{ // English\r\n \t\t$grade = \"i.title_en\";\r\n \t\t$degree = \"it.title_en\";\r\n \t}\r\n \t$sql=\"SELECT i.id,\r\n \tCONCAT($grade,' (',(SELECT $degree FROM `rms_items` AS it WHERE it.id = i.items_id LIMIT 1),')') AS name\r\n \tFROM `rms_itemsdetail` AS i\r\n \tWHERE i.status =1 \";\r\n \tif($option!=null){\r\n \t\t$sql.=\" AND i.items_type=\".$option;\r\n \t}\r\n \t$sql.=\" AND i.schoolOption=$schoolOption\";\r\n \t$sql.=\" ORDER BY i.items_id ASC, i.ordering ASC\";\r\n \treturn $db->fetchAll($sql);\r\n }", "public function getMitgliedergrades()\n {\n return $this->hasMany(Mitgliedergrade::className(), ['MitgliedId' => 'MitgliederId']);\n }", "public function getAppliedJobs()\n {\n $conn = new DBConnect();\n $dbObj = $conn->getDBConnect();\n $this->DAO = new JobDAO($dbObj);\n $username = Session::get('currentUser');\n $this->DAO2 = new SecurityDAO($dbObj);\n $userID = $this->DAO2->getUserIDByUsername($username);\n return $this->DAO->getAppliedJobs($userID);\n }", "public function getJobs(){\r\n\t\t//make life easy\r\n\t\t$rank = $_SESSION['rank'];\r\n\t\t// Query\r\n\t\t$query = \"SELECT jobID, userID, category, title, price, description, timeStamp FROM jobs WHERE rank='$rank'\";\r\n\t\t$data = $this -> multiSelectQuery($query);\r\n\t\treturn $data;\r\n\t}", "public function exportGrades() {\n\t\tif (Input::get('exportgrade')) {\n\t\t\t$this->data['subjcode'] = Input::get('subjcode');\n\t\t\t$this->data['section'] = Input::get('section');\n\n\t\t\t$data = $this->model->getStudentsBySection($this->data);\n\t\t\t$data['meta']['date'] = date('F d, Y');\n\n\t\t\tExcel::create(trim($data['meta']['subjcode']) . '-' . $data['meta']['section'], function($excel) use ($data) {\n\t\t\t\t// Creating the worksheet\n\t\t\t $excel->sheet('New sheet', function($sheet) use ($data) {\n\t\t\t\t\t$sheet->setPageMargin(0.5, 0.75, 0.5, 0.75);\n\t\t\t\t\t$sheet->setFitToPage(false);\n\t\t\t\t\t$sheet->setStyle(array(\n\t\t\t\t\t\t'font' => array(\n\t\t\t\t\t\t\t'size'\t=> 10,\n\t\t\t\t\t\t\t'name'\t=> 'Calibri'\n\t\t\t\t\t\t)\n\t\t\t\t\t));\n\t\t\t\t\t$sheet->cell('A1', function($cell) {\n\t\t\t\t\t\t$cell->setFont(array(\n\t\t\t\t\t\t\t\t'size' => 10,\n\t\t\t\t\t\t\t\t'name' => 'Rockwell',\n\t\t\t\t\t\t\t\t'bold' => true\n\t\t\t\t\t\t));\n\t\t\t\t\t});\n\t\t\t\t\t$sheet->cell('A5', function($cell) {\n\t\t\t\t\t\t$cell->setFont(array(\n\t\t\t\t\t\t\t\t'size' => 10,\n\t\t\t\t\t\t\t\t'name' => 'Rockwell',\n\t\t\t\t\t\t\t\t'bold' => true\n\t\t\t\t\t\t));\n\t\t\t\t\t});\n\t\t\t\t\t$sheet->setColumnFormat(array('B' => '000000', 'D' => '0.0', 'E' => '0.0', 'F' => '0.0', 'G' => '0.0'));\n\t\t\t\t\t$sheet->setWidth(array('A' => 3.5, 'B' => 10, 'C' => 34, 'D' => 10, 'E' => 10, 'F' => 10, 'G' => 10, 'H' => 10));\n\n\t\t\t $sheet->loadView('grades')->with('data', $data);\n\t\t\t })->export('xlsx');\n\t\t\t});\n\t\t}\n\t}", "public function grade() \n {\n if (permission::permitted('grades')=='fail'){ return redirect()->route('denied'); }\n\n $data = table::grade()->get();\n return view('admin.fields.grade', compact('data'));\n }", "public function index()\n {\n $grades = Grade::all();\n return view('admin.grade.index')\n ->withGrades($grades);\n }", "public static function getGradesFR($withKeys=false)\n\t\t{\n\t\t\t$connection = Connection::getConnection();\n\t\t\t$statement = $connection->prepare(\"SELECT id,name_fr as name,age FROM scholar_level\");\n\t\t\t$statement->setFetchMode(PDO::FETCH_ASSOC);\n\t\t\t$statement->execute();\n\n\t\t\t$content = [];\n\n\t\t\twhile ($row = $statement->fetch()) {\n\t\t\t\tif($withKeys)\n\t\t\t\t{\n\t\t\t\t\t$content[$row[\"id\"]] = $row;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$content[] = $row;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $content;\n\t\t}", "function getGrade()\n {\n return $this->_Grade;\n }", "public function getStudentGrades($osuId, $courseId){\n\t\t\t\n\t\t\t//construct query to grab peer reviews done for the current student\n\t\t\t//in the currently active course\n\t\t\t$query = \"SELECT * FROM review WHERE reviewFor='\" . $osuId . \"' AND forClass='\" . $courseId . \"'\";\n\t\t\t//execute query\n\t\t\t$result = $this->db->query($query);\n\t\t\t\n\t\t\t//check the result to see if it worked\n\t\t\tif($result){\n\t\t\t\treturn $result;\n\t\t\t}\n\t\t\t//query failed\n\t\t\telse{\n\t\t\t\techo 'Error getting student grades!';\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}", "public function allEvaluations()\n {\n $qb = $this->em->createQueryBuilder();\n $qb->select('e, bfg')\n ->from(Evaluation::class, 'e')\n ->join('e.branchForGroup', 'bfg');\n $result = $qb->getQuery()->getResult();\n return $result;\n }", "function grade_grades_raw($params=NULL, $fetch=true) {\n $this->grade_object($params, $fetch);\n }", "public function getSearchGrades($osuId, $courseId){\n\t\t\t\n\t\t\t//construct query to grab peer reviews done both by AND for\n\t\t\t//the student in the currently active course\n\t\t\t$query = \"SELECT * FROM review WHERE reviewFor='\" . $osuId . \"'AND forClass='\" . $courseId . \"' OR reviewBy='\" . $osuId . \"' AND forClass='\" . $courseId . \"'\";\n\t\t\t//echo $query;\n\t\t\t//execute query\n\t\t\t$result = $this->db->query($query);\n\t\t\t\n\t\t\t//check the result to see if it worked\n\t\t\tif($result){\n\t\t\t\treturn $result;\n\t\t\t}\n\t\t\t//query failed\n\t\t\telse{\n\t\t\t\techo 'Error getting student grades!';\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}", "function load_grade_item() {\n if (empty($this->grade_item) && !empty($this->itemid)) {\n $this->grade_item = grade_item::fetch('id', $this->itemid);\n }\n return $this->grade_item;\n }", "function getGradepoints()\n {\n\t$struct = array('title' => array(),\n\t\t\t'quiz' => array('section' => array(), 'weight' => array(), 'scored' => array(), 'completed' => array()),\n\t\t\t'weight' => array(),\n\t\t\t'points' => array(),\n\t\t\t'completed' => array()\n\t\t\t);\n\t\n\t$courses = $this->DB->database_select('course', '*');\n\t$enrolled = $this->DB->database_select('users', array('enrolled'), array('uid' => session_get('uid')), 1);\n\t$enrolled = explode(',', $enrolled['enrolled']);\n\t\n\t$quizzes_completed = $this->DB->database_select('users', array('quizzes_completed'),\n\t\t\t\t\t\t\tarray('uid' => session_get('uid')), 1);\n\t$quizzes_completed = explode(',', $quizzes_completed['quizzes_completed']);\n\t\n\t$index = 0;\n\tfor($c = 0; $c < count($courses); $c++)\n\t{\n\t\t\n\t\t//If the user is not even enrolled in the course, then they definitely have not performed in it. Skip course\n\t\t\n\t\tif(!in_array($courses[$c]['cid'], $enrolled))\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\t\t\n\t\t\n\t\t$courseWeight = 0;\n\t\t$struct['title'][] = $courses[$c]['course_title'];\n\t\t$course_points_earned = 0;\n\t\t\n\t\t\n\t\t//Get all the quizzes associated with course\n\t\t\n\t\t$quizzes = $this->DB->database_select('quiz', 'qid', array('quiz_course' => $courses[$c]['cid']));\n\t\t\n\t\tfor($i = 0; $i < count($quizzes); $i++)\n\t\t{\n\t\t\t//User has not completed quiz\n\t\t\t\n\t\t\tif(!in_array($quizzes[$i]['qid'], $quizzes_completed))\n\t\t\t{\n\t\t\t\t$struct['quiz']['completed'][$c][] = 'incomplete';\n\t\t\t\t$struct['completed'][$c] = false;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t$quizWeight = 0;\n\t\t\t$quiz = $this->DB->database_select('quiz_content', 'qcid', array('qid' => $quizzes[$i]['qid']));\n\t\t\t\n\t\t\t//Add points that user scored in quiz\n\t\t\t$points_earned = $this->pointsScored($quizzes[$i]['qid']); \n\t\t\t\n\t\t\t//Add to total course points scored\n\t\t\t$course_points_earned += $points_earned;\n\t\t\t\n\t\t\t//Determine weight of quiz questions\n\t\t\tfor($j = 0; $j < count($quiz); $j++)\n\t\t\t{\n\t\t\t\t$quizWeight += $this->quizWeight($quiz[$j]['qcid']);\n\t\t\t}\n\t\t\t\n\t\t\t//Add total question weight to quiz weight\n\t\t\t\n\t\t\t$struct['quiz']['weight'][$index][] = $quizWeight;\n\t\t\t$struct['quiz']['scored'][$index][] = $points_earned;\n\t\t\t\n\t\t\t//User has completed quiz or not?\n\t\t\t$struct['quiz']['completed'][$index][] = 'completed';\n\t\t\t\n\t\t\t//Add total quiz weight to quiz score\n\t\t\t\n\t\t\t$courseWeight += $quizWeight;\n\t\t\t\n\t\t}\n\t\t\n\t\t$struct['weight'][$index] = $courseWeight;\n\t\t$struct['points'][$index] = $course_points_earned;\n\t\t\n\t\t\n\t\tif(!isset($struct['completed'][$index]))\n\t\t{\n\t\t\t$struct['completed'][$index] = 'complete';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$struct['completed'][$index] = 'incomplete';\n\t\t}\n\t\t$index++;\n\t}\n\t\n\treturn $struct;\n }", "function print_grades($feedback = false) {\n global $CFG;\n\n $this->load_grades();\n\n $retval = '';\n\n /// Whether this plugin is entitled to update export time\n if ($expplugins = explode(\",\", $CFG->gradeexport)) {\n if (in_array('xml', $expplugins)) {\n $export = true;\n } else {\n $export = false;\n }\n } else {\n $export = false;\n }\n\n /// Calculate file name\n $downloadfilename = clean_filename(\"{$this->course->shortname} $this->strgrades.xml\");\n\n $tempfilename = $CFG->dataroot . MD5(microtime()) . $downloadfilename;\n if (!$handle = fopen($tempfilename, 'w+b')) {\n error(\"Could not create a temporary file into which to dump the XML data.\");\n return false;\n }\n\n /// time stamp to ensure uniqueness of batch export\n fwrite($handle, '<results batch=\"xml_export_'.time().'\">'.\"\\n\");\n\n foreach ($this->columnidnumbers as $index => $idnumber) {\n\n // studentgrades[] index should match with corresponding $index\n foreach ($this->grades as $studentid => $studentgrades) {\n fwrite($handle, \"\\t<result>\\n\");\n\n // state can be new, or regrade\n // require comparing of timestamps in db\n\n $params = new object();\n $params->idnumber = $idnumber;\n // get the grade item\n $gradeitem = new grade_item($params);\n\n // we are trying to figure out if this is a new grade, or a regraded grade\n // only relevant if this grade for this user is already exported\n\n // get the grade_grade for this user\n $params = new object();\n $params->itemid = $gradeitem->id;\n $params->userid = $studentid;\n\n $grade_grade = new grade_grade($params);\n\n // if exported, check grade_history, if modified after export, set state to regrade\n $status = 'new';\n if (!empty($grade_grade->exported)) {\n //TODO: use timemodified or something else instead\n/* if (record_exists_select('grade_history', 'itemid = '.$gradeitem->id.' AND userid = '.$studentid.' AND timemodified > '.$grade_grade->exported)) {\n $status = 'regrade';\n } else {\n $status = 'new';\n }*/\n } else {\n // never exported\n $status = 'new';\n }\n\n fwrite($handle, \"\\t\\t<state>$status</state>\\n\");\n // only need id number\n fwrite($handle, \"\\t\\t<assignment>$idnumber</assignment>\\n\");\n // this column should be customizable to use either student id, idnumber, uesrname or email.\n fwrite($handle, \"\\t\\t<student>$studentid</student>\\n\");\n fwrite($handle, \"\\t\\t<score>{$studentgrades[$index]}</score>\\n\");\n if ($feedback) {\n fwrite($handle, \"\\t\\t<feedback>{$this->comments[$studentid][$index]}</feedback>\\n\");\n }\n fwrite($handle, \"\\t</result>\\n\");\n\n // timestamp this if needed\n if ($export) {\n $grade_grade->exported = time();\n // update the time stamp;\n $grade_grade->update();\n }\n }\n }\n fwrite($handle, \"</results>\");\n fclose($handle);\n\n require_once($CFG->libdir . '/filelib.php');\n\n header(\"Content-type: text/xml; charset=UTF-8\");\n header(\"Content-Disposition: attachment; filename=\\\"$downloadfilename\\\"\");\n\n readfile_chunked($tempfilename);\n\n unlink($tempfilename);\n\n exit();\n }", "function dataform_get_user_grades($data, $userid = 0) {\n global $CFG;\n\n require_once(\"$CFG->dirroot/rating/lib.php\");\n\n $options = new object();\n $options->component = 'mod_dataform';\n if ($data->grade and !$data->grademethod) {\n $options->ratingarea = 'activity';\n $options->aggregationmethod = RATING_AGGREGATE_MAXIMUM;\n\n $options->itemtable = 'user';\n $options->itemtableusercolumn = 'id';\n\n } else {\n $options->ratingarea = 'entry';\n $options->aggregationmethod = $data->grademethod;\n\n $options->itemtable = 'dataform_entries';\n $options->itemtableusercolumn = 'userid';\n\n }\n $options->modulename = 'dataform';\n $options->moduleid = $data->id;\n $options->userid = $userid;\n $options->scaleid = $data->grade;\n \n $rm = new rating_manager();\n return $rm->get_user_grades($options);\n}", "public function index()\n {\n $data = [\n 'grades' => Grade::all()\n ];\n return view('grade.index', $data);\n }", "public function index()\n {\n $grades = $this->gradeService->getDesc();\n return view('admin.grades.index', compact('grades'));\n }", "public function ajax_get_student_grades(){\n\t\t$this->load->model('teach_func/auto_save_tbl', 'this_model');\n\t\t$c_sched_id = $this->session->userdata('c_sched_id');\n\t\t\n\t\t$Q = $this->this_model->ajax_get_student_grades($c_sched_id);\n\t\t//$Q = $this->this_model->ajax_get_student_grades();\n\n\t\t$outPut = array();\n\t\tforeach ($Q as $row) {\n\t\t\t\n\t\t\t$data['grade_id'] = $row->grade_id;\n\n\t\t\t$data['stud_name'] = $row->stud_name;\n\t\t\t$data['pr_g'] = $row->pr_g;\n\t\t\t$data['md_g'] = $row->md_g;\n\t\t\t$data['pf_g'] = $row->pf_g;\n\t\t\t$data['f_g'] = $row->f_g;\n\t\t\t$data['sub_g'] = $row->sub_g;\n\t\t\t$data['eq'] = $row->eq;\n\t\t\t$data['remarks'] = $row->remarks;\n\n\t\t\t//$outPut = $data;\n\t\t\tarray_push($outPut, $data);\n\n\t\t}\n\t\techo json_encode($outPut);\n\t}", "public function getScores()\n {\n $stmt = $this->DB->prepare(\"SELECT users.username, puzzles.id, puzzles.highscore_time FROM users JOIN puzzles ON users.id = puzzles.highscore_user_id\");\n $stmt->execute();\n // fetchall returns all records in the set as an array\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n }", "public function getAllJobPostings()\n {\n $conn = new DBConnect();\n $dbObj = $conn->getDBConnect();\n $this->DAO = new JobDAO($dbObj);\n return $this->DAO->getAllJobs();\n }", "function get_jobs_ages(){\n\t\t$this->db->where(array(\"status\" => '1'));\n\t\t$this->db->order_by('ordering');\n\t\t$query = $this->db->get('job_ages');\n\t\t//echo $str = $this->db->last_query();\n\t\treturn $query->result();\n\t}", "public function getApplicants($jobID) {\r\n\t\t$query = \"SELECT userID FROM applications WHERE jobID='$jobID'\";\r\n\t\t$data = $this -> multiSelectQuery($query);\r\n\t\treturn $data;\r\n\t}", "public function run()\n {\n DB::table('grades')->delete();\n\n \\App\\grade::create(array(\n 'test_id' => 1,\n 'class_id' =>1,\n 'teacher' =>2,\n 'title' =>'Assignment 1',\n 'grade' =>'A',\n 'user_id' =>1,\n ));\n \\App\\grade::create(array(\n 'test_id' => 2,\n 'class_id' =>1,\n 'teacher' =>2,\n 'title' =>'Assignment 2',\n 'grade' =>'N/A',\n 'user_id' =>1,\n ));\n \\App\\grade::create(array(\n 'test_id' => 1,\n 'class_id' =>1,\n 'teacher' =>2,\n 'title' =>'Assignment 1',\n 'grade' =>'B',\n 'user_id' =>3,\n ));\n \\App\\grade::create(array(\n 'test_id' => 2,\n 'class_id' =>1,\n 'teacher' =>2,\n 'title' =>'Assignment 2',\n 'grade' =>'N/A',\n 'user_id' =>3,\n ));\n \\App\\grade::create(array(\n 'test_id' => 1,\n 'class_id' =>1,\n 'teacher' =>2,\n 'title' => 'Assignment 1',\n 'grade' =>'N/A',\n 'user_id' =>4,\n ));\n \\App\\grade::create(array(\n 'test_id' => 2,\n 'class_id' =>1,\n 'teacher' =>2,\n 'title' => 'Assignment 2',\n 'grade' =>'A',\n 'user_id' =>4,\n ));\n $this->command->info('Grade table seeded!');\n }", "public function get_data()\n\t\t{\n\t\t\tglobal $conn;\n\t\t\ttry{\n\t\t\t\n\t\t\t\t// connect to MySQL and select a database\n\t\t\t\t$students = array();\n\t\t\t\t\n\t\t\t\t$result = $this->conn->query(\"SELECT * FROM `students`\");\n\t\t\t\t\n\t\t\t\tforeach($result as $row)\n\t\t\t\t{\n\t\t\t\t\t$students[] = $this->create_student($row);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $students;\n\t\t\t}\n\t\t\tcatch(Exception $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t\texit();\n\t\t\t}\n\t\t}", "private function _getGradeStats($path)\n {\n // like required grade\n return Grade::select(DB::raw('count(weight) as count, weight, type_id'))\n ->whereIn('type_id', [0, 1, 2, 3, 5, 10])\n ->descendents($path)\n ->groupBy(['type_id', 'weight'])\n ->orderBy('type_id', 'asc')\n ->orderBy('weight', 'asc')\n ->get()\n ->groupBy('type_id')\n ->transform(\n function ($item) {\n return $item->keyBy('weight')\n ->transform(\n function ($item) {\n return $item['count'];\n }\n );\n }\n )\n ->toArray();\n }", "function getEnrolls() {\n $results = get_records('block_courseprefs_enroll', 'usersid', $this->id);\n $enrolls = array();\n\n if (!empty($results)) {\n foreach ($results as $result) {\n $enrolls[$result->id] = new CoursePrefsEnroll($result->semestersid, \n $result->coursesid, $result->usersid, $result->course_create_days, \n $result->course_enroll_days, $result->id);\n }\n }\n return $enrolls;\n }", "public function get_job_list() {\n return $this->find_all_jobs();\n }", "public function getAllEducations()\n {\n $conn = new DBConnect();\n $dbObj = $conn->getDBConnect();\n $this->DAO = new EducationDAO($dbObj);\n $this->DAO2 = new SecurityDAO($dbObj);\n $username = Session::get('currentUser');\n $userID = $this->DAO2->getUserIDByUsername($username);\n return $this->DAO->getAllEducation($userID);\n }", "public function getJobDescriptions(){\n return JobDescription::all();\n }", "public static function getList(){\n return DB::table('employees')->get();\n }", "public function get_grade() {\n return $this->grade;\n }", "function getJob() {\n $pk = $_GET['pk'];\n \n connectDatabase();\n \n $result = queryDatabase(\"SELECT title, description, status, salary, measure, fk_category, fk_location\n FROM job\n WHERE pk = $pk\");\n\n $row = mysql_fetch_object($result);\n \n $value['title'] = $row->title;\n $value['description'] = $row->description;\n\n $value['status'][0] = ($row->status === 'F') ? 'checked=\"checked\" ': '';\n $value['status'][1] = ($row->status === 'P') ? 'checked=\"checked\" ': '';\n $value['status'][2] = ($row->status === 'C') ? 'checked=\"checked\" ': '';\n $value['status'][3] = ($row->status === 'O') ? 'checked=\"checked\" ': '';\n \n $value['salary'] = $row->salary;\n \n $value['measure'][0] = ($row->measure === 'H') ? 'checked=\"checked\" ': '';\n $value['measure'][1] = ($row->measure === 'W') ? 'checked=\"checked\" ': '';\n $value['measure'][2] = ($row->measure === 'M') ? 'checked=\"checked\" ': '';\n $value['measure'][3] = ($row->measure === 'A') ? 'checked=\"checked\" ': '';\n $value['measure'][4] = ($row->measure === 'O') ? 'checked=\"checked\" ': '';\n \n $value['fk_category'] = $row->fk_category;\n $value['fk_location'] = $row->fk_location;\n\n return $value;\n}", "public function scores() {\n\n\t\treturn $this->hasMany('App\\EvaluationScore', 'evaluation_id', 'evaluation_id');\n\t}", "public function loadAllJobs()\n {\n // foreach ($jobs as $key => $job) {\n // $job_due_date = Carbon::parse($job->due_date);\n // $current_date = Carbon::now()->subDay();\n // if ($current_date->gt($job_due_date)) {\n // $job->isJobExpired = true;\n // } else {\n // $job->isJobExpired = false;\n // }\n // }\n\n // return $jobs;\n $jobs = [];\n $unassignedTasks = Task::where(['isAssigned' => 0, ['Time02', '!=', 0]])->orderBy('id', 'DESC')->groupBy('job_id')->get();\n foreach ($unassignedTasks as $key => $task) {\n $job = Job::find($task->job_id);\n $job_due_date = Carbon::parse($job->due_date);\n $current_date = Carbon::now()->subDay();\n if ($current_date->gt($job_due_date)) {\n $job->isJobExpired = true;\n } else {\n $job->isJobExpired = false;\n }\n array_push($jobs, $job);\n }\n\n return $jobs;\n }", "function getAll( )\n {\n $this->dbInit(); \n $user_group_array = 0;\n \n array_query( $user_group_array, \"SELECT * FROM Grp ORDER BY Name\" );\n \n return $user_group_array;\n }", "function scorm_get_what_grade_array(){\n return array (HIGHESTATTEMPT => get_string('highestattempt', 'scorm'),\n AVERAGEATTEMPT => get_string('averageattempt', 'scorm'),\n FIRSTATTEMPT => get_string('firstattempt', 'scorm'),\n LASTATTEMPT => get_string('lastattempt', 'scorm'));\n}", "public function getAll()\n {\n $query = $this->db->query('\n SELECT\n professor.id, professor.graduacao, professor.mestrado, professor.doutorado,\n professor.phd, pessoa.nome, pessoa.telefone, pessoa.apelido, \n pessoa.cor, pessoa.dataNascimento, pessoa.sexo, pessoa.escolaridade, \n pessoa.foto, pessoa.cpf, pessoa.tituloEleitor, pessoa.identidade, \n pessoa.endereco_id, endereco.endereco, endereco.cidade, endereco.estado, \n endereco.pais\n FROM \n professor\n INNER JOIN \n pessoa ON pessoa.id = professor.pessoa_id\n INNER JOIN\n endereco ON endereco.id = pessoa.endereco_id\n ');\n\n if ($query->num_rows == 0) {\n throw new RuntimeException('Nenhum professor cadastrado');\n }\n\n return $query->result();\n }", "function ros_get_typergradesfull($sid, $orderby=-1, $desc=false) {\n global $DB, $CFG;\n $params = array();\n $toreturn = array();\n $gradestblname = $CFG->prefix.\"roshine_grades\";\n $userstblname = $CFG->prefix.\"user\";\n $exertblname = $CFG->prefix.\"roshine_exercises\";\n $atttblname = $CFG->prefix.\"roshine_attempts\";\n $sql = \"SELECT \".$gradestblname.\".id, \"\n .$userstblname.\".firstname, \"\n .$userstblname.\".lastname, \"\n .$userstblname.\".id as u_id, \"\n .$gradestblname.\".pass, \"\n .$atttblname.\".ros_suspicion, \"\n .$gradestblname.\".mistakes, \"\n .$gradestblname.\".timeinseconds, \"\n .$gradestblname.\".hitsperminute, \"\n .$gradestblname.\".fullhits, \"\n .$gradestblname.\".precisionfield, \"\n .$gradestblname.\".timetaken, \"\n .$exertblname.\".exercisename, \"\n .$gradestblname.\".wpm\".\n \" FROM \".$gradestblname.\n \" LEFT JOIN \".$userstblname.\" ON \".$gradestblname.\".userid = \".$userstblname.\".id\".\n \" LEFT JOIN \".$exertblname.\" ON \".$gradestblname.\".exercise = \".$exertblname.\".id\".\n \" LEFT JOIN \".$atttblname.\" ON \".$atttblname.\".id = \".$gradestblname.\".attemptid\".\n \" WHERE roshine=\".$sid;\n if ($orderby == 0 || $orderby == -1) {\n $oby = \" ORDER BY \".$gradestblname.\".id\";\n } else if ($orderby == 1) {\n $oby = \" ORDER BY \".$userstblname.\".firstname\";\n } else if ($orderby == 2) {\n $oby = \" ORDER BY \".$userstblname.\".lastname\";\n } else if ($orderby == 3) {\n $oby = \" ORDER BY \".$atttblname.\".ros_suspicion\";\n } else if ($orderby == 4) {\n $oby = \" ORDER BY \".$gradestblname.\".mistakes\";\n } else if ($orderby == 5) {\n $oby = \" ORDER BY \".$gradestblname.\".timeinseconds\";\n } else if ($orderby == 6) {\n $oby = \" ORDER BY \".$gradestblname.\".hitsperminute\";\n } else if ($orderby == 7) {\n $oby = \" ORDER BY \".$gradestblname.\".fullhits\";\n } else if ($orderby == 8) {\n $oby = \" ORDER BY \".$gradestblname.\".precisionfield\";\n } else if ($orderby == 9) {\n $oby = \" ORDER BY \".$gradestblname.\".timetaken\";\n } else if ($orderby == 10) {\n $oby = \" ORDER BY \".$exertblname.\".exercisename\";\n } else if ($orderby == 12) {\n $oby = \" ORDER BY \".$gradestblname.\".wpm\";\n } else {\n $oby = \"\";\n }\n $sql .= $oby;\n if ($desc) {\n $sql .= \" DESC\";\n }\n if ($grades = $DB->get_records_sql($sql, $params)) {\n return $grades;\n }\n return false;\n}", "public function getJob($jobID) {\r\n\t\t$query = \"SELECT jobID, userID, category, title, price, description, timeStamp FROM jobs WHERE jobID='$jobID'\";\r\n\t\t$data = $this -> singleSelectQuery($query);\r\n\t\treturn $data;\r\n\t}", "function sqlGradeList()\n\t{\n\t\t//echo '<hr>Nama class ini :' . __METHOD__ . '()<hr>';\n\t\t$sql = \" SELECT * FROM tbl_grade \"\n\t\t. \"\";\n\n\t\treturn $sql;\n\t}", "function emarking_get_enroled_students($courseid)\n{\n global $DB;\n \n $query = emarking_get_enroled_students_sql();\n \n // Se toman los resultados del query dentro de una variable.\n $users = $DB->get_records_sql($query, array(\n $courseid\n ));\n \n return $users;\n}", "function scorm_get_grade_method_array(){\n return array (GRADESCOES => get_string('gradescoes', 'scorm'),\n GRADEHIGHEST => get_string('gradehighest', 'scorm'),\n GRADEAVERAGE => get_string('gradeaverage', 'scorm'),\n GRADESUM => get_string('gradesum', 'scorm'));\n}", "public function save_grade() {\r\n\r\n\t\t\t//new method\r\n\t\t\t$sql = \"UPDATE grades SET student_id = ?, course_id = ?, degree = ?, examine_at = ? WHERE id = ?;\";\r\n\t\t\tDatabase::$db->prepare($sql)->execute([$this->student_id, $this->course_id, $this->degree, $this->examine_at, $this->id]);\r\n\t\t\t//old method\r\n\t\t\t/*$sql = \"UPDATE grades SET student_id = ? WHERE id = ?;\";\r\n\t\t\t$sql = \"UPDATE grades SET course_id = ? WHERE id = ?;\";\r\n\t\t\t$sql = \"UPDATE grades SET degree = ? WHERE id = ?;\";\r\n\t\t\t$sql = \"UPDATE grades SET examine_at = ? WHERE id = ?;\";\r\n\t\t\tDatabase::$db->prepare($sql)->execute([$this->student_id, $this->id]);\r\n\t\t\tDatabase::$db->prepare($sql)->execute([$this->course_id, $this->id]);\r\n\t\t\tDatabase::$db->prepare($sql)->execute([$this->degree, $this->id]);\r\n\t\t\tDatabase::$db->prepare($sql)->execute([$this->examine_at, $this->id]);*/\r\n\t\t}", "function getAgenciesInfo() {\n\t\tglobal $dbh;\n\t\t$agencies = array();\n\t\t\n\t\t$sql = \"SELECT * FROM Agencies\";\n\t\ttry {\n\t\t\tgetDBConnection();\n\t\t\t\n\t\t\t$result = mysqli_query($dbh, $sql);\n\t\t\t\n\t\t\tif(!$result) {\n\t\t\t\tprint(\"Query failed: \" . mysqli_errno($dbh) . \"--\" . mysqli_error($dbh) . \"<br/>\");\n\t\t\t\texit();\n\t\t\t}\n\t\t\t\n\t\t\twhile ($values = mysqli_fetch_object($result)) {\n\t\t\t\t$agency = new Agency();\n\t\t\t\t$agency -> setAgency($values);\n\t\t\t\tarray_push($agencies, $agency);\n\t\t\t}\n\n\t\t\treturn $agencies;\n\t\t\t\n\t\t} catch (Exception $e){\n\t\t\tprint \"<br/> $e\";\n\t\t} finally {\n\t\t\tcloseDBConnection();\n\t\t}\n\t}", "public function relevantJobs() {\n require_once 'libs/DB.php';\n\n $seekerId = $this->id();\n $seekerLocation = $this->preferredLocation();\n\n $query = \"SELECT J.*, JS.job_id, COUNT(JS.job_id) AS rank\n FROM job_skill JS, job J\n WHERE J.id=JS.job_id\n AND J.location_name='$seekerLocation'\n AND JS.skill_name IN (SELECT skill_name FROM seeker_skill WHERE seeker_id='$seekerId')\n GROUP BY JS.job_id\n ORDER BY rank DESC\";\n\n $conn = DB::connect();\n\n $res = $conn->query($query);\n\n $jobs = Array();\n\n while($row = $res->fetch(PDO::FETCH_ASSOC)) {\n array_push($jobs, $row);\n }\n\n $query = \"SELECT J.*, JS.job_id, COUNT(JS.job_id) AS rank\n FROM job_skill JS, job J\n WHERE J.id=JS.job_id\n AND JS.skill_name IN (SELECT skill_name FROM seeker_skill WHERE seeker_id='$seekerId')\n GROUP BY JS.job_id\n ORDER BY rank DESC\";\n\n $res = $conn->query($query);\n\n while($row = $res->fetch(PDO::FETCH_ASSOC)) {\n array_push($jobs, $row);\n }\n\n $jobs = array_map(\"unserialize\", array_unique(array_map(\"serialize\", $jobs)));\n\n return $jobs;\n }", "public function getAll()\n {\n return $this->db\n ->select(\n 'idGroup,\n CONCAT(groupName, courseType) as groupName,\n CONCAT(schoolYear, \\'-\\', schoolYear+1) as schoolYear,\n idStudent, name, surname'\n )\n ->from('Group')\n ->join('StudentGroup', 'idGroup')\n ->join('Student', 'idStudent')\n ->join('User', 'idUser')\n ->join('Semester', 'idSemester')\n ->join('Course', 'idCourse')\n ->get()\n ->result();\n }", "function getListeScoresBD()\n{\n\trequire(\"./modele/connect.php\");\n\n\t$sql = \"SELECT c.pseudo as pseudo, niv.nomNiv as niveau, s.meilleurScore as meilleurScore, s.nbMonstresTues as nbMonstresTues ,\n\t\t\ts.tpsJeu as tempsJeu, s.dernierScore as dernierScore\n\t\t\tFROM score as s , joueur as j, niveau as niv, compte as c\n\t\t\tWHERE \n\t\t\t\ts.IdJoueur = j.IdJoueur AND\n\t\t\t\tj.IdJoueur = c.IdCompte AND\n\t\t\t\ts.IdNiveau = niv.IdNiveau\n\t\t\tORDER BY s.meilleurScore DESC\";\n\n\t$resultat = array();\n\n\ttry {\n\t\t$commande = $pdo->prepare($sql);\n\t\t$bool = $commande->execute();\n\n\t\tif ($bool) {\n\t\t\t$resultat = $commande->fetchAll(PDO::FETCH_ASSOC);\n\t\t\treturn $resultat;\n\t\t} else {\n\t\t\treturn array();\n\t\t}\n\t} catch (PDOException $e) {\n\t\techo utf8_encode(\"Echec de select : \" . $e->getMessage() . \"\\n\");\n\t\tdie();\n\t}\n}", "public function getAllEnrolments()\n {\n return $enrolments = DB::table('enrolments')\n ->Join('users', 'users.id', '=', 'enrolments.studentID')\n ->Join('courses', 'courses.courseID', '=', 'enrolments.courseID')\n ->orderBy('enrolmentID','ASC');\n }", "protected function getGradeAproveitamento() {\n\n $_SESSION[\"DB_coddepto\"] = $this->oMatricula->getTurma()->getEscola()->getCodigo();\n db_inicio_transacao();\n $oGradeHorario = new GradeAproveitamentoAluno($this->oMatricula);\n $oGradeHorario->setUtfEncode(true);\n $oGradeRetorno = $oGradeHorario->getGradeAproveitamento();\n db_fim_transacao();\n return $oGradeRetorno;\n }", "public function run()\n {\n DB::table('grades')->insert([\n 'test_name' => 'Assessment Exam',\n 'best_grade' => 7.5\n ]);\n DB::table('grades')->insert([\n 'test_name' => 'Written Exam',\n 'best_grade' => 6.1\n ]);\n DB::table('grades')->insert([\n 'test_name' => 'Case Study Exam',\n 'best_grade' => 8.0\n ]);\n DB::table('grades')->insert([\n 'test_name' => 'Case Study',\n 'best_grade' => 6.3\n ]);\n DB::table('grades')->insert([\n 'test_name' => 'Project',\n 'best_grade' => 6.1\n ]);\n DB::table('grades')->insert([\n 'test_name' => 'Portfolio Exam',\n 'best_grade' => 7.5\n ]);\n DB::table('grades')->insert([\n 'test_name' => '2 Portfolio Exams',\n 'best_grade' => 6.7\n ]);\n DB::table('grades')->insert([\n 'test_name' => 'Case study',\n 'best_grade' => 5.9\n ]);\n DB::table('grades')->insert([\n 'test_name' => 'Assessment',\n 'best_grade' => 8.0\n ]);\n DB::table('grades')->insert([\n 'test_name' => 'Portfolio Exam',\n 'best_grade' => 0.0\n ]);\n DB::table('grades')->insert([\n 'test_name' => '2 Written Exams',\n 'best_grade' => 7.0\n ]);\n DB::table('grades')->insert([\n 'test_name' => 'Portfolio Exam',\n ]);\n DB::table('grades')->insert([\n 'test_name' => 'Portfolio Exam',\n ]);\n DB::table('grades')->insert([\n 'test_name' => 'Portfolio Exam',\n ]);\n DB::table('grades')->insert([\n 'test_name' => '2 Written Exams',\n ]);\n DB::table('grades')->insert([\n 'test_name' => 'Portfolio',\n ]);\n DB::table('grades')->insert([\n 'test_name' => 'Portfolio',\n ]);\n }", "public function get_all_grade_scale($itemid, $userid, $courseid) {\n global $remotedb;\n $sql = \"SELECT s.scale \n FROM {grade_grades} gg\n JOIN {grade_items} gi ON gg.itemid=gi.id AND gi.id=? \n AND gg.userid=? AND gi.courseid=? AND gi.gradetype = 2\n JOIN {scale} s ON gi.scaleid=s.id\";\n $params = array($itemid, $userid, $courseid);\n $scales = $remotedb->get_records_sql($sql, $params);\n $out = '';\n if ($scales) {\n foreach ($scales as $scale) {\n $out .= $scale->scale . \", \";\n }\n return chop($out, ', ');\n } else {\n return '-';\n }\n }", "static function getJobDetails( $jobId ) {\n global $wpdb;\n $resultset = $wpdb->get_results($wpdb->prepare(\n \"SELECT job_id, classname, status, start_date, end_date\n FROM wp_lh_jobs \n WHERE job_id = %d\", \n $jobId ));\n\n if($wpdb->last_error) {\n throw new DatabaseException($wpdb->last_error);\n }\n\n // if empty, then no job exists\n if(empty($resultset)) {\n throw new DatabaseException( \"Job $jobId not found.\" );\n }\n\n // return single row\n return array_shift($resultset);\n }", "public function grades(){\n\t\treturn $this->belongsToMany('App\\Grade','class_subject','class_id', 'subject_id')->withTimestamps();\n\t}", "public function getOne($gradeId)\n {\n return\n DB::table('grades')\n ->select(\n 'id',\n 'eff_begin as effBegin',\n 'eff_end as effEnd',\n 'code',\n 'name',\n 'ordinal',\n 'work_month as workMonth',\n 'bottom_rate as bottomRate',\n 'mid_rate as midRate',\n 'top_rate as topRate'\n )\n ->selectRaw('(bottom_rate+top_rate)/2 as \"midRate\"')\n ->where([\n ['tenant_id', $this->requester->getTenantId()],\n ['company_id', $this->requester->getCompanyId()],\n ['id', $gradeId]\n ])\n ->first();\n }", "private function get()\n {\n\n $this->getMarks()->getAssessments();\n return ['users' => $this->me->get()];\n }", "function econsole_grades($econsoleid) {\r\n return NULL;\r\n}", "public function getAllProgrammes() {\n try {\n $programes = $this->em->getRepository(Entity\\Programme::class)->findAll();\n $this->em->flush();\n } catch (\\Doctrine\\ORM\\OptimisticLockException $e) {\n $this->em->rollback();\n }\n return $programes === null ? 0 : $programes;\n }", "public function results()\n\t{\n\t\t// This function return entries\n\t\treturn $this->EE->job_search->results();\n\t}", "function addGrades($grades) {\n $columns = implode(\", \", array_keys($grades[0]));\n\n foreach ($grades as $row) {\n $voter_id = $row[\"voter_id\"];\n $user_id = $row[\"user_id\"];\n $competence_id = $row[\"competence_id\"];\n $grade = $row[\"grade\"];\n $valuesArr[] = \"('$voter_id', '$user_id', '$competence_id', '$grade')\";\n }\n\n $values = implode(\", \", $valuesArr);\n $sql = \"INSERT INTO `grades`($columns) VALUES $values\";\n\n $this->executeQuery($sql);\n }", "public function toArray()\n {\n $parentArr = parent::toArray();\n $parentArr['gradesList'] = SchoolGrade::getGradesList($parentArr['id']);\n return $parentArr;\n }", "public function fetch_grade_list(){\n\t\t$this->verify();\n\t\t$this->load->library('form_validation');\n\t\t$this->form_validation->set_rules('subject', 'Subject', 'trim|required');\n\t\t$this->form_validation->set_rules('class', 'Class', 'trim|required');\n\t\t$this->form_validation->set_rules('term', 'Term', 'trim|required|numeric');\n\t\t$this->form_validation->set_rules('session', 'Session', 'trim|required');\n\t\tif($this->form_validation->run()){\n\t\t\t$result_data=array(\n\t\t\t\t'SUBJECT'=>$this->input->post('subject'),\n\t\t\t\t'CLASS'=>$this->input->post('class'),\n\t\t\t\t'TERM'=>$this->input->post('term'),\n\t\t\t\t'SESSION'=>$this->input->post('session')\n\t\t\t);\n\t\t\t$data['grade_list']=$this->admin_model->fetch_grade_list($result_data);\n\t\t\t$this->load->view('scores/gradelist', $data);\n\t\t}\n\t\telse{\n\t\t\t$error=\"\";\n\t\t\tif(form_error('subject')){\n\t\t\t\t$error.=form_error('subject');\n\t\t\t}\n\t\t\tif(form_error('class')){\n\t\t\t\t$error.=form_error('class');\n\t\t\t}\n\t\t\tif(form_error('term')){\n\t\t\t\t$error.=form_error('term');\n\t\t\t}\n\t\t\tif(form_error('session')){\n\t\t\t\t$error.=form_error('session');\n\t\t\t}\n\t\t\t$this->session->set_flashdata('message', $error);\n\t\t\tredirect('/result');\n\t\t}\t\n\t}" ]
[ "0.69820565", "0.6650518", "0.660851", "0.6213045", "0.6179357", "0.6079971", "0.5987647", "0.5964477", "0.59400564", "0.5917752", "0.588163", "0.57473576", "0.56992936", "0.56447303", "0.5636128", "0.5612012", "0.5548827", "0.554741", "0.55380625", "0.5469715", "0.5435844", "0.5400795", "0.53921396", "0.53668255", "0.53527635", "0.5334369", "0.5329552", "0.5297502", "0.52839607", "0.52758265", "0.52707005", "0.5239858", "0.5239055", "0.5231628", "0.52281004", "0.5199194", "0.5187425", "0.51821035", "0.5166051", "0.51524585", "0.51272845", "0.5114569", "0.5095348", "0.5093088", "0.509289", "0.50873864", "0.5070373", "0.5055895", "0.5026312", "0.5004913", "0.5003912", "0.49991155", "0.4995803", "0.49820867", "0.49817586", "0.49795184", "0.4949471", "0.4944003", "0.49429", "0.49290484", "0.4929006", "0.49255896", "0.49238575", "0.49056017", "0.48994747", "0.48956734", "0.4892837", "0.48899147", "0.4886749", "0.48859498", "0.48702905", "0.48658073", "0.48546803", "0.48472378", "0.48436177", "0.48426485", "0.4838138", "0.48370492", "0.48308793", "0.48265645", "0.4819289", "0.48121873", "0.4807206", "0.48053277", "0.48041016", "0.47956765", "0.4785468", "0.4784193", "0.4781371", "0.47729364", "0.47663578", "0.47645462", "0.47520325", "0.47488108", "0.47387", "0.47385946", "0.4729362", "0.4722495", "0.47139135", "0.47117257" ]
0.6500198
3
Insert job grades data into DB.
public function save($obj) { DB::table('job_grades')->insert($obj); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run() {\n\t\t\t$grades = [\n\t\t\t\t[\n\t\t\t\t\t'user_id' => 13, 'teacher_id' => 4, 'lesson_id' => 4, 'grade' => 96, 'class_id'=>4\n\t\t\t\t],\n\t\t\t];\n\t\t\t\n\t\t\tGrade::insert($grades);\n\t\t}", "public function save_grade() {\r\n\r\n\t\t\t//new method\r\n\t\t\t$sql = \"UPDATE grades SET student_id = ?, course_id = ?, degree = ?, examine_at = ? WHERE id = ?;\";\r\n\t\t\tDatabase::$db->prepare($sql)->execute([$this->student_id, $this->course_id, $this->degree, $this->examine_at, $this->id]);\r\n\t\t\t//old method\r\n\t\t\t/*$sql = \"UPDATE grades SET student_id = ? WHERE id = ?;\";\r\n\t\t\t$sql = \"UPDATE grades SET course_id = ? WHERE id = ?;\";\r\n\t\t\t$sql = \"UPDATE grades SET degree = ? WHERE id = ?;\";\r\n\t\t\t$sql = \"UPDATE grades SET examine_at = ? WHERE id = ?;\";\r\n\t\t\tDatabase::$db->prepare($sql)->execute([$this->student_id, $this->id]);\r\n\t\t\tDatabase::$db->prepare($sql)->execute([$this->course_id, $this->id]);\r\n\t\t\tDatabase::$db->prepare($sql)->execute([$this->degree, $this->id]);\r\n\t\t\tDatabase::$db->prepare($sql)->execute([$this->examine_at, $this->id]);*/\r\n\t\t}", "public function test_insert_grade_record() {\n global $DB, $USER;\n\n $user = $this->getDataGenerator()->create_user();\n $this->setAdminUser();\n\n $record = new stdClass();\n $record->itemid = 4;\n $record->newgradeitem = 25;\n $record->finalgrade = 62.00;\n $record->feedback = 'Some test feedback';\n\n $testobject = new phpunit_gradeimport_csv_load_data();\n $testobject->test_insert_grade_record($record, $user->id);\n\n $gradeimportvalues = $DB->get_records('grade_import_values');\n // Get the insert id.\n $key = key($gradeimportvalues);\n\n $testarray = array();\n $testarray[$key] = new stdClass();\n $testarray[$key]->id = $key;\n $testarray[$key]->itemid = $record->itemid;\n $testarray[$key]->newgradeitem = $record->newgradeitem;\n $testarray[$key]->userid = $user->id;\n $testarray[$key]->finalgrade = $record->finalgrade;\n $testarray[$key]->feedback = $record->feedback;\n $testarray[$key]->importcode = $testobject->get_importcode();\n $testarray[$key]->importer = $USER->id;\n $testarray[$key]->importonlyfeedback = 0;\n\n // Check that the record was inserted into the database.\n $this->assertEquals($gradeimportvalues, $testarray);\n }", "function addGrades($grades) {\n $columns = implode(\", \", array_keys($grades[0]));\n\n foreach ($grades as $row) {\n $voter_id = $row[\"voter_id\"];\n $user_id = $row[\"user_id\"];\n $competence_id = $row[\"competence_id\"];\n $grade = $row[\"grade\"];\n $valuesArr[] = \"('$voter_id', '$user_id', '$competence_id', '$grade')\";\n }\n\n $values = implode(\", \", $valuesArr);\n $sql = \"INSERT INTO `grades`($columns) VALUES $values\";\n\n $this->executeQuery($sql);\n }", "private function insert_target_grade()\r\n {\r\n global $DB;\r\n $params = $this->get_params();\r\n $this->id = $DB->insert_record('block_bcgt_target_grades', $params);\r\n }", "function addGrade($grades) {\n\n $columns = implode(\", \", array_keys($grades));\n $escaped_values = array_map($this->db->prepare, array_values($grades));\n $values = implode(\", \", $escaped_values);\n $sql = \"INSERT INTO `grades`($columns) VALUES ($values)\";\n\n $this->executeQuery($sql);\n }", "public function save()\r\n {\r\n if($this->id != -1)\r\n {\r\n $this->update_target_grade();\r\n }\r\n else\r\n {\r\n $this->insert_target_grade();\r\n }\r\n }", "function addGrade(){\n $categoryId = Slim::getInstance()->request()->post('categoryId');\n $gradeName = Slim::getInstance()->request()->post('gradeName');\n $percentage = Slim::getInstance()->request()->post('percentage');\n try {\n $insertGrade = \"INSERT INTO grades(categoryId, gradeName, percentage) VALUE(:categoryId, :gradeName, :percentage)\";\n $db = getConnection();\n $stmt = $db->prepare($insertGrade);\n $stmt->bindParam(\"categoryId\", $categoryId);\n $stmt->bindParam(\"gradeName\", $gradeName);\n $stmt->bindParam(\"percentage\", $percentage);\n $stmt->execute();\n $db = null;\n\n } catch(PDOException $e) {\n echo '{\"error\":{\"text\":'. $e->getMessage() .'}}'; \n } \n}", "public function process_flexpage_grade($data) {\n global $DB;\n\n $data = (object) $data;\n $data->pageid = $this->get_new_parentid('flexpage_page');\n\n $DB->insert_record('format_flexpage_grade', $data);\n }", "public function test_prepare_import_grade_data() {\n global $DB;\n\n // Need to add one of the users into the system.\n $user = new stdClass();\n $user->firstname = 'Anne';\n $user->lastname = 'Able';\n $user->email = '[email protected]';\n // Insert user 1.\n $this->getDataGenerator()->create_user($user);\n $user = new stdClass();\n $user->firstname = 'Bobby';\n $user->lastname = 'Bunce';\n $user->email = '[email protected]';\n // Insert user 2.\n $this->getDataGenerator()->create_user($user);\n\n $this->csv_load($this->oktext);\n\n $importcode = 007;\n $verbosescales = 0;\n\n // Form data object.\n $formdata = new stdClass();\n $formdata->mapfrom = 5;\n $formdata->mapto = 'useremail';\n $formdata->mapping_0 = 0;\n $formdata->mapping_1 = 0;\n $formdata->mapping_2 = 0;\n $formdata->mapping_3 = 0;\n $formdata->mapping_4 = 0;\n $formdata->mapping_5 = 0;\n $formdata->mapping_6 = 'new';\n $formdata->mapping_7 = 'feedback_2';\n $formdata->mapping_8 = 0;\n $formdata->mapping_9 = 0;\n $formdata->map = 1;\n $formdata->id = 2;\n $formdata->iid = $this->iid;\n $formdata->importcode = $importcode;\n $formdata->forceimport = false;\n\n // Blam go time.\n $testobject = new phpunit_gradeimport_csv_load_data();\n $dataloaded = $testobject->prepare_import_grade_data($this->columns, $formdata, $this->csvimport, $this->courseid, '', '',\n $verbosescales);\n // If everything inserted properly then this should be true.\n $this->assertTrue($dataloaded);\n }", "public function addJobToDatabase() {\r\n\t\t//get the addProduct form data in the form of key = value (form name = form input)\r\n\t\t$post = $this -> sanitize();\r\n\t\textract($post);\r\n\t\t$userID = $_SESSION['userID'];\r\n\t\t$timestamp = time();\r\n\t\t//query\r\n\t\t$query = \"INSERT INTO jobs VALUES(NULL,'$userID','$category','$name','$price', '$rank', '$about', '$timestamp')\";\r\n\t\t$data = $this -> updateDeleteQuery($query);\r\n\t\treturn $data;\r\n\t}", "function insertJob() {\n $title = htmlspecialchars(trim($_POST['title']), ENT_QUOTES);\n $description = str_replace(array(\"\\r\\n\", \"\\n\", \"\\r\"), \"<br />\", htmlspecialchars(trim($_POST['description']), ENT_QUOTES));\n $status = $_POST['status'];\n $salary = htmlspecialchars(trim($_POST['salary']), ENT_QUOTES);\n $measure = $_POST['measure'];\n $category = implode(\" \", $_POST['category']);\n $location = implode(\" \", $_POST['location']);\n $fk_user = decryptUser();\n $date = date('Y-m-d');\n \n connectDatabase();\n \n queryDatabase(\"INSERT INTO job (title, description, inserted, fk_category, fk_location, fk_user, status, salary, measure)\n VALUES ('$title', '$description', '$date', '$category', '$location', $fk_user, '$status', '$salary', '$measure')\");\n \n header('Location: ' . HOME . 'member.php?feedback=8');\n}", "private function storeToDB() {\r\n\t\tDBQuery::getInstance() -> insert('INSERT INTO `CalculatedDailyNeeds`' . DBUtils2::buildMultipleInsertOnDuplikateKeyUpdate($this -> aArticleData));\r\n\t}", "function insert() {\n // Retrieve scale and infer grademax from it\n if (!empty($this->scaleid)) {\n $this->load_scale();\n $this->scale->load_items();\n $this->grademax = count ($this->scale->scale_items);\n $this->grademin = 0;\n }\n\n $result = parent::insert();\n\n // Notify parent grade_item of need to update\n $this->load_grade_item();\n $result = $result && $this->grade_item->flag_for_update();\n\n // Update grade_grades_text if specified\n if ($result && !empty($this->feedback)) {\n $result = $this->annotate(NULL, NULL, $this->feedback, $this->feedbackformat);\n }\n\n return $result && $this->grade_item->flag_for_update();\n }", "public function test_import_new_grade_item() {\n global $DB;\n\n $this->setAdminUser();\n $this->csv_load($this->oktext);\n $columns = $this->columns;\n\n // The assignment is item 6.\n $key = 6;\n $testobject = new phpunit_gradeimport_csv_load_data();\n\n // Key for this assessment.\n $this->csvimport->init();\n $testarray = array();\n while ($line = $this->csvimport->next()) {\n $testarray[] = $testobject->test_import_new_grade_item($columns, $key, $line[$key]);\n }\n\n // Query the database and check how many results were inserted.\n $newgradeimportitems = $DB->get_records('grade_import_newitem');\n $this->assertEquals(count($testarray), count($newgradeimportitems));\n }", "function add_student($student_name, $student_grade, $letter_grade) {\n global $db;\n $query = 'INSERT INTO students\n (student_name, student_grade, letter_grade)\n VALUES\n (:student_name, :student_grade, :letter_grade)';\n $statement = $db->prepare($query);\n $statement->bindValue(':student_name', $student_name);\n $statement->bindValue(':student_grade', $student_grade);\n $statement->bindValue(':letter_grade', $letter_grade);\n $statement->execute();\n $statement->closeCursor();\n }", "public function run()\n {\n \\Illuminate\\Support\\Facades\\Schema::disableForeignKeyConstraints();\n \\Illuminate\\Support\\Facades\\DB::table('classes')->truncate();\n \\Illuminate\\Support\\Facades\\Schema::enableForeignKeyConstraints();\n\n Grade::insert([\n ['name' => 10, 'sub' => 1],\n ['name' => 10, 'sub' => 2],\n ['name' => 11, 'sub' => 1],\n ['name' => 11, 'sub' => 2],\n ['name' => 12, 'sub' => 1],\n ['name' => 12, 'sub' => 2],\n ]);\n }", "public function run()\n {\n DB::table('job')->insert([\n \t[\n\t 'title' => 'job 1',\n\t 'minimumWorkExperience' => 5,\n\t 'state' => 'state',\n\t 'countryID' => 1,\n\t 'responsibilities' => 'eating',\n\t 'workLocation' => 'Subang',\n\t 'jobLevelID' => 1,\n\t 'status' => 1,\n\t\t 'created_at' => new DateTime,\n\t\t 'updated_at' => new DateTime\n \t],\n \t\n ]);\n }", "public function addGrade()\n {\n $this->load->helper('url');\n\n $name = $this->input->post('name');\n $data = array(\n 'grade_name' => $name\n );\n return $this->db->insert('grade', $data);\n }", "public function run()\n {\n \n\n \\DB::table('user_grade')->delete();\n \n \\DB::table('user_grade')->insert(array (\n 0 => \n array (\n 'id' => 1,\n 'name' => '主管',\n 'created_at' => '2019-12-21 10:27:49',\n 'updated_at' => '2019-12-21 10:27:49',\n ),\n 1 => \n array (\n 'id' => 2,\n 'name' => '普通员工',\n 'created_at' => '2019-12-21 10:28:05',\n 'updated_at' => '2019-12-21 10:28:05',\n ),\n ));\n \n \n }", "public function saveScores($data)\n\t{\n\n\t\t// build score array from $data\n\t\t$scoreArray = array();\n\t\tforeach($data as $key => $value) {\n\t\t\t$keyData = explode('_', $key);\n\t\t\t$scoreArray['seminar_id'] = $keyData[1];\n\t\t\tswitch($keyData[0]) {\n\t\t\t\tcase 'prep':\n\t\t\t\t\t$scoreArray[$keyData[0]] = $value;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'prof':\n\t\t\t\t\t$scoreArray[$keyData[0]] = $value;\n\t\t\t\t\tbreak;\t\t\t\n\t\t\t}\n\t\t\t$scoreArray['grader_user_id'] = $keyData[2];\n\t\t}\n\t\t$scoreArray['presenter_user_section_id'] = $data['presenter_user_section_id'];\n\n\n\t\tif($scoreArray['prep'] > self::PREP_SCORE_MAX) {\n\t\t\t$scoreArray['prep'] = self::PREP_SCORE_MAX;\n\t\t}\n\t\tif($scoreArray['prof'] > self::PROF_SCORE_MAX) {\n\t\t\t$scoreArray['prof'] = self::PROF_SCORE_MAX;\n\t\t}\n\n\t\t$scoresTable = new Application_Model_DbTable_Scores();\n\t\t$select = $scoresTable->select()\n\t\t\t->where('seminar_id = ?', $scoreArray['seminar_id'])\n\t\t\t->where('grader_user_id = ?', $scoreArray['grader_user_id']);\n\t\t\t\n\t\t$row = $scoresTable->fetchRow($select);\n\t\tif(empty($row)) {\n\t\t\t$newRow = $scoresTable->createRow();\n\t\t\t$newRow->seminar_id= $scoreArray['seminar_id'];\n\t\t\t$newRow->prep = $scoreArray['prep'];\n\t\t\t$newRow->prof = $scoreArray['prof'];\n\t\t\t$newRow->grader_user_id = $scoreArray['grader_user_id'];\n\t\t\t$newRow->save();\n\t\t\t$scoreData = $newRow;\n\t\t} else {\n\t\t\t$row->prep = $scoreArray['prep'];\n\t\t\t$row->prof = $scoreArray['prof'];\n\t\t\t$row->save();\n\t\t\t$scoreData = $row;\n\t\t}\n\n\t\t$averageScoreArray = $this->getFacultyScoreAverages($scoreArray['seminar_id']);\n\t\t$averageScoreArray['grader_user_id'] = $scoreArray['grader_user_id'];\n\t\t$averageScoreArray['presenter_user_section_id'] = $scoreArray['presenter_user_section_id'];\n\n\t\t$attendanceScore = $this->calculateAttendanceScore($scoreArray['presenter_user_section_id'], $scoreArray['seminar_id'], $scoreArray['grader_user_id']);\n\n\t\t$averageScoreArray['finalScore'] = $this->getFinalScore($scoreArray['seminar_id'], $scoreArray['presenter_user_section_id'], $scoreData->prep, $scoreData->prof, $attendanceScore);\n\n\t\treturn $averageScoreArray;\t\n\t}", "function languagelesson_save_grade($lessonid, $userid, $gradeval) {\n global $DB;\n\t// build the grade object\n\t$grade = new stdClass;\n\t$grade->lessonid = $lessonid;\n\t$grade->userid = $userid;\n\t$grade->grade = $gradeval;\n\n\t// And update the old grade record, if there is one; if not, insert the record.\n\tif ($oldgrade = $DB->get_record(\"languagelesson_grades\", array(\"lessonid\"=>$lessonid, \"userid\"=>$userid))) {\n\t\t// If the old grade was for a completed lesson attempt, update the completion time.\n\t\tif ($oldgrade->completed) { $grade->completed = time(); }\n\t\t$grade->id = $oldgrade->id;\n\t\tif (! $DB->update_record(\"languagelesson_grades\", $grade)) {\n\t\t\terror(\"Navigation: grade not updated\");\n\t\t}\n\t} else {\n\t\tif (! $DB->insert_record(\"languagelesson_grades\", $grade)) {\n\t\t\terror(\"Navigation: grade not inserted\");\n\t\t}\n\t}\n}", "public function loadPostData(){\n \n // ID - if we're editing existing one\n if (isset($_POST['grading_id'])){\n $this->setID($_POST['grading_id']);\n }\n \n $this->setName($_POST['grading_name']);\n $this->setEnabled( (isset($_POST['grading_enabled']) && $_POST['grading_enabled'] == 1 ) ? 1 : 0);\n $this->setIsUsedForAssessments( (isset($_POST['grading_assessments']) && $_POST['grading_assessments'] == 1 ) ? 1 : 0);\n \n // If Build ID use that, otherwise use QualStructureID\n $buildID = optional_param('build', false, PARAM_INT);\n if ($buildID){\n $this->setQualBuildID($buildID);\n $this->setIsUsedForAssessments(1);\n } else {\n $this->setQualStructureID( $_POST['grading_qual_structure_id'] );\n }\n \n $gradeIDs = (isset($_POST['grade_ids'])) ? $_POST['grade_ids'] : false;\n if ($gradeIDs)\n {\n \n foreach($gradeIDs as $key => $id)\n {\n \n $award = new \\GT\\CriteriaAward($id);\n $award->setName($_POST['grade_names'][$key]);\n $award->setShortName($_POST['grade_shortnames'][$key]);\n $award->setSpecialVal($_POST['grade_specialvals'][$key]);\n $award->setPoints($_POST['grade_points'][$key]);\n $award->setPointsLower($_POST['grade_points_lower'][$key]);\n $award->setPointsUpper($_POST['grade_points_upper'][$key]);\n $award->setMet( (isset($_POST['grade_met'][$key])) ? 1 : 0 );\n $award->setImageFile( \\gt_get_multidimensional_file($_FILES['grade_files'], $key) );\n \n // If we have a tmp icon set load that back in\n if ( isset($_POST['grade_icon_names'][$key]) && strpos($_POST['grade_icon_names'][$key], \"tmp//\") === 0 ){\n $award->iconTmp = str_replace(\"tmp//\", \"\", $_POST['grade_icon_names'][$key]);\n }\n \n // If are editing something which already has a valid image saved\n elseif (isset($_POST['grade_icon_names'][$key]) && strlen($_POST['grade_icon_names'][$key]) > 0)\n {\n $award->setImage($_POST['grade_icon_names'][$key]);\n }\n \n $this->addAward($award);\n \n }\n \n }\n \n \n }", "public function run()\n {\n DB::table('jobs')->insert([\n [\n 'employer_id' => '1',\n 'status' => 'open',\n 'category_id' => '1',\n 'job_title' => 'demo title',\n 'description' => 'this is description',\n 'salary_type' => 'per month',\n 'occupation' => 'laravel developer',\n 'education' => 'BSAC',\n 'experience' => '3 Year',\n ],\n [\n 'employer_id' => '1',\n 'status' => 'open',\n 'category_id' => '2',\n 'job_title' => 'demo title 2',\n 'description' => 'this is description',\n 'salary_type' => 'per month',\n 'occupation' => 'php developer',\n 'education' => 'SE',\n 'experience' => '2 Year',\n ],\n ]);\n }", "public function run()\n {\n DB::table('students')->insert([\n [\n 'std_number' => '1800721135',\n 'reg_number' => '18/U/21135/PS',\n 'course' => 'BSE',\n 'user_id' => '1',\n 'field_supervisor_id' => '3'\n ],[\n 'std_number' => '1800721090',\n 'reg_number' => '18/U/21090/PS',\n 'course' => 'BSE',\n 'user_id' => '2',\n 'field_supervisor_id' => '3'\n ]\n ]);\n }", "public function insertGraceMarks($studentId,$classId,$subjectId,$graceMarks,$int,$ext,$tot){\n $query=\"INSERT INTO \".TEST_GRACE_MARKS_TABLE.\" (studentId,classId,subjectId,graceMarks,internalGraceMarks,externalGraceMarks,totalGraceMarks) \n VALUES($studentId,$classId,$subjectId,$graceMarks,$int,$ext,$tot)\";\n return SystemDatabaseManager::getInstance()->executeUpdateInTransaction($query);\n }", "function InsertToDB()\n\t{\n\t\tif(isset($_GET['job_industry_type']))\n\t\t{\n\t\t\t//Initializing variables with the user inputs\n\t\t\t$IndustryType = $_GET['job_industry_type'];\n\t\t\t\t\t\t\n\t\t\tif(!empty($IndustryType))\n\t\t\t{\n\t\t\t\t//Query which is going to execute to for database manipulation\n\t\t\t\t$query =\"INSERT INTO job_details VALUES ('', '$IndustryType')\";\n\t\t\t\t$query_run = mysql_query($query);\n\t\t\t\t\n\t\t\t\tunset($_GET['job_industry_type']);\n\t\t\t\t$_GET['job_industry_type'] = '';\n\t\t\t}\n\t\t}\n\t}", "public function saveData(): void\n {\n studentLoader::saveStudent(new student($_POST['lastName'], $_POST['firstName'], $_POST['email'], new group($_POST['className']), $_POST['id']), $this->pdo);\n }", "public function post_Table_data(){\n\t\t$this->load->model('teach_func/auto_save_tbl', 'this_model');\n\n\t\t$Q = $this->this_model->auto_update();\n\t\t\n\t\tif ($Q) {\n\t\t\t\n\t\t\techo \"Student_grade_updated! :)\";\n\t\t}\n\n\t}", "public function addData()\r\n {\r\n\t\t$this->datecreated = time();\r\n\r\n\r\n\t\t$sql = 'INSERT INTO ' . TABLE_PREFIX . 'jobcv (\r\n\t\t\t\t\tj_id,\r\n\t\t\t\t\tjc_title,\r\n\t\t\t\t\tjc_file,\r\n\t\t\t\t\tjc_firstname,\r\n\t\t\t\t\tjc_lastname,\r\n\t\t\t\t\tjc_birthday,\r\n\t\t\t\t\tjc_email,\r\n\t\t\t\t\tjc_phone,\r\n\t\t\t\t\tjc_moderatorid,\r\n\t\t\t\t\tjc_ipaddress,\r\n\t\t\t\t\tjc_status,\r\n\t\t\t\t\tjc_rating,\r\n\t\t\t\t\tjc_note,\r\n\t\t\t\t\tjc_dateinterview,\r\n\t\t\t\t\tjc_datecreated,\r\n\t\t\t\t\tjc_datemodified\r\n\t\t\t\t\t)\r\n\t\t VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)';\r\n\t\t$rowCount = $this->db->query($sql, array(\r\n\t\t\t\t\t(int)$this->jid,\r\n\t\t\t\t\t(string)$this->title,\r\n\t\t\t\t\t(string)$this->file,\r\n\t\t\t\t\t(string)$this->firstname,\r\n\t\t\t\t\t(string)$this->lastname,\r\n\t\t\t\t\t(string)$this->birthday,\r\n\t\t\t\t\t(string)$this->email,\r\n\t\t\t\t\t(string)$this->phone,\r\n\t\t\t\t\t(int)$this->moderatorid,\r\n\t\t\t\t\t(int)$this->ipaddress,\r\n\t\t\t\t\t(int)$this->status,\r\n\t\t\t\t\t(int)$this->rating,\r\n\t\t\t\t\t(string)$this->note,\r\n\t\t\t\t\t(int)$this->dateinterview,\r\n\t\t\t\t\t(int)$this->datecreated,\r\n\t\t\t\t\t(int)$this->datemodified\r\n\t\t\t\t\t))->rowCount();\r\n\r\n\t\t$this->id = $this->db->lastInsertId();\r\n\t\tif($this->id > 0)\r\n\t\t{\r\n\t\t\tif(strlen($_FILES['ffile']['name']) > 0)\r\n {\r\n //upload image\r\n $uploadImageResult = $this->uploadImage();\r\n\r\n if($uploadImageResult != Uploader::ERROR_UPLOAD_OK)\r\n return false;\r\n elseif($this->file != '')\r\n {\r\n //update source\r\n $sql = 'UPDATE ' . TABLE_PREFIX . 'jobcv\r\n SET jc_file = ?\r\n WHERE jc_id = ?';\r\n $result=$this->db->query($sql, array($this->file, $this->id));\r\n if(!$result)\r\n \treturn false;\r\n }\r\n }\r\n\t\t}\r\n\t\treturn $this->id;\r\n\t}", "public function saveToDb() {\n parent::saveToDb();\n\n require_once 'models/Location.php';\n Location::saveToDb($this->preferredLocation);\n Location::saveToDb($this->currentLocation);\n\n require_once 'libs/DB.php';\n $conn = DB::connect();\n\n $seekerId = $this->id();\n\n // Update the seeker table\n $conn->exec(\"UPDATE seeker SET experience='$this->experience', pref_location_name='$this->preferredLocation', curr_location_name='$this->currentLocation' WHERE id='$seekerId'\");\n\n require_once 'models/Skill.php';\n foreach($this->skills as $skill) {\n Skill::saveToDb($skill);\n }\n\n // Delete old skills\n $conn->exec(\"DELETE FROM seeker_skill WHERE seeker_id='$seekerId'\");\n\n // Add new skills\n foreach($this->skills as $skill) {\n $conn->exec(\"INSERT INTO seeker_skill(seeker_id, skill_name) VALUES('$seekerId', '$skill')\");\n }\n }", "public function run()\n {\n DB::table('students')->insert([\n 'fname' => 'student',\n 'lname' => 'test',\n 'bday' => '10/09/1997',\n 'studid' => 'abc1123',\n 'overAllPoints' => 10,\n 'pointsBal' => 6,\n 'pointsUsed' => 4,\n 'userId' => 2\n ]);\n }", "public function run()\n {\n DB::table('grades')->delete();\n\n \\App\\grade::create(array(\n 'test_id' => 1,\n 'class_id' =>1,\n 'teacher' =>2,\n 'title' =>'Assignment 1',\n 'grade' =>'A',\n 'user_id' =>1,\n ));\n \\App\\grade::create(array(\n 'test_id' => 2,\n 'class_id' =>1,\n 'teacher' =>2,\n 'title' =>'Assignment 2',\n 'grade' =>'N/A',\n 'user_id' =>1,\n ));\n \\App\\grade::create(array(\n 'test_id' => 1,\n 'class_id' =>1,\n 'teacher' =>2,\n 'title' =>'Assignment 1',\n 'grade' =>'B',\n 'user_id' =>3,\n ));\n \\App\\grade::create(array(\n 'test_id' => 2,\n 'class_id' =>1,\n 'teacher' =>2,\n 'title' =>'Assignment 2',\n 'grade' =>'N/A',\n 'user_id' =>3,\n ));\n \\App\\grade::create(array(\n 'test_id' => 1,\n 'class_id' =>1,\n 'teacher' =>2,\n 'title' => 'Assignment 1',\n 'grade' =>'N/A',\n 'user_id' =>4,\n ));\n \\App\\grade::create(array(\n 'test_id' => 2,\n 'class_id' =>1,\n 'teacher' =>2,\n 'title' => 'Assignment 2',\n 'grade' =>'A',\n 'user_id' =>4,\n ));\n $this->command->info('Grade table seeded!');\n }", "public function run()\n {\n $anno=Anno::find(3); // 2021\n\n $record=new SchoolGrade;\n $record->grade='PÁRVULOS';\n $record->level_id=1;\n $record->save();\n $anno->schoolGrades()->attach([$record->id => ['priority' => 1] ]);\n\n $record=new SchoolGrade;\n $record->grade='PREKINDER';\n $record->level_id=1;\n $record->save();\n $anno->schoolGrades()->attach([$record->id => ['priority' => 2] ]);\n\n $record=new SchoolGrade;\n $record->grade='KINDER';\n $record->level_id=1;\n $record->save();\n $anno->schoolGrades()->attach([$record->id => ['priority' => 3] ]);\n\n $record=new SchoolGrade;\n $record->grade='PREPRIMARIO';\n $record->level_id=1;\n $record->save();\n $anno->schoolGrades()->attach([$record->id => ['priority' => 4] ]);\n\n $record=new SchoolGrade;\n $record->grade='PRIMERO';\n $record->level_id=2;\n $record->save();\n $anno->schoolGrades()->attach([$record->id => ['priority' => 5] ]);\n\n $record=new SchoolGrade;\n $record->grade='SEGUNDO';\n $record->level_id=2;\n $record->save();\n $anno->schoolGrades()->attach([$record->id => ['priority' => 6] ]);\n\n $record=new SchoolGrade;\n $record->grade='TERCERO';\n $record->level_id=2;\n $record->save();\n $anno->schoolGrades()->attach([$record->id => ['priority' => 7] ]);\n\n $record=new SchoolGrade;\n $record->grade='CUARTO';\n $record->level_id=2;\n $record->save();\n $anno->schoolGrades()->attach([$record->id => ['priority' => 8] ]);\n\n $record=new SchoolGrade;\n $record->grade='QUINTO';\n $record->level_id=2;\n $record->save();\n $anno->schoolGrades()->attach([$record->id => ['priority' => 9] ]);\n\n $record=new SchoolGrade;\n $record->grade='SEXTO';\n $record->level_id=2;\n $record->save();\n $anno->schoolGrades()->attach([$record->id => ['priority' => 10] ]);\n\n $record=new SchoolGrade;\n $record->grade='PRIMERO SECUNDARIA';\n $record->level_id=3;\n $record->save();\n $anno->schoolGrades()->attach([$record->id => ['priority' => 11] ]);\n\n $record=new SchoolGrade;\n $record->grade='SEGUNDO SECUNDARIA';\n $record->level_id=3;\n $record->save();\n $anno->schoolGrades()->attach([$record->id => ['priority' => 12] ]);\n\n $record=new SchoolGrade;\n $record->grade='TERCERO SECUNDARIA';\n $record->level_id=3;\n $record->save();\n $anno->schoolGrades()->attach([$record->id => ['priority' => 13] ]);\n\n $record=new SchoolGrade;\n $record->grade='CUARTO SECUNDARIA';\n $record->level_id=3;\n $record->save();\n $anno->schoolGrades()->attach([$record->id => ['priority' => 14] ]);\n\n $record=new SchoolGrade;\n $record->grade='QUINTO SECUNDARIA';\n $record->level_id=3;\n $record->save();\n $anno->schoolGrades()->attach([$record->id => ['priority' => 15] ]);\n\n $record=new SchoolGrade;\n $record->grade='SEXTO SECUNDARIA';\n $record->level_id=3;\n $record->save();\n $anno->schoolGrades()->attach([$record->id => ['priority' => 16] ]);\n }", "function sqlInsertGrade($gradeName)\n\t{\n\t\t$sql = \"\n\t\tINSERT INTO tbl_grade(grade_name)\n\t\tSELECT * FROM (SELECT :grade_name) as temp\n\t\tWHERE NOT EXISTS (\n\t\t\tSELECT grade_name FROM tbl_grade\n\t\t\tWHERE grade_name = :grade_name\n\t\t) LIMIT 1 \";\n\n\t\treturn $sql;\n\t}", "public function store(Request $request)\n {\n $data = new MarksGrade();\n $data->grade_name = $request->grade_name;\n $data->grade_point = $request->grade_point;\n $data->start_marks = $request->start_marks;\n $data->end_marks = $request->end_marks;\n $data->start_point = $request->start_point;\n $data->end_point = $request->end_point;\n $data->remarks = $request->remarks;\n $data->save();\n\n return redirect()->route('grade.index')->with('success','Data Add Succefully Done');\n }", "protected function addNewGrade($item, array $data)\n { //'course_item', 'course_student', 'score'\n $eval = Courseevaluation::create([\n 'course_item' => $item,\n 'course_student' => $data['student'],\n 'score' => $data['score']\n ]);\n return $eval;\n }", "function add_grade($grade) {\n $this->grades[] = $grade;\n }", "function addAssignmentToDatabase($name, $code, $teacher_id) {\n\t\t# Inserts user into database\n\t\t$result = mysql_query(\"INSERT INTO Assignments (Assignment_Code, Name, Teacher_ID) VALUES ( '$code', '$name', '$teacher_id' )\")\n\t\t\tor die(\"<p>Error inserting into the database: \" .\n\t\t\t\t\tmysql_error() . \"</p>\");\n\t}", "public function assignGrades()\n {\n if(isset($this->data['EarningRatePrisoner']) && is_array($this->data['EarningRatePrisoner']) && $this->data['EarningRatePrisoner']!='')\n {\n if(isset($this->data['EarningRatePrisoner']['uuid']) && $this->data['EarningRatePrisoner']['uuid']=='')\n {\n $uuidArr=$this->EarningRatePrisoner->query(\"select uuid() as code\");\n $this->request->data['EarningRatePrisoner']['uuid']=$uuidArr[0][0]['code'];\n } \n if(isset($this->data['EarningRatePrisoner']['date_of_assignment']) && $this->data['EarningRatePrisoner']['date_of_assignment']!=\"\" )\n {\n $this->request->data['EarningRatePrisoner']['date_of_assignment']=date('Y-m-d',strtotime($this->data['EarningRatePrisoner']['date_of_assignment']));\n }\n if($this->EarningRatePrisoner->save($this->data))\n {\n $this->Session->write('message_type','success');\n $this->Session->write('message','Saved successfully');\n $this->redirect('/earningRates/assignGrades'); \n } \n else\n {\n $this->Session->write('message_type','error');\n $this->Session->write('message','saving failed');\n }\n\n }\n /*\n *Code for delete the Earning Rates\n */\n if(isset($this->data['EarningRatePrisonerDelete']['id']) && (int)$this->data['EarningRatePrisonerDelete']['id'] != 0){\n $this->EarningRatePrisoner->id=$this->data['EarningRatePrisonerDelete']['id'];\n $this->EarningRatePrisoner->saveField('is_trash',1);\n\n $this->Session->write('message_type','success');\n $this->Session->write('message','Deleted Successfully !');\n $this->redirect(array('action'=>'assignGrades'));\n }\n /*\n *Code for edit the Earning Rates\n */\n if(isset($this->data['EarningRatePrisonerEdit']['id']) && (int)$this->data['EarningRatePrisonerEdit']['id'] != 0){\n if($this->EarningRatePrisoner->exists($this->data['EarningRatePrisonerEdit']['id'])){\n $this->data = $this->EarningRatePrisoner->findById($this->data['EarningRatePrisonerEdit']['id']);\n }\n } \n $gradeslist=$this->EarningRate->find('list',array(\n 'recursive' => -1,\n 'fields' => array(\n 'EarningRate.id',\n 'EarningGrade.name',\n ),\n \"joins\" => array(\n array(\n \"table\" => \"earning_grades\",\n \"alias\" => \"EarningGrade\",\n \"type\" => \"LEFT\",\n \"conditions\" => array(\n \"EarningRate.earning_grade_id = EarningGrade.id\"\n )\n )),\n 'conditions' => array(\n 'EarningRate.is_enable' => 1,\n 'EarningRate.is_trash' => 0,\n ),\n 'order'=>array(\n 'EarningGrade.name'\n )\n )); \n $prisonerlist=$this->Prisoner->find('list',array(\n 'recursive' => -1,\n 'fields' => array(\n 'Prisoner.id',\n 'Prisoner.prisoner_no',\n ),\n 'conditions' => array(\n 'Prisoner.is_enable' => 1,\n 'Prisoner.is_trash' => 0,\n ),\n 'order'=>array(\n 'Prisoner.prisoner_no'\n )\n )); \n\n $this->set(compact('gradeslist','prisonerlist'));\n\n }", "function addProgress($student, $course, $grade, $aim, $comment, $date){\n\n\t\tif($grade == \"\"){$grade = \"NG\";}if($aim == \"\"){$aim = \"ND\";}\n\n\t\t$this->connection->query(\"INSERT INTO progress (prog_student, prog_course, prog_grade, prog_aim, prog_comment, prog_date) VALUES ('$student', '$course', '$grade', '$aim', '$comment', '$date')\",true);\n\t\tif($_SESSION['query']){\n\t\t\treturn \"Student progress data Successfully added\";\n\t\t}else{\n\t\t\treturn \"Failed to add Student progress data!\";\t\t\n\t\t}\n\n\t}", "public function run()\n {\n //\n DB::table('grades')->insert([\n ['grade' => 'Kindergarten'],\n ['grade' => '1'],\n ['grade' => '2'],\n ['grade' => '3'],\n ['grade' => '4'],\n ['grade' => '5'],\n ['grade' => '6'],\n ['grade' => '7'],\n ['grade' => '8'],\n ['grade' => '9'],\n ['grade' => '10'],\n ['grade' => '11'],\n ['grade' => '12']\n ]);\n\n DB::table('schools')->insert([\n ['school' => 'A S Matheson Elementary'],\n ['school' => 'Anne McClymont Elementary'],\n ['school' => 'Anne McClymont Primary'],\n ['school' => 'Bankhead Elementary'],\n ['school' => 'Belgo Elementary'],\n ['school' => 'Black Mountain Elementary'],\n ['school' => 'Casorso Elementary'],\n ['school' => 'Central School Programs'],\n ['school' => 'Chute Lake Elementary'],\n ['school' => 'Mar Jok Elementary'],\n ['school' => 'Constable Neil Bruce Middle'],\n ['school' => 'Davidson Road Elementary'],\n ['school' => 'Dorothea Walker Elementary'],\n ['school' => 'Dr. Knox Middle'],\n ['school' => 'Ellison Elementary'],\n ['school' => 'George Elliot Secondary'],\n ['school' => 'George Pringle Elementary'],\n ['school' => 'Glenmore Elementary'],\n ['school' => 'Glenrosa Elementary'],\n ['school' => 'Glenrosa Middle'],\n ['school' => 'Helen Gorman Elementary'],\n ['school' => 'Hudson Road Elementary'],\n ['school' => 'Senior Secondary'],\n ['school' => 'KLO Middle'],\n ['school' => 'Mount Boucherie Senior Secondary'],\n ['school' => 'North Glenmore Elementary'],\n ['school' => 'Okanagan Mission Secondary'],\n ['school' => 'Oyama Traditional'],\n ['school' => 'Peachland Elementary'],\n ['school' => 'Pearson Elementary'],\n ['school' => 'Peter Greer Elementary'],\n ['school' => 'Quigley Elementary'],\n ['school' => 'Raymer Elementary'],\n ['school' => 'Rose Valley Elementary'],\n ['school' => 'Rutland Elementary'],\n ['school' => 'Rutland Middle'],\n ['school' => 'Rutland Senior Secondary'],\n ['school' => 'Shannon Lake Elementary'],\n ['school' => 'South Kelowna Elementary'],\n ['school' => 'South Rutland Elementary'],\n ['school' => 'Springvalley Elementary'],\n ['school' => 'Springvalley Middle'],\n ['school' => 'Storefront'],\n ['school' => 'Watson Road Elementary'],\n ]);\n\n DB::table('roles')->insert([\n ['name' => 'Parent', 'slug' => 'parent', 'permissions' => '{\"read-only\": true}'],\n ['name' => 'Manager', 'slug' => 'manager', 'permissions' => '{\"read-only\": true}'],\n ['name' => 'User', 'slug' => 'user', 'permissions' => '{\"read-only\": true}'],\n ['name' => 'Admin', 'slug' => 'admin', 'permissions' => '{\"add-role\": true, \"view-role\": true, \"list-grade\": true, \"create-user\": true, \"list-school\": true, \"remove-role\": true, \"update-user\": true, \"create-grade\": true, \"list-student\": true, \"remove-grade\": true, \"store-school\": true, \"create-school\": true, \"remove-school\": true, \"store-student\": true, \"update-school\": true, \"add-permission\": true, \"create-student\": true, \"remove-student\": true, \"remove-permission\": true, \"list-tag\": true, \"create-tag\": true, \"store-tag\": true, \"remove-tag\": true }']\n ]);\n\n DB::table('tags')->insert([\n ['tag' => '2nd Pass'],\n ['tag' => 'Accounts'],\n ['tag' => 'Courtesy Wait'],\n ['tag' => 'Mapp Issues'],\n ['tag' => 'Refund'],\n ['tag' => 'Sped Route'],\n ['tag' => 'Waiting for a Response']\n ]);\n\n DB::table('discounts')->insert([\n ['discount' => 'School Subsidy'],\n ['discount' => 'MOE Subsidy'],\n ['discount' => 'Accounts'],\n ['discount' => 'Transportation']\n ]);\n }", "public function delete_grade() {\r\n\t\t\t$sql = \"DELETE FROM grades WHERE id = $this->id;\";\r\n\t\t\tDatabase::$db->query($sql);\r\n\t\t}", "function insert() {\n\t \n\t \t$sql = \"INSERT INTO evs_database.evs_group (gru_id, gru_name, gru_head_dept,gru_company_id)\n\t \tVALUES(?, ?, ?,?)\";\n\t\t \n\t \t$this->db->query($sql, array($this->gru_id, $this->gru_name, $this->gru_head_dept ,$this->gru_company_id));\n\t }", "private function upsert_data() {\n foreach ($this->data as $course => $rows) {\n if (db::upsert($this->semester, $course, $rows) === false) {\n $this->log_it(db::$error);\n }\n }\n\n // Done.\n return true;\n }", "function dataform_add_instance($data) {\n global $CFG, $DB;\n\n $data->timemodified = time();\n\n if (empty($data->grade)) {\n $data->grade = 0;\n $data->grademethod = 0;\n }\n\n if ($CFG->dataform_maxentries) {\n $data->maxentries = $CFG->dataform_maxentries;\n }\n\n if (!$data->id = $DB->insert_record('dataform', $data)) {\n return false;\n }\n\n dataform_grade_item_update($data);\n return $data->id;\n}", "function sb_assignment_insert ($node) {\n\n db_query(\"INSERT INTO {eto_assignments}\n (\" . $node->key_field . \", \" . $node->target_field . \")\n VALUES\n (%d, %d)\",\n\t $node->uid, $node->selected_uid);\n\n}", "public function store(GradeCreateRequest $request)\n {\n\n\n\n $grade = Grade::create($request->gradeFillData());\n $grade->syncFatherGrades($request->get('father_grade', []));\n return redirect('/admin/grade')\n ->withSuccess(\"分级 '$grade->grade' 创建成功\");\n }", "public function run()\n {\n DB::table('jobs')->insert([\n [\n 'job_id' => 1,\n 'job_name' => 'ASN/Honorer',\n ],\n [\n 'job_id' => 2,\n 'job_name' => 'Swasta/Karyawan',\n ],\n [\n 'job_id' => 3,\n 'job_name' => 'Wirausaha/Wiraswasta',\n ],\n ]);\n }", "public function addToDb()\n {\n\n // make sure this is a valid new entry\n if ($this->isValid()) {\n // check for duplicate\n $vals = sprintf(\"('%s',%d)\",$this->email,$this->level);\n $sql = \" insert into Admins values $vals\";\n Dbc::getReader()->Exec($sql);\n }\n else\n print \"<br> Invalid entry. STOP! ($sql)<br>\";\n }", "public function run()\n {\n\n $badgesData = [\n [\n 'course_id' => 1,\n 'name' => 'badge_example',\n 'image' => '/students/badges/badge_example.png',\n 'xp' => 1\n ]\n ];\n\n DB::table('badges')->insert($badgesData);\n }", "public function insert_education_details($data,$uid){\n\t\t\t\t$course_name \t\t= $data['course_name'];\n\t\t\t\t$study_duration = $data['study_duration'];\n\t\t\t\t$specilizatio = $data['specilization'];\n\t\t\t\t$universit = $data['university'];\n\t\t\t\t$degree_type = $data['degree_type'];\n\t\t\t\t$passing_ye = $data['passing_year'];\n\t\t\t\t$study_typ = $data['study_type'];\n \t\n\t $query = \"INSERT INTO `education`(`course_name`, `study_duration`, `specilization`, `university`, `degree_type`, `passing_year`,`study_type`,`uid`)VALUES('$course_name','$study_duration','$specilization',\n\t '$university','$degree_type','$passing_year','$study_type',$uid)\";\n\t $result = mysql_query($query);\n\t if($result){\n\t\t\theader('location:preffered_job.php');\n\t }\n\t else\n\t {\n\t\t\tdie('can not insert'.mysql_error());\n\t }\n\t}", "public function run()\n {\n DB::table('grades')->insert([\n 'test_name' => 'Assessment Exam',\n 'best_grade' => 7.5\n ]);\n DB::table('grades')->insert([\n 'test_name' => 'Written Exam',\n 'best_grade' => 6.1\n ]);\n DB::table('grades')->insert([\n 'test_name' => 'Case Study Exam',\n 'best_grade' => 8.0\n ]);\n DB::table('grades')->insert([\n 'test_name' => 'Case Study',\n 'best_grade' => 6.3\n ]);\n DB::table('grades')->insert([\n 'test_name' => 'Project',\n 'best_grade' => 6.1\n ]);\n DB::table('grades')->insert([\n 'test_name' => 'Portfolio Exam',\n 'best_grade' => 7.5\n ]);\n DB::table('grades')->insert([\n 'test_name' => '2 Portfolio Exams',\n 'best_grade' => 6.7\n ]);\n DB::table('grades')->insert([\n 'test_name' => 'Case study',\n 'best_grade' => 5.9\n ]);\n DB::table('grades')->insert([\n 'test_name' => 'Assessment',\n 'best_grade' => 8.0\n ]);\n DB::table('grades')->insert([\n 'test_name' => 'Portfolio Exam',\n 'best_grade' => 0.0\n ]);\n DB::table('grades')->insert([\n 'test_name' => '2 Written Exams',\n 'best_grade' => 7.0\n ]);\n DB::table('grades')->insert([\n 'test_name' => 'Portfolio Exam',\n ]);\n DB::table('grades')->insert([\n 'test_name' => 'Portfolio Exam',\n ]);\n DB::table('grades')->insert([\n 'test_name' => 'Portfolio Exam',\n ]);\n DB::table('grades')->insert([\n 'test_name' => '2 Written Exams',\n ]);\n DB::table('grades')->insert([\n 'test_name' => 'Portfolio',\n ]);\n DB::table('grades')->insert([\n 'test_name' => 'Portfolio',\n ]);\n }", "public function test_update_grade_item() {\n\n $testarray = $this->csv_load($this->oktext);\n $testobject = new phpunit_gradeimport_csv_load_data();\n\n // We're not using scales so no to this option.\n $verbosescales = 0;\n // Map and key are to retrieve the grade_item that we are updating.\n $map = array(1);\n $key = 0;\n // We return the new grade array for saving.\n $newgrades = $testobject->test_update_grade_item($this->courseid, $map, $key, $verbosescales, $testarray[0][6]);\n\n $expectedresult = array();\n $expectedresult[0] = new stdClass();\n $expectedresult[0]->itemid = 1;\n $expectedresult[0]->finalgrade = $testarray[0][6];\n\n $this->assertEquals($newgrades, $expectedresult);\n\n // Try sending a bad grade value (A letter instead of a float / int).\n $newgrades = $testobject->test_update_grade_item($this->courseid, $map, $key, $verbosescales, 'A');\n // The $newgrades variable should be null.\n $this->assertNull($newgrades);\n $expectederrormessage = get_string('badgrade', 'grades');\n // Check that the error message is what we expect.\n $gradebookerrors = $testobject->get_gradebookerrors();\n $this->assertEquals($expectederrormessage, $gradebookerrors[0]);\n }", "public function save() {\n $db = Db::instance();\n // omit id and any timestamps\n $db_properties = array(\n 'author_id' => $this->author_id,\n 'clothingname' => $this->clothingname,\n 'clothingtype' => $this->clothingtype,\n 'tempmin' => $this->tempmin,\n 'tempmax' => $this->tempmax\n );\n $db->store($this, __CLASS__, self::DB_TABLE, $db_properties);\n }", "function completestatus($assid, $studentid, $marks, $percentage, $lettergrade, $datesubmitted, $date, $tid){\n\t\t\t$strQuery=\"insert into completed_assignments set aid='$assid', stid = '$studentid', marks ='$marks', percentage='$percentage', lettergrade ='$lettergrade', date_submitted='$datesubmitted', sdate='$date',tid='$tid'\";\n\t\t\t$result = $this->query($strQuery);\n\t}", "public function save()\n\t{\n\t\t$date = datetime_to_string($this->date);\n\t\t$grades = array_to_csv($this->grades);\n\t\t\n\t\t// Establish DB connection.\n\t\t$dbh = (new DatabaseConnection())->connect();\n\t\t\n\t\t// Prepare and execute query.\n\t\t// Add.\n\t\tif (is_null($this->id)) {\n\t\t\t$stmt = $dbh->prepare('INSERT INTO ' . self::DB_TABLE . ' (challenge_id, date, title, description, author, repository, license, grades, winner) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)');\n\t\t\t$success = $stmt->execute(array($this->challengeId, $date, $this->title, $this->description, $this->author, $this->repository, $this->license, $grades, $this->winner));\n\t\t}\n\t\t// Edit.\n\t\telse {\n\t\t\t$stmt = $dbh->prepare('UPDATE ' . self::DB_TABLE . ' SET challenge_id = ?, date = ?, title = ?, description = ?, author = ?, repository = ?, license = ?, grades = ?, winner = ? WHERE ' . self::DB_PRIMARY_KEY . ' = ?');\n\t\t\t$success = $stmt->execute(array($this->challengeId, $date, $this->title, $this->description, $this->author, $this->repository, $this->license, $grades, $this->winner, $this->id));\n\t\t}\n\t\t\n\t\t// Close connection.\n\t\t$dbh = null;\n\t\t\n\t\treturn $success;\n\t}", "public function run()\n {\n $now = Carbon::now();\n Job::insert([\n [\n \"title\" => \"Sales Manager\",\n \"summary\" => \"Sales Manager with 10yrs experience in FCMG field\",\n \"expiryDate\" => \"08/01/2019\",\n \"salary\"=> \"6.5 - 10Million p/a\",\n \"additionalCompetencies\" => \"Finance\",\n \"guideline\" => \"n/a\",\n \"published\" => true,\n \"responsibilities\" => \"You will lead a team of 5 sales associate\",\n \"experience\" => \"at least 3yrs post grauduate experience\",\n \"location\" => \"Abuja\",\n \"description\" => \"this is a sample description\",\n \"jobType_id\" => \"1\",\n \"spec_id\" => \"5\",\n 'updated_at' => $now,\n 'created_at' => $now,\n 'user_id' => 11\n ],[\n \"title\" => \"Chemistry Teacher\",\n \"summary\" => \"A Knowledgeable and vibrant Chemistry teacher for our senior secondary class\",\n \"expiryDate\" => \"07/01/2019\",\n \"salary\" => \"1.5 - 2Million p/a\",\n \"additionalCompetencies\" => \"Ability to teach at least one other science subject\",\n \"guideline\" => \"n/a\",\n \"published\" => true,\n \"responsibilities\" => \"Teach chemistry to ss1-ss3 students, Organize practical classes for ss3 students\",\n \"experience\" => \"at least 3yrs post grauduate experience\",\n \"location\" => \"Lagos\",\n \"description\" => \"this is a sample description\",\n \"jobType_id\" => \"1\",\n \"spec_id\" => \"1\",\n 'updated_at' => $now,\n 'created_at' => $now,\n 'user_id' => 11\n ],\n [\n \"title\" => \"Senior backend Developer\",\n \"summary\" => \"Software developer competent in Golang, C# and at least on scripting language: python preferred\",\n \"expiryDate\" => \"07/07/2019\",\n \"salary\" => \"5.5 - 10Million p/a\",\n \"additionalCompetencies\" => \"5 years experience in Java\",\n \"guideline\" => \"n/a\",\n \"published\" => true,\n \"responsibilities\" => \"You will lead a team of 5 junior devs\",\n \"experience\" => \"5 years experience in c#\",\n \"location\" => \"Lagos\",\n \"description\" => \"this is a sample description\",\n \"jobType_id\" => \"1\",\n \"spec_id\" => \"2\",\n 'updated_at' => $now,\n 'created_at' => $now,\n 'user_id' => 11\n ],[\n \"title\" => \"Frontend Developer\",\n \"summary\" => \"Software developer competent in one of React/Angular/Vue\",\n \"expiryDate\" => \"06/30/2019\",\n \"salary\" => \"3.5 - 5Million p/a\",\n \"additionalCompetencies\" => \"2 years experience in UI/UX\",\n \"guideline\" => \"n/a\",\n \"published\" => true,\n \"responsibilities\" => \"You implement mockups\",\n \"experience\" => \"3years experience in working with SPAs\",\n \"location\" => \"Lagos\",\n \"description\" => \"this is a sample description\",\n \"jobType_id\" => \"1\",\n \"spec_id\" => \"2\",\n 'updated_at' => $now,\n 'created_at' => $now,\n 'user_id' => 11\n ],[\n \"title\" => \"Social Media Executive\",\n \"summary\" => \"Proficient in Email Marketing, Social media Marketing and pushing our brand on multiple social media platforms\",\n \"expiryDate\" => \"08/01/2019\",\n \"salary\" => \"1.2 - 1.5Million p/a\",\n \"additionalCompetencies\" => \"Knowlege of search engine optimization will be an added advantage\",\n \"guideline\" => \"n/a\",\n \"published\" => true,\n \"responsibilities\" => \"You will be in charge of all how social media platform. You will market our services through social media to reach our target audience\",\n \"experience\" => \"minimum 2yrs prior experience\",\n \"location\" => \"Oyo\",\n \"description\" => \"this is a sample description\",\n \"jobType_id\" => \"1\",\n \"spec_id\" => \"9\",\n 'updated_at' => $now,\n 'created_at' => $now,\n 'user_id' => 11\n ],[\n \"title\" => \"DevOps Engineer\",\n \"summary\" => \"DevOps engineer with 4yrs experience working with AWS/GCP, Kubernettes, Ansible, and other automation and web scripting tools.\",\n \"expiryDate\" => \"07/08/2019\",\n \"salary\" => \"8.5 - 15Million p/a\",\n \"additionalCompetencies\" => \"GCP/AZURE. At least 2 out of Python, Golang, Ruby and Java \",\n \"guideline\" => \"n/a\",\n \"published\" => true,\n \"responsibilities\" => \"Ensure 99.99% up-time of all our apps\",\n \"experience\" => \"4years experience in working in a devOps capacity\",\n \"location\" => \"Lagos\",\n \"description\" => \"this is a sample description\",\n \"jobType_id\" => \"1\",\n \"spec_id\" => \"2\",\n 'updated_at' => $now,\n 'created_at' => $now,\n 'user_id' => 11\n ]\n\n ]);\n }", "public function academicprogressCoursesInsert($lintidreg,$academicprogressID,$landscapeID,$programID,$studentdetails,$userId) {\r\n $db = Zend_Db_Table::getDefaultAdapter();\r\n //$tableNAme = 'tbl_academicprogress_subjects';\r\n //$Year_Level_Block = ''; \r\n \r\n // check all DUMMY SEMESTERS and their subjects for the student. This will be listed in registered courses listing.\r\n $this->fninsertDummySubjects($lintidreg,$academicprogressID,$landscapeID,$programID,$studentdetails,$userId); \r\n \r\n // COUNT the latest sem for the STUDENT\r\n $sqlTotalSem = $db->select()\r\n ->from(array('totstudsem' => 'tbl_studentsemesterstatus'),array('totstudsem.*')) \r\n ->where('totstudsem.IdStudentRegistration = ?',$lintidreg); \r\n $resultTotalSem = $db->fetchAll($sqlTotalSem);\r\n $finalTotal = count($resultTotalSem);\r\n //die;\r\n \r\n //CHECK FOR ALL \"CT\" SUBJECTS and are not \"DUMMY\", will be listed in registered course listing.\r\n $this->fninsertCTSubjects($lintidreg,$academicprogressID,$landscapeID,$programID,$studentdetails,$userId); \r\n \r\n \r\n \r\n // from semester status, order by date asc, get the semester list, the first semId will be treated as sem1, next id will be sem2, ...\r\n $this->fninsertSemesterSubjects($lintidreg,$academicprogressID,$landscapeID,$programID,$studentdetails,$userId); \r\n \r\n \r\n \r\n \r\n \r\n // CHECK FOR THE LATEST SEM and check from the landscape, the semester.\r\n $this->fninsertLandscapeSubjects($lintidreg,$academicprogressID,$landscapeID,$programID,$studentdetails,$userId,$finalTotal); \r\n //$currentDate = date('Y-m-d'); \r\n \r\n \r\n \r\n \r\n \r\n }", "public function save(stdClass $grade, stdClass $data) {\n global $DB;\n $feedbackentry = $this->get_feedback_entry($grade->id);\n\n if ($data->helixfeedback_activated != 1) {\n return true;\n }\n\n if ($feedbackentry) {\n /***Nothing needs to change in the DB for an update since the only change is on the HML server, so just return true***/\n return true;\n } else {\n $feedbackentry = new stdClass();\n $feedbackentry->grade = $grade->id;\n $feedbackentry->assignment = $this->assignment->get_instance()->id;\n $prerec = $DB->get_record('helixmedia_pre', array('id' => $data->helixfeedback_preid));\n $feedbackentry->preid = $prerec->id;\n $feedbackentry->servicesalt = $prerec->servicesalt;\n return $DB->insert_record('assignfeedback_helixfeedback', $feedbackentry) > 0;\n }\n }", "public function run()\n {\n DB::table('all_deskjobs')->insert([\n 'deskjob' => \"Algemeen\",\n ]);\n }", "public function insert_into_table(){\n // VALUES ('$this->item_id', '$this->user_id', '$this->project_id', '$this->user2_id', '$this->post_id', '$this->type', '$this->activity', '$this->date_time')\";\n $query = \"INSERT INTO $this->table_name (item_id, user_id, project_id, user2_id, post_id, post_type, date_time) \n VALUES ('$this->item_id', '$this->user_id', '$this->project_id', '$this->user2_id', '$this->post_id', '$this->type', '$this->date_time')\";\n $result = mysql_query($query);\n\n $err = mysql_error();\n if($err){\n $file = 'errors.txt';\n file_put_contents($file, $err, FILE_APPEND | LOCK_EX);\n }\n }", "function dataform_update_grades($data=null, $userid=0, $nullifnone=true, $grades=null) {\n global $CFG, $DB;\n require_once(\"$CFG->libdir/gradelib.php\");\n\n if ($data != null) {\n if ($data->grade) {\n if ($grades or $grades = dataform_get_user_grades($data, $userid)) {\n dataform_grade_item_update($data, $grades);\n\n } else if ($userid and $nullifnone) {\n $grade = new object();\n $grade->userid = $userid;\n $grade->rawgrade = NULL;\n dataform_grade_item_update($data, $grade);\n\n } else {\n dataform_grade_item_update($data);\n }\n } else {\n dataform_grade_item_delete($data);\n }\n }\n}", "public function exportGrades() {\n\t\tif (Input::get('exportgrade')) {\n\t\t\t$this->data['subjcode'] = Input::get('subjcode');\n\t\t\t$this->data['section'] = Input::get('section');\n\n\t\t\t$data = $this->model->getStudentsBySection($this->data);\n\t\t\t$data['meta']['date'] = date('F d, Y');\n\n\t\t\tExcel::create(trim($data['meta']['subjcode']) . '-' . $data['meta']['section'], function($excel) use ($data) {\n\t\t\t\t// Creating the worksheet\n\t\t\t $excel->sheet('New sheet', function($sheet) use ($data) {\n\t\t\t\t\t$sheet->setPageMargin(0.5, 0.75, 0.5, 0.75);\n\t\t\t\t\t$sheet->setFitToPage(false);\n\t\t\t\t\t$sheet->setStyle(array(\n\t\t\t\t\t\t'font' => array(\n\t\t\t\t\t\t\t'size'\t=> 10,\n\t\t\t\t\t\t\t'name'\t=> 'Calibri'\n\t\t\t\t\t\t)\n\t\t\t\t\t));\n\t\t\t\t\t$sheet->cell('A1', function($cell) {\n\t\t\t\t\t\t$cell->setFont(array(\n\t\t\t\t\t\t\t\t'size' => 10,\n\t\t\t\t\t\t\t\t'name' => 'Rockwell',\n\t\t\t\t\t\t\t\t'bold' => true\n\t\t\t\t\t\t));\n\t\t\t\t\t});\n\t\t\t\t\t$sheet->cell('A5', function($cell) {\n\t\t\t\t\t\t$cell->setFont(array(\n\t\t\t\t\t\t\t\t'size' => 10,\n\t\t\t\t\t\t\t\t'name' => 'Rockwell',\n\t\t\t\t\t\t\t\t'bold' => true\n\t\t\t\t\t\t));\n\t\t\t\t\t});\n\t\t\t\t\t$sheet->setColumnFormat(array('B' => '000000', 'D' => '0.0', 'E' => '0.0', 'F' => '0.0', 'G' => '0.0'));\n\t\t\t\t\t$sheet->setWidth(array('A' => 3.5, 'B' => 10, 'C' => 34, 'D' => 10, 'E' => 10, 'F' => 10, 'G' => 10, 'H' => 10));\n\n\t\t\t $sheet->loadView('grades')->with('data', $data);\n\t\t\t })->export('xlsx');\n\t\t\t});\n\t\t}\n\t}", "public function store(CreateGradeRequest $request)\n {\n $this->gradeService->store($request);\n return redirect()->route('grades.index');\n }", "private function insertTests()\n {\n $dbh = DatabaseConnection::getInstance();\n $stmtHandle = $dbh->prepare(\n \"INSERT INTO `APTestPassed`(`wNumber`, `apTestID`) \n VALUES (:wNumber, :testId)\");\n\n // Insert all the passed ap test associated with this student into the database\n $passed_tests = $this->getApTests();\n foreach ($passed_tests as &$testName) {\n $test_id = $this->getApTestId($testName);\n $stmtHandle->bindValue(\":wNumber\", $this->getWNumber());\n $stmtHandle->bindValue(\":testId\", $test_id);\n $stmtHandle->execute();\n }\n }", "public function store(Request $request)\n {\n // // dd($request);\n // $this->validate($request, [\n // 'name' => 'required|unique:grades',\n // 'teacher_id' => ['required',\n // Rule::notIn(['0'])],\n // ]);\n // $newGrade = $request->all();\n //\n // $grade = Grade::create($newGrade);\n //\n // return redirect()->back()\n // ->with('flash_message', 'New grade '.$grade['name'].' successfully added!');\n }", "public function store()\n {\n $this->link = mysqli_connect(DBSERVER, DBUSER, DBPASS, DBNAME);\n foreach ($this->dataArray as $item)\n {\n //break up X-MRID field and convert array vals to integer\n $msgInfo = array_map('intval', explode('.',$item[23]));\n $deliv = strtotime($item[1]);\n $queued = strtotime($item[2]);\n if(isset($msgInfo[1]))\n {\n mysqli_query($this->link, \"INSERT INTO bounces (delivered, queued, recipient, dsnstatus, bouncereason, acctid, contactid, msgid, seqid) VALUES ('$deliv','$queued','$item[4]','$item[7]','$item[8]','$msgInfo[1]','$msgInfo[2]','$msgInfo[4]','$msgInfo[5]')\");\n }\n }\n }", "public function run()\n {\n\n $enrollments = Enrollment::where('user_id', 3)->get();\n\n foreach ($enrollments as $enrollment){\n foreach ($enrollment->course->modules as $module){\n foreach ($module->lessons as $lesson){\n $lessonGrade = new LessonGrade();\n $lessonGrade->lesson_id = $lesson->id;\n $lessonGrade->enrollment_id = $enrollment->id;\n $lessonGrade->grade = rand(45, 100);\n $lessonGrade->save();\n }\n }\n }\n\n// $enrollments = Enrollment::where('user_id', 2)->get();\n//\n// foreach ($enrollments as $enrollment){\n// foreach ($enrollment->course->modules as $module){\n// foreach ($module->lessons as $lesson){\n//\n// $lessonGrade = new LessonGrade();\n// $lessonGrade->lesson_id = $lesson->id;\n// $lessonGrade->enrollment_id = $enrollment->id;\n// $lessonGrade->grade = rand(50, 100);\n// $lessonGrade->save();\n//\n// }\n// }\n// }\n\n }", "function game_save_best_score($game) {\n global $DB, $USER;\n\n // Get all the attempts made by the user\n if (!$attempts = game_get_user_attempts( $game->id, $USER->id)) {\n print_error( 'Could not find any user attempts');\n }\n\n // Calculate the best grade\n $bestscore = game_calculate_best_score( $game, $attempts);\n\n // Save the best grade in the database\n if ($grade = $DB->get_record('game_grades', array( 'gameid' => $game->id, 'userid' => $USER->id))) {\n $grade->score = $bestscore;\n $grade->timemodified = time();\n if (!$DB->update_record('game_grades', $grade)) {\n print_error('Could not update best grade');\n }\n } else {\n $grade->gameid = $game->id;\n $grade->userid = $USER->id;\n $grade->score = $bestscore;\n $grade->timemodified = time();\n if (!$DB->insert_record( 'game_grades', $grade)) {\n print_error( 'Could not insert new best grade');\n }\n }\n\n return true;\n}", "public function run()\n {\n DB::table('producers')->insert(array(\n 'company' => 'Universal'\n ));\n\n DB::table('producers')->insert(array(\n 'company' => 'Walt Disney'\n ));\n\n DB::table('producers')->insert(array(\n 'company' => 'Marvel'\n ));\n\n DB::table('producers')->insert(array(\n 'company' => 'DreamWorks'\n ));\n }", "public function insertItem($data)\r\n\t{\r\n\t\t$db\t= JFactory::getDBO();\r\n \r\n $user = JFactory::getUser();\r\n $userid = $user->get('id');\r\n\t\t\r\n\t\t// try to find the leaderboard\r\n\t\t$query = $db->getQuery(true);\r\n\t\t$query->select('*');\r\n\t\t$query->from('#__bootcamp_leaderboards');\r\n\t\t$query->where('leaderboard_name='.$db->Quote($data['leaderboard_name']));\r\n\t\t$db->setQuery($query);\r\n\t\t$leaderboardInfo = $db->loadObject();\r\n \r\n // try to find the match\r\n $query->select('*');\r\n\t\t$query->from('#__bootcamp_leaderboards_matches');\r\n\t\t$query->where('match_id='.$db->Quote($data['match_id']));\r\n\t\t$db->setQuery($query);\r\n\t\t$matchInfo = $db->loadObject();\r\n \r\n // try to find the team\r\n $query->select('*');\r\n\t\t$query->from('#__bootcamp_leaderboards_teams');\r\n\t\t$query->where('team_id='.$db->Quote($data['team_id']));\r\n\t\t$db->setQuery($query);\r\n\t\t$teamInfo = $db->loadObject();\r\n \r\n // try to find the team member\r\n $query->select('*');\r\n\t\t$query->from('#__comprofiler');\r\n\t\t$query->where('user_id='.$db->Quote($data['user_id']));\r\n\t\t$db->setQuery($query);\r\n\t\t$userInfo = $db->loadObject();\r\n\t\t\r\n //create and fill a new stdclass with the \r\n //form info ready to be sent to the DB\r\n\t\t$results =new stdClass();\r\n\t\t$results->result_id = NULL;\r\n $results->result_name = $matchInfo['match_name'];\r\n $results->result_leaderboard = $leaderboardInfo['leaderboard_id'];\r\n\t\t$results->result_date = date(\"j-n-Y\");\r\n\t\t$results->result_team = $teamInfo['team_id'];\r\n\t\t$results->result_team_member = $userInfo['user_id'];\r\n\t\t$results->result_match = $matchInfo['match_id'];\r\n $results->result_damage = $data['damage'];\r\n $results->result_healing = $data['healing'];\r\n $results->result_kills = $data['kills'];\r\n $results->result_deaths = $data['deaths'];\r\n $results->result_points = $data['points'];\r\n\t\t$results->result_createdby = $userid;\r\n\r\n //get DB Object to initialize DB Connection\r\n\t\t$db = JFactory::getDBO();\r\n //insert the new record into the table\r\n\t\t$db->insertObject('#__bootcamp_leaderboards_results', $results);\r\n \r\n class matchresults \r\n {\r\n public $match_id;\r\n public $match_result_screenshot;\r\n public $match_notes;\r\n public $match_issues;\r\n public $match_state;\r\n }\r\n class comprofilerstuff\r\n {\r\n public $user_id;\r\n public $cb_tm_points;\r\n public $cb_lt_points;\r\n }\r\n\t\t\r\n $matchresults = new matchresults();\r\n $matchresults->match_id = $matchInfo['match_id'];\r\n $matchresults->match_notes = $data['result_notes'];\r\n $matchresults->match_issues = $data['result_issues'];\r\n $matchresults->match_result_screenshot = $data['result_screenshot'];\r\n $matchresults->match_state = $data['result_matchstate'];\r\n \r\n //assign the user id to a variable\r\n $resultuser = $userInfo['user_id'];\r\n \r\n //get current points earned this month from the Community Builder Table\r\n $query = \"SELECT cb_tm_points FROM #__comprofiler WHERE user_id=\".$resultuser;\r\n \r\n //assigns those points to a new variable\r\n $currenttmpts = $db->setQuery($query);\r\n //adds current value to the existing value as a new variable\r\n $totaltmpts = $currenttmpts + $data['points'];\r\n \r\n //get current points earned over the user's lifetime from the Community Builder Table\r\n $query = \"SELECT cb_lt_points FROM #__comprofiler WHERE user_id=\".$resultuser;\r\n \r\n //assigns these points to a new variable\r\n $currentltpts = $db->setQuery($query);\r\n //adds current value to the existing value as a new variable\r\n $totalltpts = $currentltpts + $data['points'];\r\n \r\n $comprofilerstuff = new comprofilerstuff();\r\n $comprofilerstuff->user_id = $resultuser;\r\n $comprofilerstuff->cb_lt_points = $totalltpts;\r\n $comprofilerstuff->cb_tm_points = $totaltmpts;\r\n \r\n $db->updateObject('#__bootcamp_leaderboards_matches', $matchresults, 'match_id', true);\r\n $db->updateObject('#__comprofiler', $comprofilerstuff, 'user_id', false);\r\n \r\n\t\tif ($db->getErrorMsg()) \r\n\t\t{\r\n\t\t\tJError::raiseError(500, $db->getErrorMsg());\r\n\t\t\treturn false;\r\n\t\t}\r\n \r\n \r\n \r\n \r\n //update the Community Builder Table with the new values\r\n $query = \" UPDATE #_comprofiler \r\n SET cb_tm_points ='.$totaltmpts.'\r\n SET cb_lt_points ='.$totalltpts.'\r\n WHERE user_id='.$resultuser.'\";\r\n \r\n \r\n if ($db->getErrorMsg())\r\n {\r\n JError::raiseError(500, $db->getErrorMsg());\r\n return false;\r\n }\r\n \r\n\t\t$params = JComponentHelper::getParams( 'com_bootcampleaderboards' ); \r\n\t\t\r\n\t\treturn true;\r\n\t}", "public function run()\n {\n DB::table('students')->insert([\n \t'first_name'=> 'Sarah'\n \t'last_name'=> 'Pangan'\n \t'program'=> 'BSIS'\n \t'Age'=> '19'\n \t]);\n }", "public function store()\n\t{\n\t\t$validator = Validator::make($data = Input::all(), Grade::$rules);\n\n\t\tif ($validator->fails())\n\t\t{\n\t\t\t//return Redirect::back()->withErrors($validator)->withInput();\n\t\t\t//return array('error' => '')\n\t\t\t$messages = $validator->messages();\n\t\t\treturn array('error' => $messages->first());\n\t\t}\n\n\t\t$grade = Grade::create($data);\n\n\t\treturn $grade;\n\t}", "public function run()\n {\n DB::table('exams')->delete();\n DB::table('exams')->insert(array(\n array(\n 'exam_name' => 'html',\n 'exam_description' => 'this is description for html',\n 'exam_slug' => 'html',\n 'final_score' => 100,\n 'pass_score' => 50\n ),\n array(\n 'exam_name' => 'css',\n 'exam_description' => 'this is description for css',\n 'exam_slug' => 'css',\n 'final_score' => 100,\n 'pass_score' => 50\n ),\n ));\n }", "private function fixGrades( Submission $submission ) {\n\t\tif( $submission->getStateID() == '' ) {\n\t\t\t$this->output->writeln( sprintf( '<fg=red>Submission ID: %d does not have a State ID. So grades were entered in wrong.</fg=red>' , $submission->getId() ) );\n\t\t\treturn;\n\t\t}\n\n\t\t$iNowGrades = $this->getContainer()->get('doctrine')->getRepository('IIABMagnetBundle:StudentGrade')->findGradesByStateID( $submission->getStateID() );\n\n\t\tif( count( $iNowGrades ) == 0 ) {\n\t\t\t$this->output->writeln( sprintf( '<fg=red>Submission ID: %d does not have any grades in iNow</fg=red>' , $submission->getId() ) );\n\t\t\treturn;\n\t\t}\n\n\t\t/** @var \\IIAB\\MagnetBundle\\Entity\\SubmissionGrade $grade */\n\t\tforeach( $submission->getGrades() as $grade ) {\n\n\t\t\t$submission->removeGrade( $grade );\n\n\t\t\t$this->getContainer()->get('doctrine')->getManager()->remove( $grade );\n\t\t}\n\n\t\t$this->output->writeln( sprintf( '<fg=green>Submission ID: %d removed old grades.</fg=green>' , $submission->getId() ) );\n\n\t\t/** @var \\IIAB\\MagnetBundle\\Entity\\StudentGrade $grade */\n\t\tforeach( $iNowGrades as $grade ) {\n\n\t\t\t$submissionGrade = new SubmissionGrade();\n\t\t\t$submissionGrade->setAcademicYear( $grade->getAcademicYear() );\n\t\t\t$submissionGrade->setAcademicTerm( $grade->getAcademicTerm() );\n\t\t\t$submissionGrade->setCourseTypeID( $grade->getCourseTypeID() );\n\t\t\t$submissionGrade->setCourseType( $grade->getCourseType() );\n\t\t\t$submissionGrade->setCourseName( $grade->getCourseName() );\n\t\t\t$submissionGrade->setSectionNumber( $grade->getSectionNumber() );\n\t\t\t$submissionGrade->setNumericGrade( $grade->getNumericGrade() );\n\n\t\t\t$submission->addGrade( $submissionGrade );\n\n\t\t\t$this->getContainer()->get('doctrine')->getManager()->persist( $submissionGrade );\n\n\t\t}\n\n\t\t$this->getContainer()->get('doctrine')->getManager()->flush();\n\t\t$this->output->writeln( sprintf( '<fg=green>Submission ID: %d grades were updated.</fg=green>' , $submission->getId() ) );\n\n\t}", "function SaveGame($idPlayer, $IndividualScore)\n{\n $dbh = ConnectDB();\n $req = $dbh->query(\"INSERT INTO fishermenland.history (ScoreHistory, fkPlayerHistory) VALUES ('$IndividualScore','$idPlayer')\");\n}", "public function insert_save_jobs($id,$sesid){\n\t\t$query = \"INSERT INTO `save_jobs`(`pjid`, `uid`) VALUES('$id','$sesid')\";\n\t\t$result = mysql_query($query);\n\t\tif($result){\n\t\t\theader(\"location:view_post_jobs_more_details.php?id=$id\");\n\t\t}else{\n\t\t\tdie('can not update'.mysql_error());\n\t\t}\n\t}", "function insert_instructor_profile($data)\n {\n $this->db->insert('tbl_instructor_profile',$data);\n //echo $this->db->last_query();\n }", "function SaveJob($jobid, $jobseekerid)\n {\n\n global $db;\n $DBC=$db::dbconnect();\n $sql=$DBC->prepare(\"INSERT INTO `saved_job` (`job_id`, `jobseeker_id`) VALUES (?, ?)\");\n $sql->bind_param(\"ii\", $jobid,$jobseekerid);\n $sql->execute();\n $insertId=$sql->insert_id;\n return $insertId;\n }", "protected /*void*/ function setGrade(/*int*/ $aid, /*int*/ $sid, /*int*/ $grade)\n\t{\n\t\tif(!$this->validateGrade($grade))\n\t\t\tthrow new GradeFormatException();\n\n\t\t$query = $this->db->prepare(\"\n\t\t\tREPLACE INTO `grades` (\n\t\t\t\t`assignmentid`,\n\t\t\t\t`studentid`,\n\t\t\t\t`grade`\n\t\t\t) VALUES (\n\t\t\t\t:aid,\n\t\t\t\t:sid,\n\t\t\t\t:grade\n\t\t\t);\n\t\t\")->execute(array(\n\t\t\t':aid' => $aid,\n\t\t\t':sid' => $sid,\n\t\t\t':grade' => $grade\n\t\t));\n\t}", "public function store(Request $request)\n {\n\n $grade = Grade::create($request->all());\n Notification::send(User::where('id',$grade->student_id)->get(), new NewGrade('Nota', route('grades.show', $grade->id), 'fas fa-hand-holding-usd', 'Sua nota em '.$grade->team_id.' foi cadastrada'));\n return redirect()->route('grades.index',$grade->team_id)->with('success', true);\n }", "public function storepropevaluation() {\n \n /* Check whether 1st tab is opened or not by getting its id, if its null then this tab is not opened */\n /* and check for the studnt's status, present or absent*/\n if (Request::get('cmntmem0') != null && Input::get('statustab1') != \"Absent\") {\n \n /* if evaluation marks table doesn't contain a perticular student's id,\n * then that id will add as a new tuple with other necessary details */\n if (!(EvaluationMarks::where('stuid', '=', Request::get('cmntmem0'))->exists())) {\n EvaluationMarks::create([\n 'stugrpid' => Input::get('selectid'),\n 'stuid' => Request::get('cmntmem0')\n ]);\n }\n \n /* if student's id is in the table alredy then these data will update that tuple */\n EvaluationMarks::where('stuid', Request::get('cmntmem0'))\n ->update([\n 'proposalpresent' => Request::get('marksforproposalpresenttab1'),\n 'status' => Input::get('statustab1'),\n 'total' => Request::get('marksforproposalpresenttab1'),\n 'completedassesment' => 'proposalprsent'\n ]);\n }\n\n if (Request::get('cmntmem1') != null && Input::get('statustab2') != \"Absent\") {\n if (!(EvaluationMarks::where('stuid', '=', Request::get('cmntmem1'))->exists())) {\n EvaluationMarks::create([\n 'stugrpid' => Input::get('selectid'),\n 'stuid' => Request::get('cmntmem1')\n ]);\n }\n\n EvaluationMarks::where('stuid', Request::get('cmntmem1'))\n ->update([\n 'proposalpresent' => Request::get('marksforproposalpresenttab2'),\n 'status' => Input::get('statustab2'),\n 'total' => Request::get('marksforproposalpresenttab2')\n ]);\n }\n\n if (Request::get('cmntmem2') != null && Input::get('statustab3') != \"Absent\") {\n if (!(EvaluationMarks::where('stuid', '=', Request::get('cmntmem2'))->exists())) {\n EvaluationMarks::create([\n 'stugrpid' => Input::get('selectid'),\n 'stuid' => Request::get('cmntmem2')\n ]);\n }\n\n EvaluationMarks::where('stuid', Request::get('cmntmem2'))\n ->update([\n 'proposalpresent' => Request::get('marksforproposalpresenttab3'),\n 'status' => Input::get('statustab3'),\n 'total' => Request::get('marksforproposalpresenttab3')\n ]);\n }\n\n if (Request::get('cmntmem3') != null && Input::get('statustab4') != \"Absent\") {\n if (!(EvaluationMarks::where('stuid', '=', Request::get('cmntmem3'))->exists())) {\n EvaluationMarks::create([\n 'stugrpid' => Input::get('selectid'),\n 'stuid' => Request::get('cmntmem3')\n ]);\n }\n\n EvaluationMarks::where('stuid', Request::get('cmntmem3'))\n ->update([\n 'proposalpresent' => Request::get('marksforproposalpresenttab4'),\n 'status' => Input::get('statustab4'),\n 'total' => Request::get('marksforproposalpresenttab4')\n ]);\n }\n\n if (Request::get('cmntmem4') != null && Input::get('statustab5') != \"Absent\") {\n if (!(EvaluationMarks::where('stuid', '=', Request::get('cmntmem4'))->exists())) {\n EvaluationMarks::create([\n 'stugrpid' => Input::get('selectid'),\n 'stuid' => Request::get('cmntmem4')\n ]);\n }\n\n EvaluationMarks::where('stuid', Request::get('cmntmem4'))\n ->update([\n 'proposalpresent' => Request::get('marksforproposalpresenttab5'),\n 'status' => Input::get('statustab5'),\n 'total' => Request::get('marksforproposalpresenttab5')\n ]);\n }\n\n return redirect('propevaluation')->with(\"success\", 'Marks Successfully Added!');\n }", "public function studendInsertData($sname,$marks,$class_id)\r\n\r\n {\r\n // // echo $sql;\r\n // // exit();\r\n // $result = $this->connect->query($class_id);\r\n // $row = mysqli_fetch_assoc($result);\r\n\r\n $sql = \"INSERT INTO student_table (class_id,student_name,student_marks)VALUES('\".$class_id.\"','\".$sname.\"','\".$marks.\"')\";\r\n $result = $this->connect->query($sql);\r\n if($result==true){\r\n echo '<script>alert(\"Successfully save\")</script>';\r\n }else{\r\n echo '<script>alert(\"insert data failed \")</script>';\r\n }\r\n }", "public function run()\n {\n DB::table('Students')->insert([\n 'student_name' => 'kim tepbuphata',\n 'gender' => 'male',\n 'contact' => '012345678',\n 'course_id' => 1,\n ]);\n\n DB::table('Students')->insert([\n 'student_name' => 'chea sorall',\n 'gender' => 'male',\n 'contact' => '012345673',\n 'course_id' => 2,\n ]);\n\n DB::table('Students')->insert([\n 'student_name' => 'khov manny',\n 'gender' => 'male',\n 'contact' => '012345671',\n 'course_id' => 3,\n ]);\n }", "function index_g_and_o_insert(){\n\t\t$index_level = $this->input->post(\"index_level\"); // index level of G&O form\n\t\t$index_ranges = $this->input->post(\"index_ranges\"); // indeax range of G&O form\n\t\t$pos_id = $this->input->post(\"pos_id\"); //position id\n\t\t$year_id = $this->input->post(\"year_id\"); //year id\n\n\t\t$this->load->model(\"Da_evs_set_form_g_and_o\",\"dsfg\");\n\n\t\t$this->dsfg->sfg_pos_id = $pos_id;\n\t\t$this->dsfg->sfg_pay_id = $year_id;\n\t\t$this->dsfg->sfg_index_level = $index_level;\n\t\t$this->dsfg->sfg_index_ranges = $index_ranges;\n\t\t$this->dsfg->insert();\n\t\techo json_encode(\"Success by insert\");\n\t}", "public function actionAddscores()\n\t{\n\t\t\n\t\t$model=new ExamScores;\n\n\t\tif(isset($_POST['ExamScores']))\n\t\t{\n\t\t\t\n\t\t\t$list = $_POST['ExamScores'];\n\t\t\t$count = count($list['student_id']);\n\t\t\t\n\t\t\tfor($i=0;$i<$count;$i++)\n\t\t\t{\n\t\t\t\tif($list['marks'][$i]!=NULL or $list['remarks'][$i]!=NULL)\n\t\t\t\t{\n\t\t\t\t\t$exam=Exams::model()->findByAttributes(array('id'=>$list['exam_id']));\n\t\t\t\t\t$model=new ExamScores;\n\t\t\t\t\t\t\n\t\t\t\t\t$model->exam_id = $list['exam_id']; \n\t\t\t\t\t$model->student_id = $list['student_id'][$i];\n\t\t\t\t\t$model->marks = $list['marks'][$i];\n\t\t\t\t\t$model->remarks = $list['remarks'][$i];\n\t\t\t\t\t$model->grading_level_id = $list['grading_level_id'];\n\t\t\t\t\n\t\t\t\t\tif(($list['marks'][$i])< ($exam->minimum_marks)) \n\t\t\t\t\t{\n\t\t\t\t\t\t$model->is_failed = 1;\n\t\t\t\t\t}\n\t\t\t\t\telse \n\t\t\t\t\t{\n\t\t\t\t\t\t$model->is_failed = '';\n\t\t\t\t\t}\n\t\t\t\t\t$model->created_at = $list['created_at'];\n\t\t\t\t\t$model->updated_at = $list['updated_at'];\n\t\t\t\t\t//$model->save();\n\t\t\t\t\tif($model->save())\n\t\t\t\t\t{\n\t\t\t\t\t\t$student = Students::model()->findByAttributes(array('id'=>$model->student_id));\n\t\t\t\t\t\t$student_name = ucfirst($student->first_name).' '.ucfirst($student->middle_name).' '.ucfirst($student->last_name);\n\t\t\t\t\t\t$subject_name = Subjects::model()->findByAttributes(array('id'=>$exam->subject_id));\n\t\t\t\t\t\tif($subject_name!=NULL)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$examgroup = ExamGroups::model()->findByAttributes(array('id'=>$exam->exam_group_id));\n\t\t\t\t\t\t\t$batch = Batches::model()->findByAttributes(array('id'=>$examgroup->batch_id));\n\t\t\t\t\t\t\t$exam = ucfirst($subject_name->name).' - '.ucfirst($examgroup->name).' ('.ucfirst($batch->name).'-'.ucfirst($batch->course123->course_name).')';\n\t\t\t\t\t\t\t$goal_name = $student_name.' for the exam '.$exam;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$goal_name = $student_name;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t//Adding activity to feed via saveFeed($initiator_id,$activity_type,$goal_id,$goal_name,$field_name,$initial_field_value,$new_field_value)\n\t\t\t\t\t\tActivityFeed::model()->saveFeed(Yii::app()->user->Id,'20',$model->id,$goal_name,NULL,NULL,NULL); \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\n\t\t\t\tif($_REQUEST['allexam']==1){\n\t\t\t\t\t$url = 'default/allexam';\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$url = 'default/classexam';\n\t\t\t\t}\n\t\t\t\t$this->redirect(array($url,'bid'=>$_REQUEST['bid'],'exam_group_id'=>$_REQUEST['exam_group_id'],'r_flag'=>$_REQUEST['r_flag'],'exam_id'=>$_REQUEST['exam_id']));\n\t\t }\n\t\t\t\n\t\t$this->render('examination',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t\n\t}", "public function run()\n {\n DB::table('exams')->insert([\n 'classexamname' => 'Final Term',\n 'examstart' => '2019-04-01',\n 'examend' => '2019-04-30',\n ]);\n DB::table('exams')->insert([\n 'classexamname' => 'Mid Term',\n 'examstart' => '2019-08-01',\n 'examend' => '2019-08-30',\n ]); \n }", "public function saveJob(Job $job);", "public function store(Request $request)\n {\n $request->validate([\n 'kelas' => 'required',\n 'jurusan' => 'required'\n ]);\n $profiles = DB::table('profiles')->max('id');\n //Grade::create($request->all());\n $data= new Grade();\n $data->profile_id=$profiles;\n $data->kelas=$request->input('kelas');\n $data->jurusan=$request->input('jurusan');\n $data->save();\n return redirect()->route('profile.index')\n ->with('success', 'kelas dan jurusan berhasil ditambahkan');\n }", "public function insert() {\r\n\r\n\t\ttry {\r\n\t\t\tglobal $ks_db;\r\n\t\t\tglobal $ks_log;\r\n\r\n\t\t\t$ks_db->beginTransaction ();\r\n\t\t\t\r\n\t\t\t$arrBindings = array ();\r\n\t\t\t$insertCols = '';\r\n\t\t\t$insertVals = '';\r\n\t\t\t\r\n\t\t\tif (isset ( $this->userid )) {\r\n\t\t\t\t$insertCols .= \"lp_userid, \";\r\n\t\t\t\t$insertVals .= \"?, \";\r\n\t\t\t\t$arrBindings[] = $this->userid;\r\n\t\t\t}\r\n\t\t\tif (isset ( $this->random )) {\r\n\t\t\t\t$insertCols .= \"lp_random, \";\r\n\t\t\t\t$insertVals .= \"?, \";\r\n\t\t\t\t$arrBindings[] = $this->random;\r\n\t\t\t}\r\n\t\t\tif (isset ( $this->deadline )) {\r\n\t\t\t\t$insertCols .= \"lp_deadline, \";\r\n\t\t\t\t$insertVals .= \"?, \";\r\n\t\t\t\t$arrBindings[] = $this->deadline;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//remove trailing commas\r\n\t\t\t$insertCols = preg_replace(\"/, $/\", \"\", $insertCols);\r\n\t\t\t$insertVals = preg_replace(\"/, $/\", \"\", $insertVals);\r\n\t\t\t\r\n\t\t\t$sql = \"INSERT INTO $this->sqlTable ($insertCols)\";\r\n\t\t\t$sql .= \" VALUES ($insertVals)\";\r\n\t\t\t\r\n\t\t\t$ks_db->query ( $sql, $arrBindings );\r\n\r\n\t\t\t//set the id property\r\n\t\t\t$this->id = $ks_db->lastInsertId();\r\n\t\t\t\r\n\t\t\t$ks_db->commit ();\r\n\t\t\t\r\n\t\t} catch(Exception $e) {\r\n\t\t\t$ks_db->rollBack ();\r\n\t\t\t$ks_log->info ( 'Fatal Error: ' . __CLASS__ . '::' . __METHOD__ . '. ' . $e->getMessage () );\r\n\t\t\t$ks_log->info ( '<br>SQL Statement: ' . $sql);\r\n\t\t\techo \"Fatal Error: \" . __CLASS__ . '::' . __METHOD__ . '. ' . $e->getMessage ();\r\n\t\t\techo \"SQL Statement: \" . $sql;\r\n\t\t}\r\n\t}", "function dataform_upgrade_grades() {\n global $DB;\n\n $sql = \"SELECT COUNT('x')\n FROM {dataform} d, {course_modules} cm, {modules} m\n WHERE m.name='dataform' AND m.id=cm.module AND cm.instance=d.id\";\n $count = $DB->count_records_sql($sql);\n\n $sql = \"SELECT d.*, cm.idnumber AS cmidnumber, d.course AS courseid\n FROM {dataform} d, {course_modules} cm, {modules} m\n WHERE m.name='dataform' AND m.id=cm.module AND cm.instance=d.id\";\n $rs = $DB->get_recordset_sql($sql);\n if ($rs->valid()) {\n // too much debug output\n $pbar = new progress_bar('dataupgradegrades', 500, true);\n $i=0;\n foreach ($rs as $data) {\n $i++;\n upgrade_set_timeout(60*5); // set up timeout, may also abort execution\n dataform_update_grades($data, 0, false);\n $pbar->update($i, $count, \"Updating Dataform grades ($i/$count).\");\n }\n }\n $rs->close();\n}", "private function insert_entry_qual()\n {\n global $DB;\n $params = $this->get_params();\n $this->id = $DB->insert_record('subject', $params);\n }", "public function insert_student($row)\n\t\t{\n\t\t\t$this->conn->insert($this->create_student($row));\n\t\t}", "public function proceed()\n {\n $fieldsValues = new Model_FieldsValues();\n $users = new Users_Model_Users();\n foreach ($users->getUsers() as $user) {\n $profileId = $user->createDefaultProfile($this->_view);\n foreach ($fieldsValues->getForUser($user) as $fieldValue) {\n $fieldValue->profile_id = $profileId;\n $fieldValue->save();\n }\n }\n\n $this->_db->query('ALTER TABLE `fields_values` ADD FOREIGN KEY ( `profile_id` ) REFERENCES `profiles` (`id`) ON DELETE CASCADE');\n }", "function insert_data($cxn,$studentID,$fname,$lname,$points,$team_id) and insert data from new runner in database\n{\n //Check entered data for vulnerabilities\n if ($_SERVER[\"REQUEST_METHOD\"] == \"POST\")\n {\n $fname = test_input($fname);\n $lname = test_input($lname);\n $points = test_input($points);\n $team_id = test_input($team_id);\n }\n\n $query3=\"INSERT INTO runner (student_id, fname, lname, points,team_id) VALUES (\\\"{$studentID}\\\",\\\"{$fname}\\\",\\\"{$lname}\\\",\\\"{$points}\\\",\\\"{$team_id}\\\")\";\n $insert = mysqli_query($cxn, $query3) or die(\"<p class='error'>The new runner can not be saved in the system.<br>Check if you entered all required fields!</p>\");\n if($insert) echo \"<p class='success'>Successfully saved!</p>\"; //when update is successful -> true\n\n}", "public function run()\n {\n DB::table('equity_percentages')->insert([\n [\n 'percentage' => 10.0, \n 'description' => '10-90 scheme', \n 'created_by' => 1, \n 'updated_by' => 1\n ],\n [\n 'percentage' => 15.0,\n 'description' => '15-85 scheme', \n 'created_by' => 1, \n 'updated_by' => 1\n ],\n [\n 'percentage' => 20.0, \n 'description' => '20-80 scheme',\n 'created_by' => 1, \n 'updated_by' => 1\n ]\n ]);\n }", "public function store(Request $request){\n\t\t$this->validate($request, [\n\t\t\t'jobtitle'\t\t=> 'required',\n\t\t\t'description'\t=> 'required',\n\t\t\t'salaryfrom'\t=> 'required',\n\t\t\t'salaryto'\t\t=> 'required',\n\t\t\t'min_exp'\t\t=> 'required',\n\t\t\t'max_exp'\t\t=> 'required',\n\t\t\t'candidatecount'=> 'required',\n\t\t]);\n\n\t\t/*$data['site_code'] = '001';*/\n\t\t$data['user_id']\t = Auth::id();\n\t\t$data['job_title']\t = $request->jobtitle;\n\t\t$data['job_location'] = $request->location;\n\t\t$data['min_exp']\t = $request->min_exp;\n\t\t$data['max_exp']\t = $request->max_exp;\n\t\t$data['job_desc']\t = $request->description;\n\t\t$data['resume_req']\t = $request->resume;\n\t\t$data['sal_min']\t = $request->salaryfrom;\n\t\t$data['sal_max']\t = $request->salaryto;\n\t\t$data['no_of_pos']\t = $request->candidatecount; \n\t\t$data['created_at']\t = date('Y-m-d H:i:s');\n\t\t\n\t\t/*\n\t\t$dates = strtotime($request->closingdate);\n\t\t$cdate = strtotime(date('d-m-Y'));*/\n\n\n\t\tDB::table('job_posts')->insert($data);\n\n\t\treturn redirect()->route('admin.jobs.index')->with('success', 'Posted successfully');\n\t\t\n\t\t/*if (($dates >= $cdate)) {}\n\t\telse\n\t\t{return redirect()->route('admin-post.create')->with('warning', 'Date is less than current value');\n\t\t}*/\t\n\t\t\n\t}", "public function run()\n {\n $degree = Degree::find(1);\n for ($i = 1; $i <= 8; $i++) {\n $user = User::find($i);\n $student = $user->student ?: new Student;\n $graduating = '2015/07/12';\n $student->degree = $degree->id;\n $student->graduating = $graduating;\n $user->student()->save($student);\n }\n\n }", "public function insert_entry()\r\n\t{\r\n\t\t$this->db->insert(\"email_workflow\", $this);\r\n\t}" ]
[ "0.6941419", "0.6906519", "0.6869692", "0.6655187", "0.6618155", "0.65494514", "0.64384466", "0.62312955", "0.62205535", "0.62078834", "0.61688274", "0.6085597", "0.6039224", "0.5905748", "0.5861165", "0.5853976", "0.5703828", "0.5692595", "0.56907314", "0.5648165", "0.56318825", "0.5605997", "0.5602341", "0.5596086", "0.5584384", "0.5568793", "0.55482286", "0.5547229", "0.5538797", "0.5516729", "0.5512694", "0.54867446", "0.5468223", "0.5468205", "0.5451066", "0.5427684", "0.54216987", "0.5409939", "0.5368818", "0.5367355", "0.536418", "0.5358452", "0.53491676", "0.5332466", "0.5319613", "0.53058696", "0.530413", "0.5302638", "0.5302481", "0.5298328", "0.5295079", "0.5287155", "0.5281113", "0.52791834", "0.5269123", "0.52567536", "0.5241394", "0.5216712", "0.52156746", "0.52149266", "0.52142787", "0.52063215", "0.52033377", "0.5188469", "0.51862943", "0.5160977", "0.5152422", "0.5146711", "0.5145219", "0.5143743", "0.5137605", "0.51370424", "0.51344544", "0.5121404", "0.5115472", "0.51117945", "0.5110876", "0.51017964", "0.50956476", "0.50940174", "0.50938517", "0.50900406", "0.50845945", "0.5079605", "0.5078568", "0.507629", "0.50748825", "0.50600564", "0.50574464", "0.5055786", "0.50494254", "0.504865", "0.5048639", "0.50485986", "0.5048049", "0.5043099", "0.5043083", "0.5042255", "0.50341463", "0.50303906" ]
0.6641959
4
Delete job grades data from DB by id.
public function delete($jobCode) { DB::table('job_grades')->where('job_code', $jobCode)->delete(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete_grade() {\r\n\t\t\t$sql = \"DELETE FROM grades WHERE id = $this->id;\";\r\n\t\t\tDatabase::$db->query($sql);\r\n\t\t}", "public function delete($id)\n {\n if (!$result = $this->db->query(\"DELETE from `work_experience` WHERE `id` = '$id'\")) {\n throw new \\mysqli_sql_exception(\"Oops! Something has gone wrong on our end. Error Code: workExpDelete\");\n }\n }", "public function delete($job_id)\r\n {\r\n $this->checkIfDemo();\r\n $this->AdminJobModel->remove($job_id);\r\n }", "public function delete($id)\n {\n $grade = Grade::findOrFail($id);\n $grade->delete();\n\n return redirect()->route('grade');\n }", "public function delete_save_jobs($id){\n\t\t$query = \"DELETE FROM `save_jobs` WHERE `pjid`='$id'\";\n\t\t$result = mysql_query($query);\n\t\tif($result){\n\t\t\theader(\"location:view_save_jobs.php\");\t\t\t\n\t\t}else{\n\t\t\tdie('can not delete'.mysql_error());\n\t\t}\n\t}", "function dataform_grade_item_delete($data) {\n global $CFG;\n require_once(\"$CFG->libdir/gradelib.php\");\n\n return grade_update('mod/dataform', $data->course, 'mod', 'dataform', $data->id, 0, NULL, array('deleted'=>1));\n}", "public function destroy($id)\n\t{\n\t\tGrade::destroy($id);\n\n\t\t//return Redirect::route('grades.index');\n\t\treturn array('info' => 'Grade deleted successfully.');\n\t}", "public function destroy($id)\n {\n $this->gradeService->destroy($id);\n return redirect()->route('grades.index');\n }", "public function deleteJob($id)\n {\n if ($this->admin_m->delete($id))\n {\n $this->session->set_flashdata('success', 'Job Deleted!');\n\n } else {\n $this->session->set_flashdata('failed', 'Failed to delete the job, Try again!');\n\n }\n\n redirect('admin_c');\n }", "public function delete($id)\n {\n JobSeeker::find($id)->delete($id);\n Education::where('jobSeekerId',$id)->delete();\n Experience::where('jobSeekerId',$id)->delete();\n Language::where('jobSeekerId',$id)->delete();\n Technical::where('jobSeekerId',$id)->delete();\n return redirect()->back()->with('success','Job Application Form Deleted Successfully');\n\n }", "public function destroy($id)\n\t{\n\t\tif(!in_array(24, $this->privsArray))\n\t\t\treturn redirect()->back();\n\t\t$job = Job::find($id);\n\t\t$job->quizzes()->detach();\n\t\t$job->delete();\n\t\treturn redirect('jobs');\n\t}", "public function destroy($id)\n { \n $payGrade = PayGrade::find($id);\n $payGrade->delete();\n return response::json($payGrade);\n }", "function delete_by_id($id)\n\t{\n\t\t$delete = \"DELETE FROM courses WHERE id = $id\";\n\t\t// echo $query;\n\t\t$this->db->query($delete);\n\t}", "public function destroy($id)\n {\n $job = JobExperience::find($id);\n $job->delete();\n return redirect(\"/profile\")->with('pesan', 'Data pengalaman kerja berhasil dihapus'); \n }", "public function delete($job);", "public function delete($id)\n {\n MyLogger2::info(\"Enter InterestGroupDataService.delete()\");\n try\n {\n // Build the Query to delete a job from the Database:\n $result = $this->conn->prepare(\"DELETE FROM interest_group WHERE ID =:id\");\n // Bind the query variables with the method variables:\n $result->bindParam(':id', $id);\n // Execute the Query:\n $result->execute();\n\n // Check if result is true:\n if ($result)\n {\n MyLogger2::info(\"Exit InterestGroupDataService.delete() with true\");\n return $id;\n }\n \n MyLogger2::info(\"Exit InterestGroupDataService.delete() with false\");\n return false;\n }\n catch (PDOException $e)\n {\n MyLogger2::error(\"PDOException: \", array(\n \"message\" => $e->getMessage()\n ));\n throw new DatabaseException(\"Database Exception: \" . $e->getMessage(), 0, $e);\n }\n catch (Exception $exc)\n {\n MyLogger2::error(\"Exception: \", array(\n \"message\" => $exc->getMessage()\n ));\n // Throwing Exception with message:\n throw new $exc->getMessage();\n }\n }", "public function delete(){\n\t\t$db = new Database();\n\t\t$sql = \"DELETE FROM reports WHERE id=?\";\n\t\t$sql = $db->prepareQuery($sql, $this->id);\n\t\t$db->query($sql);\n\t}", "public function delete($id)\n {\n $data = $this->model->find($id);\n $ship = $data->brand;\n $delete = $data->delete();\n if ($delete) {\n generateAccessesTxt(\n date('H:i:s').utf8_decode(\n ' Excluiu a Grade:'.$data->name.\n ', Tam:'.$data->label.\n ', Fabricante:'.$ship->name)\n );\n return true;\n }\n return false;\n }", "public function deleteEducationById($id)\n {\n $this->db->setStatement(\"DELETE FROM t:bildungsgaenge WHERE Bildungsgang_Id = :id \");\n $this->db->bindParameter(\"id\", \"i\", $id);\n return $this->db->pdbquery();\n }", "public function delete()\n {\n $this->job->delete();\n }", "public function delete($id)\n {\n agenc::find($id)->delete();\n session()->flash('message', 'Agency Deleted Successfully.');\n }", "public function delete($id)\n {\n $query=\"DELETE FROM l_release_group_series WHERE id=\".$id;\n\n $this->executeQuery($query);\n }", "public function delete($id){\n\t\t$sql = 'DELETE FROM tbl_coverage WHERE id = ?';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\t$sqlQuery->setNumber($id);\n\t\treturn $this->executeUpdate($sqlQuery);\n\t}", "public function destroy($id)\n {\n Jobtype::find($id)->delete();\n }", "public function destroy($id)\n {\n $job = Job::find($id);\n if (!empty($job->thumb_pen)) {\n $this->awsDelete($job->thumb_pen);\n }\n if (!empty($job->thumb_col)) {\n $this->awsDelete($job->thumb_col);\n }\n if (!empty($job->img_lg)) {\n $this->awsDelete($job->img_lg);\n }\n $job->delete();\n return redirect('admin/jobs')->with('message', 'Deleted!');\n }", "public function delete($id){\n\t\t$sql = 'DELETE FROM turma_disciplina WHERE id = ?';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\t$sqlQuery->setNumber($id);\n\t\treturn $this->executeUpdate($sqlQuery);\n\t}", "public function deleteDataGejala($id_gejala)\n {\n $this->db->where('id_gejala', $id_gejala);\n $this->db->delete('tb_gejala');\n }", "public function delete_data($id)\n {\n $this->builder->where('id', $id);\n $this->builder->delete();\n }", "public static function baja($id_ggs){\n //obtener empleados por local\n global $baseDatos;\n \n $res = $baseDatos->query(\"DELETE FROM `gs_grupo` WHERE id_ggs = $id_ggs\"); \n\n return $res;\n }", "function DeleteToDB()\n\t{\n\t\tif(isset($_GET['job_id']))\n\t\t{\n\t\t\t//Initializing variables with the user inputs\n\t\t\t$Id = $_GET['job_id'];\n\t\t\t\n\t\t\tif(!empty($Id))\n\t\t\t{\t\t\t\t\n\t\t\t\t//Query which is going to execute to for database manipulation\n\t\t\t\t$query =\"DELETE FROM job_details WHERE id='$Id'\";\n\t\t\t\t$query_run = mysql_query($query);\n\t\t\t}\n\t\t}\t\n\t}", "public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n // 需要同时删除此学员所有的成绩\n $model_score = Studentscore::model()->deleteAllByAttributes(array('record_id'=>$id));\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('index'));\n\t}", "public function deleteJob($id){\n// $query->result;*/\n $this->db->where('opportunity_id',$id);\n $this->db->delete('job_opportunity');\n\n\n }", "public function destroy($id)\n {\n //\n $assessment=PostCashAssessment::find($id);\n $assessment->delete();\n }", "public function delete($id)\n {\n error_log(\"aqui delete\");\n // TODO: Implement delete() method.\n }", "public function delete($id = 0){\r\n\t\t\t$pessoa = new Pessoa();\r\n\t\t\t$pessoa->setId($id);\r\n\t\t\t$this->pessoaModel->delete($pessoa);\r\n\t\t}", "function sqlDeleteGrade()\n\t{\n\t\t$sql = \"\n\t\tDELETE FROM tbl_grade\n\t\tWHERE grade_id = :grade_id\n\t\t\";\n\n\t\treturn $sql;\n\t}", "public function destroy($id)\n {\n $deleteJob = Job::destroy($id);\n }", "public function deleteJob($id)\n {\n $job = Job::find($id);\n\n if ($job == \"\") {\n return response()->json([\n 'status' => 400,\n 'message' => 'Job does not exist',\n 'data' => $job\n ], 400);\n }\n $job->delete();\n return response()->json([\n 'status' => 200,\n 'message' => 'Job has been deleted successfully',\n 'data' => []\n ], 200);\n }", "public function delete() {\n global $DB;\n $DB->delete_records($this->get_table_name(), array('id' => $this->id));\n }", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function actionDelete($id) {\n $model = $this->findModel($id);\n $authAssignments = AuthAssignment::find()->where([\n 'user_id' => $model->id,\n ])->all();\n foreach ($authAssignments as $authAssignment) {\n $authAssignment->delete();\n }\n\n Yii::$app->session->setFlash('success', 'Delete success');\n $model->delete();\n\n return $this->redirect(['index']);\n }", "public function deleteStudent($id){\n\t \t\n\t\t//get Student by Id\n\t\t$classes = CaStudent::find($id);\n\t\t\n\t\t//delete student\n\t\t$classes->delete();\n\t\t\n\t }", "public function delete( $id );", "public function delete(int $id);", "public function delete($id)\n {\n $query=\"DELETE FROM artist_credit WHERE id=\".$id;\n\n $this->executeQuery($query);\n }", "function deleteExperience($id){\n $resultDelete = $this->db->delete($this->tb, array($this->f[0] => $id));\n return $resultDelete;\n }", "public function delete($id)\n {\n mysqli_query($this->koneksi, \"delete from data_anak where id='$id'\");\n }", "public function delete($id){\n\t\t$sql = \"DELETE FROM {$this->table} WHERE {$this->primaryKey} = $id\";\n\t\t$this->db->query($sql);\n\t}", "public function delete($id){\n\t\t$sql = 'DELETE FROM shoppingcart_courseregcodeitemannotation WHERE id = ?';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\t$sqlQuery->setNumber($id);\n\t\treturn $this->executeUpdate($sqlQuery);\n\t}", "public function deleteData($id)\n {\n // TODO: Implement deleteData() method.\n }", "public function destroy($id)\n {\n // delete\n $jobExperience = JobExperience::find($id);\n $jobExperience->delete();\n\n // redirect\n Session::flash('message', 'Berufserfahrung erfolgreich gelöscht.');\n return Redirect::to('jobExperience');\n }", "public function destroy($id)\n\t{\n\t\t/** @var Graduate $graduate */\n\t\t$graduate = Graduate::find($id);\n\t\t$usuario = User::find($graduate->user_id);\n\t\t$encuestas = DB::table('polls')->where('graduate_id',$id)->delete();\n\n\t\tif(empty($graduate))\n\t\t{\n\t\t\tFlash::error('Graduate not found');\n\t\t\treturn redirect(route('graduates.index'));\n\t\t}\n\n\t\t\t\n\n\t\t$graduate->delete();\n\t\t$usuario->delete();\n\t\t\n\t\t\n\n\t\tFlash::message('Graduate deleted successfully.');\n\n\t\treturn redirect(url('allgraduates'));\n\t}", "function delete_vehicle_geofence_assignment($id) {\n $response = $this->db->delete('vehicle_geofence_assignment', array('id' => $id));\n if ($response) {\n return \"vehicle_geofence_assignment deleted successfully\";\n } else {\n return \"Error occuring while deleting vehicle_geofence_assignment\";\n }\n }", "public function DeleteAllBalancoAcoesesAsOrdemProducaoGrade() {\n\t\t\tif ((is_null($this->intId)))\n\t\t\t\tthrow new QUndefinedPrimaryKeyException('Unable to call UnassociateBalancoAcoesAsOrdemProducaoGrade on this unsaved ComandoRisco.');\n\n\t\t\t// Get the Database Object for this Class\n\t\t\t$objDatabase = ComandoRisco::GetDatabase();\n\n\t\t\t// Journaling\n\t\t\tif ($objDatabase->JournalingDatabase) {\n\t\t\t\tforeach (BalancoAcoes::LoadArrayByOrdemProducaoGradeId($this->intId) as $objBalancoAcoes) {\n\t\t\t\t\t$objBalancoAcoes->Journal('DELETE');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Perform the SQL Query\n\t\t\t$objDatabase->NonQuery('\n\t\t\t\tDELETE FROM\n\t\t\t\t\t`balanco_acoes`\n\t\t\t\tWHERE\n\t\t\t\t\t`ordem_producao_grade_id` = ' . $objDatabase->SqlVariable($this->intId) . '\n\t\t\t');\n\t\t}", "public function delete($id)\n {\n mysqli_query($this->koneksi, \"delete from pengasuh where id='$id'\");\n }", "public function perma_del($id)\n {\n if (!Gate::allows('lesson_delete')) {\n return abort(401);\n }\n $assignment = Assignment::onlyTrashed()->findOrFail($id);\n\n if (File::exists(public_path('/storage/uploads/'.$assignment->assignment_image))) {\n File::delete(public_path('/storage/uploads/'.$assignment->assignment_image));\n File::delete(public_path('/storage/uploads/thumb/'.$assignment->assignment_image));\n }\n//\n// $timelineStep = CourseTimeline::where('model_id', '=', $id)\n// ->where('course_id', '=', $assignment->course->id)->first();\n// if ($timelineStep) {\n// $timelineStep->delete();\n// }\n\n $assignment->forceDelete();\n\n\n\n return back()->withFlashSuccess(trans('alerts.backend.general.deleted'));\n }", "public function delete($id){\n $this->db->where('id', $id)\n ->delete($this->tabela);\n }", "public function destroy($id)\n {\n $cat = Jobcategory::find($id);\n $cat->trash = 1;\n $cat->save();\n }", "public function destroy($id)\n {\n $item = Job::findorFail($id);\n $item->delete();\n\n return redirect()->route('jobs.index')->with('status','Data Jobs berhasil Dihapus');\n }", "public function delete($id) \r\n {\r\n $this->load(array('id=?',$id));\r\n $this->erase();\r\n }", "public function deleteIdAction() {\n\t\t$id = intval($this->getInput('id'));\n\t\t$game_id = intval($this->getInput('game_id'));\n\t\t$result = Client_Service_Besttj::deleteByBesttjId($game_id,$id);\n\t\tClient_Service_Besttj::updateBesttjDate(intval($id));\n\t\tif (!$result) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功');\n\t}", "function delete()\n\t{\n\t\tSQL::query(\"delete from {$this->_table} where id = {$this->_data['id']}\");\n\t}", "public function delete($id)\n {\n Arrondissement::find($id)->delete();\n session()->flash('message', 'Arrondissement Deleted Successfully.');\n }", "public function destroy(Request $request, $id)\n {\n\n try{\n $marks_grade = SmMarksGrade::destroy($id);\n\n if (ApiBaseMethod::checkUrl($request->fullUrl())) {\n if ($marks_grade) {\n return ApiBaseMethod::sendResponse(null, 'Grdae has been deleted successfully');\n } else {\n return ApiBaseMethod::sendError('Something went wrong, please try again.');\n }\n } else {\n if ($marks_grade) {\n Toastr::success('Operation successful', 'Success');\n return redirect('marks-grade');\n } else {\n Toastr::error('Operation Failed', 'Failed');\n return redirect()->back();\n }\n }\n }catch (\\Exception $e) {\n Toastr::error('Operation Failed', 'Failed');\n return redirect()->back();\n }\n }", "public function destroy($id)\n {\n Job::where('id', $id)->delete();\n return redirect()->intended( route('job.index') );\n }", "public function delete()\n {\n $stmt = $this->_db->prepare(\"DELETE FROM score;\");\n $stmt->execute();\n }", "abstract public function delete($id);", "abstract public function delete($id);", "abstract public function delete($id);" ]
[ "0.7941263", "0.6906004", "0.68382186", "0.67633384", "0.67079735", "0.6679208", "0.661946", "0.65448284", "0.65324193", "0.65250564", "0.65060234", "0.64472854", "0.6380111", "0.6373853", "0.63716185", "0.63681436", "0.63502324", "0.63428783", "0.6333624", "0.6311695", "0.63084763", "0.627639", "0.627506", "0.6266123", "0.62632847", "0.6246902", "0.62173456", "0.62172794", "0.6200087", "0.6184219", "0.6183375", "0.61833537", "0.6182934", "0.616678", "0.61643374", "0.6153822", "0.6133929", "0.6115869", "0.6115773", "0.6109765", "0.6109765", "0.6109765", "0.6109765", "0.6109765", "0.6109765", "0.6109765", "0.6109765", "0.6109765", "0.6109765", "0.6109765", "0.6109765", "0.6109765", "0.6109765", "0.6109765", "0.6109765", "0.6109765", "0.6109765", "0.6109765", "0.6109765", "0.6109765", "0.6109765", "0.6109765", "0.6109765", "0.6109765", "0.6109765", "0.6109765", "0.6109765", "0.6109765", "0.6109765", "0.6109765", "0.6109765", "0.610944", "0.6109137", "0.61047506", "0.6104255", "0.6104112", "0.6095783", "0.60945755", "0.6094301", "0.6093655", "0.6086756", "0.6085737", "0.60658205", "0.60658133", "0.605885", "0.6050076", "0.6047843", "0.6045765", "0.60399723", "0.60261774", "0.6025134", "0.6025089", "0.60211146", "0.6020109", "0.6019999", "0.60198456", "0.6018882", "0.60158837", "0.60158837", "0.60158837" ]
0.65745234
7
Finds and displays documents for a Post.
public function attachmentsAction(Request $request, $id) { if (!$this->container->getParameter('manhattan_posts.include_attachments')) { throw new AccessDeniedHttpException('Attachment functionality has not been enabled in the bundle.'); } if (false === $this->get('security.context')->isGranted('ROLE_USER')) { throw new AccessDeniedException(); } $em = $this->getDoctrine()->getManager(); $post = $em->getRepository('ManhattanPostsBundle:Post') ->findOneByIdJoinAttachments($id); if (!$post) { throw $this->createNotFoundException('Unable to find Post entity.'); } $document = new Attachment(); $document->addPost($post); $form = $this->createForm(new AttachmentType(), $document); return $this->render('ManhattanPostsBundle:Document:documents.html.twig', array( 'entity' => $post, 'form' => $form->createView() )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function find(int $post_id);", "public function documento_index(){\n\n\t\t# Paginate Options\n\t\t$options = array(\n\t\t\t'conditions'=>array(),\n\t\t\t'order'=>array('created'=>'DESC')\n\t\t);\n\t\t$this->paginate = $options;\n\n\t\t# Filtro\n\t\tConfigure::load('filters');\n\t\t// $this->Filter->addFilters(Configure::read('PostDocumento')); // Estáticos\n\t\t$this->Filter->addFilters(\n\t\t\tarray(\n\t\t\t\t'f_status' => array(\n\t\t\t\t\t'PostDocumento.status' => array(\n\t\t\t\t\t\t'select' => $this->Filter->select('Todos', Configure::read('Option.status'))\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\t\t# Mescla Conditions\n\t\tif($this->Filter->getConditions()){\n\t\t\t$options['conditions'] = array_merge($options['conditions'], $this->Filter->getConditions());\t\t\n\t\t\t$this->Filter->setPaginate('conditions', $options['conditions']);\n\t\t}\n\n\t\t$this->PostDocumento->recursive = 0;\n\t\t$posts = $this->Paginator->paginate();\n\n\t\t$this->set('posts', $posts);\n\t}", "public function index()\n {\n $posts = QueryBuilder::for(Post::class)\n ->allowedIncludes(['comments'])\n ->get();\n\n return PostGetResource::collection($posts);\n }", "public function getDocuments();", "public function index()\n\t{\n\t\t\n\t\t$query = Post::with('user');\n\n\t\tif (Input::has('search')) {\n\t\t\t$query->where('title', 'like', '%'.Input::get('search').\"%\");\n\t\t}\n\t\t$posts = $query->orderBy('created_at', 'desc')->paginate(200);\n\t\treturn View::make('file.index')->with('posts', $posts);\n\t\t\n\t}", "public function viewAction() \n { \n $page = $this->params()->fromQuery('page', 1);\n $postId = (int)$this->params()->fromRoute('id', -1);\n \n // Validate input parameter\n if ($postId<0) {\n $this->getResponse()->setStatusCode(404);\n return;\n }\n \n // Find the post by ID\n $post = $this->entityManager->getRepository(Post::class)\n ->findOneById($postId);\n \n if ($post == null) {\n $this->getResponse()->setStatusCode(404);\n return; \n }\n \n // Only the post owner can see a draft post.\n if ($this->identity()!=null) {\n if(($post->getUser()->getId()!= $this->currentUser()->getId())&& ($post->getStatus()==1)){\n return $this->redirect()->toRoute('not-authorized'); \n }\n } else {\n if($post->getStatus()==1){\n return $this->redirect()->toRoute('not-authorized'); \n }\n }\n \n $query = $this->entityManager->getRepository(Post::class)\n ->findChildPosts($post, true);\n\n $adapter = new DoctrineAdapter(new ORMPaginator($query, false));\n $paginator = new Paginator($adapter);\n $paginator->setDefaultItemCountPerPage(10); \n $paginator->setCurrentPageNumber($page);\n \n $responseCountString = $this->postManager->getResponseCountStr($post);\n \n // Get the list of already saved files.\n $files = $this->imageManager->getSavedFiles($post);\n // Get the list of already saved files.\n $videos = $this->videoManager->getSavedFiles($post);\n $audioFiles = $this->audioManager->getSavedFiles($post);\n \n // Render the view template.\n return new ViewModel([\n 'responseCountString' => $responseCountString,\n 'posts' => $paginator,\n 'files'=>$files,\n 'videos'=>$videos,\n 'audioFiles'=>$audioFiles,\n 'post' => $post,\n 'postManager' => $this->postManager,\n 'imageManager' => $this->imageManager\n ]);\n }", "public function display($post);", "public function showList()\n {\n // Get posts datas\n $postList = $this->currentModel->getListWithAuthor();\n // Loop to find any existing comments attached to each post\n for ($i = 0; $i < count($postList); $i ++) {\n // Retrieve (or not) single post comments\n $postComments = $this->currentModel->getCommentListForSingle($postList[$i]->id);\n // Comments are found for a post.\n if ($postComments != false) {\n // Add temporary param \"postComments\" to object\n $postList[$i]->postComments = $postComments;\n }\n // Retrieve single post images\n $postImages = $this->currentModel->getImageListForSingle($postList[$i]->id);\n // Images are found for a post.\n if ($postImages != false) {\n // Add temporary param \"postImages\" to object\n $postList[$i]->postImages = $postImages;\n }\n }\n $varsArray = [\n 'metaTitle' => 'Posts list',\n 'metaDescription' => 'Here, you can follow our news and technical topics.',\n 'imgBannerCSSClass' => 'post-list',\n 'postList' => $postList\n ];\n echo $this->page->renderTemplate('Blog/Post/post-list.tpl', $varsArray);\n }", "public function index()\n\t{\n\t\t$query = Request::get('q');\n\n\t\t$posts = $query\n\t\t\t? $this->post->published()->search($query)->orderBy('published_at', 'DESC')->paginate(10)\n\t\t\t: $this->post->published()->orderBy('published_at', 'DESC')->paginate(10);\n\n\t\treturn View::make('posts.index', compact('posts','query'));\n\n\t}", "public function index()\n {\n $posts = PostProvider::paginate();\n $links = PostProvider::links();\n\n return Viewer::make('posts.index', array('posts' => $posts, 'links' => $links));\n }", "public function show(Post $post)\n {\n// POST::create(['body'=>$body, 'title'=>'test', 'excerpt'=>'test']);\n\n // route/model binding. it automatically maps to the matching ppost model entry\n return view('post.index', [\n 'post' => $post // auto mapped without having to do a find::() etc. uses id by default.\n ]);\n//})->where('post', '[A-z_\\-]+');\n }", "public function show(post $post)\n {\n //\n }", "public function show(post $post)\n {\n //\n }", "protected function viewPostById()\n {\n $post = $this->posts->postById($_GET['id']);\n $comments = $this->comments->commentsById($_GET['id']);\n $this->render('postById', compact('post', 'comments'));\n }", "public function index() {\n\n $posts = null;\n\n if ($this->request->is('post')) {\n\n $this->Post->create();\n\n $searchField = $this->request->data['lstField'];\n $searchValue = $this->request->data['searchValue'];\n\n if (!empty($searchField) && !empty($searchValue)) {\n $posts = $this->Post->search($searchField, $searchValue);\n $this->set('posts', $posts);\n }\n } else {\n $posts = $this->Post->viewPosts();\n }\n\n $this->set('posts', $posts);\n }", "public function index() {\n\n\t\t$conditions = array();\n\t\tif((isset($this->request->query['q'])) && (!empty($this->request->query['q']))) {\n\t\t\t$search_schema = Content::searchSchema();\n\t\t\t$search_conditions = array();\n\t\t\t// For each searchable field, adjust the conditions to include a regex\n\t\t\tforeach($search_schema as $k => $v) {\n\t\t\t\t$field = (is_string($k)) ? $k:$v;\n\t\t\t\t$search_regex = new \\MongoRegex('/' . $this->request->query['q'] . '/i');\n\t\t\t\t$conditions['$or'][] = array($field => $search_regex);\n\t\t\t}\n\t\t}\n\n\t\t$conditions += array('published' => true);\n\n\t\t$limit = $this->request->limit ?: 5;\n\t\t$page = $this->request->page ?: 1;\n\t\t// Allow querystring params for these as well.\n\t\t$page = (isset($this->request->query['page'])) ? $this->request->query['page']:$page;\n\t\t$limit = (isset($this->request->query['limit'])) ? $this->request->query['limit']:$limit;\n\t\t$order = array('created' => 'desc');\n\t\t$total = Content::count(compact('conditions'));\n\t\t$documents = Content::all(compact('conditions','order','limit','page'));\n\n\t\t$page_number = (int)$page;\n\t\t$totalPages = ((int)$limit > 0) ? ceil($total / $limit):0;\n\n\t\t// Set data for the view template\n\t\treturn compact('documents', 'total', 'page', 'limit', 'totalPages');\n\t}", "public function show(Post $posts)\n {\n //\n }", "public function index()\n {\n $post = Post::paginate(5);\n return postresource::collection($post);\n }", "public function show(Post $post)\n {\n //\n }", "public function show(Post $post)\n {\n //\n }", "public function show(Post $post)\n {\n //\n }", "public function show(Post $post)\n {\n //\n }", "public function show(Post $post)\n {\n //\n }", "public function show(Post $post)\n {\n //\n }", "public function show(Post $post)\n {\n //\n }", "public function show(Post $post)\n {\n //\n }", "public function show(Post $post)\n {\n //\n }", "public function show(Post $post)\n {\n //\n }", "public function show(Post $post)\n {\n //\n }", "public function show(Post $post)\n {\n //\n }", "public function show(Post $post)\n {\n //\n }", "public function show(Post $post)\n {\n //\n }", "public function show(Post $post)\n {\n //\n }", "public function show(Post $post)\n {\n //\n }", "public function show(Post $post)\n {\n //\n }", "public function index()\n {\n $user = \\Auth::guard('canvas')->user();\n $data = Post::query();\n\n if ($user->role == \\Canvas\\Meta\\Constants::ROLE_USER) {\n $data->user($user->id);\n }\n\n $data = $data->get();\n\n return view('canvas::backend.post.index', compact('data'));\n }", "public function show(Docs $docs)\n {\n \n }", "public function show(Post $post)\n {\n \n }", "function findDocuments( $orderby='name DESC' )\n\t{\n\t\t//return MyActiveRecord::FindAll( 'Documents', 'item_id = '.$this->id, $orderby );\n\t\treturn MyActiveRecord::FindBySql('Documents', \"SELECT * FROM documents WHERE item_id = \".$this->id.\" ORDER BY \".$orderby.\"\");\n\t}", "public function show( Post $post )\n {\n //\n }", "public function show(Document $document)\n {\n //\n }", "public function show(Document $document)\n {\n //\n }", "public function show(Document $document)\n {\n //\n }", "public function show(Document $document)\n {\n //\n }", "public function index()\n {\n\t\t$totalComments = count($this->model->findAllWithTheirAuthor(\"p_datetime DESC\"));\n\t\t$itemPerpage = 5;\n\t\t$totalPages = ceil($totalComments/$itemPerpage); //ceil around superior number\n\t\t\n\t\tif(isset($_GET['page']) AND !empty($_GET['page']) AND $_GET['page'] > 0)\n {\n $_GET['page'] = intval($_GET['page']); //return an entier value\n $currentPage = $_GET['page'];\n }\n else\n {\n $currentPage = 1;\n\t\t}\n\t\t$start = ($currentPage - 1)*$itemPerpage;\n $posts = $this->model->countItems($start, $itemPerpage, \"p_datetime\");\n\t\t\n\t\t$pageTitle = \"Articles\";\n\t\t\n\t\t$description = \"Liste des articles\";\n\n\t\t$author = \"Invest People\";\n\n \\Renderer::render('post/index', compact('pageTitle', 'posts', 'description', 'author', 'totalPages')); \n\t}", "public function show() {\n // without an id we just redirect to the error page as we need the post id to find it in the database\n if (!isset($_GET['id']))\n return call('pages', 'error');\n\n // we use the given id to get the right post\n $post = Post::find($_GET['id']);\n require_once('view/posts/show.php');\n\n }", "public function show(){\n\t $allPosts = [];\n\t $model = new postsModel;\n\t $allPosts = $model->findAll();\n\n $view = new blogView(compact('allPosts'));\n $view->render();\n\t}", "public function index()\n {\n $documents = Document::paginate(env('PAGINATE_SIZE'));\n\n if($documents->first()){\n return $this->respond($documents);\n } else{\n return $this->respondNotFound('Oops! no hay Documentos');\n }\n }", "public function posts()\n\t{\n\t\t$this -> template = 'default_1';\n\t\t$url = $this -> basepath();\n\n\t\t$posts = \\App\\App::getInstance() -> getTable('postsManager');\n\t\t$posts = $posts -> getPosts();\n\t\t$categories = \\App\\App::getInstance() -> getTable('categoriesManager');\n\t\t$categories = $categories -> getCategories();\n\t\t$this -> page('posts/posts', compact('posts', 'categories', 'url'));\n\t}", "public function postsActionGet() : object\n {\n $page = $this->app->page;\n $title = \"Alla inlägg\";\n $db = $this->app->db;\n\n $db->connect();\n $sql = \"SELECT * FROM content;\";\n $resultset = $db->executeFetchAll($sql);\n\n $page->add(\"cms/header\");\n $page->add(\"cms/posts\", [\n \"resultset\" => $resultset\n ]);\n return $page->render([\n \"title\" => $title\n ]);\n }", "abstract public function getDocuments();", "public function index_post( $post ) \n\t{\n\t\t$doc = new Zend_Search_Lucene_Document();\n\t\t\n\t\t$doc->addField( Zend_Search_Lucene_Field::Text( 'url', $post->permalink ) );\n\t\t$title = Zend_Search_Lucene_Field::Text( 'title', strtolower( $post->title ), 'utf-8' );\n\t\t$title->boost = 50;\n\t\t$doc->addField( $title );\n\t\t\n\t\t$doc->addField( Zend_Search_Lucene_Field::UnStored( 'contents', strtolower( $post->content ), 'utf-8' ) );\n\t\t\n\t\t// Add tags\n\t\t$tags = $post->tags;\n\t\t$tagstring = '';\n\t\tforeach($tags as $tag) {\n\t\t\t$tagstring .= $tag . ' ';\n\t\t}\n\t\t$dtag = Zend_Search_Lucene_Field::UnStored( 'tags', strtolower( $tagstring ), 'utf-8' );\n\t\t$dtag->boost = 10;\n\t\t$doc->addField( $dtag );\n\t\n\t\t// Add ID\n\t\t$doc->addField( Zend_Search_Lucene_Field::keyword( 'postid', $post->id ) );\n\n\t\t$this->_index->addDocument($doc);\n\t}", "public function indexPosts()\n {\n /**\n * The page\n *\n * @var integer\n */\n $page = Input::get('page', 0);\n $repo = App::make('Pulse\\Cms\\PostRepository');\n $posts = $repo->all($page);\n\n return $this->render('pulse::front.posts.index', compact('posts'));\n }", "public function index()\n {\n $documents = Document::all();\n return view('documents', compact('documents'));\n }", "public function index(Request $request)\n {\n if ($request->has('keyword')) {\n //Search here\n $posts = $this->repository->searchPost($request->keyword);\n } else {\n if (auth()->guest()) {\n $posts = $this->repository->guestPost();\n } else {\n $posts = $this->repository->memberPost();\n }\n }\n return view('post.index', compact('posts'));\n\n }", "public function showAction()\n {\n $service = $this->getServiceLocator()->get(\"Application\\Service\\BlogPost\");\n $results = $service->fetchById($this->params()->fromRoute(\"id\"));\n $results = $this->getServiceLocator()->get(\"Application\\Service\\BlogComment\")->attachComments(array($results));\n $view = $this->acceptableViewModelSelector($this->acceptCriteria);\n $view->setVariables(array(\n 'post' => $results[0]\n ));\n return $view;\n }", "public function index()\n {\n $documents = Document::orderBy('id')->paginate(10);\n\n $data = [\n 'classes' => Classes::all(),\n 'documentTypes' => DocumentType::all()\n ];\n\n return view('documents.index')->withDocuments($documents)->with($data);\n }", "public function indexAction()\n {\n $arr = Post::getAll();\n View::renderTemplate('Post/index.html', [\n 'data' => $arr\n ]);\n }", "public function index()\n {\n $documents = Document::all();\n return view(\"documents\", [\"documents\" => $documents]);\n }", "public function show($post){\n $post_query = \"select p.id, p.post_title, p.post_body, p.created_at,\n iu.image_path, c.cat_name from posts p \n left join image_managers iu on p.id=iu.foreign_id\n inner join categories c on p.category_id = c.id\n where p.id = :id order by iu.created_at desc\";\n \n $post = $this->selectFirstQuery($post_query, ['id'=>$post]);\n if (is_null($post) ) {\n return redirect()->route('blog.home');\n }\n\n return view('fe.posts.show', compact('post'));\n }", "public function show(Posts $posts)\n {\n //\n }", "public function show(Posts $posts)\n {\n //\n }", "public function index()\n {\n $documents = Document::orderBy('id', 'DESC')->paginate(25);\n\n return view('document.index', compact('documents'));\n }", "public function index()\n {\n $posts = Post::latest()->with('author')->paginate(5);\n $filtered = $posts->whereIn('audience', ['public']);\n return PostResource::collection($filtered);\n }", "public function show($id)\n {\n $document = Document::findOrFail($id);\n\n return view('admin.documents.index2');\n }", "public function index()\n {\n return app(Post::class)->select('id', 'title', 'content')->get();\n }", "public function show($id)\n {\n $document = Document::findOrFail($id);\n\n return view('documents.show')->withDocument($document);\n }", "public function getShow($post_id)\n {\n $post = Post::find($post_id);\n $attachments = $post->uploads->sortBy('display_order');\n $this->layout->content = View::make('uploads/showUploads')\n ->with(array('post' => $post, \n 'attachments' => $attachments)\n );\n }", "public function index() {\n $data = $this->Post->find('all');\n $this->set('data', $data);\n }", "public function show($id)\n\t{\n\t\t$document = Document::findOrFail($id);\n\n\t\treturn View::make('documents.show', compact('document'));\n\t}", "public function index()\n\t{\n\t\t$post = $this->repository->all();\n\n\t\treturn View::make('posts.index')->with('posts', $post);\n\t}", "public function index(Post $post)\n {\n $user = auth()->user();\n\n $user_id = $user->id;\n\n $posts = Post::paginate(4);\n $introductions = Introduction::all();\n $introduction = new Introduction();\n // ユーザーとプロフィールを結びつける?\n // ポスト一つをとる\n $my_introduction = $introduction->where('user_id', $user_id)->get()->first(); // プロフィールを取得\n // postのイントロダクションをとる\n $data = [];\n $favorite_model = new Favorite;\n $data = [\n 'posts' => $posts,\n 'like_model'=>$favorite_model,\n ];\n return view('posts.index', [\n 'user' => $user,\n 'posts' => $posts,\n 'my_introduction' => $my_introduction,\n 'introductions' => $introductions\n ], $data);\n \n }", "public function indexAction()\n {\n $conn1 = Doctrine_Manager::getInstance()->getConnection('one');\n $posts = Doctrine_Query::create($conn1)\n ->from('Model_Post p')\n ->orderBy('p.created_at DESC')\n ->execute();\n \n $conn2 = Doctrine_Manager::getInstance()->getConnection('two');\n $dummy = Doctrine_Query::create($conn2)\n ->from('Model_Post p')\n ->select('p.content')\n ->where('p.author = ?', 'danceric')\n ->execute();\n \n $this->view->posts = $posts;\n }", "public function index() {\n\t\t//Eager loading ...\n\t\t//$posts = Post::with('author')->get();\n\t\t$posts = Post::with('author')->paginate(10);\n\t\t//$posts = Post::slug('slug-search')->with('author')->paginate(10);\n // devAuthor();\n\t\t//$posts = Post::paginate(10);\n\n\t\t//$posts->setPath('/usrssss/alexh');\n\n\t\treturn view('post.list_all',['posts'=>$posts]);\n\t}", "public function actionIndex()\n\t{\n\t\t$data = Post::find()->all();\n\t\techo $this->render('index', array(\n\t\t\t'data' => $data\n\t\t));\n\t}", "public function index()\n {\n $post = blog_post::all();\n return view('post.index', compact('post'));\n }", "public function get_documents() \n {\n $endpoint_name = \"/documents/\";\n $request_arguments = [];\n $documents = $this->request(\"GET\", $endpoint_name, $request_arguments);\n if (array_key_exists(\"documents\", $documents)) {\n return $documents[\"documents\"];\n }\n return $documents;\n }", "public function show($id)\n {\n $document_types=DocumentType::all();\n $document=FoundDocument::find($id);\n\n \n return view('admin.found-document.show',['document_types'=>$document_types,'document'=>$document]);\n }", "public function index(Request $request)\n {\n $paginate = $request->per_page;\n return PostResource::collection(Post::query()->orderBy('title')->paginate($paginate));\n \n }", "public function indexAction()\n {\n $dm = $this->getDocumentManager();\n\n $documents = $dm->getRepository('OPMediaBundle:Document')->findAll();\n\n return array('documents' => $documents);\n }", "public function index()\n {\n $file = Documents::all();\n return view('document.index',compact(['file']));\n }", "public function index(){\n $posts = Post::orderBy('id', 'desc')->get();\n return PostResource::collection($posts);\n }", "public function show($id)\n {\n $document = Documents::find($id);\n\n return view('admin.documents.show', compact('document'));\n }", "public function actionIndex()\n {\n\n $searchModel = new PostSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n $dataProvider->pagination->pageSize=10;\n $dataProvider->setSort([\n 'defaultOrder' => ['post_id'=>SORT_DESC],]);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function indexAction()\n {\n $posts = PostService::readAll();\n\n View::renderTemplate('Posts/index.html', [\n 'posts' => $posts\n ]);\n }", "public function index()\n {\n $post = Post::all();\n return PostsCollection::make($post);\n }", "protected function makeDoc($fpost) {\n global $urlServer;\n $encoding = 'utf-8';\n\n $doc = new Zend_Search_Lucene_Document();\n $doc->addField(Zend_Search_Lucene_Field::Keyword('pk', Indexer::DOCTYPE_FORUMPOST . '_' . $fpost->id, $encoding));\n $doc->addField(Zend_Search_Lucene_Field::Keyword('pkid', $fpost->id, $encoding));\n $doc->addField(Zend_Search_Lucene_Field::Keyword('doctype', Indexer::DOCTYPE_FORUMPOST, $encoding));\n $doc->addField(Zend_Search_Lucene_Field::Keyword('courseid', $fpost->course_id, $encoding));\n $doc->addField(Zend_Search_Lucene_Field::Keyword('topicid', $fpost->topic_id, $encoding));\n $doc->addField(Zend_Search_Lucene_Field::Text('content', Indexer::phonetics(strip_tags($fpost->post_text)), $encoding));\n $doc->addField(Zend_Search_Lucene_Field::UnIndexed('url', $urlServer . 'modules/forum/viewtopic.php?course=' . course_id_to_code($fpost->course_id)\n . '&amp;topic=' . intval($fpost->topic_id)\n . '&amp;forum=' . intval($fpost->forum_id), $encoding));\n\n return $doc;\n }", "public function seePost($postId){\n\n $posts = $this->articleDAO->getPost($postId);\n $comments=$this->commentDAO->getComments($postId);\n\n $this->view->adminRender('admin_post',[\n 'posts' => $posts,\n 'comments' => $comments]);\n }", "public function index()\n {\n $documents = Document::query()\n ->where('published_at', '<=', Carbon::now())\n ->orderBy('category', 'asc')\n ->orderBy('published_at', 'desc')\n ->get();\n $documents_grouped = [];\n foreach ($documents as $key => $document) {\n $documents_grouped[$document->category][$key] = $document;\n }\n return view('docs.index')\n ->with('documents_grouped', $documents_grouped);\n }", "public function showPosts() {\r\n\t\t$allposts = $this->renderPostTemplate();\r\n\t\tforeach($allposts as $post) {\r\n\t\t\techo $post;\r\n\t\t}\r\n\t}", "public function index()\n {\n $posts = post::all();\n return view('article.posts.show', compact('posts'));\n }", "public function index()\n {\n $data = Document::all();\n return view('backend.document.index', compact('data'));\n }", "public function listPosts()\n {\n $PostsRepository = new PostsRepository();\n $posts = $PostsRepository->getAllPosts();\n require 'src/View/postListView.php';\n }", "public function buildPostAction()\n {\n $isCount = $this->getRequest()->getParam('pretend');\n $index = Zend_Search_Lucene::create(Zend_Registry::getInstance()->config->search->post);\n\n \n\n require_once 'Ifphp/models/Posts.php';\n require_once 'Ifphp/models/Feeds.php';\n require_once 'Ifphp/models/Categories.php';\n\n $posts = new Posts();\n $allPosts = $posts->getRecent(1,0);\n\n if ($isCount)\n {\n echo $allPosts->count().' posts would have been added to the post index';\n exit;\n }\n\n\n foreach($allPosts as $post)\n {\n $feed = $post->findParentFeeds();\n \n $doc = new Zend_Search_Lucene_Document();\n $doc->addField(Zend_Search_Lucene_Field::Text('pid', $post->id));\n $doc->addField(Zend_Search_Lucene_Field::Text('title', $post->title));\n $doc->addField(Zend_Search_Lucene_Field::Text('siteUrl', $post->siteUrl));\n $doc->addField(Zend_Search_Lucene_Field::Text('link', $post->link));\n $doc->addField(Zend_Search_Lucene_Field::Text('feedTitle', $feed->title));\n $doc->addField(Zend_Search_Lucene_Field::Text('feedSlug', $feed->slug));\n $doc->addField(Zend_Search_Lucene_Field::keyword('category', $feed->findParentCategories()->title));\n $doc->addField(Zend_Search_Lucene_Field::Text('description', $post->description));\n $doc->addField(Zend_Search_Lucene_Field::unIndexed('publishDate', $post->publishDate));\n $doc->addField(Zend_Search_Lucene_Field::Keyword('type','post'));\n $index->addDocument($doc);\n\n }\n// chown(Zend_Registry::getInstance()->search->post,'www-data');\n }", "public function view($postId) {\n\t\t$am = ArticleModel::getInstance();\n\t\t$post = $am->getArticleCached($postId);\n\t\t\n\t\t// If the post doesn't exist, we should send this over to the\n\t\t// ErrorController to tell the user that this page is not found.\n\t\tif (!$post) {\n\t\t\t$ec = ErrorController::getInstance();\n\t\t\t$ec->error404();\n\t\t}\n\t\telse {\n\t\t\t// The post exists, so let's get the comments and pass it to\n\t\t\t// the article view.\n\t\t\t$cm = CommentModel::getInstance();\n\t\t\t$comments = $cm->getCommentsCached($postId);\n\t\t\t\n\t\t\tView::load('article', array(\n\t\t\t\t'title' => Config::getRequiredVal('general', 'site_title'),\n\t\t\t\t'post' => $post,\n\t\t\t\t'comments' => $comments\n\t\t\t));\n\t\t}\n\t}", "public function index()\n {\n $posts = PostResource::collection(Post::orderByDesc('created_at')->whereIn('id', PostProfil::pluck('post_id')->all())->where('public', 0)->paginate(10));\n\n if ($posts) {\n return $posts;\n } else\n return response('No posts found', 440);\n }", "public function index() {\n $this->data['posts'] = $this->blog_model->get_many_by(['status' => 1]);\n\n $this->template->build('public/blog/index', $this->data);\n }", "public function show($id)\n {\n $file = File::find($id);\n //\n return view('posts.show')->with('posts', $file);\n }", "public function indexAction()\n {\n $limit = \\App\\Config::getConfig('pagination_frontend');\n $page = $this->routeParams['page'];\n $posts = $this->postModel->getAll(true, $limit, $page);\n foreach ($posts as $post) {\n $tagIds = $this->postModel->getPostTagIds($post->id);\n $post->tags = $this->tagModel->getAllBy('id', $tagIds);\n }\n $totalRows = $this->postModel->countBy(['is_active' => 1]);\n $paginator = $this->paginator->init($totalRows, $limit, $page, $this->routeParams);\n View::renderTemplate('Cms::frontend/post/index.html', [\n 'posts' => $posts,\n 'paginator' => $paginator\n ]);\n }", "public function viewPostById($post) {\n $db = $this->dbConnect();\n $req = $db->prepare('SELECT id, title, content, DATE_FORMAT(creation_date, \\'%d/%m/%Y à %Hh%imin%ss\\') AS creation_date_fr FROM posts WHERE id = ?');\n $req->execute(array($post->getId()));\n\n $postById = $req->fetch();\n\n return $postById;\n }", "public function index(Request $request)\n {\n $docs = $request->user()->documents()\n ->orderBy('id', 'desc')\n ->get();\n\n return view('documents.index', compact('docs'));\n }" ]
[ "0.6277988", "0.61591315", "0.6138418", "0.6114021", "0.6052781", "0.5967254", "0.59295666", "0.59262615", "0.58983856", "0.5883074", "0.587688", "0.58642757", "0.58642757", "0.5830671", "0.58302385", "0.58176345", "0.581348", "0.5799267", "0.5781214", "0.5781214", "0.5781214", "0.5781214", "0.5781214", "0.5781214", "0.5781214", "0.5781214", "0.5781214", "0.5781214", "0.5781214", "0.5781214", "0.5781214", "0.5781214", "0.5781214", "0.5781214", "0.5781214", "0.5780392", "0.57772976", "0.576149", "0.5749754", "0.5749449", "0.57342243", "0.57342243", "0.57342243", "0.57342243", "0.5733058", "0.57243043", "0.5712441", "0.5712088", "0.57075375", "0.57070804", "0.5705528", "0.5700027", "0.5687848", "0.5660592", "0.565639", "0.565082", "0.564298", "0.5636866", "0.5626558", "0.56186694", "0.5608115", "0.5608115", "0.5607087", "0.5606613", "0.560322", "0.56029034", "0.5601234", "0.5597184", "0.5596968", "0.5591367", "0.55888915", "0.5588393", "0.5583479", "0.55822617", "0.5573238", "0.55692714", "0.55663997", "0.55616885", "0.5561051", "0.5550203", "0.5547302", "0.5547146", "0.5544189", "0.5543276", "0.5536631", "0.55352604", "0.5532602", "0.55169463", "0.55147386", "0.55123323", "0.55115664", "0.5507215", "0.550665", "0.55062157", "0.5500766", "0.5496644", "0.5496205", "0.5485135", "0.5483174", "0.5482279", "0.5479006" ]
0.0
-1
Creates a new Photo entity.
public function createAction(Request $request, $id) { if (!$this->container->getParameter('manhattan_posts.include_attachments')) { throw new AccessDeniedHttpException('Attachment functionality has not been enabled in the bundle.'); } if (false === $this->get('security.context')->isGranted('ROLE_USER')) { throw new AccessDeniedException(); } $em = $this->getDoctrine()->getManager(); $post = $em->getRepository('ManhattanPostsBundle:Post')->findOneById($id); if (!$post) { throw $this->createNotFoundException('Unable to find Post entity.'); } $document = new Attachment(); $document->addPost($post); $form = $this->createForm(new AttachmentType(), $document); $form->bind($request); if ($form->isValid()) { $em->persist($document); $em->flush(); return $this->redirect($this->generateUrl('console_news_documents', array('id' => $post->getId()))); } return $this->render('ManhattanPostsBundle:Document:documents.html.twig', array( 'entity' => $post, 'form' => $form->createView() )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store(PhotoCreateRequest $request)\n {\n DB::beginTransaction();\n $photo = $this->createPhotoInstance($request->all());\n $photo->owner()->associate(auth()->user());\n $photo->save();\n\n $photo->location()->save(\n new PhotoLocation($request->only('location'))\n );\n\n $tags = $this->createTags(explode(',', $request->tags));\n\n $photo->tags()->sync($tags->pluck('id')->toArray());\n\n // Execute processing to external photo: download, apply geocoding...\n dispatch(new ProcessingExternalPhoto($photo));\n\n DB::commit();\n\n // 201\n return $photo;\n }", "public function actionCreate()\n {\n $model = new Photo();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n //return $this->redirect(['view', 'id' => $model->id]);\n\t return $this->redirect(['index']);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function make_a_photo()\n {\n $product = factory(Product::class, 1)->create();\n\n $file = new UploadedFile(\n 'C:\\Users\\Admin\\Projects\\whimsical\\storage\\test\\test_file.jpg',\n 'test_file.jpg',\n 'jpg',\n 'null',\n 'null',\n true\n );\n\n $this->assertTrue(file_exists($file->path()), 'Test file does not exist');\n\n $product->addPhoto($product, $file);\n\n }", "public function actionCreate()\n {\n $model = new Picture();\n $post_request = $model->load(Yii::$app->request->post());\n\n if (!$post_request) {\n // If it is the beginning of a create, set the default values\n $model->setDefaults();\n // If no coordinates exists set to 0,0 (nobody live there except for 'Ace Lock Service Inc' :=)\n $model->org_loc_lat = $model->loc_lat = 0;\n $model->org_loc_lng = $model->loc_lng = 0;\n\n // Since we are on the server (UTC) we just set it to date accurray; it will be ovveridden by the loval time from the client anyway\n $model->taken = date('Y-m-d') . ' 00:00:00';\n } else {\n if ($model->loc_lat == 0 && $model->loc_lng == 0) {\n // If no user defined position is given then take the original position\n $model->loc_lat = $model->org_loc_lat;\n $model->loc_lng = $model->org_loc_lng;\n }\n }\n\n if ($post_request && $model->validate()) {\n if (!empty($model->image_dataurl)) {\n $img = str_replace('data:image/jpeg;base64,', '', $model->image_dataurl);\n $blob = base64_decode($img);\n } else {\n $blob = NULL;\n }\n $transaction = Yii::$app->db->beginTransaction();\n try {\n if (isset($blob)) {\n $model->fillFromBinary($blob);\n }\n $model->save(false);\n $transaction->commit();\n } catch (Exception $ex) {\n $transaction->rollback();\n throw($ex);\n }\n Yii::$app->session->setFlash('success', \"Vorfall wurde angelegt. \".Html::a('Weiteren Vorfall erfassen', ['create']));\n return $this->redirect(['update', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new ApplicationPhoto();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function createAction()\n {\n $request = $this->getRequest();\n $em = $this->getDoctrine()->getManager();\n\n $form = $this->createForm(new ImageType(), new ImageModel(new Image()));\n\n $path = $this->container->getParameter('blog.upload_dir');\n if (!file_exists($path)) {\n @mkdir($path, 0777, true);\n }\n $path = realpath($path);\n $formHandler = new ImageHandler($form, $request, new Image(), $em, $path);\n if ($formHandler->process()) {\n return $this->redirect($this->generateUrl('_blog_backend_image'));\n }\n\n return array(\n 'form' => $form->createView(),\n );\n }", "public function createAction(Request $request)\n {\n $entity = new Picture();\n $form = $this->createCreateForm($entity);\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('picture_show', array('id' => $entity->getId())));\n }\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function actionCreate()\n\t{\n\t\t$model=new Photo;\n\t\tif(isset($_POST['Photo']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Photo'];\n if (!empty($_POST['Photo']['subcategoryArr']))\n $model->subcategory = implode(\",\", $_POST['Photo']['subcategoryArr']);\n if (!empty($_POST['Photo']['sizesArr']) && $_POST['Photo']['size'] == 1)\n $model->sizes = implode(\",\", $_POST['Photo']['sizesArr']);\n if (!empty($_POST['Photo']['colorArr']))\n $model->color = implode(\",\", $_POST['Photo']['colorArr']);\n\t\t\tif($model->save()){\n\t\t\t\t$this->redirect('/admin/photo/create');\n }\n\t\t}\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function newAction(Request $request)\n {\n $photo = new Photo();\n $form = $this->createForm(PhotoType::class, $photo);\n $form->handleRequest($request);\n\n //Pobranie zalogowanego użytkownika\n $user = $this->getLoggedUser();\n\n //Ustawienie statusu zdjęcia na zdjęcie do akceptacji (id=1) oraz przypisanie się fotografa do zdjęcia\n $status = $this->getDoctrine()->getManager()\n ->getRepository('AppBundle:Status')->find(1);\n $photo->setActiveStatus($status);\n $photo->setAssignedPhotographer($user);\n\n $statusHistory = new StatusHistory();\n $statusHistory->setPhoto($photo);\n $statusHistory->setStatus($status);\n $statusHistory->setUser($user);\n\n if ($form->isSubmitted() && $form->isValid()) {\n\n /** @var UploadedFile $photoFile */\n $photoFile = $form['src']->getData();\n\n if ($photoFile) {\n $originalFileName = pathinfo($photoFile->getClientOriginalName(), PATHINFO_FILENAME);\n $newFileName = $originalFileName.'-'.uniqid().'.'.$photoFile->guessExtension();\n try {\n $photoFile->move(\n $this->getParameter('photos_directory'),\n $newFileName\n );\n } catch (FileException $e) {\n }\n $newSrc = '/uploads/' . $newFileName;\n $photo->setSrc($newSrc);\n }\n\n $em = $this->getDoctrine()->getManager();\n $entities = [$photo, $statusHistory];\n\n foreach ($entities as $entity) {\n $em->persist($entity);\n }\n\n $em->flush();\n\n return $this->redirectToRoute('photo_show', array('id' => $photo->getId()));\n }\n\n return $this->render('photo/new.html.twig', array(\n 'photo' => $photo,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $path = request()->file('photo')->store('testing');\n return response()->json(['path' => $path], 200);\n }", "public function store()\n {\n $photo = Photo::create($this->validateRequest());\n return redirect('recitals/photos');\n }", "public function addPhotoAction(){\n $data = $this->getRequestData();\n $types = array('activity', 'operation', 'people');\n if(isset($data['photo']['name']) && isset($data['photo']['content']) && isset($data['type']) && in_array($data['type'], $types)){\n $user = Object_User::getById($this->getDeviceSession()->getUserId());\n $folder = Asset_Folder::getByPath('/images/'.$data['type'].'/'.$user->getKey().'-'.$data['type']);\n if (!$folder) {\n switch($data['type']){\n case 'activity':\n $fid = 3;\n break;\n case 'operation':\n $fid = 4;\n break;\n case 'people':\n $fid = 7;\n break;\n }\n $folder = new Object_Folder();\n $folder->setKey($user->getKey() . \"-\" . $data['type']);\n $folder->setParentId($fid);\n $folder->save();\n }\n\n $asset = new Asset_Image();\n $asset->setCreationDate(time());\n $asset->setUserOwner(1);\n $asset->setUserModification(1);\n $asset->setParentId($folder->getId());\n $asset->setFilename(Pimcore_File::getValidFilename($data['name'] . \"-\" . time()));\n $asset->setData(base64_decode($data['content']));\n if(!$asset->save()){\n $this->setErrorResponse('cannot save photo!');\n }\n } else {\n $this->setErrorResponse('photo and type is mandatory for this request!');\n }\n\n $this->_helper->json(array('photo' => $asset->getId()));\n }", "public function addPhoto(Request $request) {\n\n // Log::info($request->all());\n \n if(Input::hasFile('file') && Input::file('file')->isValid() && !is_null($request->id))\n {\n\n $file = Input::file('file');\n\n $extension = $file->getClientOriginalExtension(); \n\n $fileName = str_random(10) .'.'. $extension;\n\n $clientMimeType = $file->getClientMimeType();\n\n if(!preg_match(\"/^(image).+$/\", $clientMimeType)) {\n Log::info(\"error not an image \". $clientMimeType);\n return response()->json([\"error\" => \"Not an Image\"], 200);\n }\n\n $original = config('image.profile.original.path') . $fileName;\n\n \\Storage::disk('public')->put( $original , file_get_contents( $file->getRealPath()) );\n \n //persist the record to the db\n $photo = new Photo();\n $photo->property_id = $request->id;\n $photo->url = $original;\n $photo->save();\n\n return response()->json([\"url\" => $original], 200);\n }\n \n return response()->json([\"error\" => \"No File Selected\"], 504);\n }", "public function createEntity();", "public function newAction(Request $request)\n {\n $photo = new Photos();\n $form = $this->createForm('Bo\\AdminBundle\\Form\\PhotosType', $photo);\n $form->handleRequest($request);\n\n if ($form->isSubmitted() && $form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($photo);\n $em->flush();\n\n return $this->redirectToRoute('photos_show', array('id' => $photos->getId()));\n }\n\n return $this->render('photos/new.html.twig', array(\n 'photo' => $photo,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('backend.photos.create');\n }", "public function create($entity);", "public function store(Request $request)\n {\n $this->validate($request, [\n 'file' => 'required|image|max:10240',\n ]);\n\n $photo = new Photo();\n $photo->user_id = Auth::id();\n $photo->path = $this->uploadImg($request->file('file'), 'submissions/img');\n $photo->thumbnail_path = $this->createThumbnail($request->file('file'), 600, null, 'submissions/img/thumbs');\n $photo->save();\n\n return new PhotoResource($photo);\n }", "public function actionCreate()\n {\n $model = new Gallery();\n $file = new UploadForm();\n $file->imageFile = UploadedFile::getInstance($file, 'imageFile');\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n if ($file->upload($model->id, null, $file::TYPE_GALLERY)) {\n $model->image = $file->getNameImage($model->id, null, $file::TYPE_GALLERY);\n $model->save();\n } else {\n $model->image = null;\n $model->save();\n }\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', compact('file', 'model'));\n }\n }", "public function actionCreate()\n {\n $model = new Images();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->image_id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function store(Request $request) {\n // Validates inputs as required\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required',\n 'photo' => 'required|image|max:1999|'\n ]);\n\n /* GET PHOTO */\n //Get full file\n $fileNameWithExt = $request->file('photo')->getClientOriginalName();\n // Get file name\n $fileName = pathinfo($fileNameWithExt, PATHINFO_FILENAME);\n //Get file extension\n $fileExt = $request->file('photo')->getClientOriginalExtension();\n // Compose final file\n $fileToUpload = $fileName . '_' . time() . '.' . $fileExt;\n // Upload image\n $path = $request->file('photo')->storeAs('public/photos/'.$request->input('album_id'), $fileToUpload);\n\n /* MAKE NEW ALBUM */\n $photo = new Photo;\n $photo->album_id = $request->input('album_id');\n $photo->title = $request->input('title');\n $photo->description = $request->input('description');\n $photo->size = $request->file('photo')->getClientSize();\n $photo->photo = $fileToUpload;\n $photo->save();\n\n return redirect('/albums/'.$request->input('album_id'))->with('success', 'Photo Uploaded');\n }", "public function store(PictureRequest $request)\n {\n //\n $id = Auth()->user()->id;\n $validatedData = $request->validated();\n $data = [\n \"user_id\" => $id,\n \"title\" => $validatedData[\"title\"],\n \"photos\" => $validatedData[\"photos\"],\n \"photoCount\" => count($validatedData[\"photos\"]),\n \"photoTag\" => Str::slug($validatedData[\"title\"])\n ];\n\n Picture::create($data);\n\n return response()->json([\n \"status\" => \"success\",\n \"status_code\" => StatusCodes::SUCCESS,\n \"message\" => \"Photos uploaded successfully\",\n \"data\" => array(\n \"user_id\" => $data[\"user_id\"],\n \"title\" => $data[\"title\"],\n \"photos\" => $data[\"photos\"]\n )\n ],StatusCodes::SUCCESS);\n }", "public function actionAddPhoto()\n {\n $form = new HomeImageForm();\n if ($form->load(Yii::$app->request->post()) && $form->validate()) {\n try {\n $this->service->create($form);\n Yii::$app->session->setFlash('success','Успешно загружено. Ожидайте модерацию' );\n return $this->redirect(['index']);\n }catch (\\RuntimeException $e) {\n Yii::$app->session->setFlash('danger', $e->getMessage());\n }\n }\n\n return $this->render('create', [\n 'model' => $form,\n ]);\n\n }", "public function create()\n {\n return view('backEnd.photos.create');\n }", "function create($entity);", "public function create(Entity $entity);", "public function create()\n {\n //\n\t\treturn View::make('photos.create');\n }", "public function store(Request $request)\n {\n $this->repository->store($request); \n\n return redirect(route('photo.create')); \n }", "public function create()\n {\n return view('back.photo.create'); \n }", "public function photoCreate()\n {\n $gallery_id = Input::get('gallery_id');\n $gallery = PhotoGallery::where('id', '=', $gallery_id)->first();\n $data['thisPageId'] = $this->thisPageId;\n $data['thisModuleId'] = $this->thisModuleId;\n $flags = $this->language->getAllDataNoPagination();\n\n return view('cms.modules.multicms.photos_addnew', compact('flags', 'gallery'), $data);\n\n }", "public function store(Request $request, $photo)\n {\n $file = $request->file('file');\n if($file){\n $ext = $file->getClientOriginalExtension();\n $height = Image::make($file)->height();\n $width = Image::make($file)->width();\n $original = Image::make($file)->fit($width, $height)->encode($ext, 70);\n $thumb1 = Image::make($file)->fit(250, 200)->encode($ext, 70);\n $thumb2 = Image::make($file)->fit(1200, 600)->encode($ext, 70);\n $path = \"noticia/\" . date('Y/m/d/') . 'fotos/';\n $this->storage->put($path. 'original-' . $file->hashName(), $original);\n $this->storage->put($path. '250x200-'. $file->hashName(), $thumb1);\n $this->storage->put($path. '1200x600-'. $file->hashName(), $thumb2);\n $hashname = $file->hashName();\n }\n $record = new PhotoArticle;\n $record->path = $path;\n $record->image = $hashname;\n $record->article_id = $photo;\n $record->save();\n\n return response()->json([\n 'initialPreview' => ['/storage/'.$path. 'original-' . $hashname],\n 'initialPreviewConfig' => [\n ['key' => $record->id, 'exif' => $this->storage->path($path. 'original-' . $hashname)]\n ]\n ]);\n }", "public function createImage()\n\t{\n\t\t$now = Carbon::now()->timestamp;\n\n\t\t$image = new Ot_Images();\n\t\t$image->spherical_id = $now;\n\t\t$image->title = Input::get('title');\n\t\t$pathUpload = 'uploads/images';\n\t\tif (Input::hasFile('image_url')) {\n\t\t\t$img = Input::file('image_url');\n\t\t\t$name = $now . '-' . $img->getClientOriginalName();\n\t\t\tImage::make($img->getRealPath())->resize(180, 90)->save($pathUpload . '/thumb/' . $name);\n\t\t\t$img->move($pathUpload, $name);\n\n\t\t\t$image->image_url = $name;\n\t\t}\n\t\t$image->description = Input::get('description');\n\t\tif (Input::get('is_public') == true) {\n\t\t\t$image->is_public = 1;\n\t\t} else {\n\t\t\t$image->is_public = 0;\n\t\t}\n\t\t$image->created_by = Auth::user()->name;\n\t\t$image->updated_by = Auth::user()->name;\n\t\t$image->view_url = \"/image/\" . $now;\n\t\t$image->save();\n\n\t\treturn Redirect::to('admincp/image/new');\n\t}", "public function store(Request $request)\n {\n //return $request->all();\n $request->validate($this->getCreateValidateRules($request));\n\n $data = $request->except(['_token', 'related_photo', 'photo']);\n $data['user_id'] = $request->user()->id;\n $data['slug'] = slugThis($data['name']);\n $data['created_at'] = now();\n $data['photo'] = 'default_img.jpg';\n\n if($request->hasFile('photo')){\n $photo = $request->file('photo');\n $photoName = \"product_cover_\".time().\".\".$photo->getClientOriginalExtension();\n\n $this->uploadProductCoverImage($photo, $photoName);\n $data['photo'] = $photoName;\n }\n\n $newProductId = DB::table('products')->insertGetId($data);\n\n if($request->hasFile('related_photo')){\n foreach ($request->file('related_photo') as $index=>$relatedPhoto){\n\n $photoName = \"product_related_$index\".time().\".\".$relatedPhoto->getClientOriginalExtension();\n Image::make($relatedPhoto)->resize(600, 600)->save(base_path('uploads/product/related/600x600/'.$photoName));\n ProductPhoto::create(['product_id' => $newProductId, 'photo' => $photoName]);\n }\n }\n\n return redirect()->route('admin.product.index')->with('success', __('backend.Product created'));\n }", "public function store(PostsCreateRequest $request)\n {\n //\n $input= $request->all();\n $user= Auth::user();\n //return $user;\n if($file= $request->file('photo_id')){\n\n $name= time() .$file->getClientOriginalName();\n $file->move('images', $name);\n $photo = Photo::create(['file' =>$name]);\n $input['photo_id'] = $photo->id;\n }\n //usefull to create post and inject it in the user post table by using the relationship\n $user->posts()->create($input);\n // Post::create($input);\n return redirect('/admin/posts');\n\n }", "public function save(Photo $photo);", "public function create()\n {\n\n $postData = $this->request->request->all();\n $imageData = $postData['image'];\n\n $user = $this->user;\n $user->setUpdateDate(new \\DateTime());\n $timeStamp = $user->getUpdateDate()->getTimestamp();\n\n # Ensure directory is created\n $dirPath = '/images/photos/checkins/' . $user->getId();\n\n if (!file_exists(ROOTDIR . \"/\" . $dirPath)) {\n mkdir(ROOTDIR . \"/\" . $dirPath, 0777, true);\n }\n\n $filePath = $dirPath . '/' . (time() * rand(100, 1000)) . '.jpg';\n $photoUrl = filter_var($imageData, FILTER_VALIDATE_URL);\n\n if ($photoUrl !== false) {\n $uri = $photoUrl;\n } else {\n ImageHelper::saveImageFromBase64($imageData, ROOTDIR . $filePath);\n $uri = $filePath . \"?\" . $timeStamp;\n }\n\n $postData['uri'] = $uri;\n\n $checkIn = $this->checkInRepo->map($postData, $this->user);\n $this->checkInRepo->insert($checkIn);\n\n return $this->_generateResponse($checkIn->toArray(), Status::CREATED);\n }", "public function store($id, AddPhotoRequest $request)\n {\n $property = Property::find($id);\n\n if($property->photos()->count() === 10) {\n\n return response()->json([\n \"Property cannot have more than 10 photos\"\n ], 403);\n \n }\n\n $photo = $request->file('photo');\n\n try {\n\n (new AddPhotoToProperty($property, $photo))->saveToImgur();\n\n } catch(\\Exception $e) {\n\n return $e->getMessage();\n }\n\n \n\n }", "public function create($request) {\n\n\t\t$image = $request['photo'];\n\t\tif($image !== null) {\n\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t$request['photo'] = $name;\n\t\t} else {\n\t\t\t$request['photo'] = \"product-empty.png\";\n\t\t}\n\t\t$request['user_id'] = auth()->user()->id;\n\t\treturn $this->product->create($request);\n\t}", "public function actionCreate()\n {\n $model = new Posts();\n if ($model->load(Yii::$app->request->Post())){\n $model->imageFile = UploadedFile::getInstance($model, 'imageFile');\n if ($model->upload()) {\n $model->imageFile = null;\n if ($model->save(false)) {\n return $this->redirect(['view', 'id' => $model->id]);\n } \n }\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function createAction()\n {\n $entity = new File();\n $request = $this->getRequest();\n $form = $this->createForm(new FileType(), $entity);\n $form->bindRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getEntityManager();\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('hypo_test_file_show', array('id' => $entity->getId())));\n \n }\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView()\n );\n }", "public function store(PostsCreateRequest $request)\n {\n //\n $input = $request->all();\n\n $input['user_id'] = Auth::user()->id;\n\n \n\n if (!$input['category_id']) {\n unset($input['category_id']);\n }\n $post = Post::create($input);\n //dd($input);\n if ($request->file('photo')) {\n $photo = $request->file('photo');\n $fileName = time().'_'.rand(10000,99999).'.'.$photo->getClientOriginalExtension();\n\n $photo->move(public_path('images/photos'), $fileName);\n\n $photoModel = Photo::create(['file'=>$fileName]);\n $photoModel->save();\n\n $post->photo()->associate($photoModel);\n \n }\n $post->save();\n\n Session::flash('message_success', 'post added: '.$post->name);\n\n return redirect('/admin/posts');\n }", "public function store(Request $request, ImageUploadHandler $uploader, Photo $photo)\n {\n $this->authorize('content_management', \\Auth::user());\n\n $this->validate($request, [\n 'title' => 'required',\n 'src' => 'required',\n ]);\n $data = $request->all();\n if ($request->src) {\n $result_l = $uploader->save($request->src, 'photos', 'l', 1920);\n if ($result_l) {\n $data['src'] = $result_l['path'];\n $data['thumbnail']=$result_l['thumb_path'];\n }\n }\n Photo::create($data);\n session()->flash('success', '图片添加成功');\n return redirect()->route('photos.index');\n }", "public function create()\n\t{\n\t\treturn View::make('photos.create');\n\t}", "public function store(Request $request)\n {\n \n $file = $request->file('file');\n\n\n $name = time() . $file->getClientOriginalName();\n\n $file->move('images', $name);\n\n\n\n Photo::create(['file'=>$name]);\n\n Session::flash('message', 'Photo added!');\n Session::flash('status', 'success');\n\n }", "public function store(Request $request)\n {\n if($file = $request->file('photo_id')) {\n\n\n $name = time() . $file->getClientOriginalName();\n\n\n $file->move('images', $name);\n\n $photo = Photo::create(['file'=>$name]);\n\n\n\n $input['photo_id'] = $photo->id;\n\n $input['name'] = $request->name;\n\n //$input['type_id'] = $request->type_id;\n\n\n\n\n }\n\n\n Ground::create($input);\n\n\n Session::flash('created_ground','The ground has been added.');\n return redirect('/admin/grounds');\n\n\n }", "public function actionCreate()\r\n {\r\n $model = new PhotoAlbum;\r\n\r\n // Uncomment the following line if AJAX validation is needed\r\n // $this->performAjaxValidation($model);\r\n\r\n if (isset($_POST['PhotoAlbum'])) {\r\n $model->attributes = $_POST['PhotoAlbum'];\r\n if ($model->save()) {\r\n if (Yii::app()->request->isAjaxRequest) {\r\n exit(CJSON::encode(array(\r\n 'status' => 'success',\r\n 'message' => \"PhotoAlbum successfully added\"\r\n )\r\n ));\r\n\r\n } else\r\n $this->redirect(array('view', 'id' => $model->id));\r\n }\r\n }\r\n\r\n $model->uid = user()->getId();\r\n\r\n if (Yii::app()->request->isAjaxRequest) {\r\n exit(CJSON::encode(array(\r\n 'status' => 'failure',\r\n 'form' => $this->renderPartial('_form', array('model' => $model), true)\r\n )\r\n )\r\n );\r\n\r\n } else\r\n $this->render('create', array('model' => $model,));\r\n\r\n }", "public function create_com_photo($id)\n {\n return view('Photos/picture_com_add')->withCreate('')->withId($id);\n\n }", "protected function createPhotoInstance(array $data): Photo\n {\n return new Photo([\n 'title' => $data['title'] ?? '',\n 'description' => $data['description'] ?? '',\n\n 'provider' => $data['provider'] ?? null,\n 'extern_id' => $data['extern_id'] ?? null,\n ]);\n }", "public function create()\n {\n \n return view('photos.create');\n }", "public function store(PostsCreateRequest $request)\n {\n //\n $input = $request->all();\n $user = Auth::user();\n if($file = $request->file('photo_id'))\n {\n //grab the file name from client machine and append current dat and time to it, creating an unique name\n $tempname = time().$file->getClientOriginalName();\n //replace any blank spaces \n $name = str_replace(' ','',$tempname);\n //move the file to host machine i.e under public/images\n $file->move('images',$name);\n //Persist data('name') into Photo database\n $photo=Photo::create(['name'=>$name]);\n //grab the photo_id generated while persisting the photo into Photo Database(step above). \n $input['photo_id'] = $photo->id;\n }\n //encrypt the password\n $input['user_id'] = $user->id;\n //persist the data into User database\n Post::create($input);\n //redirect to view users page\n return redirect('/admin/posts');\n //return $request->all();\n }", "public function store(Request $request)\n {\n $request->validate([\n 'product_id' => 'required|integer',\n 'photo' => 'required|image|max:1024',\n 'is_default' => 'nullable|integer'\n ]);\n $data = $request->all();\n $data['photo'] = $request->photo->store('photo_product', 'public');\n $gallery = GalleryProduct::create($data);\n return response()->json($gallery);\n }", "public function createAction(Request $request)\n {\n $entity = new GalleryImage();\n $form = $this->createForm(new GalleryImageType(), $entity);\n $form->bind($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('_show', array('id' => $entity->getId())));\n }\n\n return $this->render('HamdiMediaBundle:GalleryImage:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function store(Request $request)\n {\n $validator = Validator::make($request->all(), [\n 'category_id' => 'required|max:200',\n 'title' => 'required|unique:photos|max:200',\n 'file' => 'required | mimes:jpeg,jpg',\n ]);\n\n if ($validator->fails()) {\n alert()->warning('Validation Error', 'Error');\n return redirect()->back()->withErrors($validator)->withInput();\n }\n $logo = $this->uploadSliderImage($request);\n $photo = new Photo();\n $photo->image = $logo ?? null;\n $photo->title = $request->title;\n $photo->category_id = $request->category_id;\n $photo->visibility = $request->status;\n $photo->save();\n alert()->success('New photo added.', 'Successfully!');\n return redirect()->route('photo.index');\n }", "public function store(Request $request)\n {\n return response()->json( Gallery::CreateUserPhoto(), 200);\n }", "public function store(StorePhotoRequest $request)\n {\n $image = $request->file('image');\n $size = $request->image->getSize();\n $filename = $image->hashName();\n\n\n $format = $request->image->getClientOriginalExtension();\n $path = 'uploads/'.$filename;\n $path1 = 'uploads/1280x1024/'.$filename;\n $path2 = 'uploads/316x255/'.$filename;\n $path3 = 'uploads/118x95/'.$filename;\n\n Image::make($image->getRealPath())->resize(800, 600)->save($path);\n Image::make($image->getRealPath())->resize(1280, 1024)->save($path1);\n Image::make($image->getRealPath())->resize(316, 255)->save($path2);\n Image::make($image->getRealPath())->resize(118, 95)->save($path3);\n\n $photo = new Photo();\n $photo->title = $request->title;\n $photo->description = $request->description;\n $photo->file = $filename;\n $photo->format = $format;\n $photo->size = $size;\n $photo->save();\n\n return redirect()->route('photos.index')->with('success', 'Photo uploaded');\n }", "public function create(Request $request,$id)\n {\n $data = new Image;\n\n $data->title=$request->input('Title');\n $data->product_id=$id;\n $data->image=Storage::putFile('images',$request->file('Image') );\n $data->save();\n\n return $this->show($id);\n }", "public function create()\n {\n return view('fotos.create');\n }", "public function create()\n\t{\n\t\t$image = $this->uploadImage();\n if ($image) {\n $this->data('image', $image);\n }\n\t\t$this->data([\n\t\t\t'story_title' => $this->request->post('story_title'),\n\t\t\t'story_name' => $this->request->post('story_name'),\n\t\t\t'details' => $this->request->post('details'),\n\t\t\t'status' => $this->request->post('status'),\n\t\t\t'created_at' => date('Y-m-d H:i:s'),\n\t\t])->insert($this->table);\n\t}", "public function store(Request $request)\n {\n $this->validate($request, $this->rules, $this->errorMessages );\n $photo = new Photo;\n $photo->album_id = request()->input('album_id');\n $this->ProcessFile($photo, $request);\n $photo->name = request()->input('name');\n $photo->description = request()->input('description');\n\n $res = $photo->save();\n //return ' '.$res;\n return redirect()->route('albums');\n }", "public function store(Request $request)\n {\n $product = new Product($request->all());\n if($request->hasFile('photo') && $request->file('photo')->isValid()) {\n $file = $request->file('photo');\n $path = $file->getRealPath();\n $photo = file_get_contents($path);\n $base64 = base64_encode($photo);\n $product->photo = $base64;\n }\n // dd($object);\n try {\n $result = $product->save();\n } catch(\\Exception $e) {\n dd($e);\n $result = 0;\n }\n if($product->id > 0) {\n $response = ['op' => 'Create', 'r' => $result, 'id' => $product->id];\n return redirect('/home')->with($response);\n } else {\n return back()->withInput()->with(['error' => 'algo ha fallado']);\n }\n }", "public function actionCreate()\n {\n $model = new ServiceFoodBeverage();\n\n if ($model->load(Yii::$app->request->post())) {\n $model->photo = UploadedFile::getInstance($model, 'photo');\n if ($model->photo){ \n $photo_name='pd_'.date('Ymdhis').'.' . $model->photo->extension; \n $model->photo->saveAs(\\Yii::$app->basePath.'/web/images/' . $photo_name);\n $model->photo=$photo_name;\n }\n $model->date=date('Y-m-d');\n $model->user_id=Yii::$app->user->id;\n if($model->save())\n {\n Yii::$app->session->setFlash('yes',Yii::t('app','Created successfully.'));\n return $this->redirect(['index']);\n }\n }\n\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function create(Request $req)\n {\n //\n $id = $req->has('album_id') ? $req->input('album_id') : null;\n $album = Album::firstOrNew(['id' => $id]);\n\n $photo = new Photo;\n\n return view('editimage', compact('album','photo'));\n }", "public function create(): void\n {\n\n $description = null;\n $image = null;\n $velo_id = null;\n\n if (!empty($_POST['description']) && $_POST['description'] != \"\") {\n $description = htmlspecialchars($_POST['description']);\n }\n if (!empty($_POST['image'])) {\n $image = htmlspecialchars($_POST['image']);\n }\n if (!empty($_POST['velo_id']) && ctype_digit($_POST['velo_id'])) {\n $velo_id = $_POST['velo_id'];\n }\n\n if (!$description || !$image || !$velo_id) {\n die(\"formulaire mal rempli\");\n }\n\n $this->model->insert($description, $image, $velo_id);\n\n \\Http::redirect(\"index.php?controller=velo&task=show&id=$velo_id\");\n }", "public function create()\n {\n\n $attributes = request()->validate([\n 'post_heading' => ['required', 'max:255'],\n 'post_title' => ['required', 'max:255'],\n 'post_content' => ['required'],\n 'thumbnail' => ['image', 'required']\n ]);\n $attributes['post_content'] = addslashes(preg_replace(\"@[\\n\\r]@\", \"\", $attributes['post_content']));\n $path = request()->file('thumbnail')->store('thumb');\n Post::create(array_merge($attributes, [\n 'user_id' => auth()->user()->id,\n 'thumbnail' => $path\n ]));\n return redirect('/')->with('success', 'Post was successfully published.');\n }", "public function newAction()\n {\n $entity = new Picture();\n $form = $this->createCreateForm($entity);\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create(ImageCreateRequest $request) {\n $storedFile = $this->storeImage($request->file('image'));\n if ($storedFile == false) {\n throw new RuntimeException('failed to store uploaded file.');\n }\n $image = $this->imageRepository->create([\n 'title' => $request->title,\n 'link' => Storage::url($storedFile)\n ]);\n\n return $image;\n }", "public function store(CreatePhotoServicesRequest $request)\n\t{\n\t $request = $this->saveFiles($request);\n\t\tPhotoServices::create($request->all());\n\n\t\treturn redirect()->route(config('quickadmin.route').'.photoservices.index');\n\t}", "public function store(CreateFotoRequest $request)\n {\n $input = $request->all();\n\n $foto = $this->fotoRepository->create($input);\n\n Flash::success('Foto saved successfully.');\n\n return redirect()->back();\n }", "public function create()\n {\n $invoice = new InvoiceEntity();\n $invoice->setNumber('019101910191091')\n ->setValue(100.90)\n ->setUrl('http://domain.com')\n ->setIssuanceDate('2017-09-15')\n ->setKey('POL9898AS');\n\n $tracking = new TrackingEntity();\n $tracking->setOrderId('00001010101AA')\n ->setStatus('in_route')\n ->setCode('BR800OPR5')\n ->setInvoice($invoice);\n\n $this->dm->persist($tracking);\n $this->dm->flush();\n }", "public function store(Request $request)\n {\n try {\n if ($request->hasFile('photo')) {\n $file = $request->file('photo');\n $file_format = $file->getClientOriginalExtension();\n if ($file_format != \"jpg\" && $file_format != \"png\" && $file_format != \"jpeg\") {\n return response()->json(['content' => 'Format File Not Accept', \"error\" => true], 400);\n }\n $name = str_random(4) . \"_\" . $file->getClientOriginalName();\n $file->move(\"upload/product\", $name);\n\n } else {\n return response()->json(['content' => 'Please Choose File', \"error\" => true], 400);\n }\n $data = $request->only('product_id') + ['photo' => $name];\n $product = $this->_photoRepository->create($data);\n $result = array(\n 'status' => 'OK',\n 'message' => 'Insert Successfully',\n 'data' => $product\n );\n return response()->json($result, Response::HTTP_CREATED, [], JSON_NUMERIC_CHECK);\n } catch (Exception $e) {\n $result = array(\n 'status' => 'ER',\n 'message' => 'Insert Failed',\n 'data' => ''\n );\n return response()->json($result, Response::HTTP_BAD_REQUEST, [], JSON_NUMERIC_CHECK);\n }\n\n }", "public function addPhoto($id, Request $request)\n {\n $this->validate($request, [\n 'photo' => 'required|mimes:jpg,jpeg,png,bmp'\n ]);\n\n $photo = $this->makePhoto($request->file('photo'));\n\n //Save and associate photo with PhotoSession\n PhotoSession::findOrFail($id)->addPhoto($photo);\n }", "public function __construct(Photo $photo)\n {\n $this->photo = $photo;\n }", "public function setPhoto(Photo $photoObject);", "public function store(Request $request)\n {\n \n $this->validate($request, [\n 'image_title' => 'required',\n 'image_description' => 'required',\n 'image' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:10000'\n ]);\n $path = $request->file('image')->store('images', 'public');\n $request_data = $request->all();\n $request_data['image'] = $path;\n PhotoGalary::create($request_data);\n return redirect(\"admin/album/\" .$request_data['album_id']);\n\n }", "public function store(Request $request)\n {\n //Users::create($request->all());\n $this->validate($request, [\n 'nama' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users',\n 'password' => 'required|min:6|required',\n 're-pass' => 'required|same:password',\n ]);\n $user = new User;\n $user->nama_lengkap = Input::get('nama');\n $user->email = Input::get('email');\n $user->password = md5(Input::get('password'));\n $user->id_photo = 'u'.Input::get('email');\n $user->save();\n\n $foto = new Photo;\n $foto->id_photo = 'u'.Input::get('email');\n $foto->save();\n\n return Redirect::to('/home');\n }", "public function createEntity($data = array());", "public function actionCreate()\n {\n $model = new Post();\n $categories = Category::find()->select(['name', 'id'])->indexBy('id')->column();\n $user = Yii::$app->user->identity;\n\n if (Yii::$app->request->isPost) {\n $model->img = UploadedFile::getInstance($model, 'img');\n\n if($model->img)\n {\n $imageName = md5(time() . $model->img->baseName);\n $path = Yii::getAlias('@webroot/upload/images/').$imageName. \".\" .$model->img->extension;\n $model->img->saveAs($path);\n $imageFile = $imageName . \".\" .$model->img->extension;\n }\n\n }\n\n if ($model->load(Yii::$app->request->post())) {\n $model->img = $imageFile;\n $model->created_at = time();\n $model->updated_at = 0;\n $model->poster_id = $user->id;\n $model->save();\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n 'category' => $categories,\n ]);\n }\n }", "public function store(Request $request)\n {\n $this->validate($request, ['album_id'=> 'required|exists:albums,id', 'url_image' => 'required']);\n $image = Image::create(['album_id' => $request['album_id'], 'url_image' => $request['url_image']]);\n return $this->showOne($image);\n }", "public function store( PostRequest $request )\n {\n $strpos = strpos( $request->photo, ';' );\n $subString = Str::substr( $request->photo, 0, $strpos );\n $extention = explode( '/', $subString )[1];\n\n $image_name = time() . \".\" . $extention;\n\n $img = Image::make( $request->photo )->resize( 800, 350 );\n $path = public_path() . \"/upload/\";\n $img->save( $path . $image_name );\n\n $post = new Post();\n $post->user_id = auth()->user()->id;\n $post->category_id = $request->category_id;\n $post->title = $request->title;\n $post->slug = Str::slug( $request->title );\n $post->description = $request->description;\n $post->photo = $image_name;\n $post->save();\n\n return ['message' => 'Post Created'];\n }", "public function actionCreate() {\n $model = new News();\n// $id = Yii::$app->user->id;\n if ($model->load(Yii::$app->request->post())) {\n $model->user_id = \\Yii::$app->user->id;\n $model->date = date('y-m-d h:m:s');\n $model->save();\n// print_r($model->getErrors());\n// die();\n// return $this->redirect(['view', 'id' => $model->id]);\n // return $this->redirect(['view', 'id' => $model->id]);\n $imageName = Yii::$app->security->generateRandomString();\n $image = \\yii\\web\\UploadedFile::getInstance($model, 'picture');\n\n if ($image !== null) {\n $model->picture = $image->getBaseName();\n $path = Yii::getAlias('../web/picture/') . $model->picture;\n\n// print_r($model->getErrors());\n// die();\n }\n if ($model->save()) {\n ($image !== null) ? $image->saveAs($path) : '';\n// print_r($model->getErrors());\n// die();\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n \n }\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n// } else {\n// return $this->render('create', [\n// 'model' => $model,\n// ]);\n }", "public function store(Request $request)\n {\n request()->validate([\n 'photo' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:6048',\n ]);\n $thumb = $request->file('photo');\n $thumbimage = $thumb->getClientOriginalName();\n $thumb->move(public_path('/operators/'), $thumbimage);\n DB::table('operators')->insert([\n 'name' => $request->input('name'),\n 'image' => $thumbimage\n ]);\n return redirect('/operator')->with('success', 'New has been Created');\n }", "public function upload_photo(){\n $sql=\"INSERT INTO photos \";\n $sql.=\"(name,size,type,date,img_navigacija_id) VALUES ('{$this->name}',$this->size,'{$this->type}',NOW(),2)\";\n self::$connect->query($sql);\n\n\n }", "public function store(ItemsCreateRequest $request)\n {\n\n $input = $request->all();\n\n\n if($file = $request->file('photo_id')){\n\n $name = $file->getClientOriginalName();\n\n $file->move('images', $name);\n\n $photo = Photo::create(['file'=>$name]);\n\n $input['photo_id'] = $photo->id;\n }\n\n Item::create($input);\n\n return redirect('/admin/items');\n\n\n\n\n }", "public function create(Photo $photo)\n {\n $this->authorize('content_management', \\Auth::user());\n return view('photos.edit', compact('photo'));\n }", "public function create()\n {\n $model = $this->createOrFind();\n $model->created_by = \\Auth::user()->id;\n if (!$model->sizes) {\n $model->sizes = serialize(config('base.images'));\n }\n if (!$model->images_types) {\n $model->images_types = serialize(config('base.images_types'));\n }\n\n $model->save();\n return view($this->view . '.create', compact('model'));\n }", "public function create()\n {\n $attachment = $this->Attachments->newEntity();\n \n if ($this->request->is('post')) {\n \n // Assure file was uploaded\n if (!array_key_exists('file', $_FILES)) {\n $this->set('error', 'No attachment provided');\n $this->set('_serialize', [ 'error' ]);\n return;\n }\n \n $uuid = Text::uuid();\n $file = $_FILES['file'];\n \n // Validate file upload\n if ($file['error'] !== UPLOAD_ERR_OK) {\n switch ($file['error']) {\n case UPLOAD_ERR_INI_SIZE:\n $this->set('error', 'The selected file is too big');\n break;\n case UPLOAD_ERR_FORM_SIZE:\n $this->set('error', 'The selected file is too big');\n break;\n case UPLOAD_ERR_NO_FILE:\n $this->set('error', 'No attachment provided');\n break;\n default:\n $this->set('error', 'An unexpected error occured');\n }\n $this->set('_serialize', [ 'error' ]);\n return;\n }\n \n // Move uploaded file\n if (!move_uploaded_file($file[\"tmp_name\"], UPLOADS . $uuid)) {\n $this->set('error', 'An unexpected error occured');\n $this->set('_serialize', [ 'error' ]);\n return;\n }\n \n $data = $this->request->getData();\n \n $data['path'] = $uuid;\n $data['name'] = $file['name'];\n $data['mime'] = $file['type'];\n $data['size'] = $file['size'];\n $attachment = $this->Attachments->patchEntity($attachment, $data);\n if (!$this->Attachments->save($attachment)) {\n $this->set('error', 'An unexpected error occured');\n $this->set('_serialize', [ 'error' ]);\n return;\n }\n }\n \n $this->set('attachment', $attachment);\n $this->set('_serialize', 'attachment');\n }", "public function store(int $id, Request $request)\n {\n foreach ($request->photos as $photo) {\n $filename = Str::random(10).'.'.$photo->extension();\n\n $path = $photo->storeAs('public/images', $filename);\n\n $photo = $this->photo->create([\n 'url' => config('app.url').'/storage/images/'.$filename,\n 'property_id' => $id,\n ]);\n }\n\n return back()\n ->with('success', 'Foto(s) anexada(s) com sucesso!')\n ;\n }", "public function store(Request $request)\n {\n //\n // $this->validate($request, [\n // 'name' => 'required',\n // 'description' => 'required',\n // 'image' => 'image',]);\n\n $new_product = new Product();\n\n if($request->file('image')) {\n $image = $request->file('image');\n $filename = time() . \".\" . $image->getClientOriginalExtension();\n Image::make($image)->save(public_path('files/products_img/' . $filename));\n $image = $filename;\n }\n\n $new_product->name = $request->name;\n $new_product->description = $request->description;\n $new_product->price = $request->price;\n $new_product->count = $request->count;\n $new_product->type = $request->type;\n $new_product->meta_keywords = $request->meta_keywords;\n $new_product->meta_description = $request->meta_description;\n $new_product->created_at = Carbon::now('Europe/Samara');\n $new_product->updated_at = Carbon::now('Europe/Samara');\n $new_product->save();\n\n //сохранение фото через метод связи\n $new_product->photos()->create([\n 'product_id' => $new_product->id,\n 'name' => $image,\n 'alt' => $request->alt,\n 'created_at' => Carbon::now('Europe/Samara'),\n 'updated_at' => Carbon::now('Europe/Samara'),\n ]);\n\n return redirect()->route('productions.index');\n\n\n }", "public function store(Request $request)\n\t{\n\t $artistId = $request->input('artist_id');\n\t\t\t$title = $request->input('title');\n\n\t\t\tif($this->findDuplicate($artistId, $title)) {\n\t\t\t\t\treturn \\Illuminate\\Support\\Facades\\Redirect::back()->withErrors('An image with this title already exists for this artist. Please modify the title or check the artist.')->withInput();\n\t\t\t}\n\n\t\t\tif ($request->hasFile('file')) {\n\t\t\t$photo = Photo::create($request->all());\n\t\t\t$files = $this->handleUpload($request);\n\n\t\t\t$photo->large_file = $files['large'];\n\t\t\t$photo->preview_file = $files['preview'];\n\t\t\t$photo->thumbnail_file = $files['thumbnail'];\n\n\t\t\tif ($photo->save()) {\n\t\t\t\t\treturn Redirect::route('admin.photo.index')->with('success', 'Photo saved.');\n\t\t\t}\n\t\t\t} else {\n\t\t return Redirect::back()->withErrors('Could not find file after uploading. Check the filename to see if it contains illegal characters or if the file was over 40MB.')->withInput();\n\t\t\t}\n\n\t\t\treturn Redirect::back()->withErrors($photo->getErrors())->withInput();\n\t}", "public function createObject($data) {\n // Try to save the picture uploaded\n if(!$picturePath = $this->handlePictureUpload())\n return false;\n\n $query = $this->MvcInstance->db_conn->prepare(\n \"INSERT INTO {$this->tableName} \" .\n \"(Picture, FirstName, LastName, Email, PhoneNumber, HireDate, JobID, Salary, CommissionPCT, ManagerID, DepartmentID) VALUES \" .\n \"(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\");\n\n return $query->execute([\n $picturePath,\n $data['FirstName'],\n $data['LastName'],\n $data['Email'],\n $data['PhoneNumber'],\n $data['HireDate'],\n $data['JobID'],\n $data['Salary'],\n $data['CommissionPCT'],\n $data['ManagerID'],\n $data['DepartmentID']]);\n }", "public function create()\n {\n return response()->view('admin.photos.create');\n }", "public function create()\n\t{\n\t\treturn view('fotosModelos.create');\n\t}", "public function actionCreate()\n {\n $request = Yii::$app->request;\n $model = new CityPhoto();\n $model->scenario = 'create';\n $fileSuccess = NULL;\n\n $files = UploadedFile::getInstances($model, 'files');\n\n if($files) {\n foreach ($files as $file) {\n $model = new CityPhoto();\n \n\n if ($request->isPost) {\n \n $modelLoaded = $model->load($request->post());\n\n if (!$modelLoaded) {\n return $this->render('create', [\n 'model' => $model,\n 'errorMessage' => \"Missing parameters!\",\n ]);\n }\n \n //$conn = mysqli_connect(\"127.0.0.53\",\"root\", \"\", \"dbtest\");\n $photoPath = 'Uploads/' . $model->city->name . '---' . $file->name;//Yii::$app->security->generateRandomString();\n $fileSuccess = $file->saveAs($photoPath);\n if ($file && !$fileSuccess) {\n return $this->render('create', [\n 'model' => $model,\n 'errorMessage' => \"Cannot write file to disk!\",\n ]);\n }\n if ($file && $fileSuccess) {\n $model->setAttribute('photo', $photoPath);\n $model->save();\n }\n }\n }\n\n if ($model->validate()) {\n return $this->redirect(['view', 'id' => $model->city_photo_id]);\n }\n }\n\n return $this->render('create', [\n 'model' => $model,\n 'errorMessage' => NULL,\n ]);\n }", "public function store(Request $request)\n {\n //Guardamos el Producto\n $product = Product::create($request->all());\n\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('image',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $post->fill(['photo_1' => asset($path)])->save();\n\n }\n\n \n\n return redirect()->route('products.index')->with('info', 'Producto creado exitosamente!');\n }", "public function store(CreateImage $request)\n\t{\n\t\t$image = Image::create($request->all());\n\t\tif($request->hasFile('image'))\n\t\t{\n\t\t\tif($request->file('image')->isValid()) \n\t\t\t{\n\t\t\t\t$upload = $request->file('image');\n\t\t\t\t$moveUpload = $upload->move(storage_path() . '/uploads', $filename = time() . '-' . $upload->getClientOriginalName());\n\t\t\t\t$image->file = $filename;\n\t\t\t} else {\n\t\t\t\treturn redirect()->back()->withInput();\n\t\t\t}\n\t\t} \n\t\t$image->save();\n\t\treturn redirect('home/galleries');\n\t}", "public function actionCreate(){\n $model = new stdClass();\n $model->publisher = new Publisher;\n $model->picture = new Picture;\n \n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\t\tif(!empty(Yii::app()->request->getPost('publisherForm'))){\n $form = Yii::app()->request->getPost('publisherForm');\n $model->itemPicture = $form['pictures'];\n $model->publisher->attributes = $form;\n if($model->publisher->validate()){\n try {\n $transaction = $model->publisher->dbConnection->beginTransaction();\n $model->publisher->save();\n $publisherId = Yii::app()->db->getLastInsertID();\n //$authorId = 6;\n $picArr = PictureConvertor::pictureTransfer($form['pictures']);\n $model->itemPicture = json_encode($picArr);\n $idArr = array();\n $idArr = $model->picture->insertAllPictures($picArr);\n $itemPic = new ItemPicture;\n $itemPic->insertDependencies($publisherId, $idArr, $model->publisher->tableName());\n $transaction->commit();\n //$transaction->rollback();\n $this->redirect(array('view','id'=>$publisherId));\n } catch (Exception $e) {\n $transaction->rollback();\n PictureConvertor::rollback($picArr);\n }\n }\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function uploadPhoto($id = null){\n //are posted to the server.\n $this->viewBuilder()->setLayout('ext_file_upload');\n\n $path_parts = pathinfo($_FILES['photo']['name']);\n $unique = time();\n $dest = WWW_ROOT.\"img/nas/\".$unique.'.'.$path_parts['extension'];\n $dest_www = \"/cake3/rd_cake/webroot/img/nas/\".$unique.'.'.$path_parts['extension'];\n\n //Now add....\n $data['id'] = $this->request->getData('id');\n $data['photo_file_name'] = $unique.'.'.$path_parts['extension'];\n\n $uploadEntity = $this->{$this->main_model}->newEntity($data);\n if($this->{$this->main_model}->save($uploadEntity)){\n move_uploaded_file ($_FILES['photo']['tmp_name'] , $dest);\n $json_return['id'] = $uploadEntity->id;\n $json_return['success'] = true;\n $json_return['photo_file_name'] = $unique.'.'.$path_parts['extension'];\n }else{\n $message = 'Error';\n $json_return['errors'] = $this->JsonErrors->entityErros($uploadEntity, $message);\n $json_return['message'] = array(\"message\" => __('Problem uploading photo'));\n $json_return['success'] = false;\n }\n $this->set('json_return',$json_return);\n }", "public function store(Request $request)\n {\n //\n $input=$request->all();// haalt alle velden op\n\n if($file=$request->file('photo_id')){\n $name=time().$file->getClientOriginalName();\n $file->move('images',$name);\n $photo=Photo::create(['file'=>$name]);\n $input['photo_id']=$photo->id;\n }\n Product::create(['name'=>$input[\"name\"],'title'=>$input[\"title\"],\n 'description'=>$input[\"description\"],\n 'price'=>$input[\"Price\"],\n 'category_id'=>$input[\"category_id\"],\n 'brand_id'=>$input[\"brand_id\"],\n 'photo_id'=>$input[\"photo_id\"]]);\n return redirect('products');\n }", "public function store(Request $request){\n $image_name = null;\n if ($request->hasFile('photo')){\n $image_name = time().'.'.$request->photo->getClientOriginalName();\n $request->photo->move(public_path('images'), $image_name);\n }\n\n Post::create([\n 'title'=> $request->get('title'),\n 'slug' => Str::slug($request->get('title')),\n 'category_id' => $request->get('category_id'),\n 'body' => $request->get('body'),\n 'photo' => '/images/'.$image_name,\n 'user_id' => $request->get('user_id'),\n\n ]);\n return response()->json([\n 'message' => 'The Post add with success',\n ]);\n }", "public function store(Request $request)\n {\n\n if($request->hasFile('photo')){\n $extension = $request->file('photo')->getClientOriginalExtension();\n $fileNameToStore= time().'.'.$extension;\n $path = $request->file('photo')->storeAs('/public', $fileNameToStore);\n } else {\n $fileNameToStore = 'post.png';\n }\n\n $post = new Post;\n $post->title = $request->input('title');\n $post->id_user = auth()->user()->id;\n $post->contenu = $request->input('content');\n $post->img = $fileNameToStore;\n\n\n $post->save();\n return redirect('/profile');\n }", "private function _add_photo(){\n global $db;\n\n $photo_name = $db->quote($this->_photo_name);\n $photo_caption = $db->quote($this->_photo_caption);\n $file_name = $db->quote($this->_file_name);\n $file_type = $db->quote($this->_file_type);\n\n $sql = \"SELECT * FROM photos WHERE file_name = \".$file_name.\" LIMIT 1\";\n\n // if photo with file name $file_name is not present in database, insert into database\n if(!$db->query1($sql)->rowCount()){\n $sql = \"INSERT INTO photos (\";\n $sql .= \"photo_name, photo_caption, file_name, file_size, file_type, user_id\";\n $sql .= \") VALUES ( \";\n $sql .= $photo_name .\", \". $photo_caption .\", \". $file_name.\", \". $this->_file_size .\", \". $file_type.\",\" .$this->_user_id;\n $sql .= \")\";\n try {\n //adding photo to db\n $db->exec($sql);\n return \"Photo with name \".$photo_name.\" added, query Successful.\";\n } catch (Exception $e) {\n throw $e;\n }\n }\n else{\n throw new Exception(\"The file name \".$file_name. \" alrady exists\");\n }\n }" ]
[ "0.69726104", "0.67689604", "0.6723387", "0.6504086", "0.6366454", "0.636426", "0.636071", "0.63554937", "0.6308249", "0.6210118", "0.61672735", "0.6148431", "0.6077052", "0.60464895", "0.60335493", "0.6025153", "0.60214853", "0.6017426", "0.60113525", "0.6001169", "0.5992657", "0.59779155", "0.5958723", "0.59563386", "0.5937594", "0.5936165", "0.59358394", "0.59057784", "0.5905359", "0.589418", "0.589032", "0.5849336", "0.58412594", "0.5834175", "0.583215", "0.5830673", "0.5816562", "0.5800923", "0.5792461", "0.5782041", "0.5764906", "0.5757263", "0.57523984", "0.5732036", "0.57216036", "0.57202417", "0.57094675", "0.5704459", "0.5696116", "0.569139", "0.56813383", "0.5679673", "0.56792307", "0.5663755", "0.56604826", "0.5649916", "0.56498194", "0.56478447", "0.56471723", "0.5643765", "0.56266165", "0.56223", "0.560883", "0.56079996", "0.56028366", "0.56027097", "0.5591634", "0.55897474", "0.5586823", "0.5580988", "0.5565452", "0.55619454", "0.5551773", "0.5546729", "0.554421", "0.55335224", "0.5531819", "0.5529443", "0.55192333", "0.5515974", "0.5514592", "0.5512307", "0.5508002", "0.55068856", "0.5501865", "0.54997194", "0.5498807", "0.5486836", "0.5477919", "0.54742295", "0.54739255", "0.5473757", "0.5471956", "0.5471548", "0.54648423", "0.54647326", "0.54638946", "0.5457348", "0.54474294", "0.5441497", "0.5433406" ]
0.0
-1
Displays a form to edit an existing Attachment entity.
public function editAction(Request $request, $id, $document_id) { if (!$this->container->getParameter('manhattan_posts.include_attachments')) { throw new AccessDeniedHttpException('Attachment functionality has not been enabled in the bundle.'); } if (false === $this->get('security.context')->isGranted('ROLE_USER')) { throw new AccessDeniedException(); } $em = $this->getDoctrine()->getManager(); $document = $em->getRepository('ManhattanPostsBundle:Attachment') ->findOneByIdJoinPost($document_id); if (!$document) { throw $this->createNotFoundException('Unable to find Attachment entity.'); } $editForm = $this->createForm(new AttachmentType(), $document); return $this->render('ManhattanPostsBundle:Document:edit.html.twig', array( 'entity' => $document, 'edit_form' => $editForm->createView() )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function edit(Attachment $attachment)\n {\n $tasks = Task::all();\n $data = compact('tasks','attachment');\n //dd($data);\n return view('attachments.edit',$data);\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MHProductsBundle:Upload')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Upload entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MHProductsBundle:Upload:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit()\n {\n return view('files::edit');\n }", "public function editAction() {\n $id = $this->getInput('id');\n $info = Client_Service_Ad::getAd(intval($id));\n \n $this->assign('ad_type', self::AD_TYPE);\n $this->assign('ad_ptypes', $this->ad_ptypes);\n $this->assign('info', $info);\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function actionEdit() {\n $parmas = array();\n $model = $this->loadModel();\n if (count($model) > 0) {\n if (Yii::app()->request->isAjaxRequest) {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n\n $attachment1_error = isset(Yii::app()->session['attachment1']) ? Yii::app()->params['attachment1_error'] : '';\n $attachment2_error = isset(Yii::app()->session['attachment2']) ? Yii::app()->params['attachment2_error'] : '';\n $attachment3_error = isset(Yii::app()->session['attachment3']) ? Yii::app()->params['attachment3_error'] : '';\n unset(Yii::app()->session['attachment1']);\n unset(Yii::app()->session['attachment2']);\n unset(Yii::app()->session['attachment3']);\n $parmas['model'] = $model;\n $parmas['attachment1_error'] = $attachment1_error;\n $parmas['attachment2_error'] = $attachment2_error;\n $parmas['attachment3_error'] = $attachment3_error;\n $this->render('/admin/hobby_new/edit', $parmas);\n } else {\n $this->redirect(array('adminhobby_new/index'));\n }\n }", "public function editAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $tagNames = array();\n foreach ($model->fetchTags($photo) as $tag) {\n $tagNames[] = $tag->name;\n }\n\n $form = $model->getForm();\n $form->setAction($this->_helper->url('update', null, null, array('id' => $photo->id)));\n $form->setDefault('tags', implode(',', $tagNames));\n $form->populate($photo->toArray());\n\n $this->view->photo = $photo;\n $this->view->photoForm = $form;\n }", "public function edit($ID_NO)\n {\n $attachment = HREmpAttach::findOrFail($ID_NO);\n $employees = HrEmpmfs::get();\n $companies = HRMainCmpnam::get(); // الشركات\n $emp_type = HrEmpmfs::where('Emp_No', $attachment->Emp_No)->first(); \n $emp_type = $emp_type->Emp_Type;\n return view('hr.attachments.edit', compact('emp_type','employees','companies','attachment'));\n }", "public function editAttachment($id)\n {\n $data = $this->model->findOrFail($id);\n return renderToJson($this->folder.\"edit-attachment\",compact(\"data\"));\n }", "public function editForm(): void\n {\n $this->articleId = $_GET['id'];\n $query = $this->articleModel->displayOneArticle($this->articleId);\n $editArticle = $query->fetch();\n\n $this->title = $editArticle['title'];\n $this->content = $editArticle['content'];\n $this->category = $editArticle['category'];\n }", "public function edit($id)\n\t{\n\t\t$post = Post::find($id);\n\n\t\treturn View::make('file.edit')->with('post', $post);\n\t}", "public function edit($id)\n\t{\n\t\t//\n\t\t$gallery = Gallery::find($id);\n\t\treturn view('Gallery/Admin/editForm' , compact('gallery' , 'id'));\n\t}", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit(Form $form)\n {\n //\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('HamdiMediaBundle:GalleryImage')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find GalleryImage entity.');\n }\n\n $editForm = $this->createForm(new GalleryImageType(), $entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('HamdiMediaBundle:GalleryImage:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit(Entity $entity)\n {\n $entity->typeCompanyPreview = self::previewTypeCompany($entity->type_company);\n\n\n return view('entity.edit', compact('entity'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('GestionPassBundle:Fluidite')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fluidite entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('GestionPassBundle:Fluidite:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CestomArticleBundle:Article')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Article entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render($this->templates[\"edit\"], array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n\t\t\t'mesRoutes' => $this->mesRoutes,\n ));\n }", "public function edit($id)\n {\n $asset = Asset::find($id);\n $formTitle = 'Edit asset';\n return View('assets.form', compact('asset', 'formTitle'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('EmtagsNewsletterBundle:Leads')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Leads entity.');\n }\n\n $editForm = $this->createForm(new LeadsType(), $entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('EmtagsNewsletterBundle:Leads:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($model, $form);", "public function edit() {\n\t\t$data['pagetitle'] = 'Dashboard - Edit Posts';\n\n\t\t$data['postid'] = $viewmodel->getPostById($postid['id'] );\n\t\tView::renderAdminTemplate($data, \"App/Views/admin/edit/index.php\") ;\n\t}", "public function edit($id)\n {\n $advertisement = Advertisement::findOrFail($id);\n return view('advertisement.form',compact('advertisement'));\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit(form $form)\n {\n //\n }", "public function edit($id)\n {\n $orient = Download::whereId($id)->first();\n\n $data = [\n ['name' => 'Title',\"naming\" => \"title\",\"type\" => \"text\", \"attrib\" => 'required=\"required\" name=\"title\" maxlength=\"100\"'],\n ['name' => 'Description', \"naming\" => \"description\",\"type\" => \"text\", \"attrib\" => 'required=\"required\" name=\"description\" maxlength=\"1000\"'],\n ['name' => 'File (Attach file only if you want to update)',\"naming\" => \"file\", \"type\" => \"file\", \"attrib\" => ' name=\"file\" '],\n\n ];\n\n\n $title = 'FRANCHISES';\n $url = url('admin/downloads');\n $method = \"POST\";\n\n return view('adminPanel.edit', compact('title', 'data', 'url', 'method', 'orient'));\n }", "public function edit(Advertisement $advertisement)\n {\n //\n }", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit($id)\n {\n $entity = MessageContent::find($id);\n\n if (!empty($entity->files)) {\n $files_arr = explode(',', $entity->files);\n $files = [];\n foreach ($files_arr as $f)\n $files[] = Resources::find($f);\n $entity->files = $files;\n } else {\n $entity->files = [];\n }\n\n// dd($entity);\n return view('admin.message-content.edit', ['entity' => $entity]);\n }", "public function edit($id)\n {\n $data['item'] = Article::findOrFail($id);\n $data['page'] = 'edit';\n $data['url'] = route('article.update', $id);\n \n return view('backend.article.form.index', $data);\n }", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function edit( $id ) {\n\n $submission = Submission::find( $id );\n\n if ( empty( $submission ) ) {\n\n return redirect( route( 'submissions.index' ) )->withErrors( [ 'notfound' => 'Submission not found' ] );\n\n }\n\n return view( 'admin.submissions.edit', compact( 'submission' ) );\n\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('EncuestaBundle:Encuesta')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Encuesta entity.');\n }\n\n\n\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('EncuestaBundle:Encuesta:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n $file = File::find($id);\n return view('admin.files.edit', compact(\n 'file'\n ));\n }", "public function editAction(Request $request, $id)\n {\n $repository = $this->getDoctrine()->getRepository('AppBundle:Advertisement');\n $entity = $repository->getById($id);\n\n if (!$entity) {\n throw $this->createNotFoundException();\n }\n\n $oldFile = new File($this->getParameter('images_directory') . '/' . $entity->getImage());\n $entity->setImage($oldFile);\n $form = $this->createForm(new AdvertisementType($request->get('mode')), $entity, [\n 'action' => $this->generateUrl('advertisement_edit', [\n 'id' => $entity->getId(),\n 'mode' => $request->get('mode')\n ]),\n 'method' => 'POST',\n ])->add('submit', 'submit', [\n 'attr' => ['class' => 'btn btn-default pull-left']\n ]);\n\n if ($request->isMethod('POST')) {\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n $advertisementService = $this->get('app.advertisement');\n $advertisementService->saveAdvertisement($entity, $oldFile);\n $this->addFlash('success', 'Successfully changed the advertisement.');\n return $this->redirect($this->generateUrl('advertisement_list'));\n }\n }\n\n return $this->render('AppBundle:advertisement:edit.html.twig', [\n 'entity' => $entity,\n 'form' => $form->createView()\n ]);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('AcmeInvoiceBundle:Invoice')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Invoice entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('AcmeInvoiceBundle:Invoice:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id): View\n {\n $Article = Article::FindOrFail($id);\n\n $form = $this->createForm(\n ArticleForm::class,\n route('admin.article.update', $Article->id),\n [\n 'files' => true,\n 'model' => $Article,\n ],\n 'PUT'\n );\n\n return view('admin.article.create', compact(['form', 'Article']));\n }", "public function edit($id)\n {\n $contact=EnterComForum::find($id);\n return view('admin.pages.formEnterpreuner.edit')->withContact($contact);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('ClassCentralSiteBundle:Newsletter')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Newsletter entity.');\n }\n\n $editForm = $this->createForm(new NewsletterType(), $entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('ClassCentralSiteBundle:Newsletter:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n\t{\n\t\t$uploadtypename = Tbluploadtypes::all();\n\t\t$upload = Upload::find($id);\n\t \n\t\treturn view('admin.upload.edit', compact('upload','uploadtypename'));\n\t}", "public function getUpdateForm(string $attachmentId)\n {\n /** @var Attachment $attachment */\n $attachment = Attachment::query()->findOrFail($attachmentId);\n\n $this->checkOwnablePermission('page-update', $attachment->page);\n $this->checkOwnablePermission('attachment-create', $attachment);\n\n return view('attachments.manager-edit-form', [\n 'attachment' => $attachment,\n ]);\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute(\"id\");\n $isSubmitted = $this->params()->fromPost('submitted', \n null);\n $model = $this->getServiceLocator()->get(\"Application\\Service\\BlogPost\")->fetchById($id);\n if($isSubmitted){\n $date = $this->params()->fromPost(\"date\");\n $date = new \\DateTime($date);\n $date = $date->format('Y-m-d');\n //edit a blog entry\n $model ->setBody($this->params()->fromPost('body'))\n ->setTags($this->params()->fromPost('tags'))\n ->setTitle($this->params()->fromPost('title'))\n ->setDate($date);\n $model = $this->getServiceLocator()->get(\"Application\\Service\\BlogPost\")->update($model);\n //redirect the user here\n return $this->redirect()->toRoute('blog-post');\n }\n $view = $this->acceptableViewModelSelector($this->acceptCriteria);\n $view->setVariables(array(\n 'model' => $model\n ));\n return $view;\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $item = $em->getRepository('SmgMenuBundle:Item')->find($id);\n\n if (!$item) {\n throw $this->createNotFoundException('Unable to find Item entity.');\n }\n\n $editForm = $this->createForm(new ItemType(), $item);\n\n return $this->render('SmgMenuBundle:Item:edit.html.twig', array(\n 'item' => $item,\n 'edit_form' => $editForm->createView(),\n ));\n }", "public function edit($id)\n {\n $featuredimage = FeaturedImage::find($id);\n $testimonial_table = Testimonials::all();\n $promo_table = Programs::all();\n return view('admin.featured_image.form', compact('featuredimage', 'testimonial_table', 'promo_table'));\n }", "public function edit($id) {\n\t\treturn view('laravel-simple-blog::admin.edit')->with('blogPost', BlogPost::findOrFail($id));\n\t}", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n $id = $this->request->getParameter('id'); // récupérer le paramètre de l'ID\n $post = $this->post->getPost($id); // je récupère le post\n\n // j'arrive en post car des données sont saisies dans le formulaire\n if($this->request->parameterExist('title') && $this->request->parameterExist('content')) {\n\n $this->post->updatePost(\n $this->request->getParameter('title'),\n $this->request->getParameter('content'),\n $id\n );\n\n $this->redirect(\"admin\", \"post/\" . $post['id']); // une fois le post créé, je redirige vers la vue Admin/post/iddupost\n }\n\n // j'arrive sur la vue en Get\n $this->buildView(array('post'=>$post));\n }", "public function edit($id)\n {\n $item = Artistprofile::find($id);\n return view('profiles.editdataprofileForm',compact('item'));\n }", "public function edit($id)\n {\n //\n $ad = AdForm::find($id);\n\n return view('ad.edit', compact('ad'));\n }", "public function edit(enquiryForm $enquiryForm)\n {\n //\n }", "public function edit(Normativa $normativa)\n {\n //\n }", "public function edit($id)\n {\n// $form = new Form(Template::findOrFail($id));\n// $form->text('name', '模板名称')->default($form->model()->name)->required();\n// $form->text('description', '模板描述')->default($form->model()->description);\n// $form->file('file', '模板文件')->default($form->model()->file)->rules('mimes:zip')->required();\n// return $form;\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('InfotapAdminBundle:Feeds')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feeds entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('InfotapAdminBundle:Feeds:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n //\n\t\t$photo = Note::find($id);\n\n // show the edit form and pass the nerd\n return View::make('photos.edit')\n ->with('photo', $photo);\n }", "public function edit(FieldFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id) {\n\n //\n return View::make('admin.articles.edit')->with('article', Article::find($id));\n }", "public function editAction() {\r\n\t\t$id = $this->getInput('id');\r\n\t\t$info = Gou_Service_Notice::getNotice(intval($id));\r\n\t\t$this->assign('info', $info);\r\n\t\t$this->assign('channels', $this->channels);\r\n\t}", "public function editAction() {\r\n\t\t$id = $this->getInput('id');\r\n\t\t$info = Gou_Service_Ad::getAd(intval($id));\r\n\t\t$this->assign('ad_types', $this->ad_types[$info['channel_id']]);\r\n\t\t\r\n\t\tlist($info['module_id'], $info['cid']) = explode('_', $info['module_channel']);\r\n\t\t$this->assign('info', $info);\r\n\t\t\r\n\t\tif($info['channel_id'] == 2 || $info['channel_id'] == 6) {\r\n\t\t list(, $ptypes) = Type_Service_Ptype::getsBy(array('status'=>1,'pid'=>0), array('sort'=>'DESC', 'id'=>'DESC'));\r\n\t\t $this->assign('ptype', $ptypes);\r\n\t\t}\r\n\t\t\r\n\t if($info['channel_id'] == 2) {\r\n\t\t $this->assign('actions', $this->client_actions);\r\n\t\t}\r\n\r\n $this->assign('channel_id', $info['channel_id']);\r\n $this->assign('ad_type', $info['ad_type']);\r\n\r\n\t\t//module channel\r\n\t\tlist($modules, $channel_names) = Gou_Service_ChannelModule::getsModuleChannel();\r\n\t\t$this->assign('modules', $modules);\r\n\t\t$this->assign('channel_names', $channel_names);\r\n\t}", "public function edit($id)\n {\n $blog = $this->blog_repository->findBlog($id);\n return view('admin.blog.form',compact('blog'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n $entity = $em->getRepository('CrestaAulasBundle:Aula')->find($id);\n if (!$entity) {\n throw $this->createNotFoundException('No se puede encontrar la entidad Aula.');\n }\n \n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n return $this->render('CrestaAulasBundle:Aula:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n\t{\n \t\tif ( ! \\Util::getAccess('Documentos')) return $this->accessFail();\n\t\t\n $documento = $this->documentoRepo->find($id);\n\n $this->notFoundUnless($documento);\n\n \t$tiposDocumentos = $this->tipoDocumentoRepo->getList();\n\t\t$obj_nbr = \\Util::getObjNbr($documento->Obj_Id);\n\t\t$title = $this->title;\t\t\n $form_data = array('route' => array('documentos.update', $id), 'method' => 'PATCH', 'files' => true);\n $action = '';\n\t\tif ( \\Util::getAccess('Documentos', 'Update')) $action = 'Actualizar';\t\n\t\tif ( \\Util::getAccess('Documentos', 'Delete')) $action = 'Eliminar';\t\n\t\t$action_label = \\Lang::get('utils.Actualizar');\n\n return View::make('documentos/form', compact('documento', 'tiposDocumentos', 'obj_nbr', 'title', 'form_data', 'action', 'action_label'));\n\t}", "public function edit($id)\n {\n $alerte = Alerte::find($id);\n\n $elements = $this->editForm($alerte, 'formAlerte.json');\n\n return view('admin.editCreateForm', [\n 'elements' => $elements,\n 'id' => $id,\n 'routeAnnule' => route('alerte.show', $id)\n ]);\n\n }", "public function edit(FormModel $formModel)\n {\n //\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function actionEdit($id) { }", "public function editAction($id)\n {\n \n $em = $this->getDoctrine()->getManager();\n \n $entities = $em->getRepository('CineminoSiteBundle:Film')->findAll();\n $entity = $em->getRepository('CineminoSiteBundle:Film')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Film entity.');\n }\n\n $entity->setDuree(new \\DateTime($entity->getDuree()));\n $editForm = $this->createForm(new FilmType(), $entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CineminoSiteBundle:Film:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView()\n ));\n }", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit($id)\n\t{\n\t\t//\n\t\t// get the article\n\t\t$article = Article::find($id);\n\t\t$article->startdate = (is_null($article->startdate)? null : DateTime::createFromFormat('Y-m-d', $article->startdate)->format('d-m-Y'));\n\t\t$article->enddate = (is_null($article->enddate)? null : DateTime::createFromFormat('Y-m-d', $article->enddate)->format('d-m-Y'));\n\t\n\t\t$objlanguages = $this->getInformation($id);\n\t\t$objselected_pages = $this->getSelectedPages($id);\n\t\t\n\t\t// show the edit form and pass the nerd\n\t\treturn View::make('dcms::articles/articles/form')\n\t\t\t->with('article', $article)\n\t\t\t->with('languages', $objlanguages)\n\t\t\t->with('categoryOptionValues',CategoryID::OptionValueArray(false))\n\t\t\t->with('pageOptionValues',Pagetree::OptionValueArray(false))\n\t\t\t->with('pageOptionValuesSelected',$this->setPageOptionValues($objselected_pages))\n\t\t\t->with('sortOptionValues',$this->getSortOptions($objlanguages))\n\t\t\t->with('enableArticleToPage',$this->enableArticleToPage);\n\t}", "public function edit($id)\n\t{\n\t\t$form = \\View::make('message.form');\n\t\t$form->message = Message::find($id);\n\t\t$form->action = array('action' => array('Toomdrix\\Pm\\MessageController@update', $form->message->id),'class'=>'form-signup');\n\t\treturn $form;\n\t}", "public function edit($id){\n \n $gallery = Gallery::find($id);\n \n //load form view edit for edit\n \n return view('admin.gallery_section.edit',compact('gallery'));\n \n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('ChoferesBundle:Chofer')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Chofer entity.');\n }\n\n $editForm = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('ChoferesBundle:Chofer:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function editAction() {\n if($this->_getParam('id',false)) {\n $form = new ContentForm();\n $form->submit->setLabel('Submit changes');\n $form->author->setValue($this->getIdentityForForms());\n $this->view->form = $form;\n if($this->getRequest()->isPost() \n && $form->isValid($this->_request->getPost())){\n if ($form->isValid($form->getValues())) {\n $updateData = $form->getValues();\n $where = array();\n $where[] = $this->_content->getAdapter()\n ->quoteInto('id = ?', $this->_getParam('id'));\n $oldData = $this->_content->fetchRow($this->_content\n ->select()->where('id= ?' , \n (int)$this->_getParam('id')))->toArray();\n $this->_helper->audit($updateData, $oldData, 'ContentAudit', \n $this->_getParam('id'), $this->_getParam('id'));\n $this->_content->update($updateData, $where);\n $this->_helper->solrUpdater->update('beocontent', \n $this->_getParam('id'), 'content'); \n $this->getFlash()->addMessage('You updated: <em>' \n . $form->getValue('title') \n . '</em> successfully. It is now available for use.');\n $this->getCache()->clean(Zend_Cache::CLEANING_MODE_ALL);\n $this->_redirect('admin/content/');\n } else {\n $form->populate($this->_request->getPost());\n }\n } else {\n // find id is expected in $params['id']\n $id = (int)$this->_request->getParam('id', 0);\n if ($id > 0) {\n $content = $this->_content->fetchRow('id=' . (int)$id)->toArray();\n if($content) {\n $form->populate($content);\n } else {\n throw new Pas_Exception_Param($this->_nothingFound);\n }\n }\n }\n } else {\n throw new Pas_Exception_Param($this->_missingParameter, 500);\n }\n }", "public function editAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Lock_Service_FileType::getFileType(intval($id));\t\t\n\t\t$this->assign('info', $info);\n\t}", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('XarismaBundle:Fileops')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fileops entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('XarismaBundle:Fileops:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('HospiceSiteBundle:Event')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Event entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('HospiceSiteBundle:Event:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n\t{\n\t\t// dd(Files::findOrFail($id));\n\n\t\t$file = Files::findOrFail($id);\n\t\treturn view('admin.files.edit')->with('file', $file);\n\t\t// return view('admin.files.edit', compact('file'));\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('EmiageReviewManagerBundle:Examen')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Examen entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n\n return $this->render('EmiageReviewManagerBundle:Examen:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n ));\n }", "public function edit($id)\n {\n $item = $this->posts->findOrFail($id);\n\n $this->authorize('adminPostsEdit', $item);\n\n $form = FormBuilder::create(PostForm::class, [\n 'method' => 'PUT',\n 'url' => route('admin.posts.update', $item),\n 'model' => $item,\n 'data' => [\n //\n ]\n ]);\n\n return view('admin.posts.form', compact('form', 'item'));\n }", "public function editAction($id)\n {\n \n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('ToDoToDoBundle:Todoitems')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Todoitems entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('ToDoToDoBundle:Todoitems:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n $formData = FormData::findOrFail($id);\n $formTemplate = Form::publish()->undelete()->findOrFail($formData->fid);\n $url = route('pub.info.update', $id);\n $form = $this->createForm($formTemplate, $url, 'PUT', $formData);\n return view('pub.info.info', compact('form'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('ComDaufinBundle:Incident')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Incident entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('ComDaufinBundle:Incident:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function Edit($id=null) {\n $content = new CMContent($id);\n $form = new CFormContent($content);\n $status = $form->Check();\n if($status === false) {\n $this->AddMessage('notice', 'The form could not be processed.');\n $this->RedirectToController('edit', $id);\n } else if($status === true) {\n $this->RedirectToController('edit', $content['id']);\n }\n \n $title = isset($id) ? 'Edit' : 'Create';\n $this->views->SetTitle(\"$title content: \".htmlEnt($content['title']))\n ->AddInclude(__DIR__ . '/edit.tpl.php', array(\n 'user'=>$this->user, \n 'content'=>$content, \n 'form'=>$form,\n ));\n }", "public function edit($id)\n {\n $department = Department::findOrFail($id);\n $this->department_id = $id;\n $this->name = $department->name;\n \n //$this->updateMode = true;\n $this->openModal(); \n }" ]
[ "0.7313674", "0.7073301", "0.6913725", "0.6901526", "0.6835631", "0.6715678", "0.66902244", "0.6689565", "0.6684678", "0.6674456", "0.6667076", "0.66635054", "0.6643036", "0.66376776", "0.6631607", "0.6620606", "0.6603884", "0.65765953", "0.65576696", "0.6549511", "0.6538451", "0.6533867", "0.65271586", "0.6505551", "0.65046483", "0.6482911", "0.64702815", "0.6464338", "0.64559776", "0.6438018", "0.6437977", "0.6429435", "0.6419763", "0.64195293", "0.64109546", "0.6400094", "0.6397343", "0.6389467", "0.63818246", "0.638166", "0.6369244", "0.63666344", "0.63465554", "0.6337958", "0.63354707", "0.6335148", "0.63334316", "0.6332314", "0.6330987", "0.6327903", "0.6320344", "0.631773", "0.6308311", "0.6304813", "0.63044703", "0.63044703", "0.6302117", "0.62996715", "0.6298316", "0.62973696", "0.6293235", "0.62928426", "0.6289393", "0.6285969", "0.6277917", "0.6271292", "0.62705547", "0.6265589", "0.6263482", "0.62625", "0.6260528", "0.62585336", "0.6257767", "0.62568885", "0.62498647", "0.6248671", "0.6247547", "0.62462825", "0.6246156", "0.6246156", "0.62451607", "0.62440115", "0.6238985", "0.62373084", "0.6232374", "0.62323475", "0.6231323", "0.62221557", "0.62218934", "0.62214106", "0.6215742", "0.62153345", "0.62127507", "0.6212665", "0.621253", "0.62095094", "0.62093294", "0.6209081", "0.6208357", "0.6208304" ]
0.6897075
4
Edits an existing Attachment entity.
public function updateAction(Request $request, $id, $document_id) { if (!$this->container->getParameter('manhattan_posts.include_attachments')) { throw new AccessDeniedHttpException('Attachment functionality has not been enabled in the bundle.'); } if (false === $this->get('security.context')->isGranted('ROLE_USER')) { throw new AccessDeniedException(); } $em = $this->getDoctrine()->getManager(); $document = $em->getRepository('ManhattanPostsBundle:Attachment') ->findOneByIdJoinPost($document_id); if (!$document) { throw $this->createNotFoundException('Unable to find Attachment entity.'); } $editForm = $this->createForm(new AttachmentType(), $document); $editForm->bind($request); if ($editForm->isValid()) { $em->persist($document); $em->flush(); return $this->redirect($this->generateUrl('console_news_document_edit', array('id' => $id, 'document_id' => $document_id))); } return $this->render('ManhattanPostsBundle:Document:edit.html.twig', array( 'entity' => $document, 'edit_form' => $editForm->createView() )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update(Request $request, Attachment $attachment)\n {\n $data = $request->all();\n $attachment->fill($data);\n $attachment->save();\n return redirect()->route('attachment.index');\n }", "public function update($id = null)\n {\n $attachment = $this->Attachments->get($id);\n \n if ($this->request->is(['put', 'patch', 'post'])) {\n $data = $this->request->getData();\n $attachment = $this->Attachments->patchEntity(\n $attachment, $data, ['associated' => []]\n );\n if (!$this->Attachments->save($attachment)) {\n $this->set('error', 'An unexpected error occured');\n $this->set('_serialize', [ 'error' ]);\n return;\n }\n }\n \n $this->set('attachment', $attachment);\n $this->set('_serialize', 'attachment');\n }", "public function editAttachment($attachmentid){\n $header = $this->app->request->headers->all();\n $body = $this->app->request->getBody();\n $body = json_decode($body, true);\n if (isset($body['file']['body']))\n {\n //getAttachment to get the file of the old Attachment\n $URL = $this->lURL.'/DB/attachment/attachment/'.$attachmentid;\n $answer = Request::custom('GET', $URL, $header, \"\");\n $bodyOld = json_decode($answer['content'], true);\n //save the new file\n $body['file'] = LFileHandler::add($this->lURL, $header, $body['file']);\n\n\n // if file has not been saved\n if(empty($body['file'])){\n $this->app->response->setStatus(409);\n } else { // if file has been saved\n //save the new information\n $URL = $this->lURL.'/DB/attachment/attachment/'.$attachmentid;\n $answer = Request::custom('PUT', $URL, $header, json_encode($body));\n $this->app->response->setStatus($answer['status']);\n }\n\n // delete the old file\n LFileHandler::delete($this->lURL, $header, $bodyOld['file']);\n } else {\n // save the new information\n $URL = $this->lURL.'/DB/attachment/attachment/'.$attachmentid;\n $answer = Request::custom('PUT', $URL, $header, json_encode($body));\n $this->app->response->setStatus($answer['status']);\n }\n }", "public function updateAttachment() {\n try {\n if (!($this->attachment instanceof Base_Model_ObtorLib_App_Core_Qualification_Entity_Attachment)) {\n throw new Base_Model_ObtorLib_App_Core_Qualification_Exception(\" Attachment Entity not initialized\");\n } else {\n $objAttachment = new Base_Model_ObtorLib_App_Core_Qualification_Dao_Attachment();\n $objAttachment->attachment = $this->attachment;\n return $objAttachment->updateAttachment();\n }\n } catch (Exception $ex) {\n throw new Base_Model_ObtorLib_App_Core_Qualification_Exception($ex);\n }\n }", "public function updateAttachment(Request $request, $id)\n {\n return $this->facade->updateAttachment($request,$id);\n }", "public function update(Request $request, string $attachmentId)\n {\n /** @var Attachment $attachment */\n $attachment = Attachment::query()->findOrFail($attachmentId);\n\n try {\n $this->validate($request, [\n 'attachment_edit_name' => ['required', 'string', 'min:1', 'max:255'],\n 'attachment_edit_url' => ['string', 'min:1', 'max:2000', 'safe_url'],\n ]);\n } catch (ValidationException $exception) {\n return response()->view('attachments.manager-edit-form', array_merge($request->only(['attachment_edit_name', 'attachment_edit_url']), [\n 'attachment' => $attachment,\n 'errors' => new MessageBag($exception->errors()),\n ]), 422);\n }\n\n $this->checkOwnablePermission('page-view', $attachment->page);\n $this->checkOwnablePermission('page-update', $attachment->page);\n $this->checkOwnablePermission('attachment-update', $attachment);\n\n $attachment = $this->attachmentService->updateFile($attachment, [\n 'name' => $request->get('attachment_edit_name'),\n 'link' => $request->get('attachment_edit_url'),\n ]);\n\n return view('attachments.manager-edit-form', [\n 'attachment' => $attachment,\n ]);\n }", "public function update(Request $request, Letter $letter, $attachmentId)\n {\n $this->authorize('letters.update');\n\n /** @var LetterAttachment $attachment */\n $attachment = $letter->attachments()->find($attachmentId);\n\n $attachment->entry = $request->get('entry');\n\n $attachment->save();\n\n return $attachment;\n }", "public function editAction(Request $request, $id, $document_id)\n {\n if (!$this->container->getParameter('manhattan_posts.include_attachments')) {\n throw new AccessDeniedHttpException('Attachment functionality has not been enabled in the bundle.');\n }\n\n if (false === $this->get('security.context')->isGranted('ROLE_USER')) {\n throw new AccessDeniedException();\n }\n\n $em = $this->getDoctrine()->getManager();\n\n $document = $em->getRepository('ManhattanPostsBundle:Attachment')\n ->findOneByIdJoinPost($document_id);\n\n if (!$document) {\n throw $this->createNotFoundException('Unable to find Attachment entity.');\n }\n\n $editForm = $this->createForm(new AttachmentType(), $document);\n\n return $this->render('ManhattanPostsBundle:Document:edit.html.twig', array(\n 'entity' => $document,\n 'edit_form' => $editForm->createView()\n ));\n }", "public function update($Attachment) {\r\n\t\t\r\n\t\t$attachment_id = $Attachment->getId();\r\n\t\t\t\t\t\r\n\t\t$file_name = $Attachment->getFileName();\r\n\t\t$file_type = $Attachment->getFileType();\r\n\t\t$file_size = $Attachment->getFileSize();\r\n\t\t\t\t\r\n\t\t$date_added = $Attachment->getDateAdded();\r\n\t\t\r\n\t\t$file_desc = $Attachment->getDesc();\r\n\t\t$file_approved = $Attachment->isApproved();\r\n\r\n\t\t$query = \"UPDATE $this->att SET file_name = '$file_name', \r\n\t\t\t\t\t\t\t\t\t\tfile_type = '$file_type',\r\n\t\t\t\t\t\t\t\t\t\tfile_size = '$file_size',\r\n\t\t\t\t\t\t\t\t\t\tdate_added = $date_added,\r\n\t\t\t\t\t\t\t\t\t\tfile_desc = '$file_desc',\r\n\t\t\t\t\t\t\t\t\t\tfile_approved = '$file_approved',\r\n\t\t\t\t\t\t\t\t\t\tWHERE attachment_id = $attachment_id\";\r\n\t\t\t\r\n\t\treturn $this->execute($query);\r\n\t\t\r\n\t}", "public function update($id, Request $request)\n {\n // Validate the request.\n $this->validator($request->all())->validate();\n \n // Get the discussion where the post to be edited is.\n $discussion = Discussion::findOrFail($request->discussion);\n\n // Find the post to edit.\n $post = $discussion->posts->where('id', $id)->first();\n\n // Check to see if this user owns this post.\n if (Gate::denies('isMyPost', $post)) {\n abort(404, \"Sorry, you don't have permission to do that.\");\n }\n\n // Edit the post with request data.\n $post->body = $request->post;\n\n // Handle any attachments that may exist.\n if ($request->hasFile('attachments')) {\n foreach ($request->file('attachments') as $file) {\n // error_log($file->getClientOriginalName()); // Debugging\n\n // Store the file on the public disk.\n $path = $file->storeAs(\"discussions/$discussion->id/user/\" . Auth::id(), str_replace(' ', '_', $file->getClientOriginalName()), 'public');\n \n // If path does not match an existing record in the database... \n if (Attachment::where('path', $path)->get()->isEmpty()) {\n // Create the attachment record in the database.\n $post->attachments()->create([\n 'path' => $path\n ]);\n }\n }\n }\n\n // Update post and its corresponding attachments.\n $post->save();\n\n // Redirect the user to the previous page in their session.\n return Redirect::intended('/');\n }", "public function editAction(Request $request, $id)\n {\n $repository = $this->getDoctrine()->getRepository('AppBundle:Advertisement');\n $entity = $repository->getById($id);\n\n if (!$entity) {\n throw $this->createNotFoundException();\n }\n\n $oldFile = new File($this->getParameter('images_directory') . '/' . $entity->getImage());\n $entity->setImage($oldFile);\n $form = $this->createForm(new AdvertisementType($request->get('mode')), $entity, [\n 'action' => $this->generateUrl('advertisement_edit', [\n 'id' => $entity->getId(),\n 'mode' => $request->get('mode')\n ]),\n 'method' => 'POST',\n ])->add('submit', 'submit', [\n 'attr' => ['class' => 'btn btn-default pull-left']\n ]);\n\n if ($request->isMethod('POST')) {\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n $advertisementService = $this->get('app.advertisement');\n $advertisementService->saveAdvertisement($entity, $oldFile);\n $this->addFlash('success', 'Successfully changed the advertisement.');\n return $this->redirect($this->generateUrl('advertisement_list'));\n }\n }\n\n return $this->render('AppBundle:advertisement:edit.html.twig', [\n 'entity' => $entity,\n 'form' => $form->createView()\n ]);\n }", "public function editAttachment($id)\n {\n $data = $this->model->findOrFail($id);\n return renderToJson($this->folder.\"edit-attachment\",compact(\"data\"));\n }", "public function create()\n {\n $attachment = $this->Attachments->newEntity();\n \n if ($this->request->is('post')) {\n \n // Assure file was uploaded\n if (!array_key_exists('file', $_FILES)) {\n $this->set('error', 'No attachment provided');\n $this->set('_serialize', [ 'error' ]);\n return;\n }\n \n $uuid = Text::uuid();\n $file = $_FILES['file'];\n \n // Validate file upload\n if ($file['error'] !== UPLOAD_ERR_OK) {\n switch ($file['error']) {\n case UPLOAD_ERR_INI_SIZE:\n $this->set('error', 'The selected file is too big');\n break;\n case UPLOAD_ERR_FORM_SIZE:\n $this->set('error', 'The selected file is too big');\n break;\n case UPLOAD_ERR_NO_FILE:\n $this->set('error', 'No attachment provided');\n break;\n default:\n $this->set('error', 'An unexpected error occured');\n }\n $this->set('_serialize', [ 'error' ]);\n return;\n }\n \n // Move uploaded file\n if (!move_uploaded_file($file[\"tmp_name\"], UPLOADS . $uuid)) {\n $this->set('error', 'An unexpected error occured');\n $this->set('_serialize', [ 'error' ]);\n return;\n }\n \n $data = $this->request->getData();\n \n $data['path'] = $uuid;\n $data['name'] = $file['name'];\n $data['mime'] = $file['type'];\n $data['size'] = $file['size'];\n $attachment = $this->Attachments->patchEntity($attachment, $data);\n if (!$this->Attachments->save($attachment)) {\n $this->set('error', 'An unexpected error occured');\n $this->set('_serialize', [ 'error' ]);\n return;\n }\n }\n \n $this->set('attachment', $attachment);\n $this->set('_serialize', 'attachment');\n }", "public function edit(Avatar $avatar)\n {\n //\n }", "public function edit(Attachment $attachment)\n {\n $tasks = Task::all();\n $data = compact('tasks','attachment');\n //dd($data);\n return view('attachments.edit',$data);\n }", "public function edit(Advertisement $advertisement)\n {\n //\n }", "public function update(Request $request, $ID_NO)\n {\n $attachment = HREmpAttach::findOrFail($ID_NO);\n $data = $this->validate($request,[\n 'Photo' => 'sometimes',\n 'Cmp_No' => 'sometimes',\n 'Emp_No' => 'sometimes',\n 'Attch_No' => 'sometimes',\n 'Ln_No' => 'sometimes',\n 'Attch_Ty' => 'sometimes',\n 'Attch_Desc' => 'sometimes',\n\n ],[],[\n \n ]);\n \n if($request->hasFile('Photo')){\n $image = $request->Photo;\n $filePath = 'files/attachments/';\n $extension = $image->getClientOriginalExtension();\n $name = $image->getClientOriginalName(); \n $fileName = $name . '_' . time() . '.' .$extension;\n $image->move($filePath, $fileName);\n $data['Photo'] = $filePath.$fileName;\n }\n // dd($data);\n $attachment->update($data);\n return redirect()->route('attachments.index')->with(session()->flash('message',trans('hr.update_success')));\n // return redirect()->route('attachments.update',$ID_NO .'/edit')->with(session()->flash('message',trans('hr.update_success')));\n }", "public function update(Request $request, $id)\n {\n try {\n $data = $request->validate([\n 'entity' => 'string|min:1|max:255|required',\n 'value' => 'string|min:1|max:255|required',\n 'lang' => 'string|min:6|max:6|required',\n 'group_id' => 'integer|min:1|required',\n ]);\n if (empty($data)) {\n throw(new \\Exception('Error! invalid form data!'));\n }\n\n $entity = Dictionary::with('attached_file')->get()->find($id);\n $res = $entity->save();\n\n $result_code = 'ok';\n\n if (!empty($request->file_img)) {\n\n $destinationPathFolder = 'uploads/dictionary' . Carbon::now('Europe/Moscow')->isoFormat('Y_M_D__HH_mm');\n $destinationPath = $destinationPathFolder . '_' . $entity->id;\n $request->file_img->move($destinationPath, $request->file_img->getClientOriginalName());\n $ff = new AttachedFile();\n $ff->dic_entity_id = $entity->id;\n $ff->file_path = $destinationPath . '/' . $request->file_img->getClientOriginalName();\n $ff->file_name = $request->file_img->getClientOriginalname();\n\n $attached_file = $entity->getRelation('attached_file')->first();\n if(!empty($attached_file)){\n $old_file = AttachedFile::find($attached_file->id);\n $old_file->delete();\n }\n $ff->save();\n\n }\n\n } catch (\\Exception $e) {\n $res = $e->getMessage();\n $result_code = 'error';\n }\n $form_type = 'operation_result';\n return view('vendor.dictionary.settings', ['form_type' => $form_type, 'result' => $res, 'result_code' => $result_code]);\n }", "function update_attached_file($attachment_id, $file)\n {\n }", "public function update(emRequest $request)\n {\n\n \n \n $emp = Employee::findOrFail($request->value);\n if ($request->hasFile('image')) {\n $path = $request->image->store('image');\n }\n\n $emp->nomEmploye = $request->input('nomEmploye');\n $emp->prenomEmploye = $request->input('prenomEmploye');\n $emp->adressEmploye = $request->input('adressEmploye');\n $emp->fonction = $request->input('fonction');\n $emp->salaire = $request->input('salaire');\n $emp->commission = $request->input('commission');\n $emp->image = $path;\n \n \n session()->flash('modifier',' l\\'employe a ete bien modifier !!');\n $emp->save();\n return back();\n }", "public function setAttachment($value)\n {\n return $this->set('Attachment', $value);\n }", "public function updateAction(Request $request, $id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('RudakBlogBundle:Post')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Post entity.');\n }\n\n $this->checkNonUsedImages($request);\n\n $deleteForm = $this->createDeleteForm($id);\n $editForm = $this->createEditForm($entity);\n $editForm->handleRequest($request);\n\n if ($entity->isLocked()) {\n // si le post est verrouillé\n if (!$this->get('security.context')->isGranted('ROLE_SUPER_ADMIN')) {\n // si on est pas super_admin\n return $this->render('RudakBlogBundle:Post:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }\n }\n\n if ($editForm->isValid()) {\n // vire les images supprimées des articles du disque dur\n\n $request->getSession()->getFlashBag()->add(\n 'success',\n 'Article modifié avec succès !'\n );\n\n $em->flush();\n\n $this->logging($this->getUser()->getUsername(), sprintf('Modification d\\'un article [#%d]', $entity->getId()), 'Blog');\n\n return $this->redirect($this->generateUrl('admin_blog_post_edit', array('id' => $id)));\n }\n\n return $this->render('RudakBlogBundle:Post:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "protected function edit(Request $request, $id) \n {\n $this->validator($request->all())->validate();\n\n $article = Article::findOrFail($id);\n if (Gate::denies('content-access', $article))\n return response('unauthorized access', 403);\n\n $filePath = $this->processImage($request->file('headline'));\n\n $article->title = $request->title;\n $article->content = $request->content;\n $article->status = $request->status;\n if ($filePath != '')\n $article->featured_img = $filePath;\n $article->save();\n\n return redirect(route('viewArticle'));\n }", "public function update(Request $request, $id)\n {\n // Validate the request.\n $this->validator($request->all())->validate();\n \n // Find the discussion\n $discussion = Discussion::findOrFail($id);\n\n // Check to see if this user owns this discussion.\n if (Gate::denies('isMyDiscussion', $discussion)) {\n abort(404, \"Sorry, you don't have permission to do that.\");\n }\n\n // Edit the discussion with request data.\n $discussion->topic = $request->topic;\n $discussion->description = $request->description;\n\n // Edit the discussion post with request data.\n $post = $discussion->getOriginalPost();\n $post->body = $request->post;\n\n // Handle any attachments that may exist.\n if ($request->hasFile('attachments')) {\n foreach ($request->file('attachments') as $file) {\n // error_log($file->getClientOriginalName()); // Debugging\n \n // Store the file on the public disk.\n $path = $file->storeAs(\"discussions/$discussion->id/user/\" . Auth::id(), str_replace(' ', '_', $file->getClientOriginalName()), 'public');\n\n // If path does not match an existing record in the database... \n if (Attachment::where('path', $path)->get()->isEmpty()) {\n // Create the attachment record in the database.\n $post->attachments()->create([\n 'path' => $path\n ]);\n }\n }\n }\n\n // Update discussion and its corresponding post and attachments.\n $discussion->save();\n $post->save();\n\n // Redirect the user to the previous page in their session.\n return Redirect::intended('/');\n }", "public function update($id, $name, $email, $avatar);", "public function update(ArticleEditFormRequest $request, $id)\n {\n\t\tif($request->hasFile('img')) { \n /*\n Unlike when a new page is created, when this page is being EDITED user doesnt \n have to upload a new file. Only validate If file is being uploaded (if detected)\n */\n $this->validate($request, [\n 'img' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:2048',\n ]);\n\n $image = $request->file('img');\n $newName = $request->get('slug'). '-' .time().'.'.$image->getClientOriginalExtension();\n $image->move(public_path('images'), $newName);\n\n } else {\n $newName = 'default-img.png'; \n }\n\n\n \n $article = Article::whereId($id)->firstOrFail();\n\n $article->title = $request->get('title');\n $article->content = $request->get('content');\n $article->h2 = $request->get('h2');\n // $article->img = $request->get('img');\n\t\t$article->img = $newName;\n $article->slug = Str::slug($request->get('title'), '-');\n\n\n $article->save();\n // Instead of creating a new savePages() method to save pages. we can sync them\n $article->pages()->sync($request->get('pages'));\n\n return redirect(action('Admin\\ArticlesController@edit', $article->id))\n ->with('status', 'The article has been updated!')\n ->with('article', $article);\n }", "public function edit(Attendence $attendence)\n {\n //\n }", "public function update(Request $request, Post $post)\n {\n $this->postUpdateValidate();\n\n if ($request->attachment['file']) {\n $file = $request->attachment['file'];\n \n $file = str_replace(explode(',', $file)[0].',', '', $file);\n $file = str_replace(' ', '+', $file);\n\n $file = base64_decode($file);\n $safeName = str_random(10).'.'.$request->attachment['type'];\n file_put_contents(public_path().Post::ATTACHMENT_PATH.'/'.$safeName, $file);\n \n $request['attachment'] = $safeName;\n\n unlink(public_path().Post::ATTACHMENT_PATH.'/'.$post->attachment);\n } else {\n $request['attachment'] = $post->attachment;\n }\n\n $request['user_id'] = Auth::user()->id;\n $request['category_id'] = $request->category;\n $request['tag_id'] = $request->tag;\n\n $post->update($request->all());\n }", "public function edit(Advert $advert)\n {\n //\n }", "public function edit($entity)\n {\n $statement = \"UPDATE contact SET \n message = :message\n WHERE id=:id LIMIT 1\";\n $prepare = $this->db->prepare($statement);\n $prepare->bindValue(\":message\", $entity->getMessage());\n $prepare->bindValue(\":id\", $entity->getId());\n $prepare->execute();\n }", "public function update($entity);", "public function update($entity);", "public function editArticle(): void\n {\n $this->articleId = $_GET['editId'];\n $this->title = $_POST['titleArticle'];\n $this->content = $_POST['contentArticle'];\n $this->category = $_POST['categoryArticle'];\n $datetime = new DateTime();\n $this->editDate = $datetime->format('Y-m-d H:i:s');\n\n if ($this->image['tmp_name'] !== null) {\n $this->image = $_FILES['imageArticle'];\n $tmp_file = $this->image['tmp_name'];\n $type_file = $this->image['type'];\n\n $temp = explode(\".\", $this->image['name']);\n $name_file = round(microtime(true)) . '.' . end($temp);\n\n $destination = 'application/views/images/';\n\n if (!is_uploaded_file($tmp_file) === true) {\n exit(\"Le fichier est introuvable\");\n };\n if (!strstr($type_file, 'jpg') && !strstr($type_file, 'jpeg') && !strstr($type_file, 'bmp')) {\n exit(\"Le fichier n'est pas une image\");\n }\n if (preg_match('#[\\x00-\\x1F\\x7F-\\x9F/\\\\\\\\]#', $name_file)) {\n exit(\"Nom de fichier non valide\");\n } else if (!move_uploaded_file($tmp_file, $destination . $name_file)) {\n exit(\"Impossible de copier le fichier dans $destination\");\n } else {\n move_uploaded_file($tmp_file, $destination . $name_file);\n }\n $this->articleModel->editImageOfArticle($name_file, $this->articleId);\n }\n\n $this->articleModel->editArticle($this->articleId, $this->title, $this->content, $this->category, $this->editDate);\n\n // Redirect to the articles list page\n Router::redirectTo('listArticles');\n exit();\n }", "public function edit(Announcement $announcement)\n {\n //\n }", "public function update(Request $request, $id)\n {\n $proposal = Proposal::findOrFail($id);\n $this->authorize('update', $proposal);\n\n $input = $request->except('_token', '_method');\n\n if ($request->hasFile('attachments')) {\n $input['attachments'] = $this->uploadAttachments($request->file('attachments'));\n }\n\n $proposal->update($input);\n\n return;\n }", "public function store(Request $request,Attachment $attachment)\n {\n $data = $request->all();\n $attachment->fill($data);\n $attachment->save();\n return redirect()->route('attachment.index');\n }", "public function edit(Draft $draft)\n {\n //\n }", "public function update($id, CreateArticleRequest $request, Article $article)\n {\n \n $article_to_update = $article->find($id);\n $uploaded_image = $request->file('image_file');\n $parameter = $request->all();\n\n if (isset($uploaded_image)) {\n\n $ext = $uploaded_image->getClientOriginalExtension();\n $newImageName = $article_to_update->id . \".\" . $ext;\n\n $uploaded_image->move(\n base_path() . '/public/img/uploads/article/', $newImageName\n );\n Image::make(base_path() . '/public/img/uploads/article/' . $newImageName, array(\n 'width' => 170,\n 'height' => 120,\n ))->save(base_path() . '/public/img/uploads/article/' . $newImageName);\n unset($parameter['image_file']);\n $parameter['image'] = $newImageName;\n $article_to_update->update($parameter);\n\n } else {\n $parameter['image'] = $article_to_update->image;\n $article_to_update->update($parameter);\n } \n \n Session::flash('message', 'The article was successfully edited!.');\n Session::flash('flash_type', 'alert-success'); \n return redirect('articles');\n }", "public function edit($id)\n {\n $entity = MessageContent::find($id);\n\n if (!empty($entity->files)) {\n $files_arr = explode(',', $entity->files);\n $files = [];\n foreach ($files_arr as $f)\n $files[] = Resources::find($f);\n $entity->files = $files;\n } else {\n $entity->files = [];\n }\n\n// dd($entity);\n return view('admin.message-content.edit', ['entity' => $entity]);\n }", "public function edit(Contact $contact) {\n //\n }", "public function updateAction(Request $request, $id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('SyndicateComponentBundle:Education')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Education entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n $editForm = $this->createEditForm($entity);\n $editForm->handleRequest($request);\n\n if ($editForm->isValid()) {\n $entity->upload();\n $em->flush();\n $this->get('session')->getFlashBag()->add(\n 'success',\"Data has been updated successfully\"\n );\n\n return $this->redirect($this->generateUrl('education_edit', array('id' => $id)));\n }\n\n return $this->render('SyndicateComponentBundle:Education:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'nullable',\n // 'path' => 'required', \n 'description' => 'nullable' \n ]);\n \n $file = File::find($id); \n $file-> edit($request->all());\n if ($request->file('path') != null){\n $file->uploadFile($request->file('path')); \n }\n // dd($file->originalname);\n return redirect()->route('files.index');\n \n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function editPost() {\n\n if ($this->request->is('post')) {\n\n $this->Post->create();\n\n $id = $this->request->data['Post']['id'];\n\n if (!$id) {\n throw new NotFoundException(__('Invalid post'));\n }\n\n $post = $this->Post->findById($id);\n\n if (!$post) {\n throw new NotFoundException(__('Invalid post'));\n }\n\n if ($this->request->is('post') || $this->request->is('put')) {\n $this->Post->id = $id;\n $data = $this->getPreparedPostData($this->request);\n if ($this->Post->save($data)) {\n $this->Session->setFlash('Your post has been updated.');\n $this->redirect(array('action' => 'index'));\n } else {\n $this->Session->setFlash('Unable to update your post.');\n }\n }\n\n if (!$this->request->data) {\n $this->request->data = $post;\n }\n }\n }", "public function actionEdit() {\n $parmas = array();\n $model = $this->loadModel();\n if (count($model) > 0) {\n if (Yii::app()->request->isAjaxRequest) {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n\n $attachment1_error = isset(Yii::app()->session['attachment1']) ? Yii::app()->params['attachment1_error'] : '';\n $attachment2_error = isset(Yii::app()->session['attachment2']) ? Yii::app()->params['attachment2_error'] : '';\n $attachment3_error = isset(Yii::app()->session['attachment3']) ? Yii::app()->params['attachment3_error'] : '';\n unset(Yii::app()->session['attachment1']);\n unset(Yii::app()->session['attachment2']);\n unset(Yii::app()->session['attachment3']);\n $parmas['model'] = $model;\n $parmas['attachment1_error'] = $attachment1_error;\n $parmas['attachment2_error'] = $attachment2_error;\n $parmas['attachment3_error'] = $attachment3_error;\n $this->render('/admin/hobby_new/edit', $parmas);\n } else {\n $this->redirect(array('adminhobby_new/index'));\n }\n }", "public function editEntity(int $id): Response\n {\n $fileEntity = FileSystemEntities::getById($id);\n $request = $this->request->getPutData();\n\n $fileEntity->field_name = $request['field_name'];\n $fileEntity->updateOrFail();\n\n return $this->response($fileEntity);\n }", "public function editArticle(Request $request, SluggerInterface $slugger, Article $idArticle): Response \n {\n /********************************************************/ \n /* We get the form to add an article */\n /* without create a new instance of the article entity */\n /********************************************************/ \n \n $formArticle = $this->createForm( ArticleFormType::class, $idArticle);\n \n $formArticle->handleRequest($request);\n \n /**************************************************/ \n /* we check that the form is submitted and valid */\n /**************************************************/\n if ($formArticle->isSubmitted() && $formArticle->isValid() ) {\n //var_dump($formArticle);\n \n $pictureFile = $formArticle->get('picture')->getData();\n \n //var_dump($_FILES);\n \n //var_dump($pictureFile);\n \n if ($pictureFile) {\n $originalFilename = pathinfo($pictureFile->getClientOriginalName(), PATHINFO_FILENAME);\n \n /********************************************************************/\n /* this is needed to safely include the file name as part of the URL*/\n /********************************************************************/\n \n $safeFilename = $slugger->slug($originalFilename);\n $newFilename = $safeFilename.'-'.uniqid().\".\".$pictureFile->guessExtension();\n\n try {\n $pictureFile->move(\n $this->getParameter('upload_directory'),\n $newFilename\n );\n } catch (FileException $e) {\n $this->addFlash('message','une erreur est survenu lors de l\\'upload de l\\'image!');\n return $this->redirectToRoute('admin');\n }\n \n $article_data = $formArticle->getData();\n $article_data->setCreatedAt(new \\DateTime('NOW') ); \n \n $idArticle->setPicture($newFilename);\n \n $articleManager = $this->getDoctrine()->getManager();\n /*****************************************************************/\n /* useless to persist because it already comes from the database*/\n /*****************************************************************/\n $articleManager->flush();\n \n /*************************/\n /* adding a flash message*/\n /*************************/\n \n $this->addFlash('message','Article à bien été modifié!');\n /***************************/ \n /* redirect to admin page */\n /***************************/\n return $this->redirectToRoute('admin');\n return new Response(\"Article modifié\");\n }\n \n \n }\n /*******************************************************/ \n /* we indicate to the controller the associated view */\n /*******************************************************/\n return $this->render(\"admin/addArticle.html.twig\",[\n 'formArticle'=>$formArticle->createView()\n ]);\n \n \n }", "public function edit(Archive $archive)\n {\n //\n }", "public function edit(Contact $contact)\n {\n //\n }", "public function edit(Contact $contact)\n {\n //\n }", "public function edit(Contact $contact)\n {\n //\n }", "public function edit(Contact $contact)\n {\n //\n }", "public function edit(Contact $contact)\n {\n //\n }", "public function edit(Contact $contact)\n {\n //\n }", "public function edit(Contact $contact)\n {\n //\n }", "public function edit(Contact $contact)\n {\n //\n }", "public function edit(Contact $contact)\n {\n //\n }", "public function edit(Contact $contact)\n {\n //\n }", "public function edit(Contact $contact)\n {\n //\n }", "public function edit(Article $article)\n {\n //\n }", "public function edit(Article $article)\n {\n //\n }", "public function edit(Article $article)\n {\n //\n }", "public function edit(Article $article)\n {\n //\n }", "public function edit(Article $article)\n {\n //\n }", "public function update(ArticleRequest $request, $id)\n {\n $input=$request->all();\n $article=Article::find($id);\n $article->titre=$input['titre'];\n $article->auteur=$input['auteur'];\n $article->contenu=$input['contenu'];\n $article->presentation=$input['presentation'];\n $article->cat_id=$input['cat_id'];\n $article->relu=false;\n if(isset($input['image'])){\n $article->image = Article::saveFile($request,'image',\"Image_$id\");\n }\n $article->save();\n return redirect(\"/article/$id\")->with('message','Merci d\\'avoir édité cet article ! Il sera remis en ligne une fois relu');\n }", "public function update(Request $request, $id)\n {\n $add=Advertisement::findOrFail($id);\n $input = $request->all();\n\n if ($file = $request->file('photo_id')) {\n if (!($file->getClientSize() > 2100000)) {\n if($add->image->photo) {\n unlink(public_path() . $add->image->photo->path);\n }\n $photo_user=Photo::findOrFail($add->photo_id);\n $photo_user->delete();\n\n $name = time() . $file->getClientOriginalName();\n $file->move('images', $name);\n $photo = Photo::create(['path' => $name]);\n $input['photo_id'] = $photo->id;\n $imageAdd=ImageAdvertisement::where('advertisement_id',$id)->first();\n if($imageAdd){\n $imageAdd->photo_id=$input['photo_id'];\n $imageAdd->save();\n }else{\n ImageAdvertisement::create(['advertisement_id'=>$id,'photo_id'=>$input['photo_id']]) ;\n }\n\n } else {\n Session::flash('add_change', 'Image size should not exceed 2 MB');\n return redirect('advertisement/'.$id.'/edit');\n }\n }\n\n $add->update($input);\n Session::flash('add_change','Advertisement has been successfully updated!');\n return redirect('advertisement/'.$id);\n }", "public function update($input, $id, $withAttachments=false)\n {\n $query = $this->model->newQuery();\n\n $model = $query->findOrFail($id);\n\n $model->fill($input);\n\n $model->save();\n\n if(!empty($input['attachments']) && $withAttachments){\n \n $this->assignAttachments($input['attachments'],$model->id);\n }\n\n return $model;\n }", "public function edit(Entrenador $entrenador)\n {\n //\n }", "public function update(EditRequest $request, $id)\n {\n if($request->imageFile){\n $imageName= basename($request->imageFile->store(\"public\"));\n $request['image']=$imageName;\n\n }\n\n Slide::find($id)->update($request->all());\n session()->flash(\"msg\", \"تم تحديث السلايد\");\n return redirect(route(\"slide\"));\n }", "public function edit(Download $download)\n {\n //\n }", "public function updateAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('StriideInventoryBundle:Item')->find($id);\n $photo = $entity->getPhoto();\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Item entity.');\n }\n\n $editForm = $this->createForm(new ItemType(), $entity);\n $deleteForm = $this->createDeleteForm($id);\n\n $request = $this->getRequest();\n\n $editForm->handleRequest($request);\n\n if ($editForm->isValid())\n {\n $p = $entity->getPhoto();\n if(empty($p) && !empty($photo))\n {\n $entity->setPhoto($photo);\n }\n else if(!empty($p))\n {\n $media = $this->get('striide_inventory.service.media')->save($entity->getPhoto());\n $entity->setPhoto($media->getId());\n }\n\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('StriideInventoryBundle_admin_item_show', array('id' => $id)));\n }\n\n return $this->render('StriideInventoryBundle:Item:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'json_types' => json_encode($this->get('striide_inventory.types')->getInventoryTypesArray()),\n 'edit_form_theme' => 'StriideTwitterbootstrapBundle:Form:form_theme.html.twig',\n 'delete_form' => $deleteForm->createView(),\n 'crumbs' => array(\n array('href' => $this->get('router')->generate('StriideInventoryBundle_homepage'),\n 'label' => $this->get('translator')->trans('Inventory')),\n array('href' => $this->get('router')->generate('StriideInventoryBundle_admin_item_edit', array('id' => $entity->getId())),\n 'label' => $this->get('translator')->trans('Edit Item'))\n )\n ));\n }", "public function update(Request $request,$id)\n {\n\n $post=new Posts();\n $this->authorize('update',$post);\n\n $campos=[\n 'titulo'=>'required|string|max:100',\n 'contenido'=>'required'\n ];\n\n //Validacion Imagen\n if ($request->hasFile('imagen')) {\n $campos+=['imagen'=>'required|max:10000|mimes:jpeg,png,jpg'];\n }\n\n $Mensaje=[\"required\"=>'El :attribute es requerido'];\n $this->validate($request,$campos,$Mensaje);\n\n $datosPost=request()->except(['_token','_method']);\n \n if ($request->hasFile('imagen')) {\n $post= Posts::findOrFail($id);\n Storage::delete('public/'.$post->imagen);\n $datosPost['imagen']=$request->file('imagen')->store('uploads','public');\n }\n\n Posts::where('id','=',$id)->update($datosPost);\n\n //$empleado= Empleados::findOrFail($id);\n //return view('empleados.edit',compact('empleado'));\n\n return redirect('post');\n }", "public function insertAttachment()\n\t{\n\t\t$module = \\App\\Request::_get('module');\n\t\t$id = $this->getId();\n\t\t$db = App\\Db::getInstance();\n\t\t$fileSaved = false;\n\t\t//This is to added to store the existing attachment id of the contact where we should delete this when we give new image\n\t\t$oldAttachmentid = (new App\\Db\\Query())->select(['vtiger_crmentity.crmid'])->from('vtiger_seattachmentsrel')\n\t\t\t\t->innerJoin('vtiger_crmentity', 'vtiger_crmentity.crmid = vtiger_seattachmentsrel.attachmentsid')\n\t\t\t\t->where(['vtiger_seattachmentsrel.crmid' => $id])->scalar();\n\t\tif ($_FILES) {\n\t\t\tforeach ($_FILES as $fileindex => $files) {\n\t\t\t\tif (empty($files['tmp_name'])) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$fileInstance = \\App\\Fields\\File::loadFromRequest($files);\n\t\t\t\tif ($fileInstance->validate('image')) {\n\t\t\t\t\t$files['original_name'] = \\App\\Request::_get($fileindex . '_hidden');\n\t\t\t\t\t$fileSaved = $this->uploadAndSaveFile($files);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$imageName = (new App\\Db\\Query())->select(['name'])->from('vtiger_seattachmentsrel')\n\t\t\t\t->innerJoin('vtiger_attachments', 'vtiger_seattachmentsrel.attachmentsid = vtiger_attachments.attachmentsid')\n\t\t\t\t->leftJoin('vtiger_contactdetails', 'vtiger_contactdetails.contactid = vtiger_seattachmentsrel.crmid')\n\t\t\t\t->where(['vtiger_seattachmentsrel.crmid' => $id])->scalar();\n\t\t$imageName = \\App\\Purifier::decodeHtml($imageName);\n\t\t//Inserting image information of record into base table\n\t\t$db->createCommand()->update('vtiger_contactdetails', ['imagename' => $imageName], ['contactid' => $id])\n\t\t\t->execute();\n\t\t//This is to handle the delete image for contacts\n\t\tif ($module === 'Contacts' && $fileSaved) {\n\t\t\tif ($oldAttachmentid) {\n\t\t\t\t$setype = (new App\\Db\\Query())->select(['setype'])\n\t\t\t\t\t->from('vtiger_crmentity')\n\t\t\t\t\t->where(['crmid' => $oldAttachmentid])\n\t\t\t\t\t->scalar();\n\t\t\t\tif ($setype === 'Contacts Image') {\n\t\t\t\t\t$db->createCommand()->delete('vtiger_attachments', ['attachmentsid' => $oldAttachmentid])->execute();\n\t\t\t\t\t$db->createCommand()->delete('vtiger_seattachmentsrel', ['attachmentsid' => $oldAttachmentid])->execute();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t\\App\\Log::trace(\"Exiting from insertIntoAttachment($id,$module) method.\");\n\t}", "public function update(Request $request, $id)\n {\n if(auth()->guest() || auth()->user()->role != 'admin'){\n abort(\\Symfony\\Component\\HttpFoundation\\Response::HTTP_FORBIDDEN);\n }\n\n $request->validate([\n 'elementname' => 'required||max:255',\n 'elementtype' => 'required||max:255',\n 'elementimg' => 'required',\n 'elementlore' => 'required',\n ]);\n\n $element = Element::find($id);\n $element->elementname = $request->input('elementname');\n $element->elementtype = $request->input('elementtype');\n $element->elementimg = $request->file('elementimg')->storePublicly('elementImages','public');\n $element->elementimg = str_replace('elementImages', '', $element->elementimg);\n $element->elementlore = $request->input('elementlore');\n $element->update();\n\n return redirect()->back()->with('status','Element Updated Successfully');\n }", "public function update(PostFormRequest $request, $id)\n {\n\n\n $post=post::findOrFail($id);\n $input=$request->all();\n $input['user_id']=Auth::user()->id;\n\n if ($file=$request->file('fileName')) \n {\n $name=time().$file->getClientOriginalName();\n $file->move('images/posts',$name); \n $input['fileName']=$name; \n\n\n }\n $post->update($input);\n Session::flash('flash_admin','The Post has been edited');\n return redirect('/account');\n\n \n }", "public function update(Request $request, Attendace $attendace)\n {\n //\n }", "public function edit(Blog $blog)\n {\n //\n }", "public function setContentId(string $contentId): Attachment;", "public function edit(Department $department)\n {\n }", "public function edit(Ad $ad)\n {\n //\n }", "public function edit(Ad $ad)\n {\n //\n }", "public function edit(Department $department)\n {\n //\n }", "public function update(Entity $entity);", "public function edit(Conversation $conversation)\n {\n //\n }", "public function edit(Conversation $conversation)\n {\n //\n }", "public function update(Request $request,$id)\n {\n\n $docente=Docente::findOrFail($id);\n $docente->fill($request->all())->save();\n if ($request->hasfile('imagen')) {\n\n $path=Storage::disk('public')->put('imagenes', $request->file('imagen'));\n $docente->fill(['imagen' => asset($path)])->save();\n\n\n }\n\n //$docente->update($request->all());\n //$docente->turnos()->sync($request->get('turnos'));\n\n Session::flash('info_message', 'Docente actualizado con éxito');\n return redirect()->route('docentes.index',compact('docente'));\n }", "public function editAction()\n {\n\n $id = $this->getRouteParams(\"id\");\n\n if ($_SERVER['REQUEST_METHOD'] === 'POST') {\n\n $id = $_POST['id'];\n $title = $_POST['title'];\n $content = $_POST['content'];\n\n\n try {\n\n $post = PostService::update($id, $title, $content);\n\n View::renderTemplate('Posts/editPost.html', [\n 'post' => $post\n ]);\n return;\n\n } catch (PDOException $e) {\n echo $e->getMessage();\n }\n\n } else {\n $post = PostService::readOne($id);\n View::renderTemplate('Posts/editPost.html', [\n 'post' => $post\n ]);\n }\n\n }", "public function edit($entity, array $attributes)\n\t{\n\t\t$this->validator->replace('key', $this->getEntityKey($entity));\n\t\treturn $this->perform('edit', $entity, $attributes);\n\t}", "public function update($id, EditarPalestraRequest $request)\n\t{\n\n\t\t$palestra = Palestra::findOrFail($id);\n\n\n\t\t$file = Input::file('foto');\n\t\tif ($file) {\n\t\t \t$destinationPath = public_path() . '/uploads/';\n\t\t \t$filename = $file->getClientOriginalName();\n\t\t \t$upload_success = $file->move($destinationPath, $filename);\n\n\t\t \tif ($upload_success) {\n\t\t \t\t$palestra->foto = '/uploads/' . $filename;\n\t\t \t}\n\t\t}\n\n $palestra->nome = $request->nome;\n $palestra->descricao = $request->descricao;\n\n\t\t$palestra->save();\n\t\treturn redirect('admin/palestras');\n\n\t}", "public function updateAction(Request $request, $id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('StalkAdminBundle:MarketingMaterials')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find MarketingMaterials entity.');\n }\n\n //Выборка прикрепленных PDF\n $beforeSavePdfs = $currentPdfIds = array();\n foreach ($entity->getPdf() as $pdf)\n $beforeSavePdfs[$pdf->getId()] = $pdf;\n \n //Выборка прикрепленных изображений\n $beforeSaveImages = $currentImageIds = array();\n foreach ($entity->getImage() as $image)\n $beforeSaveImages[$image->getId()] = $image;\n \n //Выборка прикрепленных видео\n $beforeSaveVideos = $currentVideoIds = array();\n foreach ($entity->getVideo() as $video)\n $beforeSaveVideos[$video->getId()] = $video;\n \n $editForm = $this->createEditForm($entity);\n $editForm->handleRequest($request);\n\n if ($editForm->isValid()) {\n \n //Добавляем PDF\n foreach ($entity->getPdf() as $pdf) {\n\n $time = new \\DateTime();\n $pdf->setMaterial($entity);\n $pdf->setTitle($pdf->getTitle());\n \n $file = $pdf->getFile();\n\n if ( !empty($file) ) {\n \n $pdfName = $time->format('U') . '_' . str_replace(' ', '_', $file->getClientOriginalName()); \n \n $file->move($pdf->getAbsolutePath(), $pdfName);\n \n $pdf->setLink('/' . $pdf->getWebPath() . '/' . $pdfName);\n \n } \n \n $image = $pdf->getThumbnail();\n \n if ( !empty($image) ) {\n \n $imageName = $time->format('U') . '_' . str_replace(' ', '_', $image->getClientOriginalName()); \n \n $image->move($pdf->getAbsolutePath(), $imageName);\n \n $pdf->setImage('/' . $pdf->getWebPath() . '/' . $imageName);\n \n } \n\n //Если вложение - не только что занесенная (у нее есть id)\n if ($pdf->getId()) $currentPdfIds[] = $pdf->getId();\n\n }\n \n //Добавляем изображение \n foreach ($entity->getImage() as $image) {\n\n $image->setMaterial($entity); \n $image->setTitle($image->getTitle());\n \n $img = $image->getFile();\n \n if ( !empty($img) ) {\n \n $imgName = str_replace(' ', '_', $img->getClientOriginalName()); \n \n $img->move($image->getAbsolutePath(), $imgName);\n \n $image->setImage('/' . $image->getWebPath() . '/' . $imgName);\n \n } \n\n //Если вложение - не только что занесенная (у нее есть id)\n if ($image->getId()) $currentImageIds[] = $image->getId();\n\n }\n \n //Добавляем видео \n foreach ($entity->getVideo() as $video) {\n\n $video->setMaterial($entity); \n $video->setTitle($video->getTitle());\n $video->setUrl($video->getUrl()); \n\n $thumbnail = $video->getFile();\n \n if ( !empty($thumbnail) ) {\n \n $thumbnailName = str_replace(' ', '_', $thumbnail->getClientOriginalName()); \n \n $thumbnail->move($video->getAbsolutePath(), $thumbnailName);\n \n $video->setThumbnail('/' . $video->getWebPath() . '/' . $thumbnailName);\n \n } \n \n //Если видео - не только что занесенная (у нее есть id)\n if ($video->getId()) $currentVideoIds[] = $video->getId();\n\n }\n \n $em->persist($entity);\n \n //Если PDF которая была до сохранения отсутствует в текущем наборе - удаляем его\n foreach ($beforeSavePdfs as $pdfId => $pdf)\n if (!in_array( $pdfId, $currentPdfIds)) $em->remove($pdf);\n \n //Если изображение которая была до сохранения отсутствует в текущем наборе - удаляем его\n foreach ($beforeSaveImages as $imageId => $image)\n if (!in_array( $imageId, $currentImageIds)) $em->remove($image);\n \n //Если видео которая было до сохранения отсутствует в текущем наборе - удаляем его\n foreach ($beforeSaveVideos as $videoId => $video)\n if (!in_array( $videoId, $currentVideoIds)) $em->remove($video);\n \n $em->flush();\n \n $this->get('session')->getFlashBag()->add('notice-successfully', 'Cохранено!');\n\n return $this->redirect($this->generateUrl('marketing-materials_edit', array('id' => $id)));\n }\n\n return $this->render('StalkAdminBundle:MarketingMaterials:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView()\n ));\n }", "public function editAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $tagNames = array();\n foreach ($model->fetchTags($photo) as $tag) {\n $tagNames[] = $tag->name;\n }\n\n $form = $model->getForm();\n $form->setAction($this->_helper->url('update', null, null, array('id' => $photo->id)));\n $form->setDefault('tags', implode(',', $tagNames));\n $form->populate($photo->toArray());\n\n $this->view->photo = $photo;\n $this->view->photoForm = $form;\n }", "public function update(EditRequest $request, $id)\n {\n\n \n \n $articles = Article::find($id);\n if($request->hasFile('pic')){\n $pic = $request->file('pic');\n $fileName = time() . '.'.$pic->getClientOriginalExtension();\n // 'images/cars/' . $filename;\n if(Image::make($pic)->save(public_path('images/'.$fileName))){\n $articles->pic = $fileName;\n }\n }\n \n $articles->title = $request->title;\n $articles->datum = $request->datum;\n $articles->latLngLat = $request->latLngLat;\n $articles->latLngLng = $request->latLngLng;\n $articles->tijdstip = $request->tijdstip;\n $articles->text = $request->text;\n $articles->category_id = $request->input('category_id');\n \n $articles->user_id = Auth::user()->id;\n if( $articles->save()){\n session()->flash('success','Uw munchie werd aangepast!');\n return redirect('myarticles');\n }\n \n }", "public function edit($id) \r\n {\r\n $this->load(array('id=?',$id));\r\n $this->copyFrom('POST');\r\n $this->update();\r\n }", "public function update(Request $request, $id)\n {\n // dd($request);\n\n if (array_key_exists(\"file\",$request->all())){\n $photo = $request->file;\n $photo = $this->saveProduct($photo, $request);\n } else {\n $img = request('edit_img_path');\n $photo = $img;\n }\n // dd($photo);\n\n $ValidateFname = request('fname');\n $validate = $this->existOrNot($ValidateFname);\n \n if($validate == true) {\n $msg['msg'] = \"error\";\n $msg['msg_content'] = \"Already Exist.\";\n } else {\n\n $contact = Contact::find($id);\n $contact->photo = $photo;\n $contact->fname = $ValidateFname;\n $contact->mname = $request->get('mname');\n $contact->lname = $request->get('lname');\n $contact->email = $request->get('email');\n $contact->mobile = $request->get('mobile');\n $contact->landline = $request->get('landline');\n $contact->type = $request->get('type');\n $contact->notes = $request->get('notes');\n $contact->save();\n\n if($contact) {\n $msg['msg'] = \"updated\";\n $msg['msg_content'] = \"Contact Updated Successfully.\";\n } else {\n $msg['msg'] = \"error\";\n $msg['msg_content'] = \"Something went wrong. Please contact your administrator\";\n }\n }\n return Redirect::back()->with($msg); \n }", "public function update(Request $request, $id) {\n try {\n $case = CaseFile::findOrFail($id);\n\n $this->validate($request, [\n 'clientCaseRefHead' => 'required' \n ]); \n $request['approvedBy_id'] = $request->input(\"approvedBy_id\") == \"\" ? null : $request->input(\"approvedBy_id\");\n $request['caseRef_id'] = $request->input(\"caseRef_id\") == \"\" ? null : $request->input(\"caseRef_id\"); \n $request['writer_id'] = $request->input(\"writer_id\") == \"\" ? null : $request->input(\"writer_id\");\n\n if($request['recipient_id'] == \"\") \n $request['recipient_id']= null; \n $input = $request->all(); \n $case->fill($input)->save(); \n \n return response($case);\n } catch (Exception $e) {\n return \"Error\";\n }\n }", "public function edit(Document $document)\n {\n //\n }", "public function edit(Document $document)\n {\n //\n }", "public function edit(Document $document)\n {\n //\n }", "public function edit(Document $document)\n {\n //\n }", "public function edit(Document $document)\n {\n //\n }" ]
[ "0.6940358", "0.66863227", "0.66678387", "0.6618783", "0.6502045", "0.6269806", "0.6240325", "0.61733574", "0.61345464", "0.61226195", "0.60483867", "0.60294735", "0.6023398", "0.5915604", "0.5908727", "0.59067714", "0.5872089", "0.5798749", "0.5760527", "0.5757321", "0.5725215", "0.5721972", "0.57201916", "0.57143116", "0.5713756", "0.5677064", "0.5674846", "0.56491566", "0.5647682", "0.56441844", "0.56393284", "0.56393284", "0.5627582", "0.5623516", "0.56180805", "0.5607245", "0.5579709", "0.5566973", "0.5559212", "0.5550404", "0.5536988", "0.5534097", "0.5526986", "0.5523076", "0.5518975", "0.5502679", "0.5501562", "0.54981565", "0.5493083", "0.5493083", "0.5493083", "0.5493083", "0.5493083", "0.5493083", "0.5493083", "0.5493083", "0.5493083", "0.5493083", "0.5493083", "0.5488044", "0.5488044", "0.5488044", "0.5488044", "0.5488044", "0.54875416", "0.5486117", "0.54857814", "0.548226", "0.5481092", "0.54792374", "0.5471945", "0.5464013", "0.5463109", "0.5455223", "0.5453207", "0.5452732", "0.54522866", "0.5447292", "0.54465955", "0.54436255", "0.54436255", "0.5436754", "0.5436361", "0.543628", "0.543628", "0.5435805", "0.5433631", "0.5423898", "0.5422861", "0.54217213", "0.5419439", "0.54180557", "0.54072404", "0.53946185", "0.5392183", "0.5389792", "0.5389792", "0.5389792", "0.5389792", "0.5389792" ]
0.62401927
7
Deletes a Post entity.
public function deleteAction(Request $request, $id, $document_id) { if (!$this->container->getParameter('manhattan_posts.include_attachments')) { throw new AccessDeniedHttpException('Attachment functionality has not been enabled in the bundle.'); } if (false === $this->get('security.context')->isGranted('ROLE_ADMIN')) { throw new AccessDeniedException(); } $em = $this->getDoctrine()->getManager(); $entity = $em->getRepository('ManhattanPostsBundle:Attachment')->find($document_id); if (!$entity) { throw $this->createNotFoundException('Unable to find Attachment entity.'); } $em->remove($entity); $em->flush(); return $this->redirect($this->generateUrl('console_news_documents', array('id' => $id))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete(Entity $post): void {\n\t\t$sql = \"DELETE p, c FROM post p LEFT JOIN comment c ON p.id = c.post_id WHERE p.slug = :slug\";\n\n\t\t$request = $this->pdo->prepare($sql);\n\t\t$request->execute([\n\t\t\t'slug' => $post->getSlug(), \n\t\t]);\n\t}", "public function delete() {\n\t\t$db = self::getDB();\n\t\t$sql = \"DELETE FROM posts \n\t\t\t\tWHERE\n\t\t\t\t\tidPost = :idPost \";\n\t\t$query = $db->prepare($sql);\n\t\t$query->execute([\n\t\t\t':idPost' => $this->getIdPost()\n\t\t]);\n\t}", "public function destroy(Post $post){\n $post->delete();\n }", "public function deleteAction()\n {\n $post = $this->checkInputDataIdAndEntity();\n if ( $post === false ) {\n $this->getResponse()->setStatusCode(404);\n return;\n }\n\n $this->postService->deletePost($post);\n $this->flashMessenger()->addSuccessMessage('Deleted the post.');\n\n return $this->redirect()->toRoute('posts', ['action'=>'index']);\n }", "public function deleted(Post $post)\n {\n //\n $this->postElasticSearch->deleteDoc($post->id);\n }", "public function delete($idPost);", "public function deleteAction() {\n\t\t// if($post->delete()) {\n\t\t// \tSession::message([\"Post <strong>$post->name</strong> deleted!\" , \"success\"]);\n\t\t// \tredirect_to('/posts/index');\n\t\t// } else {\n\t\t// \tSession::message([\"Error saving! \" . $error->get_errors() , \"success\"]);\n\t\t// }\n\t}", "public function deleteAction()\n {\n $postId = (int)$this->params()->fromRoute('id', -1);\n \n // Validate input parameter\n if ($postId<0) {\n $this->getResponse()->setStatusCode(404);\n return;\n }\n \n $post = $this->entityManager->getRepository(Post::class)\n ->findOneById($postId); \n if ($post == null) {\n $this->getResponse()->setStatusCode(404);\n return; \n }\n \n if (!$this->access('post.own.delete', ['post'=>$post])) {\n return $this->redirect()->toRoute('not-authorized');\n }\n \n $this->postManager->removePost($post);\n $this->imageManager->removePost($postId);\n $this->videoManager->removePost($postId);\n $this->audioManager->removePost($postId);\n \n // Redirect the user to \"admin\" page.\n return $this->redirect()->toRoute('posts', ['action'=>'admin']); \n \n }", "public function destroy(Post $post)\n {\n\n $post->delete();\n\n redirect('/posts');\n }", "public function destroy(Post $post)\n {\n $post->delete();\n return redirect('/post');\n }", "public function delete(){\n global $db;\n $delete = $db->prepare('DELETE FROM posts WHERE id = :id');\n $delete->bindValue(':id', $this->_id, PDO::PARAM_INT);\n $delete->execute();\n }", "public function deletePost(\\post\\model\\Post $post) {\n\t\t//Remove the post.\n\t\t$this->postDAL->deletePost($post);\n\t}", "public function destroy(Post $post, Request $request)\n {\n $this->authorize('delete', $post);\n\n $request->session()->put('postName', $post->title);\n Session::flash('success');\n\n if (isset($post->image)) {\n Storage::delete('public/' . $post->image);\n }\n\n $post->tags()->detach();\n $post->delete();\n\n return redirect('posts');\n }", "public function destroy(Post $post) {\n //\n }", "public function destroy() {\n $this->post->destroy();\n redirect('/backend/posts', ['notice' => 'Successfully destroyed']);\n }", "public function destroy(Post $post)\n {\n //\n }", "public function destroy(Post $post)\n {\n //\n }", "public function destroy(Post $post)\n {\n //\n }", "public function destroy(Post $post)\n {\n //\n }", "public function destroy(Post $post)\n {\n //\n }", "public function destroy(Post $post)\n {\n //\n }", "public function destroy(Post $post)\n {\n //\n }", "public function destroy(Post $post)\n {\n //\n }", "public function destroy(Post $post)\n {\n //\n }", "public function destroy(Post $post)\n {\n //\n }", "public function destroy(Post $post)\n {\n //\n }", "public function destroy(Post $post)\n {\n //\n }", "public function destroy(Post $post)\n {\n //\n }", "public function destroy(Post $post)\n {\n //\n }", "public function destroy(Post $post)\n {\n //\n }", "public function destroy(Post $post)\n {\n //\n }", "public function delete(User $user, Post $post);", "public function deleted(Post $post)\n {\n $post->recordActivity('deleted');\n }", "public function destroy(Post $post)\n {\n $post->delete();\n return ['message'=>'Deleted successfully'];\n }", "public function destroy(Post $post)\n {\n $post->tags()->sync([]);\n\n $post->delete();\n\n return redirect()->route('post.index')->with('status', 'Record deleted');\n }", "public function destroy(Post $post)\n {\n $post->delete();\n\n return redirect(route('post.index'));\n }", "public function destroy(Post $post)\n {\n $post->delete();\n\n return \"ok\";\n }", "public function destroy(Request $request, Post $post)\n {\n $client = $request->user();\n\n if ($client->cannot('delete_article')) {\n return response()->json([\n 'error' => 'Forbidden',\n ], 403);\n }\n\n $post->delete();\n\n return response()->json(null, 204);\n }", "public function deleteAction(Request $request, Post $post)\n {\n $form = $this->createDeleteForm($post);\n $form->handleRequest($request);\n\n if(!$this->getUser()){\n $this->addFlash('notice', 'You must be identified to access this section');\n return $this->redirectToRoute('post_index');\n }\n\n if ($form->isSubmitted() && $form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->remove($post);\n $em->flush($post);\n }\n\n return $this->redirectToRoute('post_index');\n }", "public function destroy(ManagePostRequest $request, Post $post)\n {\n $this->postRepository->delete($post);\n\n return redirect()->route('frontend.blog.post.index')\n ->withFlashSuccess(__('alerts.frontend.blog.posts.deleted'));\n }", "public function destroy(Post $post)\n {\n $post->delete();\n return redirect()->action([PostController::class, 'index'])->with('status', 'Data deteted!');\n }", "public function destroy(Post $post)\n {\n $post->delete();\n\n return redirect()->route('post.index')->with('success','post deleted successfully');\n }", "public function destroy($post)\n {\n $post->delete();\n return redirect()->route('dashboard.posts.index');\n }", "public function destroy(Post $post)\n {\n $post->delete();\n return redirect()->route('admin.posts.index');\n }", "public function destroy(Posts $post)\n {\n $this->authorize('delete',$post);\n $post->delete();\n return redirect()->route('posts.index');\n }", "public function delete($entity);", "public function destroy(post $post)\n {\n $post->delete();\n \n return redirect()->route('posts.index'); \n }", "public function destroy(post $post)\n {\n //\n }", "public function destroy(Post $post)\n {\n $post->delete();\n return redirect()->route('ownposts');\n }", "public function destroy(Post $post)\n {\n $post->delete();\n\n Session::flash('Deleted', \"Post deleted successfully!\");\n return redirect()->route('posts.index');\n }", "public function destroy(post $post)\n {\n $post->delete();\n return redirect()->route('post.index');\n\n }", "public function delete()\n {\n $post['id'] = $this->request->getParameter('id'); // récupérer le paramètre de l'ID\n $this->post->deletePost($post['id']);\n $this->redirect(\"admin\", \"chapters\"); // une fois le post supprimé, je redirige vers la vue chapters\n }", "public function destroy(Post $post)\n {\n $post->delete();\n\n Session::flash('delete-message', 'Post deleted successfully');\n return redirect()->route('posts.index');\n }", "public function destroy(Post $post)\n {\n $post->delete();\n\n Session::flash('info', 'Post deleted');\n return redirect()->route('post.trashed');\n }", "public function destroy(Post $post)\n {\n //se hace referencia al Policy asociado al User\n $this->authorize('author', $post);\n\n $post->delete();\n return redirect()->route('admin.posts.index')->with('info', 'El Post se elimino con exito'); \n }", "public function destroy(Post $post)\n {\n $this->authorize('delete', $post);\n $post->delete();\n return response()->json([\n 'message' => 'deleted success',\n ]);\n }", "public function destroy(Post $post)\n {\n $this->detachLink($post);\n $post->delete();\n\n return redirect()->route('post.index')->with('success', 'Post Deleted Successfully');\n }", "public function deleteById($postsId);", "public function destroy( Post $post ){\n\n $post ->delete();\n return redirect()->route('posts.index')->with(['success' => 'supprimer avec succès']);\n }", "public function destroy(Post $post)\n {\n //$post = Post::find($id); commentata perche usiamo la versione short (Post $post)à\n\n $title = $post->title; //assegnamo il titolo ad una variabile $title\n $image = $post->path_img; //assegnamo ad img ad una variabile $image\n\n $post->tags()->detach(); //cancellare la relazine tra posts e tags\n $deleted = $post->delete(); //metodo per cancellare il titolo\n\n if ($deleted) { //verifica se c'è un post associato\n if (!empty($image)) {\n Storage::disk('public')->delete($image);\n }\n return redirect()->route('posts.index')->with('post-deleted', $title);\n } else {\n return redirect()->route('home');\n }\n }", "public function destroy(Post $post)\n {\n $post->delete();\n\n return redirect()->route('posts.index')\n ->with('success','Post deleted successfully');\n }", "public function destroy(Post $post)\n {\n $post->delete();\n return redirect()->route('post.index')->with('success', 'Product deleted successfully');\n }", "public function destroy(Post $post)\n {\n $post->delete();\n return redirect()->route('home');\n }", "public function destroy(post $post)\n {\n $post->delete();\n return redirect()->route('posts.index')->with('message', 'Deleted successful!');\n }", "public function destroy(Post $post)\n\t{\n\t\tself::deny('posts_delete');\n\n\t\ttry {\n\t\t\t$post->delete();\n\t\t\treturn redirect()->route('posts.index')->with('success', 'Post deleted successfully!');\n\t\t} catch (\\Throwable $th) {\n\t\t\tabort(400, $th);\n\t\t}\n\t}", "public function destroy(Post $post)\n {\n $this->postRepository->destroy($post->id);\n\n return redirect()\n ->route('post.index')\n ->with('message', 'Post succesfully deleted.');\n }", "public function destroy(Post $post)\n {\n /*\n Constraint: ON DELETE=RESTRICTED\n Before deleting any post is necessary to remove any constraint between tags and posts\n Using sync() removes all previous tags and adds the new ones but if the array is empty it adds nothing\n */\n // Removing all the tags connected to the post to be deleted\n $post->tags()->sync([]);\n // Deleting the post\n $post->delete();\n return redirect()->route('admin.posts.index');\n }", "public function destroy(Post $post)\n {\n // $post = Post::find($id);\n $post->delete();\n\n return redirect('/posts');\n }", "public function destroy($post)\n {\n $post = Post::find($post);\n $post -> delete();\n return redirect()->back();\n }", "public function delete(Request $request, Post $post): JsonResponse\n {\n // checks if the user is the owner of the post\n $this->authorize('delete', $post);\n\n $post->tags()->detach();\n\n $post->delete();\n\n return new JsonResponse([], 202);\n }", "public function destroy(Post $post)\n {\n $post->delete();\n\n return redirect()->back();\n }", "public function destroy(Post $post)\n {\n $this->authorize('delete', $post);\n\n foreach ($post->comments()->get() as $comment) {\n $comment->delete();\n }\n\n $post->delete();\n\n return redirect(route('posts.index'))->with('flash_message', $post->id . '번 포스트가 삭제되었습니다');\n }", "public function delete(Post $post)\n {\n $this->authorize('delete', $post);\n Helper::deleteFile($post->featured, 'posts/featured/');\n $post->delete();\n return response(null, 204);\n }", "public function destroy(Post $post)\n {\n $post->delete();\n\n return redirect()->route('posts');\n }", "public function destroy(Post $post)\n {\n $this->authorize('delete',$post);\n Post::destroy($post->id);\n return response()->json([\n 'message'=>'the post has deleted'\n ]);\n }", "public function destroy(Post $post ,Request $request){\n\n // $this->authorize('delete', $notice);\n\n\n $post->delete();\n\n $request->session()->flash('message', 'Post was deleted');\n\n return back();\n }", "public function destroy(Post $post)\n {\n $post->delete();\n\n return redirect()->route('posts.index');\n }", "public function destroy(Request $request, Post $post)\n {\n if ($this->runCheck($request, $post)) {\n $post->delete();\n };\n }", "public function destroy(Post $post)\n {\n $this->authorize('delete', $post);\n\n $name = $post->user->name;\n\n $post->delete();\n\n return redirect(route('user-posts', $name))->with('flash', [\n 'type' => 'danger',\n 'message' => 'Post deleted.'\n ]);\n }", "public function destroy(Post $post)\n {\n $post->delete();\n session()->flash('success', 'the post has deleted succesfuly');\n return redirect()->route('post.index');\n }", "public function deleteActionPost(): object\n {\n // Connects to db\n $this->app->db->connect();\n\n $contentId = getPost(\"contentId\");\n\n if (!is_numeric($contentId)) {\n return $this->app->response->redirect(\"admin\");\n }\n\n if (hasKeyPost(\"doDelete\")) {\n $contentId = getPost(\"contentId\");\n\n // Executes SQL statement\n $this->admin->deleteBlogpost($contentId);\n\n // Redirects\n return $this->app->response->redirect(\"admin\");\n }\n }", "public function destroy(Post $post)\n {\n $post->delete();\n\n return response()->json(['message' => 'post deleted successfully']);\n }", "public function deletePost($postId){\r\n $stmt = self::$con->prepare(\"DELETE FROM posts WHERE id = :delId\");\r\n $stmt->bindParam(\":delId\" , $postId);\r\n $stmt->execute();\r\n }", "protected function entityDelete(){\n // TODO: deal with errors\n // delete from api\n $deleted = $this->resourceService()->delete($this->getId());\n }", "public function destroy(Post $post) {\n $this -> authorize('delete', $post); // this will throw an exception and render out status code 403\n $post -> delete();\n\n return back();\n }", "public function destroy(Post $post)\n {\n $post->tags()->sync([]);\n $post->delete();\n return redirect()->route('admin.posts.index');\n }", "public function destroy(Post $post)\n {\n $post->delete();\n\n session()->flash('success', 'Successfully delete post');\n\n return redirect()->route('posts');\n }", "public function destroy(Post $post)\n {\n/* \n $user = Auth::user();\n if (Gate::forUser($user)->denies('delete-post', $post)) {\n return redirect()->back();\n } */\n\n /* if (Auth::user()->cant('delete', $post)) {\n return redirect()->route('posts.my')->with('message','No tienes permisos para eliminar este post');\n } */\n\n $this->authorize('delete', $post);\n $post->delete();\n \n return redirect()->route('posts.index')->with('message','Post Eliminado');\n \n }", "public function deleting(Post $post)\n {\n //-------we delete picture and comments before deletd post -----------\n\n $post->picture()->delete();\n $post->comments()->delete();\n // delete picture physicly and comments before delete physic post and after post is deleted logic =>(picture,comments was deleted)\n if($post->deleted_at)\n {\n $post->comments()->forceDelete();\n $post->picture()->forceDelete();\n }\n }", "public function destroy(Post $post)\n {\n\n\n Storage::delete($post->profile);\n $post->delete();\n return redirect(route('posts.index'))->with('status', 'Delete Post Successfully!');\n }", "public function deletePost($postId = '')\n {\n $postId = (int)$postId;\n $comment = $this->commentRepository->deleteCommentsByPostId($postId);\n $post = $this->postRepository->deletePostById($postId);\n\n exit('Your Post Has Been Deleted');\n }", "public function deleting(Post $post)\n {\n if ($post->image) {\n Storage::delete([$post->image->url]);\n }\n }", "public function delete_post( $post ) \n\t{\n\t\t$term = new Zend_Search_Lucene_Index_Term( $post->id, 'postid' );\n\t\t$docIds = $this->_index->termDocs( $term );\n\t\tforeach ( $docIds as $id ) {\n\t\t\t$this->_index->delete( $id );\n\t\t}\n\t}", "public function destroy(Post $post)\n {\n // gestisco la cancellazione dell'immagine, se presente. POtrei lasciare solo post->delete, ma in questo modo cancello anche il file da public, così non appesantisco il sito di file inutili\n if($post->cover) {\n Storage::delete($post->cover);\n }\n\n\n $post->delete();\n //non mi serve la cancellazione della riga nella tabella ponte, perchè è gestito da onDelete Cascade. In alternativa uso:\n // $post->tags()->detach();\n \n // faccio un redirect all'index, with ci serve per aggiungere dati alla sessione (flash). passo una chiave 'deleted' e come valore il dato che voglio fare viaggiare, nel caso voglia fare un alert con il titolo dell'articolo che voglio eliminare\n return redirect()\n ->route('admin.posts.index')\n ->with('deleted', $post->title);\n }", "public function destroy(Request $request, Post $post)\n {\n $post->delete();\n\n if ($request->user()->hasRole('admin')) {\n return redirect()\n ->route('models.show', [\n 'user' => $post->user\n ])\n ->with('success', 'Successfully removed post');\n }\n\n return redirect()\n ->route('admin.posts.index')\n ->with('success', 'Successfully removed post');\n }", "public function deleteAction() {\n\n //GET POST SUBJECT\n $post = Engine_Api::_()->core()->getSubject('sitereview_post');\n\n //GET LISTING SUBJECT\n $sitereview = $post->getParent('sitereview_listing');\n\n //GET VIEWER\n $viewer = Engine_Api::_()->user()->getViewer();\n\n if (!$sitereview->isOwner($viewer) && !$post->isOwner($viewer)) {\n return $this->_helper->requireAuth->forward();\n }\n\n //AUTHORIZATION CHECK\n if (!$this->_helper->requireAuth()->setAuthParams($sitereview, null, \"view_listtype_$sitereview->listingtype_id\")->isValid())\n return;\n\n //MAKE FORM\n $this->view->form = $form = new Sitereview_Form_Post_Delete();\n\n //CHECK METHOD\n if (!$this->getRequest()->isPost()) {\n return;\n }\n\n //FORM VALIDATION\n if (!$form->isValid($this->getRequest()->getPost())) {\n return;\n }\n\n //PROCESS\n $table = Engine_Api::_()->getDbTable('posts', 'sitereview');\n $db = $table->getAdapter();\n $db->beginTransaction();\n $topic_id = $post->topic_id;\n try {\n $post->delete();\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n\n //GET TOPIC\n $topic = Engine_Api::_()->getItem('sitereview_topic', $topic_id);\n\n $href = ( null == $topic ? $sitereview->getHref() : $topic->getHref() );\n return $this->_forwardCustom('success', 'utility', 'core', array(\n 'closeSmoothbox' => true,\n 'parentRedirect' => $href,\n 'messages' => array(Zend_Registry::get('Zend_Translate')->_('Post deleted.')),\n ));\n }", "public function delete(Post $post)\n {\n $this->authorize('delete', $post);\n\n return view('posts.delete', compact('post'));\n }", "public function delete(User $user, Post $post)\n {\n //\n }", "public function deletePost($idPost)\n\t{\n\t\t$request = $this->db->db->prepare(\"DELETE FROM posts WHERE id=:id\");\n\t\t$params = [':id' => $idPost];\n\t\t$request->execute($params);\n\t}", "public function deleting(Post $post)\n {\n $post->posts->each(function ($p) {\n $p->update(['post_id' => null]);\n });\n\n $post->post_type_item_restrictions->each(function ($p) {\n $p->delete();\n });\n\n $post->post_items->each(function ($p) {\n $p->delete();\n });\n\n $post->trans->each(function ($p) {\n $p->delete();\n });\n }", "public function destroy(Post $post)\n {\n Storage::delete('public/post_images/' . $post->image);\n $post->delete();\n return redirect('/post')->with('error', 'Post deleted suceessfully.');\n }" ]
[ "0.75967354", "0.75843984", "0.7361133", "0.73482597", "0.730979", "0.7286891", "0.72386193", "0.7179393", "0.71759504", "0.7155827", "0.7135466", "0.7090645", "0.7080448", "0.70553327", "0.7054368", "0.70435584", "0.70435584", "0.70435584", "0.70435584", "0.70435584", "0.70435584", "0.70435584", "0.70435584", "0.70435584", "0.70435584", "0.70435584", "0.70435584", "0.70435584", "0.70435584", "0.70435584", "0.70435584", "0.70342433", "0.7010439", "0.69963527", "0.6991099", "0.6989225", "0.6976104", "0.69613355", "0.6949651", "0.6944896", "0.6920187", "0.6911522", "0.6903436", "0.68937784", "0.6879961", "0.6877988", "0.68772084", "0.68572414", "0.6857196", "0.68485206", "0.6846024", "0.68427926", "0.68304193", "0.6820761", "0.6818544", "0.68167865", "0.6812325", "0.68011004", "0.67957246", "0.67872775", "0.6782844", "0.6779202", "0.67773145", "0.67764515", "0.6773946", "0.6765129", "0.6764827", "0.67577046", "0.67545015", "0.67521167", "0.6750298", "0.6748151", "0.67480475", "0.6746533", "0.67449826", "0.67387575", "0.6731176", "0.67288697", "0.6724247", "0.67221117", "0.6713488", "0.67123616", "0.6711595", "0.6710475", "0.67088705", "0.67040664", "0.67017305", "0.6698709", "0.66919285", "0.6691073", "0.66786504", "0.6669443", "0.66614735", "0.6648142", "0.662169", "0.66216344", "0.66196394", "0.6609477", "0.66089994", "0.66083294", "0.6607127" ]
0.0
-1
Builds tabs of the Wizard.
function buildTabs() { $this->_formBuilt = true; // Here we get all page names in the controller $pages = array(); $myName = $current = $this->getAttribute('id'); while (null !== ($current = $this->controller->getPrevName($current))) { $pages[] = $current; } $pages = array_reverse($pages); $pages[] = $current = $myName; while (null !== ($current = $this->controller->getNextName($current))) { $pages[] = $current; } // Here we display buttons for all pages, the current one's is disabled foreach ($pages as $pageName) { $disabled = ($pageName == $myName ? array('disabled' => 'disabled') : array()); $tabs[] = $this->createElement('submit', $this->getButtonName($pageName), ucfirst($pageName), array('class' => 'flat') + $disabled); } $this->addGroup($tabs, 'tabs', null, '&nbsp;', false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createTabs() {}", "private function createTab()\n {\n try {\n if (LengowMain::compareVersion()) {\n $tabParent = new Tab();\n $tabParent->name[Configuration::get('PS_LANG_DEFAULT')] = 'Lengow';\n $tabParent->module = 'lengow';\n $tabParent->class_name = 'AdminLengow';\n $tabParent->id_parent = 0;\n $tabParent->add();\n } else {\n $tabParent = new Tab(Tab::getIdFromClassName('AdminCatalog'));\n $tab = new Tab();\n $tab->name[Configuration::get('PS_LANG_DEFAULT')] = 'Lengow';\n $tab->module = 'lengow';\n $tab->class_name = 'AdminLengowHome14';\n $tab->id_parent = $tabParent->id;\n $tab->add();\n $tabParent = $tab;\n }\n foreach ($this->tabs as $name => $values) {\n if (_PS_VERSION_ < '1.5' && $values['name'] === 'AdminLengowHome') {\n continue;\n }\n $tab = new Tab();\n if (_PS_VERSION_ < '1.5') {\n $tab->class_name = $values['name'] . '14';\n $tab->id_parent = $tabParent->id;\n } else {\n $tab->class_name = $values['name'];\n $tab->id_parent = $tabParent->id;\n $tab->active = $values['active'];\n }\n $tab->module = $this->lengowModule->name;\n $languages = Language::getLanguages(false);\n foreach ($languages as $language) {\n $tab->name[$language['id_lang']] = LengowMain::decodeLogMessage($name, $language['iso_code']);\n }\n $tab->add();\n LengowMain::log(\n LengowLog::CODE_INSTALL,\n LengowMain::setLogMessage('log.install.install_tab', array('class_name' => $tab->class_name))\n );\n }\n return true;\n } catch (Exception $e) {\n return false;\n }\n }", "private function _createTab()\r\n {\r\n $response = true;\r\n\r\n // First check for parent tab\r\n $parentTabID = Tab::getIdFromClassName('AdminFieldMenu');\r\n\r\n if ($parentTabID) {\r\n $parentTab = new Tab($parentTabID);\r\n } else {\r\n $parentTab = new Tab();\r\n $parentTab->active = 1;\r\n $parentTab->name = array();\r\n $parentTab->class_name = \"AdminFieldMenu\";\r\n foreach (Language::getLanguages() as $lang){\r\n $parentTab->name[$lang['id_lang']] = \"FIELDTHEMES\";\r\n }\r\n $parentTab->id_parent = 0;\r\n $parentTab->module = '';\r\n $response &= $parentTab->add();\r\n }\r\n// Check for parent tab2\r\n\t\t\t$parentTab_2ID = Tab::getIdFromClassName('AdminFieldMenuSecond');\r\n\t\t\tif ($parentTab_2ID) {\r\n\t\t\t\t$parentTab_2 = new Tab($parentTab_2ID);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$parentTab_2 = new Tab();\r\n\t\t\t\t$parentTab_2->active = 1;\r\n\t\t\t\t$parentTab_2->name = array();\r\n\t\t\t\t$parentTab_2->class_name = \"AdminFieldMenuSecond\";\r\n\t\t\t\tforeach (Language::getLanguages() as $lang) {\r\n\t\t\t\t\t$parentTab_2->name[$lang['id_lang']] = \"FieldThemes Configure\";\r\n\t\t\t\t}\r\n\t\t\t\t$parentTab_2->id_parent = $parentTab_2->id;\r\n\t\t\t\t$parentTab_2->module = '';\r\n\t\t\t\t$response &= $parentTab_2->add();\r\n\t\t\t}\r\n\t\t\t// Created tab\r\n $tab = new Tab();\r\n $tab->active = 1;\r\n $tab->class_name = \"AdminFieldBrandSlider\";\r\n $tab->name = array();\r\n foreach (Language::getLanguages() as $lang){\r\n $tab->name[$lang['id_lang']] = \"Configuge brands\";\r\n }\r\n $tab->id_parent = $parentTab_2->id;\r\n $tab->module = $this->name;\r\n $response &= $tab->add();\r\n\r\n return $response;\r\n }", "protected function init_tabs() {\r\n\t\t$_SERVER['REQUEST_URI'] = remove_query_arg( array( 'firstrun' ), $_SERVER['REQUEST_URI'] );\r\n\r\n\t\tadd_action( 'qc_settings_head', 'qc_status_colors_css' );\r\n\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );\r\n\r\n\t\t$this->tabs->add( 'general', __( 'General', APP_TD ) );\r\n\r\n\t\t$this->tab_sections['general']['main'] = array(\r\n\t\t\t'title' => __( 'General Settings', APP_TD ),\r\n\t\t\t'fields' => array(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'title' => __( 'Permissions', APP_TD ),\r\n\t\t\t\t\t'type' => 'radio',\r\n\t\t\t\t\t'name' => 'assigned_perms',\r\n\t\t\t\t\t'values' => array(\r\n\t\t\t\t\t\t'protected' => __( 'Users can only view their own tickets and tickets they are assigned to.', APP_TD ),\r\n\t\t\t\t\t\t'read-only' => __( 'Users can view all tickets.', APP_TD ),\r\n\t\t\t\t\t\t'read-write' => __( 'Users can view and updated all tickets.', APP_TD ),\r\n\t\t\t\t\t),\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'title' => __( 'Lock Site from Visitors', APP_TD ),\r\n\t\t\t\t\t'name' => 'lock_site',\r\n\t\t\t\t\t'type' => 'checkbox',\r\n\t\t\t\t\t'desc' => __( 'Yes', APP_TD ),\r\n\t\t\t\t\t'tip' => __( 'Visitors will be asked to login, and will not be able to browse site. Also content of the sidebars and menus will be hidden.', APP_TD ),\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t);\r\n\r\n\t\t$this->tab_sections['general']['states'] = array(\r\n\t\t\t'title' => __( 'States', APP_TD ),\r\n\t\t\t'fields' => array(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'title' => __( 'Default State', APP_TD ),\r\n\t\t\t\t\t'desc' => __( 'This state will be selected by default when creating a ticket.', APP_TD ),\r\n\t\t\t\t\t'type' => 'select',\r\n\t\t\t\t\t'sanitize' => 'absint',\r\n\t\t\t\t\t'name' => 'ticket_status_new',\r\n\t\t\t\t\t'values' => $this->ticket_states(),\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'title' => __( 'Resolved State', APP_TD ),\r\n\t\t\t\t\t'desc' => __( 'Tickets in this state are assumed to no longer need attention.', APP_TD ),\r\n\t\t\t\t\t'type' => 'select',\r\n\t\t\t\t\t'sanitize' => 'absint',\r\n\t\t\t\t\t'name' => 'ticket_status_closed',\r\n\t\t\t\t\t'values' => $this->ticket_states(),\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t);\r\n\t\t$this->tab_sections['general']['colors'] = array(\r\n\t\t\t'fields' => $this->status_colors_options(),\r\n\t\t\t'renderer' => array( $this, 'render_status_colors' ),\r\n\t\t);\r\n\r\n\t\t$this->tab_sections['general']['modules'] = array(\r\n\t\t\t'title' => __( 'Modules', APP_TD ),\r\n\t\t\t'fields' => array(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'title' => __( 'Enable Modules', APP_TD ),\r\n\t\t\t\t\t'type' => 'checkbox',\r\n\t\t\t\t\t'name' => 'modules',\r\n\t\t\t\t\t'values' => array(\r\n\t\t\t\t\t\t'assignment' => __( 'Assignment', APP_TD ),\r\n\t\t\t\t\t\t'attachments' => __( 'Attachments', APP_TD ),\r\n\t\t\t\t\t\t'categories' => __( 'Categories', APP_TD ),\r\n\t\t\t\t\t\t'changesets' => __( 'Changesets', APP_TD ),\r\n\t\t\t\t\t\t'milestones' => __( 'Milestones', APP_TD ),\r\n\t\t\t\t\t\t'priorities' => __( 'Priorities', APP_TD ),\r\n\t\t\t\t\t\t'tags' => __( 'Tags', APP_TD ),\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'tip' => __( 'Choose the modules that you want to use on your site.', APP_TD ),\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t);\r\n\r\n\t}", "public function registerTabs()\n {\n\n Tab::put('promotion.promotion-code', function (TabItem $tab) {\n $tab->key('promotion.promotion-code.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::promotion.promotion-code._fields');\n });\n\n Tab::put('catalog.product', function (TabItem $tab) {\n $tab->key('catalog.product.info')\n ->label('avored::system.basic_info')\n ->view('avored::catalog.product.cards._fields');\n });\n\n Tab::put('catalog.product', function (TabItem $tab) {\n $tab->key('catalog.product.image')\n ->label('avored::system.images')\n ->view('avored::catalog.product.cards.images');\n });\n\n Tab::put('catalog.product', function (TabItem $tab) {\n $tab->key('catalog.product.property')\n ->label('avored::system.property')\n ->view('avored::catalog.product.cards.property');\n });\n\n // Tab::put('catalog.product', function (TabItem $tab) {\n // $tab->key('catalog.product.attribute')\n // ->label('avored::system.tab.attribute')\n // ->view('avored::catalog.product.cards.attribute');\n // });\n\n /****** CATALOG CATEGORY TABS *******/\n Tab::put('catalog.category', function (TabItem $tab) {\n $tab->key('catalog.category.info')\n ->label('avored::system.basic_info')\n ->view('avored::catalog.category._fields');\n });\n\n /****** CATALOG PROPERTY TABS *******/\n Tab::put('catalog.property', function (TabItem $tab) {\n $tab->key('catalog.property.info')\n ->label('avored::system.basic_info')\n ->view('avored::catalog.property._fields');\n });\n\n /****** CATALOG ATTRIBUTE TABS *******/\n Tab::put('catalog.attribute', function (TabItem $tab) {\n $tab->key('catalog.attribute.info')\n ->label('avored::system.basic_info')\n ->view('avored::catalog.attribute._fields');\n });\n\n /******CMS PAGES TABS *******/\n Tab::put('cms.page', function (TabItem $tab) {\n $tab->key('cms.page.info')\n ->label('avored::system.basic_info')\n ->view('avored::cms.page._fields');\n });\n\n /******ORDER ORDER STATUS TABS *******/\n Tab::put('order.order-status', function (TabItem $tab) {\n $tab->key('order.order-status.info')\n ->label('avored::system.basic_info')\n ->view('avored::order.order-status._fields');\n });\n\n /****** CUSTOMER GROUPS TABS *******/\n Tab::put('user.customer-group', function (TabItem $tab) {\n $tab->key('user.customer-group.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::user.customer-group._fields');\n });\n\n Tab::put('user.customer', function (TabItem $tab) {\n $tab->key('user.customer.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::user.customer._fields');\n });\n\n Tab::put('user.customer', function (TabItem $tab) {\n $tab->key('user.customer.address')\n ->label('avored::system.addresses')\n ->view('avored::user.customer._addresses');\n });\n\n Tab::put('user.address', function (TabItem $tab) {\n $tab->key('user.customer.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::user.customer.show');\n });\n Tab::put('user.address', function (TabItem $tab) {\n $tab->key('user.customer.address')\n ->label('avored::system.addresses')\n ->view('avored::user.address._fields');\n });\n\n /******USER ADMIN USER TABS *******/\n Tab::put('user.staff', function (TabItem $tab) {\n $tab->key('user.staff.info')\n ->label('avored::system.basic_info')\n ->view('avored::user.staff._fields');\n });\n Tab::put('user.subscriber', function (TabItem $tab) {\n $tab->key('user.subscriber.info')\n ->label('avored::system.basic_info')\n ->view('avored::user.subscriber._fields');\n });\n\n /******SYSTEM CURRENCY TABS *******/\n Tab::put('system.currency', function (TabItem $tab) {\n $tab->key('system.currency.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::system.currency._fields');\n });\n\n /******SYSTEM STATE TABS *******/\n Tab::put('system.state', function (TabItem $tab) {\n $tab->key('system.state.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::system.state._fields');\n });\n\n /******SYSTEM ROLE TABS *******/\n Tab::put('system.role', function (TabItem $tab) {\n $tab->key('system.role.info')\n ->label('avored::system.basic_info')\n ->view('avored::system.role._fields');\n });\n\n /******SYSTEM ROLE TABS *******/\n Tab::put('system.language', function (TabItem $tab) {\n $tab->key('system.language.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::system.language._fields');\n });\n\n /******SYSTEM CONFIGURATION TABS *******/\n Tab::put('system.configuration', function (TabItem $tab) {\n $tab->key('system.configuration.basic')\n ->label('avored::system.basic_configuration')\n ->view('avored::system.configuration.cards.basic');\n });\n\n // Tab::put('system.configuration', function (TabItem $tab) {\n // $tab->key('system.configuration.user')\n // ->label('avored::system.tab.user_configuration')\n // ->view('avored::system.configuration.cards.user');\n // });\n // Tab::put('system.configuration', function (TabItem $tab) {\n // $tab->key('system.configuration.tax')\n // ->label('avored::system.tax_configuration')\n // ->view('avored::system.configuration.cards.tax');\n // });\n\n // Tab::put('system.configuration', function (TabItem $tab) {\n // $tab->key('system.configuration.shipping')\n // ->label('avored::system.tab.shipping_configuration')\n // ->view('avored::system.configuration.cards.shipping');\n // });\n // Tab::put('system.configuration', function (TabItem $tab) {\n // $tab->key('system.configuration.payment')\n // ->label('avored::system.tab.payment_configuration')\n // ->view('avored::system.configuration.cards.payment');\n // });\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: border properties');\r\n\r\n $borderpainted[] =& $this->createElement('radio', null, null, 'Yes', true);\r\n $borderpainted[] =& $this->createElement('radio', null, null, 'No', false);\r\n $this->addGroup($borderpainted, 'borderpainted', 'Display the border:');\r\n\r\n $this->addElement('text', 'borderclass', 'CSS class:', array('size' => 32));\r\n\r\n $borderstyle['style'] =& $this->createElement('select',\r\n 'style', 'style',\r\n array('solid' => 'Solid',\r\n 'dashed' => 'Dashed',\r\n 'dotted' => 'Dotted',\r\n 'inset' => 'Inset',\r\n 'outset' => 'Outset'));\r\n $borderstyle['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 2));\r\n $borderstyle['color'] =& $this->createElement('text',\r\n 'color', 'color',\r\n array('size' => 7));\r\n $this->addGroup($borderstyle, 'borderstyle', null, ' ');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('apply','process'));\r\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: run demo');\r\n\r\n $this->addElement('static', 'progressBar',\r\n 'Your progress meter looks like:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('reset','process'));\r\n }", "private function installModuleTabs()\n {\n foreach ($this->admin_tabs as $value) {\n @copy(_PS_MODULE_DIR_ . $this->name . '/logo.png', _PS_IMG_DIR_ . 't/' . $value['class'] . '.png');\n $parent_tab = new Tab();\n $parent_tab->name[$this->context->language->id] = $this->l($value['title']);\n $parent_tab->class_name = $value['class'];\n $parent_tab->id_parent = 0; // Home tab\n $parent_tab->module = $this->name;\n $parent_tab->add();\n \n if (isset($value['children'])) {\n foreach ($value['children'] as $k => $v) {\n $tab = new Tab();\n // Need a foreach for the language\n foreach (Language::getLanguages(true) as $lang)\n $tab->name[$lang['id_lang']] = $this->l($v);\n \n $tab->class_name = $k;\n $tab->id_parent = $parent_tab->id;\n $tab->module = $this->name;\n $tab->add();\n }\n \n foreach ($value['hidden'] as $k => $v) {\n $tab = new Tab();\n // Need a foreach for the language\n foreach (Language::getLanguages(true) as $lang)\n $tab->name[$lang['id_lang']] = $this->l($v);\n \n $tab->class_name = $k;\n $tab->id_parent = - 1;\n $tab->module = $this->name;\n $tab->add();\n }\n }\n }\n \n return true;\n }", "private function _createTab()\r\n {\r\n $response = true;\r\n\r\n // First check for parent tab\r\n $parentTabID = Tab::getIdFromClassName('AdminFieldMenu');\r\n\r\n if ($parentTabID) {\r\n $parentTab = new Tab($parentTabID);\r\n } else {\r\n $parentTab = new Tab();\r\n $parentTab->active = 1;\r\n $parentTab->name = array();\r\n $parentTab->class_name = \"AdminFieldMenu\";\r\n foreach (Language::getLanguages() as $lang){\r\n $parentTab->name[$lang['id_lang']] = \"Fieldthemes\";\r\n }\r\n $parentTab->id_parent = 0;\r\n $parentTab->module = '';\r\n $response &= $parentTab->add();\r\n }\r\n\t// Check for parent tab2\r\n\t\t\t$parentTab_2ID = Tab::getIdFromClassName('AdminFieldMenuSecond');\r\n\t\t\tif ($parentTab_2ID) {\r\n\t\t\t\t$parentTab_2 = new Tab($parentTab_2ID);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$parentTab_2 = new Tab();\r\n\t\t\t\t$parentTab_2->active = 1;\r\n\t\t\t\t$parentTab_2->name = array();\r\n\t\t\t\t$parentTab_2->class_name = \"AdminFieldMenuSecond\";\r\n\t\t\t\tforeach (Language::getLanguages() as $lang) {\r\n\t\t\t\t\t$parentTab_2->name[$lang['id_lang']] = \"FieldThemes Configure\";\r\n\t\t\t\t}\r\n\t\t\t\t$parentTab_2->id_parent = $parentTab->id;\r\n\t\t\t\t$parentTab_2->module = '';\r\n\t\t\t\t$response &= $parentTab_2->add();\r\n\t\t\t}\r\n\t\t\t// Created tab\r\n $tab = new Tab();\r\n $tab->active = 1;\r\n $tab->class_name = \"AdminFieldFeaturedProductSlider\";\r\n $tab->name = array();\r\n foreach (Language::getLanguages() as $lang){\r\n $tab->name[$lang['id_lang']] = \"Configure featured products\";\r\n }\r\n $tab->id_parent = $parentTab_2->id;\r\n $tab->module = $this->name;\r\n $response &= $tab->add();\r\n\r\n return $response;\r\n }", "public function register_tabs() {\n\t\trequire_once jet_engine()->plugin_path( 'includes/modules/forms/tabs/base-form-tab.php' );\n\t\trequire_once jet_engine()->plugin_path( 'includes/modules/forms/tabs/captcha.php' );\n\t\trequire_once jet_engine()->plugin_path( 'includes/modules/forms/tabs/active-campaign.php' );\n\t\trequire_once jet_engine()->plugin_path( 'includes/modules/forms/tabs/get-response.php' );\n\t\trequire_once jet_engine()->plugin_path( 'includes/modules/forms/tabs/mailchimp.php' );\n\n\t\t$tabs = apply_filters( 'jet-engine/dashboard/form-tabs', array(\n\t\t\tnew Captcha(),\n\t\t\tnew Active_Campaign(),\n\t\t\tnew Get_Response(),\n\t\t\tnew Mailchimp(),\n\t\t) );\n\n\t\tforeach ( $tabs as $tab ) {\n\t\t\tif ( $tab instanceof Base_Form_Tab ) {\n\t\t\t\t$this->register_tab( $tab );\n\t\t\t}\n\t\t}\n\t}", "private function _createTab()\r\n {\r\n $response = true;\r\n\r\n // First check for parent tab\r\n $parentTabID = Tab::getIdFromClassName('AdminFieldMenu');\r\n\r\n if ($parentTabID) {\r\n $parentTab = new Tab($parentTabID);\r\n } else {\r\n $parentTab = new Tab();\r\n $parentTab->active = 1;\r\n $parentTab->name = array();\r\n $parentTab->class_name = \"AdminFieldMenu\";\r\n foreach (Language::getLanguages() as $lang){\r\n $parentTab->name[$lang['id_lang']] = \"Fieldthemes\";\r\n }\r\n $parentTab->id_parent = 0;\r\n $parentTab->module = '';\r\n $response &= $parentTab->add();\r\n }\r\n// Check for parent tab2\r\n\t\t\t$parentTab_2ID = Tab::getIdFromClassName('AdminFieldMenuSecond');\r\n\t\t\tif ($parentTab_2ID) {\r\n\t\t\t\t$parentTab_2 = new Tab($parentTab_2ID);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$parentTab_2 = new Tab();\r\n\t\t\t\t$parentTab_2->active = 1;\r\n\t\t\t\t$parentTab_2->name = array();\r\n\t\t\t\t$parentTab_2->class_name = \"AdminFieldMenuSecond\";\r\n\t\t\t\tforeach (Language::getLanguages() as $lang) {\r\n\t\t\t\t\t$parentTab_2->name[$lang['id_lang']] = \"FieldThemes Configure\";\r\n\t\t\t\t}\r\n\t\t\t\t$parentTab_2->id_parent = $parentTab->id;\r\n\t\t\t\t$parentTab_2->module = '';\r\n\t\t\t\t$response &= $parentTab_2->add();\r\n\t\t\t}\r\n\t\t\t// Created tab\r\n $tab = new Tab();\r\n $tab->active = 1;\r\n $tab->class_name = \"AdminFieldSpecialProduct\";\r\n $tab->name = array();\r\n foreach (Language::getLanguages() as $lang){\r\n $tab->name[$lang['id_lang']] = \"Configure specials products\";\r\n }\r\n $tab->id_parent = $parentTab_2->id;\r\n $tab->module = $this->name;\r\n $response &= $tab->add();\r\n\r\n return $response;\r\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: save PHP/CSS code');\r\n\r\n $code[] =& $this->createElement('checkbox', 'P', null, 'PHP');\r\n $code[] =& $this->createElement('checkbox', 'C', null, 'CSS');\r\n $this->addGroup($code, 'phpcss', 'PHP and/or StyleSheet source code:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('next','apply'));\r\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: main properties');\r\n\r\n $shape[] =& $this->createElement('radio', null, null, 'Horizontal', '1');\r\n $shape[] =& $this->createElement('radio', null, null, 'Vertical', '2');\r\n $this->addGroup($shape, 'shape', 'Shape:');\r\n\r\n $way[] =& $this->createElement('radio', null, null, 'Natural', 'natural');\r\n $way[] =& $this->createElement('radio', null, null, 'Reverse', 'reverse');\r\n $this->addGroup($way, 'way', 'Direction:');\r\n\r\n $autosize[] =& $this->createElement('radio', null, null, 'Yes', true);\r\n $autosize[] =& $this->createElement('radio', null, null, 'No', false);\r\n $this->addGroup($autosize, 'autosize', 'Best size:');\r\n\r\n $psize['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 4));\r\n $psize['height'] =& $this->createElement('text',\r\n 'height', 'height',\r\n array('size' => 4));\r\n $psize['left'] =& $this->createElement('text',\r\n 'left', 'left',\r\n array('size' => 4));\r\n $psize['top'] =& $this->createElement('text',\r\n 'top', 'top',\r\n array('size' => 4));\r\n $psize['position'] =& $this->createElement('text',\r\n 'position', 'position',\r\n array('disabled' => 'true'));\r\n $psize['bgcolor'] =& $this->createElement('text',\r\n 'bgcolor', 'bgcolor',\r\n array('size' => 7));\r\n $this->addGroup($psize, 'progresssize',\r\n 'Size, position and color:', ' ');\r\n\r\n $this->addElement('text', 'rAnimSpeed',\r\n array('Animation speed :',\r\n '(0-1000 ; 0:fast, 1000:slow)'));\r\n $this->addRule('rAnimSpeed',\r\n 'Should be between 0 and 1000',\r\n 'rangelength', array(0,1000), 'client');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('back','apply','process'));\r\n }", "function __construct()\n {\n\t $this->tabs = array( \n//\t array ( 'tab_id' => 'properties',\t\t'tab_op' => 'administration.customization_properties.edit', \t'tab_name' => 'Application properties'),\n\t array ( 'tab_id' => 'fields',\t\t\t'tab_op' => 'administration.customization_fields.edit', \t\t'tab_name' => 'Field properties'),\n\t array ( 'tab_id' => 'searches', \t\t'tab_op' => 'administration.customization_searches.edit',\t\t'tab_name' => 'Search filters'),\n\t array ( 'tab_id' => 'results', \t\t\t'tab_op' => 'administration.customization_results.edit',\t\t'tab_name' => 'Search results'),\n\t array ( 'tab_id' => 'bulk',\t\t\t\t'tab_op' => 'administration.customization_bulk.edit', \t\t\t'tab_name' => 'Bulk form'),\t \n\t array ( 'tab_id' => 'view', \t\t\t'tab_op' => 'administration.customization_view.edit',\t\t\t'tab_name' => 'View form'),\n\t array ( 'tab_id' => 'edit', \t\t\t'tab_op' => 'administration.customization_edit.edit',\t\t\t'tab_name' => 'Edit form'),\n\t array ( 'tab_id' => 'linked', \t\t\t'tab_op' => 'administration.customization_linked.edit',\t\t\t'tab_name' => 'Linked applications'),\n\t array ( 'tab_id' => 'linked_view', \t\t'tab_op' => 'administration.customization_linked_view.edit',\t'tab_name' => 'Linked view form'),\n\t array ( 'tab_id' => 'popup_searches', \t'tab_op' => 'administration.customization_popup_searches.edit',\t'tab_name' => 'Popup search filters'),\n\t array ( 'tab_id' => 'popup_results', \t'tab_op' => 'administration.customization_popup_results.edit',\t'tab_name' => 'Popup search results'),\n\t array ( 'tab_id' => 'popup_view', \t\t'tab_op' => 'administration.customization_popup_view.edit',\t\t'tab_name' => 'Popup view form'),\n\t array ( 'tab_id' => 'popup_edit', \t\t'tab_op' => 'administration.customization_popup_edit.edit',\t\t'tab_name' => 'Popup edit form')\n\t ); \n\n\t\tparent::__construct();\n }", "private function createTablesTab()\n {\n $tab = $this->createTab(\n 'tables_tab',\n '__responsive_tab_tables__',\n [\n 'attributes' => [\n 'autoScroll' => true,\n ],\n ]\n );\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 200]);\n $fieldSetTables = $this->createFieldSet(\n 'tables_fieldset',\n '__responsive_tab_tables_fieldset_tables__',\n ['attributes' => $attributes]\n );\n\n $fieldSetTables->addElement(\n $this->createColorPickerField(\n 'panel-table-header-bg',\n '@panel-table-header-bg',\n $this->themeColorDefaults['panel-table-header-bg']\n )\n );\n $fieldSetTables->addElement(\n $this->createColorPickerField(\n 'panel-table-header-color',\n '@panel-table-header-color',\n $this->themeColorDefaults['panel-table-header-color']\n )\n );\n $fieldSetTables->addElement(\n $this->createColorPickerField(\n 'table-row-bg',\n '@table-row-bg',\n $this->themeColorDefaults['table-row-bg']\n )\n );\n $fieldSetTables->addElement(\n $this->createColorPickerField(\n 'table-row-color',\n '@table-row-color',\n $this->themeColorDefaults['table-row-color']\n )\n );\n $fieldSetTables->addElement(\n $this->createColorPickerField(\n 'table-row-highlight-bg',\n '@table-row-highlight-bg',\n $this->themeColorDefaults['table-row-highlight-bg']\n )\n );\n $fieldSetTables->addElement(\n $this->createColorPickerField(\n 'table-header-bg',\n '@table-header-bg',\n $this->themeColorDefaults['table-header-bg']\n )\n );\n $fieldSetTables->addElement(\n $this->createColorPickerField(\n 'table-header-color',\n '@table-header-color',\n $this->themeColorDefaults['table-header-color']\n )\n );\n\n $tab->addElement($fieldSetTables);\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 200]);\n $fieldSetBadges = $this->createFieldSet(\n 'badges_fieldset',\n '__responsive_tab_tables_fieldset_badges__',\n ['attributes' => $attributes]\n );\n\n $fieldSetBadges->addElement(\n $this->createColorPickerField(\n 'badge-discount-bg',\n '@badge-discount-bg',\n $this->themeColorDefaults['badge-discount-bg']\n )\n );\n $fieldSetBadges->addElement(\n $this->createColorPickerField(\n 'badge-discount-color',\n '@badge-discount-color',\n $this->themeColorDefaults['badge-discount-color']\n )\n );\n $fieldSetBadges->addElement(\n $this->createColorPickerField(\n 'badge-newcomer-bg',\n '@badge-newcomer-bg',\n $this->themeColorDefaults['badge-newcomer-bg']\n )\n );\n $fieldSetBadges->addElement(\n $this->createColorPickerField(\n 'badge-newcomer-color',\n '@badge-newcomer-color',\n $this->themeColorDefaults['badge-newcomer-color']\n )\n );\n $fieldSetBadges->addElement(\n $this->createColorPickerField(\n 'badge-recommendation-bg',\n '@badge-recommendation-bg',\n $this->themeColorDefaults['badge-recommendation-bg']\n )\n );\n $fieldSetBadges->addElement(\n $this->createColorPickerField(\n 'badge-recommendation-color',\n '@badge-recommendation-color',\n $this->themeColorDefaults['badge-recommendation-color']\n )\n );\n $fieldSetBadges->addElement(\n $this->createColorPickerField(\n 'badge-download-bg',\n '@badge-download-bg',\n $this->themeColorDefaults['badge-download-bg']\n )\n );\n $fieldSetBadges->addElement(\n $this->createColorPickerField(\n 'badge-download-color',\n '@badge-download-color',\n $this->themeColorDefaults['badge-download-color']\n )\n );\n\n $tab->addElement($fieldSetBadges);\n\n return $tab;\n }", "function setTabs(){\n global $ilTabs, $ilCtrl, $ilAccess, $ilLocator;\n\n // show current quiz round inlcuding link and QR code (deadline)\n if ($ilAccess->checkAccess(\"read\", \"\", $this->object->getRefId())){\n $ilTabs->addTab(\"showCurrentRound\", $this->txt(\"tabmenu_showCurrentRound\"), $ilCtrl->getLinkTarget($this, \"showCurrentRound\"));\n }\n\n // tab for the \"edit quiz\" command\n if ($ilAccess->checkAccess(\"write\", \"\", $this->object->getRefId())){\n $ilTabs->addTab(\"editQuiz\", $this->txt(\"tabmenu_edit_quiz\"), $ilCtrl->getLinkTarget($this, \"editQuiz\"));\n }\n\n // show round results\n if ($ilAccess->checkAccess(\"write\", \"\", $this->object->getRefId())){\n $ilTabs->addTab(\"showResults\", $this->txt(\"tabmenu_show_result\"), $ilCtrl->getLinkTarget($this, \"showResults\"));\n }\n\n // a \"properties\" tab\n if ($ilAccess->checkAccess(\"write\", \"\", $this->object->getRefId())){\n $ilTabs->addTab(\"properties\", $this->txt(\"tabmenu_properties\"), $ilCtrl->getLinkTarget($this, \"editProperties\"));\n $this->addPermissionTab();\n }\n\n // information Tab\n if ($ilAccess->checkAccess(\"write\", \"\", $this->object->getRefId())){\n $ilTabs->addTab(\"info\", $this->txt(\"tabmenu_info\"), $ilCtrl->getLinkTarget($this, \"info\"));\n }\n\n }", "private function get_tabs() {\n return array(\n 'general' => array(\n 'title' => __( 'General', 'jpid' ),\n 'group' => 'jpid_general_settings'\n ),\n 'delivery' => array(\n 'title' => __( 'Delivery', 'jpid' ),\n 'group' => 'jpid_delivery_settings'\n ),\n 'payment' => array(\n 'title' => __( 'Payment', 'jpid' ),\n 'group' => 'jpid_payment_settings'\n )\n );\n }", "abstract protected function tabs();", "function generateTabs($pScreenName, $pRestriction = ''){\n if(0 == count($this->getScreens())){\n return '';\n }\n\n $content = '';\n $tabs = array();\n $Screens =& $this->getScreens();\n\n if (\"List\" == $pScreenName){\n if(empty($this->addNewName)){\n $addNewName = $this->SingularRecordName;\n } else {\n $addNewName = $this->addNewName;\n }\n\t\t\t$content = '';\n if($this->AllowAddRecord){\n if('view' == $pRestriction){\n //$content = \"\\$tabs['New'] = array(\\\"\\\", gettext(\\\"No Add New|You cannot add a new {$addNewName} because you don't have permission\\\"), 'disabled');\";\n } else {\n //get first edit screen and insert a tab link to it as \"new\"\n foreach ($Screens as $Screen){\n if ('editscreen' == strtolower(get_class($Screen))){\n\t\t\t\t\t\t\t$content = \"\\$tabs['New'] = array(\\\"edit.php?mdl={$this->ModuleID}&amp;scr={$Screen->name}\\\", gettext(\\\"Add New|Add a new \\\").gettext(\\\"{$addNewName}\\\"));\";\t\n break; //exits loop\n }\n }\n }\n } else {\n // $content = \"\\$tabs['New'] = array(\\\"\\\", gettext(\\\"No Add New|To add a new {$addNewName} you must go to a parent module\\\"), 'disabled');\";\n }\n \n\n //get search screen and insert a tab link to it\n if(count($Screens)){\n foreach ($Screens as $Screen){\n if ('searchscreen' == strtolower(get_class($Screen))){\n $content .= \"\\$tabs['Search'] = array(\\\"search.php?mdl={$this->ModuleID}\\\", gettext(\\\"Search|Search in \\\").gettext(\\\"{$this->PluralRecordName}\\\"));\";\n //$content .= \"\\$tabs['Reports'] = array(\\\"reports.php?mdl={$this->ModuleID}\\\", gettext(\\\"Reports|Reports for \\\").gettext(\\\"{$this->PluralRecordName}\\\"));\";\n\t\t\t\t\t\tif( true == $this->areChartsDefined() ){\n\t\t\t\t\t\t\t$content .= \"\\$tabs['Charts'] = array(\\\"charts.php?mdl={$this->ModuleID}\\\", gettext(\\\"Charts|Charts for \\\").gettext(\\\"{$this->PluralRecordName}\\\"));\";\n\t\t\t\t\t\t}\n } \n }\n }\n if($this->dataCollectionForm){\n $content .= \"\\$tabs['DataCollection'] = array(\\\"dataCollectionForm.php?mdl={$this->ModuleID}\\\", gettext(\\\"Blank Form|Blank form for \\\").gettext(\\\"{$this->PluralRecordName}\\\"), 'download');\";\n }\n } elseif (\"ListCtxTabs\" == $pScreenName){\n\t\t\n//$tabs['List'] = Array(\"list.php?$qs\", gettext(\"List|View the list of /**plural_record_name**/\"));\n\t\t\t$content = \"\\$tabs['List'] = array(\\\"list.php?\\$qs\\\", gettext(\\\"List|View the list of \\\").gettext(\\\"{$this->PluralRecordName}\\\"));\";\n\t\t\tif(empty($this->addNewName)){\n $addNewName = $this->SingularRecordName;\n } else {\n $addNewName = $this->addNewName;\n }\n\n if($this->AllowAddRecord){\n if('view' == $pRestriction){\n // $content .= \"\\$tabs['New'] = array(\\\"\\\", gettext(\\\"No Add New|You cannot add a new {$addNewName} because you don't have permission\\\"), 'disabled');\";\n } else {\n //get first edit screen and insert a tab link to it as \"new\"\n foreach ($Screens as $Screen){\n if ('editscreen' == strtolower(get_class($Screen))){\n\t\t\t\t\t\t\t$content .= \"\\$tabs['New'] = array(\\\"edit.php?mdl={$this->ModuleID}&amp;scr={$Screen->name}\\\", gettext(\\\"Add New|Add a new \\\").gettext(\\\"{$addNewName}\\\"));\";\t\n\n break; //exits loop\n }\n }\n }\n } else {\n //$content = \"\\$tabs['New'] = array(\\\"\\\", gettext(\\\"No Add New|To add a new {$addNewName} you must go to a parent module\\\"), 'disabled');\";\n }\n \n\n //get search screen and insert a tab link to it\n if(count($Screens)){\n foreach ($Screens as $Screen){\n if ('searchscreen' == strtolower(get_class($Screen))){\n $content .= \"\\$tabs['Search'] = array(\\\"search.php?mdl={$this->ModuleID}\\\", gettext(\\\"Search|Search in \\\").gettext(\\\"{$this->PluralRecordName}\\\"));\";\n\t\t\t\t\t\t//$content .= \"\\$tabs['Reports'] = array(\\\"reports.php?mdl={$this->ModuleID}\\\", gettext(\\\"Reports|Reports for \\\").gettext(\\\"{$this->PluralRecordName}\\\"));\";\n\t\t\t\t\t\tif( true == $this->areChartsDefined() ){\n\t\t\t\t\t\t\t$content .= \"\\$tabs['Charts'] = array(\\\"charts.php?mdl={$this->ModuleID}\\\", gettext(\\\"Charts|Charts for \\\").gettext(\\\"{$this->PluralRecordName}\\\"));\";\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n }\n }\n if($this->dataCollectionForm){\n $content .= \"\\$tabs['DataCollection'] = array(\\\"dataCollectionForm.php?mdl={$this->ModuleID}\\\", gettext(\\\"Blank Form|Blank form for \\\").gettext(\\\"{$this->PluralRecordName}\\\"), 'download');\";\n }\n\t\t}elseif( \"EditScreenPermissions\" == $pScreenName ){\n\t\t\t$content = '';\n\t\t\tforeach ($Screens as $Screen){\t\t\t\n\t\t\t\tif( 'editscreen' == strtolower(get_class($Screen)) AND isset($Screen->EditPermission) ){\n\t\t\t\t\t$content .= \"\\$EditScrPermission['{$Screen->name}'] = '{$Screen->EditPermission}';\\n\";\t\n\t\t\t\t}\n }\n\t\t\tif( $content != '' ){\n\t\t\t\tforeach ($Screens as $Screen){\t\t\t\n\t\t\t\t\tif( 'editscreen' == strtolower(get_class($Screen)) AND !isset($Screen->EditPermission) ){\n\t\t\t\t\t\t$content .= \"\\$EditScrPermission['{$Screen->name}'] = '{$this->ModuleID}';\\n\";\t\n\t\t\t\t\t}\n }\n\t\t\t}\n\t\t\n\t\t}elseif( \"ListRecordMenu\" == $pScreenName ){ \n\t\t \n\t\t\t$recordMenuCounter = 0;\n\t\t\t\t\n\t\t\tforeach ($Screens as $Screen){\n $linkTo = '';\n $tab = '';\n\t\t\t\t$recordMenu = '';\n\t\t\t\t$recordMenuEntries = '';\n\t\t\t\t\n switch( strtolower(get_class($Screen)) ){\n case \"viewscreen\":\n $handler = \"view.php\"; \n $phrase = \"View|View summary information about a record of type \\\").gettext(\\\"\". $this->SingularRecordName;\n break;\n case \"editscreen\":\n if(!empty($Screen->linkToModuleID)){\n $linkTo = $Screen->linkToModuleID;\n }\n $handler = \"edit.php\";\n\n if (empty($Screen->phrase)){\n $phrase = $Screen->name;\n } else {\n $phrase = $Screen->phrase;\n }\n break;\n case \"searchscreen\":\n $handler = \"search.php\";\n $phrase = \"Search|Search in \\\").' '.gettext(\\\"\". $this->PluralRecordName;\n break;\n case \"listscreen\":\n $handler = \"list.php\";\n $phrase = \"List|View the list of \\\").' '.gettext(\\\"\". $this->PluralRecordName;\n break;\n case \"recordreportscreen\":\n $handler = \"reports.php\";\n $phrase = $Screen->phrase;\n break;\n case \"listreportscreen\":\n $handler = \"reports.php\";\n $phrase = $Screen->phrase;\n break;\n case \"anoneditscreen\":\n continue;\n break;\n default:\n print_r($Screens);\n die(\"unknown screen type: '\".get_class($Screen).\"'\\n\");\n }\n\n\t\t\t\t$recordMenu = '$recordMenuEntries['.$Screen->name.']='.\"'{ text: \\\"'.strip_tags( ShortPhrase( gettext(\\\"{$phrase}\\\") ) ).'\\\" }';\\n\";\n\n $tabConditionModuleID = '';\n if(!empty($Screen->tabConditionModuleID)){\n $tabConditionModuleID = \", '{$Screen->tabConditionModuleID}'\";\n }\n\n\t\t\t\tif( ( \"view\" == $pRestriction && \"viewscreen\" == strtolower(get_class($Screen)) ) \n\t\t\t\t || (\"view\" != $pRestriction) ){\n\t\t\t\t\tif($linkTo == ''){\t\t\t\t\t\t\n\t\t\t\t\t\t$recordMenuURL = '$recordMenuURL['.$Screen->name.']= '.\"\\\"$handler?scr={$Screen->name}&mdl={$this->ModuleID}\\\";\\n\"; \n\t\t\t\t\t} else {\n\t\t\t\t\t\t$recordMenuURL = '$recordMenuURL['.$Screen->name.']= '.\"\\\"$handler?scr={$Screen->name}&mdl=$linkTo\\\";\\n\"; \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t\t\t\n if( in_array(strtolower(get_class($Screen)), array('viewscreen', 'editscreen', 'recordreportscreen')) ){ \n\t\t\t\t\t$recordMenuList .= $recordMenu;\n\t\t\t\t\t$recordMenuURLList .= $recordMenuURL;\t\t\t\t\t\n }\n }\t\t\t\n\t\t\t\n\t\t\t$content = $recordMenuList.$recordMenuURLList;\n\t\n\t\t}else {\n print \"m. GenerateTabs: current screen $pScreenName\\n\";\n\n $currentScreen = $this->getScreen($pScreenName);\n\n foreach ($Screens as $Screen){\n $linkTo = '';\n $tab = '';\n switch(strtolower(get_class($Screen))){\n case \"viewscreen\":\n $handler = \"view.php\";\n /* if(in_array($this->SingularRecordName[0], array('a','e','i','o','h','y','A','E','I','O','H','Y'))){\n $a = 'an';\n } else {\n $a = 'a';\n } */\n $phrase = \"View|View summary information about a record of type \\\").gettext(\\\"\". $this->SingularRecordName;\n break;\n case \"editscreen\":\n if(!empty($Screen->linkToModuleID)){\n $linkTo = $Screen->linkToModuleID;\n }\n $handler = \"edit.php\";\n\n if (empty($Screen->phrase)){\n $phrase = $Screen->name;\n } else {\n $phrase = $Screen->phrase;\n }\n break;\n case \"searchscreen\":\n $handler = \"search.php\";\n $phrase = \"Search|Search in \\\").' '.gettext(\\\"\". $this->PluralRecordName;\n break;\n case \"listscreen\":\n $handler = \"list.php\";\n $phrase = \"List|View the list of \\\").' '.gettext(\\\"\". $this->PluralRecordName;\n break;\n case \"recordreportscreen\":\n $handler = \"reports.php\";\n $phrase = $Screen->phrase;\n break;\n case \"listreportscreen\":\n $handler = \"reports.php\";\n $phrase = $Screen->phrase;\n break;\n case \"anoneditscreen\":\n continue;\n break;\n default:\n print_r($Screens);\n die(\"unknown screen type: '\".get_class($Screen).\"'\\n\");\n }\n\n $tabConditionModuleID = '';\n if(!empty($Screen->tabConditionModuleID)){\n $tabConditionModuleID = \", '{$Screen->tabConditionModuleID}'\";\n }\n\n if ($pScreenName != $Screen->name){\n if ( ( \"view\" == $pRestriction \n\t\t\t\t\t && ( \"viewscreen\" == strtolower( get_class($Screen) ) \n\t\t\t\t\t || \"recordreportscreen\" == strtolower( get_class($Screen) ) ) ) \n\t\t\t\t\t || (\"view\" != $pRestriction) ){\n\n //insert link\n if($linkTo == ''){\n $tab = \" \\$tabs['{$Screen->name}'] = array( \\\"$handler?scr={$Screen->name}&amp;\\$tabsQS\\\", gettext(\\\"{$phrase}\\\") $tabConditionModuleID);\\n\";\n } else {\n $tab = \" \\$tabs['{$Screen->name}'] = array( \\\"$handler?mdl=$linkTo&amp;rid=\\$recordID\\\", gettext(\\\"{$phrase}\\\") $tabConditionModuleID);\\n\";\n }\n }\n } else {\n //Current screen: insert name only\n $tab = \" \\$tabs['{$Screen->name}'] = array( \\\"\\\", gettext(\\\"{$phrase}\\\") $tabConditionModuleID);\\n\";\n }\n\n if(in_array(strtolower(get_class($Screen)), array('viewscreen', 'editscreen', 'recordreportscreen'))){\n $content .= $tab;\n }\n }\n }\n\n return $content;\n }", "public function prepare( $tabs ) {\n\t\t$tabs[ $this->key_name ] = array(\n\t\t\t'title' => __( 'Polylang', 'custom-sidebars' ),\n\t\t\t'cat_name' => __( 'Language', 'custom-sidebars' ),\n\t\t);\n\t\treturn $tabs;\n\t}", "public function installTabs()\n {\n TabManager::addTab('AdminTraining', 'Training Menu', 'training', 'AdminTools');\n TabManager::addTab('AdminTrainingIndexClass', 'Controller exemple', 'training', 'AdminTraining');\n TabManager::addTab('AdminTrainingGridClass', 'Grid exemple', 'training', 'AdminTraining');\n\n return true;\n }", "private static function options_page_tabs() {\n $tabs = array(\n 'general' => __('Allgemein', 'fau-cris'),\n 'layout' => __('Darstellung', 'fau-cris'),\n 'sync' => __('Synchronisierung', 'fau-cris')\n );\n return $tabs;\n }", "public function installKbTabs()\n {\n $parentTab = new Tab();\n $parentTab->name = array();\n foreach (Language::getLanguages(true) as $lang) {\n $parentTab->name[$lang['id_lang']] = $this->l('Knowband Web Push Notification');\n }\n\n $parentTab->class_name = self::PARENT_TAB_CLASS;\n $parentTab->module = $this->name;\n $parentTab->active = 1;\n $parentTab->id_parent = Tab::getIdFromClassName(self::SELL_CLASS_NAME);\n $parentTab->icon = 'notifications';\n $parentTab->add();\n\n $id_parent_tab = (int) Tab::getIdFromClassName(self::PARENT_TAB_CLASS);\n $admin_menus = $this->adminSubMenus();\n\n foreach ($admin_menus as $menu) {\n $tab = new Tab();\n foreach (Language::getLanguages(true) as $lang) {\n $tab->name[$lang['id_lang']] = $this->l($menu['name']);\n }\n\n $tab->class_name = $menu['class_name'];\n $tab->module = $this->name;\n $tab->active = $menu['active'];\n $tab->id_parent = $id_parent_tab;\n $tab->add($this->id);\n }\n return true;\n }", "public function create_tabs_script(){\n\t\treturn $this->style.'\n<script>\n\tjQuery(function () {\n\t\tjQuery(\".nav-tab-wrapper a\").click(function (e) {\n\t\t\te.preventDefault();\n\t\t\tvar tab_class = jQuery(this).data(\"tab\"); \n\t\t\tvar target = jQuery(this).data(\"target\");\n\t\t\tvar title = jQuery(this).text();\n\n\t\t\tjQuery(\".tabs-title\").fadeOut(function(){\n\t \tjQuery(\".tabs-title\").text(title).fadeIn();\n\t })\n\n\t\t\tjQuery(this).parent().find(\".nav-tab\").removeClass(\"nav-tab-active\");\n\t\t\tjQuery(this).addClass(\"nav-tab-active\");\n\t\t\n\t\t\tjQuery(\".tab\").not(\".\"+tab_class).parentsUntil(\".cmb-repeat-group-wrap\").fadeOut(600);\n\t\t\tjQuery(\".\"+tab_class).parentsUntil(\".cmb-repeat-group-wrap\").fadeIn(1000);\n\n\t\t});\n\t\tjQuery(\".hide-clone\").parentsUntil(\".cmb-row\").fadeOut();\n\t\tjQuery(\".hide-remove\").parentsUntil(\".cmb-remove-field-row\").fadeOut();\n\t});\n</script>\n<style>\n\t.page, .component{\n\t\tbackground:#6bb1a3;\n\t\tborder-radius: 10px 10px 0px 0px;\n\t\tborder:solid 2px gray;\n\t\tcolor:white;\n\n\t}\n\t.page:hover, .component:hover{\n\t\tbackground:#4b9183;\n\t\tcolor:black;\n\n\t}\n\t.component{\n\t\tbackground:#8bd1c3;\n\t}\n</style>';\n\t}", "private function createFormsTab()\n {\n $tab = $this->createTab(\n 'forms_tab',\n '__responsive_tab_forms__',\n [\n 'attributes' => [\n 'autoScroll' => true,\n ],\n ]\n );\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 90]);\n $fieldSetLabels = $this->createFieldSet(\n 'labels_fieldset',\n '__responsive_tab_forms_fieldset_labels__',\n ['attributes' => $attributes]\n );\n\n $fieldSetLabels->addElement(\n $this->createTextField(\n 'label-font-size',\n '@label-font-size',\n $this->themeFontDefaults['label-font-size']\n )\n );\n $fieldSetLabels->addElement(\n $this->createColorPickerField(\n 'label-color',\n '@label-color',\n $this->themeColorDefaults['label-color']\n )\n );\n\n $tab->addElement($fieldSetLabels);\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 160]);\n $fieldSetFormBase = $this->createFieldSet(\n 'form_base_fieldset',\n '__responsive_tab_forms_fieldset_global__',\n ['attributes' => $attributes]\n );\n\n $fieldSetFormBase->addElement(\n $this->createTextField(\n 'input-font-size',\n '@input-font-size',\n $this->themeFontDefaults['input-font-size']\n )\n );\n $fieldSetFormBase->addElement(\n $this->createColorPickerField(\n 'input-bg',\n '@input-bg',\n $this->themeColorDefaults['input-bg']\n )\n );\n $fieldSetFormBase->addElement(\n $this->createColorPickerField(\n 'input-color',\n '@input-color',\n $this->themeColorDefaults['input-color']\n )\n );\n $fieldSetFormBase->addElement(\n $this->createColorPickerField(\n 'input-placeholder-color',\n '@input-placeholder-color',\n $this->themeColorDefaults['input-placeholder-color']\n )\n );\n $fieldSetFormBase->addElement(\n $this->createColorPickerField(\n 'input-border',\n '@input-border',\n $this->themeColorDefaults['input-border']\n )\n );\n\n $tab->addElement($fieldSetFormBase);\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 240]);\n $fieldSetFormStates = $this->createFieldSet(\n 'form_states_fieldset',\n '__responsive_tab_forms_fieldset_states__',\n ['attributes' => $attributes]\n );\n\n $fieldSetFormStates->addElement(\n $this->createColorPickerField(\n 'input-focus-bg',\n '@input-focus-bg',\n $this->themeColorDefaults['input-focus-bg']\n )\n );\n $fieldSetFormStates->addElement(\n $this->createColorPickerField(\n 'input-focus-border',\n '@input-focus-border',\n $this->themeColorDefaults['input-focus-border']\n )\n );\n $fieldSetFormStates->addElement(\n $this->createColorPickerField(\n 'input-focus-color',\n '@input-focus-color',\n $this->themeColorDefaults['input-focus-color']\n )\n );\n $fieldSetFormStates->addElement(\n $this->createColorPickerField(\n 'input-error-bg',\n '@input-error-bg',\n $this->themeColorDefaults['input-error-bg']\n )\n );\n $fieldSetFormStates->addElement(\n $this->createColorPickerField(\n 'input-error-border',\n '@input-error-border',\n $this->themeColorDefaults['input-error-border']\n )\n );\n $fieldSetFormStates->addElement(\n $this->createColorPickerField(\n 'input-error-color',\n '@input-error-color',\n $this->themeColorDefaults['input-error-color']\n )\n );\n $fieldSetFormStates->addElement(\n $this->createColorPickerField(\n 'input-success-bg',\n '@input-success-bg',\n $this->themeColorDefaults['input-success-bg']\n )\n );\n $fieldSetFormStates->addElement(\n $this->createColorPickerField(\n 'input-success-border',\n '@input-success-border',\n $this->themeColorDefaults['input-success-border']\n )\n );\n $fieldSetFormStates->addElement(\n $this->createColorPickerField(\n 'input-success-color',\n '@input-success-color',\n $this->themeColorDefaults['input-success-color']\n )\n );\n\n $tab->addElement($fieldSetFormStates);\n\n return $tab;\n }", "public function set_tabs() {\n\t\t\t$tabs = [\n\t\t\t\t[\n\t\t\t\t\t'id' => 'business_info',\n\t\t\t\t\t'title' => __( 'Business info', 'yoast-local-seo' ),\n\t\t\t\t\t'icon' => 'admin-home',\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t'id' => 'opening_hours',\n\t\t\t\t\t'title' => __( 'Opening hours', 'yoast-local-seo' ),\n\t\t\t\t\t'icon' => 'clock',\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t'id' => 'maps_settings',\n\t\t\t\t\t'title' => __( 'Map settings', 'yoast-local-seo' ),\n\t\t\t\t\t'icon' => 'location-alt',\n\t\t\t\t],\n\t\t\t];\n\n\t\t\t$tabs = apply_filters( 'wpseo-local-location-meta-tabs', $tabs );\n\n\t\t\t$this->tabs = $tabs;\n\t\t}", "function getTabs(&$tabs_gui)\n\t{\n\t\tglobal $rbacsystem;\n\n\t\t// properties\n\t\tif ($rbacsystem->checkAccess(\"write\", $_GET[\"ref_id\"]))\n\t\t{\n\t\t\t$tabs_gui->addTarget(\"edit_properties\",\n\t\t\t\t\"repository.php?cmd=properties&ref_id=\".$_GET[\"ref_id\"],\n\t\t\t\t\"properties\");\n\t\t}\n\n\t\t// edit permission\n\t\tif ($rbacsystem->checkAccess(\"edit_permission\", $_GET[\"ref_id\"]))\n\t\t{\n\t\t\t$tabs_gui->addTarget(\"perm_settings\",\n\t\t\t\t\"repository.php?cmd=permissions&ref_id=\".$_GET[\"ref_id\"],\n\t\t\t\t\"permissions\");\n\t\t}\n\t}", "private function createGeneralTab()\n {\n $tab = $this->createTab(\n 'general_tab',\n '__responsive_tab_general__',\n [\n 'attributes' => [\n 'autoScroll' => true,\n ],\n ]\n );\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 130]);\n $fieldSetGrey = $this->createFieldSet(\n 'grey_tones',\n '__responsive_tab_general_fieldset_grey__',\n ['attributes' => $attributes]\n );\n\n $fieldSetGrey->addElement(\n $this->createColorPickerField(\n 'gray',\n '@gray',\n $this->themeColorDefaults['gray']\n )\n );\n $fieldSetGrey->addElement(\n $this->createColorPickerField(\n 'gray-light',\n '@gray-light',\n $this->themeColorDefaults['gray-light']\n )\n );\n $fieldSetGrey->addElement(\n $this->createColorPickerField(\n 'gray-dark',\n '@gray-dark',\n $this->themeColorDefaults['gray-dark']\n )\n );\n $fieldSetGrey->addElement(\n $this->createColorPickerField(\n 'border-color',\n '@border-color',\n $this->themeColorDefaults['border-color']\n )\n );\n\n $basicFieldSet = $this->createBasicFieldSet();\n $tab->addElement($basicFieldSet);\n $tab->addElement($fieldSetGrey);\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 130]);\n $fieldSetHighlights = $this->createFieldSet(\n 'highlight_colors',\n '__responsive_tab_general_fieldset_highlight__',\n ['attributes' => $attributes]\n );\n\n $fieldSetHighlights->addElement(\n $this->createColorPickerField(\n 'highlight-success',\n '@highlight-success',\n $this->themeColorDefaults['highlight-success']\n )\n );\n $fieldSetHighlights->addElement(\n $this->createColorPickerField(\n 'highlight-error',\n '@highlight-error',\n $this->themeColorDefaults['highlight-error']\n )\n );\n $fieldSetHighlights->addElement(\n $this->createColorPickerField(\n 'highlight-notice',\n '@highlight-notice',\n $this->themeColorDefaults['highlight-notice']\n )\n );\n $fieldSetHighlights->addElement(\n $this->createColorPickerField(\n 'highlight-info',\n '@highlight-info',\n $this->themeColorDefaults['highlight-info']\n )\n );\n\n $tab->addElement($fieldSetHighlights);\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 220]);\n $fieldSetScaffolding = $this->createFieldSet(\n 'scaffolding',\n '__responsive_tab_general_fieldset_scaffolding__',\n ['attributes' => $attributes]\n );\n\n $fieldSetScaffolding->addElement(\n $this->createColorPickerField(\n 'body-bg',\n '@body-bg',\n $this->themeColorDefaults['body-bg']\n )\n );\n $fieldSetScaffolding->addElement(\n $this->createColorPickerField(\n 'text-color',\n '@text-color',\n $this->themeColorDefaults['text-color']\n )\n );\n $fieldSetScaffolding->addElement(\n $this->createColorPickerField(\n 'text-color-dark',\n '@text-color-dark',\n $this->themeColorDefaults['text-color-dark']\n )\n );\n $fieldSetScaffolding->addElement(\n $this->createColorPickerField(\n 'link-color',\n '@link-color',\n $this->themeColorDefaults['link-color']\n )\n );\n $fieldSetScaffolding->addElement(\n $this->createColorPickerField(\n 'link-hover-color',\n '@link-hover-color',\n $this->themeColorDefaults['link-hover-color']\n )\n );\n $fieldSetScaffolding->addElement(\n $this->createColorPickerField(\n 'rating-star-color',\n '@rating-star-color',\n $this->themeColorDefaults['rating-star-color']\n )\n );\n $fieldSetScaffolding->addElement(\n $this->createColorPickerField(\n 'overlay-bg',\n '@overlay-bg',\n $this->themeColorDefaults['overlay-bg']\n )\n );\n\n $fieldSetScaffolding->addElement(\n $this->createColorPickerField(\n 'overlay-theme-dark-bg',\n '@overlay-theme-dark-bg',\n '@overlay-bg'\n )\n );\n\n $fieldSetScaffolding->addElement(\n $this->createColorPickerField(\n 'overlay-theme-light-bg',\n '@overlay-theme-light-bg',\n '#FFFFFF'\n )\n );\n\n $fieldSetScaffolding->addElement(\n $this->createColorPickerField(\n 'overlay-opacity',\n '@overlay-opacity',\n $this->themeColorDefaults['overlay-opacity']\n )\n );\n\n $tab->addElement($fieldSetScaffolding);\n\n return $tab;\n }", "function jquery_create_tabs( $tab_id, $tabs, $callback, $prefix = '' )\n {\n global $page_info;\n\n $page_info['head'][] = _jquery_tabs( $tab_id );\n\n echo ( $prefix . '<div id=\"' . htmlentities( $tab_id ) . '\">' . \"\\n\" );\n\n echo ( $prefix . \"\\t\" . '<ul>' . \"\\n\" );\n foreach ( $tabs as $tk => $tv )\n {\n echo ( $prefix . \"\\t\\t\" . '<li><a href=\"#' . htmlentities( $tk ) . '\">' . htmlentities( $tv ) . '</a></li>' . \"\\n\" );\n }\n echo ( $prefix . \"\\t\" . '</ul>' . \"\\n\" );\n\n foreach ( $tabs as $tk => $tv )\n {\n echo ( $prefix . \"\\t\" . '<div id=\"' . htmlentities( $tk ) . '\">' . \"\\n\" );\n\n call_user_func_array( $callback, array( $tk, ( $prefix . \"\\t\\t\" ) ) );\n\n echo ( $prefix . \"\\t\" . '</div>' . \"\\n\" );\n }\n\n echo ( $prefix . '</div>' . \"\\n\" );\n }", "protected function setup_tabs() {\n\n\t\t// If there's a remote info file give it priority and override any existing parameters.\n\t\tif ( $url = $this->browser_args['remote_info'] ) {\n\t\t\t$info = $this->get_remote_info( $url );\n\n\t\t\tif ( ! empty( $info ) ) {\n\t\t\t\t$this->browser_args = wp_parse_args( $info, $this->browser_args );\n\t\t\t}\n\n\t\t}\n\n\t\t// Display the 'popular' tab if enabled.\n\t\tif ( 'true' == $this->browser_args['show_popular'] ) {\n\n\t\t\t$this->browser_args['tabs']['popular'] = array(\n\t\t\t\t'name' => __( 'Popular', 'wp-shp-browser' ),\n\t\t\t\t'url' => ''\n\t\t\t);\n\n\t\t}\n\n\t\t// Set the default tab if not already set.\n\t\tif ( ! $this->browser_args['default_tab'] ) {\n\t\t\t$default_tab = array_keys( $this->browser_args['tabs'] );\n\t\t\t$default_tab = $default_tab[0];\n\n\t\t\t$this->browser_args['default_tab'] = $default_tab;\n\t\t}\n\n\t}", "private function build_factory_meta_tab_widget($_meta, $_ptype = \"wccpf\") {\r\n \t/* Accordian wrapper starts here */\r\n \t$html = '<div class=\"wcff-factory-tab-container\">';\r\n \t\r\n \t/* Left side header panel starts here */\r\n \t$html .= '<div class=\"wcff-factory-tab-left-panel\">';\r\n \t$html .= '<ul>';\r\n \tforeach ($_meta[\"tabs\"] as $tab) {\r\n \t\t$html .= '<li data-box=\"' . $tab[\"header\"][\"target\"] . '\" class=\"' . $tab[\"header\"][\"css_class\"] . '\">' . $tab[\"header\"][\"title\"] . '</li>';\r\n \t}\r\n \t$html .= '</ul>';\r\n \t$html .= '</div>';\r\n \t/* Left side header anel ends here */\r\n \t\r\n \t/* Left side header panel starts here */\r\n \t$html .= '<div class=\"wcff-factory-tab-right-panel\">';\r\n \tforeach ($_meta[\"tabs\"] as $tab) {\r\n \t\t/* Tab content section starts here */\r\n \t\t$html .= '<div id=\"' . $tab[\"content\"][\"container\"] . '\" class=\"wcff-factory-tab-content\">';\r\n \t\t\r\n \t\tforeach ($tab[\"content\"][\"fields\"] as $field) {\r\n \t\t\t/* Meta field's wrapper starts here */\r\n \t\t\t$html .= '<div class=\"wcff-field-types-meta\" data-type=\"' . $field[\"type\"] . '\" data-param=\"' . $field[\"param\"] . '\">';\r\n \t\t\t$html .= $this->build_factory_meta_field($field, $_ptype);\r\n \t\t\t$html .= '</div>';\r\n \t\t\t/* Meta field's wrapper ends here */\r\n \t\t}\r\n \t\t\r\n \t\t$html .= '</div>';\r\n \t\t/* Tab content section ends here */\r\n \t}\r\n \t$html .= '</div>';\r\n \t/* Left side header anel ends here */\r\n \t\r\n \t$html .= '</div>';\r\n \t/* Accordian wrapper ends here */\r\n \treturn $html;\r\n }", "public function startTabs() {\n\t\t\tglobal $oSecurity; \n\t\t\t$arTabs = array( \n\t\t\t\t\"home\" => array(\n\t\t\t\t\t\"title\" => \"Home\", \n\t\t\t\t\t\"url\" => \"main.php\", \n\t\t\t\t\t\"classes\" => array(\"menu-item\", \"home\"), \n\t\t\t\t) \n\t\t\t); \n\t\t\t$oOwaesTypes = new owaestype(); \n\t\t\tforeach ($oOwaesTypes->getAllTypes() as $strKey=>$strTitle) {\n\t\t\t\t$arTabs[\"market.\" . $strKey] = array(\n\t\t\t\t\t\"title\" => $strTitle, \n\t\t\t\t\t\"url\" => \"index.php?t=\" . $strKey, \n\t\t\t\t\t\"classes\" => array(\"menu-item\", $strKey), \n\t\t\t\t);\n\t\t\t}\n\t\t\t/*$arTabs[\"users\"] = array(\n\t\t\t\t\t\"title\" => \"gebruikers\", \n\t\t\t\t\t\"url\" => \"users.php\", \n\t\t\t\t\t\"classes\" => array(\"users\", \"extratab\"), \n\t\t\t\t);*/\n\t\t\tif ($this->bLoggedInUser) {\n\t\t\t\t/*$oInbox = new inbox();\n\t\t\t\tif (count($oInbox->discussions()) > 0) {\n\t\t\t\t\t$arTabs[\"messages\"] = array(\n\t\t\t\t\t\t\"title\" => \"berichten\", \n\t\t\t\t\t\t\"url\" => \"#\", \n\t\t\t\t\t\t\"classes\" => array(\"extratab\", \"mailbox\"), \n\t\t\t\t\t\t\"sub\" => array(),\n\t\t\t\t\t); \n\t\t\t\t\tforeach ($oInbox->discussions() as $iKey=>$arUser) {\n\t\t\t\t\t\tif ($arUser[\"unread\"] > 0) {\n\t\t\t\t\t\t\t$arTabs[\"messages\"][\"sub\"][$arUser[\"names\"] . \" (\" . $arUser[\"unread\"] . \")\"] = array(\"conversation.php?users=\" . $arUser[\"ids\"], \"conversation unread\"); \n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$arTabs[\"messages\"][\"sub\"][$arUser[\"names\"]] = array(\"conversation.php?users=\" . $arUser[\"ids\"], \"conversation\"); \n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} \n */\n $arTabs[\"lijsten\"] = array (\n \"title\" => \"Lijsten\", \n\t\t\t\t\t\"url\" => \"#\", \n\t\t\t\t\t\"classes\" => array(\"dropdown-toggle\", \"lijsten\", \"menu-item\"), \n\t\t\t\t\t\"sub\" => array(),\n );\n \n if (user(me())->levelrights(\"groepslijst\")) $arTabs[\"lijsten\"][\"sub\"][\"Groepen\"] = array(\"groups.php\", \"groups\");\n if (user(me())->levelrights(\"gebruikerslijst\")) $arTabs[\"lijsten\"][\"sub\"][\"Gebruikers\"] = array(\"users.php\", \"gebruikers\");\n $arTabs[\"lijsten\"][\"sub\"][\"Vrienden\"] = array(\"friends.php\", \"friends\");\n\t\t\t\t$arTabs[\"lijsten\"][\"sub\"][\"Badges\"] = array(\"badges.php\", \"badges\");\n\t\t\t\tif ($oSecurity->admin()) {\n\t\t\t\t\t$arTabs[\"lijsten\"][\"sub\"][\"Admin\"] = array(\"admin.php\", \"admin\");\n\t\t\t\t\t$arTabs[\"lijsten\"][\"sub\"][\"Reports\"] = array(\"meldingen.php\", \"meldingen\");\n\t\t\t\t\t$arTabs[\"lijsten\"][\"sub\"][\"Groepen\"] = array(\"admin.groepen.php\", \"groups\");\n\t\t\t\t}\n \n $arTabs[\"account\"] = array (\n \"title\" => \"Account\", \n\t\t\t\t\t\"url\" => \"#\", \n\t\t\t\t\t\"classes\" => array(\"dropdown-toggle\", \"account\", \"menu-item\"), \n\t\t\t\t\t\"sub\" => array(),\n );\n $arTabs[\"account\"][\"sub\"][\"Profiel\"] = array(\"profile.php\", \"profiel\");\t\n\t\t\t\t$arTabs[\"account\"][\"sub\"][\"Berichten\"] = array(\"conversation.php\", \"berichten\");\t\n\t\t\t\t$arTabs[\"account\"][\"sub\"][\"Instellingen\"] = array(\"settings.php\", \"instellingen\");\n\t\t\t\t$arTabs[\"account\"][\"sub\"][\"Paswoord aanpassen\"] = array(\"modal.changepass.php\", \"paswoord domodal\");\n\t\t\t\t$arTabs[\"account\"][\"sub\"][\"Afmelden\"] = array(\"logout.php\", \"afmelden\");\t\n \n\t\t\t\t/*$arTabs[\"settings\"] = array(\n\t\t\t\t\t\"title\" => \"instellingen\", \n\t\t\t\t\t\"url\" => \"settings.php\", \n\t\t\t\t\t\"classes\" => array(\"extratab\", \"settings\"), \n\t\t\t\t\t\"sub\" => array(),\n\t\t\t\t);\n \n\t\t\t\tforeach (user(me())->groups() as $oGroep) {\n\t\t\t\t\t$arTabs[\"settings\"][\"sub\"][$oGroep->naam()] = array(\"group.php?id=\" . $oGroep->id(), \"groep\"); \n\t\t\t\t}\n\t\t\t\t*/\n\t\t\t\t//if ($oSecurity->admin()) $arTabs[\"account\"][\"sub\"][\"admin\"] = array(\"admin.php\", \"admin\"); \n\t\t\t\t/*\n\t\t\t\t$arTabs[\"settings\"][\"sub\"][\"instellingen\"] = array(\"settings.php\", \"settings\");\n\t\t\t\t$arTabs[\"settings\"][\"sub\"][\"profiel\"] = array(\"profile.php\", \"profile\");\n\t\t\t\t$arTabs[\"settings\"][\"sub\"][\"uitloggen\"] = array(\"logout.php\", \"login\");\n */\n\t\t\t} else {\n\t\t\t\t$arTabs[\"login\"] = array(\n\t\t\t\t\t\"url\" => \"login.php?p=\" . urlencode($this->filename()), \n\t\t\t\t\t\"classes\" => array(\"menu-item\", \"login\"), \n\t\t\t\t); \n\t\t\t}\n\t\t\tif (isset($arTabs[$this->tab()][\"classes\"])) $arTabs[$this->tab()][\"classes\"][] = \"active\"; \n \n $strHTML = \"\";\n $strHTML .= \"<nav class=\\\"navbar navbar-default\\\">\";\n $strHTML .= \"<div class=\\\"container\\\"><div class=\\\"row\\\"><div class=\\\"navbar-header\\\">\";\n $strHTML .= \"<a href=\\\"main.php\\\"><h1 class=\\\"navbar-brand\\\">OWAES</h1></a>\";\n $strHTML .= \"<button class=\\\"navbar-toggle\\\" type=\\\"button\\\" data-toggle=\\\"collapse\\\" data-target=\\\"#navbar-main\\\"><span class=\\\"icon-bar\\\"></span><span class=\\\"icon-bar\\\"></span><span class=\\\"icon-bar\\\"></span></button>\";\n\t\t\t$strHTML .= \"</div><div class=\\\"navbar-collapse collapse\\\" id=\\\"navbar-main\\\"><ul class=\\\"nav navbar-nav navbar-right\\\">\"; \n\t\t\tforeach ($arTabs as $strKey => $arDetails) {\n\t\t\t\t$strTitel = isset($arDetails[\"title\"]) ? $arDetails[\"title\"] : $strKey; \n if (!isset($arDetails[\"sub\"])){\n $strHTML .= \"<li>\";\n\t\t\t\t $strHTML .= \"<a href=\\\"\" . fixPath($arDetails[\"url\"]) . \"\\\" class=\\\"\" . implode(\" \", $arDetails[\"classes\"]) . \"\\\">\";\n $strHTML .= \"<span class=\\\"icon\\\"></span>\";\n $strHTML .= \"<span class=\\\"title\\\">$strTitel</span></a>\";\n $strHTML .= \"</li>\";\n } else{\n $strHTML .= \"<li class=\\\"dropdown\\\">\";\n $strHTML .= \"<a href=\\\"\" . fixPath($arDetails[\"url\"]) . \"\\\" class=\\\"\" . implode(\" \", $arDetails[\"classes\"]) . \"\\\" data-toggle=\\\"dropdown\\\">\";\n $strHTML .= \"<span class=\\\"icon\\\"></span>\";\n $strHTML .= \"<span class=\\\"title\\\">$strTitel</span> <span class=\\\"caret\\\"></span></a>\";\n \n $strHTML .= \"<ul class=\\\"dropdown-menu\\\">\"; \n\t\t\t\t\tforeach ($arDetails[\"sub\"] as $strSubTitel => $arSubDetails) {\n\t\t\t\t\t\t$strHTML .= \"<li><a href=\\\"\" . fixPath($arSubDetails[0]) . \"\\\" class=\\\"\" . $arSubDetails[1] . \"\\\"><span class=\\\"icon-\" . $arSubDetails[1] . \"\\\"></span><span>$strSubTitel</span></a></li>\";\n\t\t\t\t\t}\n\t\t\t\t\t$strHTML .= \"</ul>\"; \n $strHTML .= \"</li>\";\n }\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t$strHTML .= \"</ul></div></div></div></nav>\"; \n\t\t\t//$strHTML .= \"<div class=\\\"clock\\\">\" . clock() . \"</div>\"; \n\t\t\t/*$strHTML .= \"<form class=\\\"search\\\" action=\\\"\" . fixPath(\"search.php\") . \"\\\" method=\\\"get\\\">\n\t\t\t\t\t\t\t<input class=\\\"searchfield\\\" type=\\\"text\\\" name=\\\"q\\\" \" . (isset($_GET[\"q\"])?(\"value=\\\"\" . inputfield($_GET[\"q\"]) . \"\\\"\"):\"\") . \" />\n\t\t\t\t\t\t\t<input class=\\\"searchbutton\\\" type=\\\"submit\\\" value=\\\"zoeken\\\" />\n\t\t\t\t\t\t</form>\"; */\n //$strHTML .= \"<ul class=\\\"popupmessages\\\"></ul>\"; \n\t\t\tif (!$this->bLoggedInUser) { \n\t\t\t\t$strHTML .= \"<div class=\\\"loginbar\\\">\n\t\t\t\t\t\t\t\tLog in: \n\t\t\t\t\t\t\t\t<form action=\\\"\" . fixPath(\"login.php\") . \"\\\" method=\\\"post\\\">\n\t\t\t\t\t\t\t\t<input type=\\\"hidden\\\" name=\\\"from\\\" id=\\\"from\\\" value=\\\"\" . $this->filename(TRUE) . \"\\\" />\n\t\t\t\t\t\t\t\t<input type=\\\"text\\\" name=\\\"username\\\" id=\\\"username\\\" />\n\t\t\t\t\t\t\t\t<input type=\\\"password\\\" name=\\\"pass\\\" id=\\\"pass\\\" />\n\t\t\t\t\t\t\t\t<input type=\\\"submit\\\" name=\\\"dologin\\\" value=\\\"inloggen\\\" />\n\t\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t\t\tof <a href=\\\"\" . fixPath(\"login.php?p=\" . urlencode($this->filename())) . \"\\\">registreer</a>\n\t\t\t\t\t\t\t</div>\";\n\t\t\t} \n\t\t\t//$strHTML .= \"<div id=\\\"ADMIN\\\">\n\t\t\t//\t\t\t\t\t<ul><a href=\\\"#\\\" rel=\\\"SQL\\\">show/hide SQL</a></ul>\n\t\t\t//\t\t\t\t</div>\";\n\t\t\t\n\t\t\tif(settings(\"analytics\")!=\"\") {\n\t\t\t\t$strHTML = \"<script>\n (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),\n m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\n })(window,document,'script','//www.google-analytics.com/analytics.js','ga');\n\n ga('create', '\" . settings(\"analytics\") . \"', 'auto');\n ga('send', 'pageview');\n\n</script>\" . $strHTML; \t\n\t\t\t}\n\t\t\t\n\t\t\treturn $strHTML; \n\t\t}", "private function createTab() {\n\t\t$moduleToken = t3lib_formprotection_Factory::get()->generateToken('moduleCall', self::MODULE_NAME);\n\t\treturn $this->doc->getTabMenu(\n\t\t\tarray('M' => self::MODULE_NAME, 'moduleToken' => $moduleToken, 'id' => $this->id),\n\t\t\t'tab',\n\t\t\tself::IMPORT_TAB,\n\t\t\tarray(self::IMPORT_TAB => $GLOBALS['LANG']->getLL('import_tab'))\n\t\t\t) . $this->doc->spacer(5);\n\t}", "function mmpm_theme_sections_generator(){\n\t\t$out = '';\n\t\t$out .= mmpm_ntab(4) . '<div class=\"'. MMPM_PREFIX . '_theme_options row bootstrap no_x_margin\">';\n\t\t$out .= mmpm_ntab(5) . '<ul id=\"'. MMPM_PREFIX . '_navigation\" class=\"'. MMPM_PREFIX . '_navigation nav nav-tabs col-lg-2 col-sm-3 col-xs-12\">';\n\t\tforeach ( mmpm_theme_options_array() as $key => $section ) {\n\t\t\t$out .= mmpm_ntab(6) . '<li class=\"menu_item' . ( ( $key == 0) ? ' active' : '' ) . '\">';\n\t\t\t$out .= mmpm_ntab(7) . '<a href=\"#' . $section['key'] . '\" data-toggle=\"tab\"><i class=\"' . ( ( isset( $section['icon'] ) ) ? $section['icon'] : 'empty-icon' ) . '\"></i> ' . $section['title'] . '</a></li>';\n\t\t\t$out .= mmpm_ntab(6) . '</li>';\n\t\t}\n\t\t$out .= mmpm_ntab(5) . '</ul><!-- class=\"'. MMPM_PREFIX . '_navigation\" -->';\n\t\t$out .= mmpm_ntab(5) . '<div id=\"'. MMPM_PREFIX . '_content\" class=\"tab-content '. MMPM_PREFIX . '_content col-lg-10 col-sm-9 col-xs-12\">';\n\t\tforeach ( mmpm_theme_options_array() as $key => $section ) {\n\t\t\t$out .= mmpm_ntab(6) . '<div class=\"tab-pane fade' . ( ( $key == 0) ? ' active in' : '' ) . '\" id=\"' . $section['key'] . '\">';\n\t\t\t$mmpm_saved_theme_options = get_option( MMPM_OPTIONS_DB_NAME, array( 'empty' ) );\n\t\t\tforeach ( $section['options'] as $option ) {\n\t\t\t\t$option['key'] = isset( $option['key'] ) ? $option['key'] : 'key_no_set';\n\t\t\t\t$mmpm_saved_value = isset( $mmpm_saved_theme_options[ $option[ 'key' ] ] ) \n\t\t\t\t\t? $mmpm_saved_theme_options[ $option[ 'key' ] ] \n\t\t\t\t\t: false;\n\t\t\t\t$option['key'] = MMPM_OPTIONS_NAME . '[' . $option['key'] . ']';\n\t\t\t\t$out .= mmpm_options_generator( $option, $mmpm_saved_value );\n\t\t\t}\n\t\t\t$out .= mmpm_ntab(6) . '</div><!-- class=\"tab-pane fade\" id=\"' . $section['key'] . '\" -->';\n\t\t}\n\t\t$out .= mmpm_ntab(5) . '</div><!-- id=\"'. MMPM_PREFIX . '_content\" class=\"tab-content\" -->';\n\t\t$out .= mmpm_ntab(4) . '</div><!-- class=\"'. MMPM_PREFIX . '_theme_options\" -->';\n\t\treturn $out;\n\t}", "function settings_nav( $tabs ) {\n\n $tabs[ 'admin_tools' ] = array(\n 'slug' => 'admin_tools',\n 'title' => __( 'Developer', 'wpp' )\n );\n\n return $tabs;\n\n }", "public function generate()\n\t{\n if (is_array($GLOBALS['TL_JAVASCRIPT']))\n\t\t{\n\t\t\tarray_insert($GLOBALS['TL_JAVASCRIPT'], 1, 'bundles/hschottmtextwizard/js/textwizard.min.js');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$GLOBALS['TL_JAVASCRIPT'] = array('bundles/hschottmtextwizard/js/textwizard.min.js');\n\t\t}\n\n\t\t$arrButtons = array('new', 'copy', 'delete', 'drag');\n\t\t// Make sure there is at least an empty array\n\t\tif (empty($this->varValue) || !\\is_array($this->varValue))\n\t\t{\n\t\t\t$this->varValue = array('');\n\t\t}\n\t\t// Initialize the tab index\n\t\tif (!\\Cache::has('tabindex'))\n\t\t{\n\t\t\t\\Cache::set('tabindex', 1);\n\t\t}\n\n $hasTitles = array_key_exists('buttonTitles', $this->arrConfiguration) && is_array($this->arrConfiguration['buttonTitles']);\n\n $return = ($this->wizard) ? '<div class=\"tl_wizard\">' . $this->wizard . '</div>' : '';\n\t\t$return .= '<ul id=\"ctrl_'.$this->strId.'\" class=\"tl_listwizard tl_textwizard\">';\n\t\t// Add input fields\n\t\tfor ($i=0, $c=\\count($this->varValue); $i<$c; $i++)\n\t\t{\n\t\t\t$return .= '\n <li><input type=\"text\" name=\"'.$this->strId.'[]\" class=\"tl_text\" value=\"'.\\StringUtil::specialchars($this->varValue[$i]).'\"' . $this->getAttributes() . '> ';\n\t\t\t// Add buttons\n\t\t\tforeach ($arrButtons as $button)\n\t\t\t{\n\t\t\t\tif ($button == 'drag')\n\t\t\t\t{\n\t\t\t\t\t$return .= ' <button type=\"button\" class=\"drag-handle\" title=\"' . \\StringUtil::specialchars($GLOBALS['TL_LANG']['MSC']['move']) . '\" aria-hidden=\"true\">' . \\Image::getHtml('drag.svg') . '</button>';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n $buttontitle = ($hasTitles && array_key_exists($button, $this->arrConfiguration['buttonTitles'])) ? $this->arrConfiguration['buttonTitles'][$button] : $GLOBALS['TL_LANG']['MSC']['lw_'.$button];\n\t\t\t\t\t$return .= ' <button type=\"button\" data-command=\"' . $button . '\" title=\"' . \\StringUtil::specialchars($buttontitle) . '\">' . \\Image::getHtml($button.'.svg') . '</button>';\n\t\t\t\t}\n\t\t\t}\n\t\t\t$return .= '</li>';\n\t\t}\n\t\treturn $return.'\n </ul>\n <script>TextWizard.textWizard(\"ctrl_'.$this->strId.'\")</script>';\n\t}", "private function tabs_panels() {\n\t\t\tforeach ( $this->tabs as $key => $tab ) {\n\t\t\t\t$active = ( $key === 0 );\n\n\t\t\t\t$panel_class = [ 'wpseo-local-meta-section' ];\n\t\t\t\tif ( $active ) {\n\t\t\t\t\t$panel_class[] = 'active';\n\t\t\t\t}\n\n\t\t\t\techo '<div role=\"tabpanel\" id=\"wpseo-local-tab-' . $tab['id'] . '\" class=\"' . implode( ' ', $panel_class ) . '\">';\n\t\t\t\techo '<div class=\"wpseo-local-metabox-content\">';\n\t\t\t\tdo_action( 'wpseo-local-panel-content-' . $tab['id'] );\n\t\t\t\techo '</div>';\n\t\t\t\techo '</div>';\n\t\t\t}\n\t\t}", "protected function buildTabs(Request $request)\n {\n $tabs = array();\n $args = $request->query->all();\n $type = $request->attributes->get('type');\n\n $tabs[getlocal('Usage statistics for each date')] = $type != self::TYPE_BY_DATE\n ? $this->generateUrl('statistics', ($args + array('type' => self::TYPE_BY_DATE)))\n : '';\n\n $tabs[getlocal('Threads by operator')] = $type != self::TYPE_BY_OPERATOR\n ? $this->generateUrl('statistics', ($args + array('type' => self::TYPE_BY_OPERATOR)))\n : '';\n\n if (Settings::get('enabletracking')) {\n $tabs[getlocal('Chat threads by page')] = $type != self::TYPE_BY_PAGE\n ? $this->generateUrl('statistics', ($args + array('type' => self::TYPE_BY_PAGE)))\n : '';\n }\n\n return $tabs;\n }", "function tpps_details_tabs(array &$state) {\n $output = '<ul class=\"nav nav-tabs\" role=\"tablist\">\n <li class=\"nav-item\"><a class=\"nav-link active\" role=\"tab\" data-toggle=\"tab\" href=\"#species\">Species</a></li>\n <li class=\"nav-item\"><a class=\"nav-link\" role=\"tab\" data-toggle=\"tab\" href=\"#study\">Study Details</a></li>\n <li class=\"nav-item\"><a class=\"nav-link\" role=\"tab\" data-toggle=\"tab\" href=\"#trees\">Plants</a></li>';\n $p_exist = FALSE;\n $g_exist = FALSE;\n $mass_spectro_exist = FALSE;\n for ($i = 1; $i <= $state['stats']['species_count']; $i++) {\n if (!empty($state['saved_values'][TPPS_PAGE_4][\"organism-$i\"]['phenotype'])) {\n $p_exist = TRUE;\n }\n if (!empty($state['saved_values'][TPPS_PAGE_4][\"organism-$i\"]['genotype'])) {\n $g_exist = TRUE;\n }\n if ($state['saved_values'][TPPS_PAGE_4][\"organism-$i\"]['phenotype']['iso-check'] == TRUE) {\n $mass_spectro_exist = TRUE;\n }\n }\n \n $output .= $p_exist ? '<li class=\"nav-item\"><a class=\"nav-link\" role=\"tab\" data-toggle=\"tab\" href=\"#phenotype\">Phenotypes / Environments</a></li>' : \"\";\n $output .= $g_exist ? '<li class=\"nav-item\"><a class=\"nav-link\" role=\"tab\" data-toggle=\"tab\" href=\"#genotype\">Genotypes</a></li>' : \"\";\n $output .= $mass_spectro_exist ? '<li class=\"nav-item\"><a class=\"nav-link\" role=\"tab\" data-toggle=\"tab\" href=\"#mass_spectrometry\">Mass Spectrometry</a></li>' : \"\";\n $output .= '</ul><div id=\"tab-content\" class=\"tab-content\">';\n\n $output .= \"<div id=\\\"species\\\" role=\\\"tabpanel\\\" class=\\\"tab-pane fade in active\\\"></div>\";\n $output .= \"<div id=\\\"study\\\" role=\\\"tabpanel\\\" class=\\\"tab-pane fade\\\"></div>\";\n $output .= \"<div id=\\\"trees\\\" role=\\\"tabpanel\\\" class=\\\"tab-pane fade\\\"></div>\";\n\n $output .= $p_exist ? \"<div id=\\\"phenotype\\\" role=\\\"tabpanel\\\" class=\\\"tab-pane fade\\\"></div>\" : \"\";\n $output .= $g_exist ? \"<div id=\\\"genotype\\\" role=\\\"tabpanel\\\" class=\\\"tab-pane fade\\\"></div>\" : \"\";\n $output .= $mass_spectro_exist ? \"<div id=\\\"mass_spectrometry\\\" role=\\\"tabpanel\\\" class=\\\"tab-pane fade\\\"></div>\" : \"\";\n\n $output .= '</div>';\n return $output;\n}", "function render_tabs( $attributes ) {\n\t\t\t\tglobal $post;\n\t\t\t\t// If a page, then do split\n\t\t\t\t// Get ids of children\n\t\t\t\t$children = get_pages( array(\n\t\t\t\t\t\t'child_of' => $post->ID\n\t\t\t\t\t\t, 'parent' => $post->ID\n\t\t\t\t\t\t, 'sort_column' => 'menu_order'\n\t\t\t\t) );\n\n\t\t\t\t$child_titles = array();\n\t\t\t\t$child_contents = \"\n\";\n// TODO: start jquery 'loading' action here.\n\n\t\t\t\t$child_tablinks = \"\n<div id='subpage-tabs' class='ui-tabs'>\n\t<ul>\n\";\n\t\t\t\tforeach ( $children as $child ) {\n\t\t\t\t\t$child_tablinks .= \"\t\t<li><a href='#ctab-$child->ID'>$child->post_title</a></li>\n\";\n\t\t\t\t\t// Render any shortcodes\n\t\t\t\t\t$new_content = do_shortcode( $child->post_content );\n\t\t\t\t\t$child_contents .= \"<div id='ctab-$child->ID' class='ui-tabs-hide'>\n$new_content\n</div>\n\";\n\t\t\t\t}\n\t\t\t\t$child_tablinks .= \"\t</ul>\n\";\n\t\t\t\t$child_contents .= \"</div>\n<script type='text/javascript'>\n/*<![CDATA[*/\njQuery(\n\tfunction(){\n\t\tjQuery('#subpage-tabs').tabs();\n }\n);\n/*]]>*/\n</script>\n\";\n// TODO: destroy jquery 'loading' action here.\n\n\t\t\t\t$content = $child_tablinks . $child_contents;\n\t\t\t\treturn $content;\n\t\t}", "private function createMainConfigTab()\n {\n $tab = $this->createTab(\n 'responsiveMain',\n '__responsive_tab_header__',\n [\n 'attributes' => [\n 'layout' => 'anchor',\n 'autoScroll' => true,\n 'padding' => '0',\n 'defaults' => ['anchor' => '100%'],\n ],\n ]\n );\n\n $fieldSet = $this->createFieldSet(\n 'bareGlobal',\n '__global_configuration__',\n [\n 'attributes' => [\n 'padding' => '10',\n 'margin' => '5',\n 'layout' => 'anchor',\n 'defaults' => ['labelWidth' => 155, 'anchor' => '100%'],\n ],\n ]\n );\n\n $fieldSet->addElement(\n $this->createCheckboxField(\n 'offcanvasCart',\n '__offcanvas_cart__',\n true,\n $this->getLabelAttribute(\n 'offcanvas_cart_description'\n )\n )\n );\n\n $fieldSet->addElement(\n $this->createCheckboxField(\n 'offcanvasOverlayPage',\n '__offcanvas_move_method__',\n true,\n $this->getLabelAttribute(\n 'offcanvas_move_method_description'\n )\n )\n );\n\n $fieldSet->addElement(\n $this->createCheckboxField(\n 'focusSearch',\n '__focus_search__',\n false,\n $this->getLabelAttribute(\n 'focus_search_description'\n )\n )\n );\n\n $fieldSet->addElement(\n $this->createCheckboxField(\n 'displaySidebar',\n '__display_sidebar__',\n true,\n $this->getLabelAttribute(\n 'display_sidebar_description'\n )\n )\n );\n\n $fieldSet->addElement(\n $this->createCheckboxField(\n 'sidebarFilter',\n '__show_filter_in_sidebar__',\n false,\n $this->getLabelAttribute(\n 'show_filter_in_sidebar_description'\n )\n )\n );\n\n $fieldSet->addElement(\n $this->createCheckboxField(\n 'checkoutHeader',\n '__checkout_header__',\n true,\n $this->getLabelAttribute(\n 'checkout_header_description'\n )\n )\n );\n\n $fieldSet->addElement(\n $this->createCheckboxField(\n 'checkoutFooter',\n '__checkout_footer__',\n true,\n $this->getLabelAttribute(\n 'checkout_footer_description'\n )\n )\n );\n\n $fieldSet->addElement(\n $this->createCheckboxField(\n 'infiniteScrolling',\n '__enable_infinite_scrolling__',\n true,\n $this->getLabelAttribute(\n 'enable_infinite_scrolling_description'\n )\n )\n );\n\n $fieldSet->addElement(\n $this->createNumberField(\n 'infiniteThreshold',\n '__infinite_threshold__',\n 4,\n $this->getLabelAttribute(\n 'infinite_threshold_description',\n 'supportText'\n )\n )\n );\n\n $fieldSet->addElement(\n $this->createSelectField(\n 'lightboxZoomFactor',\n '__lightbox_zoom_factor__',\n 0,\n [\n ['value' => 0, 'text' => '__lightbox_zoom_factor_auto__'],\n ['value' => 1, 'text' => '__lightbox_zoom_factor_none__'],\n ['value' => 2, 'text' => '__lightbox_zoom_factor_2x__'],\n ['value' => 3, 'text' => '__lightbox_zoom_factor_3x__'],\n ['value' => 5, 'text' => '__lightbox_zoom_factor_5x__'],\n ],\n $this->getLabelAttribute(\n 'lightbox_zoom_factor_description',\n 'supportText'\n )\n )\n );\n\n $fieldSet->addElement(\n $this->createTextField(\n 'appleWebAppTitle',\n '__apple_web_app_title__',\n '',\n ['attributes' => ['lessCompatible' => false]]\n )\n );\n\n $fieldSet->addElement(\n $this->createCheckboxField(\n 'ajaxVariantSwitch',\n '__ajax_variant_switch__',\n true,\n ['attributes' => [\n 'lessCompatible' => false,\n 'boxLabel' => Shopware()->Snippets()->getNamespace('themes/bare/backend/config')->get('ajax_variant_switch_description'),\n ]]\n )\n );\n\n $fieldSet->addElement(\n $this->createCheckboxField(\n 'asyncJavascriptLoading',\n '__async_javascript_loading__',\n true,\n ['attributes' => [\n 'lessCompatible' => false,\n 'boxLabel' => Shopware()->Snippets()->getNamespace('themes/bare/backend/config')->get('async_javascript_loading_description'),\n ]]\n )\n );\n\n $fieldSet->addElement(\n $this->createCheckboxField(\n 'ajaxEmotionLoading',\n '__ajax_emotion_loading__',\n true,\n ['attributes' => [\n 'lessCompatible' => false,\n 'boxLabel' => Shopware()->Snippets()->getNamespace('themes/bare/backend/config')->get('ajax_emotion_loading_description'),\n ]]\n )\n );\n\n $tab->addElement($fieldSet);\n\n $fieldSet = $this->createFieldSet(\n 'responsiveGlobal',\n '__advanced_settings__',\n [\n 'attributes' => [\n 'padding' => '10',\n 'margin' => '5',\n 'layout' => 'anchor',\n 'defaults' => ['anchor' => '100%', 'labelWidth' => 155],\n ],\n ]\n );\n\n $fieldSet->addElement(\n $this->createTextAreaField(\n 'additionalCssData',\n '__additional_css_data__',\n '',\n ['attributes' => ['xtype' => 'textarea', 'lessCompatible' => false], 'help' => '__additional_css_data_description__']\n )\n );\n\n $fieldSet->addElement(\n $this->createTextAreaField(\n 'additionalJsLibraries',\n '__additional_js_libraries__',\n '',\n ['attributes' => ['xtype' => 'textarea', 'lessCompatible' => false], 'help' => '__additional_js_libraries_description__']\n )\n );\n\n $tab->addElement($fieldSet);\n\n return $tab;\n }", "protected function controlleradd_ins_buildinserttabs(&$arLines)\n {\n $this->arTranslation[] = $this->sTranslatePrefix.\"instabs_1\";\n $this->arTranslation[] = $this->sTranslatePrefix.\"instabs_2\"; \n \n $arLines[] = \"\\t\\t\\$arTabs = array();\";\n $arLines[] = \"\\t\\t//\\$sUrlTab = \\$this->build_url(\\$this->sModuleName,NULL,\\\"insert\\\");\";\n $arLines[] = \"\\t\\t//\\$arTabs[\\\"insert1\\\"]=array(\\\"href\\\"=>\\$sUrlTab,\\\"innerhtml\\\"=>$this->sTranslatePrefix\".\"instabs_1);\";\n $arLines[] = \"\\t\\t//\\$sUrlTab = \\$this->build_url(\\$this->sModuleName,NULL,\\\"insert2\\\");\";\n $arLines[] = \"\\t\\t//\\$arTabs[\\\"insert2\\\"]=array(\\\"href\\\"=>\\$sUrlTab,\\\"innerhtml\\\"=>$this->sTranslatePrefix\".\"instabs_2);\";\n $arLines[] = \"\\t\\t\\$oTabs = new AppHelperHeadertabs(\\$arTabs,\\\"insert1\\\");\";\n $arLines[] = \"\\t\\treturn \\$oTabs;\"; \n }", "function cd_status_cake_page(){\n ?>\n <div class=\"wrap\">\n <h2>Client Dash Status Cake</h2>\n <?php\n cd_create_tab_page(array(\n 'tabs' => array(\n 'Status' => 'status',\n 'Settings' => 'settings',\n 'Test' => 'test'\n )\n ));\n ?>\n </div><!--.wrap-->\n <?php\n}", "public function tab_containers()\n\t{\n\t\t$html = '';\n\t\t$tabs = $this->tabs;\n\n\t\tforeach($tabs as $tab)\n\t\t{\n\t\t\tif(isset($tab['render']))\n\t\t\t{\n\t\t\t\t$tpl = $tab['render']();\n\t\t\t\tif(is_object($tpl))\n\t\t\t\t{\n\t\t\t\t\t$renderer = Kostache_Layout::factory();\n\t\t\t\t\t$renderer->set_layout('admin/user/tab');\n\t\t\t\t\t$tpl->id = $tab['id'];\n\n\t\t\t\t\tif(!isset($tpl->title))\n\t\t\t\t\t{\n\t\t\t\t\t\t$tpl->title = $tab['title'];\n\t\t\t\t\t}\n\n\t\t\t\t\t$html .= $renderer->render($tpl);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$html .= $tpl;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $html;\n\t}", "public function add_settings_tabs() {\n\t\t$install_tabs = [ 'git_updater_addons' => esc_html__( 'API Add-Ons', 'git-updater' ) ];\n\t\tadd_filter(\n\t\t\t'gu_add_settings_tabs',\n\t\t\tfunction ( $tabs ) use ( $install_tabs ) {\n\t\t\t\treturn array_merge( $tabs, $install_tabs );\n\t\t\t}\n\t\t);\n\t\tadd_filter(\n\t\t\t'gu_add_admin_page',\n\t\t\tfunction ( $tab, $action ) {\n\t\t\t\t$this->add_admin_page( $tab, $action );\n\t\t\t},\n\t\t\t10,\n\t\t\t2\n\t\t);\n\t}", "function qode_lms_single_course_tabs( $tabs = array() ) {\n\t\tglobal $post;\n\t\t\n\t\t$course_sections = get_post_meta( get_the_ID(), 'qode_course_curriculum', true );\n\t\t$member_list = get_post_meta( get_the_ID(), 'qode_course_members_meta', true );\n\t\t$forum_id = get_post_meta( get_the_ID(), 'qode_course_forum_meta', true );\n\t\t\n\t\t$show_content = $post->post_content ? true : false;\n\t\tif( qode_lms_is_elementor_installed() ){\n if ( \\Elementor\\Plugin::$instance->preview->is_preview_mode() ) {\n $show_content = true;\n }\n }\n\t\t$show_curriculum = ! empty( $course_sections );\n\t\t$show_reviews = qode_lms_show_reviews();\n\t\t$show_members = ! empty( $member_list );\n\t\t$show_forum = ! empty( $forum_id );\n\t\t\n\t\tif ( ! empty( $forum_id ) ) {\n\t\t\t$forum_link = get_permalink( $forum_id );\n\t\t}\n\t\t\n\t\t// Description tab - shows course content\n\t\tif ( $show_content ) {\n\t\t\t$tabs['description'] = array(\n\t\t\t\t'title' => __( 'Description', 'qode-lms' ),\n\t\t\t\t'priority' => 10,\n\t\t\t\t'template' => 'content'\n\t\t\t);\n\t\t}\n\t\t\n\t\t// Curriculum tab - shows course curriculum\n\t\tif ( $show_curriculum ) {\n\t\t\t$tabs['curriculum'] = array(\n\t\t\t\t'title' => __( 'Curriculum', 'qode-lms' ),\n\t\t\t\t'priority' => 20,\n\t\t\t\t'template' => 'curriculum'\n\t\t\t);\n\t\t}\n\t\t\n\t\t// Reviews tab - shows reviews\n\t\tif ( $show_reviews ) {\n\t\t\t$tabs['reviews'] = array(\n\t\t\t\t'title' => __( 'Reviews', 'qode-lms' ),\n\t\t\t\t'priority' => 30,\n\t\t\t\t'template' => 'reviews-list'\n\t\t\t);\n\t\t}\n\t\t\n\t\t// Member tab - shows members\n\t\tif ( $show_members ) {\n\t\t\t$tabs['members'] = array(\n\t\t\t\t'title' => __( 'Members', 'qode-lms' ),\n\t\t\t\t'priority' => 40,\n\t\t\t\t'template' => 'members'\n\t\t\t);\n\t\t}\n\t\t\n\t\t// Forum tab - shows forum\n\t\tif ( $show_forum ) {\n\t\t\t$tabs['forum'] = array(\n\t\t\t\t'title' => __( 'Forum', 'qode-lms' ),\n\t\t\t\t'priority' => 40,\n\t\t\t\t'template' => 'forum',\n\t\t\t\t'link' => $forum_link\n\t\t\t);\n\t\t}\n\t\t\n\t\treturn $tabs;\n\t}", "protected function controlleradd_lst_buildlisttabs(&$arLines)\n {\n $this->arTranslation[] = $this->sTranslatePrefix.\"listtabs_1\";\n $this->arTranslation[] = $this->sTranslatePrefix.\"listtabs_2\";\n \n $arLines[] = \"\\t\\t\\$arTabs = array();\";\n $arLines[] = \"\\t\\t//\\$sUrlTab = \\\"\\$this->build_url(\\$this->sModuleName,NULL,\\\"get_list\\\",\\\"id=\\\".\\$this->get_get(\\\"id_parent_foreign\\\"));\";\n $arLines[] = \"\\t\\t//\\$arTabs[\\\"list\\\"]=array(\\\"href\\\"=>\\$sUrlTab,\\\"innerhtml\\\"=>$this->sTranslatePrefix\".\"listtabs_1);\";\n $arLines[] = \"\\t\\t//\\$sUrlTab = \\$this->build_url(\\$this->sModuleName,NULL,\\\"get_list_by_foreign\\\",\\\"id_foreign=\\\".\\$this->get_get(\\\"id_parent_foreign\\\"));\";\n $arLines[] = \"\\t\\t//\\$arTabs[\\\"listbyforeign\\\"]=array(\\\"href\\\"=>\\$sUrlTab,\\\"innerhtml\\\"=>$this->sTranslatePrefix\".\"listtabs_2);\";\n $arLines[] = \"\\t\\t\\$oTabs = new AppHelperHeadertabs(\\$arTabs,\\\"list\\\");\";\n $arLines[] = \"\\t\\treturn \\$oTabs;\"; \n }", "public function woo_new_product_tab( $tabs ) {\n\n\t\t// Adds the new tab\n\n\t\t$tabs['contents'] = array(\n\t\t\t'title' => __( 'Contents', 'woocommerce' ),\n\t\t\t'priority' => 20,\n\t\t\t'callback' => array( $this, 'contents_tab_content' )\n\t\t);\n\n\t\t$tabs['authors'] = array(\n\t\t\t'title' => __( 'Author(s)', 'woocommerce' ),\n\t\t\t'priority' => 30,\n\t\t\t'callback' => array( $this, 'authors_tab_content' )\n\t\t);\n\n\t\tunset( $tabs['reviews'] ); // Remove the reviews information tab\n\n\t\t$tabs['heweb17reviews'] = array(\n\t\t\t'title' => __( 'Reviews', 'woocommerce' ),\n\t\t\t'priority' => 40,\n\t\t\t'callback' => array( $this, 'reviews_tab_content' )\n\t\t);\n\n\t\tunset( $tabs['additional_information'] ); // Remove the additional information tab\n\n\t\treturn $tabs;\n\n\t}", "public function createTabsHistorique()\n {\n $tab = new Tab();\n $tab->active = 1;\n $names = array(1 => 'Historique CA', 'Historique CA');\n foreach (Language::getLanguages() as $language) {\n $tab->name[$language['id_lang']] = isset($names[$language['id_lang']])\n ? $names[$language['id_lang']] : $names[1];\n }\n $tab->class_name = 'AdminHistorique';\n $tab->module = $this->name;\n $tab->id_parent = Tab::getIdFromClassName('AdminParentStats');\n\n return (bool)$tab->add();\n }", "function render_wizard() {\n\t\t$lines = array();\n\n\t\t$action = explode(':', $this->wizard->modData['wizAction']);\n\t\tif ($action[0] == 'edit') {\n\t\t\t$this->regNewEntry($this->sectionID, $action[1]);\n\t\t\t$lines = $this->catHeaderLines(\n\t\t\t\t$lines, $this->sectionID, $this->wizard->options[$this->sectionID], '&nbsp;', $action[1]\n\t\t\t);\n\t\t\t$piConf = $this->wizard->wizArray[$this->sectionID][$action[1]];\n\t\t\t$ffPrefix = '[' . $this->sectionID . '][' . $action[1] . ']';\n\n\t\t\t// Unique table name:\n\t\t\t$table_suffixes = array();\n\t\t\tif (is_array($this->wizard->wizArray[$this->sectionID])) {\n\t\t\t\tforeach ($this->wizard->wizArray[$this->sectionID] as $kk => $vv) {\n\t\t\t\t\tif (!strcmp($action[1], $kk)) {\n\t\t\t\t\t\tif (count($table_suffixes)\n\t\t\t\t\t\t\t&& t3lib_div::inList(\n\t\t\t\t\t\t\t\timplode(',', $table_suffixes), trim($vv['tablename']) . 'Z'\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t$piConf['tablename'] .= $kk;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t$table_suffixes[] = trim($vv['tablename']) . 'Z';\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\t// Enter title of the table\n\t\t\t$subContent = '<strong>Tablename:</strong><BR>' .\n\t\t\t\t$this->returnName($this->wizard->extKey, 'tables') . '_' . $this->renderStringBox(\n\t\t\t\t\t$ffPrefix . '[tablename]', trim($piConf['tablename'])\n\t\t\t\t) .\n\t\t\t\t'<BR><strong>Notice:</strong> Use characters a-z0-9 only. Only lowercase, no spaces.<BR>\n\t\t\t\tThis becomes the table name in the database. ';\n\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\n\n\t\t\t// Enter title of the table\n\t\t\t$subContent = '<strong>Title of the table:</strong><BR>' .\n\t\t\t\t$this->renderStringBox_lang('title', $ffPrefix, $piConf);\n\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\n\n\t\t\t// Fields - overview\n\t\t\t$c = array(0);\n\t\t\t$this->usedNames = array();\n\t\t\tif (is_array($piConf['fields'])) {\n\t\t\t\t$piConf['fields'] = $this->cleanFieldsAndDoCommands(\n\t\t\t\t\t$piConf['fields'], $this->sectionID, $action[1],\n\t\t\t\t\t$piConf['which_table'] ? $piConf['which_table'] : ''\n\t\t\t\t);\n\n\t\t\t\t// Do it for real...\n\t\t\t\t$lines[] = '<tr' . $this->bgCol(1) . '><td><strong> Fields Overview </strong></td></tr>';\n\t\t\t\t$lines[] = '<tr><td></td></tr>';\n\n\t\t\t\t$subContent = '<tr ' . $this->bgCol(2) . '>\n\t\t\t\t\t<td><strong>Name</strong></td>\n\t\t\t\t\t<td><strong>Title</strong></td>\n\t\t\t\t\t<td><strong>Type</strong></td>\n\t\t\t\t\t<td><strong>Exclude?</strong></td>\n\t\t\t\t\t<td><strong>Details</strong></td>\n\t\t\t\t</tr>';\n\t\t\t\tforeach ($piConf['fields'] as $k => $v) {\n\t\t\t\t\t$c[] = $k;\n\t\t\t\t\t$subContent .= $this->renderFieldOverview($ffPrefix . '[fields][' . $k . ']', $v);\n\t\t\t\t}\n\t\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td><table>' . $this->fw($subContent) . '</table></td></tr>';\n\t\t\t}\n\n\t\t\t$lines[] = '<tr' . $this->bgCol(1) . '><td><strong> Edit Fields </strong></td></tr>';\n\t\t\t$lines[] = '<tr><td></td></tr>';\n\n\t\t\t$subContent = '';\n\t\t\t$subContent .=\n\t\t\t\t$this->renderCheckBox($ffPrefix . '[add_deleted]', $piConf['add_deleted'], 1) . 'Add \"Deleted\" field '\n\t\t\t\t. $this->whatIsThis(\n\t\t\t\t\t'Whole system: If a table has a deleted column, records are never really deleted, just \"marked deleted\" . Thus deleted records can actually be restored by clearing a deleted-flag later. Notice that all attached files are also not deleted from the server, so if you expect the table to hold some heavy size uploads, maybe you should not set this...'\n\t\t\t\t) . '<BR>';\n\t\t\t$subContent .=\n\t\t\t\t$this->renderCheckBox($ffPrefix . '[add_hidden]', $piConf['add_hidden'], 1) . 'Add \"Hidden\" flag '\n\t\t\t\t. $this->whatIsThis(\n\t\t\t\t\t'Frontend: The \"Hidden\" flag will prevent the record from being displayed on the frontend.'\n\t\t\t\t) . '<BR>' . $this->resImg('t_flag_hidden.png', 'hspace=20', '', '<BR><BR>');\n\t\t\t$subContent .=\n\t\t\t\t$this->renderCheckBox($ffPrefix . '[add_starttime]', $piConf['add_starttime']) . 'Add \"Starttime\" '\n\t\t\t\t. $this->whatIsThis(\n\t\t\t\t\t'Frontend: If a \"Starttime\" is set, the record will not be visible on the website, before that date arrives.'\n\t\t\t\t) . '<BR>' . $this->resImg('t_flag_starttime.png', 'hspace=20', '', '<BR><BR>');\n\t\t\t$subContent .= $this->renderCheckBox($ffPrefix . '[add_endtime]', $piConf['add_endtime']) . 'Add \"Endtime\" '\n\t\t\t\t. $this->whatIsThis(\n\t\t\t\t\t'Frontend: If a \"Endtime\" is set, the record will be hidden from that date and into the future.'\n\t\t\t\t) . '<BR>' . $this->resImg('t_flag_endtime.png', 'hspace=20', '', '<BR><BR>');\n\t\t\t$subContent .=\n\t\t\t\t$this->renderCheckBox($ffPrefix . '[add_access]', $piConf['add_access']) . 'Add \"Access group\" '\n\t\t\t\t. $this->whatIsThis(\n\t\t\t\t\t'Frontend: If a frontend user group is set for a record, only frontend users that are members of that group will be able to see the record.'\n\t\t\t\t) . '<BR>' . $this->resImg('t_flag_access.png', 'hspace=20', '', '<BR><BR>');\n\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\n\t\t\t// Sorting\n\t\t\t$optValues = array(\n\t\t\t\t'crdate' => '[crdate]',\n\t\t\t\t'cruser_id' => '[cruser_id]',\n\t\t\t\t'tstamp' => '[tstamp]',\n\t\t\t);\n\t\t\t$subContent = '';\n\t\t\t$subContent .= $this->renderCheckBox($ffPrefix . '[localization]', $piConf['localization'])\n\t\t\t\t. 'Enabled localization features' . $this->whatIsThis(\n\t\t\t\t\t'If set, the records will have a selector box for language and a reference field which can point back to the original default translation for the record. These features are part of the internal framework for localization.'\n\t\t\t\t) . '<BR>';\n\t\t\t$subContent .=\n\t\t\t\t$this->renderCheckBox($ffPrefix . '[versioning]', $piConf['versioning']) . 'Enable versioning '\n\t\t\t\t. $this->whatIsThis(\n\t\t\t\t\t'If set, you will be able to versionize records from this table. Highly recommended if the records are passed around in a workflow.'\n\t\t\t\t) . '<BR>';\n\t\t\t$subContent .=\n\t\t\t\t$this->renderCheckBox($ffPrefix . '[sorting]', $piConf['sorting']) . 'Manual ordering of records '\n\t\t\t\t. $this->whatIsThis(\n\t\t\t\t\t'If set, the records can be moved up and down relative to each other in the backend. Just like Content Elements. Otherwise they are sorted automatically by any field you specify'\n\t\t\t\t) . '<BR>';\n\t\t\t$subContent .= $this->textSetup(\n\t\t\t\t'', 'If \"Manual ordering\" is not set, order the table by this field:<BR>' .\n\t\t\t\t$this->renderSelectBox(\n\t\t\t\t\t$ffPrefix . '[sorting_field]', $piConf['sorting_field'],\n\t\t\t\t\t$this->currentFields($optValues, $piConf['fields'])\n\t\t\t\t) . '<BR>' .\n\t\t\t\t$this->renderCheckBox($ffPrefix . '[sorting_desc]', $piConf['sorting_desc']) . ' Descending'\n\t\t\t);\n\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\n\t\t\t// Type field\n\t\t\t$optValues = array(\n\t\t\t\t'0' => '[none]',\n\t\t\t);\n\t\t\t$subContent = '<strong>\"Type-field\", if any:<BR></strong>' .\n\t\t\t\t$this->renderSelectBox(\n\t\t\t\t\t$ffPrefix . '[type_field]', $piConf['type_field'],\n\t\t\t\t\t$this->currentFields($optValues, $piConf['fields'])\n\t\t\t\t) .\n\t\t\t\t$this->whatIsThis(\n\t\t\t\t\t'A \"type-field\" is the field in the table which determines how the form is rendered in the backend, eg. which fields are shown under which circumstances. For instance the Content Element table \"tt_content\" has a type-field, CType. The value of this field determines if the editing form shows the bodytext field as is the case when the type is \"Text\" or if also the image-field should be shown as when the type is \"Text w/Image\"'\n\t\t\t\t);\n\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\n\t\t\t// Header field\n\t\t\t$optValues = array(\n\t\t\t\t'0' => '[none]',\n\t\t\t);\n\t\t\t$subContent = '<strong>Label-field:<BR></strong>' .\n\t\t\t\t$this->renderSelectBox(\n\t\t\t\t\t$ffPrefix . '[header_field]', $piConf['header_field'],\n\t\t\t\t\t$this->currentFields($optValues, $piConf['fields'])\n\t\t\t\t) .\n\t\t\t\t$this->whatIsThis('A \"label-field\" is the field used as record title in the backend.');\n\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\n\t\t\t// Icon\n\t\t\t$optValues = array(\n\t\t\t\t'default.gif' => 'Default (white)',\n\t\t\t\t'default_black.gif' => 'Black',\n\t\t\t\t'default_gray4.gif' => 'Gray',\n\t\t\t\t'default_blue.gif' => 'Blue',\n\t\t\t\t'default_green.gif' => 'Green',\n\t\t\t\t'default_red.gif' => 'Red',\n\t\t\t\t'default_yellow.gif' => 'Yellow',\n\t\t\t\t'default_purple.gif' => 'Purple',\n\t\t\t);\n\n\t\t\t$subContent = $this->renderSelectBox($ffPrefix . '[defIcon]', $piConf['defIcon'], $optValues)\n\t\t\t\t. ' Default icon ' . $this->whatIsThis(\n\t\t\t\t\t'All tables have at least one associated icon. Select which default icon you wish. You can always substitute the file with another.'\n\t\t\t\t);\n\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\n\t\t\t// Allowed on pages\n\t\t\t$subContent = '<strong>Allowed on pages:<BR></strong>' .\n\t\t\t\t$this->renderCheckBox(\n\t\t\t\t\t$ffPrefix . '[allow_on_pages]', $piConf['allow_on_pages']\n\t\t\t\t) . ' Allow records from this table to be created on regular pages.';\n\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\n\t\t\t// Allowed in \"Insert Records\"\n\t\t\t$subContent = '<strong>Allowed in \"Insert Records\" field in content elements:<BR></strong>' .\n\t\t\t\t$this->renderCheckBox(\n\t\t\t\t\t$ffPrefix . '[allow_ce_insert_records]', $piConf['allow_ce_insert_records']\n\t\t\t\t) . ' Allow records from this table to be linked to by content elements.';\n\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\n\t\t\t// Add new button\n\t\t\t$subContent = '<strong>Add \"Save and new\" button in forms:<BR></strong>' .\n\t\t\t\t$this->renderCheckBox(\n\t\t\t\t\t$ffPrefix . '[save_and_new]', $piConf['save_and_new']\n\t\t\t\t) . ' Will add an additional save-button to forms by which you can save the item and instantly create the next.';\n\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\n\n\t\t\t$subContent = '<strong>Notice on fieldnames:<BR></strong>' .\n\t\t\t\t'Don\\'t use fieldnames from this list of reserved names/words: <BR>\n\t\t\t\t<blockquote><em>' . implode(', ', $this->wizard->reservedWords) . '</em></blockquote>';\n\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\n\t\t\t// PRESETS:\n\t\t\t$selPresetBox = $this->presetBox($piConf[\"fields\"]);\n\n\t\t\t// Fields\n\t\t\t$c = array(0);\n\t\t\t$this->usedNames = array();\n\t\t\tif (is_array($piConf['fields'])) {\n\n\t\t\t\t// Do it for real...\n\t\t\t\tforeach ($piConf['fields'] as $k => $v) {\n\t\t\t\t\t$c[] = $k;\n\t\t\t\t\t$subContent = $this->renderField($ffPrefix . '[fields][' . $k . ']', $v);\n\t\t\t\t\t$lines[] = '<tr' . $this->bgCol(2) . '><td>' . $this->fw(\n\t\t\t\t\t\t\t'<strong>FIELD:</strong> <em>' . $v['fieldname'] . '</em>'\n\t\t\t\t\t\t) . '</td></tr>';\n\t\t\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// New field:\n\t\t\t$k = max($c) + 1;\n\t\t\t$v = array();\n\t\t\t$lines[] = '<tr' . $this->bgCol(2) . '><td>' . $this->fw('<strong>NEW FIELD:</strong>') . '</td></tr>';\n\t\t\t$subContent = $this->renderField($ffPrefix . '[fields][' . $k . ']', $v, 1);\n\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\n\n\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw(\n\t\t\t\t\t'<BR><BR>Load preset fields: <BR>' . $selPresetBox\n\t\t\t\t) . '</td></tr>';\n\t\t}\n\n\t\t/* HOOK: Place a hook here, so additional output can be integrated */\n\t\tif (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['kickstarter']['add_cat_tables'])) {\n\t\t\tforeach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['kickstarter']['add_cat_tables'] as $_funcRef) {\n\t\t\t\t$lines = t3lib_div::callUserFunction($_funcRef, $lines, $this);\n\t\t\t}\n\t\t}\n\n\t\t$content = '<table border=0 cellpadding=2 cellspacing=2>' . implode('', $lines) . '</table>';\n\n\t\treturn $content;\n\t}", "protected function _register_controls() {\n /*-----------------------------------------------------------------------------------*/\n /* Content TAB\n /*-----------------------------------------------------------------------------------*/\n $this->start_controls_section(\n 'title_section',\n array(\n 'label' => __('APR Heading', 'apr-core' ),\n )\n );\n /* Heading 1*/\n $this->add_control(\n 'title',\n array(\n 'label' => __( 'Title', 'apr-core' ),\n 'type' => Controls_Manager::TEXTAREA,\n 'dynamic' => array(\n 'active' => true\n ),\n 'placeholder' => __( 'Enter your title', 'apr-core' ),\n 'default' => __( 'Enter your title', 'apr-core' ),\n 'label_block' => true,\n )\n );\n $this->add_control(\n 'heading_size',\n array(\n 'label' => __( 'HTML Tag', 'apr-core' ),\n 'type' => Controls_Manager::SELECT,\n 'options' => array(\n 'h1' => __( 'H1', 'apr-core' ),\n 'h2' => __( 'H2', 'apr-core' ),\n 'h3' => __( 'H3', 'apr-core' ),\n 'h4' => __( 'H4', 'apr-core' ),\n 'h5' => __( 'H5', 'apr-core' ),\n 'p' => __( 'p', 'apr-core' ),\n ),\n 'default' => 'h3',\n )\n );\n $this->add_control(\n 'link',\n [\n 'label' => __( 'Link', 'elementor' ),\n 'type' => Controls_Manager::URL,\n 'dynamic' => [\n 'active' => true,\n ],\n 'default' => [\n 'url' => '',\n ],\n 'separator' => 'before',\n ]\n );\n $this->add_responsive_control(\n 'alignment',\n array(\n 'label' => __('Alignment', 'apr-core'),\n 'type' => Controls_Manager::CHOOSE,\n 'default' => 'left',\n 'options' => array(\n 'left' => array(\n 'title' => __( 'Left', 'apr-core' ),\n 'icon' => 'fa fa-align-left',\n ),\n 'center' => array(\n 'title' => __( 'Center', 'apr-core' ),\n 'icon' => 'fa fa-align-center',\n ),\n 'right' => array(\n 'title' => __( 'Right', 'apr-core' ),\n 'icon' => 'fa fa-align-right',\n )\n ),\n )\n );\n $this->add_control(\n 'description',\n array(\n 'label' => __( 'Description', 'apr-core' ),\n 'type' => Controls_Manager::TEXTAREA,\n 'dynamic' => array(\n 'active' \t=> true\n ),\n )\n );\n $this->add_control(\n 'description_position',\n [\n 'label' => __( 'Description Position', 'apr-core' ),\n 'type' => Controls_Manager::SELECT,\n 'default' => 'bottom',\n 'options' => [\n 'aside' => __( 'Aside', 'apr-core' ),\n 'bottom' => __( 'Bottom', 'apr-core' ),\n ],\n ]\n );\n $this->add_control(\n 'list_divider',\n [\n 'label' => __( 'Divider', 'apr-core' ),\n 'type' => Controls_Manager::SWITCHER,\n 'default' => 'no',\n 'separator' => 'before',\n ]\n );\n\n $this->add_control(\n 'divider_position',\n [\n 'label' => __( 'Position', 'apr-core' ),\n 'type' => Controls_Manager::SELECT,\n 'options' => [\n 'top' => __( 'Top', 'apr-core' ),\n 'bottom' => __( 'Bottom', 'apr-core' )\n ],\n 'default' => 'bottom',\n 'condition' => [\n 'list_divider' => 'yes',\n ]\n ]\n );\n\n $this->add_control(\n 'divider_color',\n [\n 'label' => __( 'Color', 'apr-core' ),\n 'type' => Controls_Manager::COLOR,\n 'default' => '',\n 'scheme' => [\n 'type' => Scheme_Color::get_type(),\n 'value' => Scheme_Color::COLOR_3,\n ],\n 'condition' => [\n 'list_divider' => 'yes',\n ],\n 'selectors' => [\n '{{WRAPPER}} .heading-title:before' => 'background-color: {{VALUE}};',\n ],\n ]\n );\n $this->add_control(\n 'divider_color_hover',\n [\n 'label' => __( 'Color Hover', 'apr-core' ),\n 'type' => Controls_Manager::COLOR,\n 'default' => '',\n 'scheme' => [\n 'type' => Scheme_Color::get_type(),\n 'value' => Scheme_Color::COLOR_3,\n ],\n 'condition' => [\n 'list_divider' => 'yes',\n ],\n 'selectors' => [\n '{{WRAPPER}} .heading-title:hover:before' => 'background-color: {{VALUE}};',\n ],\n ]\n );\n $this->add_responsive_control(\n 'divider_top',\n [\n 'label' => __( 'Top Space', 'apr-core' ),\n 'type' => Controls_Manager::SLIDER,\n 'default' => [\n 'size' => '',\n 'unit' => 'px',\n ],\n 'range' => [\n 'px' => [\n 'min' => 0,\n 'max' => 1000,\n ],\n ],\n 'size_units' => [ 'px' ],\n 'condition' => [\n 'list_divider' => 'yes',\n ],\n 'selectors' => [\n '{{WRAPPER}} .heading-title:before' => 'top: {{SIZE}}{{UNIT}};',\n ],\n ]\n );\n\n $this->add_responsive_control(\n 'divider_left',\n [\n 'label' => __( 'Left Space', 'apr-core' ),\n 'type' => Controls_Manager::SLIDER,\n 'default' => [\n 'size' => '',\n 'unit' => 'px',\n ],\n 'range' => [\n 'px' => [\n 'min' => 0,\n 'max' => 1000,\n ],\n ],\n 'size_units' => [ 'px' ],\n 'condition' => [\n 'list_divider' => 'yes',\n ],\n 'selectors' => [\n '{{WRAPPER}} .heading-title:before' => 'left: {{SIZE}}{{UNIT}};',\n ],\n ]\n );\n\n $this->add_responsive_control(\n 'divider_weight',\n [\n 'label' => __( 'Height', 'apr-core' ),\n 'type' => Controls_Manager::SLIDER,\n 'default' => [\n 'size' => 1,\n 'unit' => 'px',\n ],\n 'range' => [\n 'px' => [\n 'min' => 0,\n 'max' => 1000,\n ],\n '%' => [\n 'min' => 0,\n 'max' => 100,\n ],\n ],\n 'size_units' => [ '%', 'px' ],\n 'condition' => [\n 'list_divider' => 'yes',\n ],\n 'selectors' => [\n '{{WRAPPER}} .heading-title:before' => 'height: {{SIZE}}{{UNIT}};',\n ],\n ]\n );\n\n $this->add_responsive_control(\n 'divider_width',\n [\n 'label' => __( 'Width', 'apr-core' ),\n 'type' => Controls_Manager::SLIDER,\n 'condition' => [\n 'list_divider' => 'yes',\n ],\n 'default' => [\n 'size' => 100,\n 'unit' => 'px',\n ],\n 'range' => [\n 'px' => [\n 'min' => 0,\n 'max' => 1000,\n ],\n '%' => [\n 'min' => 0,\n 'max' => 100,\n ],\n ],\n 'size_units' => [ '%', 'px' ],\n 'selectors' => [\n '{{WRAPPER}} .heading-title:before' => 'width: {{SIZE}}{{UNIT}};',\n ],\n ]\n );\n \n $this->end_controls_section();\n /*-----------------------------------------------------------------------------------*/\n /* Style TAB\n /*-----------------------------------------------------------------------------------*/\n $this->start_controls_section(\n 'title_style_section',\n array(\n 'label' => __( 'Color', 'apr-core' ),\n 'tab' => Controls_Manager::TAB_STYLE,\n )\n );\n $this->add_control(\n 'title_color',\n [\n 'label' => __( 'Title Color', 'apr-core' ),\n 'type' => Controls_Manager::COLOR,\n 'scheme' => [\n 'type' => Scheme_Color::get_type(),\n 'value' => Scheme_Color::COLOR_1,\n ],\n 'selectors' => [\n // Stronger selector to avoid section style from overwriting\n '{{WRAPPER}} .heading-modern .heading-title,\n {{WRAPPER}} .heading-modern .heading-title a' => 'color: {{VALUE}};',\n ],\n ]\n );\n $this->add_control(\n 'desc_color',\n [\n 'label' \t=> __( 'Description color', 'apr-core' ),\n 'type' \t\t=> Controls_Manager::COLOR,\n 'scheme' \t=> [\n 'type' \t\t=> Scheme_Color::get_type(),\n 'value' \t=> Scheme_Color::COLOR_1,\n ],\n 'selectors' => [\n '{{WRAPPER}} .heading-modern .description' => 'color: {{VALUE}};',\n ],\n ]\n );\n $this->end_controls_section();\n $this->start_controls_section(\n 'desc_style',\n array(\n 'label' => __( 'Typography', 'apr-core' ),\n 'tab' => Controls_Manager::TAB_STYLE,\n )\n );\n\n $this->add_group_control(\n Group_Control_Typography::get_type(),\n [\n 'name' \t\t=> 'title_typo',\n 'label' \t=> __( 'Title', 'apr-core' ),\n 'selector' => '{{WRAPPER}} .heading-modern .heading-title',\n ]\n );\n $this->add_responsive_control(\n 'title_width',\n array(\n 'label' => __('Max width Title','apr-core' ),\n 'type' => Controls_Manager::SLIDER,\n 'size_units' => array('px','%'),\n 'range' => array(\n '%' => array(\n 'min' => 1,\n 'max' => 100,\n ),\n 'px' => array(\n 'min' => 1,\n 'max' => 1600,\n 'step' => 5\n )\n ),\n 'selectors' => array(\n '{{WRAPPER}} .heading-modern .heading-title' => 'max-width:{{SIZE}}{{UNIT}};'\n ),\n )\n );\n $this->add_group_control(\n Group_Control_Typography::get_type(),\n [\n 'name' \t\t=> 'desc_typo',\n 'label' \t=> __( 'Description', 'apr-core' ),\n 'scheme' => Scheme_Typography::TYPOGRAPHY_1,\n 'selector' \t=> '{{WRAPPER}} .heading-modern .description',\n ]\n );\n $this->add_responsive_control(\n 'desc_width',\n array(\n 'label' => __('Max width Description','apr-core' ),\n 'type' => Controls_Manager::SLIDER,\n 'size_units' => array('px','%'),\n 'range' => array(\n '%' => array(\n 'min' => 1,\n 'max' => 100,\n ),\n 'px' => array(\n 'min' => 1,\n 'max' => 1600,\n 'step' => 5\n )\n ),\n 'selectors' => array(\n '{{WRAPPER}} .heading-modern .description' => 'max-width:{{SIZE}}{{UNIT}};'\n ),\n )\n );\n $this->add_responsive_control(\n 'title_margin',\n array(\n 'label' => __( 'Margin Title', 'apr-core' ),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => [ 'px', '%' ],\n 'allowed_dimensions' => 'vertical',\n 'placeholder' => [\n 'top' => '',\n 'right' => 'auto',\n 'bottom' => '',\n 'left' => 'auto',\n ],\n 'selectors' => [\n '{{WRAPPER}} .heading-modern .heading-title' => 'margin-top: {{TOP}}{{UNIT}}; margin-bottom: {{BOTTOM}}{{UNIT}};',\n ],\n )\n );\n\n $this->add_responsive_control(\n 'title_padding',\n [\n 'label' => __( 'Padding Title', 'apr-core' ),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => [ 'px', 'em', '%' ],\n 'selectors' => [\n '{{WRAPPER}} .heading-modern .heading-title' => 'padding:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'\n ],\n ]\n );\n $this->add_responsive_control(\n 'desc_margin',\n array(\n 'label' => __( 'Margin Description', 'apr-core' ),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => [ 'px', '%' ],\n 'allowed_dimensions' => 'vertical',\n 'placeholder' => [\n 'top' => '',\n 'right' => 'auto',\n 'bottom' => '',\n 'left' => 'auto',\n ],\n 'selectors' => [\n '{{WRAPPER}} .heading-modern .description' => 'margin-top: {{TOP}}{{UNIT}}; margin-bottom: {{BOTTOM}}{{UNIT}};',\n ],\n )\n );\n $this->add_responsive_control(\n 'description_padding',\n [\n 'label' => __( 'Padding Description', 'apr-core' ),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => [ 'px', 'em', '%' ],\n 'selectors' => [\n '{{WRAPPER}} .heading-modern .description' => 'padding:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'\n ],\n ]\n );\n $this->add_control(\n 'title_color_hover',\n [\n 'label' => __( 'Title Color Hover', 'apr-core' ),\n 'type' => Controls_Manager::COLOR,\n 'scheme' => [\n 'type' => Scheme_Color::get_type(),\n 'value' => Scheme_Color::COLOR_1,\n ],\n 'selectors' => [\n // Stronger selector to avoid section style from overwriting\n '{{WRAPPER}} .heading-modern .heading-title:hover,\n {{WRAPPER}} .heading-modern .heading-title a:hover' => 'color: {{VALUE}};',\n ],\n ]\n );\n $this->add_control(\n 'desc_color_hover',\n [\n 'label' => __( 'Description Color Hover', 'apr-core' ),\n 'type' => Controls_Manager::COLOR,\n 'scheme' => [\n 'type' => Scheme_Color::get_type(),\n 'value' => Scheme_Color::COLOR_1,\n ],\n 'selectors' => [\n // Stronger selector to avoid section style from overwriting\n '{{WRAPPER}} .heading-modern .description:hover' => 'color: {{VALUE}};',\n ],\n ]\n );\n $this->end_controls_section();\n }", "function dw_index_tab_fields($cf)\n{\n global $post;\n $tab_num = get_post_meta($post->ID, 'guidance_tabs', true);\n if (is_numeric($tab_num)) {\n for ($t = 0; $t < $tab_num; $t++) {\n $cf[] = 'guidance_tabs_' . $t . '_tab_title';\n\n $section_num = get_post_meta($post->ID, 'guidance_tabs_'.$t.'_sections', true);\n\n if (is_numeric($section_num)) {\n for ($s = 0; $s < $section_num; $s++) {\n $cf[] = 'guidance_tabs_' . $t . '_sections_' . $s . '_section_title';\n $cf[] = 'guidance_tabs_' . $t . '_sections_' . $s . '_section_html_content';\n }\n }\n\n $links_num = get_post_meta($post->ID, 'guidance_tabs_'.$t.'_links', true);\n\n if (is_numeric($links_num)) {\n for ($l = 0; $l < $links_num; $l++) {\n $cf[] = 'guidance_tabs_' . $t . '_links_' . $l . '_link_title';\n }\n }\n }\n }\n\n return $cf;\n}", "function bd_custom_tabs_Widget(){\n\n\t\t// Widget settings\n\t\t$ops = array('classname' => 'widget_custom_tabs', 'description' => __('3 tabs: last posts, popular posts, and last comments', 'wolf'));\n\n\t\t/* Create the widget. */\n\t\tparent::__construct( 'widget_custom_tabs', __('Custom tabs', 'wolf'), $ops );\n\t\t\n\t}", "private function include_tabs() {\n\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/tabs.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/general.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/backup.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/ssl.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/cache.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/sftp.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/clone-site.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/copy-to-existing-site.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/site-sync.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/crons.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/php-options.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/change-domain.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/misc.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/tweaks.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/tools.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/theme-and-plugin-updates.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/phpmyadmin.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/6g_firewall.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/7g_firewall.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/statistics.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/logs.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/redirect-rules.php';\n\n\t\tif ( defined( 'WPCD_SHOW_SITE_USERS_TAB' ) && WPCD_SHOW_SITE_USERS_TAB ) {\n\t\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/site-system-users.php';\n\t\t}\n\n\t\t/**\n\t\t * Need to add new tabs or add data to existing tabs from an add-on?\n\t\t * Then this action hook MUST be used! Otherwise, weird\n\t\t * stuff will happen and you will not know why!\n\t\t */\n\t\tdo_action( 'wpcd_wpapp_include_app_tabs' );\n\n\t}", "public function describeTabs();", "function woocommerce_settings_tabs_array( $settings_tabs ) {\n $settings_tabs[$this->id] = __('GWP Custom Tabs','GWP');\n return $settings_tabs;\n }", "private function createTabsProspects()\n {\n $tab = new Tab();\n $tab->active = 1;\n $names = array(1 => 'Prospects', 'Prospects');\n foreach (Language::getLanguages() as $language) {\n $tab->name[$language['id_lang']] = isset($names[$language['id_lang']])\n ? $names[$language['id_lang']] : $names[1];\n }\n $tab->class_name = 'AdminProspects';\n $tab->module = $this->name;\n $tab->id_parent = Tab::getIdFromClassName('AdminCustomers');\n\n return (bool)$tab->add();\n }", "public function add_tab( $tabs ) {\n\t$tabs['account']['Billing'] = 'billing';\n\treturn $tabs;\n\t}", "private function createButtonsTab()\n {\n $tab = $this->createTab(\n 'buttons_tab',\n '__responsive_tab_buttons__',\n [\n 'attributes' => [\n 'autoScroll' => true,\n ],\n ]\n );\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 90]);\n $fieldSetButtons = $this->createFieldSet(\n 'buttons_fieldset',\n '__responsive_tab_buttons_fieldset_global__',\n ['attributes' => $attributes]\n );\n\n $fieldSetButtons->addElement(\n $this->createTextField(\n 'btn-font-size',\n '@btn-font-size',\n $this->themeFontDefaults['btn-font-size']\n )\n );\n $fieldSetButtons->addElement(\n $this->createTextField(\n 'btn-icon-size',\n '@btn-icon-size',\n $this->themeFontDefaults['btn-icon-size']\n )\n );\n\n $tab->addElement($fieldSetButtons);\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 200]);\n $fieldSetDefaultButtons = $this->createFieldSet(\n 'buttons_default_fieldset',\n '__responsive_tab_buttons_fieldset_default__',\n ['attributes' => $attributes]\n );\n\n $fieldSetDefaultButtons->addElement(\n $this->createColorPickerField(\n 'btn-default-top-bg',\n '@btn-default-top-bg',\n $this->themeColorDefaults['btn-default-top-bg']\n )\n );\n $fieldSetDefaultButtons->addElement(\n $this->createColorPickerField(\n 'btn-default-bottom-bg',\n '@btn-default-bottom-bg',\n $this->themeColorDefaults['btn-default-bottom-bg']\n )\n );\n $fieldSetDefaultButtons->addElement(\n $this->createColorPickerField(\n 'btn-default-hover-bg',\n '@btn-default-hover-bg',\n $this->themeColorDefaults['btn-default-hover-bg']\n )\n );\n $fieldSetDefaultButtons->addElement(\n $this->createColorPickerField(\n 'btn-default-text-color',\n '@btn-default-text-color',\n $this->themeColorDefaults['btn-default-text-color']\n )\n );\n $fieldSetDefaultButtons->addElement(\n $this->createColorPickerField(\n 'btn-default-hover-text-color',\n '@btn-default-hover-text-color',\n $this->themeColorDefaults['btn-default-hover-text-color']\n )\n );\n $fieldSetDefaultButtons->addElement(\n $this->createColorPickerField(\n 'btn-default-border-color',\n '@btn-default-border-color',\n $this->themeColorDefaults['btn-default-border-color']\n )\n );\n $fieldSetDefaultButtons->addElement(\n $this->createColorPickerField(\n 'btn-default-hover-border-color',\n '@btn-default-hover-border-color',\n $this->themeColorDefaults['btn-default-hover-border-color']\n )\n );\n\n $tab->addElement($fieldSetDefaultButtons);\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 170]);\n $fieldSetPrimaryButtons = $this->createFieldSet(\n 'buttons_primary_fieldset',\n '__responsive_tab_buttons_fieldset_primary__',\n ['attributes' => $attributes]\n );\n\n $fieldSetPrimaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-primary-top-bg',\n '@btn-primary-top-bg',\n $this->themeColorDefaults['btn-primary-top-bg']\n )\n );\n $fieldSetPrimaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-primary-bottom-bg',\n '@btn-primary-bottom-bg',\n $this->themeColorDefaults['btn-primary-bottom-bg']\n )\n );\n $fieldSetPrimaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-primary-hover-bg',\n '@btn-primary-hover-bg',\n $this->themeColorDefaults['btn-primary-hover-bg']\n )\n );\n $fieldSetPrimaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-primary-text-color',\n '@btn-primary-text-color',\n $this->themeColorDefaults['btn-primary-text-color']\n )\n );\n $fieldSetPrimaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-primary-hover-text-color',\n '@btn-primary-hover-text-color',\n $this->themeColorDefaults['btn-primary-hover-text-color']\n )\n );\n\n $tab->addElement($fieldSetPrimaryButtons);\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 170]);\n $fieldSetSecondaryButtons = $this->createFieldSet(\n 'buttons_secondary_fieldset',\n '__responsive_tab_buttons_fieldset_secondary__',\n ['attributes' => $attributes]\n );\n\n $fieldSetSecondaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-secondary-top-bg',\n '@btn-secondary-top-bg',\n $this->themeColorDefaults['btn-secondary-top-bg']\n )\n );\n $fieldSetSecondaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-secondary-bottom-bg',\n '@btn-secondary-bottom-bg',\n $this->themeColorDefaults['btn-secondary-bottom-bg']\n )\n );\n $fieldSetSecondaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-secondary-hover-bg',\n '@btn-secondary-hover-bg',\n $this->themeColorDefaults['btn-secondary-hover-bg']\n )\n );\n $fieldSetSecondaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-secondary-text-color',\n '@btn-secondary-text-color',\n $this->themeColorDefaults['btn-secondary-text-color']\n )\n );\n $fieldSetSecondaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-secondary-hover-text-color',\n '@btn-secondary-hover-text-color',\n $this->themeColorDefaults['btn-secondary-hover-text-color']\n )\n );\n\n $tab->addElement($fieldSetSecondaryButtons);\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 170]);\n $fieldSetPanels = $this->createFieldSet(\n 'panels_fieldset',\n '__responsive_tab_buttons_fieldset_panels__',\n ['attributes' => $attributes]\n );\n\n $fieldSetPanels->addElement(\n $this->createColorPickerField(\n 'panel-header-bg',\n '@panel-header-bg',\n $this->themeColorDefaults['panel-header-bg']\n )\n );\n $fieldSetPanels->addElement(\n $this->createTextField(\n 'panel-header-font-size',\n '@panel-header-font-size',\n $this->themeFontDefaults['panel-header-font-size']\n )\n );\n $fieldSetPanels->addElement(\n $this->createColorPickerField(\n 'panel-header-color',\n '@panel-header-color',\n $this->themeColorDefaults['panel-header-color']\n )\n );\n $fieldSetPanels->addElement(\n $this->createColorPickerField(\n 'panel-border',\n '@panel-border',\n $this->themeColorDefaults['panel-border']\n )\n );\n $fieldSetPanels->addElement(\n $this->createColorPickerField(\n 'panel-bg',\n '@panel-bg',\n $this->themeColorDefaults['panel-bg']\n )\n );\n\n $tab->addElement($fieldSetPanels);\n\n return $tab;\n }", "private function get_inputs_output_html() {\n\t\t$i = 0;\n\t\t$j = 0;\n\n\t\t$addon_title = $this->addon_raw['title'];\n\t\t$fieldsets = array();\n\t\tforeach ($this->options as $key => $option) {\n\t\t\t\t$fieldsets[$key] = $option;\n\t\t}\n\n\t\t$output = '';\n\n\t\tif(count((array) $fieldsets)) {\n\t\t\t$output .= '<div class=\"sp-pagebuilder-fieldset\">';\n\t\t\t$output .= '<ul class=\"sp-pagebuilder-nav sp-pagebuilder-nav-tabs\">';\n\t\t\tforeach ( $fieldsets as $key => $value ) {\n\t\t\t\t$output .= '<li class=\"'. (( $i === 0 )?\"active\":\"\" ) .'\"><a href=\"#sp-pagebuilder-tab-'. $key .'\" aria-controls=\"'. $key .'\" data-toggle=\"tab\">'. ucfirst( $key ) .'</a></li>';\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t$output .= '</ul>';\n\t\t\t$output .= '<div class=\"tab-content\">';\n\t\t\tforeach ( $fieldsets as $key => $value ) {\n\t\t\t\t$output .= '<div class=\"tab-pane '. (( $j === 0 )? \"active\":\"\" ) .'\" id=\"sp-pagebuilder-tab-'. $key .'\">';\n\t\t\t\t$output .= $this->get_input_fields( $key, $addon_title );\n\t\t\t\t$output .= '</div>';\n\n\t\t\t\t$j++;\n\t\t\t}\n\t\t\t$output .= '</div>';\n\t\t\t$output .= '</div>';\n\t\t}\n\n\t\treturn $output;\n\t}", "private function tab_navigation() {\n\t\t\techo '<div class=\"wpseo-local-metabox-menu\">';\n\t\t\techo '<ul role=\"tablist\" class=\"yoast-seo-local-aria-tabs\" aria-label=\"Yoast SEO: Local\">';\n\t\t\tforeach ( $this->tabs as $key => $tab ) {\n\t\t\t\t$active = ( $key === 0 );\n\n\t\t\t\t$link_class = [ 'wpseo-local-meta-section-link' ];\n\t\t\t\tif ( $active ) {\n\t\t\t\t\t$link_class[] = 'yoast-active-tab';\n\t\t\t\t}\n\n\t\t\t\techo '<li role=\"presentation\" ' . ( ( $active ) ? 'class=\"active\"' : '' ) . '>';\n\t\t\t\techo '<a role=\"tab\" href=\"#wpseo-local-tab-' . $tab['id'] . '\" class=\"' . implode( ' ', $link_class ) . '\" id=\"wpseo-local-tab-' . $tab['id'] . '-content\">';\n\t\t\t\techo '<span class=\"dashicons dashicons-' . $tab['icon'] . '\"></span>';\n\t\t\t\techo $tab['title'];\n\t\t\t\techo '</a>';\n\t\t\t\techo '</li>';\n\t\t\t}\n\t\t\techo '</ul>';\n\t\t\techo '</div> <!-- .wpseo-metabox-menu -->';\n\t\t}", "function render_wizard() {\n\t\t$lines = array();\n\n\t\t$action = explode(':', $this->wizard->modData['wizAction']);\n\t\tif ($action[0] == 'edit') {\n\t\t\t$this->regNewEntry($this->sectionID, $action[1]);\n\t\t\t$lines = $this->catHeaderLines(\n\t\t\t\t$lines, $this->sectionID, $this->wizard->options[$this->sectionID], '&nbsp;', $action[1]\n\t\t\t);\n\t\t\t$piConf = $this->wizard->wizArray[$this->sectionID][$action[1]];\n\t\t\t$ffPrefix = '[' . $this->sectionID . '][' . $action[1] . ']';\n\n\t\t}\n\n\n\t\t// Header field\n\t\t$optValues = array(\n\t\t\t'tt_content' => 'tt_content (Content)',\n\t\t\t'fe_users' => 'fe_users (Frontend Users)',\n\t\t\t'fe_groups' => 'fe_groups (Frontend Groups)',\n\t\t\t'be_users' => 'be_users (Backend Users)',\n\t\t\t'be_groups' => 'be_groups (Backend Groups)',\n\t\t\t'pages' => 'pages (Pages)',\n\t\t);\n\n\t\tforeach ($GLOBALS['TCA'] as $tablename => $tableTCA) {\n\t\t\tif (!$optValues[$tablename]) {\n\t\t\t\t$optValues[$tablename] = $tablename . ' (' . $GLOBALS['LANG']->sL($tableTCA['ctrl']['title']) . ')';\n\t\t\t}\n\t\t}\n\t\tasort($optValues);\n\n\t\t$subContent = '<strong>Which table:<br /></strong>' .\n\t\t\t$this->renderSelectBox($ffPrefix . '[which_table]', $piConf['which_table'], $optValues) .\n\t\t\t$this->whatIsThis('Select the table which should be extended with these extra fields.');\n\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) .\n\t\t\t'<input type=\"hidden\" name=\"' . $this->piFieldName('wizArray_upd') . $ffPrefix . '[title]\" value=\"'\n\t\t\t. ($piConf['which_table'] ? $optValues[$piConf['which_table']] : '') . '\" /></td></tr>';\n\n\n\t\t// PRESETS:\n\t\t$selPresetBox = $this->presetBox($piConf['fields']);\n\n\t\t// Fields\n\t\t$c = array(0);\n\t\t$this->usedNames = array();\n\t\tif (is_array($piConf['fields'])) {\n\t\t\t$piConf['fields'] = $this->cleanFieldsAndDoCommands(\n\t\t\t\t$piConf['fields'], $this->sectionID, $action[1], $piConf['which_table'] ? $piConf['which_table'] : ''\n\t\t\t);\n\n\t\t\t// Do it for real...\n\t\t\treset($piConf['fields']);\n\t\t\twhile (list($k, $v) = each($piConf['fields'])) {\n\t\t\t\t$c[] = $k;\n\t\t\t\t$subContent = $this->renderField($ffPrefix . '[fields][' . $k . ']', $v);\n\t\t\t\t$lines[] = '<tr' . $this->bgCol(2) . '><td>' . $this->fw(\n\t\t\t\t\t\t'<strong>FIELD:</strong> <em>' . $v['fieldname'] . '</em>'\n\t\t\t\t\t) . '</td></tr>';\n\t\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\t\t\t}\n\t\t}\n\n\n\t\t// New field:\n\t\t$k = max($c) + 1;\n\t\t$v = array();\n\t\t$lines[] = '<tr' . $this->bgCol(2) . '><td>' . $this->fw('<strong>NEW FIELD:</strong>') . '</td></tr>';\n\t\t$subContent = $this->renderField($ffPrefix . '[fields][' . $k . ']', $v, 1);\n\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\n\n\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw(\n\t\t\t\t'<br /><br />Load preset fields: <br />' . $selPresetBox\n\t\t\t) . '</td></tr>';\n\n\t\t/* HOOK: Place a hook here, so additional output can be integrated */\n\t\tif (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['kickstarter']['add_cat_fields'])) {\n\t\t\tforeach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['kickstarter']['add_cat_fields'] as $_funcRef) {\n\t\t\t\t$lines = t3lib_div::callUserFunction($_funcRef, $lines, $this);\n\t\t\t}\n\t\t}\n\n\t\t$content = '<table border=\"0\" cellpadding=\"2\" cellspacing=\"2\">' . implode('', $lines) . '</table>';\n\t\treturn $content;\n\t}", "private function _tabModelCreateData()\n {\n return [\n 'designTabsModel' => [\n 'containerDesignBlockModel' => [\n 'marginTop' => 10,\n 'borderBottomWidth' => 7,\n 'borderColorHover' => 'rgb(0,255,0)',\n 'backgroundColorFromHover' => 'rgba(255,0,255,0.5)',\n ],\n 'tabDesignBlockModel' => [\n 'marginTop' => 10,\n 'borderBottomWidth' => 7,\n 'borderColorHover' => 'rgb(0,255,0)',\n 'backgroundColorFromHover' => 'rgba(255,0,255,0.5)',\n ],\n 'tabDesignTextModel' => [\n 'size' => 20\n ],\n 'contentDesignBlockModel' => [\n 'marginTop' => 10,\n 'borderBottomWidth' => 7,\n 'borderColorHover' => 'rgb(0,255,0)',\n 'backgroundColorFromHover' => 'rgba(255,0,255,0.5)',\n ],\n ],\n 'textModel' => [\n 'designTextModel' => [\n 'size' => 10\n ],\n 'designBlockModel' => [\n 'marginTop' => 10,\n 'borderBottomWidth' => 7,\n 'borderColorHover' => 'rgb(0,255,0)',\n 'backgroundColorFromHover' => 'rgba(255,0,255,0.5)',\n ],\n 'type' => 1,\n 'hasEditor' => false,\n ],\n 'isShowEmpty' => true,\n 'isLazyLoad' => true,\n ];\n }", "private function metabox_style_tabs() {\n $help_sidebar = $this->get_sidebar();\n\n $help_class = '';\n if ( ! $help_sidebar ) :\n $help_class .= ' no-sidebar';\n endif;\n\n // Time to render!\n ?>\n\n <div class=\"tabbed\">\n <div class=\"tabbed-sections\">\n <ul class=\"tr-tabs alignleft\">\n <?php\n $class = ' class=\"active\"';\n $tabs = $this->get_tabs();\n foreach ( $tabs as $tab ) :\n $link_id = \"tab-link-{$tab['id']}\";\n $panel_id = (!empty($tab['url'])) ? $tab['url'] : \"#tab-panel-{$tab['id']}\";\n ?>\n <li id=\"<?php echo esc_attr( $link_id ); ?>\"<?php echo $class; ?>>\n <a href=\"<?php echo esc_url( \"$panel_id\" ); ?>\">\n <?php echo esc_html( $tab['title'] ); ?>\n </a>\n </li>\n <?php\n $class = '';\n endforeach;\n ?>\n </ul>\n </div>\n\n <?php if ( $help_sidebar ) : ?>\n <div class=\"tabbed-sidebar\">\n <?php echo $help_sidebar; ?>\n </div>\n <?php endif; ?>\n\n <div class=\"tr-sections clearfix\">\n <?php\n $classes = 'tab-section active';\n foreach ( $tabs as $tab ):\n $panel_id = \"tab-panel-{$tab['id']}\";\n ?>\n\n <div id=\"<?php echo esc_attr( $panel_id ); ?>\" class=\"<?php echo $classes; ?>\">\n <?php\n // Print tab content.\n echo $tab['content'];\n\n // If it exists, fire tab callback.\n if ( ! empty( $tab['callback'] ) )\n call_user_func_array( $tab['callback'], array( $this, $tab ) );\n ?>\n </div>\n <?php\n $classes = 'tab-section';\n endforeach;\n ?>\n </div>\n </div>\n <?php\n }", "public function print_tabs() {\n $id = $this->required_param('id', PARAM_INT);\n $page = $this->get_tab_page();\n $params = array('id' => $id);\n $rows = array();\n $row = array();\n\n // Main Tab List.\n foreach ($page->tabs as $tab) {\n $tab = $this->add_defaults_to_tab($tab);\n if ($tab['showtab'] === true) {\n $target = new $tab['page'](array_merge($tab['params'], $params));\n if (!$target->can_do()) {\n continue;\n }\n $row[] = new tabobject($tab['tab_id'], $target->url, $tab['name']);\n }\n }\n if (!empty($row)) {\n $rows[] = $row;\n }\n\n // Sub-menu.\n $assignedpage = $this->get_new_page(array('id' => $id, 'action' => 'default'));\n $unassignedpage = $this->get_new_page(array('id' => $id, 'action' => 'add'));\n list($langassigned, $langunassigned) = $this->get_assigned_strings();\n\n $rows[] = array(\n new tabobject('assigned', $assignedpage->url, $langassigned),\n new tabobject('unassigned', $unassignedpage->url, $langunassigned)\n );\n\n $selectedtab = ($this->is_assigning() === true) ? 'unassigned' : 'assigned';\n print_tabs($rows, $selectedtab, array(), array(get_class($this)));\n }", "public function get_envira_tab_nav() {\n\n $tabs = array(\n 'images' => __( 'Images', 'envira-gallery' ),\n 'config' => __( 'Config', 'envira-gallery' ),\n 'lightbox' => __( 'Lightbox', 'envira-gallery' ),\n 'mobile' => __( 'Mobile', 'envira-gallery' ),\n );\n $tabs = apply_filters( 'envira_gallery_tab_nav', $tabs );\n\n // \"Misc\" tab is required.\n $tabs['misc'] = __( 'Misc', 'envira-gallery' );\n\n return $tabs;\n\n }", "function echotheme_tabs_func( $atts, $content = null ) {\n global $tabs;\n $tabs = array(); // clear the array\n\tdo_shortcode($content); // execute the '[tab]' shortcode first to get the title and content\n\n $tabs_nav = '<div class=\"clear\"></div>';\n $tabs_nav .= '<div class=\"tabs-wrapper\">';\n $tabs_nav .= '<ul class=\"tabs\">';\n\t$tabs_content .= '<ul class=\"tabs-content\">';\n \n\tforeach ($tabs as $tab => $tab_atts) {\n\t\t$id = str_replace(' ', '-', $tab_atts['title']);\n\t\t$default = ( $tab == 0 ) ? ' class=\"active\"' : '';\n\t\n\t\t$tabs_nav .= '<li><a href=\"#'.$id.'\"'.$default.'>'.$tab_atts['title'].'</a></li>';\n\t\t$tabs_content .= '<li id=\"'.$id.'\"'.$default.'>'.$tab_atts['content'].'</li>';\n }\n\n $tabs_nav .= '</ul>';\n\t$tabs_content .= '</ul>';\n $tabs_output .= $tabs_nav . $tabs_content;\n $tabs_output .= '</div><!-- tabs-wrapper end -->';\n $tabs_output .= '<div class=\"clear\"></div>';\n\t\n return $tabs_output;\n}", "public function settings_tabs( $tabs ) {\n\t\t$new_tab = array( 'app-vpn' => __( 'APP: VPN - Settings', 'wpcd' ) );\n\t\t$tabs = $tabs + $new_tab;\n\t\treturn $tabs;\n\t}", "public function generate_html_forms()\n\t{\n\t\t$return_str = '<div class=\"bwp-wrap bwp-option-page-wrapper\" style=\"padding-bottom: 20px;\">' . \"\\n\";\n\t\tif (sizeof($this->form_tabs) >= 2)\n\t\t\t$return_str .= apply_filters('bwp_admin_form_icon', '<div class=\"icon32\" id=\"icon-options-general\"><br></div>' . \"\\n\");\n\t\telse\n\t\t\t$return_str .= '<div class=\"icon32\" id=\"icon-options-general\"><br></div>';\t\t\t\n\t\t\n\t\tif (sizeof($this->form_tabs) >= 2)\n\t\t{\n\t\t\t$count = 0;\n\t\t\t$return_str .= '<h2 class=\"bwp-option-page-tabs\">' . \"\\n\";\n\t\t\t$return_str .= apply_filters('bwp_admin_plugin_version', '') . \"\\n\";\n\t\t\tforeach ($this->form_tabs as $title => $link)\n\t\t\t{\n\t\t\t\t$count++;\n\t\t\t\t$active = ($count == $this->current_tab) ? ' nav-tab-active' : '';\n\t\t\t\t$return_str .= '<a class=\"nav-tab' . $active . '\" href=\"' . $link . '\">' . $title . '</a>' . \"\\n\";\n\t\t\t}\n\t\t\t$return_str .= '</h2>' . \"\\n\";\n\t\t}\n\t\telse if (!isset($this->form_tabs[0]))\n\t\t{\n\t\t\t$title = array_keys($this->form_tabs);\n\t\t\t$return_str .= '<h2>' . $title[0] . '</h2>' . \"\\n\";\n\t\t}\n\t\telse\n\t\t\t$return_str .= '<h2>' . $this->form_tabs[0] . '</h2>' . \"\\n\";\n\n\t\t$return_str .= '<div class=\"bwp-option-box clear\">' . \"\\n\";\n\n\t\t// Begin generating each form\n\t\tforeach ($this->forms as $form)\n\t\t{\n\t\t\t// If this form has 'divider' items, we need to split HTML fields appropriately\n\t\t\t$dividers = (isset($form->form['divider']) && is_array($form->form['divider'])) ? array_keys($form->form['divider']) : array();\n\t\t\t$form_style = (!empty($form->style)) ? ' style=\"' . $form->style . '\" ' : '';\n\t\t\t$multi_form_style = (!empty($form->style) && 0 < sizeof($dividers)) ? ' style=\"' . $form->style . '\" ' : '';\n\n\t\t\tif (0 == sizeof($dividers))\n\t\t\t{\n\t\t\t\t$return_str .= '<div class=\"bwp-option-box-inside\"' . $form_style . '>' . \"\\n\";\n\t\t\t\t$return_str .= apply_filters('bwp_opf_before_form_' . $form->form_name, '');\n\t\t\t\techo $return_str;\n\t\t\t\tdo_action('bwp_opa_before_form_' . $form->form_name, $form->form_name);\n\t\t\t}\n\t\t\telse\n\t\t\t\techo $return_str;\n\n\t\t\t$enctype = (!empty($form->form_enctype)) ? ' enctype=\"' . $form->form_enctype . '\" ' : '';\n\t\t\t$return_str = '<form class=\"bwp-option-page\" name=\"' . $form->form_name . '\" method=\"post\" action=\"\"' . $enctype . $multi_form_style . '>' . \"\\n\";\n\n\t\t\t// Nonce\n\t\t\t$return_str .= wp_nonce_field($form->form_name, \"_wpnonce\", false, false) . \"\\n\";\n\t\t\t$return_str .= apply_filters('bwp_opf_referrer_field_' . $form->form_name, wp_referer_field(false)) . \"\\n\";\n\n\t\t\t$return_str .= '<ul>' . \"\\n\";\n\n\t\t\tif (isset($form->form_items) && is_array($form->form_items))\n\t\t\t{\n\t\t\t\t// If this form needs to be divided, so be it\n\t\t\t\tif (0 < sizeof($dividers))\n\t\t\t\t{\n\t\t\t\t\t$return_str .= '<div class=\"bwp-option-box-inside\">' . \"\\n\";\n\t\t\t\t\t$return_str .= apply_filters('bwp_opf_before_form_' . $form->form_name, '');\n\t\t\t\t\techo $return_str;\n\t\t\t\t\tdo_action('bwp_opa_before_form_' . $form->form_name, $form->form_name);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\techo $return_str;\n\t\t\t\t// Reset the result\n\t\t\t\t$return_str = '';\n\t\t\t\t// Generate individual items\n\t\t\t\t$form_count = 0;\n\t\t\t\tforeach ($form->form_items as $key => $type)\n\t\t\t\t{\n\t\t\t\t\tif (!empty($form->form_item_names[$key]) && isset($form->form_item_labels[$key]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$extra_classes = ('heading' == $type) ? ' bwp-li-heading' : ' bwp-li-item';\n\t\t\t\t\t\t// Before the field\n\t\t\t\t\t\techo $return_str;\n\t\t\t\t\t\tdo_action('bwp_opa_before_field_' . $form->form_name . '_' . $form->form_item_names[$key], $form->form_name);\n\t\t\t\t\t\t$return_str = '';\n\t\t\t\t\t\t// The field\n\t\t\t\t\t\t$return_str .= ('hidden' != $form->form_items[$key]) ? '<li class=\"clear' . $extra_classes . '\">' . $form->generate_html_fields($type, $form->form_item_names[$key]) . '</li>' : $form->generate_html_fields($type, $form->form_item_names[$key]) . \"\\n\";\n\t\t\t\t\t\t// After the field\n\t\t\t\t\t\techo $return_str;\n\t\t\t\t\t\tdo_action('bwp_opa_after_field_' . $form->form_name . '_' . $form->form_item_names[$key], $form->form_name);\n\t\t\t\t\t\t$return_str = '';\n\t\t\t\t\t\tif (in_array($form->form_item_names[$key], $dividers))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$form_count++;\n\t\t\t\t\t\t\techo $return_str;\n\t\t\t\t\t\t\tdo_action('bwp_opa_after_divided_form_' . $form->form_name . '_' . $form_count, $form->form_name);\n\t\t\t\t\t\t\t$return_str = '';\n\t\t\t\t\t\t\t$return_str .= apply_filters('bwp_opf_multi_submit_button_' . $form->form_name, '<p class=\"submit\"><input type=\"submit\" class=\"button-primary\" name=\"save_' . $form->form_name . '\" value=\"' . __('Save All Changes', $this->domain) . '\" /> &nbsp;<input type=\"submit\" class=\"button-secondary\" name=\"reset_' . $form->form_name . '\" value=\"' . __('Reset to Defaults', $this->domain) . '\" /></p>', $form_count) . \"\\n\";\n\t\t\t\t\t\t\t$return_str .= '</div>' . \"\\n\";\n\t\t\t\t\t\t\t$return_str .= '<div class=\"bwp-option-box-inside\">' . \"\\n\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// If this form needs to be divided, add the final Save all changes button\n\t\t\t\tif (0 < sizeof($dividers))\n\t\t\t\t\t$return_str .= apply_filters('bwp_opf_multi_submit_button_' . $form->form_name, '<p class=\"submit\"><input type=\"submit\" class=\"button-primary\" name=\"save_' . $form->form_name . '\" value=\"' . __('Save All Changes', $this->domain) . '\" /> &nbsp;<input type=\"submit\" class=\"button-secondary\" name=\"reset_' . $form->form_name . '\" value=\"' . __('Reset to Defaults', $this->domain) . '\" /></p>', 'last') . \"\\n\";\n\t\t\t}\n\n\t\t\t$return_str .= '</ul>' . \"\\n\";\t\t\n\t\t\t$return_str .= apply_filters('bwp_opf_before_submit_button_' . $form->form_name, '');\n\t\t\techo $return_str;\n\t\t\tdo_action('bwp_opa_before_submit_button_' . $form->form_name, $form->form_name);\n\n\t\t\t$submit = apply_filters('bwp_opf_submit_button_' . $form->form_name, '<p class=\"submit\"><input type=\"submit\" class=\"button-primary\" name=\"save_' . $form->form_name . '\" value=\"' . __('Save Changes', $this->domain) . '\" /> &nbsp;<input type=\"submit\" class=\"button-secondary\" name=\"reset_' . $form->form_name . '\" value=\"' . __('Reset to Defaults', $this->domain) . '\" /></p>') . \"\\n\";\n\t\t\t$return_str = apply_filters('bwp_op_submit_button', $submit) . \"\\n\";\n\t\t\t$return_str .= '</form>' . \"\\n\";\n\n\t\t\tif (0 == sizeof($dividers))\n\t\t\t\t$return_str .= '</div>' . \"\\n\";\n\t\t}\n\n\t\t$return_str .= '<div class=\"clear\"><!-- --></div>' . \"\\n\";\n\t\t$return_str .= '</div>' . \"\\n\";\n\t\t$return_str .= '</div>' . \"\\n\";\n\n\t\techo $return_str;\n\t}", "public function register_data_tab( $tabs ) {\r\n $tabs['tm_extra_product_options'] = array(\r\n 'label' => __( 'TM Extra Product Options', TM_EPO_TRANSLATION ),\r\n 'target' => 'tm_extra_product_options',\r\n 'class' => array( 'tm_epo_class', 'hide_if_grouped' )\r\n );\r\n return $tabs;\r\n }", "public function tabsAction()\n {\n\t\treturn array();\n }", "public function settings_page_init() {\n global $WCPc;\n \n $settings_tab_options = array(\"tab\" => \"{$this->tab}\", \"ref\" => &$this,\n \"sections\" => array(\n // Section one\n \"default_settings_section\" => array(\n \"title\" => __('Default Settings', $WCPc->text_domain), \n \"fields\" => array( /* Hidden */\n \"id\" => array('title' => '', \n 'type' => 'hidden', \n 'id' => 'id', \n 'name' => 'id', \n 'value' => 999\n ),\n /* Text */ \n \"id_number\" => array('title' => __('ID Number', $WCPc->text_domain), \n 'type' => 'text', \n 'id' => 'id_number', \n 'label_for' => 'id_number', \n 'name' => 'id_number', \n 'hints' => __('Enter your ID Number here.', $WCPc->text_domain), \n 'desc' => __('It will represent your identification.', $WCPc->text_domain)\n ), \n /* Textarea */\n \"about\" => array('title' => __('About', $WCPc->text_domain) , \n 'type' => 'textarea', \n 'id' => 'about', \n 'label_for' => 'about', \n 'name' => 'about', \n 'rows' => 5, \n 'placeholder' => __('About you', $WCPc->text_domain), \n 'desc' => __('It will represent your significant.', $WCPc->text_domain)\n ), \n /* Text */\n \"demo_test\" => array('title' => __('Demo Test', $WCPc->text_domain),\n 'type' => 'text',\n 'id' => 'demo_test',\n 'label_for' => 'demo_test',\n 'name' => 'demo_test',\n 'placeholder' => __('Demo Test', $WCPc->text_domain)\n ),\n /* Wp Eeditor */\n \"bio\" => array('title' => __('Bio', $WCPc->text_domain), \n 'type' => 'wpeditor', \n 'id' => 'bio', \n 'label_for' => 'bio', \n 'name' => 'bio'\n ), \n /* Checkbox */\n \"is_enable\" => array('title' => __('Enable', $WCPc->text_domain), \n 'type' => 'checkbox', \n 'id' => 'is_enable', \n 'label_for' => 'is_enable', \n 'name' => 'is_enable', \n 'value' => 'Enable'\n ), \n /* Radio */\n \"offday\" => array('title' => __('Off Day', $WCPc->text_domain), \n 'type' => 'radio', \n 'id' => 'offday', \n 'label_for' => 'offday', \n 'name' => 'offday', \n 'dfvalue' => 'wednesday', \n 'options' => array('sunday' => 'Sunday', \n 'monday' => 'Monday', \n 'tuesday' => 'Tuesday', \n 'wednesday' => 'Wednesday', \n 'thrusday' => 'Thrusday'\n ), \n 'hints' => __('Choose your preferred week offday.', $WCPc->text_domain), \n 'desc' => __('By default Saterday will be offday.', $WCPc->text_domain)\n ), \n /* Select */\n \"preference\" => array('title' => __('Preference', $WCPc->text_domain), \n 'type' => 'select', \n 'id' => 'preference', \n 'label_for' => 'preference', \n 'name' => 'preference', \n 'options' => array('one' => 'One Time', \n 'two' => 'Two Time', \n 'three' => 'Three Time'\n ), \n 'hints' => __('Choose your preferred occurence count.', $WCPc->text_domain)\n ), \n /* Upload */\n \"logo\" => array('title' => __('Logo', $WCPc->text_domain), \n 'type' => 'upload', \n 'id' => 'logo', \n 'label_for' => 'logo', \n 'name' => 'logo', \n 'prwidth' => 125, \n 'hints' => __('Your presentation.', $WCPc->text_domain), \n 'desc' => __('Represent your graphical signature.', $WCPc->text_domain)\n ), \n /* Colorpicker */\n \"dc_colorpicker\" => array('title' => __('Choose Color', $WCPc->text_domain), \n 'type' => 'colorpicker', \n 'id' => 'dc_colorpicker', \n 'label_for' => 'dc_colorpicker', \n 'name' => 'dc_colorpicker', \n 'default' => '000000', \n 'hints' => __('Choose your color here.', $WCPc->text_domain),\n 'desc' => __('This lets you choose your desired color.', $WCPc->text_domain)\n ), \n /* Datepicker */\n \"dc_datepicker\" => array('title' => __('Choose DOB', $WCPc->text_domain),\n 'type' => 'datepicker', \n 'id' => 'dc_datepicker', \n 'label_for' => 'dc_datepicker', \n 'name' => 'dc_datepicker', \n 'hints' => __('Choose your DOB here', $WCPc->text_domain), \n 'desc' => __('This lets you choose your date of birth.', $WCPc->text_domain), \n 'custom_attributes' => array('date_format' => 'dd-mm-yy')\n ), \n /* Multiinput */\n \"slider\" => array('title' => __('Slider', $WCPc->text_domain) , \n 'type' => 'multiinput', \n 'id' => 'slider', \n 'label_for' => 'slider', \n 'name' => 'slider', \n 'options' => array(\n \"title\" => array('label' => __('Title', $WCPc->text_domain) , \n 'type' => 'text', \n 'label_for' => 'title', \n 'name' => 'title', \n 'class' => 'regular-text'\n ),\n \"content\" => array('label' => __('Content', $WCPc->text_domain), \n 'type' => 'textarea', \n 'label_for' => 'content', \n 'name' => 'content', \n 'cols' => 40\n ),\n \"image\" => array('label' => __('Image', $WCPc->text_domain), \n 'type' => 'upload', \n 'label_for' => 'image', \n 'name' => 'image', \n 'prwidth' => 125\n ),\n \"url\" => array('label' => __('URL', $WCPc->text_domain) , \n 'type' => 'url', \n 'label_for' => 'url', \n 'name' => 'url', \n 'class' => 'regular-text'\n ),\n \"published\" => array('label' => __('Published ON', $WCPc->text_domain), \n 'type' => 'datepicker', \n 'id' => 'published', \n 'label_for' => 'published', \n 'name' => 'published', \n 'hints' => __('Published Date', $WCPc->text_domain), \n 'custom_attributes' => array('date_format' => 'dd th M, yy')\n )\n )\n )\n )\n ), \n \"custom_settings_section\" => array(\n \"title\" => \"Demo Custom Settings\", // Another section\n \"fields\" => array(\n \"location\" => array('title' => __('Location', $WCPc->text_domain), \n 'type' => 'text', \n 'id' => 'location', \n 'name' => 'location', \n 'hints' => __('Location', $WCPc->text_domain)\n ),\n \"role\" => array('title' => __('Role', $WCPc->text_domain), \n 'type' => 'text', \n 'id' => 'role', \n 'name' => 'role', \n 'hints' => __('Role', $WCPc->text_domain)\n )\n )\n )\n )\n );\n \n $WCPc->admin->settings->wcpc_settings_field_init(apply_filters(\"wcpc_settings_{$this->tab}_tab_options\", $settings_tab_options));\n }", "function _getTabs($tabs, $showTabs = true, $selectedGroup='All')\n {\n if($selectedGroup=='All')\n \t$selectedGroup=translate('LBL_TABGROUP_ALL');\n\n \t// Set up a mapping from subpanelID, found in the $tabs list, to the source module name\n \t// As the $GLOBALS['tabStructure'] array holds the Group Tabs by module name we need to efficiently convert between the two\n \t// when constructing the subpanel tabs\n \t// Note that we can't use the very similar GroupedTabStructure class as it lacks this mapping, and logically, it is designed\n \t// for use when constructing the module by module tabs, not the subpanel tabs, as we move away from using module names to represent\n \t// subpanels, and use unique subpanel IDs instead.\n\n \t$moduleNames = array () ;\n \tforeach ( $tabs as $subpanelID )\n \t{\n // Bug #44344 : Custom relationships under same module only show once in subpanel tabs\n // use object property instead new object to have ability run unit test (can override subpanel_definitions)\n $subpanel = $this->subpanel_definitions->load_subpanel( $subpanelID );\n \t\tif ($subpanel !== false)\n \t\t $moduleNames [ $subpanelID ] = $subpanel->get_module_name() ;\n \t}\n\n \t$groups = array () ;\n \t$found = array () ;\n\n foreach( $GLOBALS['tabStructure'] as $mainTab => $subModules)\n {\n foreach( $subModules['modules'] as $key => $subModule )\n {\n \t\t\tforeach ( $tabs as $subpanelID )\n if (isset($moduleNames[ $subpanelID ] ) && strcasecmp( $subModule , $moduleNames[ $subpanelID ] ) === 0)\n {\n // Bug #44344 : Custom relationships under same module only show once in subpanel tabs\n $groups [ translate ( $mainTab ) ] [ 'modules' ] [] = $subpanelID ;\n \t$found [ $subpanelID ] = true ;\n \t}\n }\n }\n\n // Put all the remaining subpanels into the 'Other' tab.\n\n foreach( $tabs as $subpanelID )\n {\n \tif ( ! isset ( $found [ $subpanelID ] ) )\n\t \t$groups [ translate ('LBL_TABGROUP_OTHER') ]['modules'] [] = $subpanelID ;\n }\n\n /* Move history to same tab as activities */\n if(in_array('history', $tabs) && in_array('activities', $tabs))\n {\n foreach($groups as $mainTab => $group)\n {\n \tif(in_array('activities', array_map('strtolower', $group['modules'])))\n {\n \tif(!in_array('history', array_map('strtolower', $group['modules'])))\n {\n \t/* Move hist from there to here */\n $groups[$mainTab]['modules'] []= 'history';\n }\n }\n else if(false !== ($i = array_search('history', array_map('strtolower', $group['modules']))))\n {\n unset($groups[$mainTab]['modules'][$i]);\n if(empty($groups[$mainTab]['modules']))\n {\n \tunset($groups[$mainTab]);\n }\n }\n }\n }\n\n /* Add the 'All' group.\n * Note that if a tab group already exists with the name 'All',\n * it will be overwritten in this union operation.\n */\n if(count($groups) <= 1)\n \t$groups = array(translate('LBL_TABGROUP_ALL') => array('label' => translate('LBL_TABGROUP_ALL'), 'modules' => $tabs));\n else\n $groups = array(translate('LBL_TABGROUP_ALL') => array('label' => translate('LBL_TABGROUP_ALL'), 'modules' => $tabs)) + $groups;\n /* Note - all $display checking and array_intersects with $tabs\n * are now redundant (thanks to GroupedTabStructure), and could\n * be removed for performance, but for now can stay to help ensure\n * that the tabs get renedered correctly.\n */\n\n $retTabs = array();\n if($showTabs)\n {\n \trequire_once('include/SubPanel/SugarTab.php');\n \t$sugarTab = new SugarTab();\n\n $displayTabs = array();\n $otherTabs = array();\n\n \t foreach ($groups as $key=>$tab)\n \t\t{\n $display = false;\n foreach($tab['modules'] as $subkey=>$subtab)\n {\n if(in_array(strtolower($subtab), $tabs))\n {\n $display = true;\n break;\n }\n }\n\n $selected = '';\n\n if($selectedGroup == $key)\n {\n $selected = 'current';\n }\n\n if($display)\n {\n $relevantTabs = SubPanelTilesTabs::applyUserCustomLayoutToTabs($tabs, $key);\n\n $sugarTabs[$key] = array(//'url'=>'index.php?module=' . $_REQUEST['module'] . '&record=' . $_REQUEST['record'] . '&action=' . $_REQUEST['action']. '&subpanel=' . $key.'#tabs',\n //'url'=>\"javascript:SUGAR.util.retrieveAndFill('index.php?to_pdf=1&module=MySettings&action=LoadTabSubpanels&loadModule={$_REQUEST['module']}&record={$_REQUEST['record']}&subpanel=$key','subpanel_list',null,null,null);\",\n 'label'=>( !empty($tab['label']) ? $tab['label']: $key ),\n 'type'=>$selected);\n\n $otherTabs[$key] = array('key'=>$key, 'tabs'=>array());\n\n $orderedTabs = array_intersect($relevantTabs, array_map('strtolower', $groups[$key]['modules']));\n\n foreach($orderedTabs as $subkey => $subtab)\n {\n $otherTabs[$key]['tabs'][$subkey] = array('key'=>$subtab, 'label'=>translate($this->subpanel_definitions->layout_defs['subpanel_setup'][$subtab]['title_key']));\n }\n\n if($selectedGroup == $key)\n {\n $displayTabs = $otherTabs[$key]['tabs'];\n $retTabs = $orderedTabs;\n }\n }\n \t\t}\n\n if(empty($displayTabs) && !empty($otherTabs))\n {\n //WDong Bug: 12258 \"All\" tab in the middle of a record's detail view is not localized.\n $selectedGroup = translate('LBL_TABGROUP_ALL');\n $displayTabs = $otherTabs[$selectedGroup]['tabs'];\n $sugarTabs[$selectedGroup]['type'] = 'current';\n $retTabs = array_intersect($tabs, array_map('strtolower', $groups[$selectedGroup]['modules']));\n }\n\n if (!empty($sugarTabs) || !empty($otherTabs) ) {\n \t$sugarTab->setup($sugarTabs, $otherTabs, $displayTabs, $selectedGroup);\n \t$sugarTab->display();\n }\n }\n else\n {\n $tabs = SubPanelTilesTabs::applyUserCustomLayoutToTabs($tabs, $selectedGroup);\n\n $retTabs = array_intersect($tabs, array_map('strtolower', $groups[$selectedGroup]['modules']));\n }\n\n\t\treturn $retTabs;\n\t}", "public function build_controls()\n\t{\n\t\t$this->add_control( 'title', [\n\t\t\t'label' => __( 'Title' )\n\t\t] );\n\t\t$this->add_control( 'content', [\n\t\t\t'label' => __( 'Content' ),\n\t\t\t'type' => 'textarea'\n\t\t] );\n\t\t$this->add_control( 'link_url', [\n\t\t\t'label' => __( 'URL' )\n\t\t] );\n\t\t$this->add_control( 'link_text', [\n\t\t\t'label' => __( 'Link Text' )\n\t\t] );\n\t\t$this->add_control( 'link_target', [\n\t\t\t'label' => __( 'Open link in a new window/tab' ),\n\t\t\t'type' => 'checkbox',\n\t\t\t'value' => '1'\n\t\t] );\n\t}", "function scb_tabx($atts, $content){\n\t$tabid='';\n\t$tabclass = $atts['class'];\n\t$tabmode = ' nav-tabs';\n\t$tablia = ''; $tabCont = '';\n\t\n\tif($atts['id'] !=''){\n\t\t$tabid = ' id=\"'.$atts['id'].'\"'; \n\t}\n\t\n\tif($atts['mode'] !=''){\n\t\t$tabmode = ' nav-'.$atts['mode']; \n\t}\n\t\n\t$menu = explode('[/tab_content]', $content);\n\t$tabTitle='';\n\t\n\tfor($i=0; $i<count($menu)-1;$i++){\n\t\t$tabTitle = explode(':',explode(']',$menu[$i])[0])[1];\n\t\tadd_shortcode('content:'.str_replace(' ','',$tabTitle), 'tabMenuCont_sc');\n\t}\n\t\n\tfor($i=0; $i<count($menu)-1;$i++){\n\t\t$tabTitle = explode(':',explode(']',$menu[$i])[0])[1];\n\t\t$tabSCName = explode(']',$menu[$i])[0];\n\t\t$renscName = '[tab_content:'.str_replace(' ','',$tabTitle);\n\t\t$scName = str_replace($tabSCName, $renscName ,$menu[$i]);\n\t\t$tablia .= '<li role=\"presentation\" '.($i==0?'class=\"active\"':'').'><a href=\"#dv'.$attrs['id'].'_'.$i.'\" data-toggle=\"tab\" role=\"tab\" aria-expanded=\"true\">'.$tabTitle.'</a></li>';\n\t\t\n\t\t$tabCont .= '<div id=\"dv'.$attrs['id'].'_'.$i.'\" class=\"tab-pane '.($i==0?'active':'').'\" >'.do_shortcode(trim($scName)).'</div>';\n\t}\n\t\n\t$retVal = '<div'.$tabid.'><ul class=\"nav'.$tabmode.'\">'.$tablia.'</ul><div class=\"tab-content\">'.$tabCont.'</div></div>';\n\treturn $retVal;\n}", "public function metabox_tabs() {\n\t\t$tabs = array(\n\t\t\t'vpn-general' => array(\n\t\t\t\t'label' => 'General',\n\t\t\t\t'icon' => 'dashicons-text',\n\t\t\t),\n\t\t\t'vpn-scripts' => array(\n\t\t\t\t'label' => 'Scripts',\n\t\t\t\t'icon' => 'dashicons-format-aside',\n\t\t\t),\n\t\t\t'vpn-promotions' => array(\n\t\t\t\t'label' => 'Promotions',\n\t\t\t\t'icon' => 'dashicons-testimonial',\n\t\t\t),\n\t\t);\n\n\t\treturn $tabs;\n\t}", "function pexeto_show_tabs( $atts, $content = null ) {\r\n\t\textract( shortcode_atts( array(\r\n\t\t\t\t\t'titles' => '',\r\n\t\t\t\t\t'width' => 'medium'\r\n\t\t\t\t), $atts ) );\r\n\t\t$titlearr=explode( ',', $titles );\r\n\t\t$html='<div class=\"tabs-container\"><ul class=\"tabs \">';\r\n\t\tif ( $width=='small' ) {\r\n\t\t\t$wclass='w1';\r\n\t\t}elseif ( $width=='big' ) {\r\n\t\t\t$wclass='w3';\r\n\t\t}else {\r\n\t\t\t$wclass='w2';\r\n\t\t}\r\n\t\tforeach ( $titlearr as $title ) {\r\n\t\t\t$html.='<li class=\"'.$wclass.'\"><a href=\"#\">'.$title.'</a></li>';\r\n\t\t}\r\n\t\t$html.='</ul><div class=\"panes\">'.do_shortcode( $content ).'</div></div>';\r\n\t\treturn $html;\r\n\t}", "function show_tabs($tabs) {\n// $this->log(__CLASS__ . \".\" . __FUNCTION__ . \"() for \" . $this->controller->request->params['controller'] . '/' . $this->controller->request->params['action'], LOG_DEBUG);\n\n if (!is_array($tabs)){\n $args = func_get_args();\n }\n else $args = $tabs;\n\n foreach($args as $tabID){\n $tabMap = Configure::read('tabControllerActionMap');\n $controller = $tabMap[$tabID]['controller'];\n $action = $tabMap[$tabID]['action'];\n $isAuthorized = $this->controller->DhairAuth->isAuthorizedForUrl($controller,$action); \n\n if (!$isAuthorized)\n {\n unset($args[array_search($tabID, $args)]);\n }\n elseif ($controller == 'surveys' && $action == 'index'\n && empty($this->controller->session_link)){\n unset($args[array_search($tabID, $args)]);\n }\n\n }\n\n $this->tabs_for_layout = $args;\n// $this->log(__CLASS__ . \"->\" . __FUNCTION__ . \"(...) tabs_for_layout after auth filter: \" . print_r($this->tabs_for_layout, true) /**. \", here's the stack: \" . Debugger::trace() */, LOG_DEBUG);\n\n// $this->log(__CLASS__ . \"->\" . __FUNCTION__ . \"(...), next: calculateTabsToRemoveOrDisable()\" /*. Debugger::trace()*/ , LOG_DEBUG);\n $this->calculateTabsToRemoveOrDisable();\n// $this->log(__CLASS__ . \"->\" . __FUNCTION__ . \"(...), just did calculateTabsToRemoveOrDisable()\" /*. Debugger::trace()*/ , LOG_DEBUG);\n $this->controller->set('tabsToDisable', $this->tabsToDisable);\n\n// $this->log(__CLASS__ . \"->\" . __FUNCTION__ . \"(...), here's tabs_for_layout: \" . print_r($this->tabs_for_layout, true) /*. Debugger::trace()*/ , LOG_DEBUG);\n $this->controller->set('tabs_for_layout', $this->tabs_for_layout);\n }", "public function get_markup () {\r\n\t\t$data = $this->properties_to_array();\r\n\r\n\t\t// Ensure tab title\r\n\t\t// Do shortcode\r\n\t\tforeach($data['tabs'] as $index=>$tab) {\r\n\t\t\t$ttl = trim(str_replace(\"\\n\", '', $tab['title']));\r\n\t\t\tif (empty($ttl)) {\r\n\t\t\t\t$tab['title'] = 'Tab ' . ($index + 1);\r\n\t\t\t}\r\n\t\t\t$tab['content'] = $this->_do_shortcode($tab['content']);\r\n\t\t\t$data['tabs'][$index] = $tab;\r\n\t\t}\r\n\r\n\t\tif (!$data['preset']) {\r\n\t\t\t$data['preset'] = 'default';\r\n\t\t}\r\n\r\n\t\t$data['wrapper_id'] = str_replace('utabs-object-', 'wrapper-', $data['element_id']);\r\n\r\n\t\t$markup = upfront_get_template('utabs', $data, dirname(dirname(__FILE__)) . '/tpl/utabs.html');\r\n\r\n\t\t// upfront_add_element_style('upfront_tabs', array('css/utabs.css', dirname(__FILE__)));\r\n\t\tupfront_add_element_script('upfront_tabs', array('js/utabs-front.js', dirname(__FILE__)));\r\n\r\n\t\treturn $markup;\r\n\t}", "function wp_yes_tabs() {\n\t\t$settings = new WP_Yes( 'wp_yes_tabs' ); // Initialize the WP_Yes class.\n\n\t\t$settings->add_tab(\n\t\t\tarray(\n\t\t\t\t'id' => 'tab_1',\n\t\t\t)\n\t\t);\n\n\t\t$settings->add_section(\n\t\t\tarray(\n\t\t\t\t'id' => 'section_1',\n\t\t\t)\n\t\t);\n\n\t\t$settings->add_field(\n\t\t\tarray(\n\t\t\t\t'id' => 'wp_yes_tabs_field_1',\n\t\t\t\t'required' => true,\n\t\t\t\t'type' => 'text',\n\t\t\t)\n\t\t);\n\n\t\t$settings->add_field(\n\t\t\tarray(\n\t\t\t\t'id' => 'wp_yes_tabs_field_2',\n\t\t\t\t'required' => true,\n\t\t\t\t'type' => 'multicheckbox',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'foo' => 'foo',\n\t\t\t\t\t'bar' => 'bar',\n\t\t\t\t\t'foo bar' => 'foo bar',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$settings->add_tab(\n\t\t\tarray(\n\t\t\t\t'id' => 'tab_2',\n\t\t\t)\n\t\t);\n\n\t\t$settings->add_section(\n\t\t\tarray(\n\t\t\t\t'id' => 'section_1',\n\t\t\t)\n\t\t);\n\n\t\t$settings->add_field(\n\t\t\tarray(\n\t\t\t\t'id' => 'wp_yes_tabs_field_3',\n\t\t\t\t'required' => true,\n\t\t\t\t'type' => 'file',\n\t\t\t)\n\t\t);\n\n\t\t$settings->add_field(\n\t\t\tarray(\n\t\t\t\t'id' => 'wp_yes_tabs_field_4',\n\t\t\t\t'required' => true,\n\t\t\t\t'type' => 'multiselect',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'foo' => 'foo',\n\t\t\t\t\t'bar' => 'bar',\n\t\t\t\t\t'foo bar' => 'foo bar',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$settings->init(); // Run the WP_Yes class.\n\t}", "function addPageEditorSettingsSubtabs()\n\t{\n\t\tglobal $ilCtrl, $ilTabs;\n\n\t\t$ilTabs->addSubTabTarget(\"adve_pe_general\",\n\t\t\t $ilCtrl->getLinkTarget($this, \"showGeneralPageEditorSettings\"),\n\t\t\t array(\"showGeneralPageEditorSettings\", \"\", \"view\")); \n\t\t\n\t\tinclude_once(\"./Services/COPage/classes/class.ilPageEditorSettings.php\");\n\t\t$grps = ilPageEditorSettings::getGroups();\n\t\t\n\t\tforeach ($grps as $g => $types)\n\t\t{\n\t\t\t$ilCtrl->setParameter($this, \"grp\", $g);\n\t\t\t$ilTabs->addSubTabTarget(\"adve_grp_\".$g,\n\t\t\t\t $ilCtrl->getLinkTarget($this, \"showPageEditorSettings\"),\n\t\t\t\t array(\"showPageEditorSettings\")); \n\t\t}\n\t\t$ilCtrl->setParameter($this, \"grp\", $_GET[\"grp\"]);\n\t}", "public function display(){\r\n $configured = WiziappConfig::getInstance()->settings_done;\r\n\r\n if (isset($_GET['wiziapp_configured']) && $_GET['wiziapp_configured'] == 1){\r\n $configured = TRUE;\r\n }\r\n\r\n $showAllTabs = WiziappConfig::getInstance()->finished_processing && $configured;\r\n\r\n ?>\r\n <script src=\"http://cdn.jquerytools.org/1.2.5/all/jquery.tools.min.js\"></script>\r\n <style>\r\n #wiziapp_container{\r\n background: #fff;\r\n min-height: 500px;\r\n position: relative;\r\n }\r\n #wiziapp_logo{\r\n float: left;\r\n margin-right: 5px;\r\n }\r\n\r\n #wiziapp_logo a{\r\n text-decoration: none;\r\n }\r\n\r\n #wiziapp_logo a img{\r\n border: 0px none;\r\n }\r\n #wiziapp_header{\r\n clear: both;\r\n height: 62px;\r\n width: 875px;\r\n padding: 15px 10px 25px;\r\n margin: 0px auto;\r\n }\r\n #wiziapp_container_content{\r\n width: 875px;\r\n margin: 0px auto;\r\n }\r\n #wiziapp_header ul{\r\n list-style: none;\r\n height: 48px;\r\n width: 679px;\r\n background: url(<?php\t \t echo WiziappConfig::getInstance()->getCdnServer(); ?>/images/cms/menu_shadow_line.jpg) no-repeat bottom center;\r\n margin: 14px auto 0px;\r\n padding: 0px;\r\n float: right;\r\n }\r\n\r\n #wiziapp_header li{\r\n background: url(<?php\t \t echo WiziappConfig::getInstance()->getCdnServer(); ?>/images/cms/Menu_Close_Tabe.png) no-repeat bottom center;\r\n width: 104px;\r\n height: 48px;\r\n display: inline-block;\r\n text-align: center;\r\n font-size: 14px;\r\n }\r\n\r\n #wiziapp_header li.active{\r\n background: url(<?php\t \t echo WiziappConfig::getInstance()->getCdnServer(); ?>/images/cms/Menu_open_tab.png) no-repeat bottom center;\r\n font-weight: bolder;\r\n position: relative;\r\n top: -4px;\r\n }\r\n #wiziapp_header li.active.single{\r\n top: 1px;\r\n }\r\n #wiziapp_header li a{\r\n color: #000;\r\n text-decoration: none;\r\n display: block;\r\n margin-top: 23px;\r\n }\r\n #wiziapp_header li.active a{\r\n margin-top: 18px;\r\n }\r\n #wiziapp_container .col{\r\n float: left;\r\n }\r\n #wiziapp_support_links{\r\n width: 200px;\r\n background: url(<?php\t \t echo WiziappConfig::getInstance()->getCdnServer(); ?>/images/cms/MyAccount_Shadow_center.jpg) no-repeat scroll left center transparent;\r\n padding: 0 0 0 40px;\r\n min-height: 334px;\r\n margin-left: 25px;\r\n }\r\n #wiziapp_container .clear{\r\n clear: both;\r\n }\r\n #wiziapp_support_table{\r\n\r\n }\r\n #wiziapp_container table{\r\n width: 607px;\r\n margin-top: 15px;\r\n border-collapse: collapse;\r\n }\r\n #wiziapp_container table td{\r\n color: #353535;\r\n width: 80px;\r\n }\r\n #wiziapp_container table thead{\r\n background: url(<?php\t \t echo WiziappConfig::getInstance()->getCdnServer(); ?>/images/generator/main_sprite.png) no-repeat scroll 0px -349px;\r\n }\r\n #wiziapp_container table thead th{\r\n font-weight: normal;\r\n height: 59px;\r\n width: 80px;\r\n text-align: center;\r\n padding-right: 10px;\r\n }\r\n #wiziapp_container table .v_first-col{\r\n width: 150px;\r\n text-align: left;\r\n padding-left: 10px;\r\n }\r\n #wiziapp_container table td.v_first-col{\r\n padding-left: 10px;\r\n color:#0fb3fb;\r\n }\r\n #wiziapp_container table tbody td{\r\n border-right: 2px #ffffff solid;\r\n height: 59px;\r\n text-align: center;\r\n }\r\n #wiziapp_container table tbody tr.v_odd td{\r\n background-color: #f0f0f0;\r\n }\r\n #wiziapp_container table .status_col{\r\n width: 30px;\r\n }\r\n #wiziapp_container table .status_col div{\r\n height: 100%;\r\n width: 17px;\r\n margin: 0px auto;\r\n }\r\n #wiziapp_container table .status_col .success{\r\n background: url(<?php\t \t echo WiziappConfig::getInstance()->getCdnServer(); ?>/images/cms/V_Icon.png) no-repeat left center;\r\n }\r\n #wiziapp_container table .status_col .failed{\r\n background: url(<?php\t \t echo WiziappConfig::getInstance()->getCdnServer(); ?>/images/cms/validetion_error_Icon.png) no-repeat left center;\r\n }\r\n #wiziapp_container table span.sep, #wiziapp_container table a{\r\n color:#0fb3fb;\r\n }\r\n \r\n #wiziapp_container .wiziapp_button{\r\n background: url(<?php\t \t echo WiziappConfig::getInstance()->getCdnServer(); ?>/images/cms/ReportBTN.png) no-repeat left center;\r\n width: 164px;\r\n height: 33px;\r\n line-height: 33px;\r\n color: #000;\r\n text-align: center;\r\n font-weight: bold;\r\n text-decoration: none;\r\n display: block;\r\n margin: 30px auto;\r\n }\r\n #wiziapp_container table tr.details{\r\n display: none;\r\n }\r\n #wiziapp_container .wiziapp_error{\r\n padding: 0px 10px 20px;\r\n position: static;\r\n background: none transparent;\r\n width: auto;\r\n height: auto;\r\n text-align: left;\r\n }\r\n .wiziapp_errors_container{\r\n display: none;\r\n z-index: 999;\r\n }\r\n #wiziapp_env_indicator{\r\n color: #0fb3fb;\r\n font-size: 12px;\r\n position: absolute;\r\n top: 0px;\r\n right: 25px;\r\n }\r\n </style>\r\n <script type=\"text/javascript\">\r\n jQuery(document).ready(function($){\r\n $(\"#wiziapp_main_tabs a\").click(function(event){\r\n event.preventDefault();\r\n top.document.location.replace('<?php\t \t echo get_admin_url();?>admin.php?page='+$(this).attr('rel'));\r\n return false;\r\n });\r\n\r\n $(\"#wiziapp_container .retry\").click(function(event){\r\n event.preventDefault();\r\n top.document.location.reload(true);\r\n return false;\r\n });\r\n\r\n $(\"#wiziapp_container .details\").click(function(event){\r\n event.preventDefault();\r\n var $el = jQuery(this).parents(\"tr:first\").next(\"tr\");\r\n\r\n if ( $el.is(':visible') ){\r\n $el.hide();\r\n } else {\r\n $el.show();\r\n }\r\n $el = null;\r\n return false;\r\n });\r\n\r\n $(\"#wiziapp_container .wiziapp_errors_container\").bind('closingReportForm', function(){\r\n jQuery('.wiziapp_errors_container').data('overlay').close();\r\n });\r\n });\r\n </script>\r\n <div id=\"wiziapp_container\">\r\n <div id=\"wiziapp_header\">\r\n <div id=\"wiziapp_logo\"><a href=\"#\"><img src=\"<?php\t \t echo WiziappConfig::getInstance()->getCdnServer(); ?>/images/generator/main_logo.png\" alt=\"Extend your reach\" /></a></div>\r\n <ul id=\"wiziapp_main_tabs\">\r\n <?php\t \t if ( $showAllTabs ) { ?>\r\n <?php\t \t if (WiziappConfig::getInstance()->app_live !== FALSE){ ?>\r\n <li class=\"wiziapp_header_link\">\r\n <a rel=\"wiziapp_statistics_display\" href=\"/cms/controlPanel/statistics\">Statistics</a>\r\n </li>\r\n <?php\t \t } ?>\r\n <li class=\"wiziapp_header_link\">\r\n <a rel=\"wiziapp_app_info_display\" href=\"/cms/controlPanel/appInfo\">App Info</a>\r\n </li>\r\n <li class=\"wiziapp_header_link\">\r\n <a rel=\"wiziapp_my_account_display\" href=\"/cms/controlPanel/myAccount\">My Account</a>\r\n </li>\r\n <?php\t \t } ?>\r\n <li class=\"wiziapp_header_link active <?php\t \t echo ($showAllTabs) ? '' : 'single'; ?>\">\r\n <a rel=\"wiziapp_support_display\" href=\"/cms/controlPanel/support\">Support</a>\r\n </li>\r\n </ul>\r\n </div>\r\n <div id=\"wiziapp_container_content\">\r\n <div id=\"wiziapp_support_table\" class=\"col\">\r\n <table border=\"0\">\r\n <thead>\r\n <tr>\r\n <th class=\"v_first-col\">Requirement</th>\r\n <th class=\"status_col\">Status</th>\r\n <th>Solution</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <?php\t \t \r\n echo $this->getStatusRow('WritingPermissions', 'Writing Permissions');\r\n echo $this->getStatusRow('PhpGraphicRequirements', 'GD / ImageMagick', 'v_odd');\r\n echo $this->getStatusRow('AllowUrlFopen', 'allow_url_fopen');\r\n ?>\r\n </tbody>\r\n </table>\r\n <div class=\"report_container wiziapp_errors_container\"></div>\r\n </div>\r\n <div id=\"wiziapp_support_links\" class=\"col\">\r\n <a href=\"http://wiziapp.com/support\" target=\"_blank\" id=\"wiziapp_faq_link\" class=\"wiziapp_button\">FAQ</a>\r\n <a href=\"http://wiziapp.com/contact\" target=\"_blank\" id=\"wiziapp_contact_link\" class=\"wiziapp_button\">Contact Us</a>\r\n </div>\r\n <div class=\"clear\"></div>\r\n </div>\r\n <div id=\"wiziapp_env_indicator\">\r\n <?php\t \t echo WIZIAPP_ENV; ?> :: <?php\t \t echo WIZIAPP_VERSION; ?>\r\n </div>\r\n </div>\r\n <?php\t \t \r\n }", "private function parse_options()\n\t\t{\n\t\t\t$options = $this->options;\n\n\t\t\tforeach ( $options as $option ) {\n\n\t\t\t\tif ( $option[ 'type' ] == 'heading' ) {\n\t\t\t\t\t$tab_name = sanitize_title( $option[ 'name' ] );\n\t\t\t\t\t$this->tab_headers = array( $tab_name => $option[ 'name' ] );\n\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$option[ 'tab' ] = $tab_name;\n\t\t\t\t$tabs[ $tab_name ][ ] = $option;\n\n\t\t\t}\n\n\t\t\t$this->tabs = $tabs;\n\n\t\t\treturn $tabs;\n\t\t}", "function __construct()\n\t{\n\t\tparent::__construct(\n\t\t\t'jetty_widget_horizontal_tab',\n\t\t\t__('Jetty Horizontal Tabs', 'jetty'),\n\t\t\tarray( 'description' => __( 'This widget for display horizontal tab on certain page', 'jetty' ), )\n\t\t);\n\t}", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: string properties');\r\n\r\n $stringpainted[] =& $this->createElement('radio', null, null, 'Yes', true);\r\n $stringpainted[] =& $this->createElement('radio', null, null, 'No', false);\r\n $this->addGroup($stringpainted, 'stringpainted', 'Render a custom string:');\r\n\r\n $this->addElement('text', 'stringid', 'Id:', array('size' => 32));\r\n $this->addElement('text', 'stringclass', 'CSS class:', array('size' => 32));\r\n $this->addElement('text', 'stringvalue', 'Content:', array('size' => 32));\r\n\r\n $stringsize['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 4));\r\n $stringsize['height'] =& $this->createElement('text',\r\n 'height', 'height',\r\n array('size' => 4));\r\n $stringsize['left'] =& $this->createElement('text',\r\n 'left', 'left',\r\n array('size' => 4));\r\n $stringsize['top'] =& $this->createElement('text',\r\n 'top', 'top',\r\n array('size' => 4));\r\n $stringsize['bgcolor'] =& $this->createElement('text',\r\n 'bgcolor', 'bgcolor',\r\n array('size' => 7));\r\n $this->addGroup($stringsize, 'stringsize', 'Size, position and color:', ' ');\r\n\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Left', 'left');\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Right', 'right');\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Top', 'top');\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Bottom', 'bottom');\r\n $this->addGroup($stringvalign, 'stringvalign', 'Vertical alignment:');\r\n\r\n $stringalign[] =& $this->createElement('radio', null, null,\r\n 'Left', 'left');\r\n $stringalign[] =& $this->createElement('radio', null, null,\r\n 'Right', 'right');\r\n $stringalign[] =& $this->createElement('radio', null, null,\r\n 'Center', 'center');\r\n $this->addGroup($stringalign, 'stringalign', 'Horizontal alignment:');\r\n\r\n $stringfont['family'] =& $this->createElement('text',\r\n 'family', 'family',\r\n array('size' => 40));\r\n $stringfont['size'] =& $this->createElement('text',\r\n 'size', 'size',\r\n array('size' => 2));\r\n $stringfont['color'] =& $this->createElement('text',\r\n 'color', 'color',\r\n array('size' => 7));\r\n $this->addGroup($stringfont, 'stringfont', 'Font:', ' ');\r\n\r\n $stringweight[] =& $this->createElement('radio', null, null,\r\n 'normal', 'normal');\r\n $stringweight[] =& $this->createElement('radio', null, null,\r\n 'Bold', 'bold');\r\n $this->addGroup($stringweight, 'stringweight', 'Font weight:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('apply','process'));\r\n }", "function echotheme_tab_func( $atts, $content = null ) {\n extract(shortcode_atts(array(\n\t 'title'\t=> '',\n ), $atts));\n global $tabs;\n $tabs[] = array('title' => $title, 'content' => trim(wpautop(do_shortcode($content))));\n return $tabs;\n}", "protected function _prepareForm()\n\t{\n\t\tparent::_prepareForm();\n\n\t\t$oMainTab = $this->getTab('main');\n\t\t$oAdditionalTab = $this->getTab('additional');\n\n\t\t$windowId = $this->_Admin_Form_Controller->getWindowId();\n\n\t\t$oMainTab\n\t\t\t->add(Admin_Form_Entity::factory('Div')->class('row')\n\t\t\t\t->add($oDivLeft = Admin_Form_Entity::factory('Div')->class('col-xs-12 col-md-6 col-lg-7 left-block'))\n\t\t\t\t->add($oDivRight = Admin_Form_Entity::factory('Div')->class('col-xs-12 col-md-6 col-lg-5 right-block'))\n\t\t\t);\n\n\t\t\t$oMainTab\n\t\t\t->add(Admin_Form_Entity::factory('Script')\n\t\t\t\t->value('\n\t\t\t\t\t$(function(){\n\t\t\t\t\t\tvar timer = setInterval(function(){\n\t\t\t\t\t\t\tif ($(\"#' . $windowId . ' .left-block\").height())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tclearInterval(timer);\n\n\t\t\t\t\t\t\t\t$(\"#' . $windowId . ' .right-block\").find(\"#' . $windowId . '_notes\").slimscroll({\n\t\t\t\t\t\t\t\t\theight: $(\"#' . $windowId . ' .left-block\").height() - 75,\n\t\t\t\t\t\t\t\t\tcolor: \"rgba(0, 0, 0, 0.3)\",\n\t\t\t\t\t\t\t\t\tsize: \"5px\"\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, 500);\n\t\t\t\t\t});\n\t\t\t\t'));\n\n\t\t$oDivLeft\n\t\t\t->add($oMainRow1 = Admin_Form_Entity::factory('Div')->class('row'))\n\t\t\t->add($oMainRow2 = Admin_Form_Entity::factory('Div')->class('row'))\n\t\t\t->add($oMainRow3 = Admin_Form_Entity::factory('Div')->class('row'))\n\t\t\t->add($oMainRow4 = Admin_Form_Entity::factory('Div')->class('row'))\n\t\t\t;\n\n\t\t$oDivRight\n\t\t\t->add($oMainRowRight1 = Admin_Form_Entity::factory('Div')->class('row'));\n\n\t\t$sColorValue = ($this->_object->id && $this->getField('color')->value)\n\t\t\t? $this->getField('color')->value\n\t\t\t: '#aebec4';\n\n\t\t$this->getField('color')\n\t\t\t->colorpicker(TRUE)\n\t\t\t->value($sColorValue);\n\n\t\t$oMainTab\n\t\t\t->move($this->getField('name')->divAttr(array('class' => 'form-group col-xs-12')), $oMainRow1)\n\t\t\t->move($this->getField('description')->divAttr(array('class' => 'form-group col-xs-12'))->rows(10), $oMainRow2)\n\t\t\t->move($this->getField('datetime')->divAttr(array('class' => 'form-group col-xs-12 col-sm-6 col-md-4 col-lg-6')), $oMainRow3)\n\t\t\t->move($this->getField('deadline')->divAttr(array('class' => 'form-group col-xs-12 col-sm-6 col-md-4 col-lg-6')), $oMainRow3)\n\t\t\t->move($this->getField('color')->set('data-control', 'hue')->divAttr(array('class' => 'form-group col-xs-12 col-sm-6')), $oMainRow4)\n\t\t\t->move($this->getField('completed')->divAttr(array('class' => 'form-group col-xs-12 col-sm-6 col-md-4 col-lg-6 margin-top-21')), $oMainRow4);\n\n\t\t$windowId = $this->_Admin_Form_Controller->getWindowId();\n\n\t\t$countNotes = $this->_object->Crm_Notes->getCount()\n\t\t\t? '<span class=\"badge badge-palegreen\">' . $this->_object->Crm_Notes->getCount() . '</span>'\n\t\t\t: '';\n\n\t\tob_start();\n\t\t?>\n\t\t<div class=\"tabbable\">\n\t\t\t<ul class=\"nav nav-tabs tabs-flat\" id=\"crmProjectTabs\">\n\t\t\t\t<li class=\"active\">\n\t\t\t\t\t<a data-toggle=\"tab\" href=\"#<?php echo $windowId?>_notes\" data-path=\"/admin/crm/project/note/index.php\" data-window-id=\"<?php echo $windowId?>_notes\" data-additional=\"crm_project_id=<?php echo $this->_object->id?>\">\n\t\t\t\t\t\t<?php echo Core::_(\"Crm_Project.tabNotes\")?> <?php echo $countNotes?>\n\t\t\t\t\t</a>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t\t<div class=\"tab-content tabs-flat\">\n\t\t\t\t<div id=\"<?php echo $windowId?>_notes\" class=\"tab-pane in active\">\n\t\t\t\t\t<?php\n\t\t\t\t\tAdmin_Form_Entity::factory('Div')\n\t\t\t\t\t\t->controller($this->_Admin_Form_Controller)\n\t\t\t\t\t\t->id(\"crm-project-notes\")\n\t\t\t\t\t\t->add(\n\t\t\t\t\t\t\t$this->_object->id\n\t\t\t\t\t\t\t\t? $this->_addNotes()\n\t\t\t\t\t\t\t\t: Admin_Form_Entity::factory('Code')->html(\n\t\t\t\t\t\t\t\t\tCore_Message::get(Core::_('Crm_Project.enable_after_save'), 'warning')\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t\t->execute();\n\t\t\t\t\t?>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t\t$oMainRowRight1->add(Admin_Form_Entity::factory('Div')\n\t\t\t->class('form-group col-xs-12 margin-top-20')\n\t\t\t->add(\n\t\t\t\tAdmin_Form_Entity::factory('Code')\n\t\t\t\t\t->html(ob_get_clean())\n\t\t\t)\n\t\t);\n\n\t\t$this->title($this->_object->id\n\t\t\t? Core::_('Crm_Project.edit_title', $this->_object->name, FALSE)\n\t\t\t: Core::_('Crm_Project.add_title')\n\t\t);\n\n\t\treturn $this;\n\t}", "function admin_init() {\n\t\t\twp_enqueue_script('common');\n\t\t\twp_enqueue_script('wp-lists');\n\t\t\twp_enqueue_script('postbox');\n\n\t\t\t// Group = setings_fields, name of options, validation callback\n\t\t\tregister_setting( 'subpages_as_tabs_options', 'subpages_as_tabs_options', array( $this, 'options_validate' ) );\n\t\t\t// Unique ID, section title displayed, section callback, page name = do_settings_section\n\t\t\tadd_settings_section( 'subpages_tabs_section', '', array( $this, 'main_section' ), 'subpage_tabs_plugin' );\n\t\t\t// Unique ID, Title, function callback, page name = do_settings_section, section name\n\t\t\tadd_settings_field( 'spat_active_tab_background', __( 'Active Tab Background' ), array( $this, 'active_tab_background'), 'subpage_tabs_plugin', 'subpages_tabs_section');\n\t\t\t/**/\n\t\t\tadd_settings_field( 'spat_active_tab_foreground', __('Active Tab Text' ), array( $this, 'active_tab_foreground'), 'subpage_tabs_plugin', 'subpages_tabs_section');\n\t\t\tadd_settings_field( 'spat_inactive_tab_background', __( 'Inactive Tab Background' ), array( $this, 'inactive_tab_background'), 'subpage_tabs_plugin', 'subpages_tabs_section');\n\t\t\tadd_settings_field( 'spat_inactive_tab_foreground', __('Inactive Tab Text' ), array( $this, 'inactive_tab_foreground'), 'subpage_tabs_plugin', 'subpages_tabs_section');\n\n\t\t\tadd_settings_field( 'border', __('Border' ), array( $this, 'border'), 'subpage_tabs_plugin', 'subpages_tabs_section');\n\t\t\t//*/\n\t\t}", "function training_tabs_callback() {\n ctools_include('menu');\n $tab_1 = array(\n 'title' => 'First tab',\n 'href' => 'training/ctools/tabs/tab1',\n );\n $tab_2 = array(\n 'title' => 'Second tab',\n 'href' => 'training/ctools/tabs/tab2',\n );\n ctools_menu_add_tab($tab_1);\n ctools_menu_add_tab($tab_2);\n if (arg(3) == 'tab2') {\n return t('Tab 2 content');\n }\n\n return t('Tab 1 content');\n}", "public function buildPanels() {\n return array($this);\n }", "function hankart_add_manual_tab( $tabs ) {\n\t$tabs['pdf_manual'] = array(\n\t\t'title' \t=> __( 'Manual', 'storefront' ),\n\t\t'priority' \t=> 50,\n\t\t'callback' \t=> 'hankart_add_manual_tab_content'\n\t);\n\treturn $tabs;\n}", "private static function _parse()\n {\n $data = array();\n $data['tab-label'] = $_POST['tab-label'];\n $data['title-disabled'] = (bool) @$_POST['title-disabled'];\n $data['languages'] = $_POST['languages'];\n \n $data['languages'] = $_POST['languages'] ? explode(',',$_POST['languages']) : array(); \n $data['info'] = trim($_POST['info']); \n\t\t\n\t\t\n $data['required-width-comparator'] = $_POST['required-width-comparator']; \n $data['required-width'] = $_POST['required-width']; //do not cast to int\n\t\t$data['required-width-ranges'] = $_POST['required-width-ranges'] ? array_map('self::_explodeRangeRow', explode(';', $_POST['required-width-ranges'])) : array(); //twice explode\n\n\n\t\t$data['required-height-comparator'] = $_POST['required-height-comparator']; \n $data['required-height'] = $_POST['required-height']; //do not cast to int\n\t\t$data['required-height-ranges'] = $_POST['required-height-ranges'] ? array_map('self::_explodeRangeRow', explode(';', $_POST['required-height-ranges'])) : array(); //twice explode\n\n \n $data['fields'] = array();\n \n for ($i=0; isset($_POST['field-'.$i.'-type']); $i++) {\n $field = array();\n \n $field['label'] = $_POST['field-'.$i.'-label'];\n $field['type'] = $_POST['field-'.$i.'-type'];\n $field['required'] = (bool)@$_POST['field-'.$i.'-required'];\n \n if ($field['type'] == 'select')\n $field['options'] = preg_replace('/\\s\\s+/', ',', $_POST['field-'.$i.'-options']);\n \n $data['fields'][] = $field;\n } \n\n $data['thumbnails'] = array();\n \n //thumbs\n for ($i=0; $i <= 1; $i++) {\n $thumb = array();\n\n $thumb['enabled'] = (bool) @$_POST['thumb-'.$i.'-enabled'];\n $thumb['required'] = (bool) @$_POST['thumb-'.$i.'-required'];\n $thumb['label'] = @$_POST['thumb-'.$i.'-label'];\n $thumb['width'] = @$_POST['thumb-'.$i.'-width'];\n $thumb['height'] = @$_POST['thumb-'.$i.'-height'];\n $thumb['auto-crop'] = @$_POST['thumb-'.$i.'-auto-crop'];\n \n $data['thumbnails'][] = $thumb;\n }\n\n return $data;\n }", "function init()\n\t{\n\t\t$this->setType(\"tabs\");\n\t}", "function account_tab( $tabs ) {\n\n\t\t$tabs[1000]['points']['icon'] = 'um-faicon-trophy';\n\t\t$tabs[1000]['points']['title'] = __( 'My Points', 'twodayssss' );\n\t\t$tabs[1000]['points']['submit_title'] = __( 'My Points', 'twodayssss' );\n\t\t$tabs[1000]['points']['show_button'] = false;\n\n\t\treturn $tabs;\n\t}", "public function add_tabs() {\n\t\t$screen = get_current_screen();\n\n\t\tif ( ! $screen || ! in_array( $screen->id, wc_get_screen_ids() ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$video_map = array(\n\t\t\t'wc-settings' => array(\n\t\t\t\t'title' => __( 'General Settings', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/mz2l10u5f6?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-settings-general' => array(\n\t\t\t\t'title' => __( 'General Settings', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/mz2l10u5f6?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-settings-products' => array(\n\t\t\t\t'title' => __( 'Product Settings', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/lolkan4fxf?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-settings-tax' => array(\n\t\t\t\t'title' => __( 'Tax Settings', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/qp1v19dwrh?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-settings-checkout' => array(\n\t\t\t\t'title' => __( 'Checkout Settings', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/65yjv96z51?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-settings-account' => array(\n\t\t\t\t'title' => __( 'Account Settings', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/35mazq7il2?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-settings-email' => array(\n\t\t\t\t'title' => __( 'Email Settings', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/svcaftq4xv?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-settings-api' => array(\n\t\t\t\t'title' => __( 'Webhook Settings', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/1q0ny74vvq?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-settings-checkout-wc_gateway_paypal' => array(\n\t\t\t\t'title' => __( 'PayPal Standard', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/rbl7e7l4k2?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-settings-checkout-wc_gateway_simplify_commerce' => array(\n\t\t\t\t'title' => __( 'Simplify Commerce', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/jdfzjiiw61?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-settings-shipping' => array(\n\t\t\t\t'title' => __( 'Shipping Settings', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/9c9008dxnr?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-settings-shipping-wc_shipping_free_shipping' => array(\n\t\t\t\t'title' => __( 'Free Shipping', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/po191fmvy9?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-settings-shipping-wc_shipping_local_delivery' => array(\n\t\t\t\t'title' => __( 'Local Delivery', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/5qjepx9ozj?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-settings-shipping-wc_shipping_local_pickup' => array(\n\t\t\t\t'title' => __( 'Local Pickup', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/pe95ph0apb?videoFoam=true'\n\t\t\t),\n\t\t\t'edit-product_cat' => array(\n\t\t\t\t'title' => __( 'Product Categories, Tags, Shipping Classes, &amp; Attributes', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/f0j5gzqigg?videoFoam=true'\n\t\t\t),\n\t\t\t'edit-product_tag' => array(\n\t\t\t\t'title' => __( 'Product Categories, Tags, Shipping Classes, &amp; Attributes', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/f0j5gzqigg?videoFoam=true'\n\t\t\t),\n\t\t\t'edit-product_shipping_class' => array(\n\t\t\t\t'title' => __( 'Product Categories, Tags, Shipping Classes, &amp; Attributes', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/f0j5gzqigg?videoFoam=true'\n\t\t\t),\n\t\t\t'product_attributes' => array(\n\t\t\t\t'title' => __( 'Product Categories, Tags, Shipping Classes, &amp; Attributes', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/f0j5gzqigg?videoFoam=true'\n\t\t\t),\n\t\t\t'product' => array(\n\t\t\t\t'title' => __( 'Simple Products', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/ziyjmd4kut?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-status' => array(\n\t\t\t\t'title' => __( 'System Status', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/xdn733nnhi?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-reports' => array(\n\t\t\t\t'title' => __( 'Reports', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/6aasex0w99?videoFoam=true'\n\t\t\t),\n\t\t\t'edit-shop_coupon' => array(\n\t\t\t\t'title' => __( 'Coupons', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/gupd4h8sit?videoFoam=true'\n\t\t\t),\n\t\t\t'shop_coupon' => array(\n\t\t\t\t'title' => __( 'Coupons', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/gupd4h8sit?videoFoam=true'\n\t\t\t),\n\t\t\t'edit-shop_order' => array(\n\t\t\t\t'title' => __( 'Managing Orders', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/n8n0sa8hee?videoFoam=true'\n\t\t\t),\n\t\t\t'shop_order' => array(\n\t\t\t\t'title' => __( 'Managing Orders', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/n8n0sa8hee?videoFoam=true'\n\t\t\t)\n\t\t);\n\n\t\t$page = empty( $_GET['page'] ) ? '' : sanitize_title( $_GET['page'] );\n\t\t$tab = empty( $_GET['tab'] ) ? '' : sanitize_title( $_GET['tab'] );\n\t\t$section = empty( $_REQUEST['section'] ) ? '' : sanitize_title( $_REQUEST['section'] );\n\t\t$video_key = $page ? implode( '-', array_filter( array( $page, $tab, $section ) ) ) : $screen->id;\n\n\t\t// Fallback for sections\n\t\tif ( ! isset( $video_map[ $video_key ] ) ) {\n\t\t\t$video_key = $page ? implode( '-', array_filter( array( $page, $tab ) ) ) : $screen->id;\n\t\t}\n\n\t\t// Fallback for tabs\n\t\tif ( ! isset( $video_map[ $video_key ] ) ) {\n\t\t\t$video_key = $page ? $page : $screen->id;\n\t\t}\n\n\t\tif ( isset( $video_map[ $video_key ] ) ) {\n\t\t\t$screen->add_help_tab( array(\n\t\t\t\t'id' => 'woocommerce_101_tab',\n\t\t\t\t'title' => __( 'WooCommerce 101', 'woocommerce' ),\n\t\t\t\t'content' =>\n\t\t\t\t\t'<h2><a href=\"http://docs.woothemes.com/document/woocommerce-101-video-series/?utm_source=WooCommercePlugin&utm_medium=Help&utm_content=Videos&utm_campaign=Onboarding\">' . __( 'WooCommerce 101', 'woocommerce' ) . '</a> &ndash; ' . esc_html( $video_map[ $video_key ]['title'] ) . '</h2>' .\n\t\t\t\t\t'<iframe data-src=\"' . esc_url( $video_map[ $video_key ]['url'] ) . '\" src=\"\" allowtransparency=\"true\" frameborder=\"0\" scrolling=\"no\" class=\"wistia_embed\" name=\"wistia_embed\" allowfullscreen mozallowfullscreen webkitallowfullscreen oallowfullscreen msallowfullscreen width=\"480\" height=\"298\"></iframe>'\n\t\t\t) );\n\t\t}\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'woocommerce_docs_tab',\n\t\t\t'title' => __( 'Documentation', 'woocommerce' ),\n\t\t\t'content' =>\n\t\t\t\t'<h2>' . __( 'Documentation', 'woocommerce' ) . '</h2>' .\n\t\t\t\t'<p>' . __( 'Should you need help understanding, using, or extending WooCommerce, please read our documentation. You will find all kinds of resources including snippets, tutorials and much more.' , 'woocommerce' ) . '</p>' .\n\t\t\t\t'<p><a href=\"' . 'http://docs.woothemes.com/documentation/plugins/woocommerce/?utm_source=WooCommercePlugin&utm_medium=Help&utm_content=Docs&utm_campaign=Onboarding' . '\" class=\"button button-primary\">' . __( 'WooCommerce Documentation', 'woocommerce' ) . '</a> <a href=\"' . 'http://docs.woothemes.com/wc-apidocs/?utm_source=WooCommercePlugin&utm_medium=Help&utm_content=APIDocs&utm_campaign=Onboarding' . '\" class=\"button\">' . __( 'Developer API Docs', 'woocommerce' ) . '</a></p>'\n\n\t\t) );\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'woocommerce_support_tab',\n\t\t\t'title' => __( 'Support', 'woocommerce' ),\n\t\t\t'content' =>\n\t\t\t\t'<h2>' . __( 'Support', 'woocommerce' ) . '</h2>' .\n\t\t\t\t'<p>' . sprintf( __( 'After %sreading the documentation%s, for further assistance you can use the %scommunity forums%s on WordPress.org to talk with other users. If however you are a WooThemes customer, or need help with premium add-ons sold by WooThemes, please %suse our helpdesk%s.', 'woocommerce' ), '<a href=\"http://docs.woothemes.com/documentation/plugins/woocommerce/?utm_source=WooCommercePlugin&utm_medium=Help&utm_content=Docs&utm_campaign=Onboarding\">', '</a>', '<a href=\"https://wordpress.org/support/plugin/woocommerce\">', '</a>', '<a href=\"http://www.woothemes.com/my-account/tickets/?utm_source=WooCommercePlugin&utm_medium=Help&utm_content=Tickets&utm_campaign=Onboarding\">', '</a>' ) . '</p>' .\n\t\t\t\t'<p>' . __( 'Before asking for help we recommend checking the system status page to identify any problems with your configuration.', 'woocommerce' ) . '</p>' .\n\t\t\t\t'<p><a href=\"' . admin_url( 'admin.php?page=wc-status' ) . '\" class=\"button button-primary\">' . __( 'System Status', 'woocommerce' ) . '</a> <a href=\"' . 'https://wordpress.org/support/plugin/woocommerce' . '\" class=\"button\">' . __( 'WordPress.org Forums', 'woocommerce' ) . '</a> <a href=\"' . 'http://www.woothemes.com/my-account/tickets/?utm_source=WooCommercePlugin&utm_medium=Help&utm_content=Tickets&utm_campaign=Onboarding' . '\" class=\"button\">' . __( 'WooThemes Customer Support', 'woocommerce' ) . '</a></p>'\n\t\t) );\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'woocommerce_education_tab',\n\t\t\t'title' => __( 'Education', 'woocommerce' ),\n\t\t\t'content' =>\n\t\t\t\t'<h2>' . __( 'Education', 'woocommerce' ) . '</h2>' .\n\t\t\t\t'<p>' . __( 'If you would like to learn about using WooCommerce from an expert, consider following a WooCommerce course ran by one of our educational partners.', 'woocommerce' ) . '</p>' .\n\t\t\t\t'<p><a href=\"' . 'http://www.woothemes.com/educational-partners/?utm_source=WooCommercePlugin&utm_medium=Help&utm_content=EduPartners&utm_campaign=Onboarding' . '\" class=\"button button-primary\">' . __( 'View Education Partners', 'woocommerce' ) . '</a></p>'\n\t\t) );\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'woocommerce_bugs_tab',\n\t\t\t'title' => __( 'Found a bug?', 'woocommerce' ),\n\t\t\t'content' =>\n\t\t\t\t'<h2>' . __( 'Found a bug?', 'woocommerce' ) . '</h2>' .\n\t\t\t\t'<p>' . sprintf( __( 'If you find a bug within WooCommerce core you can create a ticket via <a href=\"%s\">Github issues</a>. Ensure you read the <a href=\"%s\">contribution guide</a> prior to submitting your report. To help us solve your issue, please be as descriptive as possible and include your <a href=\"%s\">system status report</a>.', 'woocommerce' ), 'https://github.com/woothemes/woocommerce/issues?state=open', 'https://github.com/woothemes/woocommerce/blob/master/CONTRIBUTING.md', admin_url( 'admin.php?page=wc-status' ) ) . '</p>' .\n\t\t\t\t'<p><a href=\"' . 'https://github.com/woothemes/woocommerce/issues?state=open' . '\" class=\"button button-primary\">' . __( 'Report a bug', 'woocommerce' ) . '</a> <a href=\"' . admin_url( 'admin.php?page=wc-status' ) . '\" class=\"button\">' . __( 'System Status', 'woocommerce' ) . '</a></p>'\n\n\t\t) );\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'woocommerce_onboard_tab',\n\t\t\t'title' => __( 'Setup Wizard', 'woocommerce' ),\n\t\t\t'content' =>\n\t\t\t\t'<h2>' . __( 'Setup Wizard', 'woocommerce' ) . '</h2>' .\n\t\t\t\t'<p>' . __( 'If you need to access the setup wizard again, please click on the button below.', 'woocommerce' ) . '</p>' .\n\t\t\t\t'<p><a href=\"' . admin_url( 'index.php?page=wc-setup' ) . '\" class=\"button button-primary\">' . __( 'Setup Wizard', 'woocommerce' ) . '</a></p>'\n\n\t\t) );\n\n\t\t$screen->set_help_sidebar(\n\t\t\t'<p><strong>' . __( 'For more information:', 'woocommerce' ) . '</strong></p>' .\n\t\t\t'<p><a href=\"' . 'http://www.woothemes.com/woocommerce/?utm_source=WooCommercePlugin&utm_medium=Help&utm_content=WooCommerceProductPage&utm_campaign=Onboarding' . '\" target=\"_blank\">' . __( 'About WooCommerce', 'woocommerce' ) . '</a></p>' .\n\t\t\t'<p><a href=\"' . 'http://wordpress.org/extend/plugins/woocommerce/' . '\" target=\"_blank\">' . __( 'WordPress.org Project', 'woocommerce' ) . '</a></p>' .\n\t\t\t'<p><a href=\"' . 'https://github.com/woothemes/woocommerce' . '\" target=\"_blank\">' . __( 'Github Project', 'woocommerce' ) . '</a></p>' .\n\t\t\t'<p><a href=\"' . 'http://www.woothemes.com/product-category/themes/woocommerce/?utm_source=WooCommercePlugin&utm_medium=Help&utm_content=WCThemes&utm_campaign=Onboarding' . '\" target=\"_blank\">' . __( 'Official Themes', 'woocommerce' ) . '</a></p>' .\n\t\t\t'<p><a href=\"' . 'http://www.woothemes.com/product-category/woocommerce-extensions/?utm_source=WooCommercePlugin&utm_medium=Help&utm_content=WCExtensions&utm_campaign=Onboarding' . '\" target=\"_blank\">' . __( 'Official Extensions', 'woocommerce' ) . '</a></p>'\n\t\t);\n\t}", "public function lite_tabs( $tabs ) {\n\n $tabs['mobile'] = __( 'Mobile', 'envira-gallery' );\n $tabs['videos'] = __( 'Videos', 'envira-gallery' );\n $tabs['social'] = __( 'Social', 'envira-gallery' );\n $tabs['tags'] = __( 'Tags', 'envira-gallery' );\n $tabs['pagination'] = __( 'Pagination', 'envira-gallery' );\n return $tabs;\n\n }", "protected function _register_controls() {\n\n\t\t$this->start_controls_section(\n\t\t\t'content_section',\n\t\t\t[\n\t\t\t\t'label' => __( 'Content', 'portfolio-elementor' ),\n\t\t\t\t'tab' => \\Elementor\\Controls_Manager::TAB_CONTENT,\n\t\t\t]\n\t\t);\n\t\t\n\t\t// Section Heading Title\n\t\t$this->add_control(\n\t\t 'portfolio_section_heading_title',\n\t\t\t[\n\t\t\t 'label' => esc_html__('Section Heading Title','portfolio-elementor'),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::TEXT,\n\t\t\t\t'label_block' => true,\n\t\t\t\t'separator' => 'before',\n\t\t\t\t'placeholder' => esc_html__('Enter Section Heading Title','portfolio-elementor'),\n\t\t\t]\n\t\t);\n\t\t\n\t\t// Section Heading Sub Title \n\t\t$this->add_control(\n\t\t 'portfolio_section_heading_sub_title',\n\t\t\t[\n\t\t\t 'label' => esc_html__('Section Heading Sub Title','portfolio-elementor'),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::TEXT,\n\t\t\t\t'label_block' => true,\n\t\t\t\t'separator' => 'before',\n\t\t\t\t'placeholder' => esc_html__('Enter Section Heading Sub Title','portfolio-elementor'),\n\t\t\t]\n\t\t);\n\t\t\n\t\t$this->end_controls_section();\n\t\t// end of the Content tab section\n\t\t\n\t\t// start of the Style tab section\n\t\t$this->start_controls_section(\n\t\t\t'style_section',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Content Style', 'portfolio-elementor' ),\n\t\t\t\t'tab' => \\Elementor\\Controls_Manager::TAB_STYLE,\n\t\t\t]\n\t\t);\n\t\t\n\t\t$this->start_controls_tabs(\n\t\t\t'style_tabs'\n\t\t);\n\t\t\n\t\t// start everything related to Normal state here\n\t\t$this->start_controls_tab(\n\t\t\t'style_normal_tab',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Normal', 'portfolio-elementor' ),\n\t\t\t]\n\t\t);\n\n\t\t// Section Heading Title Options\n\t\t$this->add_control(\n\t\t\t'portfolio_section_heading_title_options',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Section Heading Title', 'portfolio-elementor' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::HEADING,\n\t\t\t\t'separator' => 'before',\n\t\t\t]\n\t\t);\n\n\t\t// Section Heading Title Color\n\t\t$this->add_control(\n\t\t\t'portfolio_section_heading_title_color',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Title Color', 'portfolio-elementor' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::COLOR,\n\t\t\t\t'scheme' => [\n\t\t\t\t\t'type' => \\Elementor\\Scheme_Color::get_type(),\n\t\t\t\t\t'value' => \\Elementor\\Scheme_Color::COLOR_1,\n\t\t\t\t],\n\t\t\t\t'default' => '#dee3e4',\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .section-title h2' => 'color: {{VALUE}}',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t\n\t\t// Section Heading Title Typography\n\t\t$this->add_group_control(\n\t\t\t\\Elementor\\Group_Control_Typography::get_type(),\n\t\t\t[\n\t\t\t\t'name' => 'portfolio_section_heading_title_typography',\n\t\t\t\t'label' => esc_html__( 'Typography', 'portfolio-elementor' ),\n\t\t\t\t'scheme' => \\Elementor\\Scheme_Typography::TYPOGRAPHY_1,\n\t\t\t\t'selector' => '{{WRAPPER}} .section-title h2',\n\t\t\t]\n\t\t);\n\t\t\n\t\t// Section Heading Sub Title Options\n\t\t$this->add_control(\n\t\t\t'portfolio_section_heading_sub_title_options',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Section Heading Sub Title', 'portfolio-elementor' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::HEADING,\n\t\t\t\t'separator' => 'before',\n\t\t\t]\n\t\t);\n\n\t\t// Section Heading Sub Title Color\n\t\t$this->add_control(\n\t\t\t'portfolio_section_heading_sub_title_color',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Sub Title Color', 'portfolio-elementor' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::COLOR,\n\t\t\t\t'scheme' => [\n\t\t\t\t\t'type' => \\Elementor\\Scheme_Color::get_type(),\n\t\t\t\t\t'value' => \\Elementor\\Scheme_Color::COLOR_1,\n\t\t\t\t],\n\t\t\t\t'default' => '#343a40',\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .section-title p' => 'color: {{VALUE}}',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t\n\t\t// Section Heading Sub Title Typography\n\t\t$this->add_group_control(\n\t\t\t\\Elementor\\Group_Control_Typography::get_type(),\n\t\t\t[\n\t\t\t\t'name' => 'portfolio_section_heading_sub_title_typography',\n\t\t\t\t'label' => esc_html__( 'Typography', 'portfolio-elementor' ),\n\t\t\t\t'scheme' => \\Elementor\\Scheme_Typography::TYPOGRAPHY_1,\n\t\t\t\t'selector' => '{{WRAPPER}} .section-title p',\n\t\t\t]\n\t\t);\n\t\t\n\t\t$this->end_controls_tab();\n\t\t// end everything related to Normal state here\n\n\t\t// start everything related to Hover state here\n\t\t$this->start_controls_tab(\n\t\t\t'style_hover_tab',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Hover', 'portfolio-elementor' ),\n\t\t\t]\n\t\t);\n\t\t\n\t\t$this->end_controls_tab();\n\t\t// end everything related to Hover state here\n\n\t\t$this->end_controls_tabs();\n\n\t\t$this->end_controls_section();\n\t\t// end of the Style tab section\n\n\t}", "private function get_main_tabs_array() {\n\t\treturn apply_filters(\n\t\t\t'updraftplus_main_tabs',\n\t\t\tarray(\n\t\t\t\t'backups' => __('Backup / Restore', 'updraftplus'),\n\t\t\t\t'migrate' => __('Migrate / Clone', 'updraftplus'),\n\t\t\t\t'settings' => __('Settings', 'updraftplus'),\n\t\t\t\t'expert' => __('Advanced Tools', 'updraftplus'),\n\t\t\t\t'addons' => __('Premium / Extensions', 'updraftplus'),\n\t\t\t)\n\t\t);\n\t}", "function ch_widget_tabcontent($args, $number = 1) {\n\textract($args);\n\t$options = get_option('widget_tabcontent');\n\t\n\tinclude(TEMPLATEPATH . '/tabcontent.php');\n\t\n}", "public function actionCreate()\n {\n $this->can('createTabs');\n $model = new Tabs();\n\n if ($model->load(Yii::$app->request->post())) {\n $max = Tabs::find()->select('position')->asArray()->orderBy('position DESC')->one();\n $model->position = $max['position']+1;\n if ($model->save()) {\n return $this->redirect(['index']);\n }\n }\n\n $parents = ArrayHelper::map(Tabs::find()->where(['parent' => 0])->asArray()->all(), 'id', 'name');\n $parents[0] = Yii::t('app', 'Menu');\n ksort($parents);\n\n $Tabs = ArrayHelper::index(Tabs::find()->asArray()->all(), 'id');\n\n $items = Tabs::generateTree($Tabs, 0);\n\n return $this->render('create', [\n 'model' => $model,\n 'parents' => $parents,\n 'items' => $items,\n ]);\n }" ]
[ "0.7487054", "0.6603563", "0.6448827", "0.63951415", "0.6376598", "0.6342076", "0.63246083", "0.6316735", "0.62946516", "0.6253495", "0.6227628", "0.62228113", "0.61793476", "0.6155166", "0.61530346", "0.6118265", "0.6103463", "0.6070469", "0.6066338", "0.6050339", "0.59843427", "0.59528047", "0.591701", "0.58926606", "0.5891947", "0.58819485", "0.58720267", "0.584689", "0.5835146", "0.58297396", "0.5820008", "0.58167565", "0.580237", "0.57537824", "0.573061", "0.5706685", "0.5695175", "0.56874657", "0.5640662", "0.56345296", "0.5623697", "0.5612823", "0.56049496", "0.5588188", "0.55766475", "0.556772", "0.5557029", "0.55563027", "0.55361605", "0.5533483", "0.55326086", "0.55307084", "0.55175745", "0.5511534", "0.5508784", "0.550351", "0.54823816", "0.54737234", "0.5456711", "0.54522234", "0.5445022", "0.5438618", "0.5429678", "0.54267895", "0.54200584", "0.54189163", "0.5416505", "0.54150057", "0.5379553", "0.53727967", "0.5363681", "0.53521913", "0.53462726", "0.53315914", "0.53311217", "0.53293854", "0.53245884", "0.5302638", "0.52957374", "0.5290575", "0.5288918", "0.5285619", "0.52802503", "0.52767724", "0.5275335", "0.52667475", "0.5250827", "0.5247525", "0.5244297", "0.5238747", "0.5235012", "0.5222568", "0.52216864", "0.5221153", "0.5210254", "0.5206879", "0.52051485", "0.5202953", "0.520121", "0.5194386" ]
0.795176
0
Builds command buttons of the Wizard.
function buildButtons($disable = null, $commands = null) { $buttons = array('back', 'next', 'cancel', 'reset', 'dump', 'apply', 'process'); if (isset($commands)) { $buttons = array_merge($buttons, $commands); } if (!isset($disable)) { $disable = array(); } elseif (!isset($disable[0])) { $disable = array($disable); } $attributes = array('class' => 'cmdButton'); $confirm = array('class' => 'cmdButton', 'onclick' => "return(confirm('Are you sure ?'));"); $prevnext = array(); foreach ($buttons as $event) { switch ($event) { case 'cancel': $type = 'submit'; $attrs = $confirm; break; case 'reset': $type = 'reset'; $attrs = $confirm; break; default : $type = 'submit'; $attrs = $attributes; break; } if (in_array($event, $disable)) { $attrs['disabled'] = 'true'; } if ($event == 'dump') { $dump = $this->controller->_act[$event]; if ($dump === false) { continue; } $opts = array('1' => 'Progress2 dump info', '2' => 'Forms values container', '3' => 'Included Files', '4' => 'Declared Classes', '5' => 'Declared Actions'); $prevnext[] =&HTML_QuickForm::createElement('select', 'dumpOption', '', $opts); } $prevnext[] =&HTML_QuickForm::createElement($type, $this->getButtonName($event), ucfirst($event), HTML_Common::_getAttrString($attrs)); } $this->addGroup($prevnext, 'buttons', '', '&nbsp;', false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function generateButtons() {}", "public function addsButtons() {}", "protected function registerButtons() {}", "protected function registerButtons() {}", "protected function createButtons()\n {\n $buttonBar = $this->view->getModuleTemplate()->getDocHeaderComponent()->getButtonBar();\n\n $uriBuilder = $this->objectManager->get(UriBuilder::class);\n $uriBuilder->setRequest($this->request);\n\n if ($this->request->getControllerActionName() === 'index') {\n $toggleButton = $buttonBar->makeLinkButton()\n ->setHref('#')\n ->setDataAttributes([\n 'togglelink' => '1',\n 'toggle' => 'tooltip',\n 'placement' => 'bottom',\n ])\n ->setTitle($this->getLanguageService()->sL('LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:administration.toggleForm'))\n ->setIcon($this->iconFactory->getIcon('actions-filter', Icon::SIZE_SMALL));\n $buttonBar->addButton($toggleButton, ButtonBar::BUTTON_POSITION_LEFT, 1);\n }\n\n $buttons = [\n [\n 'table' => 'tx_news_domain_model_news',\n 'label' => 'module.createNewNewsRecord',\n 'action' => 'newNews',\n 'icon' => 'ext-news-type-default'\n ],\n [\n 'table' => 'tx_news_domain_model_tag',\n 'label' => 'module.createNewTag',\n 'action' => 'newTag',\n 'icon' => 'ext-news-tag'\n ],\n [\n 'table' => 'sys_category',\n 'label' => 'module.createNewCategory',\n 'action' => 'newCategory',\n 'icon' => 'mimetypes-x-sys_category'\n ]\n ];\n foreach ($buttons as $key => $tableConfiguration) {\n if ($this->showButton($tableConfiguration['table'])) {\n $title = $this->getLanguageService()->sL('LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:' . $tableConfiguration['label']);\n $viewButton = $buttonBar->makeLinkButton()\n ->setHref($uriBuilder->reset()->setRequest($this->request)->uriFor($tableConfiguration['action'],\n [], 'Administration'))\n ->setDataAttributes([\n 'toggle' => 'tooltip',\n 'placement' => 'bottom',\n 'title' => $title])\n ->setTitle($title)\n ->setIcon($this->iconFactory->getIcon($tableConfiguration['icon'], Icon::SIZE_SMALL, 'overlay-new'));\n $buttonBar->addButton($viewButton, ButtonBar::BUTTON_POSITION_LEFT, 2);\n }\n }\n\n $clipBoard = GeneralUtility::makeInstance(Clipboard::class);\n $clipBoard->initializeClipboard();\n $elFromTable = $clipBoard->elFromTable('tx_news_domain_model_news');\n if (!empty($elFromTable)) {\n $viewButton = $buttonBar->makeLinkButton()\n ->setHref($clipBoard->pasteUrl('', $this->pageUid))\n ->setOnClick('return ' . $clipBoard->confirmMsg('pages',\n BackendUtilityCore::getRecord('pages', $this->pageUid), 'into',\n $elFromTable))\n ->setTitle($this->getLanguageService()->sL('LLL:EXT:lang/locallang_mod_web_list.xlf:clip_pasteInto'))\n ->setIcon($this->iconFactory->getIcon('actions-document-paste-into', Icon::SIZE_SMALL));\n $buttonBar->addButton($viewButton, ButtonBar::BUTTON_POSITION_LEFT, 4);\n }\n\n // Refresh\n $path = VersionNumberUtility::convertVersionNumberToInteger(TYPO3_branch) >= VersionNumberUtility::convertVersionNumberToInteger('8.6') ? 'Resources/Private/Language/' : '';\n $refreshButton = $buttonBar->makeLinkButton()\n ->setHref(GeneralUtility::getIndpEnv('REQUEST_URI'))\n ->setTitle($this->getLanguageService()->sL('LLL:EXT:lang/' . $path . 'locallang_core.xlf:labels.reload'))\n ->setIcon($this->iconFactory->getIcon('actions-refresh', Icon::SIZE_SMALL));\n $buttonBar->addButton($refreshButton, ButtonBar::BUTTON_POSITION_RIGHT);\n }", "protected function makeButtons()\n {\n if ($this->MOD_SETTINGS['function'] == 1 || $this->MOD_SETTINGS['function'] == 2) {\n // Add CSH (Context Sensitive Help) icon to tool bar\n $contextSensitiveHelpButton = $this->buttonBar->makeHelpButton()\n ->setModuleName($this->descrTable)\n ->setFieldName('columns_' . $this->MOD_SETTINGS['function']);\n $this->buttonBar->addButton($contextSensitiveHelpButton);\n }\n $lang = $this->getLanguageService();\n // View page\n if (!VersionState::cast($this->pageinfo['t3ver_state'])->equals(VersionState::DELETE_PLACEHOLDER)) {\n $viewButton = $this->buttonBar->makeLinkButton()\n ->setOnClick(BackendUtility::viewOnClick($this->pageinfo['uid'], '', BackendUtility::BEgetRootLine($this->pageinfo['uid'])))\n ->setTitle($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.showPage'))\n ->setIcon($this->iconFactory->getIcon('actions-document-view', Icon::SIZE_SMALL))\n ->setHref('#');\n\n $this->buttonBar->addButton($viewButton, ButtonBar::BUTTON_POSITION_LEFT, 3);\n }\n // Shortcut\n $shortcutButton = $this->buttonBar->makeShortcutButton()\n ->setModuleName($this->moduleName)\n ->setGetVariables([\n 'id',\n 'M',\n 'edit_record',\n 'pointer',\n 'new_unique_uid',\n 'search_field',\n 'search_levels',\n 'showLimit'\n ])\n ->setSetVariables(array_keys($this->MOD_MENU));\n $this->buttonBar->addButton($shortcutButton);\n\n // Cache\n if (empty($this->modTSconfig['properties']['disableAdvanced'])) {\n $clearCacheButton = $this->buttonBar->makeLinkButton()\n ->setHref(BackendUtility::getModuleUrl($this->moduleName, ['id' => $this->pageinfo['uid'], 'clear_cache' => '1']))\n ->setTitle($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.clear_cache'))\n ->setIcon($this->iconFactory->getIcon('actions-system-cache-clear', Icon::SIZE_SMALL));\n $this->buttonBar->addButton($clearCacheButton, ButtonBar::BUTTON_POSITION_RIGHT, 1);\n }\n if (empty($this->modTSconfig['properties']['disableIconToolbar'])) {\n // Edit page properties and page language overlay icons\n if ($this->pageIsNotLockedForEditors() && $this->getBackendUser()->checkLanguageAccess(0)) {\n // Edit localized page_language_overlay only when one specific language is selected\n if ($this->MOD_SETTINGS['function'] == 1 && $this->current_sys_language > 0) {\n $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)\n ->getQueryBuilderForTable('pages_language_overlay');\n $queryBuilder->getRestrictions()\n ->removeAll()\n ->add(GeneralUtility::makeInstance(DeletedRestriction::class))\n ->add(GeneralUtility::makeInstance(BackendWorkspaceRestriction::class));\n $overlayRecord = $queryBuilder\n ->select('uid')\n ->from('pages_language_overlay')\n ->where(\n $queryBuilder->expr()->eq(\n 'pid',\n $queryBuilder->createNamedParameter($this->id, \\PDO::PARAM_INT)\n ),\n $queryBuilder->expr()->eq(\n 'sys_language_uid',\n $queryBuilder->createNamedParameter($this->current_sys_language, \\PDO::PARAM_INT)\n )\n )\n ->setMaxResults(1)\n ->execute()\n ->fetch();\n // Edit button\n $urlParameters = [\n 'edit' => [\n 'pages_language_overlay' => [\n $overlayRecord['uid'] => 'edit'\n ]\n ],\n 'returnUrl' => GeneralUtility::getIndpEnv('REQUEST_URI')\n ];\n $url = BackendUtility::getModuleUrl('record_edit', $urlParameters);\n $editLanguageButton = $this->buttonBar->makeLinkButton()\n ->setHref($url)\n ->setTitle($lang->getLL('editPageLanguageOverlayProperties'))\n ->setIcon($this->iconFactory->getIcon('mimetypes-x-content-page-language-overlay', Icon::SIZE_SMALL));\n $this->buttonBar->addButton($editLanguageButton, ButtonBar::BUTTON_POSITION_LEFT, 3);\n }\n $urlParameters = [\n 'edit' => [\n 'pages' => [\n $this->id => 'edit'\n ]\n ],\n 'returnUrl' => GeneralUtility::getIndpEnv('REQUEST_URI')\n ];\n $url = BackendUtility::getModuleUrl('record_edit', $urlParameters);\n $editPageButton = $this->buttonBar->makeLinkButton()\n ->setHref($url)\n ->setTitle($lang->getLL('editPageProperties'))\n ->setIcon($this->iconFactory->getIcon('actions-page-open', Icon::SIZE_SMALL));\n $this->buttonBar->addButton($editPageButton, ButtonBar::BUTTON_POSITION_LEFT, 3);\n }\n }\n }", "protected function generateButtons()\n {\n $arrButtons = array();\n\n // Add \"update cart\" button\n $arrButtons['update'] = array(\n 'type' => 'submit',\n 'name' => 'button_update',\n 'label' => $GLOBALS['TL_LANG']['MSC']['updateCartBT'],\n );\n\n // Add button to cart button (usually if not on the cart page)\n if ($this->iso_cart_jumpTo > 0) {\n $objJumpToCart = \\PageModel::findByPk($this->iso_cart_jumpTo);\n\n if (null !== $objJumpToCart) {\n $arrButtons['cart'] = array(\n 'type' => 'submit',\n 'name' => 'button_cart',\n 'label' => $GLOBALS['TL_LANG']['MSC']['cartBT'],\n 'href' => \\Controller::generateFrontendUrl($objJumpToCart->row()),\n );\n\n if (\\Input::post('FORM_SUBMIT') == $this->strFormId && \\Input::post('button_cart') != '') {\n $this->jumpToOrReload($this->iso_cart_jumpTo);\n }\n }\n }\n\n // Add button to checkout page\n if ($this->iso_checkout_jumpTo > 0 && !Isotope::getCart()->hasErrors()) {\n $objJumpToCheckout = \\PageModel::findByPk($this->iso_checkout_jumpTo);\n\n if (null !== $objJumpToCheckout) {\n $arrButtons['checkout'] = array(\n 'type' => 'submit',\n 'name' => 'button_checkout',\n 'label' => $GLOBALS['TL_LANG']['MSC']['checkoutBT'],\n 'href' => \\Controller::generateFrontendUrl($objJumpToCheckout->row()),\n );\n\n if (\\Input::post('FORM_SUBMIT') == $this->strFormId && \\Input::post('button_checkout') != '') {\n $this->jumpToOrReload($this->iso_checkout_jumpTo);\n }\n }\n }\n\n if ($this->iso_continueShopping && $this->Input->get('continue') != '') {\n $arrButtons['continue'] = array(\n 'type' => 'submit',\n 'name' => 'button_continue',\n 'label' => $GLOBALS['TL_LANG']['MSC']['continueShoppingBT'],\n 'href' => ampersand(base64_decode($this->Input->get('continue', true))),\n );\n\n if (\\Input::post('FORM_SUBMIT') == $this->strFormId && \\Input::post('button_continue') != '') {\n \\Controller::redirect($arrButtons['continue']['href']);\n }\n }\n\n return $arrButtons;\n }", "public function generate()\n\t{\n if (is_array($GLOBALS['TL_JAVASCRIPT']))\n\t\t{\n\t\t\tarray_insert($GLOBALS['TL_JAVASCRIPT'], 1, 'bundles/hschottmtextwizard/js/textwizard.min.js');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$GLOBALS['TL_JAVASCRIPT'] = array('bundles/hschottmtextwizard/js/textwizard.min.js');\n\t\t}\n\n\t\t$arrButtons = array('new', 'copy', 'delete', 'drag');\n\t\t// Make sure there is at least an empty array\n\t\tif (empty($this->varValue) || !\\is_array($this->varValue))\n\t\t{\n\t\t\t$this->varValue = array('');\n\t\t}\n\t\t// Initialize the tab index\n\t\tif (!\\Cache::has('tabindex'))\n\t\t{\n\t\t\t\\Cache::set('tabindex', 1);\n\t\t}\n\n $hasTitles = array_key_exists('buttonTitles', $this->arrConfiguration) && is_array($this->arrConfiguration['buttonTitles']);\n\n $return = ($this->wizard) ? '<div class=\"tl_wizard\">' . $this->wizard . '</div>' : '';\n\t\t$return .= '<ul id=\"ctrl_'.$this->strId.'\" class=\"tl_listwizard tl_textwizard\">';\n\t\t// Add input fields\n\t\tfor ($i=0, $c=\\count($this->varValue); $i<$c; $i++)\n\t\t{\n\t\t\t$return .= '\n <li><input type=\"text\" name=\"'.$this->strId.'[]\" class=\"tl_text\" value=\"'.\\StringUtil::specialchars($this->varValue[$i]).'\"' . $this->getAttributes() . '> ';\n\t\t\t// Add buttons\n\t\t\tforeach ($arrButtons as $button)\n\t\t\t{\n\t\t\t\tif ($button == 'drag')\n\t\t\t\t{\n\t\t\t\t\t$return .= ' <button type=\"button\" class=\"drag-handle\" title=\"' . \\StringUtil::specialchars($GLOBALS['TL_LANG']['MSC']['move']) . '\" aria-hidden=\"true\">' . \\Image::getHtml('drag.svg') . '</button>';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n $buttontitle = ($hasTitles && array_key_exists($button, $this->arrConfiguration['buttonTitles'])) ? $this->arrConfiguration['buttonTitles'][$button] : $GLOBALS['TL_LANG']['MSC']['lw_'.$button];\n\t\t\t\t\t$return .= ' <button type=\"button\" data-command=\"' . $button . '\" title=\"' . \\StringUtil::specialchars($buttontitle) . '\">' . \\Image::getHtml($button.'.svg') . '</button>';\n\t\t\t\t}\n\t\t\t}\n\t\t\t$return .= '</li>';\n\t\t}\n\t\treturn $return.'\n </ul>\n <script>TextWizard.textWizard(\"ctrl_'.$this->strId.'\")</script>';\n\t}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "function buildTabs()\r\n {\r\n $this->_formBuilt = true;\r\n\r\n // Here we get all page names in the controller\r\n $pages = array();\r\n $myName = $current = $this->getAttribute('id');\r\n while (null !== ($current = $this->controller->getPrevName($current))) {\r\n $pages[] = $current;\r\n }\r\n $pages = array_reverse($pages);\r\n $pages[] = $current = $myName;\r\n while (null !== ($current = $this->controller->getNextName($current))) {\r\n $pages[] = $current;\r\n }\r\n // Here we display buttons for all pages, the current one's is disabled\r\n foreach ($pages as $pageName) {\r\n $disabled = ($pageName == $myName ? array('disabled' => 'disabled')\r\n : array());\r\n\r\n $tabs[] = $this->createElement('submit',\r\n $this->getButtonName($pageName),\r\n ucfirst($pageName),\r\n array('class' => 'flat') + $disabled);\r\n }\r\n $this->addGroup($tabs, 'tabs', null, '&nbsp;', false);\r\n }", "protected function compileButtons($data)\n {\n $btnPrev = $btnNext = '';\n $prev = isset($data['prev_btn']) ? $data['prev_btn'] : null;\n $next = isset($data['next_btn']) ? $data['next_btn'] : null;\n\n if ($prev) {\n if ($prev['type'] == 'default') {\n\n $tabIndex = \\FluentForm\\App\\Helpers\\Helper::getNextTabIndex();\n $tabIndexHtml = '';\n if($tabIndex) {\n $tabIndexHtml = \"tabindex='\".$tabIndex.\"' \";\n }\n $btnPrev = \"<button \".$tabIndexHtml.\" type='button' data-action='prev' class='ff-btn ff-btn-prev ff-btn-secondary'>\" . $prev['text'] . \"</button>\";\n } else {\n $btnPrev = \"<img data-action='prev' class='prev ff-btn-prev ff_pointer' src={$prev['img_url']}>\";\n }\n }\n\n if ($next) {\n\n if ($next['type'] == 'default') {\n $tabIndex = \\FluentForm\\App\\Helpers\\Helper::getNextTabIndex();\n $tabIndexHtml = '';\n if($tabIndex) {\n $tabIndexHtml = \"tabindex='\".$tabIndex.\"' \";\n }\n $btnNext = \"<button \".$tabIndexHtml.\" type='button' data-action='next' class='ff-float-right ff-btn ff-btn-next ff-btn-secondary'>\" . $next['text'] . \"</button>\";\n } else {\n $btnNext = \"<img data-action='next' class='next ff-btn-next ff_pointer' src={$next['img_url']}>\";\n }\n }\n\n return \"<div class='step-nav ff_step_nav_last'>{$btnPrev}{$btnNext}</div>\";\n }", "public function build_controls()\n\t{\n\t\t$this->add_control( 'title', [\n\t\t\t'label' => __( 'Title' )\n\t\t] );\n\t\t$this->add_control( 'content', [\n\t\t\t'label' => __( 'Content' ),\n\t\t\t'type' => 'textarea'\n\t\t] );\n\t\t$this->add_control( 'link_url', [\n\t\t\t'label' => __( 'URL' )\n\t\t] );\n\t\t$this->add_control( 'link_text', [\n\t\t\t'label' => __( 'Link Text' )\n\t\t] );\n\t\t$this->add_control( 'link_target', [\n\t\t\t'label' => __( 'Open link in a new window/tab' ),\n\t\t\t'type' => 'checkbox',\n\t\t\t'value' => '1'\n\t\t] );\n\t}", "protected function prepareButtons()\n\t{\n\t\tparent::prepareButtons();\n\t\t$this->xt->assign(\"save_button\", false);\n\t\t$this->xt->assign(\"view_page_button\", false );\n\t\t\n\t\t$this->xt->assign(\"updsel_button\", true);\n\t\t$this->xt->assign(\"updselbutton_attrs\", \"id=\\\"saveButton\".$this->id.\"\\\"\" );\n\t\t\n\t\t$label = str_replace( \"%n%\", $this->nSelected, \"Update %n% records\" );\n\t\t$this->xt->assign(\"update_selected\", $label );\n\t}", "protected function buttons()\r\n\t{\r\n\t\t$this->buttons = new stdClass();\r\n\t\t$buttonProperties = array('class' => 'fabrikTip', 'opts' => \"{notice:true}\", 'title' => '<span>'.JText::_('COM_FABRIK_EXPORT_TO_CSV').'</span>');\r\n\t\t$this->buttons->csvexport = FabrikHelperHTML::image('csv-export.png', 'list', $this->tmpl, $buttonProperties);\r\n\t\t$buttonProperties['title'] = '<span>'.JText::_('COM_FABRIK_IMPORT_FROM_CSV').'</span>';\r\n\t\t$this->buttons->csvimport = FabrikHelperHTML::image('csv-import.png', 'list', $this->tmpl, $buttonProperties);\r\n\t\t$buttonProperties['title'] = '<span>'.JText::_('COM_FABRIK_SUBSCRIBE_RSS').'</span>';\r\n\t\t$this->buttons->feed = FabrikHelperHTML::image('feed.png', 'list', $this->tmpl, $buttonProperties);\r\n\t\t$buttonProperties['title'] = '<span>'.JText::_('COM_FABRIK_EMPTY').'</span>';\r\n\t\t$this->buttons->empty = FabrikHelperHTML::image('trash.png', 'list', $this->tmpl, $buttonProperties);\r\n\r\n\t\t$buttonProperties['title'] = '<span>'.JText::_('COM_FABRIK_GROUP_BY').'</span>';\r\n\t\t$this->buttons->groupby = FabrikHelperHTML::image('group_by.png', 'list', $this->tmpl, $buttonProperties);\r\n\r\n\t\t$buttonProperties['title'] = '<span>'.JText::_('COM_FABRIK_FILTER').'</span>';\r\n\t\t$this->buttons->filter = FabrikHelperHTML::image('filter.png', 'list', $this->tmpl, $buttonProperties);\r\n\r\n\t\t$buttonProperties['title'] = '<span>'.JText::_('COM_FABRIK_ADD').'</span>';\r\n\t\t$this->buttons->add = FabrikHelperHTML::image('add.png', 'list', $this->tmpl, $buttonProperties);\r\n\t}", "protected function getButtons()\n {\n $buttonBar = $this->moduleTemplate->getDocHeaderComponent()->getButtonBar();\n // Shortcut\n $shortcutButton = $buttonBar->makeShortcutButton()\n ->setModuleName($this->MCONF['name'])\n ->setGetVariables(array('id', 'M'));\n $buttonBar->addButton($shortcutButton);\n }", "protected function getButtons()\t{\n\n\t\t$buttons = array(\n\t\t\t'csh' => '',\n\t\t\t'shortcut' => '',\n\t\t\t'save' => ''\n\t\t);\n\t\t\t// CSH\n\t\t$buttons['csh'] = t3lib_BEfunc::cshItem('_MOD_web_func', '', $GLOBALS['BACK_PATH']);\n\n\t\t\t// SAVE button\n\t\t// $buttons['save'] = '<input type=\"image\" class=\"c-inputButton\" name=\"submit\" value=\"Update\"' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/savedok.gif', '') . ' title=\"' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.saveDoc', 1) . '\" />';\n\n\n\t\t\t// Shortcut\n\t\tif ($GLOBALS['BE_USER']->mayMakeShortcut())\t{\n\t\t\t$buttons['shortcut'] = $this->doc->makeShortcutIcon('', 'function', $this->MCONF['name']);\n\t\t}\n\n\t\treturn $buttons;\n\t}", "protected function buildBottomControls(){\n\t\techo '<div class=\"btn-row\">';\n\n\t\t\t$class = 'edit-btn section-btn';\n\t\t\tif( !$this->hasLightbox )\n\t\t\t\t$class .= ' no-lightbox';\n\n\t\t\techo '<button class=\"'.esc_attr( $class ).'\" id=\"lightbox-btn\">';\n\t\t\t\techo '<span class=\"dashicons dashicons-edit\"></span>';\n\t\t\t\t_e( 'Edit', 'chefsections' );\n\t\t\techo '</button>';\n\n\t\t\t$this->buildTemplateSnitch();\n\n\t\techo '</div>';\n\t}", "public function build()\n {\n return '<button type=\"menu\" ><![CDATA['.$this->content.']]></button>';\n }", "function drawButtonsDefault() {\r\n global $objectClass, $planningType, $showListFilter;\r\n ?>\r\n <table style=\"width:10px\">\r\n <tr>\r\n <?php \r\n if ($planningType=='planning' or $planningType=='resource' or $planningType=='global' or $planningType=='version') {?>\r\n <td colspan=\"1\" width=\"51px\" style=\"<?php if (isNewGui()) echo 'padding-right: 5px;';?>\">\r\n <?php // ================================================================= NEW ?>\r\n <?php if ($planningType=='version') {?><div id =\"addNewActivity\" style=\"visibility:<?php echo ($showListFilter=='true')?'visible':'hidden';?>;\"><?php } ?>\r\n <div dojoType=\"dijit.form.DropDownButton\"\r\n class=\"comboButton\" \r\n id=\"planningNewItem\" jsId=\"planningNewItem\" name=\"planningNewItem\" \r\n showlabel=\"false\" class=\"\" iconClass=\"dijitButtonIcon dijitButtonIconNew\"\r\n title=\"<?php echo i18n('comboNewButton');?>\">\r\n <span>title</span>\r\n <div dojoType=\"dijit.TooltipDialog\" class=\"white\" style=\"width:200px;\"> \r\n <div style=\"font-weight:bold; height:25px;text-align:center\"><?php echo i18n('comboNewButton');?> </div>\r\n <?php \r\n $arrayItems=array('Project','Activity','Milestone','Meeting','PeriodicMeeting','TestSession');\r\n if ($planningType=='resource' or $planningType=='version') $arrayItems=array('Activity');\r\n if ($planningType=='global') $arrayItems=array_merge($arrayItems,array('Ticket','Action','Decision','Delivery','Risk','Issue','Opportunity','Question'));\r\n foreach($arrayItems as $item) {\r\n $canCreate=securityGetAccessRightYesNo('menu' . $item,'create');\r\n if ($canCreate=='YES') {\r\n if (! securityCheckDisplayMenu(null,$item) ) {\r\n $canCreate='NO';\r\n }\r\n }\r\n if ($canCreate=='YES') {?>\r\n <div style=\"vertical-align:top;cursor:pointer;\" class=\"newGuiIconText\"\r\n onClick=\"addNewItem('<?php echo $item;?>');\" >\r\n <table width:\"100%\"><tr style=\"height:22px\" >\r\n <td style=\"vertical-align:top; width: 30px;padding-left:5px\"><?php echo formatIcon($item, 22, null, false);;?></td> \r\n <td style=\"vertical-align:top;padding-top:2px\"><?php echo i18n($item)?></td>\r\n </tr></table> \r\n </div>\r\n <div style=\"height:5px;\"></div>\r\n <?php \r\n } \r\n }?>\r\n </div>\r\n </div>\r\n <?php if ($planningType=='version') {?></div><?php } ?> \r\n </td> \r\n <?php\r\n } \r\n if ($planningType=='global') {?>\r\n <td colspan=\"1\" width=\"51px\" style=\"<?php if (isNewGui()) echo 'padding-right: 5px;';?>\">\r\n <?php drawGlobalItemsSelector();?>\r\n </td> \r\n <?php \r\n } \r\n $activeFilter=false;\r\n if (is_array(getSessionUser()->_arrayFilters)) {\r\n if (array_key_exists('Planning', getSessionUser()->_arrayFilters)) {\r\n if (count(getSessionUser()->_arrayFilters['Planning'])>0) {\r\n \t foreach (getSessionUser()->_arrayFilters['Planning'] as $filter) {\r\n \t\t if (!isset($filter['isDynamic']) or $filter['isDynamic']==\"0\") {\r\n \t\t\t $activeFilter=true;\r\n \t\t }\r\n \t }\r\n }\r\n }\r\n }\r\n ?>\r\n <?php \r\n if ($planningType=='planning' or $planningType=='resource' or $planningType=='version') {?>\r\n <td colspan=\"1\" width=\"55px\" style=\"padding-left:1px\";>\r\n <?php // ================================================================= FILTER ?>\r\n <?php if ($planningType=='version') {?><div id=\"listFilterAdvanced\" style=\"visibility:<?php echo ($showListFilter=='true')?'visible':'hidden';?>;\"><?php }?>\r\n <button title=\"<?php echo i18n('advancedFilter')?>\" \r\n class=\"comboButton\"\r\n dojoType=\"dijit.form.DropDownButton\" \r\n id=\"listFilterFilter\" name=\"listFilterFilter\"\r\n iconClass=\"dijitButtonIcon icon<?php echo($activeFilter)?'Active':'';?>Filter\" showLabel=\"false\">\r\n <?php \r\n if(!isNewGui()){?>\r\n <script type=\"dojo/connect\" event=\"onClick\" args=\"evt\">\r\n showFilterDialog();\r\n </script>\r\n <script type=\"dojo/method\" event=\"onMouseEnter\" args=\"evt\">\r\n clearTimeout(closeFilterListTimeout);\r\n clearTimeout(openFilterListTimeout);\r\n openFilterListTimeout=setTimeout(\"dijit.byId('listFilterFilter').openDropDown();\",popupOpenDelay);\r\n </script>\r\n <script type=\"dojo/method\" event=\"onMouseLeave\" args=\"evt\">\r\n clearTimeout(openFilterListTimeout);\r\n closeFilterListTimeout=setTimeout(\"dijit.byId('listFilterFilter').closeDropDown();\",2000);\r\n </script>\r\n <?php \r\n }?>\r\n <div dojoType=\"dijit.TooltipDialog\" id=\"directFilterList\" style=\"z-index: 999999;<!-- display:none; --> position: absolute;\">\r\n <?php \r\n $objectClass='Planning';\r\n $dontDisplay=true;\r\n if(isNewGui())include \"../tool/displayQuickFilterList.php\";\r\n include \"../tool/displayFilterList.php\";\r\n if(!isNewGui()){?>\r\n <script type=\"dojo/method\" event=\"onMouseEnter\" args=\"evt\">\r\n clearTimeout(closeFilterListTimeout);\r\n clearTimeout(openFilterListTimeout);\r\n </script>\r\n <script type=\"dojo/method\" event=\"onMouseLeave\" args=\"evt\">\r\n dijit.byId('listFilterFilter').closeDropDown();\r\n </script>\r\n <?php \r\n }?>\r\n </div> \r\n </button>\r\n <?php if ($planningType=='version') {?></div><?php }?>\r\n </td>\r\n <?php \r\n }?> \r\n <td colspan=\"1\">\r\n <?php // ================================================================= COLUMNS SELECTOR ?> \r\n <div dojoType=\"dijit.form.DropDownButton\"\r\n id=\"planningColumnSelector\" jsId=\"planningColumnSelector\" name=\"planningColumnSelector\" \r\n showlabel=\"false\" class=\"comboButton\" iconClass=\"dijitButtonIcon dijitButtonIconColumn\" \r\n title=\"<?php echo i18n('columnSelector');?>\">\r\n <span>title</span>\r\n <?php \r\n $screenHeight=getSessionValue('screenHeight','1080');\r\n $columnSelectHeight=intval($screenHeight*0.6);?>\r\n <div dojoType=\"dijit.TooltipDialog\" id=\"planningColumnSelectorDialog\" class=\"white\" style=\"width:300px;\"> \r\n <script type=\"dojo/connect\" event=\"onHide\" data-dojo-args=\"evt\">\r\n if (dndMoveInProgress) { setTimeout('dijit.byId(\"planningColumnSelector\").openDropDown();',1); }\r\n </script>\r\n <div id=\"dndPlanningColumnSelector\" jsId=\"dndPlanningColumnSelector\" dojotype=\"dojo.dnd.Source\" \r\n dndType=\"column\" style=\"overflow-y:auto; max-height:<?php echo $columnSelectHeight;?>px; position:relative\"\r\n withhandles=\"true\" class=\"container\"> \r\n <?php \r\n if ($planningType=='portfolio') $portfolioPlanning=true;\r\n if ($planningType=='contract') $contractGantt=true;\r\n if ($planningType=='version') $versionPlanning=true;\r\n include('../tool/planningColumnSelector.php');?>\r\n </div>\r\n <div style=\"height:5px;\"></div> \r\n <div style=\"text-align: center;\"> \r\n <button title=\"\" dojoType=\"dijit.form.Button\" \r\n id=\"\" name=\"\" showLabel=\"true\"><?php echo i18n('buttonOK');?>\r\n <script type=\"dojo/connect\" event=\"onClick\" args=\"evt\">\r\n validatePlanningColumn();\r\n </script>\r\n </button>\r\n </div> \r\n </div>\r\n </div>\r\n </td>\r\n </tr>\r\n </table>\r\n<?php \r\n}", "private function setButtons()\n {\n $this->createFolderButton = config('godesk.filemanager.buttons.create_folder', true);\n $this->uploadButton = config('godesk.filemanager.buttons.upload_button', true);\n $this->dragAndDropUpload = config('godesk.filemanager.buttons.upload_drag', true);\n $this->renameFolderButton = config('godesk.filemanager.buttons.rename_folder', true);\n $this->deleteFolderButton = config('godesk.filemanager.buttons.delete_folder', true);\n $this->renameFileButton = config('godesk.filemanager.buttons.rename_file', true);\n $this->deleteFileButton = config('godesk.filemanager.buttons.delete_file', true);\n $this->downloadFileButton = config('godesk.filemanager.buttons.download_file', true);\n }", "private function loadButtons()\n {\n $objAdd = $this->addButtonNew(_FEST);\n $objAdd->setInline();\n }", "public function getButtons() {}", "public function getButtons() {}", "public function getButtons() {}", "public function getButtons() {}", "protected function initDefaultButtons()\n\t{\n\t\tif($this->inputFieldName===null)\n\t\t\t$this->inputFieldName='priority[]';\n\t\tif($this->upButtonLabel===null)\n\t\t\t$this->upButtonLabel=Yii::t('zii','Up');\n\t\tif($this->downButtonLabel===null)\n\t\t\t$this->downButtonLabel=Yii::t('zii','Down');\n\t\tif($this->upButtonImageUrl===null)\n\t\t\t$this->upButtonImageUrl=$this->grid->enhancedScriptUrl.'/up.png';\n\t\tif($this->downButtonImageUrl===null)\n\t\t\t$this->downButtonImageUrl=$this->grid->enhancedScriptUrl.'/down.png';\n\t\t\n\t\t// input text\n\t\tforeach(array('input') as $id)\n\t\t{\n\t\t\t$button=array(\n\t\t\t\t'name'=>$this->{$id.'FieldName'},\n\t\t\t\t'options'=>$this->{$id.'FieldOptions'},\n\t\t\t);\n\t\t\tif(isset($this->buttons[$id]))\n\t\t\t\t$this->buttons[$id]=array_merge($button,$this->buttons[$id]);\n\t\t\telse\n\t\t\t\t$this->buttons[$id]=$button;\n\t\t}\n\t\t// image button\n\t\tforeach(array('up','down') as $id)\n\t\t{\n\t\t\t$button=array(\n\t\t\t\t'label'=>$this->{$id.'ButtonLabel'},\n\t\t\t\t'url'=>$this->{$id.'ButtonUrl'},\n\t\t\t\t'imageUrl'=>$this->{$id.'ButtonImageUrl'},\n\t\t\t\t'options'=>$this->{$id.'ButtonOptions'},\n\t\t\t);\n\t\t\tif(isset($this->buttons[$id]))\n\t\t\t\t$this->buttons[$id]=array_merge($button,$this->buttons[$id]);\n\t\t\telse\n\t\t\t\t$this->buttons[$id]=$button;\n\t\t}\n\t}", "function makeCommandButton( $command, $text )\r\n{\r\n\treturn \"<button name=commandButton id=btn_$command onclick=\\\"\" .\r\n\t\t\"rows = document.getElementsByName( 'commandButton' ); \" .\r\n\t\t\"for (i=0; i<rows.length; i++) rows[i].disabled = true; \" .\r\n\t\t\"sendCommand( '\" . urlencode( $command ) . \"', '', true ); \" .\r\n\t\t\"return false;\" .\r\n\t\t\"\\\" style=\\\"\\\">$text</button>\";\r\n}", "protected function _addButtons()\r\n\t{\r\n\t\t$model = $this->getModel();\r\n\t\t$params\t= $model->getParams();\r\n\t\t$this->showEmail = $params->get('email', 0);\r\n\t\t$this->emailLink = '';\r\n\t\t$this->printLink = '';\r\n\t\t$this->pdfLink = '';\r\n\t\t$this->showPrint = $params->get('print', 0);\r\n\r\n\t\tif ($this->showPrint) {\r\n\t\t\t$text = JHTML::_('image.site', 'printButton.png', '/images/', NULL, NULL, JText::_('Print'));\r\n\t\t\t$this->printLink = '<a href=\"#\" onclick=\"window.print();return false;\">'.$text.'</a>';\r\n\t\t}\r\n\r\n\t\tif (JRequest::getVar('tmpl') != 'component') {\r\n\t\t\tif ($this->showEmail) {\r\n\t\t\t\t$this->emailLink = FabrikHelperHTML::emailIcon($model, $params);\r\n\t\t\t}\r\n\r\n\t\t\tif ($this->showPrint) {\r\n\t\t\t\t$this->printLink = FabrikHelperHTML::printIcon($model, $params, $model->_rowId);\r\n\t\t\t}\r\n\r\n\t\t\t$this->showPDF = $params->get('pdf', 0);\r\n\t\t\tif ($this->showPDF) {\r\n\t\t\t\t$this->pdfLink = FabrikHelperHTML::pdfIcon($model, $params, $model->_rowId);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$this->showPDF = false;\r\n\t\t}\r\n\t}", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: save PHP/CSS code');\r\n\r\n $code[] =& $this->createElement('checkbox', 'P', null, 'PHP');\r\n $code[] =& $this->createElement('checkbox', 'C', null, 'CSS');\r\n $this->addGroup($code, 'phpcss', 'PHP and/or StyleSheet source code:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('next','apply'));\r\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: run demo');\r\n\r\n $this->addElement('static', 'progressBar',\r\n 'Your progress meter looks like:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('reset','process'));\r\n }", "protected function changeButtons()\n {\n $helper = Mage::helper('fraisrconnect/data');\n $urlModel = Mage::getModel('adminhtml/url');\n \n $this->_removeButton('add');\n\n //Add cause sync button\n $this->_addButton('cause_synchronisation', array(\n 'label' => $helper->__('Synchronize causes'),\n 'onclick' => 'setLocation(\\'' . $urlModel->getUrl('fraisrconnect/adminhtml_synchronisation/cause') .'\\')',\n 'class' => 'add',\n ));\n\n //Add category sync button\n $this->_addButton('category_synchronisation', array(\n 'label' => $helper->__('Synchronize categories'),\n 'onclick' => 'setLocation(\\'' . $urlModel->getUrl('fraisrconnect/adminhtml_synchronisation/category') .'\\')',\n 'class' => 'add',\n ));\n\n //Add mark products to sync button\n $this->_addButton('product_mark_to_synchronisation', array(\n 'label' => $helper->__('Mark products as to synchronize'),\n 'onclick' => 'setLocation(\\'' . $urlModel->getUrl('fraisrconnect/adminhtml_synchronisation/markProduct') .'\\')',\n 'class' => 'add',\n ));\n\n //Add product sync button\n $this->_addButton('product_synchronisation', array(\n 'label' => $helper->__('Synchronize products'),\n 'onclick' => 'setLocation(\\'' . $urlModel->getUrl('fraisrconnect/adminhtml_synchronisation/product') .'\\')',\n 'class' => 'add',\n ));\n\n //Add order sync button\n $this->_addButton('order_synchronisation', array(\n 'label' => $helper->__('Synchronize orders'),\n 'onclick' => 'setLocation(\\'' . $urlModel->getUrl('fraisrconnect/adminhtml_synchronisation/order') .'\\')',\n 'class' => 'add',\n ));\n }", "public function generateCommands();", "function listButtons() {\n\t}", "public function makeSplitButton() {}", "private function createButton() {\n $fv = new filterVars;\n $phpSelf = $fv->phpSelf();\n\t$addButton = \"<A HREF='$phpSelf?action=crf'><button title='Create Row'>Create Row</button></A>\"; \n return $addButton; \n }", "public function buttons()\n\t{\n\t\t//sufficient authority\n\t\tif ($this->authority === '1')\n\t\t\treturn parent::buttons();\n\n\t\t//insufficient authority\n\t\telse\n\t\t{\n\t\t\t$button = \n\t\t\t\t'<div class=\"view-b\">\n\t\t\t\t\t<button type=\"submit\" name=\"action\" value=\"Edit\" class=\"btn\"\n\t\t\t\t\t\t>View</button>\n\t\t\t\t</div>'\n\t\t\t;\n\n\t\t\treturn $button;\n\n\t\t} //end insufficient authority\n\t\n\t}", "public function getButtons() {\n return [\n 'StylesheetParser' => [\n 'label' => t('Parse a stylesheet for CSS classes.'),\n 'image' => drupal_get_path('module', 'ckeditor_stylesheetparser') . '/js/plugins/stylesheetparser/icons/hidpi/stylesheet.png',\n ],\n ];\n }", "public function addButtons()\n {\n if (!Mage::getSingleton('sheep_subscription/adminhtml_acl')->canEditSubscription()) {\n return;\n }\n\n /** @var Sheep_Subscription_Model_Subscription $subscription */\n $subscription = $this->_getModel();\n /** @var Sheep_Subscription_Model_Service $service */\n $service = Mage::getSingleton('sheep_subscription/service');\n\n if ($service->canBeCancelled($subscription)) {\n $this->addButton('cancel', array(\n 'label' => 'Cancel',\n 'onclick' => \"window.setLocation('{$this->getCancelUrl()}')\"\n ));\n }\n\n if ($service->canBePaused($subscription)) {\n $this->addButton('pause', array(\n 'label' => $this->__('Pause'),\n 'onclick' => \"window.setLocation('{$this->getPauseUrl()}')\"\n ));\n }\n\n if ($service->canBeResumed($subscription)) {\n $this->addButton('resume', array(\n 'label' => 'Resume',\n 'onclick' => \"window.setLocation('{$this->getResumeUrl()}')\"\n ));\n }\n }", "public function makeHelpButton() {}", "public function makeShortcutButton() {}", "protected function buildButtonsAddMode() {\n $moduleHandler = \\Drupal::service('module_handler');\n $add_mode = $this->getSetting('add_mode');\n $add_more_elements = parent::buildButtonsAddMode();\n\n if ($moduleHandler->moduleExists('micon_paragraphs')) {\n $options = $this->getAccessibleOptions();\n foreach ($options as $machine_name => $label) {\n $button_key = 'add_more_button_' . $machine_name;\n $add_more_elements[$button_key]['#type'] = 'ux_button';\n $add_more_elements[$button_key]['#ajax']['event'] = 'click';\n $add_more_elements[$button_key]['#attributes']['data-uxaside-close'] = '';\n if ($add_mode != 'modal') {\n $add_more_elements[$button_key]['#wrapper_attributes']['class'][] = 'button';\n }\n if ($icon = micon($label)->addMatchPrefix('paragraphs')) {\n $add_more_elements[$button_key]['#label'] = $icon;\n }\n\n }\n }\n\n if ($add_mode == 'modal') {\n unset($add_more_elements['add_modal_form_area']);\n $add_more_elements['#type'] = 'ux_aside_container';\n }\n\n return $add_more_elements;\n }", "protected function initDefaultButtons()\n {\n if (!isset($this->buttons['create'])) {\n $this->buttons['create'] = function ($url, $model, $key) {\n return Html::a('<span class=\"glyphicon glyphicon-plus\"></span>', $url, [\n 'title' => Yii::t('app','create'),\n 'class' => 'btn btn-default btn-xs'\n ]);\n };\n }\n if (!isset($this->buttons['view'])) {\n $this->buttons['view'] = function ($url, $model, $key) {\n return Html::a('<span class=\"glyphicon glyphicon-eye-open\"></span>', $url, [\n 'title' => Yii::t('app','Look'),\n 'class' => 'btn btn-default btn-xs'\n ]);\n };\n }\n if (!isset($this->buttons['update'])) {\n $this->buttons['update'] = function ($url, $model, $key) {\n return Html::a('<span class=\"glyphicon glyphicon-pencil\"></span>', $url, [\n 'title' => Yii::t('app','Update User'),\n 'class' => 'btn btn-default btn-xs'\n ]);\n };\n }\n if (!isset($this->buttons['delete'])) {\n $this->buttons['delete'] = function ($url, $model, $key) {\n return Html::a('<span class=\"glyphicon glyphicon-trash\"></span>', $url, [\n 'title' => Yii::t('app','Delete'),\n 'data-method' => 'post',\n 'data-confirm' => Yii::t('yii', 'Are you sure you want to delete this item?'),\n 'class' => 'btn btn-default btn-xs'\n ]);\n };\n }\n }", "public function getButtons() {\n $ret = \"\";\n $curURL = current_url();\n\n $ret .= <<<EOF\n <a href=\"{$curURL}?game_action=roll\">Kasta</a>\n <a href=\"{$curURL}?game_action=save\">Spara</a>\n <a href=\"{$curURL}?game_action=clear\">Starta om</a>\nEOF;\n\n return $ret;\n }", "function register_rich_buttons( $buttons )\n\t{\n\t\tarray_push( $buttons, \"|\", 'nymble_button' );\n\t\treturn $buttons;\n\t}", "private function createButtonsTab()\n {\n $tab = $this->createTab(\n 'buttons_tab',\n '__responsive_tab_buttons__',\n [\n 'attributes' => [\n 'autoScroll' => true,\n ],\n ]\n );\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 90]);\n $fieldSetButtons = $this->createFieldSet(\n 'buttons_fieldset',\n '__responsive_tab_buttons_fieldset_global__',\n ['attributes' => $attributes]\n );\n\n $fieldSetButtons->addElement(\n $this->createTextField(\n 'btn-font-size',\n '@btn-font-size',\n $this->themeFontDefaults['btn-font-size']\n )\n );\n $fieldSetButtons->addElement(\n $this->createTextField(\n 'btn-icon-size',\n '@btn-icon-size',\n $this->themeFontDefaults['btn-icon-size']\n )\n );\n\n $tab->addElement($fieldSetButtons);\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 200]);\n $fieldSetDefaultButtons = $this->createFieldSet(\n 'buttons_default_fieldset',\n '__responsive_tab_buttons_fieldset_default__',\n ['attributes' => $attributes]\n );\n\n $fieldSetDefaultButtons->addElement(\n $this->createColorPickerField(\n 'btn-default-top-bg',\n '@btn-default-top-bg',\n $this->themeColorDefaults['btn-default-top-bg']\n )\n );\n $fieldSetDefaultButtons->addElement(\n $this->createColorPickerField(\n 'btn-default-bottom-bg',\n '@btn-default-bottom-bg',\n $this->themeColorDefaults['btn-default-bottom-bg']\n )\n );\n $fieldSetDefaultButtons->addElement(\n $this->createColorPickerField(\n 'btn-default-hover-bg',\n '@btn-default-hover-bg',\n $this->themeColorDefaults['btn-default-hover-bg']\n )\n );\n $fieldSetDefaultButtons->addElement(\n $this->createColorPickerField(\n 'btn-default-text-color',\n '@btn-default-text-color',\n $this->themeColorDefaults['btn-default-text-color']\n )\n );\n $fieldSetDefaultButtons->addElement(\n $this->createColorPickerField(\n 'btn-default-hover-text-color',\n '@btn-default-hover-text-color',\n $this->themeColorDefaults['btn-default-hover-text-color']\n )\n );\n $fieldSetDefaultButtons->addElement(\n $this->createColorPickerField(\n 'btn-default-border-color',\n '@btn-default-border-color',\n $this->themeColorDefaults['btn-default-border-color']\n )\n );\n $fieldSetDefaultButtons->addElement(\n $this->createColorPickerField(\n 'btn-default-hover-border-color',\n '@btn-default-hover-border-color',\n $this->themeColorDefaults['btn-default-hover-border-color']\n )\n );\n\n $tab->addElement($fieldSetDefaultButtons);\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 170]);\n $fieldSetPrimaryButtons = $this->createFieldSet(\n 'buttons_primary_fieldset',\n '__responsive_tab_buttons_fieldset_primary__',\n ['attributes' => $attributes]\n );\n\n $fieldSetPrimaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-primary-top-bg',\n '@btn-primary-top-bg',\n $this->themeColorDefaults['btn-primary-top-bg']\n )\n );\n $fieldSetPrimaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-primary-bottom-bg',\n '@btn-primary-bottom-bg',\n $this->themeColorDefaults['btn-primary-bottom-bg']\n )\n );\n $fieldSetPrimaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-primary-hover-bg',\n '@btn-primary-hover-bg',\n $this->themeColorDefaults['btn-primary-hover-bg']\n )\n );\n $fieldSetPrimaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-primary-text-color',\n '@btn-primary-text-color',\n $this->themeColorDefaults['btn-primary-text-color']\n )\n );\n $fieldSetPrimaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-primary-hover-text-color',\n '@btn-primary-hover-text-color',\n $this->themeColorDefaults['btn-primary-hover-text-color']\n )\n );\n\n $tab->addElement($fieldSetPrimaryButtons);\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 170]);\n $fieldSetSecondaryButtons = $this->createFieldSet(\n 'buttons_secondary_fieldset',\n '__responsive_tab_buttons_fieldset_secondary__',\n ['attributes' => $attributes]\n );\n\n $fieldSetSecondaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-secondary-top-bg',\n '@btn-secondary-top-bg',\n $this->themeColorDefaults['btn-secondary-top-bg']\n )\n );\n $fieldSetSecondaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-secondary-bottom-bg',\n '@btn-secondary-bottom-bg',\n $this->themeColorDefaults['btn-secondary-bottom-bg']\n )\n );\n $fieldSetSecondaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-secondary-hover-bg',\n '@btn-secondary-hover-bg',\n $this->themeColorDefaults['btn-secondary-hover-bg']\n )\n );\n $fieldSetSecondaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-secondary-text-color',\n '@btn-secondary-text-color',\n $this->themeColorDefaults['btn-secondary-text-color']\n )\n );\n $fieldSetSecondaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-secondary-hover-text-color',\n '@btn-secondary-hover-text-color',\n $this->themeColorDefaults['btn-secondary-hover-text-color']\n )\n );\n\n $tab->addElement($fieldSetSecondaryButtons);\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 170]);\n $fieldSetPanels = $this->createFieldSet(\n 'panels_fieldset',\n '__responsive_tab_buttons_fieldset_panels__',\n ['attributes' => $attributes]\n );\n\n $fieldSetPanels->addElement(\n $this->createColorPickerField(\n 'panel-header-bg',\n '@panel-header-bg',\n $this->themeColorDefaults['panel-header-bg']\n )\n );\n $fieldSetPanels->addElement(\n $this->createTextField(\n 'panel-header-font-size',\n '@panel-header-font-size',\n $this->themeFontDefaults['panel-header-font-size']\n )\n );\n $fieldSetPanels->addElement(\n $this->createColorPickerField(\n 'panel-header-color',\n '@panel-header-color',\n $this->themeColorDefaults['panel-header-color']\n )\n );\n $fieldSetPanels->addElement(\n $this->createColorPickerField(\n 'panel-border',\n '@panel-border',\n $this->themeColorDefaults['panel-border']\n )\n );\n $fieldSetPanels->addElement(\n $this->createColorPickerField(\n 'panel-bg',\n '@panel-bg',\n $this->themeColorDefaults['panel-bg']\n )\n );\n\n $tab->addElement($fieldSetPanels);\n\n return $tab;\n }", "protected function getButtons()\n {\n $buttons = array(\n 'csh' => '',\n 'refresh' => '',\n );\n\n // Refresh\n $buttons['refresh'] = '<a href=\"' . htmlspecialchars(GeneralUtility::getIndpEnv('REQUEST_URI')) . '\">' .\n \\TYPO3\\CMS\\Backend\\Utility\\IconUtility::getSpriteIcon('actions-system-refresh') .\n '</a>';\n\n // CSH\n $buttons['csh'] = str_replace(\n 'typo3-csh-inline',\n 'typo3-csh-inline show-right',\n BackendUtility::cshItem('xMOD_csh_commercebe', 'orderstree', $this->getBackPath())\n );\n\n return $buttons;\n }", "public function _createCommands($btn,$rowPos)\n\t{\n\t\t$this->_setTemplateDefButtons(_html\\HtmlButton::_ACTION_ADD);\n\t\t$this->_setTemplateDefButtons(_html\\HtmlButton::_ACTION_UPDATE);\n\t\t$this->_setTemplateDefButtons(_html\\HtmlButton::_ACTION_DELETE);\n\t\t$this->_setTemplateDefButtons(_html\\HtmlButton::_ACTION_DELETE_MULTI_2);\n\t\t$this->_setTemplateDefButtons(_html\\HtmlButton::_ACTION_CLOSE);\n\t}", "protected function prepareNextPrevButtons() \n\t{\n\t}", "public function ext_makeToolBar() {}", "function bg_AddBeyondGrammarButton($buttons){\n array_push($buttons, \"separator\", \"BeyondGrammar\");\n return $buttons;\n}", "function econsole_get_buttons($modulename, $ids=''){\r\n\t$btn = \"\";\r\n\tif(!empty($ids)){\r\n\t\t$modules = split(\",\",$ids);\r\n\t\tforeach($modules as $module){\r\n\t\t\t$instance = get_record(\"course_modules\", \"id\", $module, \"\", \"\", \"\", \"\", \"instance\");\r\n\t\t\t$name = get_record($modulename, \"id\", $instance->instance, \"\", \"\", \"\", \"\", \"name\");\t\t\t\r\n\t\t\t//OnMouse: replaceImage();\r\n\t\t \t$btn .= \"<a href=\\\"#\\\"><img src=\\\"theme/\".$_REQUEST[\"thm\"].\"/img/btn/\".$modulename.\".gif\\\" alt=\\\"\\\" title=\\\"\\\" class=\\\"btn\\\" border=\\\"0\\\" onMouseOver=\\\"Javascript: replaceImage(this, 'theme/\".$_REQUEST[\"thm\"].\"/img/btn/\".$modulename.\"over.gif');\\\" onMouseOut=\\\"Javascript: replaceImage(this, 'theme/\".$_REQUEST[\"thm\"].\"/img/btn/\".$modulename.\".gif'); hideTitle();\\\" onClick=\\\"Javascript: window.parent.document.getElementById('mainFrame').src='../\".$modulename.\"/view.php?id=\".$module.\"';\\\" onMouseMove=\\\"showTitleRight(event,'\".$name->name.\"','');\\\"></a>&nbsp;\";\r\n\t\t\t//OnMouse: changeDimensions();\r\n\t\t \t//$btn .= \"<a href=\\\"#\\\"><img src=\\\"theme/\".$_REQUEST[\"thm\"].\"/img/btn/\".$modulename.\".gif\\\" alt=\\\"\\\" title=\\\"\\\" class=\\\"btn\\\" style=\\\"width: 28; height: 28\\\"; border=\\\"0\\\" onMouseOver=\\\"Javascript: changeDimensions(this, '+4', '+4');\\\" onMouseOut=\\\"Javascript: changeDimensions(this, '-4', '-4'); hideTitle();\\\" onClick=\\\"Javascript: window.parent.opener.location.href='../\".$modulename.\"/view.php?id=\".$module.\"';\\\" onMouseMove=\\\"showTitle(event,'\".$name->name.\"','');\\\"></a>&nbsp;\";\r\n\t\t}\r\n\t}else{\r\n \t\t$btn = \"<img src=\\\"theme/\".$_REQUEST[\"thm\"].\"/img/btn/\".$modulename.\".gif\\\" alt=\\\"\\\" title=\\\"\\\" border=\\\"0\\\" class=\\\"transparent\\\">&nbsp;\";\r\n\t}\r\n\treturn $btn;\r\n}", "protected function initDefaultButtons()\n {\n $this->buttons = ArrayHelper::merge(\n [\n 'first' => [\n 'icon' => 'triangle-top',\n 'visible' => function ($model) {\n /* @var $model \\yii\\db\\BaseActiveRecord */\n if ($this->attribute !== null && isset($model[$this->attribute])) {\n return $model[$this->attribute] > 1;\n }\n return true;\n },\n 'options' => [\n 'title' => Yii::t('yii2tech-admin', 'Move top'),\n 'aria-label' => Yii::t('yii2tech-admin', 'Move top'),\n ],\n ],\n 'last' => [\n 'icon' => 'triangle-bottom',\n 'visible' => function ($model) {\n /* @var $model \\yii\\db\\BaseActiveRecord */\n if ($this->attribute !== null && isset($model[$this->attribute])) {\n return $model[$this->attribute] < $this->grid->dataProvider->getTotalCount();\n }\n return true;\n },\n 'options' => [\n 'title' => Yii::t('yii2tech-admin', 'Move bottom'),\n 'aria-label' => Yii::t('yii2tech-admin', 'Move bottom'),\n ],\n ],\n 'prev' => [\n 'icon' => 'arrow-up',\n 'visible' => function ($model) {\n /* @var $model \\yii\\db\\BaseActiveRecord */\n if ($this->attribute !== null && isset($model[$this->attribute])) {\n return $model[$this->attribute] > 1;\n }\n return true;\n },\n 'options' => [\n 'title' => Yii::t('yii2tech-admin', 'Move up'),\n 'aria-label' => Yii::t('yii2tech-admin', 'Move up'),\n ],\n ],\n 'next' => [\n 'icon' => 'arrow-down',\n 'visible' => function ($model) {\n /* @var $model \\yii\\db\\BaseActiveRecord */\n if ($this->attribute !== null && isset($model[$this->attribute])) {\n return $model[$this->attribute] < $this->grid->dataProvider->getTotalCount();\n }\n return true;\n },\n 'options' => [\n 'title' => Yii::t('yii2tech-admin', 'Move down'),\n 'aria-label' => Yii::t('yii2tech-admin', 'Move down'),\n ],\n ],\n ],\n $this->buttons\n );\n }", "public function makeInputButton() {}", "function shortcode_insert_button()\n {\n $this->config['self_closing'] = 'yes';\n\n $this->config['name'] = __('Download Button', 'avia_framework');\n $this->config['tab'] = __('Content Elements', 'avia_framework');\n $this->config['icon'] = AviaBuilder::$path['imagesURL'] . \"sc-button.png\";\n $this->config['order'] = 1;\n $this->config['target'] = 'avia-target-insert';\n $this->config['shortcode'] = 'avia_download_button';\n $this->config['tooltip'] = __('Creates a download button', 'avia_framework');\n $this->config['tinyMCE'] = ['tiny_always' => true];\n $this->config['preview'] = true;\n }", "protected function controlleradd_lst_buildlistoperationbuttons(&$arLines)\n {\n $this->arTranslation[] = $this->sTranslatePrefix.\"listopbutton_filters\";\n $this->arTranslation[] = $this->sTranslatePrefix.\"listopbutton_reload\";\n $this->arTranslation[] = $this->sTranslatePrefix.\"listopbutton_insert\";\n \n $this->arTranslation[] = $this->sTranslatePrefix.\"listopbutton_multiquarantine\";\n $this->arTranslation[] = $this->sTranslatePrefix.\"listopbutton_multidelete\";\n $this->arTranslation[] = $this->sTranslatePrefix.\"listopbutton_multiassign\";\n $this->arTranslation[] = $this->sTranslatePrefix.\"listopbutton_singleassign\";\n \n $arLines[] = \"\\t\\t\\$arOpButtons = array();\";\n $arLines[] = \"\\t\\t\\$arOpButtons[\\\"filters\\\"]=array(\\\"href\\\"=>\\\"javascript:reset_filters();\\\",\\\"icon\\\"=>\\\"awe-magic\\\",\\\"innerhtml\\\"=>$this->sTranslatePrefix\".\"listopbutton_filters);\";\n $arLines[] = \"\\t\\t\\$arOpButtons[\\\"reload\\\"]=array(\\\"href\\\"=>\\\"javascript:TfwControl.form_submit();\\\",\\\"icon\\\"=>\\\"awe-refresh\\\",\\\"innerhtml\\\"=>$this->sTranslatePrefix\".\"listopbutton_reload);\";\n $arLines[] = \"\\t\\tif(\\$this->oPermission->is_insert())\";\n $arLines[] = \"\\t\\t\\t\\$arOpButtons[\\\"insert\\\"]=array(\\\"href\\\"=>\\$this->build_url(\\$this->sModuleName,NULL,\\\"insert\\\"),\\\"icon\\\"=>\\\"awe-plus\\\",\\\"innerhtml\\\"=>$this->sTranslatePrefix\".\"listopbutton_insert);\";\n $arLines[] = \"\\t\\tif(\\$this->oPermission->is_quarantine())\";\n $arLines[] = \"\\t\\t\\t\\$arOpButtons[\\\"multiquarantine\\\"]=array(\\\"href\\\"=>\\\"javascript:multi_quarantine();\\\",\\\"icon\\\"=>\\\"awe-remove\\\",\\\"innerhtml\\\"=>$this->sTranslatePrefix\".\"listopbutton_multiquarantine);\"; \n $arLines[] = \"\\t\\t//if(\\$this->oPermission->is_delete())\";\n $arLines[] = \"\\t\\t\\t//\\$arOpButtons[\\\"multidelete\\\"]=array(\\\"href\\\"=>\\\"javascript:multi_delete();\\\",\\\"icon\\\"=>\\\"awe-remove\\\",\\\"innerhtml\\\"=>$this->sTranslatePrefix\".\"listopbutton_multidelete);\";\n $arLines[] = \"\\t\\t//PICK WINDOWS\";\n $arLines[] = \"\\t\\t//\\$arOpButtons[\\\"multiassign\\\"]=array(\\\"href\\\"=>\\\"javascript:multiassign_window('\\$this->sModuleName',null,'multiassign','\\$this->sModuleName','addexternaldata');\\\",\\\"icon\\\"=>\\\"awe-external-link\\\",\\\"innerhtml\\\"=>$this->sTranslatePrefix\".\"listopbutton_multiassign);\";\n $arLines[] = \"\\t\\t//\\$arOpButtons[\\\"singleassign\\\"]=array(\\\"href\\\"=>\\\"javascript:single_pick('\\$this->sModuleName','singleassign','txtI','txtI');\\\",\\\"icon\\\"=>\\\"awe-external-link\\\",\\\"innerhtml\\\"=>$this->sTranslatePrefix\".\"listopbutton_singleassign);\";\n $arLines[] = \"\\t\\t\\$oOpButtons = new AppHelperButtontabs($this->sTranslatePrefix\".\"entities);\";\n $arLines[] = \"\\t\\t\\$oOpButtons->set_tabs(\\$arOpButtons);\";\n $arLines[] = \"\\t\\treturn \\$oOpButtons;\"; \n }", "public function getPluginButtons() {}", "public function generate()\n\t{\n\t\t$GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/coursebuilderwizard/html/coursebuilderwizard.js';\n\t\t$GLOBALS['TL_CSS'][] = 'system/modules/coursebuilderwizard/html/coursebuilderwizard.css';\n\t\n\t\n\t\t$this->import('Database');\n\n\t\t$arrButtons = array('copy', 'up', 'down', 'delete');\n\t\t$strCommand = 'cmd_' . $this->strField;\n\n\t\t// Change the order\n\t\tif ($this->Input->get($strCommand) && is_numeric($this->Input->get('cid')) && $this->Input->get('id') == $this->currentRecord)\n\t\t{\n\t\t\tswitch ($this->Input->get($strCommand))\n\t\t\t{\n\t\t\t\tcase 'copy':\n\t\t\t\t\t$this->varValue = array_duplicate($this->varValue, $this->Input->get('cid'));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'up':\n\t\t\t\t\t$this->varValue = array_move_up($this->varValue, $this->Input->get('cid'));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'down':\n\t\t\t\t\t$this->varValue = array_move_down($this->varValue, $this->Input->get('cid'));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'delete':\n\t\t\t\t\t$this->varValue = array_delete($this->varValue, $this->Input->get('cid'));\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$elements = array();\n\t\t\n\t\t// Get all available options to assemble the courses\n\t\tforeach($GLOBALS['CB_ELEMENT'] as $strClass=>$arrData)\n\t\t{\n\t\t\t$objElements = $this->Database->prepare(\"SELECT id, name FROM {$arrData['table']} ORDER BY name\")->execute();\n\t\t\t\n\t\t\tif ($objElements->numRows)\n\t\t\t{\n\t\t\t\twhile($objElements->next())\n\t\t\t\t{\n\t\t\t\t\t$arrEl = $objElements->row(); \n\t\t\t\t\t$arrEl['type'] = $strClass;\n\t\t\t\t\t$elements[] = $arrEl;\n\t\t\t\t}\n\t\t\t\n\t\t\t}\t\t\t\n\t\t}\n\t\t\n\t\t// Get new value\n\t\tif ($this->Input->post('FORM_SUBMIT') == $this->strTable)\n\t\t{\n\t\t\t$this->varValue = $this->Input->post($this->strId);\n\t\t}\n\n\t\t// Make sure there is at least an empty array\n\t\tif (!is_array($this->varValue) || !$this->varValue[0])\n\t\t{\n\t\t\t$this->varValue = array('');\n\t\t}\n\n\t\t// Save the value\n\t\tif ($this->Input->get($strCommand) || $this->Input->post('FORM_SUBMIT') == $this->strTable)\n\t\t{\n\t\t\t$this->Database->prepare(\"UPDATE \" . $this->strTable . \" SET \" . $this->strField . \"=? WHERE id=?\")\n\t\t\t\t\t\t ->execute(serialize($this->varValue), $this->currentRecord);\n\n\t\t\t// Reload the page\n\t\t\tif (is_numeric($this->Input->get('cid')) && $this->Input->get('id') == $this->currentRecord)\n\t\t\t{\n\t\t\t\t$this->redirect(preg_replace('/&(amp;)?cid=[^&]*/i', '', preg_replace('/&(amp;)?' . preg_quote($strCommand, '/') . '=[^&]*/i', '', $this->Environment->request)));\n\t\t\t}\n\t\t}\n\n\t\t// Add label and return wizard\n\t\t$return .= '<table cellspacing=\"0\" cellpadding=\"0\" id=\"ctrl_'.$this->strId.'\" class=\"tl_courseBuilderWizard\" summary=\"Course wizard\">\n <thead>\n <tr>\n <td>'.$GLOBALS['TL_LANG']['MSC']['cb_course'].'</td>\n <td>&nbsp;</td>\n </tr>\n </thead>\n <tbody>';\n\n\t\t// Load tl_article language file\n\t\t$this->loadLanguageFile('tl_article');\n\n\t\t// Add input fields\n\t\tfor ($i=0; $i<count($this->varValue); $i++)\n\t\t{\n\t\t\t$options = '';\n\n\t\t\t// Add modules\n\t\t\tforeach ($elements as $v)\n\t\t\t{\n\t\t\t\t$options .= '<option value=\"'.specialchars($v['type']).'|'.specialchars($v['id']).'\"'.$this->optionSelected($v['type'].'|'.$v['id'], $this->varValue[$i]).'>'.$v['name'].'</option>';\n\t\t\t}\n\n\t\t\t$return .= '\n <tr>\n <td><select name=\"'.$this->strId.'['.$i.']\" class=\"tl_select\" onfocus=\"Backend.getScrollOffset();\">'.$options.'</select></td>';\n\t\t\t\n\t\t\t$return .= '<td>';\n\n\t\t\tforeach ($arrButtons as $button)\n\t\t\t{\n\t\t\t\t$return .= '<a href=\"'.$this->addToUrl('&amp;'.$strCommand.'='.$button.'&amp;cid='.$i.'&amp;id='.$this->currentRecord).'\" title=\"'.specialchars($GLOBALS['TL_LANG']['MSC']['mw_'.$button]).'\" onclick=\"CourseBuilderWizard.coursebuilderWizard(this, \\''.$button.'\\', \\'ctrl_'.$this->strId.'\\'); return false;\">'.$this->generateImage($button.'.gif', $GLOBALS['TL_LANG']['MSC']['mw_'.$button], 'class=\"tl_listwizard_img\"').'</a> ';\n\t\t\t}\n\n\t\t\t$return .= '</td>\n </tr>';\n\t\t}\n\n\t\treturn $return.'\n </tbody>\n </table>';\n\t}", "public function buildSubwindow()\n {\n return '<button type=\"menu\" ><![CDATA['.$this->content.']]></button>';\n }", "public function render_wizard() {\n\t\t$action = explode(':', $this->wizard->modData['wizAction']);\n\t\t\n\t\tif ($action[0] == 'edit') {\n\t\t\t$action[1] = 1;\n\t\t\t$this->regNewEntry($this->sectionID, $action[1]);\n\t\t}\n\t\t\n\t\t$output = '';\n\t\t\n\t\t$output .= '<strong>This will create class files for tcaobjects<strong><br /><br />';\n\t\t\n\t\treturn $output;\n\t}", "public function generate()\n\t{\n\t\t$GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/course_builder_admintools/html/courseattemptswizard.js';\n\t\t$GLOBALS['TL_CSS'][] = 'system/modules/course_builder_admintools/html/courseattemptswizard.css';\n\n\t\t$arrButtons = array('delete');\n\n\t\t\n\t\t// Make sure there is at least an empty array\n\t\tif (!is_array($this->varValue) || count($this->varValue) == 0)\n\t\t{\n\t\t\t$this->varValue[0] = array('select'=>'', 'text'=>'');\n\t\t}\n\t\t\t\t\n\t\t$wizard = ($this->wizard) ? '<div class=\"tl_wizard\">' . $this->wizard . '</div>' : '';\n\t\t// Add label\n\t\t$return .= '<div class=\"tl_multitextwizard\">' . $wizard . '\n\t <table cellspacing=\"0\" cellpadding=\"0\" id=\"ctrl_'.$this->strId.'\" summary=\"Text wizard\">';\n\t\t$hasTitles = array_key_exists('buttonTitles', $this->arrConfiguration) && is_array($this->arrConfiguration['buttonTitles']);\n\t\t\n\t\t\n\t\t// Add input fields\n\t\tforeach ($this->varValue as $i=>$client)\n\t\t{\n\t\t\t$return .= '<tr><td>'.$this->varValue[$i]['firstname'].'</td><td>'.$this->varValue[$i]['lastname'].'</td>';\n\t\t\t\n\t\t\t$return .= '<td style=\"padding-right: 5px;\">';\n\t\t\t\n\t\t\tforeach($this->varValue[$i]['attempts'] as $attempt)\n\t\t\t{\n\t\t\t$return .= '<span>' . $attempt['name'] .' <input type=\"text\" name=\"'.$this->strId.'['.$i.']['.$attempt['id'].']\" class=\"tl_attempts\" value=\"'.specialchars($attempt['attempts']).'\"' . $this->getAttributes() . ' /></span>';\n\t\t\t}\n\t\t\t\n\t\t\t$return .= '</td>';\n\t\t\t\n\t\t\t$return .= '<td style=\"white-space:nowrap;\">';\n\t\t\t// Add buttons\n\t\t\tforeach ($arrButtons as $button)\n\t\t\t{\n\t\t\t\t$buttontitle = ($hasTitles && array_key_exists($button, $this->arrConfiguration['buttonTitles'])) ? $this->arrConfiguration['buttonTitles'][$button] : $GLOBALS['TL_LANG'][$this->strTable][$button][0];\n\t\t\t\t$return .= '<a href=\"'.$this->addToUrl('&amp;'.$strCommand.'='.$button.'&amp;cid='.$i.'&amp;id='.$this->currentRecord).'\" title=\"'.specialchars($buttontitle).'\" onclick=\"CourseAttemptsWizard.selectvalueWizard(this, \\''.$button.'\\', \\'ctrl_'.$this->strId.'\\'); return false;\">'.$this->generateImage($button.'.gif', $buttontitle, 'class=\"tl_listwizard_img\"').'</a> ';\n\t\t\t}\n\t\t\t$return .= '</td></tr>';\n\t\t}\n\n\t\treturn $return.'\n </table></div>';\n\t}", "public function generate_buttons_HTML( ) {\n\t\t$follow_count_HTML = $this->get_count_html( $shape );\n\t\treturn\n<<<BUTTON\n<a target=\"_blank\" href=\"{$this->href}\">\n\t<div class=\"swfw-follow-button swfw_buttons_button swp-$this->key\">\n\t\t<div class='swfw-network-icon'>\n\t\t\t{$this->icon}\n\t\t</div>\n\n\t\t<div class=\"swfw-text\">\n\t\t\t<span class='swfw-cta'>$this->cta</span>\n\t\t\t{$follow_count_HTML}\n\t\t</div>\n\t</div>\n</a>\nBUTTON;\n\t}", "function getFilesToolbar() {\n $this->fileToolBar = new base_btnbuilder;\n $this->fileToolBar->images = &$this->images;\n if (isset($this->currentFile) &&\n is_array($this->currentFile) &&\n count($this->currentFile) > 0 &&\n $this->currentFile['folder_id'] >= 0) {\n $this->fileToolBar->addButton(\n 'Properties',\n $this->getLink(\n array(\n 'cmd' => 'edit_file',\n 'file_id' => $this->params['file_id']\n )\n ),\n 'categories-properties',\n 'Show/Edit file properties',\n ($this->params['cmd'] == 'edit_file')\n );\n $this->fileToolBar->addButton(\n 'Tags',\n $this->getLink(\n array(\n 'cmd' => 'file_tags', 'file_id' => $this->params['file_id']\n )\n ),\n 'items-tag',\n 'Edit file tags',\n ($this->params['cmd'] == 'file_tags')\n );\n $this->fileToolBar->addSeparator();\n if ($this->currentFile['current_version_id'] > 1) {\n $this->fileToolBar->addButton(\n 'Versions',\n $this->getLink(\n array(\n 'cmd' => 'file_versions', 'file_id' => $this->params['file_id']\n )\n ),\n 'items-time',\n 'Show file versions',\n ($this->params['cmd'] == 'file_versions')\n );\n }\n if ($this->currentFile['DERIVED'] || $this->currentFile['DERIVATIONS'] > 0) {\n $this->fileToolBar->addButton(\n 'Derivations',\n $this->getLink(\n array(\n 'cmd' => 'file_derivations', 'file_id' => $this->params['file_id']\n )\n ),\n 'status-file-inherited',\n 'Show file derivations',\n ($this->params['cmd'] == 'file_derivations')\n );\n }\n $this->fileToolBar->addSeparator();\n $this->fileToolBar->addButton(\n 'Papaya tag',\n $this->getLink(\n array(\n 'cmd' => 'papaya_tag', 'file_id' => $this->params['file_id']\n )\n ),\n 'items-dialog',\n 'Create papaya tag',\n ($this->params['cmd'] == 'papaya_tag')\n );\n return sprintf('<toolbar>%s</toolbar>'.LF, $this->fileToolBar->getXML());\n }\n return '';\n }", "function drawButtonsPlanning() { \r\n global $canPlan,$showValidationButton, $planningType;?>\r\n <table>\r\n <tr>\r\n <?php \r\n if ($canPlan and ($planningType=='planning' or $planningType=='global') ) { \r\n if($showValidationButton){\r\n ?>\r\n <td colspan=\"1\" width=\"32px\">\r\n <button id=\"savePlanningButton\" dojoType=\"dijit.form.Button\" showlabel=\"false\"\r\n title=\"<?php echo i18n('validatePlanning');?>\" \r\n iconClass=\"dijitButtonIcon dijitButtonIconValidPlan\" class=\"buttonIconNewGui detailButton\">\r\n <script type=\"dojo/connect\" event=\"onClick\" args=\"evt\">\r\n\t\t showPlanSaveDates();\r\n return false; \r\n </script>\r\n </button>\r\n </td>\r\n <?php \r\n }\r\n ?>\r\n <td colspan=\"1\" width=\"32px\">\r\n <button id=\"saveBaselineButton\" dojoType=\"dijit.form.Button\" showlabel=\"false\"\r\n title=\"<?php echo i18n('savePlanningBaseline');?>\"\r\n iconClass=\"dijitButtonIcon dijitButtonIconSavePlan\" class=\"buttonIconNewGui detailButton\">\r\n <script type=\"dojo/connect\" event=\"onClick\" args=\"evt\">\r\n\t\t showPlanningBaseline();\r\n return false; \r\n </script>\r\n </button>\r\n </td>\r\n <?php \r\n }\r\n ?> \r\n <td colspan=\"1\" width=\"32px\">\r\n <button title=\"<?php echo i18n('printPlanning')?>\"\r\n dojoType=\"dijit.form.Button\"\r\n id=\"listPrint\" name=\"listPrint\"\r\n iconClass=\"dijitButtonIcon dijitButtonIconPrint\" class=\"buttonIconNewGui detailButton\" showLabel=\"false\">\r\n <script type=\"dojo/connect\" event=\"onClick\" args=\"evt\">\r\n <?php \r\n $ganttPlanningPrintOldStyle=Parameter::getGlobalParameter('ganttPlanningPrintOldStyle');\r\n if (!$ganttPlanningPrintOldStyle) {$ganttPlanningPrintOldStyle=\"NO\";}\r\n if ($ganttPlanningPrintOldStyle=='YES') {?>\r\n\t showPrint(\"../tool/jsonPlanning.php\", 'planning');\r\n <?php } else { ?>\r\n showPrint(\"planningPrint.php\", 'planning');\r\n <?php }?> \r\n </script>\r\n </button>\r\n </td>\r\n <td colspan=\"1\" width=\"32px\">\r\n <button title=\"<?php echo i18n('reportPrintPdf')?>\"\r\n dojoType=\"dijit.form.Button\"\r\n id=\"listPrintPdf\" name=\"listPrintPdf\"\r\n iconClass=\"dijitButtonIcon dijitButtonIconPdf\" class=\"buttonIconNewGui detailButton\" showLabel=\"false\">\r\n <script type=\"dojo/connect\" event=\"onClick\" args=\"evt\">\r\n var paramPdf='<?php echo Parameter::getGlobalParameter(\"pdfPlanningBeta\");?>';\r\n if(paramPdf!='false') planningPDFBox();\r\n else showPrint(\"../tool/jsonPlanning_pdf.php\", 'planning', null, 'pdf');\r\n </script>\r\n </button>\r\n </td>\r\n <?php if ($planningType=='planning' or $planningType=='global') {?>\r\n <td width=\"32px\" style=\"padding-right:10px;\">\r\n <button title=\"<?php echo i18n('reportExportMSProject')?>\"\r\n dojoType=\"dijit.form.Button\"\r\n id=\"listPrintMpp\" name=\"listPrintMpp\"\r\n iconClass=\"dijitButtonIcon dijitButtonIconMSProject\" class=\"buttonIconNewGui detailButton\" showLabel=\"false\">\r\n <script type=\"dojo/connect\" event=\"onClick\" args=\"evt\">\r\n showPrint(\"../tool/jsonPlanning.php\", 'planning', null, 'mpp');\r\n </script>\r\n </button>\r\n <input type=\"hidden\" id=\"outMode\" name=\"outMode\" value=\"\" />\r\n </td>\r\n <?php }?>\r\n </tr>\r\n </table>\r\n<?php \r\n}", "public function generate()\n\t{\n\t\t$this->import('Database');\n\n\t\t$arrButtons = array('copy', 'up', 'down', 'delete');\n\t\t$strCommand = 'cmd_' . $this->strField;\n\n\t\t// Change the order\n\t\tif ($this->Input->get($strCommand) && is_numeric($this->Input->get('cid')) && $this->Input->get('id') == $this->currentRecord)\n\t\t{\n\t\t\tswitch ($this->Input->get($strCommand))\n\t\t\t{\n\t\t\t\tcase 'copy':\n\t\t\t\t\t$this->varValue = array_duplicate($this->varValue, $this->Input->get('cid'));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'up':\n\t\t\t\t\t$this->varValue = array_move_up($this->varValue, $this->Input->get('cid'));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'down':\n\t\t\t\t\t$this->varValue = array_move_down($this->varValue, $this->Input->get('cid'));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'delete':\n\t\t\t\t\t$this->varValue = array_delete($this->varValue, $this->Input->get('cid'));\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// Get all modules from DB\n\t\t$objModules = $this->Database->execute(\"SELECT id, name FROM tl_module ORDER BY name\");\n\t\t$modules = array();\n\n\t\tif ($objModules->numRows)\n\t\t{\n\t\t\t$modules = array_merge($modules, $objModules->fetchAllAssoc());\n\t\t}\n\n\t\t$objRow = $this->Database->prepare(\"SELECT * FROM \" . $this->strTable . \" WHERE id=?\")\n\t\t\t\t\t\t\t\t ->limit(1)\n\t\t\t\t\t\t\t\t ->execute($this->currentRecord);\n\n\t\t// Columns\n\t\tif ($objRow->numRows)\n\t\t{\n\t\t\t$cols = array();\n\t\t\t$count = count(explode('x',$objRow->sc_type));\n\n\t\t\tswitch ($count)\n\t\t\t{\n\t\t\t\tcase '2':\n\t\t\t\t\t$cols[] = 'first';\n\t\t\t\t\t$cols[] = 'second';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase '3':\n\t\t\t\t\t$cols[] = 'first';\n\t\t\t\t\t$cols[] = 'second';\n\t\t\t\t\t$cols[] = 'third';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase '4':\n\t\t\t\t\t$cols[] = 'first';\n\t\t\t\t\t$cols[] = 'second';\n\t\t\t\t\t$cols[] = 'third';\n\t\t\t\t\t$cols[] = 'fourth';\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase '5':\n\t\t\t\t\t$cols[] = 'first';\n\t\t\t\t\t$cols[] = 'second';\n\t\t\t\t\t$cols[] = 'third';\n\t\t\t\t\t$cols[] = 'fourth';\n\t\t\t\t\t$cols[] = 'fifth';\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t\n\t\t}\n\n\t\t// Get new value\n\t\tif ($this->Input->post('FORM_SUBMIT') == $this->strTable)\n\t\t{\n\t\t\t$this->varValue = $this->Input->post($this->strId);\n\t\t}\n\n\t\t// Make sure there is at least an empty array\n\t\tif (!is_array($this->varValue) || !$this->varValue[0])\n\t\t{\n\t\t\t$this->varValue = array('');\n\t\t}\n\n\t\telse\n\t\t{\n\t\t\t// Initialize sorting order\n\t\t\tforeach ($cols as $col)\n\t\t\t{\n\t\t\t\t$arrCols[$col] = array();\n\t\t\t}\n\n\t\t\tforeach ($this->varValue as $v)\n\t\t\t{\n\t\t\t\t// Add only modules of an active section\n\t\t\t\tif (in_array($v['col'], $cols))\n\t\t\t\t{\n\t\t\t\t\t$arrCols[$v['col']][] = $v;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->varValue = array();\n\n\t\t\tforeach ($arrCols as $arrCol)\n\t\t\t{\n\t\t\t\t$this->varValue = array_merge($this->varValue, $arrCol);\n\t\t\t}\n\t\t}\n\n\t\t// Save the value\n\t\tif ($this->Input->get($strCommand) || $this->Input->post('FORM_SUBMIT') == $this->strTable)\n\t\t{\n\t\t\t$this->Database->prepare(\"UPDATE \" . $this->strTable . \" SET \" . $this->strField . \"=? WHERE id=?\")\n\t\t\t\t\t\t ->execute(serialize($this->varValue), $this->currentRecord);\n\n\t\t\t// Reload the page\n\t\t\tif (is_numeric($this->Input->get('cid')) && $this->Input->get('id') == $this->currentRecord)\n\t\t\t{\n\t\t\t\t$this->redirect(preg_replace('/&(amp;)?cid=[^&]*/i', '', preg_replace('/&(amp;)?' . preg_quote($strCommand, '/') . '=[^&]*/i', '', $this->Environment->request)));\n\t\t\t}\n\t\t}\n\n\t\t// Add label and return wizard\n\t\t$return .= '<table cellspacing=\"0\" cellpadding=\"0\" id=\"ctrl_'.$this->strId.'\" class=\"tl_modulewizard\" summary=\"Module wizard\">\n <thead>\n <tr>\n <td>'.$GLOBALS['TL_LANG'][$this->strTable]['module'].'</td>\n <td>'.$GLOBALS['TL_LANG'][$this->strTable]['column'].'</td>\n <td>&nbsp;</td>\n </tr>\n </thead>\n <tbody>';\n\n\t\t// Load tl_article language file\n\t\t$this->loadLanguageFile('tl_article');\n\n\t\t// Add input fields\n\t\tfor ($i=0; $i<count($this->varValue); $i++)\n\t\t{\n\t\t\t$options = '';\n\n\t\t\t// Add modules\n\t\t\tforeach ($modules as $v)\n\t\t\t{\n\t\t\t\t$options .= '<option value=\"'.specialchars($v['id']).'\"'.$this->optionSelected($v['id'], $this->varValue[$i]['mod']).'>'.$v['name'].'</option>';\n\t\t\t}\n\n\t\t\t$return .= '\n <tr>\n <td><select name=\"'.$this->strId.'['.$i.'][mod]\" class=\"tl_select\" onfocus=\"Backend.getScrollOffset();\">'.$options.'</select></td>';\n\n\t\t\t$options = '';\n\n\t\t\t// Add column\n\t\t\tforeach ($cols as $v)\n\t\t\t{\n\t\t\t\t$options .= '<option value=\"'.specialchars($v).'\"'.$this->optionSelected($v, $this->varValue[$i]).'>'. ((isset($GLOBALS['TL_LANG']['CTE'][$v]) && !is_array($GLOBALS['TL_LANG']['CTE'][$v])) ? $GLOBALS['TL_LANG']['CTE'][$v] : $v) .'</option>';\n\t\t\t}\n\n\t\t\t$return .= '\n <td><select name=\"'.$this->strId.'['.$i.'][col]\" class=\"tl_select_column\" onfocus=\"Backend.getScrollOffset();\">'.$options.'</select></td>\n <td>';\n\n\t\t\tforeach ($arrButtons as $button)\n\t\t\t{\n\t\t\t\t$return .= '<a href=\"'.$this->addToUrl('&amp;'.$strCommand.'='.$button.'&amp;cid='.$i.'&amp;id='.$this->currentRecord).'\" title=\"'.specialchars($GLOBALS['TL_LANG'][$this->strTable]['wz_'.$button]).'\" onclick=\"Backend.moduleWizard(this, \\''.$button.'\\', \\'ctrl_'.$this->strId.'\\'); return false;\">'.$this->generateImage($button.'.gif', $GLOBALS['TL_LANG'][$this->strTable]['wz_'.$button], 'class=\"tl_listwizard_img\"').'</a> ';\n\t\t\t}\n\n\t\t\t$return .= '</td>\n </tr>';\n\t\t}\n\n\t\treturn $return.'\n </tbody>\n </table>';\n\t}", "public function renderCreateButton()\n {\n return new Tools\\CreateButton($this);\n }", "private function buildControls(){\n\n\t\t//create key - label pairs for this dropdown:\n\n\t\t$name = '_column_type_'.$this->fullId;\n\t\t$types = $this->getTypes();\n\n\t\tif( $this->referenceMode )\n\t\t\t$name = 'reference_'.$this->fullId;\n\n\n\t\tif( sizeof( $types ) > 1 ){\n\t\t\t\n\t\t\t$typeSelector = Field::select(\n\t\t\t\t$name,\n\t\t\t\t'',\n\t\t\t\t$types,\n\t\t\t\tarray(\n\t\t\t\t\t'defaultValue' => $this->type\n\t\t\t\t)\n\t\t\t);\n\t\t\t\n\t\t\t$class = 'column-controls column-choices-available';\n\n\t\t}else{\n\t\t\t$class = 'column-controls';\n\t\t\t$key = array_keys( $types );\n\t\t\t$typeSelector = Field::hidden( \n\t\t\t\t$name, \n\t\t\t\t[ \n\t\t\t\t\t'defaultValue' => $this->type, \n\t\t\t\t\t'class' => 'type-select'\n\t\t\t\t]\n\t\t\t);\n\t\t}\n\n\t\techo '<div class=\"'.$class.'\">';\n\n\t\t\t//render the dropdown:\n\t\t\t$typeSelector->render();\n\t\t\techo '<h3 class=\"column-type\">'.$types[ $this->type ].'</h3>';\n\n\t\t\t//sorter\n\t\t\techo '<span class=\"sort dashicons dashicons-leftright\"></span>';\n\n\t\techo '</div>';\n\n\t}", "private function buildHelpButton() {\n\t\t$helpButton = new OOUI\\ButtonInputWidget( [\n\t\t\t'icon' => 'help',\n\t\t\t'framed' => false,\n\t\t\t'name' => 'mw-twocolconflict-show-help',\n\t\t\t'title' => $this->getContext()->msg( 'twoColConflict-show-help-tooltip' )->text(),\n\t\t\t'classes' => [ 'mw-twocolconflict-show-help' ]\n\t\t] );\n\n\t\t$out = '<div class=\"mw-twocolconflict-show-help-container\">';\n\t\t$out .= $helpButton;\n\t\t$out .= '</div>';\n\n\t\treturn $out;\n\t}", "protected function getButtons($aBtnAtt = array(), $aBtnTyp = 'button') {\n $lRet = '<div class=\"sub cmsHeader p4\">'.LF;\n\n //check is critical path status flag 'add content' is activated\n $lShow = FALSE;\n $lCrp = CCor_Res::extract('code', 'id', 'crpmaster');\n $lCrpId = $lCrp[$this -> mSrc];\n $lCrpArr = CCor_Res::get('crp', $lCrpId);\n $lSta = $this -> mJob['webstatus'];\n foreach ($lCrpArr as $lRow) {\n if ($lRow['status'] == $lSta) {\n if (bitset($lRow['flags'], staflaAddContent)) {\n $lShow = TRUE;\n }\n }\n }\n \n if ($this -> mCanInsert && ($lShow || $this -> mUsr -> isMemberOf(1))) {\n $lRet.= btn(lan('job-cms.add'), '', 'img/d.gif', $aBtnTyp, array('id' => 'contentButton', 'data-toggle' => \"modal\", 'data-target' => \"#add_master\", 'class' => \"btn btn-default\")).NB; \n }\n if ($this -> mCanEdit OR $this -> mCanInsert) {\n $lAction = '';\n if ($this -> mPhraseTyp == 'product' && CCor_Cfg::get('phrase.job.update', 'auto') == 'manual' && sizeof($this -> mData) > 0) {\n $lAction = 'return Flow.cmsProduct.update();';\n }\n $lRet.= btn(lan('lib.ok'), $lAction, 'img/ico/16/ok.gif', 'submit', array('id' => 'save', 'class' => 'dn')).NB;\n }\n if ($this -> mCanInsert) {\n $lMen = new CHtm_Menu(lan('lib.opt'), \"options fl p4\");\n $lMen -> addTh2(lan('lib.opt'));\n $lMen -> addJsItem(\"go('index.php?act=job-cms.contexp&src=\".$this -> mSrc.\"&jobid=\".$this -> mJobId.\"&typ=xml')\", lan('job-cms.exportxml'), 'ico/16/fie.gif');\n $lMen -> addJsItem(\"go('index.php?act=job-cms.contexp&src=\".$this -> mSrc.\"&jobid=\".$this -> mJobId.\"&typ=excel')\", lan('job-cms.exportexcel'), 'ico/16/excel.gif');\n if($this -> mCanBuild && $this -> mPhraseTyp == 'job') {\n $lMen -> addJsItem('Flow.chili.buildArtwork()', lan('job-cms.build'), 'ico/16/pdf.png');\n }\n $lRet.= $lMen -> getContent();\n }\n $lRet.= $this -> getLanguageOptions();\n $lRet.= '</div>'.LF;\n return $lRet;\n }", "public function getButtonOptions()\r\n {\r\n $out = array();\r\n\r\n// if ($this->getChatHelper()->getButtonShow() || $this->getForceButtonDisplay()) {\r\n// $out[] = \"\\$zopim.livechat.button.show()\";\r\n// } else {\r\n// $out[] = \"\\$zopim.livechat.button.hide()\";\r\n// }\r\n\r\n if (strlen($this->getChatHelper()->getButtonPosition()) > 0) {\r\n $out[] = \"\\$zopim.livechat.button.setPosition('\" . $this->getChatHelper()->getButtonPosition() . \"')\";\r\n $out[] = \"\\$zopim.livechat.window.setPosition('\" . $this->getChatHelper()->getButtonPosition() . \"')\";\r\n }\r\n\r\n if (strlen($this->getChatHelper()->getButtonPositionMobile()) > 0) {\r\n $out[] = \"\\$zopim.livechat.button.setPositionMobile('\" . $this->getChatHelper()->getButtonPositionMobile() . \"')\";\r\n }\r\n\r\n if ($this->getChatHelper()->getButtonHideOffline()) {\r\n $out[] = \"\\$zopim.livechat.button.setHideWhenOffline(1)\";\r\n }\r\n\r\n// if (($this->getChatHelper()->getWidgetApi() == 'new')) {\r\n// if (strlen($this->getChatHelper()->getButtonOffsetVertical()) > 0) {\r\n// $out[] = \"\\$zopim.livechat.button.setOffsetVertical('\" . $this->getChatHelper()->getButtonOffsetVertical() . \"')\";\r\n// }\r\n//\r\n// if (strlen($this->getChatHelper()->getButtonOffsetHorizontal()) > 0) {\r\n// $out[] = \"\\$zopim.livechat.button.setOffsetHorizontal('\" . $this->getChatHelper()->getButtonOffsetHorizontal() . \"')\";\r\n// }\r\n// }\r\n\r\n if (count($out) > 0) {\r\n return implode(';' . \"\\n\", $out). ';' . \"\\n\";\r\n }\r\n return null;\r\n }", "public function commandBar(): iterable\n {\n return [\n Button::make('Show toast')\n ->method('showToast')\n ->novalidate()\n ->icon('bs.chat-square-dots'),\n\n ModalToggle::make('Launch demo modal')\n ->modal('exampleModal')\n ->method('showToast')\n ->icon('bs.window'),\n ];\n }", "public function buildCommand()\n {\n return parent::buildCommand();\n }", "function composeL1EditForm_buttonsDiv() {\n\n\n return;\n}", "function renderSubmitButtons() {\n\t\t$output = '';\n\n\t\tif ($this->currentStep < count($this->steps) && count($this->steps) > 1 && $this->showNextButton) {\n\t\t\t$output .= '<input style=\"display:none;\" type=\"submit\" name=\"'.$this->prefixId.'[submitproceed]\" value=\"'.htmlspecialchars($this->LANG->sL($this->localLangLabels['renderSubmitButtons_proceed'])).'\" tabindex=\"1000\" />';\n\t\t\t$output .= '<input type=\"hidden\" name=\"'.$this->prefixId.'[currentstep]\" value=\"'.$this->currentStep.'\" />';\n\t\t}\n\t\tif ($this->showCancelButton) {\n\t\t\t$output .= '<input style=\"float:left;\" type=\"submit\" name=\"'.$this->prefixId.'[submitcancel]\" value=\"'.htmlspecialchars($this->LANG->sL($this->localLangLabels['renderSubmitButtons_cancel'])).'\" tabindex=\"1030\" />';\n\t\t}\n\t\tif ($this->currentStep > 1 && $this->showPreviousButton) {\n\t\t\t$output .= '<input style=\"float:left;\" type=\"submit\" name=\"'.$this->prefixId.'[submitback]\" value=\"'.htmlspecialchars($this->LANG->sL($this->localLangLabels['renderSubmitButtons_back'])).'\" tabindex=\"1020\" />';\n\t\t\t$output .= '<input type=\"hidden\" name=\"'.$this->prefixId.'[currentstep]\" value=\"'.$this->currentStep.'\" />';\n\t\t}\n\t\tif ($this->currentStep == count($this->steps) && $this->showNextButton) {\n\t\t\t$output .= '<input style=\"float:left;\" type=\"submit\" name=\"'.$this->prefixId.'[submitsubmit]\" value=\"'.htmlspecialchars($this->LANG->sL($this->localLangLabels['renderSubmitButtons_submit'])).'\" tabindex=\"1000\" />';\n\t\t}\n\t\tif ($this->currentStep < count($this->steps) && count($this->steps) > 1 && $this->showNextButton) {\n\t\t\t$output .= '<input style=\"float:left;\" type=\"submit\" name=\"'.$this->prefixId.'[submitproceed]\" value=\"'.htmlspecialchars($this->LANG->sL($this->localLangLabels['renderSubmitButtons_proceed'])).'\" tabindex=\"1010\" />';\n\t\t}\n\t\treturn '<div class=\"tx-frontendformslib-submitbuttons\">'.$output.'</div>';\n\t}", "public function render($indentations=0){\n // check parameters\n if(!is_integer($indentations)){return false;}\n // definitions\n $return=\"\\n\";\n // make ident spaces\n $ind=str_repeat(\" \",$indentations);\n // check for elements\n if(!count($this->elements_array)){return null;}\n // renderize description list\n $return.=$ind.\"<!-- operations-button -->\\n\";\n $return.=$ind.\"<div id='\".$this->id.\"' class=\\\"operationButton btn btn-xs btn-default faa-parent animated-hover \".$this->class.\"\\\">\\n\";\n // make icon\n $icon.=\" <i class=\\\"fa \".$this->icon.\" fa-fw hidden-link\\\" aria-hidden=\\\"true\\\"></i>\".($this->label?\" \".$this->label:null);\n // make operations\n $operations=\" <span id=\\\"\".$this->id.\"_operations\\\" style=\\\"display:none\\\">\";\n // cycle all elements\n foreach($this->elements_array as $element){\n $operations.=\" &nbsp;\";\n if($element->enabled){\n $operations.=\"<a href=\\\"\".$element->url.\"\\\"\".($element->confirm?\" onClick=\\\"return confirm('\".addslashes($element->confirm).\"')\\\"\":null).\" target=\\\"\".$element->target.\"\\\">\";\n $operations.=\"<i class='fa \".$element->icon.\" fa-fw faa-tada animated-hover hidden-link' aria-hidden='true' title=\\\"\".str_ireplace('\"',\"''\",$element->title).\"\\\"></i>\";\n $operations.=\"</a>\";\n }else{$operations.=\"<i class='fa \".$element->icon.\" disabled' aria-hidden='true'></i>\";}\n }\n // conclude operations\n if(strtolower($this->direction)==\"left\"){$operations.=\" &nbsp;\";}\n $operations.=\" </span>\";\n // switch direction\n switch(strtolower($this->direction)){\n case \"left\":$return.=$ind.$operations.$icon.\"\\n\";break;\n case \"right\":$return.=$ind.$icon.$operations.\"\\n\";break;\n }\n // conclude operations button\n $return.=$ind.\"</div><!-- /operations-button -->\\n\";\n $return.=substr($ind,0,-1);\n // script\n $jQuery=\"/* Operations Button Hover Script */\\n$(\\\"#\".$this->id.\"\\\").hover(function(){\\$(this).find(\\\"span\\\").show();},function(){\\$(this).find(\\\"span\\\").hide();});\";\n // add script to bootstrap\n $GLOBALS['bootstrap']->addScript($jQuery);\n // return html source code\n return $return;\n }", "public function renderToolbarControls()\n {\n $this->kernel->event->trigger('phifty.crud.toolbar_init',$this);\n foreach( $this->_toolbarItems as $controller ) {\n echo $controller->controlAction();\n }\n }", "protected function initDefaultButtons()\n {\n if (!isset($this->buttons['view'])) {\n $this->buttons['view'] = function ($url, $model, $key) {\n $options = array_merge([\n 'title' => Yii::t('yii', 'View'),\n 'aria-label' => Yii::t('yii', 'View'),\n 'data-pjax' => yii::$app->controller->isPjaxAction,\n ], $this->buttonOptions);\n return Html::a(Html::icon('eye') . '----', $url, $options);\n };\n }\n if (!isset($this->buttons['update'])) {\n $this->buttons['update'] = function ($url, $model, $key) {\n $options = array_merge([\n 'title' => Yii::t('yii', 'Update'),\n 'aria-label' => Yii::t('yii', 'Update'),\n 'data-pjax' => yii::$app->controller->isPjaxAction,\n ], $this->buttonOptions);\n return Html::a(Html::icon('pencil'), $url, $options);\n };\n }\n if (!isset($this->buttons['delete'])) {\n $this->buttons['delete'] = function ($url, $model, $key) {\n $options = array_merge([\n 'title' => Yii::t('yii', 'Delete'),\n 'aria-label' => Yii::t('yii', 'Delete'),\n 'data-confirm' => Yii::t('yii', 'Are you sure you want to delete this item?'),\n 'data-method' => 'post',\n 'data-pjax' => yii::$app->controller->isPjaxAction,\n ], $this->buttonOptions);\n return Html::a(Html::icon('delete'), $url, $options);\n };\n }\n }", "function register_button($buttons) {\n\t\t\t/*print( \"\\n<!-- Preparing to add the umw_widget_short MCE button. -->\\n\" );\n\t\t\tprint( \"\\n<!-- The current buttons array looks like:\\n\" . print_r( $buttons, true ) . \"\\n-->\\n\" );*/\n\t\t\tarray_push($buttons, 'umw_widget_short');\n\t\t\t/*print( \"\\n<!-- The updated buttons array looks like:\\n\" . print_r( $buttons, true ) . \"\\n-->\\n\" );*/\n\t\t\treturn $buttons;\n\t\t}", "protected function buildCommandsIndex() {}", "public function getActionButtonsAttribute()\n {\n return '<div class=\"btn-group action-btn\">\n '.$this->getEditButtonAttribute(\"edit-blogmodel\", \"admin.blogmodels.edit\").'\n '.$this->getDeleteButtonAttribute(\"delete-blogmodel\", \"admin.blogmodels.destroy\").'\n </div>';\n }", "private function add_buttons(&$data)\n\t{\n\t\t$data['action'] = $this->url->link(\n\t\t\t\"extension/payment/{$this->gateway_name}\",\n\t\t\t'user_token=' . $this->session->data['user_token'],\n\t\t\ttrue\n\t\t);\n\n\t\t$data['cancel'] = $this->url->link(\n\t\t\t'marketplace/extension',\n\t\t\t'user_token=' . $this->session->data['user_token'] . '&type=payment',\n\t\t\ttrue\n\t\t);\n\t}", "public function constructArrayButton()\n { \n //- récupération des boutons par défaut\n $arra_bouton=parent::constructArrayButton();\n \n //- suppression des boutons superflus\n unset($arra_bouton['actionNew']);\n \n //- récupération du modèle\n $obj_model=$this->getModel();\n \n //- s'il n'y a pas d'historique de déplacement \n if(!$obj_model->getHasHisto())\n {\n unset($arra_bouton['actionBack']);\n } \n \n return $arra_bouton;\n }", "public function getButton() {}", "protected function initDefaultButtons()\r\n {\r\n if (!isset($this->buttons['view']) && !$this->hideViewButton) {\r\n $this->buttons['view'] = function ($url, $model, $key) {\r\n $options = array_merge([\r\n 'title' => Yii::t('yii', 'View'),\r\n 'aria-label' => Yii::t('yii', 'View'),\r\n 'data-pjax' => '0',\r\n ], $this->buttonOptions);\r\n return Html::a('<span class=\"fa fa-lg fa-eye\"></span>', $url, $options);\r\n };\r\n }\r\n if (!isset($this->buttons['update'])) {\r\n $this->buttons['update'] = function ($url, $model, $key) {\r\n $options = array_merge([\r\n 'title' => Yii::t('yii', 'Update'),\r\n 'aria-label' => Yii::t('yii', 'Update'),\r\n 'data-pjax' => '0',\r\n ], $this->buttonOptions);\r\n return Html::a('<span class=\"fa fa-lg fa-edit\"></span>', $url, $options);\r\n };\r\n }\r\n if (!isset($this->buttons['delete'])) {\r\n $this->buttons['delete'] = function ($url, $model, $key) {\r\n $options = array_merge([\r\n 'title' => Yii::t('yii', 'Delete'),\r\n 'aria-label' => Yii::t('yii', 'Delete'),\r\n 'data-confirm' => Yii::t('yii', 'Are you sure you want to delete this item?'),\r\n 'data-method' => 'post',\r\n 'data-pjax' => '0',\r\n ], $this->buttonOptions);\r\n return Html::a('<span class=\"fa fa-lg fa-trash\"></span>', $url, $options);\r\n };\r\n }\r\n }", "public function output_widget_control_templates()\n {\n }" ]
[ "0.7672829", "0.6662608", "0.64239997", "0.64237934", "0.6387147", "0.6354915", "0.6313808", "0.62804395", "0.6232462", "0.6232462", "0.6232462", "0.6232462", "0.6232462", "0.6231556", "0.6231556", "0.6231556", "0.6231556", "0.6231286", "0.6231286", "0.6231286", "0.6231286", "0.6231286", "0.6231286", "0.6231286", "0.6231286", "0.62133753", "0.6207673", "0.620283", "0.61959726", "0.6161982", "0.61312497", "0.6094284", "0.6091533", "0.60760295", "0.6066789", "0.60219073", "0.59963185", "0.598374", "0.59836876", "0.59836876", "0.59836876", "0.59497523", "0.5931129", "0.5893851", "0.5814926", "0.58015585", "0.5797531", "0.5795221", "0.57792985", "0.57550675", "0.57537544", "0.57025146", "0.5698038", "0.56966954", "0.5695538", "0.5670616", "0.5659745", "0.5653891", "0.5638292", "0.56318057", "0.56209654", "0.5612603", "0.5598566", "0.5560453", "0.5534497", "0.55299", "0.5523443", "0.5517884", "0.5508799", "0.55052334", "0.5504699", "0.5494984", "0.5493679", "0.54834867", "0.54764694", "0.54723114", "0.5469547", "0.5456016", "0.54553366", "0.5440533", "0.5437482", "0.5429275", "0.5428521", "0.5428377", "0.5414543", "0.5410712", "0.5410564", "0.54084086", "0.54053444", "0.5403271", "0.53978884", "0.5392707", "0.53810805", "0.5374422", "0.5370757", "0.5366812", "0.53570443", "0.5346614", "0.5344634", "0.53441185" ]
0.6647811
2
Builds the form that define the main properties of your progress bar
function buildForm() { $this->buildTabs(); // tab caption $this->addElement('header', null, 'Progress2 Generator - Control Panel: main properties'); $shape[] =& $this->createElement('radio', null, null, 'Horizontal', '1'); $shape[] =& $this->createElement('radio', null, null, 'Vertical', '2'); $this->addGroup($shape, 'shape', 'Shape:'); $way[] =& $this->createElement('radio', null, null, 'Natural', 'natural'); $way[] =& $this->createElement('radio', null, null, 'Reverse', 'reverse'); $this->addGroup($way, 'way', 'Direction:'); $autosize[] =& $this->createElement('radio', null, null, 'Yes', true); $autosize[] =& $this->createElement('radio', null, null, 'No', false); $this->addGroup($autosize, 'autosize', 'Best size:'); $psize['width'] =& $this->createElement('text', 'width', 'width', array('size' => 4)); $psize['height'] =& $this->createElement('text', 'height', 'height', array('size' => 4)); $psize['left'] =& $this->createElement('text', 'left', 'left', array('size' => 4)); $psize['top'] =& $this->createElement('text', 'top', 'top', array('size' => 4)); $psize['position'] =& $this->createElement('text', 'position', 'position', array('disabled' => 'true')); $psize['bgcolor'] =& $this->createElement('text', 'bgcolor', 'bgcolor', array('size' => 7)); $this->addGroup($psize, 'progresssize', 'Size, position and color:', ' '); $this->addElement('text', 'rAnimSpeed', array('Animation speed :', '(0-1000 ; 0:fast, 1000:slow)')); $this->addRule('rAnimSpeed', 'Should be between 0 and 1000', 'rangelength', array(0,1000), 'client'); // Buttons of the wizard to do the job $this->buildButtons(array('back','apply','process')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: run demo');\r\n\r\n $this->addElement('static', 'progressBar',\r\n 'Your progress meter looks like:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('reset','process'));\r\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: string properties');\r\n\r\n $stringpainted[] =& $this->createElement('radio', null, null, 'Yes', true);\r\n $stringpainted[] =& $this->createElement('radio', null, null, 'No', false);\r\n $this->addGroup($stringpainted, 'stringpainted', 'Render a custom string:');\r\n\r\n $this->addElement('text', 'stringid', 'Id:', array('size' => 32));\r\n $this->addElement('text', 'stringclass', 'CSS class:', array('size' => 32));\r\n $this->addElement('text', 'stringvalue', 'Content:', array('size' => 32));\r\n\r\n $stringsize['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 4));\r\n $stringsize['height'] =& $this->createElement('text',\r\n 'height', 'height',\r\n array('size' => 4));\r\n $stringsize['left'] =& $this->createElement('text',\r\n 'left', 'left',\r\n array('size' => 4));\r\n $stringsize['top'] =& $this->createElement('text',\r\n 'top', 'top',\r\n array('size' => 4));\r\n $stringsize['bgcolor'] =& $this->createElement('text',\r\n 'bgcolor', 'bgcolor',\r\n array('size' => 7));\r\n $this->addGroup($stringsize, 'stringsize', 'Size, position and color:', ' ');\r\n\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Left', 'left');\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Right', 'right');\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Top', 'top');\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Bottom', 'bottom');\r\n $this->addGroup($stringvalign, 'stringvalign', 'Vertical alignment:');\r\n\r\n $stringalign[] =& $this->createElement('radio', null, null,\r\n 'Left', 'left');\r\n $stringalign[] =& $this->createElement('radio', null, null,\r\n 'Right', 'right');\r\n $stringalign[] =& $this->createElement('radio', null, null,\r\n 'Center', 'center');\r\n $this->addGroup($stringalign, 'stringalign', 'Horizontal alignment:');\r\n\r\n $stringfont['family'] =& $this->createElement('text',\r\n 'family', 'family',\r\n array('size' => 40));\r\n $stringfont['size'] =& $this->createElement('text',\r\n 'size', 'size',\r\n array('size' => 2));\r\n $stringfont['color'] =& $this->createElement('text',\r\n 'color', 'color',\r\n array('size' => 7));\r\n $this->addGroup($stringfont, 'stringfont', 'Font:', ' ');\r\n\r\n $stringweight[] =& $this->createElement('radio', null, null,\r\n 'normal', 'normal');\r\n $stringweight[] =& $this->createElement('radio', null, null,\r\n 'Bold', 'bold');\r\n $this->addGroup($stringweight, 'stringweight', 'Font weight:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('apply','process'));\r\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: border properties');\r\n\r\n $borderpainted[] =& $this->createElement('radio', null, null, 'Yes', true);\r\n $borderpainted[] =& $this->createElement('radio', null, null, 'No', false);\r\n $this->addGroup($borderpainted, 'borderpainted', 'Display the border:');\r\n\r\n $this->addElement('text', 'borderclass', 'CSS class:', array('size' => 32));\r\n\r\n $borderstyle['style'] =& $this->createElement('select',\r\n 'style', 'style',\r\n array('solid' => 'Solid',\r\n 'dashed' => 'Dashed',\r\n 'dotted' => 'Dotted',\r\n 'inset' => 'Inset',\r\n 'outset' => 'Outset'));\r\n $borderstyle['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 2));\r\n $borderstyle['color'] =& $this->createElement('text',\r\n 'color', 'color',\r\n array('size' => 7));\r\n $this->addGroup($borderstyle, 'borderstyle', null, ' ');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('apply','process'));\r\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: cell properties');\r\n\r\n $this->addElement('text', 'cellid', 'Id mask:', array('size' => 32));\r\n $this->addElement('text', 'cellclass', 'CSS class:', array('size' => 32));\r\n\r\n $cellvalue['min'] =& $this->createElement('text',\r\n 'min', 'minimum',\r\n array('size' => 4));\r\n $cellvalue['max'] =& $this->createElement('text',\r\n 'max', 'maximum',\r\n array('size' => 4));\r\n $cellvalue['inc'] =& $this->createElement('text',\r\n 'inc', 'increment',\r\n array('size' => 4));\r\n $this->addGroup($cellvalue, 'cellvalue', 'Value:', ' ');\r\n\r\n $cellsize['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 4));\r\n $cellsize['height'] =& $this->createElement('text',\r\n 'height', 'height',\r\n array('size' => 4));\r\n $cellsize['spacing'] =& $this->createElement('text',\r\n 'spacing', 'spacing',\r\n array('size' => 2));\r\n $cellsize['count'] =& $this->createElement('text',\r\n 'count', 'count',\r\n array('size' => 2));\r\n $this->addGroup($cellsize, 'cellsize', 'Size:', ' ');\r\n\r\n $cellcolor['active'] =& $this->createElement('text',\r\n 'active', 'active',\r\n array('size' => 7));\r\n $cellcolor['inactive'] =& $this->createElement('text',\r\n 'inactive', 'inactive',\r\n array('size' => 7));\r\n $cellcolor['bgcolor'] =& $this->createElement('text',\r\n 'bgcolor', 'background',\r\n array('size' => 7));\r\n $this->addGroup($cellcolor, 'cellcolor', 'Color:', ' ');\r\n\r\n $cellfont['family'] =& $this->createElement('text',\r\n 'family', 'family',\r\n array('size' => 32));\r\n $cellfont['size'] =& $this->createElement('text',\r\n 'size', 'size',\r\n array('size' => 2));\r\n $cellfont['color'] =& $this->createElement('text',\r\n 'color', 'color',\r\n array('size' => 7));\r\n $this->addGroup($cellfont, 'cellfont', 'Font:', ' ');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('apply','process'));\r\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: save PHP/CSS code');\r\n\r\n $code[] =& $this->createElement('checkbox', 'P', null, 'PHP');\r\n $code[] =& $this->createElement('checkbox', 'C', null, 'CSS');\r\n $this->addGroup($code, 'phpcss', 'PHP and/or StyleSheet source code:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('next','apply'));\r\n }", "function buildSettingsForm() {}", "public function buildForm()\n {\n $this\n ->addMeasureList()\n ->addAscendingList()\n ->addTitles(['class' => 'indicator_title_title_narrative', 'narrative_true' => true])\n ->addDescriptions(['class' => 'indicator_description_title_narrative'])\n ->addCollection('reference', 'Activity\\Reference', 'reference', [], trans('elementForm.reference'))\n ->addAddMoreButton('add_reference', 'reference')\n ->addBaselines()\n ->addPeriods()\n ->addAddMoreButton('add_period', 'period')\n ->addRemoveThisButton('remove_indicator');\n }", "protected function build()\n {\n $stockalign = new GtkAlignment(0, 0, 0, 0);\n $stockalign->add(\n GtkImage::new_from_stock(\n Gtk::STOCK_DIALOG_ERROR, Gtk::ICON_SIZE_DIALOG\n )\n );\n $this->pack_start($stockalign, false, true);\n\n\n $this->expander = new GtkExpander('');\n\n $this->message = new GtkLabel();\n $this->expander->set_label_widget($this->message);\n $this->message->set_selectable(true);\n $this->message->set_line_wrap(true);\n\n $this->userinfo = new GtkLabel();\n $this->userinfo->set_selectable(true);\n $this->userinfo->set_line_wrap(true);\n //FIXME: add scrolled window\n $this->expander->add($this->userinfo);\n\n $this->pack_start($this->expander);\n }", "function build_basic_form()\r\n {\r\n $this->addElement('select', LanguagePack :: PROPERTY_BRANCH, Translation :: get('Branch'), LanguagePack :: get_branch_options());\r\n \r\n \t$this->addElement('file', 'file', Translation :: get('FileName'));\r\n $allowed_upload_types = array('zip');\r\n $this->addRule('file', Translation :: get('OnlyZIPAllowed'), 'filetype', $allowed_upload_types);\r\n $this->addRule('file', Translation :: get('ThisFieldIsRequired', null, Utilities :: COMMON_LIBRARIES), 'required');\r\n \r\n // Submit button\r\n //$this->addElement('submit', 'user_settings', 'OK');\r\n $buttons[] = $this->createElement('style_submit_button', 'submit', Translation :: get('Import', null, Utilities :: COMMON_LIBRARIES), array('class' => 'positive'));\r\n $buttons[] = $this->createElement('style_reset_button', 'reset', Translation :: get('Reset', null, Utilities :: COMMON_LIBRARIES), array('class' => 'normal empty'));\r\n \r\n $this->addGroup($buttons, 'buttons', null, '&nbsp;', false);\r\n }", "protected function buildForm()\n {\n $this->form = Yii::createObject(array_merge([\n 'scenario' => $this->scenario,\n 'parent_id' => $this->parent_id,\n 'parentTariff' => $this->parentTariff,\n 'tariff' => $this->tariff,\n ], $this->getFormOptions()));\n }", "function SLFramework_Progressbar($length=300, $height=20, $start=0, $insideText=\"\", $id=\"progressbar\") {\r\n\t\t\t$this->length = $length ; \r\n\t\t\t$this->insideText = $insideText ; \r\n\t\t\t$this->height = $height ; \r\n\t\t\t$this->start = $start ; \r\n\t\t\t$this->id = $id ; \r\n\t\t}", "public function buildForm()\n {\n }", "protected function Form_Create() {\n\t\t\t$this->txtValue1 = new QTextBox($this);\n\t\t\t\n\t\t\t$this->txtValue2 = new QTextBox($this);\n\t\t\t\n\t\t\t$this->lstOperation = new QListBox($this);\n\t\t\t$this->lstOperation->AddItem('+', 'add');\n\t\t\t$this->lstOperation->AddItem('-', 'subtract');\n\t\t\t$this->lstOperation->AddItem('*', 'multiply');\n\t\t\t$this->lstOperation->AddItem('/', 'divide');\n\t\t\t\n\t\t\t$this->btnCalculate = new QButton($this);\n\t\t\t$this->btnCalculate->Text = 'Calculate';\n\t\t\t$this->btnCalculate->AddAction(new QClickEvent(), new QServerAction('btnCalculate_Click'));\n\t\t\t\n\t\t\t$this->lblResult = new QLabel($this);\n\t\t\t$this->lblResult->HtmlEntities = false;\n\t\t}", "public function initConfigurationForm()\n\t{\n\t\tglobal $lng, $ilCtrl;\n\t\t\n\t\t$pl = $this->getPluginObject();\n\t\n\t\tinclude_once(\"Services/Form/classes/class.ilPropertyFormGUI.php\");\n\t\t$form = new ilPropertyFormGUI();\n\t\n\t\t// setting 1 (a checkbox)\n\t\t$cb = new ilCheckboxInputGUI($pl->txt(\"setting_1\"), \"setting_1\");\n\t\t$form->addItem($cb);\n\t\t\n\t\t// setting 2 (text)\n\t\t$ti = new ilTextInputGUI($pl->txt(\"setting_2\"), \"setting_2\");\n\t\t$ti->setRequired(true);\n\t\t$ti->setMaxLength(10);\n\t\t$ti->setSize(10);\n\t\t$form->addItem($ti);\n\t\n\t\t$form->addCommandButton(\"save\", $lng->txt(\"save\"));\n\t \n\t\t$form->setTitle($pl->txt(\"example_plugin_configuration\"));\n\t\t$form->setFormAction($ilCtrl->getFormAction($this));\n\t\t\n\t\treturn $form;\n\t}", "private function loadForm()\n {\n // init settings form\n $this->frm = new Form('settings');\n\n // add festival year\n $this->frm->addText('year', $this->get('fork.settings')->get($this->URL->getModule(), 'year'));\n\n // add fields for pagination\n $this->frm->addDropdown(\n 'overview_num_items',\n array_combine(range(1, 30), range(1, 30)),\n $this->get('fork.settings')->get($this->URL->getModule(), 'overview_num_items', 10)\n );\n $this->frm->addDropdown(\n 'recent_festival_list_num_items',\n array_combine(range(1, 30), range(1, 30)),\n $this->get('fork.settings')->get($this->URL->getModule(), 'recent_festival_list_num_items', 5)\n );\n\n // add functions fields\n $this->frm->addCheckbox('cover_image_enabled', $this->get('fork.settings')->get($this->URL->getModule(), 'cover_image_enabled', false));\n $this->frm->addCheckbox('cover_image_required', $this->get('fork.settings')->get($this->URL->getModule(), 'cover_image_required', false));\n $this->frm->addCheckbox('multi_images_enabled', $this->get('fork.settings')->get($this->URL->getModule(), 'multi_images_enabled', false));\n\n // add god user only fields\n if ($this->godUser) {\n $this->frm->addText('image_size_limit', (float) $this->get('fork.settings')->get($this->URL->getModule(), 'image_size_limit', 10));\n }\n }", "public function initClientOverviewForm()\n\t{\n\t\tglobal $lng, $ilCtrl;\n\n\t\t$settings = $this->setup->getClient()->getAllSettings();\n\n\t\tinclude_once(\"Services/Form/classes/class.ilPropertyFormGUI.php\");\n\t\t$this->form = new ilPropertyFormGUI();\n\n\t\t$this->form->setTitle($lng->txt(\"client_info\"));\n\n\t\t// installation name\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"inst_name\"), \"inst_name\");\n\t\t$ne->setValue(($this->setup->getClient()->getName())\n\t\t\t? $this->setup->getClient()->getName()\n\t\t\t: \"&lt;\".$this->lng->txt(\"no_client_name\").\"&gt;\");\n\t\t$ne->setInfo($this->setup->getClient()->getDescription());\n\t\t$this->form->addItem($ne);\n\n\t\t// client id\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"client_id\"), \"client_id\");\n\t\t$ne->setValue($this->setup->getClient()->getId());\n\t\t$this->form->addItem($ne);\n\n\t\t// nic id\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"ilias_nic_id\"), \"nic_id\");\n\t\t$ne->setValue(($this->setup->getClient()->db_installed)\n\t\t\t? $settings[\"inst_id\"]\n\t\t\t: $txt_no_database);\n\t\t$this->form->addItem($ne);\n\n\t\t// database version\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"db_version\"), \"db_vers\");\n\t\t$ne->setValue(($this->setup->getClient()->db_installed)\n\t\t\t? $settings[\"db_version\"]\n\t\t\t: $txt_no_database);\n\t\t$this->form->addItem($ne);\n\n\t\t// access status\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"access_status\"), \"status\");\n\t\t//$access_link = \"&nbsp;&nbsp;[<a href=\\\"setup.php?cmd=changeaccess&client_id=\".$this->setup->getClient()->getId().\"&back=view\\\">\".$this->lng->txt($access_button).\"</a>]\";\n\t\t$access_status = ($this->setup->getClient()->status[\"access\"][\"status\"]) ? \"online\" : \"disabled\";\n\t\t$ne->setValue($this->lng->txt($access_status).$access_link);\n\t\t$this->form->addItem($ne);\n\n\t\t// server information\n\t\t$sh = new ilFormSectionHeaderGUI();\n\t\t$sh->setTitle($this->lng->txt(\"server_info\"));\n\t\t$this->form->addItem($sh);\n\n\t\t// ilias version\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"ilias_version\"), \"il_vers\");\n\t\t$ne->setValue(ILIAS_VERSION);\n\t\t$this->form->addItem($ne);\n\n\t\t// host\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"host\"), \"host\");\n\t\t$ne->setValue($_SERVER[\"SERVER_NAME\"]);\n\t\t$this->form->addItem($ne);\n\n\t\t// ip address and port\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"ip_address\").\" & \".\n\t\t\t$lng->txt(\"port\"));\n\t\t$ne->setValue($_SERVER[\"SERVER_ADDR\"].\":\".$_SERVER[\"SERVER_PORT\"]);\n\t\t$this->form->addItem($ne);\n\n\t\t// server software\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"server_software\"), \"server_softw\");\n\t\t$ne->setValue($_SERVER[\"SERVER_SOFTWARE\"]);\n\t\t$this->form->addItem($ne);\n\n\t\t// http path\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"http_path\"), \"http_path\");\n\t\t$ne->setValue(ILIAS_HTTP_PATH);\n\t\t$this->form->addItem($ne);\n\n\t\t// absolute path\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"absolute_path\"), \"absolute_path\");\n\t\t$ne->setValue(ILIAS_ABSOLUTE_PATH);\n\t\t$this->form->addItem($ne);\n\n\t\t// third party tools\n\t\t$sh = new ilFormSectionHeaderGUI();\n\t\t$sh->setTitle($this->lng->txt(\"3rd_party_software\"));\n\t\t$this->form->addItem($sh);\n\n\t\t$tools = array(\"convert\", \"zip\", \"unzip\", \"ghostscript\", \"java\", \"htmldoc\", \"ffmpeg\");\n\n\t\tforeach ($tools as $tool)\n\t\t{\n\t\t\t// tool\n\t\t\t$ne = new ilNonEditableValueGUI($lng->txt($tool.\"_path\"), $tool.\"_path\");\n\t\t\t$p = $this->setup->ini->readVariable(\"tools\", $tool);\n\t\t\t$ne->setValue($p ? $p : $this->lng->txt(\"not_configured\"));\n\t\t\t$this->form->addItem($ne);\n\t\t}\n\n\t\t// latex\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"url_to_latex\"), \"latex_url\");\n\t\t$p = $this->setup->ini->readVariable(\"tools\", \"latex\"); // #13109\n\t\t$ne->setValue($p ? $p : $this->lng->txt(\"not_configured\"));\n\t\t$this->form->addItem($ne);\n\n\t\t// virus scanner\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"virus_scanner\"), \"vscan\");\n\t\t$ne->setValue($this->setup->ini->readVariable(\"tools\",\"vscantype\"));\n\t\t$this->form->addItem($ne);\n\n\t\t// scan command\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"scan_command\"), \"scan\");\n\t\t$p = $this->setup->ini->readVariable(\"tools\",\"scancommand\");\n\t\t$ne->setValue($p ? $p : $this->lng->txt(\"not_configured\"));\n\t\t$this->form->addItem($ne);\n\n\t\t// clean command\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"clean_command\"), \"clean\");\n\t\t$p = $this->setup->ini->readVariable(\"tools\",\"cleancommand\");\n\t\t$ne->setValue($p ? $p : $this->lng->txt(\"not_configured\"));\n\t\t$this->form->addItem($ne);\n\n\t\t$this->form->setFormAction(\"setup.php?cmd=gateway\");\n\t}", "function __construct()\n {\n parent::__construct();\n \n // creates the form\n $this->form = new TQuickForm('form_historicotrabalho');\n $this->form->class = 'tform'; // change CSS class\n \n $this->form->style = 'display: table;width:100%'; // change style\n \n // Define Título da página\n $this->form->setFormTitle('Banco de Horas - Lançamento de Escalas');\n // Inicía ferramentas auxiliares\n $fer = new TFerramentas(); // Ferramentas diversas\n $sicad = new TSicadDados(); // Ferramentas de acesso ao SICAD\n //Realiza definições iniciais de acesso\n $profile = TSession::getValue('profile'); //Profile da Conta do usuário\n if ($this->opm_operador==false) //Carrega OPM do usuário\n {\n //Confere se já foi carregado a OPM, senão carrega...ou se o ambiente for de desenvolvimento usa a OPM = 140\n $this->opm_operador = ($fer->is_dev()==true) ? 140 : $profile['unidade']['id'];\n }\n if (!$this->nivel_sistema || $this->config_load == false) //Carrega OPMs que tem acesso\n {\n $this->nivel_sistema = $fer->getnivel (get_class($this));//Verifica qual nível de acesso do usuário\n $this->listas = $sicad->get_OpmsRegiao($this->opm_operador);//Carregas as OPMs que o usuário administra\n $this->config = $fer->getConfig($this->sistema); //Busca o Nível de acesso que o usuário tem para a Classe\n $this->config_load = true; //Informa que configuração foi carregada\n }\n \n // Cria os Itens do Formulário\n $rgmilitar = new TEntry('rgmilitar');\n \n //Monta ComboBox com OPMs que o Operador pode ver\n //echo $this->nivel_sistema.'---'.$this->opm_operador;\n if ($this->nivel_sistema>=80) //Adm e Gestor\n {\n $criteria = null;\n }\n else if ($this->nivel_sistema>=50 ) //Nível Operador (carrega OPM e subOPMs)\n {\n $criteria = new TCriteria;\n //Se não há lista de OPM, carrega só a OPM do usuário\n $lista = ($this->listas['valores']!='') ? $this->listas['valores'] : $profile['unidade']['id'];\n $query = \"(SELECT DISTINCT id FROM g_geral.opm WHERE id IN (\".$lista.\"))\";\n $criteria->add (new TFilter ('id','IN',$query));\n }\n else if ($this->nivel_sistema<50) //nível de visitante (só a própria OPM)\n {\n $criteria = new TCriteria;\n $query = \"(SELECT DISTINCT id FROM g_geral.opm WHERE id IN (\".$this->opm_operador.\"))\";\n $criteria->add (new TFilter ('id','IN',$query));\n }\n $opm = new TDBCombo('opm','sicad','OPM','id','nome','nome',$criteria);\n \n $ativo = new TCombo('ativo');\n $lista_opm = new TSelect('lista_opm');\n $lista_slc = new TSelect('lista_slc');\n //Critério para os Turnos de Serviço (Deve-se excluir os ocultos e o item id=13)\n $criteria = new TCriteria; \n $criteria->add(new TFilter('oculto', '=', 'f'));\n $criteria->add(new TFilter('id', '!=', 13));\n $turno = new TDBCombo('turno','sicad','turnos','id','nome','nome',$criteria);\n \n $datainicial = new TDate('dataInicial');\n $datafinal = new TDate('dataFinal');\n $horaIncialOrdinario = new TEntry('horaInicialOrdinario');\n $opm_id_info = new TDBCombo('opm_id_info','sicad','OPM','id','sigla','sigla');\n $opm_info_atual = new TCombo('OPM_info_Atual');\n $diasExtra = new TEntry('diasExtra');\n $mesExtra = new TCombo('mesExtra');\n $anoExtra = new TCombo('anoExtra');\n $horaInicioExtra = new TEntry('horaInicioExtra');\n $horasTrabalhadas = new TEntry('horasTrabalhadas');\n $tipoExtra = new TCombo('tipoExtra');\n $afasta_id = new TDBCombo('afasta_id','sicad','afastamentos','id','nome','nome');\n $dtinicioaf = new TDate('dtinicioaf');\n $dtfimaf = new TDate('dtfimaf');\n $bgaf = new TEntry('bgaf');\n $anobgaf = new TEntry('anobgaf');\n \n //Formatar Itens\n $rgmilitar->setSize(80);\n $opm->setSize(300);\n $lista_opm->setSize(280,256);\n $lista_slc->setSize(280,256);\n $turno->setSize(200);\n $datainicial->setSize(80);\n $datafinal->setSize(80);\n $horaIncialOrdinario->setSize(50);\n $opm_id_info->setSize(150);\n $opm_info_atual->setSize(80);\n $diasExtra->setSize(200);\n $mesExtra->setSize(80);\n $anoExtra->setSize(80);\n $horaInicioExtra->setSize(50);\n $horasTrabalhadas->setSize(50);\n $tipoExtra->setSize(120);\n $afasta_id->setSize(150);\n $dtinicioaf->setSize(80);\n $dtfimaf->setSize(80);\n $bgaf->setSize(80);\n $anobgaf->setSize(80);\n $ativo->setSize(80);\n //Style\n $lista_opm->style = \"font-size: 12px;\";\n $lista_slc->style = \"font-size: 12px;\";\n\n //Mascaras\n $datainicial->setMask('dd-mm-yyyy');\n $datafinal->setMask('dd-mm-yyyy');\n $dtinicioaf->setMask('dd-mm-yyyy');\n $dtfimaf->setMask('dd-mm-yyyy');\n $horaIncialOrdinario->setMask('99:99');\n $horaInicioExtra->setMask('99:99');\n $horasTrabalhadas->setMask('99');\n\n //Dados\n $opm_info_atual->addItems($fer->lista_sim_nao());//($item);\n $opm_info_atual->setValue('N');\n $ativo->addItems($fer->lista_sim_nao());//($item);\n $ativo->setValue('N');\n //\n $item = array (\"S\"=>\"Remunerada\",\"N\"=>\"Administrativa\");\n $tipoExtra->addItems($item);\n $tipoExtra->setValue('N');\n //\n $fer = new TFerramentas;\n $mesExtra->addItems($fer->lista_meses());\n $anoExtra->addItems($fer->lista_anos());\n //Tips\n $rgmilitar->setTip('Preencha com o RG do Militar pretendido...');\n $opm->setTip('Selecione a OPM para que possa preencher o campo de Lista da OPM com os componentes da Unidade.');\n $lista_opm->setTip('Lista dos Militares pertencente à Unidade Selecionada acima.<br>'.\n 'Vale lembrar que esta lista é atualizada diáriamente, assim os que estão aqui reflete as listas do SICAD.<br>' .\n 'Outro ponto a se considerar é a possibilidade de selecionar vários PMs, para isso basta usar<br>'.\n 'as teclas Control (ctrl) ou shift (seta pra cima);');\n $lista_slc->setTip('Militares Selecionados. Todos que estão nesta lista serão afetados, quer por uma escala ou por afastamentos...');\n $turno->setTip('Selecione uma Escala conforme a necessidade.');\n $datainicial->setTip('Selecione a data inicial da Escala Ordinária.');\n $datafinal->setTip('Selecione a data final da Escala Ordinária');\n $horaIncialOrdinario->setTip('Informe a hora de inicio do primeiro turno da Escala Ordinária.');\n $opm_id_info->setTip('Selecione qual foi a OPM informante da Escala.<br>É útil quando o militar está prestando serviços em uma OPM diferente da sua.');\n $opm_info_atual->setTip('A unidade Informante é a Unidade Atual? Se SIM, irei substituir a unidade que por ventura está na ficha do militar pela que foi informada...');\n $diasExtra->setTip('Defina os dias que o militar trabalhou podendo ser:<br> - Um dia apenas (Ex: 1);<br>- Alguns dias separados por vírgula(Ex: 2,5,8);<br>- Um intervalo de dias ligados por traço (Ex: 2-10);<br>- Um misto de combinações (Ex: 1,3-5,8,15-25). ');\n $mesExtra->setTip('Mês que ocorreu o serviço extra.');\n $anoExtra->setTip('Ano que ocorreu o serviço extra.');\n $horaInicioExtra->setTip('Hora que o serviço extra iniciou.');\n $horasTrabalhadas->setTip('Quantas horas foram trabalhadas neste serviço extra.');\n $tipoExtra->setTip('Defina se a escala foi Administrativa (sem remuneração AC-4) ou Remunerada (com pagamento de AC-4).');\n $afasta_id->setTip('Qual tipo de afastamento o militar fez jus.');\n $dtinicioaf->setTip('Data inicial do afastamento.');\n $dtfimaf->setTip('Data final do afastamento.');\n $bgaf->setTip('Numero do BG onde foi publicado o afastamento(Opcional).');\n $anobgaf->setTip('Ano de publicação do BG de Afastamento (Opcional).');\n $ativo->setTip('Se desejar que os militares inativos façam parte da seleção, marque como SIM para seleciona-los.'.\n '<br>Caso troque esta opção, não haverá a limpeza dos já selecionados.');\n //Ações\n //$change_action = new TAction(array($this, 'onSelectOpm_old'));//Ação de Popular lista de PMs\n //$opm->setChangeAction($change_action);\n //$ativo->setChangeAction($change_action);\n \n //Controle de Nível\n if ($this->nivel_sistema<$this->config[$this->cfg_chg_opm])\n {\n $opm_id_info->setEditable(FALSE);\n $opm_info_atual->setEditable(FALSE);\n }\n //Botões\n //Seleciona PMs\n $addPM = new TButton('addPM');\n $addPM->setImage('fa:arrow-down black');\n $addPM->class = 'btn btn-primary btn-sm';\n $Action = new TAction(array($this, 'onSelectMilitar'));\n $addPM->setAction($Action);\n $addPM->setLabel('Seleciona');\n \n //Botão Gera Escala Ordinária\n $runOrd = new TButton('runOrd');\n $runOrd->setImage('fa:floppy-o red');\n $runOrd->class = 'btn btn-primary btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_ord]) ? new TAction(array($this, 'onGeraOrdinaria')) : new TAction(array($this, 'NoAcess'));\n $runOrd->setAction($Action);\n $runOrd->setLabel('Gera Escala');\n \n //Botão Gera Escala Extra\n $runExt = new TButton('runExt');\n $runExt->setImage('fa:floppy-o red');\n $runExt->class = 'btn btn-primary btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_ext]) ? new TAction(array($this, 'onGeraExtra')) : new TAction(array($this, 'NoAcess'));\n $runExt->setAction($Action);\n $runExt->setLabel('Gera Escala');\n \n //Botão Gera Afastamento\n $runAfa = new TButton('runAfa');\n $runAfa->setImage('fa:floppy-o red');\n $runAfa->class = 'btn btn-primary btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_afa]) ? new TAction(array($this, 'onGeraAfastamento')) : new TAction(array($this, 'NoAcess'));\n $runAfa->setAction($Action);\n $runAfa->setLabel('Gera Afastamento');\n \n //Botão Limpa Afastamento\n $runCls = new TButton('runCls');\n $runCls->setImage('fa:trash black');\n $runCls->class = 'btn btn-danger btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_cls_afa]) ? new TAction(array($this, 'onLimpaAfastamento')) : new TAction(array($this, 'NoAcess'));\n $runCls->setAction($Action);\n $runCls->setLabel('Limpa Afastamento');\n \n //Botão Verifica Escala\n $runVer = new TButton('runVer');\n $runVer->setImage('fa:eye black');\n $runVer->class = 'btn btn-info btn-sm';\n $Action = new TAction(array($this, 'onListaEscala'));\n $runVer->setAction($Action);\n $runVer->setLabel('Ver Escala');\n \n //Botão limpa Escalas\n $runLmp = new TButton('runLmp');\n $runLmp->setImage('fa:trash black');\n $runLmp->class = 'btn btn-danger btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_cls_esc]) ? new TAction(array($this, 'onLimpaEscala')) : new TAction(array($this, 'NoAcess'));\n $runLmp->setAction($Action);\n $runLmp->setLabel('Limpa Escala');\n \n //Botão Carrega OPM na Lista da OPM\n $runOpm = new TButton('runOpm');\n $runOpm->setImage('fa:retweet');\n $runOpm->class = 'btn btn-success btn-sm';\n $Action = new TAction(array($this, 'onSelectOpm_old'));\n $runOpm->setAction($Action);\n $runOpm->setLabel('Carrega OPM');\n \n $table = new TTable();\n $table-> border = '0';\n $table-> cellpadding = '4';\n $table-> style = 'border-collapse:collapse; text-align: center;';\n\n //Monta selecionador\n $hbox1 = new THBox;\n $hbox1->addRowSet( new TLabel('RG:'),$rgmilitar,$addPM,new TLabel('Unidade:'),$opm,new TLabel('Seleciona Inativos?'),$ativo,$runOpm);\n $frame1 = new TFrame;\n $frame1->setLegend('Selecione os PMs ou a OPM');\n $frame1->add($hbox1);\n //Monta Labels das tabelas de distribuição\n $title4 = new TLabel('Listagem da OPM');\n $title4->setFontSize(12);\n $title4->setFontFace('Arial');\n $title4->setFontColor('black');\n $title4->setFontStyle('b');\n \n $title3 = new TLabel('Comandos');\n $title3->setFontSize(12);\n $title3->setFontFace('Arial');\n $title3->setFontColor('black');\n $title3->setFontStyle('b');\n \n $title2 = new TLabel('PMs Selecionados');\n $title2->setFontSize(12);\n $title2->setFontFace('Arial');\n $title2->setFontColor('black');\n $title2->setFontStyle('b');\n \n $title1 = new TLabel('Gestão da Escala');\n $title1->setFontSize(12);\n $title1->setFontFace('Arial');\n $title1->setFontColor('black');\n $title1->setFontStyle('b');\n \n //Botões de Serviço\n $add = new TButton('add_opm');\n $del = new TButton('del_opm');\n $cls = new TButton('clear');\n $ret = new TButton('return');\n \n //Tabelas Auxiliares de Cadastro\n $table_ord = new TTable;//Escalas Ordinárias\n $table_ext = new TTable;//Escalas Extras\n $table_afa = new TTable;//Afastamentos\n\n //Cria no Notebook \n $notebook = new TNotebook(200, 220);\n // Crias as Abas no notebook\n $notebook->appendPage('Ordinária' , $table_ord);\n $notebook->appendPage('Extra' , $table_ext);\n $notebook->appendPage('Afastamento', $table_afa);\n\n //Itens: Escala Ordinária\n $table_ord->addRowSet(array(new TLabel('Escala'),$turno));\n $table_ord->addRowSet(array(new TLabel('De'),$datainicial,new TLabel('A'),$datafinal));\n $table_ord->addRowSet(array(new TLabel('Hora Inicial'),$horaIncialOrdinario));\n $table_ord->addRowSet(array(new TLabel('OPM Informante'),$opm_id_info));\n $table_ord->addRowSet(array(new TLabel('Usar Informante com Atual'),$opm_info_atual));\n $table_ord->addRowSet(array($runLmp,$runOrd));\n //Itens: Escala Extra\n $table_ext->addRowSet(array(new TLabel('Dias'),$diasExtra));\n $table_ext->addRowSet(array(new TLabel('Mês'),$mesExtra,new TLabel('Ano'),$anoExtra));\n $table_ext->addRowSet(array(new TLabel('Hr Início'),$horaInicioExtra,new TLabel('Hrs. Trab.'),$horasTrabalhadas));\n $table_ext->addRowSet(array(new TLabel('Tipo Escala'),$tipoExtra));\n $table_ext->addRowSet($runExt);\n //Itens: Afastamento\n $table_afa->addRowSet(array(new TLabel('Afastamento'),$afasta_id));\n $table_afa->addRowSet(array(new TLabel('De'),$dtinicioaf,new TLabel('A'),$dtfimaf));\n $table_afa->addRowSet(array(new TLabel('BG'),$bgaf,new TLabel('/'),$anobgaf));\n $table_afa->addRowSet(array($runCls,$runAfa));\n\n //Ações\n $add->setAction(new TAction(array($this, 'onAddPMSelect')));\n $del->setAction(new TAction(array($this, 'onDelPMSelect')));\n $cls->setAction(new TAction(array($this, 'onClearSelect')));\n $ret->setAction(new TAction(array($this, 'onReturn')));\n //Labels\n $add->setLabel('Adiciona');\n $del->setLabel('Remove');\n $cls->setLabel('Limpa');\n $ret->setLabel('Volta ao Gerenciador');\n //Icones\n $add->setImage('fa:plus green');\n $del->setImage('fa:minus red');\n $cls->setImage('fa:file-o black');\n $ret->setImage('fa:backward black');\n //Classes\n $ret->class = 'btn btn-warning';\n //PopUps\n if ($this->popAtivo)\n {\n $addPM->popover = 'true';\n $addPM->popside = 'top';\n $addPM->poptitle = 'Seleciona Militar';\n $addPM->popcontent = 'Clique aqui ou tecle ENTER para selecionar o militar.';\n //\n $add->popover = 'true';\n $add->popside = 'top';\n $add->poptitle = 'Adiciona Seleção de Militares';\n $add->popcontent = 'Adiciona o(s) Militar(es) selecionado(s) da caixa Lista da OPM.';\n //\n $del->popover = 'true';\n $del->popside = 'top';\n $del->poptitle = 'Remove Seleção de Militares';\n $del->popcontent = 'Remove o(s) Militar(es) selecionado(s) da caixa Selecionados.';\n //\n $cls->popover = 'true';\n $cls->popside = 'top';\n $cls->poptitle = 'Limpa toda Seleção de Militares';\n $cls->popcontent = 'Remove TODOS os Militares selecionados da caixa Selecionados.';\n //\n $ret->popover = 'true';\n $ret->popside = 'top';\n $ret->poptitle = 'Retorno à Tela de Gerenciamento';\n $ret->popcontent = 'Retorna para a Tela de Gerenciamento do Banco de Horas.<br>A lista e Militares já selecionados permanecerá até o fechamento do sistema.';\n //\n $runOrd->popover = 'true';\n $runOrd->popside = 'top';\n $runOrd->poptitle = 'Gera Escala Ordinária.';\n $runOrd->popcontent = 'São campos necessários:<br>- Turno;<br>- Data inicial e final;<br>- Hora de Início da Escala.';//.\n //\n $runExt->popover = 'true';\n $runExt->popside = 'top';\n $runExt->poptitle = 'Gera Escala Extra';\n $runExt->popcontent = 'São Campos necessários:<br>- Dias (preencher com um ou mais);<br>- Mês e Ano;<br>- Hora Início;<br>'.\n '- Horas Trabalhadas;<br>- Tipo Escala.';\n //\n $runCls->popover = 'true';\n $runCls->popside = 'top';\n $runCls->poptitle = 'Limpa Afastamentos e Restrições (apenas)';\n $runCls->popcontent = 'Use os campos acima como filtro.';\n //\n $runAfa->popover = 'true';\n $runAfa->popside = 'top';\n $runAfa->poptitle = 'Gera Afastamentos e Restrições';\n $runAfa->popcontent = 'São Campos necessários:<br>- Afastamento;<br>- O intervalo de datas.';\n //\n $runVer->popover = 'true';\n $runVer->popside = 'top';\n $runVer->poptitle = 'Verifica a Escala';\n $runVer->popcontent = 'É necessário escolher um militar (um apenas) quer no Campo Lista da OPM quer no Campo Selecionados.';\n //\n $runLmp->popover = 'true';\n $runLmp->popside = 'top';\n $runLmp->poptitle = 'Limpa as Escalas e Afastamentos';\n $runLmp->popcontent = 'Limpa Escalas (ordinária e Extra) e Afastamentos dos militares Selecionados e no intervalo de datas';\n \n $runOpm->popover = 'true';\n $runOpm->popside = 'top';\n $runOpm->poptitle = 'Carrega os militares da Unidade';\n $runOpm->popcontent = 'Carrega os Militares da unidade escolhida filtrando os ativos e inativos conforme se escolhe Sim ou Não no campo Seleciona inativos:';\n }\n //Tabela com Comandos\n $frame_tempo = new TFrame();\n $hboxc = new THBox;\n $hboxc->addRowSet($add);\n $hboxc->addRowSet($del);\n $hboxc->addRowSet($cls);\n $hboxc->addRowSet($runVer);\n $hboxc->addRowSet($ret);\n\n $frame1->add($hboxc);\n $frame1->style = \"width: 100%; display: table-cell; vertical-align: top; text-align: center;\";\n\n //Frame com Lista da OPM\n $vbox2 = new TVBox;\n $frame4 = new TFrame(260,330);\n $frame4->setLegend('Lista de Militares da OPM');\n $frame4->add($lista_opm);\n $frame4->style = \"width: 280px; display: table-cell; vertical-align: top;\";\n $vbox2->add($frame4);\n //Frame de Seleção\n $vbox4 = new TVBox;\n $frame6 = new TFrame(260,330);\n $frame6->setLegend('Militares Selecionados');\n $frame6->add($lista_slc);\n $frame6->style = \"width: 280px; display: table-cell; vertical-align: top;\";\n $vbox4->add($frame6);\n //Frame de Geração\n $vbox5 = new TVBox;\n $frame3 = new TFrame(280,330);\n $frame3->setLegend('Funções de Geração');\n $frame3->add($notebook);\n $frame3->style = \"width: 280px; display: table-cell; vertical-align: top;\";\n $vbox5->add($frame3);\n \n $frame2 = new TFrame;\n $frame2->style = \"width: 100%; display: table-cell; vertical-align: top;\";\n $frame2->add($vbox2);\n $frame2->add($vbox4);\n $frame2->add($vbox5);\n\n $this->form->setFields(array($rgmilitar,$opm,$addPM,$lista_opm,$lista_slc,$opm_info_atual,$opm_id_info,$turno,\n $datafinal,$datainicial,$dtinicioaf,$dtfimaf,$horaIncialOrdinario,$horaInicioExtra,$horasTrabalhadas,\n $diasExtra,$mesExtra,$anoExtra,$bgaf,$anobgaf,$tipoExtra,$afasta_id,$ativo,\n $add,$del,$cls,$ret,$runOrd,$runExt,$runAfa,$runCls,$runVer,$runLmp,$runOpm)); \n // vertical box container\n $container = new TVBox;\n $container->style = 'width: 90%';\n $container->add(new TXMLBreadCrumb('menu.xml', 'bdhManagerForm'));\n $container->add($frame1);\n //$container->add($frame_tempo);\n $container->add($frame2);\n $this->form->add($container);\n\n //parent::add($container);\n parent::add($this->form);\n if ($opm->getValue())\n {\n self::onSelectOpm_old(array('opm'=>$opm->getValue(),'ativo'=>$ativo->getValue()));\n }\n $lista_slc = TSession::getValue(__CLASS__.'_lista_slc');\n self::onLoadPMSelect();\n self::popula_escalas();\n\n }", "protected function initializeForm()\n {\n $this->form = new Form();\n $this->form->add(Element::create(\"FieldSet\",\"Report Format\")->add\n (\n Element::create(\"SelectionList\", \"File Format\", \"report_format\")\n ->addOption(\"Hypertext Markup Language (HTML)\",\"html\")\n ->addOption(\"Portable Document Format (PDF)\",\"pdf\")\n ->addOption(\"Microsoft Excel (XLS)\",\"xls\")\n ->addOption(\"Microsoft Word (DOC)\",\"doc\")\n ->setRequired(true)\n ->setValue(\"pdf\"),\n Element::create(\"SelectionList\", \"Page Orientation\", \"page_orientation\")\n ->addOption(\"Landscape\", \"L\")\n ->addOption(\"Portrait\", \"P\")\n ->setValue(\"L\"),\n Element::create(\"SelectionList\", \"Paper Size\", \"paper_size\")\n ->addOption(\"A4\", \"A4\")\n ->addOption(\"A3\", \"A3\")\n ->setValue(\"A4\")\n )->setId(\"report_formats\")->addAttribute(\"style\",\"width:50%\")\n );\n $this->form->setSubmitValue(\"Generate\");\n $this->form->addAttribute(\"action\",Application::getLink($this->path.\"/generate\"));\n $this->form->addAttribute(\"target\",\"blank\");\n }", "protected function form()\n {\n $form = new Form(new Direction());\n\n $form->text('name', __(trans('hhx.name')));\n $form->text('intro', __(trans('hhx.intro')));\n $form->image('Img', __(trans('hhx.img')))->move('daily/direction')->uniqueName();\n $form->select('status', __(trans('hhx.status')))->options(config('hhx.status'));;\n $form->number('order_num', __(trans('hhx.order_num')));\n $form->hidden('all_num', __(trans('hhx.all_num')))->default(0.00);\n $form->decimal('stock', __(trans('hhx.stock')));\n\n return $form;\n }", "function show_form()\n\t\t{\n\t\t\t//set a global template for interactive activities\n\t\t\t$this->t->set_file('run_activity','run_activity.tpl');\n\t\t\t\n\t\t\t//set the css style files links\n\t\t\t$this->t->set_var(array(\n\t\t\t\t'run_activity_css_link'\t=> $this->get_css_link('run_activity', $this->print_mode),\n\t\t\t\t'run_activity_print_css_link'\t=> $this->get_css_link('run_activity', true),\n\t\t\t));\n\t\t\t\n\t\t\t\n\t\t\t// draw the activity's title zone\n\t\t\t$this->parse_title($this->activity_name);\n\n\t\t\t//draw the instance_name input or label\n\t\t\t// init wf_name to the requested one or the stored name\n\t\t\t// the requested one handle the looping in activity form\n\n\t\t\t$wf_name = get_var('wf_name','post',$this->instance->getName());\n\t\t\t$this->parse_instance_name($wf_name);\n\n\t\t\t//draw the instance_name input or label\n\t\t\t// init wf_set_owner to the requested one or the stored owner\n\t\t\t// the requested one handle the looping in activity form\n\t\t\t$wf_set_owner = get_var('wf_set_owner','post',$this->instance->getOwner());\n\t\t\t$this->parse_instance_owner($wf_set_owner);\n\t\t\t\n\t\t\t// draw the activity central user form\n\t\t\t$this->t->set_var(array('activity_template' => $this->wf_template->parse('output', 'template')));\n\t\t\t\n\t\t\t//draw the select priority box\n\t\t\t// init priority to the requested one or the stored priority\n\t\t\t// the requested one handle the looping in activity form\n\t\t\t$priority = get_var('wf_priority','post',$this->instance->getPriority());\n\t\t\t$this->parse_priority($priority);\n\t\t\t\n\t\t\t//draw the select next_user box\n\t\t\t// init next_user to the requested one or the stored one\n\t\t\t// the requested one handle the looping in activity form\n\t\t\t$next_user = get_var('wf_next_user','POST',$this->instance->getNextUser());\n\t\t\t$this->parse_next_user($next_user);\n\t\t\t\n\t\t\t//draw print_mode buttons\n\t\t\t$this->parse_print_mode_buttons();\n\t\t\t\n\t\t\t//draw the activity submit buttons\t\n\t\t\t$this->parse_submit();\n\t\t\t\n\t\t\t//draw the info zone\n\t\t\t$this->parse_info_zone();\n\t\t\t\n\t\t\t//draw the history zone if user wanted it\n\t\t\t$this->parse_history_zone();\n\t\t\t\n\t\t\t$this->translate_template('run_activity');\n\t\t\t$this->t->pparse('output', 'run_activity');\n\t\t\t$GLOBALS['egw']->common->egw_footer();\n\t\t}", "public function buildForm(array $form, FormStateInterface $form_state) {\n $form['time_duration'] = [\n '#type' => 'number',\n '#title' => $this->t('Time duration'),\n '#min' => 100,\n '#step' => 100,\n '#description' => $this->t(\n \"Time in seconds from the user's last login. Used as an event to \n update the relationships between the user and companies.\"\n ),\n '#default_value' => $this->config('pmmi_sso.company.settings')->get('time_duration'),\n '#required' => TRUE,\n ];\n $form['submit'] = [\n '#type' => 'submit',\n '#value' => $this->t('Save'),\n ];\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Activity());\n\n $form->text('name', __('Name'));\n $form->image('image', __('Image'));\n $form->text('intro', __('Intro'));\n $form->UEditor('details', __('Details'));\n $form->datetime('start_at', __('Start at'))->default(date('Y-m-d H:i:s'));\n $form->datetime('end_at', __('End at'))->default(date('Y-m-d H:i:s'));\n $form->text('location', __('Location'));\n $form->decimal('fee', __('Fee'))->default(0.00);\n $form->number('involves', __('Involves'));\n $form->number('involves_min', __('Involves min'));\n $form->number('involves_max', __('Involves max'));\n $form->switch('status', __('Status'));\n $form->text('organizers', __('Organizers'));\n $form->number('views', __('Views'));\n $form->switch('is_stick', __('Is stick'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Resources);\n\n $form->text('name', '名称')->rules('required',['required' => '请输入 配置项的名称']);\n\n $form->radio('type', '类型')->options(Resources::TYPE);\n\n $form->cropper('url','图片');\n\n $form->number('sort_num','排序');\n\n $form->textarea('memo','备注');\n\n $form->tools(function (Form\\Tools $tools) {\n // 去掉`删除`按钮\n $tools->disableDelete();\n\n // 去掉`查看`按钮\n $tools->disableView();\n });\n $form->footer(function ($footer) {\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n\n // 去掉`继续编辑`checkbox\n $footer->disableEditingCheck();\n\n // 去掉`继续创建`checkbox\n $footer->disableCreatingCheck();\n\n });\n\n return $form;\n }", "protected function buildForm()\n\t{\t\n\t\t$mid = $this->Form->newInput( 'hidden' );\n\t\t$mid->set( 'name', 'mid' );\n\t\t$mid->set( 'id', 'mid' );\n\t\t$mid->set( 'value', $this->data['id'] );\n\t\t\n\t\t$submit = $this->Form->newInput( 'submit' );\n\t\t$submit->set( 'name', 'submit' );\n\t\t$submit->set( 'id', 'submit' );\n\t\t$submit->set( 'value', 'Restore' );\n\t}", "function buildForm(){\n\t\t# menampilkan form\n\t}", "protected function form()\n {\n $form = new Form(new UserHealth());\n\n $form->number('height', __('Height'));\n $form->number('weight', __('Weight'));\n $form->text('blood_pressure', __('Blood pressure'));\n $form->text('sugar_level', __('Sugar level'));\n $form->text('blood_type', __('Blood type'));\n $form->decimal('muscle_mass', __('Muscle mass'))->default(0);\n $form->text('metabolism', __('Metabolism'));\n $form->textarea('genetic_history', __('Genetic history'));\n $form->textarea('illness_history', __('Illness history'));\n $form->textarea('allergies', __('Allergies'));\n $form->textarea('prescription', __('Prescription'));\n $form->textarea('operations', __('Operations'));\n $form->number('user_id', __('User id'));\n\n return $form;\n }", "private function build_form()\n {\n $ldm = LaikaDataManager :: get_instance();\n\n // The Laika Scales\n $scales = $ldm->retrieve_laika_scales(null, null, null, new ObjectTableOrder(LaikaScale :: PROPERTY_TITLE));\n $scale_options = array();\n while ($scale = $scales->next_result())\n {\n $scale_options[$scale->get_id()] = $scale->get_title();\n }\n\n // The Laika Percentile Codes\n $codes = $ldm->retrieve_percentile_codes();\n $code_options = array();\n foreach ($codes as $code)\n {\n $code_options[$code] = $code;\n }\n\n $this->addElement('category', Translation :: get('Dates'));\n $this->add_timewindow(self :: GRAPH_FILTER_START_DATE, self :: GRAPH_FILTER_END_DATE, Translation :: get('StartTimeWindow'), Translation :: get('EndTimeWindow'), false);\n $this->addElement('category');\n\n $this->addElement('category', Translation :: get('Groups', null, 'group'));\n\n $group_options = $this->get_groups();\n\n if (count($group_options) > 0)\n {\n if (count($group_options) < 10)\n {\n $count = count($group_options);\n }\n else\n {\n $count = 10;\n }\n\n $this->addElement('select', self :: GRAPH_FILTER_GROUP, Translation :: get('Group', null, Utilities::GROUP), $this->get_groups(), array('multiple', 'size' => $count));\n $this->addRule(self :: GRAPH_FILTER_GROUP, Translation :: get('ThisFieldIsRequired', null, Utilities::COMMON_LIBRARIES), 'required');\n }\n else\n {\n $this->addElement('static', 'group_text', Translation :: get('Group'), Translation :: get('NoGroupsAvailable'));\n $this->addElement('hidden', self :: GRAPH_FILTER_GROUP, null);\n }\n\n $this->addElement('category');\n\n $this->addElement('category', Translation :: get('Results'));\n $this->addElement('select', self :: GRAPH_FILTER_SCALE, Translation :: get('Scale'), $scale_options, array('multiple', 'size' => '10'));\n $this->addRule(self :: GRAPH_FILTER_SCALE, Translation :: get('ThisFieldIsRequired', null, Utilities::COMMON_LIBRARIES), 'required');\n $this->addElement('select', self :: GRAPH_FILTER_CODE, Translation :: get('Code'), $code_options, array('multiple', 'size' => '4'));\n $this->addRule(self :: GRAPH_FILTER_CODE, Translation :: get('ThisFieldIsRequired', null, Utilities::COMMON_LIBRARIES), 'required');\n $this->addElement('category');\n\n $this->addElement('category', Translation :: get('Options'));\n\n $group = array();\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_TYPE, null, Translation :: get('RenderGraphAndTable'), LaikaGraphRenderer :: RENDER_GRAPH_AND_TABLE);\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_TYPE, null, Translation :: get('RenderGraph'), LaikaGraphRenderer :: RENDER_GRAPH);\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_TYPE, null, Translation :: get('RenderTable'), LaikaGraphRenderer :: RENDER_TABLE);\n $this->addGroup($group, self :: GRAPH_FILTER_TYPE, Translation :: get('RenderType'), '<br/>', false);\n\n $allow_save = PlatformSetting :: get('allow_save', LaikaManager :: APPLICATION_NAME);\n if ($allow_save == true)\n {\n $this->addElement('checkbox', self :: GRAPH_FILTER_SAVE, Translation :: get('SaveToRepository'));\n }\n\n $maximum_attempts = PlatformSetting :: get('maximum_attempts', LaikaManager :: APPLICATION_NAME);\n if ($maximum_attempts > 1)\n {\n $group = array();\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_ATTEMPT, null, Translation :: get('OnlyIncludeFirstAttempt'), LaikaGraphRenderer :: RENDER_ATTEMPT_FIRST);\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_ATTEMPT, null, Translation :: get('OnlyIncludeMostRecentAttempt'), LaikaGraphRenderer :: RENDER_ATTEMPT_LAST);\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_ATTEMPT, null, Translation :: get('IncludeAllAttempts'), LaikaGraphRenderer :: RENDER_ATTEMPT_ALL);\n $this->addGroup($group, self :: GRAPH_FILTER_ATTEMPT, Translation :: get('AttemptsToInclude'), '<br/>', false);\n }\n else\n {\n $this->addElement('hidden', self :: GRAPH_FILTER_ATTEMPT, LaikaGraphRenderer :: RENDER_ATTEMPT_ALL);\n }\n\n $this->addElement('category');\n\n $buttons = array();\n\n $buttons[] = $this->createElement('style_submit_button', 'submit', Translation :: get('Filter', null, Utilities::COMMON_LIBRARIES), array('class' => 'normal search'));\n $buttons[] = $this->createElement('style_reset_button', 'reset', Translation :: get('Reset', null, Utilities::COMMON_LIBRARIES), array('class' => 'normal empty'));\n\n $this->addGroup($buttons, 'buttons', null, '&nbsp;', false);\n }", "protected function createComponentProjectForm(): Form {\n $form = new Form; \n\n //Get all available project types for select field\n $types = $this->database->table('types');\n $types_arr = array();\n foreach($types as $type) {\n $types_arr[$type->id] = $type->title;\n }\n\n $form->addText('title', \"Project Title:\")\n ->setRequired()\n ->addRule($form::MAX_LENGTH, 'The Project title need to be less than %d character long', 60);\n\n $form->addSelect(\"type_id\", \"Project Type\", $types_arr)\n ->setRequired();\n\n $form->addText('start_date', \"Start Date\")\n ->setHtmlType('date')\n ->setRequired();\n\n $form->addText('end_date', \"End Date\")\n ->setHtmlType('date')\n ->setRequired();\n\n $form->addSubmit('send', \"Publish Project\");\n\n $form->onSuccess[] = [$this, 'projectFormSucceeded'];\n\n return $form;\n }", "function createForm(){\n\t\t$this->createFormBase();\n\t\t$this->addElement('reset','reset','Reset');\t\t\t\n\t\t$tab['seeker_0'] = '0';\n\t\t$this->setDefaults($tab);\n\t\t$this->addElement('submit','bouton_add_pi','Add a contact',array('onclick' => \"document.getElementById('frmvadataset').action += '#a_contact'\"));\n\t\t$this->createVaFormResolution();\n\t\t$this->createFormGeoCoverage();\n\t\t$this->createFormGrid();\t\n\t\t//Required format\n\t\t$dformat = new data_format;\n\t\t$dformat_select = $dformat->chargeFormDestFormat($this,'required_data_format','Required data format','NetCDF');\n\t\t$this->addElement($dformat_select);\n\t\t$this->getElement('organism_0')->setLabel(\"Organism short name\");\n\t\t$this->getElement('project_0')->setLabel(\"Useful in the framework of\");\n\t\t$this->getElement('dats_abstract')->setLabel(\"Abstract \");\n\t\t$this->getElement('dats_purpose')->setLabel(\"Purpose\");\n\t\t$this->getElement('database')->setLabel(\"Data center\");\n\t\t$this->getElement('new_db_url')->setLabel(\"Data center url\");\n\t\t$this->getElement('dats_use_constraints')->setLabel(\"Access and use constraints\");\t\t\t\n\t\t$this->getElement('sensor_resol_tmp')->setLabel('Temporal (hh:mm:ss)');\t\t\t\n\t\t$this->getElement('place_alt_min_0')->setLabel(\"Altitude min\");\n\t\t$this->getElement('place_alt_max_0')->setLabel(\"Altitude max\");\n\t\t$this->getElement('data_format_0')->setLabel(\"Original data format\");\n\t\t$this->addElement('file','upload_doc','Attached document');\n\t\t$this->addElement('submit','upload','Upload');\n\t\t$this->addElement('submit','delete','Delete');\n\t\t\n\t\tfor ($i = 0; $i < $this->dataset->nbVars; $i++){\n\t\t\t$this->getElement('methode_acq_'.$i)->setLabel(\"Parameter processing related information\");\n\t\t}\n\t\t$this->addElement('submit','bouton_add_variable','Add a parameter',array('onclick' => \"document.getElementById('frmvadataset').action += '#a_param'\"));\n\t\t\n\t\t$this->addElement('submit','bouton_add_projet','Add a project',array('onclick' => \"document.getElementById('frmvadataset').action += '#a_general'\"));\n\t\t$option = array();\n\t\t$option['default'] = \"\";\n\t\t$option['model'] = \"Model\";\n\t\t$option['instrument'] = \"Instrument\";\n\t\t$option['satellite'] = \"Satellite\";\n\t\t$this->addElement('select','source_type','source type :',$option,array('onchange' => \"DeactivateButtonAddSource()\",'onclick' => \"DeactivateButtonAddSource();\",'onmouseover' => 'DeactivateButtonAddSource();' ));\n\t\t$this->addElement('submit','bouton_add_source','Add a source',array('disabled' => 'true','onclick' => \"document.getElementById('frmvadataset').action += '#a_source'\",'onmouseout' => 'DeactivateButtonAddSource();'));\n\t\t\n\t\tif (isset ( $this->dataset->dats_sensors ) && ! empty ( $this->dataset->dats_sensors )) {\n\t\t\t$this->dats_sensors = array();\n\t\t\t$this->dats_sensors = $this->dataset->dats_sensors ;\n\t\t}\n\t\tif (isset ( $this->dataset->sites ) && ! empty ( $this->dataset->sites )) {\n\t\t\t$this->sites = array();\n\t\t\t$this->sites = $this->dataset->sites;\n\t\t}\n\t\t\n\t\tif ( isset ( $this->dataset->dats_id ) && $this->dataset->dats_id > 0) {\n\t\t\tif (isset ( $this->dataset->nbModFormSensor )){\n\t\t\t\tif($this->dataset->nbModForm <= $this->dataset->nbModFormSensor ){\n\t\t\t\t\t$this->dataset->nbModForm = $this->dataset->nbModFormSensor;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isset ( $this->dataset->nbSatFormSensor )){\n\t\t\t\t//$this->dataset->nbSatFormSensor = $this->dataset->nbSatFormSensor - 1;\n\t\t\t\tif($this->dataset->nbSatForm <= $this->dataset->nbSatFormSensor){\n\t\t\t\t\t$this->dataset->nbSatForm = $this->dataset->nbSatFormSensor;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isset ( $this->dataset->nbInstruFormSensor )){\n\t\t\t\tif($this->dataset->nbInstruForm <= $this->dataset->nbInstruFormSensor){\n\t\t\t\t\t$this->dataset->nbInstruForm = $this->dataset->nbInstruFormSensor;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif($this->dataset->nbModForm > 0)\n\t\t\t$this->addMod();\n\t\tif($this->dataset->nbInstruForm > 0)\n\t\t\t$this->addInstru();\t\n\t\tif($this->dataset->nbSatForm > 0)\n\t\t\t$this->addSat();\n\t\t\n\t\t$this->dataset->dats_sensors = null ;\n\t\t$this->dataset->sites = null;\n\t}", "protected function getForm() {\n\t\tglobal $wgScript;\n\n\t\t$this->opts['title'] = $this->getPageTitle()->getPrefixedText();\n\t\tif ( !isset( $this->opts['target'] ) ) {\n\t\t\t$this->opts['target'] = '';\n\t\t} else {\n\t\t\t$this->opts['target'] = str_replace( '_', ' ', $this->opts['target'] );\n\t\t}\n\n\t\tif ( !isset( $this->opts['namespace'] ) ) {\n\t\t\t$this->opts['namespace'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['nsInvert'] ) ) {\n\t\t\t$this->opts['nsInvert'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['associated'] ) ) {\n\t\t\t$this->opts['associated'] = false;\n\t\t}\n\n\t\tif ( !isset( $this->opts['contribs'] ) ) {\n\t\t\t$this->opts['contribs'] = 'user';\n\t\t}\n\n\t\tif ( !isset( $this->opts['year'] ) ) {\n\t\t\t$this->opts['year'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['month'] ) ) {\n\t\t\t$this->opts['month'] = '';\n\t\t}\n\n\t\tif ( $this->opts['contribs'] == 'newbie' ) {\n\t\t\t$this->opts['target'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['tagfilter'] ) ) {\n\t\t\t$this->opts['tagfilter'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['topOnly'] ) ) {\n\t\t\t$this->opts['topOnly'] = false;\n\t\t}\n\n\t\tif ( !isset( $this->opts['newOnly'] ) ) {\n\t\t\t$this->opts['newOnly'] = false;\n\t\t}\n\n\t\t$form = Html::openElement(\n\t\t\t'form',\n\t\t\tarray(\n\t\t\t\t'method' => 'get',\n\t\t\t\t'action' => $wgScript,\n\t\t\t\t'class' => 'mw-contributions-form'\n\t\t\t)\n\t\t);\n\n\t\t# Add hidden params for tracking except for parameters in $skipParameters\n\t\t$skipParameters = array(\n\t\t\t'namespace',\n\t\t\t'nsInvert',\n\t\t\t'deletedOnly',\n\t\t\t'target',\n\t\t\t'contribs',\n\t\t\t'year',\n\t\t\t'month',\n\t\t\t'topOnly',\n\t\t\t'newOnly',\n\t\t\t'associated'\n\t\t);\n\n\t\tforeach ( $this->opts as $name => $value ) {\n\t\t\tif ( in_array( $name, $skipParameters ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$form .= \"\\t\" . Html::hidden( $name, $value ) . \"\\n\";\n\t\t}\n\n\t\t$tagFilter = ChangeTags::buildTagFilterSelector( $this->opts['tagfilter'] );\n\n\t\tif ( $tagFilter ) {\n\t\t\t$filterSelection = Html::rawElement(\n\t\t\t\t'td',\n\t\t\t\tarray( 'class' => 'mw-label' ),\n\t\t\t\tarray_shift( $tagFilter )\n\t\t\t);\n\t\t\t$filterSelection .= Html::rawElement(\n\t\t\t\t'td',\n\t\t\t\tarray( 'class' => 'mw-input' ),\n\t\t\t\timplode( '&#160', $tagFilter )\n\t\t\t);\n\t\t} else {\n\t\t\t$filterSelection = Html::rawElement( 'td', array( 'colspan' => 2 ), '' );\n\t\t}\n\n\t\t$labelNewbies = Xml::radioLabel(\n\t\t\t$this->msg( 'sp-contributions-newbies' )->text(),\n\t\t\t'contribs',\n\t\t\t'newbie',\n\t\t\t'newbie',\n\t\t\t$this->opts['contribs'] == 'newbie',\n\t\t\tarray( 'class' => 'mw-input' )\n\t\t);\n\t\t$labelUsername = Xml::radioLabel(\n\t\t\t$this->msg( 'sp-contributions-username' )->text(),\n\t\t\t'contribs',\n\t\t\t'user',\n\t\t\t'user',\n\t\t\t$this->opts['contribs'] == 'user',\n\t\t\tarray( 'class' => 'mw-input' )\n\t\t);\n\t\t$input = Html::input(\n\t\t\t'target',\n\t\t\t$this->opts['target'],\n\t\t\t'text',\n\t\t\tarray( 'size' => '40', 'required' => '', 'class' => 'mw-input' ) +\n\t\t\t\t( $this->opts['target'] ? array() : array( 'autofocus' )\n\t\t\t\t)\n\t\t);\n\t\t$targetSelection = Html::rawElement(\n\t\t\t'td',\n\t\t\tarray( 'colspan' => 2 ),\n\t\t\t$labelNewbies . '<br />' . $labelUsername . ' ' . $input . ' '\n\t\t);\n\n\t\t$namespaceSelection = Xml::tags(\n\t\t\t'td',\n\t\t\tarray( 'class' => 'mw-label' ),\n\t\t\tXml::label(\n\t\t\t\t$this->msg( 'namespace' )->text(),\n\t\t\t\t'namespace',\n\t\t\t\t''\n\t\t\t)\n\t\t);\n\t\t$namespaceSelection .= Html::rawElement(\n\t\t\t'td',\n\t\t\tnull,\n\t\t\tHtml::namespaceSelector(\n\t\t\t\tarray( 'selected' => $this->opts['namespace'], 'all' => '' ),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => 'namespace',\n\t\t\t\t\t'id' => 'namespace',\n\t\t\t\t\t'class' => 'namespaceselector',\n\t\t\t\t)\n\t\t\t) . '&#160;' .\n\t\t\t\tHtml::rawElement(\n\t\t\t\t\t'span',\n\t\t\t\t\tarray( 'style' => 'white-space: nowrap' ),\n\t\t\t\t\tXml::checkLabel(\n\t\t\t\t\t\t$this->msg( 'invert' )->text(),\n\t\t\t\t\t\t'nsInvert',\n\t\t\t\t\t\t'nsInvert',\n\t\t\t\t\t\t$this->opts['nsInvert'],\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'title' => $this->msg( 'tooltip-invert' )->text(),\n\t\t\t\t\t\t\t'class' => 'mw-input'\n\t\t\t\t\t\t)\n\t\t\t\t\t) . '&#160;'\n\t\t\t\t) .\n\t\t\t\tHtml::rawElement( 'span', array( 'style' => 'white-space: nowrap' ),\n\t\t\t\t\tXml::checkLabel(\n\t\t\t\t\t\t$this->msg( 'namespace_association' )->text(),\n\t\t\t\t\t\t'associated',\n\t\t\t\t\t\t'associated',\n\t\t\t\t\t\t$this->opts['associated'],\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'title' => $this->msg( 'tooltip-namespace_association' )->text(),\n\t\t\t\t\t\t\t'class' => 'mw-input'\n\t\t\t\t\t\t)\n\t\t\t\t\t) . '&#160;'\n\t\t\t\t)\n\t\t);\n\n\t\tif ( $this->getUser()->isAllowed( 'deletedhistory' ) ) {\n\t\t\t$deletedOnlyCheck = Html::rawElement(\n\t\t\t\t'span',\n\t\t\t\tarray( 'style' => 'white-space: nowrap' ),\n\t\t\t\tXml::checkLabel(\n\t\t\t\t\t$this->msg( 'history-show-deleted' )->text(),\n\t\t\t\t\t'deletedOnly',\n\t\t\t\t\t'mw-show-deleted-only',\n\t\t\t\t\t$this->opts['deletedOnly'],\n\t\t\t\t\tarray( 'class' => 'mw-input' )\n\t\t\t\t)\n\t\t\t);\n\t\t} else {\n\t\t\t$deletedOnlyCheck = '';\n\t\t}\n\n\t\t$checkLabelTopOnly = Html::rawElement(\n\t\t\t'span',\n\t\t\tarray( 'style' => 'white-space: nowrap' ),\n\t\t\tXml::checkLabel(\n\t\t\t\t$this->msg( 'sp-contributions-toponly' )->text(),\n\t\t\t\t'topOnly',\n\t\t\t\t'mw-show-top-only',\n\t\t\t\t$this->opts['topOnly'],\n\t\t\t\tarray( 'class' => 'mw-input' )\n\t\t\t)\n\t\t);\n\t\t$checkLabelNewOnly = Html::rawElement(\n\t\t\t'span',\n\t\t\tarray( 'style' => 'white-space: nowrap' ),\n\t\t\tXml::checkLabel(\n\t\t\t\t$this->msg( 'sp-contributions-newonly' )->text(),\n\t\t\t\t'newOnly',\n\t\t\t\t'mw-show-new-only',\n\t\t\t\t$this->opts['newOnly'],\n\t\t\t\tarray( 'class' => 'mw-input' )\n\t\t\t)\n\t\t);\n\t\t$extraOptions = Html::rawElement(\n\t\t\t'td',\n\t\t\tarray( 'colspan' => 2 ),\n\t\t\t$deletedOnlyCheck . $checkLabelTopOnly . $checkLabelNewOnly\n\t\t);\n\n\t\t$dateSelectionAndSubmit = Xml::tags( 'td', array( 'colspan' => 2 ),\n\t\t\tXml::dateMenu(\n\t\t\t\t$this->opts['year'] === '' ? MWTimestamp::getInstance()->format( 'Y' ) : $this->opts['year'],\n\t\t\t\t$this->opts['month']\n\t\t\t) . ' ' .\n\t\t\t\tXml::submitButton(\n\t\t\t\t\t$this->msg( 'sp-contributions-submit' )->text(),\n\t\t\t\t\tarray( 'class' => 'mw-submit' )\n\t\t\t\t)\n\t\t);\n\n\t\t$form .= Xml::fieldset( $this->msg( 'sp-contributions-search' )->text() );\n\t\t$form .= Html::rawElement( 'table', array( 'class' => 'mw-contributions-table' ), \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $targetSelection ) . \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $namespaceSelection ) . \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $filterSelection ) . \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $extraOptions ) . \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $dateSelectionAndSubmit ) . \"\\n\"\n\t\t);\n\n\t\t$explain = $this->msg( 'sp-contributions-explain' );\n\t\tif ( !$explain->isBlank() ) {\n\t\t\t$form .= \"<p id='mw-sp-contributions-explain'>{$explain->parse()}</p>\";\n\t\t}\n\n\t\t$form .= Xml::closeElement( 'fieldset' ) . Xml::closeElement( 'form' );\n\n\t\treturn $form;\n\t}", "public function ajax_example_progressbar_callback($form, &$form_state) {\n $variable_name = 'example_progressbar_' . $form_state['time'];\n $commands = array();\n\n variable_set($variable_name, 10);\n sleep(2);\n variable_set($variable_name, 40);\n sleep(2);\n variable_set($variable_name, 70);\n sleep(2);\n variable_set($variable_name, 90);\n sleep(2);\n variable_del($variable_name);\n\n $commands[] = HtmlCommand('#progress-status', $this->t('Executed.'));\n\n return array(\n '#type' => 'ajax',\n '#commands' => $commands,\n );\n}", "protected function form()\n {\n $form = new Form(new DbTop());\n $form->select('status', __(trans('hhx.status')))->options(config('hhx.db_status'));;\n $form->text('pan_url', __(trans('hhx.pan_url')));\n $form->text('pan_code', __(trans('hhx.pan_code')));\n\n return $form;\n }", "function initControlStructureForm()\n\t{\n\t\tinclude_once (\"Services/Form/classes/class.ilPropertyFormGUI.php\");\n $form = new ilPropertyFormGUI();\n\n\t\t$form->setId(\"control_structure\");\n\t\t$form->setTitle($this->lng->txt(\"ctrl_structure\"));\n\t\t$form->setFormAction(\"setup.php?cmd=gateway\");\n\n\t\t$ilDB = $this->setup->getClient()->db;\n\t\t$cset = $ilDB->query(\"SELECT count(*) as cnt FROM ctrl_calls\");\n\t\t$crec = $ilDB->fetchAssoc($cset);\n\n\t\t$item = new ilCustomInputGUI($this->lng->txt(\"ctrl_structure_reload\"));\n\t\tif ($crec[\"cnt\"] == 0)\n\t\t{\n\t\t\t$item->setInfo($this->lng->txt(\"ctrl_missing_desc\"));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$item->setInfo($this->lng->txt(\"ctrl_structure_desc\"));\n\t\t}\n\t\t$form->addItem($item);\n\n\t\t$form->addCommandButton(\"reloadStructure\", $this->lng->txt(\"reload\"));\n\t\treturn $form;\n\t}", "protected function form()\n {\n $form = new Form(new PrizesLog);\n\n // 去掉`删除`按钮\n $form->tools(function (Form\\Tools $tools) {\n $tools->disableDelete();\n $tools->disableView();\n });\n\n $form->text('group.title', '奖品组')->readonly();\n $form->text('prize.name', '奖品名称')->readonly();\n $form->text('material.title', '物料名称')->readonly();\n $form->text('material_code', '物料代码')->readonly();\n $form->text('user.username', '用户名')->readonly();\n $form->text('user.mobile', '用户手机号')->readonly();\n $form->select('source', '来源')->options([\n '' => '', 'exchange' => '兑换/领取', 'lottery' => '抽奖'\n ])->readonly();\n $form->ip('ip', 'IP地址')->readonly();\n $form->datetime('created_at', '中奖时间')->readonly();\n $form->embeds('leaving_capital', '留资信息', function ($form) {\n $form->text('name', '收件人');\n $form->mobile('mobile', '手机号');\n $form->text('address', '收件地址');\n });\n $form->radio('status', '状态')->options([\n '0' => '作废', '1' => '有效'\n ])->default('1');\n return $form;\n }", "public function buildForm()\n {\n $this\n ->addNarrative('location_description_narrative')\n ->addAddMoreButton('add', 'location_description_narrative');\n }", "public function initBasicSettingsForm($a_install = false)\n\t{\n\t\tglobal $lng, $ilCtrl;\n\n\t\tinclude_once(\"Services/Form/classes/class.ilPropertyFormGUI.php\");\n\t\t$this->form = new ilPropertyFormGUI();\n\n\t\t// webspace dir\t\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"data_directory_in_ws\"), \"webspace_dir\");\n\t\tif ($a_install)\n\t\t{\n\t\t\t$ne->setInfo($this->lng->txt(\"data_directory_in_ws_info\"));\n\t\t}\n\t\t$cwd = ilUtil::isWindows()\n\t\t\t? str_replace(\"\\\\\", \"/\", getcwd())\n\t\t\t: getcwd();\n\n\t\t$ne->setValue($cwd.\"/data\");\n\t\t$this->form->addItem($ne);\n\n\t\t// data dir\n\t\tif ($a_install)\n\t\t{\n\t\t\t$ti = new ilTextInputGUI($lng->txt(\"data_directory_outside_ws\"), \"datadir_path\");\n\t\t\t$ti->setInfo($lng->txt(\"data_directory_info\"));\n\t\t\t$ti->setRequired(true);\n\t\t\t$this->form->addItem($ti);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"data_directory_outside_ws\"), \"data_dir\");\n\t\t\t$this->form->addItem($ne);\n\t\t}\n\n\t\t$lvext = (ilUtil::isWindows())\n\t\t\t? \"_win\"\n\t\t\t: \"\";\n\n\n\t\t// logging\n\t\t$sh = new ilFormSectionHeaderGUI();\n\t\t$sh->setTitle($lng->txt(\"logging\"));\n\t\t$this->form->addItem($sh);\n\n\t\t// path to log file\n\t\t$ti = new ilTextInputGUI($lng->txt(\"log_path\"), \"log_path\");\n\t\t$ti->setInfo($lng->txt(\"log_path_comment\".$lvext));\n\t\t$this->form->addItem($ti);\n\n\t\t// disable logging \n\t\t$cb = new ilCheckboxInputGUI($lng->txt(\"disable_logging\"), \"chk_log_status\");\n\t\t$this->form->addItem($cb);\n\n\t\t// server settings\n\t\t$sh = new ilFormSectionHeaderGUI();\n\t\t$sh->setTitle($lng->txt(\"server_settings\"));\n\t\t$this->form->addItem($sh);\n\n\t\t// time zone\n\t\tinclude_once(\"./Services/Calendar/classes/class.ilCalendarUtil.php\");\n\t\t$si = new ilSelectInputGUI($lng->txt(\"time_zone\"), \"time_zone\");\n\t\t$si->setOptions(array_merge(\n\t\t\tarray(\"\" => \"-- \".$lng->txt(\"please_select\").\" --\"),\n\t\t\tilCalendarUtil::_getShortTimeZoneList()));\n\t\t$si->setRequired(true);\n\t\t$this->form->addItem($si);\n\n\t\t// https settings\n\t\t$sh = new ilFormSectionHeaderGUI();\n\t\t$sh->setTitle($lng->txt(\"https_settings\"));\n\t\t$this->form->addItem($sh);\n\n\t\t$check = new ilCheckboxInputGUI($lng->txt('ps_auto_https'),'auto_https_detect_enabled');\n\t\t$check->setOptionTitle($lng->txt('ps_auto_https_description'));\n\t\t$check->setValue(1);\n\n\t\t$text = new ilTextInputGUI($lng->txt('ps_auto_https_header_name'),'auto_https_detect_header_name');\n\t\t$text->setSize(24);\n\t\t$text->setMaxLength(64);\n\t\t$text->setRequired(true);\n\t\t$check->addSubItem($text);\n\n\t\t$text = new ilTextInputGUI($lng->txt('ps_auto_https_header_value'),'auto_https_detect_header_value');\n\t\t$text->setSize(24);\n\t\t$text->setMaxLength(64);\n\t\t$text->setRequired(true);\n\t\t$check->addSubItem($text);\n\n\t\t$this->form->addItem($check);\n\n\t\t// required 3rd party tools\n\t\t$sh = new ilFormSectionHeaderGUI();\n\t\t$sh->setTitle($lng->txt(\"3rd_party_software_req\"));\n\t\t$this->form->addItem($sh);\n\n\t\t// convert path\n\t\t$ti = new ilTextInputGUI($lng->txt(\"convert_path\"), \"convert_path\");\n\t\t$ti->setInfo($lng->txt(\"convert_path_comment\".$lvext));\n\t\t$ti->setRequired(true);\n\t\t$this->form->addItem($ti);\n\n\t\t// zip path\n\t\t$ti = new ilTextInputGUI($lng->txt(\"zip_path\"), \"zip_path\");\n\t\t$ti->setInfo($lng->txt(\"zip_path_comment\".$lvext));\n\t\t$ti->setRequired(true);\n\t\t$this->form->addItem($ti);\n\n\t\t// unzip path\n\t\t$ti = new ilTextInputGUI($lng->txt(\"unzip_path\"), \"unzip_path\");\n\t\t$ti->setInfo($lng->txt(\"unzip_path_comment\".$lvext));\n\t\t$ti->setRequired(true);\n\t\t$this->form->addItem($ti);\n\n\t\t// optional 3rd party tools\n\t\t$sh = new ilFormSectionHeaderGUI();\n\t\t$sh->setTitle($lng->txt(\"3rd_party_software_opt\"));\n\t\t$this->form->addItem($sh);\n\n\t\t// ghostscript path\n\t\t$ti = new ilTextInputGUI($lng->txt(\"ghostscript_path\"), \"ghostscript_path\");\n\t\t$ti->setInfo($lng->txt(\"ghostscript_path_comment\".$lvext));\n\t\t$this->form->addItem($ti);\n\n\t\t// java path\n\t\t$ti = new ilTextInputGUI($lng->txt(\"java_path\"), \"java_path\");\n\t\t$ti->setInfo($lng->txt(\"java_path_comment\".$lvext));\n\t\t$this->form->addItem($ti);\n\n\t\t// htmldoc path\n\t\t$ti = new ilTextInputGUI($lng->txt(\"htmldoc_path\"), \"htmldoc_path\");\n\t\t$ti->setInfo($lng->txt(\"htmldoc_path_comment\".$lvext));\n\t\t$this->form->addItem($ti);\n\n\t\t// ffmpeg path\n\t\t$ti = new ilTextInputGUI($lng->txt(\"ffmpeg_path\"), \"ffmpeg_path\");\n\t\t$ti->setInfo($lng->txt(\"ffmpeg_path_comment\"));\n\t\t$this->form->addItem($ti);\n\n\t\t// latex\n\t\t$ti = new ilTextInputGUI($lng->txt(\"url_to_latex\"), \"latex_url\");\n\t\t$ti->setInfo($lng->txt(\"latex_url_comment\"));\n\t\t$this->form->addItem($ti);\n\n\t\t// virus scanner\n\t\t$options = array(\n\t\t\t\"none\" => $lng->txt(\"none\"),\n\t\t\t\"sophos\" => $lng->txt(\"sophos\"),\n\t\t\t\"antivir\" => $lng->txt(\"antivir\"),\n\t\t\t\"clamav\" => $lng->txt(\"clamav\")\n\t\t\t);\n\t\t$si = new ilSelectInputGUI($lng->txt(\"virus_scanner\"), \"vscanner_type\");\n\t\t$si->setOptions($options);\n\t\t$this->form->addItem($si);\n\n\t\t// scan command\n\t\t$ti = new ilTextInputGUI($lng->txt(\"scan_command\"), \"scan_command\");\n\t\t$this->form->addItem($ti);\n\n\t\t// clean command\n\t\t$ti = new ilTextInputGUI($lng->txt(\"clean_command\"), \"clean_command\");\n\t\t$this->form->addItem($ti);\n\n\t\tif ($a_install)\n\t\t{\n\t\t\t$sh = new ilFormSectionHeaderGUI();\n\t\t\t$sh->setTitle($lng->txt(\"master_password\"));\n\t\t\t$this->form->addItem($sh);\n\n\t\t\t// password\n\t\t\t$pi = new ilPasswordInputGUI($lng->txt(\"password\"), \"password\");\n\t\t\t$pi->setRequired(true);\n\t\t\t$pi->setSkipSyntaxCheck(true);\n\t\t\t$pi->setInfo($lng->txt(\"password_info\"));\n\t\t\t$this->form->addItem($pi);\n\t\t}\n\n\t\tif ($a_install)\n\t\t{\n\t\t\t$this->form->addCommandButton(\"saveBasicSettings\", $lng->txt(\"save\"));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->form->addCommandButton(\"updateBasicSettings\", $lng->txt(\"save\"));\n\t\t\t$this->form->addCommandButton(\"determineToolsPath\", $lng->txt(\"determine_tools_paths\"));\n\t\t}\n\n\t\t$this->form->setTitle($lng->txt(\"data_directories\"));\n\t\t$this->form->setFormAction(\"setup.php?cmd=gateway\");\n\n\t\tif ($a_install)\n\t\t{\n\t\t\t$det = $this->determineTools();\n\t\t\t$this->form->setValuesByArray($det);\n\t\t}\n\n\t}", "public function initGeneralSettingsForm()\n\t{\n\t\tglobal $lng, $ilUser, $styleDefinition, $ilSetting;\n\t\t\n\t\t\n\t\tinclude_once(\"Services/Form/classes/class.ilPropertyFormGUI.php\");\n\t\t$this->form = new ilPropertyFormGUI();\n\n\t\t// language\n\t\tif ($this->userSettingVisible(\"language\"))\n\t\t{\n\t\t\t$languages = $this->lng->getInstalledLanguages();\n\t\t\t$options = array();\n\t\t\tforeach($languages as $lang_key)\n\t\t\t{\n\t\t\t\t$options[$lang_key] = ilLanguage::_lookupEntry($lang_key,\"meta\", \"meta_l_\".$lang_key);\n\t\t\t}\n\t\t\t\n\t\t\t$si = new ilSelectInputGUI($this->lng->txt(\"language\"), \"language\");\n\t\t\t$si->setOptions($options);\n\t\t\t$si->setValue($ilUser->getLanguage());\n\t\t\t$si->setDisabled($ilSetting->get(\"usr_settings_disable_language\"));\n\t\t\t$this->form->addItem($si);\n\t\t}\n\n\t\t// skin/style\n\t\tinclude_once(\"./Services/Style/classes/class.ilObjStyleSettings.php\");\n\t\tif ($this->userSettingVisible(\"skin_style\"))\n\t\t{\n\t\t\t$templates = $styleDefinition->getAllTemplates();\n\t\t\tif (is_array($templates))\n\t\t\t{ \n\t\t\t\t$si = new ilSelectInputGUI($this->lng->txt(\"skin_style\"), \"skin_style\");\n\t\t\t\t\n\t\t\t\t$options = array();\n\t\t\t\tforeach($templates as $template)\n\t\t\t\t{\n\t\t\t\t\t// get styles information of template\n\t\t\t\t\t$styleDef = new ilStyleDefinition($template[\"id\"]);\n\t\t\t\t\t$styleDef->startParsing();\n\t\t\t\t\t$styles = $styleDef->getStyles();\n\n\t\t\t\t\tforeach($styles as $style)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (!ilObjStyleSettings::_lookupActivatedStyle($template[\"id\"],$style[\"id\"]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$options[$template[\"id\"].\":\".$style[\"id\"]] =\n\t\t\t\t\t\t\t$styleDef->getTemplateName().\" / \".$style[\"name\"];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$si->setOptions($options);\n\t\t\t\t$si->setValue($ilUser->skin.\":\".$ilUser->prefs[\"style\"]);\n\t\t\t\t$si->setDisabled($ilSetting->get(\"usr_settings_disable_skin_style\"));\n\t\t\t\t$this->form->addItem($si);\n\t\t\t}\n\t\t}\n\n\t\t// screen reader optimization\n\t\tif ($this->userSettingVisible(\"screen_reader_optimization\"))\n\t\t{ \n\t\t\t$cb = new ilCheckboxInputGUI($this->lng->txt(\"user_screen_reader_optimization\"), \"screen_reader_optimization\");\n\t\t\t$cb->setChecked($ilUser->prefs[\"screen_reader_optimization\"]);\n\t\t\t$cb->setDisabled($ilSetting->get(\"usr_settings_disable_screen_reader_optimization\"));\n\t\t\t$cb->setInfo($this->lng->txt(\"user_screen_reader_optimization_info\"));\n\t\t\t$this->form->addItem($cb);\n\t\t}\n\n\t\t// hits per page\n\t\tif ($this->userSettingVisible(\"hits_per_page\"))\n\t\t{\n\t\t\t$si = new ilSelectInputGUI($this->lng->txt(\"hits_per_page\"), \"hits_per_page\");\n\t\t\t\n\t\t\t$hits_options = array(10,15,20,30,40,50,100,9999);\n\t\t\t$options = array();\n\n\t\t\tforeach($hits_options as $hits_option)\n\t\t\t{\n\t\t\t\t$hstr = ($hits_option == 9999)\n\t\t\t\t\t? $this->lng->txt(\"no_limit\")\n\t\t\t\t\t: $hits_option;\n\t\t\t\t$options[$hits_option] = $hstr;\n\t\t\t}\n\t\t\t$si->setOptions($options);\n\t\t\t$si->setValue($ilUser->prefs[\"hits_per_page\"]);\n\t\t\t$si->setDisabled($ilSetting->get(\"usr_settings_disable_hits_per_page\"));\n\t\t\t$this->form->addItem($si);\n\t\t}\n\n\t\t// Users Online\n\t\tif ($this->userSettingVisible(\"show_users_online\"))\n\t\t{\n\t\t\t$si = new ilSelectInputGUI($this->lng->txt(\"show_users_online\"), \"show_users_online\");\n\t\t\t\n\t\t\t$options = array(\n\t\t\t\t\"y\" => $this->lng->txt(\"users_online_show_y\"),\n\t\t\t\t\"associated\" => $this->lng->txt(\"users_online_show_associated\"),\n\t\t\t\t\"n\" => $this->lng->txt(\"users_online_show_n\"));\n\t\t\t$si->setOptions($options);\n\t\t\t$si->setValue($ilUser->prefs[\"show_users_online\"]);\n\t\t\t$si->setDisabled($ilSetting->get(\"usr_settings_disable_show_users_online\"));\n\t\t\t$this->form->addItem($si);\n\t\t}\n\n\t\t// Store last visited\n\t\t$lv = new ilSelectInputGUI($this->lng->txt(\"user_store_last_visited\"), \"store_last_visited\");\n\t\t$options = array(\n\t\t\t0 => $this->lng->txt(\"user_lv_keep_entries\"),\n\t\t\t1 => $this->lng->txt(\"user_lv_keep_only_for_session\"),\n\t\t\t2 => $this->lng->txt(\"user_lv_do_not_store\"));\n\t\t$lv->setOptions($options);\n\t\t$lv->setValue((int) $ilUser->prefs[\"store_last_visited\"]);\n\t\t$this->form->addItem($lv);\n\n\t\t// hide_own_online_status\n\t\tif ($this->userSettingVisible(\"hide_own_online_status\"))\n\t\t{ \n\t\t\t$cb = new ilCheckboxInputGUI($this->lng->txt(\"hide_own_online_status\"), \"hide_own_online_status\");\n\t\t\t$cb->setChecked($ilUser->prefs[\"hide_own_online_status\"] == \"y\");\n\t\t\t$cb->setDisabled($ilSetting->get(\"usr_settings_disable_hide_own_online_status\"));\n\t\t\t$this->form->addItem($cb);\n\t\t}\n\t\t\n\t\tinclude_once 'Services/Authentication/classes/class.ilSessionReminder.php';\n\t\tif(ilSessionReminder::isGloballyActivated())\n\t\t{\n\t\t\t$cb = new ilCheckboxInputGUI($this->lng->txt('session_reminder'), 'session_reminder_enabled');\n\t\t\t$cb->setInfo($this->lng->txt('session_reminder_info'));\n\t\t\t$cb->setValue(1);\n\t\t\t$cb->setChecked((int)$ilUser->getPref('session_reminder_enabled'));\n\n\t\t\t$expires = ilSession::getSessionExpireValue();\n\t\t\t$lead_time_gui = new ilNumberInputGUI($this->lng->txt('session_reminder_lead_time'), 'session_reminder_lead_time');\n\t\t\t$lead_time_gui->setInfo(sprintf($this->lng->txt('session_reminder_lead_time_info'), ilFormat::_secondsToString($expires, true)));\n\n\t\t\t$min_value = ilSessionReminder::MIN_LEAD_TIME;\n\t\t\t$max_value = max($min_value, ((int)$expires / 60) - 1);\n\n\t\t\t$current_user_value = $ilUser->getPref('session_reminder_lead_time');\n\t\t\tif($current_user_value < $min_value ||\n\t\t\t $current_user_value > $max_value)\n\t\t\t{\n\t\t\t\t$current_user_value = ilSessionReminder::SUGGESTED_LEAD_TIME;\n\t\t\t}\n\t\t\t$value = min(\n\t\t\t\tmax(\n\t\t\t\t\t$min_value, $current_user_value\n\t\t\t\t),\n\t\t\t\t$max_value\n\t\t\t);\n\n\t\t\t$lead_time_gui->setValue($value);\n\t\t\t$lead_time_gui->setSize(3);\n\t\t\t$lead_time_gui->setMinValue($min_value);\n\t\t\t$lead_time_gui->setMaxValue($max_value);\n\t\t\t$cb->addSubItem($lead_time_gui);\n\n\t\t\t$this->form->addItem($cb);\n\t\t}\n\n\t\t// calendar settings (copied here to be reachable when calendar is inactive)\n\t\t// they cannot be hidden/deactivated\n\n\t\tinclude_once('Services/Calendar/classes/class.ilCalendarUserSettings.php');\n\t\tinclude_once('Services/Calendar/classes/class.ilCalendarUtil.php');\n\t\t$lng->loadLanguageModule(\"dateplaner\");\n\t\t$user_settings = ilCalendarUserSettings::_getInstanceByUserId($ilUser->getId());\n\n\t\t$select = new ilSelectInputGUI($lng->txt('cal_user_timezone'),'timezone');\n\t\t$select->setOptions(ilCalendarUtil::_getShortTimeZoneList());\n\t\t$select->setInfo($lng->txt('cal_timezone_info'));\n\t\t$select->setValue($user_settings->getTimeZone());\n\t\t$this->form->addItem($select);\n\n\t\t$year = date(\"Y\");\n\t\t$select = new ilSelectInputGUI($lng->txt('cal_user_date_format'),'date_format');\n\t\t$select->setOptions(array(\n\t\t\tilCalendarSettings::DATE_FORMAT_DMY => '31.10.'.$year,\n\t\t\tilCalendarSettings::DATE_FORMAT_YMD => $year.\"-10-31\",\n\t\t\tilCalendarSettings::DATE_FORMAT_MDY => \"10/31/\".$year));\n\t\t$select->setInfo($lng->txt('cal_date_format_info'));\n\t\t$select->setValue($user_settings->getDateFormat());\n\t\t$this->form->addItem($select);\n\n\t\t$select = new ilSelectInputGUI($lng->txt('cal_user_time_format'),'time_format');\n\t\t$select->setOptions(array(\n\t\t\tilCalendarSettings::TIME_FORMAT_24 => '13:00',\n\t\t\tilCalendarSettings::TIME_FORMAT_12 => '1:00pm'));\n\t\t$select->setInfo($lng->txt('cal_time_format_info'));\n\t $select->setValue($user_settings->getTimeFormat());\n\t\t$this->form->addItem($select);\n\t\t\n\t\t\n\t\t// starting point\t\n\t\tinclude_once \"Services/User/classes/class.ilUserUtil.php\";\n\t\tif(ilUserUtil::hasPersonalStartingPoint())\n\t\t{\n\t\t\t$this->lng->loadLanguageModule(\"administration\");\n\t\t\t$si = new ilRadioGroupInputGUI($this->lng->txt(\"adm_user_starting_point\"), \"usr_start\");\n\t\t\t$si->setRequired(true);\n\t\t\t$si->setInfo($this->lng->txt(\"adm_user_starting_point_info\"));\n\t\t\t$def_opt = new ilRadioOption($this->lng->txt(\"adm_user_starting_point_inherit\"), 0);\n\t\t\t$def_opt->setInfo($this->lng->txt(\"adm_user_starting_point_inherit_info\"));\n\t\t\t$si->addOption($def_opt);\n\t\t\tforeach(ilUserUtil::getPossibleStartingPoints() as $value => $caption)\n\t\t\t{\n\t\t\t\t$si->addOption(new ilRadioOption($caption, $value));\n\t\t\t}\n\t\t\t$si->setValue(ilUserUtil::hasPersonalStartPointPref()\n\t\t\t\t? ilUserUtil::getPersonalStartingPoint()\n\t\t\t\t: 0);\n\t\t\t$this->form->addItem($si);\n\t\t\t\t\t\t\n\t\t\t// starting point: repository object\n\t\t\t$repobj = new ilRadioOption($lng->txt(\"adm_user_starting_point_object\"), ilUserUtil::START_REPOSITORY_OBJ);\n\t\t\t$repobj_id = new ilTextInputGUI($lng->txt(\"adm_user_starting_point_ref_id\"), \"usr_start_ref_id\");\n\t\t\t$repobj_id->setRequired(true);\n\t\t\t$repobj_id->setSize(5);\n\t\t\tif($si->getValue() == ilUserUtil::START_REPOSITORY_OBJ)\n\t\t\t{\n\t\t\t\t$start_ref_id = ilUserUtil::getPersonalStartingObject();\n\t\t\t\t$repobj_id->setValue($start_ref_id);\n\t\t\t\tif($start_ref_id)\n\t\t\t\t{\n\t\t\t\t\t$start_obj_id = ilObject::_lookupObjId($start_ref_id);\n\t\t\t\t\tif($start_obj_id)\n\t\t\t\t\t{\n\t\t\t\t\t\t$repobj_id->setInfo($lng->txt(\"obj_\".ilObject::_lookupType($start_obj_id)).\n\t\t\t\t\t\t\t\": \".ilObject::_lookupTitle($start_obj_id));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\t\n\t\t\t$repobj->addSubItem($repobj_id);\n\t\t\t$si->addOption($repobj);\n\t\t}\t\t\n\t\t\n\t\t// selector for unicode characters\n\t\tglobal $ilSetting;\n\t\tif ($ilSetting->get('char_selector_availability') > 0)\n\t\t{\n\t\t\trequire_once 'Services/UIComponent/CharSelector/classes/class.ilCharSelectorGUI.php';\n\t\t\t$char_selector = new ilCharSelectorGUI(ilCharSelectorConfig::CONTEXT_USER);\n\t\t\t$char_selector->getConfig()->setAvailability($ilUser->getPref('char_selector_availability'));\n\t\t\t$char_selector->getConfig()->setDefinition($ilUser->getPref('char_selector_definition'));\n\t\t\t$char_selector->addFormProperties($this->form);\n\t\t\t$char_selector->setFormValues($this->form);\n\t\t}\n\t\t\n\t\t$this->form->addCommandButton(\"saveGeneralSettings\", $lng->txt(\"save\"));\n\t\t$this->form->setTitle($lng->txt(\"general_settings\"));\n\t\t$this->form->setFormAction($this->ctrl->getFormAction($this));\n\t \n\t}", "public function buildForm() {\n\t\t$form = '';\n\n\t\tforeach ($this->_properties as $row) {\n\t\t\tif (!in_array($row['Field'],$this->_ignore)) {\n\t\t\t\t$elem = $this->buildElement($row);\n\t\t\t\t$row['Comment'] != '' ? $comment = $row['Comment'].\"<br />\": $comment = '';\n\t\t\t\t$this->_properties[$row['Field']]['HTMLElement']=$elem;\n\t\t\t\tif ($row['ElementType']=='hidden')\n\t\t\t\t\t$form .= $elem;\n\t\t\t\telse \n\t\t\t\t\t$form .= sprintf(\"<div class='formElem'>\\n%s<br />\\n%s\\n%s</div>\\n\",ucwords (str_replace (\"_\",\" \",$row['Field'])),$comment,$elem);\n\t\t\t}\n\t\t}\n\t\treturn $form;\n\t}", "protected function form()\n {\n $form = new Form(new Carousel);\n\n $form->select('carousel_category_id', __('carousel::carousel.carousel_category_id'))\n ->options(CarouselCategory::all()->pluck('name', 'id'));\n $form->text('title', __('carousel::carousel.title'));\n $form->text('url', __('carousel::carousel.url'));\n $form->image('img_src', __('carousel::carousel.img_src'))\n ->removable()\n ->uniqueName()\n ->move('carousel');\n $form->text('alt', __('carousel::carousel.alt'));\n $form->textarea('remark', __('carousel::carousel.remark'));\n $form->select('status', __('carousel::carousel.status.label'))\n ->default(1)\n ->options(__('carousel::carousel.status.value'));\n $form->datetime('start_time', __('carousel::carousel.start_time'))\n ->default(date('Y-m-d H:i:s'));\n $form->datetime('end_time', __('carousel::carousel.end_time'))\n ->default(date('Y-m-d H:i:s'));\n\n return $form;\n }", "private function StartForm(){\r\n\t\t\t$this->formHTML .= \"<form method=\\\"{$this->method}\\\" action=\\\"{$this->action}\\\"\";\r\n\t\t\tif($this->enctype){\r\n\t\t\t\t$this->formHTML .= \" enctype=\\\"{$this->enctype}\\\"\";\r\n\t\t\t}\r\n\t\t\t$this->formHTML .= \" name=\\\"{$this->formName}\\\" class=\\\"c{$this->formName}\\\" id=\\\"i{$this->formName}\\\"\";\r\n\t\t\t$this->formHTML .= \">\";\r\n\t\t}", "protected function form()\n {\n $form = new Form(new Activity());\n\n $form->text('log_name', __('Log name'));\n $form->text('description', __('Description'));\n $form->number('subject_id', __('Subject id'));\n $form->text('subject_type', __('Subject type'));\n $form->number('causer_id', __('Causer id'));\n $form->text('causer_type', __('Causer type'));\n $form->textarea('properties', __('Properties'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Project());\n $form->text('name', '项目名称')->rules('required')->required();\n $form->url('url', '项目地址')->rules('required')->required();\n $form->text('username', '账号');\n $form->text('password', '密码');\n $status = [\n 'on' => ['value' => 1, 'text' => '启用', 'color' => 'success'],\n 'off' => ['value' => 2, 'text' => '禁用', 'color' => 'danger'],\n ];\n $form->switch('status', '状态')->states($status)->default(1);\n $form->tools(function (Form\\Tools $tools) {\n $tools->disableDelete();\n $tools->disableView();\n });\n $form->footer(function ($footer) {\n $footer->disableReset();\n $footer->disableViewCheck();\n $footer->disableEditingCheck();\n $footer->disableCreatingCheck();\n });\n\n return $form;\n }", "function buildForm()\n {\n $this->buildTabs();\n // tab caption\n $this->addElement('header', null, 'Specify file role for specific files');\n\n $fe =& PEAR_PackageFileManager_Frontend::singleton();\n $sess =& $fe->container();\n\n $selection = $this->getSubmitValue('files');\n $selection_count = count($selection);\n $fe->log('debug',\n str_pad($this->getAttribute('id') .'('. __LINE__ .')', 20, '.') .\n ' selection='. serialize($selection)\n );\n\n list($page, $action) = $this->controller->getActionName();\n\n // selection list (false) or edit dialog frame (true)\n if ($action == 'edit' && $selection_count > 0) {\n $editDialog = true;\n }elseif ($action == 'save') {\n $editDialog = true;\n } else {\n $editDialog = false;\n }\n\n if (!$editDialog) {\n\n foreach ($sess['defaults']['_files']['mapping'] as $fn) {\n $pinfo = pathinfo($fn);\n $ext[] = $pinfo['extension'];\n }\n $extensions = array_unique($ext);\n $extensions[] = '-None-';\n sort($extensions, SORT_ASC);\n $extensions = array_combine($extensions, $extensions);\n\n // Role options list: (value => text, with value === text)\n $pageName = $fe->getPageName('page1');\n $releaseType = $fe->exportValue($pageName, 'packageType');\n $roles = PEAR_Installer_Role::getValidRoles($releaseType);\n $roles[] = '-None-';\n sort($roles, SORT_ASC);\n $roles = array_combine($roles, $roles);\n\n $filters = array();\n $filters[] = &HTML_QuickForm::createElement('select', 'extensionFilter', 'Extension', $extensions);\n $filters[] = &HTML_QuickForm::createElement('select', 'roleFilter', 'Role', $roles);\n $filters[] = &HTML_QuickForm::createElement('submit', $this->getButtonName('sort'), 'Apply');\n $this->addGroup($filters, 'filters', 'Filters applied on list :', '', false);\n\n $hdr = array('Path', 'Role');\n $table = new HTML_Table(array('class' => 'tableone'));\n $htmltableDecorator = new PEAR_PackageFileManager_Frontend_Decorator_HTMLTable($fe);\n $htmltableDecorator->setHtmlTable($table);\n $htmltableDecorator->getExceptionList($hdr);\n // We need a simple static html area for maintainers list.\n $this->addElement('static', 'exceptions', '', $htmltableDecorator->toHtml());\n\n $def = array('extensionFilter' => '-None-', 'roleFilter' => '-None-');\n $this->setDefaults($def);\n\n $commands = array('edit', 'remove');\n $nocmd = array('commit', 'reset');\n\n } else {\n\n // we need a multiple-select box for list of file targets\n $rPath =& $this->addElement('select', 'exceptfiles');\n $rPath->setMultiple(true);\n $rPath->setLabel('Path:');\n $rPath->freeze();\n\n // Role options list: (value => text, with value === text)\n $pageName = $fe->getPageName('page1');\n $releaseType = $fe->exportValue($pageName, 'packageType');\n $roles = PEAR_Installer_Role::getValidRoles($releaseType);\n $roles[] = '';\n sort($roles, SORT_ASC);\n $roles = array_combine($roles, $roles);\n $this->addElement('select', 'role', 'Role:', $roles);\n\n if ($selection_count == 0) {\n $key1 = -1;\n $def = array();\n } else {\n $keys = $needle = array_keys($selection);\n $key1 = array_shift($needle);\n\n $files = array();\n foreach($keys as $k) {\n $files[$k] = $sess['files']['mapping'][$k];\n }\n $rPath->load($files, $keys);\n $def = array('exceptfiles' => $keys);\n }\n\n // applies new filters to the element values\n $this->applyFilter('__ALL__', 'trim');\n\n // old values of edit user\n $this->setDefaults($def);\n\n $commands = array('save', 'cancel');\n $nocmd = array('commit','reset');\n }\n\n // Buttons of the wizard to do the job\n $this->buildButtons($nocmd, $commands);\n }", "public function buildForm()\n {\n $this->add('organization_identifier_code', 'text', ['label' => trans('elementForm.organisation_identifier_code')])\n ->add('provider_activity_id', 'text', ['label' => trans('elementForm.provider_activity_id')])\n ->addSelect('type', $this->getCodeList('OrganisationType', 'Activity'), trans('elementForm.type'), $this->addHelpText('Activity_ParticipatingOrg-type'))\n ->addNarrative('provider_org_narrative')\n ->addAddMoreButton('add_provider_org_narrative', 'provider_org_narrative');\n }", "public function progressBar()\n {\n \n self::$view='adminlte::progress.bar';\n return $this;\n \n }", "protected function buildForm()\n {\n $this->formBuilder\n ->add('host', 'text', array(\n 'data' => ElasticProduct::getConfigValue('host'),\n 'required' => false,\n 'attr' => ['placeholder' => 'localhost'],\n 'label' => Translator::getInstance()->trans('Host', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'host'\n )\n ))\n ->add('port', 'text', array(\n 'data' => ElasticProduct::getConfigValue('port'),\n 'required' => false,\n 'attr' => ['placeholder' => '9200'],\n 'label' => Translator::getInstance()->trans('Port', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'port'\n )\n ))\n ->add('username', 'text', array(\n 'data' => ElasticProduct::getConfigValue('username'),\n 'required' => false,\n 'label' => Translator::getInstance()->trans('Username', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'username'\n )\n ))\n ->add('password', PasswordType::class, array(\n 'data' => ElasticProduct::getConfigValue('password'),\n 'required' => false,\n 'label' => Translator::getInstance()->trans('Password', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'password'\n )\n ))\n ->add('index_prefix', 'text', array(\n 'data' => ElasticProduct::getConfigValue('index_prefix'),\n 'required' => false,\n 'attr' => ['placeholder' => 'my_website_name'],\n 'label' => Translator::getInstance()->trans('Index prefix', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'index_prefix'\n )\n ));\n }", "private function buildGitLabWForm(&$form) {\n $git_settings = $this->configFactory->get('simple_git.settings');\n\n $form['git_lab'] = [\n '#type' => 'fieldset',\n '#title' => $this->t('GitLab Web settings'),\n '#collapsible' => TRUE,\n '#collapsed' => FALSE,\n ];\n\n $form['git_lab']['git_lab_app_id'] = [\n '#type' => 'textfield',\n '#title' => $this->t('GitLab App Web Id'),\n '#description' => $this->t('GitLab App Web Id value'),\n '#default_value' => $git_settings->get(\n ModuleConstantInterface::GIT_TYPE_GITLAB\n )['app_id'],\n ];\n\n $form['git_lab']['git_lab_app_secret'] = [\n '#type' => 'textfield',\n '#title' => $this->t('GitLab App Web Secret'),\n '#description' => $this->t('GitLab App Web Secret value'),\n '#default_value' => $git_settings->get(\n ModuleConstantInterface::GIT_TYPE_GITLAB\n )['app_secret'],\n ];\n\n $form['git_lab']['git_lab_app_url_redirect'] = [\n '#type' => 'textfield',\n '#title' => $this->t('GitLab URL Web Redirect'),\n '#description' => $this->t('GitLab URL Web Redirect value'),\n '#default_value' => $git_settings->get(\n ModuleConstantInterface::GIT_TYPE_GITLAB\n )['app_url_redirect'],\n ];\n\n }", "public function build(Form $form):Form\n {\n foreach ($this->classType->getProperties() as $property) {\n $this->add($form, $property);\n }\n \n return $form;\n }", "public function buildForm() {\n\t\techo \"<!DOCTYPE html>\n\t\t<html>\n\t\t<head>\n\t\t\t<title>$this->title</title>\n\t\t</head>\n\t\t<body>\n\t\t<form method=\\\"$this->method\\\">\";\n\t\tforeach ($this->_inputs as $key => $input) {\n\t\t\t// Check if email validation is required.\n\t\t\tif (isset($input['rule']) && in_array('email', $input['rule'])) {\n\t\t\t\t$input['inputType'] = 'email';\n\t\t\t}\n\n\t\t\techo \"<label>\".$input['label'].\"</label><input type=\\\"\".$input['inputType'].\"\\\" id=\\\"\".$input['name'].\"\\\" name=\\\"\".$input['name'].\"\\\" value=\\\"\".$input['defaultValue'].\"\\\"\";\n\n\t\t\t// Check if field was required.\n\t\t\tif (isset($input['rule']) && in_array('required', $input['rule'])) {\n\t\t\t\techo \" required\";\n\t\t\t}\n\n\t\t\techo \"><br></form>\";\n\t\t}\n\t}", "function initStylePropertiesForm()\n\t{\n\t\tglobal $ilCtrl, $lng, $ilTabs, $ilSetting;\n\t\t\n\t\tinclude_once(\"./Services/Style/classes/class.ilObjStyleSheet.php\");\n\t\t$lng->loadLanguageModule(\"style\");\n\n\t\tinclude_once(\"./Services/Form/classes/class.ilPropertyFormGUI.php\");\n\t\t$this->form = new ilPropertyFormGUI();\n\t\t\n\t\t$fixed_style = $ilSetting->get(\"fixed_content_style_id\");\n\t\t$style_id = $this->object->getStyleSheetId();\n\n\t\tif ($fixed_style > 0)\n\t\t{\n\t\t\t$st = new ilNonEditableValueGUI($lng->txt(\"style_current_style\"));\n\t\t\t$st->setValue(ilObject::_lookupTitle($fixed_style).\" (\".\n\t\t\t\t$this->lng->txt(\"global_fixed\").\")\");\n\t\t\t$this->form->addItem($st);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$st_styles = ilObjStyleSheet::_getStandardStyles(true, false,\n\t\t\t\t$_GET[\"ref_id\"]);\n\n\t\t\t$st_styles[0] = $this->lng->txt(\"default\");\n\t\t\tksort($st_styles);\n\n\t\t\tif ($style_id > 0)\n\t\t\t{\n\t\t\t\t// individual style\n\t\t\t\tif (!ilObjStyleSheet::_lookupStandard($style_id))\n\t\t\t\t{\n\t\t\t\t\t$st = new ilNonEditableValueGUI($lng->txt(\"style_current_style\"));\n\t\t\t\t\t$st->setValue(ilObject::_lookupTitle($style_id));\n\t\t\t\t\t$this->form->addItem($st);\n\n//$this->ctrl->getLinkTargetByClass(\"ilObjStyleSheetGUI\", \"edit\"));\n\n\t\t\t\t\t// delete command\n\t\t\t\t\t$this->form->addCommandButton(\"editStyle\",\n\t\t\t\t\t\t$lng->txt(\"style_edit_style\"));\n\t\t\t\t\t$this->form->addCommandButton(\"deleteStyle\",\n\t\t\t\t\t\t$lng->txt(\"style_delete_style\"));\n//$this->ctrl->getLinkTargetByClass(\"ilObjStyleSheetGUI\", \"delete\"));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($style_id <= 0 || ilObjStyleSheet::_lookupStandard($style_id))\n\t\t\t{\n\t\t\t\t$style_sel = ilUtil::formSelect ($style_id, \"style_id\",\n\t\t\t\t\t$st_styles, false, true);\n\t\t\t\t$style_sel = new ilSelectInputGUI($lng->txt(\"style_current_style\"), \"style_id\");\n\t\t\t\t$style_sel->setOptions($st_styles);\n\t\t\t\t$style_sel->setValue($style_id);\n\t\t\t\t$this->form->addItem($style_sel);\n//$this->ctrl->getLinkTargetByClass(\"ilObjStyleSheetGUI\", \"create\"));\n\t\t\t\t$this->form->addCommandButton(\"saveStyleSettings\",\n\t\t\t\t\t\t$lng->txt(\"save\"));\n\t\t\t\t$this->form->addCommandButton(\"createStyle\",\n\t\t\t\t\t$lng->txt(\"sty_create_ind_style\"));\n\t\t\t}\n\t\t}\n\t\t$this->form->setTitle($lng->txt(\"wiki_style\"));\n\t\t$this->form->setFormAction($ilCtrl->getFormAction($this));\n\t}", "public function form()\n {\n $this->switch('auto_df_switch', __('message.tikuanconfig.auto_df_switch'));\n $this->timeRange('auto_df_stime', 'auto_df_etime', '开启时间');\n $this->text('auto_df_maxmoney', __('message.tikuanconfig.auto_df_maxmoney'))->setWidth(2);\n $this->text('auto_df_max_count', __('message.tikuanconfig.auto_df_max_count'))->setWidth(2);\n $this->text('auto_df_max_sum', __('message.tikuanconfig.auto_df_max_sum'))->setWidth(2);\n\n }", "function form($instance) {\n\n\t\t// Get stored preferences\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$title = isset( $instance['title'] ) ? esc_attr($instance['title']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$show_title_text = isset( $instance['show_title_text'] ) ? $instance['show_title_text'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$order = isset( $instance['order'] ) ? esc_attr($instance['order']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$size_from = isset( $instance['size_from'] ) ? esc_attr($instance['size_from']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$size_to = isset( $instance['size_to'] ) ? esc_attr($instance['size_to']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$max = isset( $instance['max'] ) ? esc_attr($instance['max']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$taxonomy = isset( $instance['taxonomy'] ) ? esc_attr($instance['taxonomy']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$color = isset( $instance['color'] ) ? esc_attr($instance['color']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$color_span_from = isset( $instance['color_span_from'] ) ? esc_attr($instance['color_span_from']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$color_span_to = isset( $instance['color_span_to'] ) ? esc_attr($instance['color_span_to']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$letter_spacing = isset( $instance['letter_spacing'] ) ? esc_attr($instance['letter_spacing']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$word_spacing = isset( $instance['word_spacing'] ) ? esc_attr($instance['word_spacing']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$tag_spacing = isset( $instance['tag_spacing'] ) ? esc_attr($instance['tag_spacing']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$case = isset( $instance['case'] ) ? esc_attr($instance['case']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$minimum\t\t = isset( $instance['minimum'] ) ? esc_attr($instance['minimum']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$tags_list = isset( $instance['tags_list'] ) && is_array($instance['tags_list']) ? $instance['tags_list'] : array();\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$tags_list_type = isset( $instance['tags_list_type'] ) ? esc_attr($instance['tags_list_type']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$reverse = isset( $instance['reverse'] ) ? $instance['reverse'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$authors = isset( $instance['authors'] ) && is_array($instance['authors']) ? $instance['authors'] : array();\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$color_set = isset( $instance['color_set'] ) && is_array($instance['color_set']) ? $instance['color_set'] : array();\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$case_sensitive = isset( $instance['case_sensitive'] ) ? $instance['case_sensitive'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$debug \t\t\t\t= isset( $instance['debug'] ) ? $instance['debug'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$show_title = isset( $instance['show_title'] ) ? $instance['show_title'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$link_underline = isset( $instance['link_underline'] ) ? $instance['link_underline'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$link_bold = isset( $instance['link_bold'] ) ? $instance['link_bold'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$link_italic = isset( $instance['link_italic'] ) ? $instance['link_italic'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$link_bg_color = isset( $instance['link_bg_color'] ) ? esc_attr($instance['link_bg_color']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$link_border_width = isset( $instance['link_border_width'] ) ? esc_attr($instance['link_border_width']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$link_border_style = isset( $instance['link_border_style'] ) ? $instance['link_border_style'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$link_border_color = isset( $instance['link_border_color'] ) ? esc_attr($instance['link_border_color']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$hover_underline = isset( $instance['hover_underline'] ) ? $instance['hover_underline'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$hover_bold = isset( $instance['hover_bold'] ) ? $instance['hover_bold'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$hover_italic = isset( $instance['hover_italic'] ) ? $instance['hover_italic'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$hover_bg_color = isset( $instance['hover_bg_color'] ) ? esc_attr($instance['hover_bg_color']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$hover_color = isset( $instance['hover_color'] ) ? esc_attr($instance['hover_color']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$hover_border_width = isset( $instance['hover_border_width'] ) ? esc_attr($instance['hover_border_width']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$hover_border_style = isset( $instance['hover_border_style'] ) ? $instance['hover_border_style'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$hover_border_color = isset( $instance['hover_border_color'] ) ? esc_attr($instance['hover_border_color']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$days_old \t\t\t= isset( $instance['days_old'] ) ? esc_attr($instance['days_old']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$line_height \t\t= isset( $instance['line_height'] ) ? esc_attr($instance['line_height']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$separator \t\t\t= isset( $instance['separator'] ) ? esc_attr($instance['separator']) : '';\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$prefix \t\t\t= isset( $instance['prefix'] ) ? esc_attr($instance['prefix']) : '';\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$suffix \t\t\t= isset( $instance['suffix'] ) ? esc_attr($instance['suffix']) : '';\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$post_type = isset( $instance['post_type'] ) ? $instance['post_type'] : array('post');\n\n\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$configurations = get_option('utcw_saved_configs');\n\n\t\t$args = array(\n\t\t\t'public' => true\n\t\t);\n\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$available_post_types = get_post_types($args);\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$available_taxonomies = get_taxonomies();\n\n\t\t// Content of the widget settings form\n\t\trequire \"settings.php\";\n\t}", "public function form(){\n \t \tif($this->layoutWidgetInfo){\n \t\t$setting = json_decode($this->layoutWidgetInfo->setting, true);\n \t}\n\n \t//default option(type[text], cols[3-9], rows[1], label[$key], name[$key], value[$setting[$k]])\n \t//add option(class, id, stype, styleRow, required, placeholder, attr, [options, code])\n \t$settingForm = array(\n \t\t'layout_widget_id' \t=> array('type' => 'hidden', 'value' => $this->layoutWidgetInfo->layoutWidgetId),\n \t\t'widget_controller' => array('type' => 'hidden', 'value' => $this->widgetController),\n \t\t'header' \t=> array('type' => 'custom', 'value' => \"<h4 class='widget_header col-md-12'>{$this->widgetController}</h4>\", 'label' => ''),\n\n \t\t'title' => array(),\n \t\t'class'\t=> array(),\n 'bg_color'\t=> array('label' => 'Màu nền', 'class' => 'ColorPickerSliders',\n 'addElement' => '<a href=\"index.php?r=admin/help/view&helpId=4\" target=\"_blank\">Xem thêm</a>'),\n \t\t'category_id'\t=> array('type' => 'select_category', 'label' => 'Category', 'required' => true,\n \t\t\t\t'options' => CategoryExt::getCategoryList()),\n \t\t'style'\t=> array('type' => 'select', 'options' => $this->settingDefault['style']),\n \t\t'order_by' => array('type' => 'select', 'options' => $this->settingDefault['order_by']),\n \t\t'order_direction' => array('type' => 'select', 'options' => $this->settingDefault['order_direction']),\n \t);\n\n \t$settingAll = array(\n \t\t'cols' => '3-9'\n \t);\n\n \t//render setting from\n \tTemplateHelper::renderForm($settingForm, $setting, $settingAll);\n TemplateHelper::getTemplate('layout/_extra/add_setting.php', $setting);\n TemplateHelper::getTemplate('layout/_extra/color_picker.php');\n \t}", "function buildTabs()\r\n {\r\n $this->_formBuilt = true;\r\n\r\n // Here we get all page names in the controller\r\n $pages = array();\r\n $myName = $current = $this->getAttribute('id');\r\n while (null !== ($current = $this->controller->getPrevName($current))) {\r\n $pages[] = $current;\r\n }\r\n $pages = array_reverse($pages);\r\n $pages[] = $current = $myName;\r\n while (null !== ($current = $this->controller->getNextName($current))) {\r\n $pages[] = $current;\r\n }\r\n // Here we display buttons for all pages, the current one's is disabled\r\n foreach ($pages as $pageName) {\r\n $disabled = ($pageName == $myName ? array('disabled' => 'disabled')\r\n : array());\r\n\r\n $tabs[] = $this->createElement('submit',\r\n $this->getButtonName($pageName),\r\n ucfirst($pageName),\r\n array('class' => 'flat') + $disabled);\r\n }\r\n $this->addGroup($tabs, 'tabs', null, '&nbsp;', false);\r\n }", "private function buildGitHubWForm(&$form) {\n $git_settings = $this->configFactory->get('simple_git.settings');\n\n $form['git_hub'] = [\n '#type' => 'fieldset',\n '#title' => $this->t('GitHub Web settings'),\n '#collapsible' => TRUE,\n '#collapsed' => FALSE,\n ];\n\n $form['git_hub']['git_hub_app_id'] = [\n '#type' => 'textfield',\n '#title' => $this->t('GitHub App Web Id'),\n '#description' => $this->t('GitHub App Web Id value'),\n '#default_value' => $git_settings->get(\n ModuleConstantInterface::GIT_TYPE_GITHUB\n )['app_id'],\n ];\n\n $form['git_hub']['git_hub_app_secret'] = [\n '#type' => 'textfield',\n '#title' => $this->t('GitHub App Web Secret'),\n '#description' => $this->t('GitHub App Web Secret value'),\n '#default_value' => $git_settings->get(\n ModuleConstantInterface::GIT_TYPE_GITHUB\n )['app_secret'],\n ];\n\n $form['git_hub']['git_hub_app_url_redirect'] = [\n '#type' => 'textfield',\n '#title' => $this->t('GitHub URL Web Redirect'),\n '#description' => $this->t('GitHub URL Web Redirect value'),\n '#default_value' => $git_settings->get(\n ModuleConstantInterface::GIT_TYPE_GITHUB\n )['app_url_redirect'],\n ];\n\n $form['git_hub']['git_hub_app_name'] = [\n '#type' => 'textfield',\n '#title' => $this->t('GitHub App Web Name'),\n '#description' => $this->t('GitHub App Web Name'),\n '#default_value' => $git_settings->get(\n ModuleConstantInterface::GIT_TYPE_GITHUB\n )['app_name'],\n ];\n\n }", "static function lengthForm (ViewRegistry $context) {\n $lengths=array(10,20,50,100,\"*\");\n\n $form=\"<form action=\\\"\\\" method=\\\"get\\\" id=\\\"perPage\\\" drawer=\\\"Per\\\"><p>\".l(\"Per page:\").\" <select name=\\\"length\\\">\";\n $optList=\"\";\n foreach ($lengths as $l) {\n $optList.=\"<option value=\\\"\".$l.\"\\\"\";\n if ( $l==$context->g(\"length\") ) $optList.=\" selected=\\\"selected\\\"\";\n $optList.=\">\".$l.\"</option>\";\n }\n //<option value=\"10\">10</option>\n $form.=$optList;\n $form.=\"</select> <input type=\\\"submit\\\" value=\\\"\".l(\"Apply\").\"\\\"/>\";\n $defineBase=\"<input type=\\\"hidden\\\" name=\\\"\";\n $bs=$context->g(\"base\");\n $defineBase.=$bs.\"\\\" value=\\\"\";\n if ( $bs == \"begin\" ) $defineBase.=$context->g(\"begin\");\n else if ( $bs == \"end\" ) $defineBase.=$context->g(\"end\");\n else throw new UsageException (\"Illegal value at \\\"base\\\" key :\".$bs.'!');\n $defineBase.=\"\\\"/>\";\n $form.=$defineBase.\"</p></form>\";\n return ($form);\n }", "protected function form()\n {\n $form = new Form(new Activity);\n\n $form->text('log_name', 'Log name');\n $form->textarea('description', 'Description');\n $form->number('subject_id', 'Subject id');\n $form->text('subject_type', 'Subject type');\n $form->number('causer_id', 'Causer id');\n $form->text('causer_type', 'Causer type');\n $form->text('properties', 'Properties');\n\n return $form;\n }", "function buildQuickForm( ) {\n // and the grades\n require_once 'School/Utils/Conference.php';\n $details = School_Utils_Conference::getReminderDetails( );\n $string = array();\n foreach ( $details as $name => $grade ) {\n $string[] = \"{$name} (Grade: {$grade})\";\n }\n $this->assign( 'conferenceTeachers',\n implode( ', ', $string ) );\n\n $this->addButtons(array( \n array ( 'type' => 'refresh', \n 'name' => ts( 'Send Reminder' ),\n 'spacing' => '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;', \n 'isDefault' => true ), \n array ( 'type' => 'cancel', \n 'name' => ts('Cancel') ), \n )\n );\n }", "public function createForm() {\n module_load_include('inc', 'islandora_form_builder', 'FormGenerator');\n $form_values = &$this->formState['values'];\n $file = isset($form_values['ingest-file-location']) ? $form_values['ingest-file-location'] : '';\n $form['#attributes']['enctype'] = 'multipart/form-data';\n $form['indicator']['ingest-file-location'] = array(\n '#type' => 'file',\n '#title' => t('Upload Document'),\n '#size' => 48,\n '#description' => t('Select file to be added the the object.'),\n );\n $form_generator = FormGenerator::CreateFromModel($this->contentModelPid, $this->contentModelDsid);\n $form[FORM_ROOT] = $form_generator->generate($this->formName); // TODO get from user .\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Ingest'),\n '#prefix' => t('Please be patient. Once you click next there may be a number of files created. ' .\n 'Depending on your content model this could take a few minutes to process.<br />')\n );\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Goodss);\n $form->switch('is_enable','状态')->options([\n 'on' => ['value' => 1, 'text' => '正常', 'color' => 'primary'],\n 'off' => ['value' => 0, 'text' => '禁止', 'color' => 'default'],\n ]);\n $form->tools(function (Form\\Tools $tools) {\n // 去掉`删除`按钮\n $tools->disableDelete();\n // 去掉`查看`按钮\n $tools->disableView();\n });\n $form->footer(function ($footer) {\n\n // 去掉`重置`按钮\n //$footer->disableReset();\n\n // 去掉`提交`按钮\n //$footer->disableSubmit();\n\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n\n // 去掉`继续编辑`checkbox\n $footer->disableEditingCheck();\n\n // 去掉`继续创建`checkbox\n $footer->disableCreatingCheck();\n\n });\n return $form;\n }", "private function build()\n {\n $this->form->addText(\n 'name',\n $this->teamMember === null ? null : $this->teamMember->getName(),\n null,\n 'inputText title',\n 'inputTextError title'\n );\n\n $this->form->addEditor(\n 'description',\n $this->teamMember === null ? null : $this->teamMember->getDescription()\n );\n\n $this->meta = new Meta(\n $this->form,\n $this->teamMember === null ? null : $this->teamMember->getMetaId(),\n 'name',\n true\n );\n }", "public function construct()\r\n\t{\r\n\t\t\r\n\t\t\r\n\t\t$class = ($this->classClr) ? 'w50 clr' : 'w50';\r\n\t\t$class = ($this->classLong) ? 'long clr' : $class;\r\n\t\t$class .= ($this->picker) ? ' wizard' : '';\r\n\t\t\r\n\t\t$wizard = ($this->picker == 'page') ? array(array('tl_content', 'pagePicker')) : false;\r\n\t\t\r\n\t\t// input unit\r\n\t\tif (($this->picker == 'unit'))\r\n\t\t{\r\n\t\t\t$options = array();\r\n\t\t\tforeach (deserialize($this->units) as $arrOption)\r\n\t\t\t{\r\n\t\t\t\t$options[$arrOption['value']] = $arrOption['label'];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// the text field\r\n\t\t$this->generateDCA(($this->picker != 'unit') ? ($this->multiple) ? 'multiField' : 'textField' : 'inputUnit', array\r\n\t\t(\r\n\t\t\t'inputType' =>\t($this->picker == 'unit') ? 'inputUnit' : 'text',\r\n\t\t\t'label'\t\t=>\tarray($this->label, $this->description),\r\n\t\t\t'default'\t=>\t$this->defaultValue,\r\n\t\t\t'wizard'\t=>\t$wizard,\r\n\t\t\t'options'\t=>\t$options,\r\n\t\t\t'eval'\t\t=>\tarray\r\n\t\t\t(\r\n\t\t\t\t'mandatory'\t\t=>\t($this->mandatory) ? true : false, \r\n\t\t\t\t'minlength'\t\t=>\t$this->minlength, \r\n\t\t\t\t'maxlength'\t\t=>\t$this->maxLength, \r\n\t\t\t\t'tl_class'\t\t=>\t$class,\r\n\t\t\t\t'rgxp'\t\t\t=>\t$this->rgxp,\r\n\t\t\t\t'multiple'\t\t=>\t($this->multiple) ? true : false,\r\n\t\t\t\t'size'\t\t\t=>\t$this->multiple,\r\n\t\t\t\t'datepicker' \t=> \t($this->picker == 'datetime') ? true : false,\r\n\t\t\t\t'colorpicker' \t=> \t($this->picker == 'color') ? true : false,\r\n\t\t\t\t'isHexColor' \t=> \t($this->picker == 'color') ? true : false,\r\n\t\t\t),\r\n\t\t));\r\n\t\t\r\n\t}", "protected function definition_inner(&$mform) {\n\n $norepeats = $this->_customdata['norepeats']; // number of dimensions to display\n $descriptionopts = $this->_customdata['descriptionopts']; // wysiwyg fields options\n $current = $this->_customdata['current']; // current data to be set\n\n $mform->addElement('hidden', 'norepeats', $norepeats);\n $mform->setType('norepeats', PARAM_INT);\n // value not to be overridden by submitted value\n $mform->setConstants(array('norepeats' => $norepeats));\n\n $levelgrades = array();\n for ($i = 100; $i >= 0; $i--) {\n $levelgrades[$i] = $i;\n }\n\n for ($i = 0; $i < $norepeats; $i++) {\n $mform->addElement('header', 'dimension'.$i, get_string('dimensionnumber', 'workshopform_rubric', $i+1));\n $mform->addElement('hidden', 'dimensionid__idx_'.$i);\n $mform->setType('dimensionid__idx_'.$i, PARAM_INT);\n $mform->addElement('editor', 'description__idx_'.$i.'_editor',\n get_string('dimensiondescription', 'workshopform_rubric'), '', $descriptionopts);\n if (isset($current->{'numoflevels__idx_' . $i})) {\n $numoflevels = max($current->{'numoflevels__idx_' . $i} + self::ADDLEVELS, self::MINLEVELS);\n } else {\n $numoflevels = self::MINLEVELS;\n }\n $prevlevel = -1;\n for ($j = 0; $j < $numoflevels; $j++) {\n $mform->addElement('hidden', 'levelid__idx_' . $i . '__idy_' . $j);\n $mform->setType('levelid__idx_' . $i . '__idy_' . $j, PARAM_INT);\n $levelgrp = array();\n $levelgrp[] = $mform->createElement('select', 'grade__idx_'.$i.'__idy_'.$j,'', $levelgrades);\n $levelgrp[] = $mform->createElement('textarea', 'definition__idx_'.$i.'__idy_'.$j, '', array('cols' => 60, 'rows' => 3));\n $mform->addGroup($levelgrp, 'level__idx_'.$i.'__idy_'.$j, get_string('levelgroup', 'workshopform_rubric'), array(' '), false);\n $mform->setDefault('grade__idx_'.$i.'__idy_'.$j, $prevlevel + 1);\n if (isset($current->{'grade__idx_'.$i.'__idy_'.$j})) {\n $prevlevel = $current->{'grade__idx_'.$i.'__idy_'.$j};\n } else {\n $prevlevel++;\n }\n }\n }\n\n $mform->registerNoSubmitButton('adddims');\n $mform->addElement('submit', 'adddims', get_string('addmoredimensions', 'workshopform_rubric',\n workshop_rubric_strategy::ADDDIMS));\n $mform->closeHeaderBefore('adddims');\n\n $mform->addElement('header', 'configheader', get_string('configuration', 'workshopform_rubric'));\n $layoutgrp = array();\n $layoutgrp[] = $mform->createElement('radio', 'config_layout', '',\n get_string('layoutlist', 'workshopform_rubric'), 'list');\n $layoutgrp[] = $mform->createElement('radio', 'config_layout', '',\n get_string('layoutgrid', 'workshopform_rubric'), 'grid');\n $mform->addGroup($layoutgrp, 'layoutgrp', get_string('layout', 'workshopform_rubric'), array('<br />'), false);\n $mform->setDefault('config_layout', 'list');\n $this->set_data($current);\n }", "protected function buildControl()\n\t\t{\n\t\t\tswitch($this->getDisplayMode())\n\t\t\t{\n\t\t\t\tcase self::DISPLAYMODE_ICONS :\n\t\t\t\t\t$this->buildIconView();\n\t\t\t\t\tbreak;\n\t\t\t\tcase self::DISPLAYMODE_LIST :\n\t\t\t\t\t$this->buildListView();\n\t\t\t\t\tbreak;\n\t\t\t\tcase self::DISPLAYMODE_DETAILS :\n\t\t\t\t\t$this->buildDetailView();\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tstatic::fail(\"Unknown DisplayMode '%s'\", $this->getDisplayMode());\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "public function buildForm()\n {\n $this\n ->add(\n 'new_organization_group',\n 'collection',\n [\n 'type' => 'form',\n 'options' => [\n 'class' => 'App\\SuperAdmin\\Forms\\OrganizationGroupInformation',\n 'label' => false,\n ]\n ]\n )\n ->add(\n 'group_admin_information',\n 'collection',\n [\n 'type' => 'form',\n 'options' => [\n 'class' => 'App\\SuperAdmin\\Forms\\GroupAdmin',\n 'label' => false,\n ]\n ]\n )\n ->addSaveButton();\n }", "function initSettingsTypeForm()\n\t{\n\t\tinclude_once(\"./Services/Administration/classes/class.ilSetting.php\");\n\t\t$type = ilSetting::_getValueType();\n\n\t\tinclude_once (\"Services/Form/classes/class.ilPropertyFormGUI.php\");\n $form = new ilPropertyFormGUI();\n\n\t\t$form->setId(\"settings_type\");\n\t\t$form->setTitle($this->lng->txt(\"settings_type\"));\n\t\t$form->setFormAction(\"setup.php?cmd=gateway\");\n\n\t\t$item = new ilNonEditableValueGUI($this->lng->txt('settings_type_current'));\n\t\t$item->setValue(strtoupper($type));\n\n\t\tif ($type == \"clob\")\n\t\t{\n\t\t\t$item->setInfo($this->lng->txt('settings_info_clob'));\n $form->addCommandButton(\"showLongerSettings\", $this->lng->txt(\"settings_show_longer\"));\n $form->addCommandButton(\"changeSettingsType\", $this->lng->txt(\"settings_change_text\"));\n\t }\n\t\telse\n\t\t{\n\t\t\t$item->setInfo($this->lng->txt('settings_info_text'));\n \t$form->addCommandButton(\"changeSettingsType\", $this->lng->txt(\"settings_change_clob\"));\n\t\t}\n\t\t$form->addItem($item);\n\n\t\tif (is_array($this->longer_settings))\n\t\t{\n\t\t\t$item = new ilCustomInputGUI($this->lng->txt('settings_longer_values'));\n\n\t\t\tif (count($this->longer_settings))\n\t\t\t{\n\t foreach ($this->longer_settings as $row)\n\t\t\t\t{\n\t $subitem = new ilCustomInputGUI(sprintf($this->lng->txt('settings_key_info'), $row['module'], $row['keyword']));\n\t\t\t\t\t$subitem->setInfo($row['value']);\n\t\t\t\t\t$item->addSubItem($subitem);\n\t }\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t $item->setHTML($this->lng->txt('settings_no_longer_values'));\n\t }\n\t\t\t$form->addItem($item);\n\t }\n\n\t\treturn $form;\n\t}", "public static function drawLoggingOptions()\n {\n $buildopts = array(\n 'files' => jgettext('Log file contents')\n , 'profile' => jgettext('Profile')\n );\n\n //--Get component parameters\n $params = JComponentHelper::getParams('com_easycreator');\n\n echo NL.'<div class=\"logging-options\">';\n\n $js = \"v =( $('div_buildopts').getStyle('display') == 'block') ? 'none' : 'block';\";\n $js .= \"$('div_buildopts').setStyle('display', v);\";\n\n $checked =($params->get('logging')) ? ' checked=\"checked\"' : '';\n echo NL.'<input type=\"checkbox\" onchange=\"'.$js.'\" name=\"buildopts[]\"'.$checked.' value=\"logging\" id=\"logging\" />';\n echo NL.'<label for=\"logging\">'.jgettext('Activate logging').'</label>';\n\n $style =($params->get('logging')) ? '' : ' style=\"display: none;\"';\n echo NL.' <div id=\"div_buildopts\"'.$style.'>';\n\n foreach($buildopts as $name => $titel)\n {\n //--Get component parameters\n $checked =($params->get($name)) ? ' checked=\"checked\"' : '';\n\n echo NL.'&nbsp;|__';\n echo NL.'<input type=\"checkbox\" name=\"buildopts[]\"'.$checked.' value=\"'.$name.'\" id=\"'.$name.'\" />';\n echo NL.'<label for=\"'.$name.'\">'.$titel.'</label><br />';\n }//foreach\n\n echo NL.' </div>';\n echo NL.'</div>';\n }", "function build() {\n\t\t$this->order_id = new view_field(\"Order ID\");\n\t\t$this->timestamp = new view_field(\"Date\");\n\t\t$this->total_amount = new view_field(\"Amount\");\n $this->view= new view_element(\"static\");\n \n $translations = new translations(\"fields\");\n $invoice_name = $translations->translate(\"fields\",\"Invoice\",true);\n $this->view->value=\"<a href=\\\"/orders/order_details.php?order_id={$this->_order_id}\\\" target=\\\"invoice\\\">\".$invoice_name.\"</a>\";\n\n\t\tif(isset($_SESSION['wizard']['complete']['process_time']))\n\t\t{\n\t\t\t$this->process_time = new view_field(\"Seconds to process\");\n\t\t\t$this->process_time->value=$_SESSION['wizard']['complete']['process_time'];\n\t\t\t$this->server = new view_field();\n\t\t\t$address_parts = explode('.',$_SERVER['SERVER_ADDR']);\n\t\t\t$this->server->value = $address_parts[count($address_parts) - 1];\n\t\t}\n\t\tparent::build();\n\t}", "protected function form()\n {\n $form = new Form(new Terrace());\n\n $form->image('image', __('平台图片'))->rules('required', ['required' => '平台图片不能为空']);\n $form->text('name', __('平台名称'))->rules('required', ['required' => '平台名称不能为空']);\n $form->text('path', __('外链'))->rules('required', ['required' => '平台外链不能为空']);\n $form->text('notice_info', __('提示语'))->rules('required', ['required' => '平台提示语不能为空']);\n $form->radio('status','状态')->options(['1' => '未推荐', '2'=> '已推荐'])->default(1);\n\n return $form;\n }", "protected function definition_inner($mform) {\n global $PAGE;\n $PAGE->requires->jquery();\n $PAGE->requires->jquery_plugin('ui');\n $PAGE->requires->jquery_plugin('ui-css');\n\n $PAGE->requires->strings_for_js(array('itemsettingserror', 'editquestiontext', 'additemsettings',\n 'correct', 'incorrect'), 'qtype_gapfill');\n $PAGE->requires->js('/question/type/gapfill/questionedit.js');\n $mform->addElement('hidden', 'reload', 1);\n $mform->setType('reload', PARAM_RAW);\n\n $mform->removeelement('questiontext');\n /*for storing the json containing the settings data */\n $mform->addElement('hidden', 'itemsettings', '', array('size' => '80'));\n $mform->setType('itemsettings', PARAM_RAW);\n\n /* popup for entering feedback for individual words */\n $mform->addElement('html', '<div id=\"id_itemsettings_popup\" title=\"' . get_string('additemsettings', 'qtype_gapfill')\n . '\" style=\"display:none;background-color:lightgrey\" >');\n $mform->addElement('editor', 'correct', '', array('size' => 70, 'rows' => 4), $this->editoroptions);\n $mform->addElement('editor', 'incorrect', '', array('size' => 70, 'rows' => 4), $this->editoroptions);\n $mform->addElement('html', '</div>');\n\n /* presented for clicking on the gaps once they have been given numberical ids */\n $mform->addElement('html',\n '<div class=\"gapfill\" id=\"id_itemsettings_canvas\" style=\"display:none;background-color:lightgrey\" ></div>');\n\n $mform->addElement('html', '<div id=\"questiontext\" >');\n $mform->addElement('editor', 'questiontext', get_string('questiontext', 'question'), array('rows' => 10),\n $this->editoroptions);\n $mform->addElement('html', '</div>');\n\n $mform->setType('questiontext', PARAM_RAW);\n $mform->addHelpButton('questiontext', 'questiontext', 'qtype_gapfill');\n\n $mform->addElement('button', 'itemsettings_button', get_string('itemsettingsbutton', 'qtype_gapfill'));\n $mform->addHelpButton('itemsettings_button', 'itemsettings_button', 'qtype_gapfill');\n\n $mform->removeelement('generalfeedback');\n\n // Default mark will be set to 1 * number of fields.\n $mform->removeelement('defaultmark');\n\n $mform->addElement('editor', 'wronganswers', get_string('wronganswers', 'qtype_gapfill'),\n array('size' => 70, 'rows' => 1), $this->editoroptions);\n $mform->addHelpButton('wronganswers', 'wronganswers', 'qtype_gapfill');\n\n /* Only allow plain text in for the comma delimited set of wrong answer values\n * wrong answers really should be a set of zero marked ordinary answers in the answers\n * table.\n */\n $mform->setType('wronganswers', PARAM_TEXT);\n\n $mform->addElement('editor', 'generalfeedback', get_string('generalfeedback', 'question')\n , array('rows' => 10), $this->editoroptions);\n\n $mform->setType('generalfeedback', PARAM_RAW);\n $mform->addHelpButton('generalfeedback', 'generalfeedback', 'question');\n $mform->addElement('header', 'feedbackheader', get_string('moreoptions', 'qtype_gapfill'));\n\n // The delimiting characters around fields.\n $config = get_config('qtype_gapfill');\n /* turn config->delimitchars into an array) */\n $delimitchars = explode(\",\", $config->delimitchars);\n /* copies the values into the keys */\n $delimitchars = array_combine($delimitchars, $delimitchars);\n /* strip any spaces from keys. This is about backward compatibility with old code\n * and avoiding having to expand the size of the delimitchar column from its current\n * 2. The value in the drop down looks better with a gap between the delimitchars, but\n * a gap in the key will break the insert into the question_gapfill table\n */\n foreach ($delimitchars as $key => $value) {\n $key2 = str_replace(' ', '', $key);\n $delimitchars2[$key2] = $value;\n }\n $mform->addElement('select', 'delimitchars', get_string('delimitchars', 'qtype_gapfill'), $delimitchars2);\n $mform->addHelpButton('delimitchars', 'delimitchars', 'qtype_gapfill');\n\n $answerdisplaytypes = array(\"dragdrop\" => get_string('displaydragdrop', 'qtype_gapfill'),\n \"gapfill\" => get_string('displaygapfill', 'qtype_gapfill'),\n \"dropdown\" => get_string('displaydropdown', 'qtype_gapfill'));\n\n $mform->addElement('select', 'answerdisplay', get_string('answerdisplay', 'qtype_gapfill'), $answerdisplaytypes);\n $mform->addHelpButton('answerdisplay', 'answerdisplay', 'qtype_gapfill');\n\n /* sets all gaps to the size of the largest gap, avoids giving clues to the correct answer */\n $mform->addElement('advcheckbox', 'fixedgapsize', get_string('fixedgapsize', 'qtype_gapfill'));\n $mform->addHelpButton('fixedgapsize', 'fixedgapsize', 'qtype_gapfill');\n\n /* put draggable answer options after the text. They don't have to be dragged as far, handy on small screens */\n $mform->addElement('advcheckbox', 'optionsaftertext', get_string('optionsaftertext', 'qtype_gapfill'));\n $mform->setDefault('optionsaftertext', $config->optionsaftertext);\n $mform->addHelpButton('optionsaftertext', 'optionsaftertext', 'qtype_gapfill');\n\n /* use plain string matching instead of regular expressions */\n $mform->addElement('advcheckbox', 'disableregex', get_string('disableregex', 'qtype_gapfill'));\n $mform->addHelpButton('disableregex', 'disableregex', 'qtype_gapfill');\n $mform->setDefault('disableregex', $config->disableregex);\n $mform->setAdvanced('disableregex');\n\n $mform->addElement('advcheckbox', 'letterhints', get_string('letterhints', 'qtype_gapfill'));\n $mform->setDefault('letterhints', $config->letterhints);\n $mform->addHelpButton('letterhints', 'letterhints', 'qtype_gapfill');\n\n /* Discards duplicates before processing answers, useful for tables with gaps like [cat|dog][cat|dog] */\n $mform->addElement('advcheckbox', 'noduplicates', get_string('noduplicates', 'qtype_gapfill'));\n $mform->addHelpButton('noduplicates', 'noduplicates', 'qtype_gapfill');\n $mform->setAdvanced('noduplicates');\n\n /* Makes marking case sensitive so Cat is not the same as cat */\n $mform->addElement('advcheckbox', 'casesensitive', get_string('casesensitive', 'qtype_gapfill'));\n $mform->setDefault('casesensitive', $config->casesensitive);\n $mform->addHelpButton('casesensitive', 'casesensitive', 'qtype_gapfill');\n $mform->setAdvanced('casesensitive');\n\n // To add combined feedback (correct, partial and incorrect).\n $this->add_combined_feedback_fields(true);\n\n // Adds hinting features.\n $this->add_interactive_settings(true, true);\n if ($config->letterhints && $config->addhinttext) {\n $this->_form->getElement('hint[0]')->setValue(array('text' => get_string('letterhint0', 'qtype_gapfill')));\n $this->_form->getElement('hint[1]')->setValue(array('text' => get_string('letterhint1', 'qtype_gapfill')));\n }\n }", "protected function createComponentTarifForm()\r\n\t{\r\n\t\t$form = new Form;\r\n\t\t$form->addText('name', 'Jméno:')\r\n\t\t\t->setRequired('Zadej jméno.');\r\n\r\n\t\t$form->addText('apicode', 'API Code:');\r\n\r\n\t\t$form->addText('price', 'Cena:')\r\n\t\t ->addRule(Form::INTEGER, 'Cena musí být číslo')\r\n\t\t\t->setRequired('Zadej cenu.');\r\n\t\t\r\n\t\t$form->addText('description', 'Popis:');\r\n\t\t\t\r\n\t\t$form->addSubmit('save', 'Uložit')\r\n\t\t\t->setAttribute('class', 'default')\r\n\t\t\t->onClick[] = $this->tarifFormSucceeded;\r\n\r\n\t\t$form->addSubmit('cancel', 'Cancel')\r\n\t\t\t->setValidationScope(NULL)\r\n\t\t\t->onClick[] = $this->formCancelled;\r\n\r\n\t\t$form->addProtection();\r\n\t\treturn $form;\r\n\t}", "public function buildPaneForm(array $pane_form, FormStateInterface $form_state, array &$complete_form);", "public function init()\n\t{\n\t\tparent::init();\n\t\t$this->addCssClass($this->options, 'progress');\n\t}", "protected function form()\n {\n $form = new Form(new $this->currentModel);\n \n $form->display('id', 'ID');\n $form->select('company_id', '公司名称')->options(Company::getSelectOptions());\n $form->text('project_name', '项目名称');\n $form->image('project_photo', '项目图片')->uniqueName()->move('public/photo/images/custom_thum/');\n $form->url('link_url', '项目链接');\n $form->radio('display', '公开度')->options(['0' => '公开', '-1'=> '保密'])->default('0');\n //$form->display('created_at', 'Created At');\n //$form->display('updated_at', 'Updated At');\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Setting());\n\n $form->decimal('member_fee', __('会员年费'))->required();\n $form->decimal('task_rate', __('任务佣金抽成比例'))->required()->help('将扣除对应比例,比例范围0-1');\n $form->tools(function (Form\\Tools $tools) {\n\n // 去掉`列表`按钮\n $tools->disableList();\n\n // 去掉`删除`按钮\n $tools->disableDelete();\n\n // 去掉`查看`按钮\n $tools->disableView();\n });\n\n $form->footer(function ($footer) {\n\n // 去掉`重置`按钮\n $footer->disableReset();\n\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n\n // 去掉`继续编辑`checkbox\n $footer->disableEditingCheck();\n\n // 去掉`继续创建`checkbox\n $footer->disableCreatingCheck();\n\n });\n\n //保存后回调\n $form->saved(function (Form $form) {\n $success = new MessageBag([\n 'title' => '提示',\n 'message' => '保存成功',\n ]);\n\n return back()->with(compact('success'));\n });\n return $form;\n }", "protected function form() {\n\t\treturn Admin::form(WhtSpiderLogModel::class,function (Form $form) {\n\t\t\t$directors = [\n\t\t\t\t'成功' => 1,\n\t\t\t\t'失败' => 0,\n\t\t\t];\n\t\t\t$form->select('status','状态')->options($directors);\n\t\t\t$form->setAction('采集');\n\t\t});\n\t}", "protected function form()\n {\n $form = new Form(new Cate());\n\n $form->text('name', __('Name'));\n $form->url('link', __('Link'));\n $form->text('thumb', __('Thumb'));\n $form->switch('status', __('Status'));\n $form->number('sort', __('Sort'));\n $form->datetime('createtime', __('Createtime'))->default(date('Y-m-d H:i:s'));\n\n return $form;\n }", "public function buildFormFields()\n {\n $this->addFormField(\n SharpTextFormFieldConfig::create(\"titre\")\n ->setLabel(\"Titre\")\n );\n\n $this->addFormField(\n SharpTextFormFieldConfig::create(\"soustitre\")\n ->setLabel(\"Sous-titre\")\n );\n\n $this->addFormField(\n SharpTextFormFieldConfig::create(\"slug\")\n ->setLabel(\"Slug\")\n );\n\n $this->addFormField(\n SharpTextFormFieldConfig::create(\"url\")\n ->setLabel(\"URL du projet\")\n );\n\n $this->addFormField(\n SharpMarkdownFormFieldConfig::create(\"texte\")\n ->setLabel(\"Texte\")\n ->showToolbar(true)\n );\n\n $this->addFormField(\n SharpCheckFormFieldConfig::create(\"is_open_source\")\n ->setText(\"Projet Open-source\")\n );\n\n $this->addFormField(\n SharpPivotFormFieldConfig::create(\"technos\", SharpTechnoRepository::class)\n ->setLabel(\"Technologies\")\n ->setAddable(true)\n ->setSortable(true)\n ->setOrderAttribute(\"ordre\")\n ->setCreateAttribute(\"nom\")\n );\n\n $this->addFormField(\n SharpListFormFieldConfig::create(\"screenshots\")\n ->setLabel(\"Screenshots\")\n ->setSortable(true)->setOrderAttribute(\"ordre\")\n ->setAddable(true)->setAddButtonText(\"Ajouter un screenshot\")\n ->setRemovable(true)->setRemoveButtonText(\"Supprimer\")\n ->addItemFormField(\n SharpFileFormFieldConfig::create(\"fichier\")\n ->setFileFilterImages()\n ->setMaxFileSize(5)\n ->setThumbnail(\"100x100\")\n ->addGeneratedThumbnail(\"600x\"))\n ->addItemFormField(\n SharpTextFormFieldConfig::create(\"tag\")\n ->addAttribute(\"placeholder\", \"Tag\"))\n ->addItemFormField(\n SharpTextareaFormFieldConfig::create(\"legende\")\n ->setRows(3))\n ->setItemFormTemplate(\n SharpListItemFormTemplateConfig::create()\n ->addField(\"fichier\")\n ->addField(\"tag\")\n ->addField(\"legende\")\n )\n );\n\n $this->addFormTemplateColumn(\n SharpFormTemplateColumnConfig::create(7)\n ->addField(\"titre\")\n ->addField(\"soustitre\")\n ->addField([\"slug:5\", \"url:7\"])\n ->addField(\"technos\")\n ->addField(\"is_open_source\")\n\n )->addFormTemplateColumn(\n SharpFormTemplateColumnConfig::create(5)\n ->addField(\"texte\")\n ->addField(\"screenshots\")\n );\n }", "public function build() { $this->form_built = TRUE; return $this; }", "private function buildGitLabMForm(&$form) {\n $git_settings = $this->configFactory->get('simple_git.settings');\n\n $form['git_labM'] = [\n '#type' => 'fieldset',\n '#title' => $this->t('GitLab Mobile settings'),\n '#collapsible' => TRUE,\n '#collapsed' => FALSE,\n ];\n\n $form['git_labM']['git_labM_app_id'] = [\n '#type' => 'textfield',\n '#title' => $this->t('GitLab App Mobile Id'),\n '#description' => $this->t('GitLab App Mobile Id value'),\n '#default_value' => $git_settings->get(\n ModuleConstantInterface::GIT_TYPE_GITLABM\n )['app_id'],\n ];\n\n $form['git_labM']['git_labM_app_secret'] = [\n '#type' => 'textfield',\n '#title' => $this->t('GitLab App Mobile Secret'),\n '#description' => $this->t('GitLab App <mobile Secret value'),\n '#default_value' => $git_settings->get(\n ModuleConstantInterface::GIT_TYPE_GITLABM\n )['app_secret'],\n ];\n\n $form['git_labM']['git_labM_app_url_redirect'] = [\n '#type' => 'textfield',\n '#title' => $this->t('GitLab URL Mobile Redirect'),\n '#description' => $this->t('GitLab URL Mobile Redirect value'),\n '#default_value' => $git_settings->get(\n ModuleConstantInterface::GIT_TYPE_GITLABM\n )['app_url_redirect'],\n ];\n\n }", "protected function createComponentPrihozForm()\n {\n $id = (int) $this->getParameter('id');\n $form = new Nette\\Application\\UI\\Form;\n \n $form->addText('id_uzivatel')\n ->setAttribute('style', 'display:none')\n ->setDefaultValue($this->user->id);\n\n $form->addText('id_nemovitost')\n ->setAttribute('style', 'display:none')\n ->setDefaultValue($id);\n \n $form->addText('pocet')\n ->setAttribute('style', 'display:none');\n \n $form->addText('vkladana_castka', 'Přihazovaná částka:')\n ->setType('number')\n ->setRequired('Prosím vložte částku, kterou chcete přihodit.')\n ->addRule(Nette\\Application\\UI\\Form::MIN, 'Prosím vložte vyšší částku. Minimální příhoz je 5,000 Kč.', 5000)\n ->setAttribute('placeholder', 'Sem vložte částku v Kč.')\n ->setAttribute('class', 'castka')\n ->setAttribute('step', '1');\n\n $form->addSubmit('send', 'Odeslat formulář')\n ->setAttribute('class', 'btn btn-primary');\n\n $form->onSuccess[] = $this->prihozFormSucceeded;\n return $form;\n }", "public function initGeneralPageSettingsForm()\n\t{\n\t\tglobal $lng, $ilCtrl;\n\t\n\t\tinclude_once(\"Services/Form/classes/class.ilPropertyFormGUI.php\");\n\t\t$form = new ilPropertyFormGUI();\n\t\t\n\t\t$aset = new ilSetting(\"adve\");\n\n\t\t// use physical character styles\n\t\t$cb = new ilCheckboxInputGUI($this->lng->txt(\"adve_use_physical\"), \"use_physical\");\n\t\t$cb->setInfo($this->lng->txt(\"adve_use_physical_info\"));\n\t\t$cb->setChecked($aset->get(\"use_physical\"));\n\t\t$form->addItem($cb);\n\n\t\t// blocking mode\n\t\t$cb = new ilCheckboxInputGUI($this->lng->txt(\"adve_blocking_mode\"), \"block_mode_act\");\n\t\t$cb->setChecked($aset->get(\"block_mode_minutes\") > 0);\n\t\t$form->addItem($cb);\n\n\t\t\t// number of minutes\n\t\t\t$ni = new ilNumberInputGUI($this->lng->txt(\"adve_minutes\"), \"block_mode_minutes\");\n\t\t\t$ni->setMinValue(2);\n\t\t\t$ni->setMaxLength(5);\n\t\t\t$ni->setSize(5);\n\t\t\t$ni->setRequired(true);\n\t\t\t$ni->setInfo($this->lng->txt(\"adve_minutes_info\"));\n\t\t\t$ni->setValue($aset->get(\"block_mode_minutes\"));\n\t\t\t$cb->addSubItem($ni);\n\t\t\n\t\t$form->addCommandButton(\"saveGeneralPageSettings\", $lng->txt(\"save\"));\n\t \n\t\t$form->setTitle($lng->txt(\"adve_pe_general\"));\n\t\t$form->setFormAction($ilCtrl->getFormAction($this));\n\t \n\t\treturn $form;\n\t}", "public function buildForm(array $form, FormStateInterface $form_state) {\n // Call the parent implementation to inherit from the save button and\n // form style.\n $form = parent::buildForm($form, $form_state);\n\n // Add our custom form fields.\n $form['opening_hours'] = array(\n '#type' => 'textarea',\n '#title' => 'Opening hours',\n '#description' => 'Days / hours of the library',\n '#default_value' => $this->config('happy_alexandrie.library_config')->get('opening_hours'),\n '#rows' => 5,\n );\n return $form;\n }", "public function buildForm(array $form, FormStateInterface $form_state) {\n $form['FedoraResource_settings']['#markup'] = 'Settings form for Fedora resource entities. Manage field settings here.';\n return $form;\n }", "public function __construct()\n {\n parent::__construct();\n \n $this->form = new BootstrapFormBuilder;\n $this->form->setFormTitle('Bootstrap Form Builder');\n \n $label1 = new TLabel('Some label', '#7D78B6', 12, 'bi');\n $label1->style='text-align:left;border-bottom:1px solid #c0c0c0;width:100%';\n \n $this->form->appendPage('Page 1');\n $this->form->addContent( [$label1] );\n \n $field1a = new TEntry('row1a');\n $field2a = new TDate('row2a');\n $field2b = new TCombo('row2b');\n $field3a = new TEntry('row3a');\n $field3b = new TEntry('row3b');\n $field3c = new TEntry('row3c');\n $field3d = new TEntry('row3d');\n $field4a = new TText('row4a');\n \n // add a row with 2 slots\n $this->form->addFields( [ new TLabel('Row 1') ],\n [ $field1a ] );\n \n // add a row with 2 slots\n $this->form->addFields( [ new TLabel('Row 2') ],\n [ $field2a, $field2b ] );\n \n // add a row with 4 slots\n $this->form->addFields( [ new TLabel('Row 3') ],\n [ $field3a, $field3b ],\n [ new TLabel('Label') ],\n [ $field3c, $field3d ] );\n \n $field2b->addItems( ['1' => 'One', '2' => 'Two'] );\n \n $field1a->setSize('70%');\n $field2a->setSize('120');\n $field2b->setSize('75%');\n \n $field3a->setSize('50%');\n $field3b->setSize('50%');\n $field3c->setSize('50%');\n $field3d->setSize('50%');\n \n $this->form->appendPage('Page 2');\n \n $label2 = new TLabel('Another label', '#7D78B6', 12, 'bi');\n $label2->style='text-align:left;border-bottom:1px solid #c0c0c0;width:100%';\n \n $this->form->addContent( [$label2] );\n $this->form->addFields( [new TLabel('Row 4')], [$field4a ]);\n $field4a->setSize('100%', 100);\n \n $this->form->addAction('Send', new TAction(array($this, 'onSend')), 'fa:check-circle-o green');\n \n // wrap the page content using vertical box\n $vbox = new TVBox;\n $vbox->add(new TXMLBreadCrumb('menu.xml', __CLASS__));\n $vbox->add($this->form);\n\n parent::add($this->form);\n }", "protected function form()\n {\n $form = new Form(new Config);\n\n $form->text('key', '配置项')->readOnly();\n\n $form->text('value', '值');\n\n $form->text('desc', '描述');\n\n $form->tools(function(Form\\Tools $tools) {\n $tools->disableView();\n });\n\n return $form;\n }", "abstract function setupform();", "public function form()\n {\n $this->switch('footer_remove', Support::trans('main.footer_remove'))\n ->default(admin_setting('footer_remove'));\n $defaultColors = [\n 'default' => '墨蓝',\n 'blue' => '蓝',\n 'blue-light' => '亮蓝',\n 'green' => '墨绿',\n ];\n foreach (explode(\",\", ServiceProvider::setting('additional_theme_colors')) as $value) {\n if (!empty($value)) {\n [$k, $v] = explode(\":\", $value);\n $defaultColors[$k] = $v;\n }\n }\n\n $this->radio('theme_color', Support::trans('main.theme_color'))\n ->options($defaultColors)\n ->default(admin_setting('theme_color'));\n $this->radio('sidebar_style', Support::trans('main.sidebar_style'))\n ->options([\n 'default' => '默认',\n 'sidebar-separate' => '菜单分离',\n 'horizontal_menu' => '水平菜单'\n ])\n ->default(admin_setting('sidebar_style'));\n $this->switch('grid_row_actions_right', Support::trans('main.grid_row_actions_right'))\n ->help('启用后表格行操作按钮将永远贴着最右侧。')\n ->default(admin_setting('grid_row_actions_right'));\n }", "protected function createComponentRateForm()\r\n\t{\r\n\t\t$form = new Form;\r\n\t\t$form->addText('tarif', 'Tarifní sazba:')\r\n\t\t\t\t->setRequired('Uveďte tarifní hodinovou sazbu.')\r\n\t\t\t\t->setAttribute('class', 'cislo')\r\n\t\t\t\t->addFilter(array('Nette\\Forms\\Controls\\TextBase', 'filterFloat'))\r\n\t\t\t\t\t->controlPrototype->autocomplete('off')\r\n\t\t\t\t->addCondition($form::FILLED)\r\n\t\t\t\t\t\t->addRule($form::FLOAT, 'Hodnota musí být celé nebo reálné číslo.');\r\n\t\t\r\n\t\t$form->addText('hodnota', 'Kalkulační hodnota:')\r\n\t\t\t\t->setRequired('Uveďte kalkulační hodnotu tarifu.')\r\n\t\t\t\t->setAttribute('class', 'cislo')\r\n\t\t\t\t->addFilter(array('Nette\\Forms\\Controls\\TextBase', 'filterFloat'))\r\n\t\t\t\t\t->controlPrototype->autocomplete('off')\r\n\t\t\t\t->addCondition($form::FILLED)\r\n\t\t\t\t\t\t->addRule($form::FLOAT, 'Hodnota musí být celé nebo reálné číslo.');\r\n\r\n\t\t$form->addHidden('id_set_tarifu');\r\n\t\t$form->addHidden('id_typy_tarifu');\r\n\r\n\t\t$form->addSubmit('save', 'Uložit')->setAttribute('class', 'default');\r\n\t\t$form->addSubmit('cancel', 'Storno')->setValidationScope(FALSE);\r\n\t\t$form->onSuccess[] = callback($this, 'rateFormSubmitted');\r\n\r\n\t\t$form->addProtection(self::MESS_PROTECT);\r\n\t\treturn $form;\r\n\t}", "private function initImportBookmarksForm()\n\t{\n\t\tglobal $lng, $ilCtrl, $ilUser;\n\t\t\n\t\tif (!$this->tree->isInTree($this->id))\n\t\t{\n\t\t\t$this->ctrl->setParameter($this, 'bmf_id', '');\n\t\t\t$this->ctrl->redirect($this);\n\t\t}\n\n\t\tinclude_once 'Services/Form/classes/class.ilPropertyFormGUI.php';\n\t\t$form = new ilPropertyFormGUI();\n\t\t$form->setTopAnchor(\"bookmark_top\");\n\t\t$form->setTitle($lng->txt(\"bkm_import\"));\n\t\t\n\t\t$fi = new ilFileInputGUI($lng->txt(\"file_add\"), \"bkmfile\");\n\t\t$fi->setRequired(true);\n\t\t$form->addItem($fi);\n\n\t\t$form->addCommandButton(\"importFile\", $lng->txt('import'));\n\t\t$form->addCommandButton('cancel', $lng->txt('cancel'));\n\t\t\n\t\treturn $form;\n\t}", "protected function form()\n {\n $form = new Form(new Banner);\n\n $form->text('title', 'Title');\n $form->image('image', 'Image')->rules('required')->move('images/banners');\n $form->switch('status', 'Published')->default(1);\n\n $form->footer(function ($footer) {\n // disable `View` checkbox\n $footer->disableViewCheck();\n\n // disable `Continue editing` checkbox\n $footer->disableEditingCheck();\n\n // disable `Continue Creating` checkbox\n $footer->disableCreatingCheck();\n\n });\n return $form;\n }", "public function form( $instance ) {\n\t\t$args = array_merge( $this->defaults, $instance );\n\t\textract( $args );\n\t\tinclude( 'templates/pblw-requirements-widget-settings.php' );\n }", "public function createComponentDateRangeForm() {\n\t\t$form = new NAppForm();\n\t\t\n\t\t$form->addGroup();\n\t\t$form->addText('from', 'Zobrazovať projekty od')\n\t\t\t\t->addRule(NForm::FILLED, 'Vyplňte od akého dátumu sa majú projekty zobrazovať.')\n\t\t\t\t->getControlPrototype()\n\t\t\t\t\t->class('datepicker');\n\t\t$form->addText('to', 'Zobrazovať projekty do')\n\t\t\t\t->addRule(NForm::FILLED, 'Vyplňte do akého dátumu sa majú projekty zobrazovať.')\n\t\t\t\t->getControlPrototype()\n\t\t\t\t\t->class('datepicker');\n\t\t\n\t\t$form->setCurrentGroup(NULL);\n\t\n\t\t$form->addSubmit('process', 'Nastav')\n\t\t\t\t->getControlPrototype()\n\t\t\t\t->class('design');\n\t\t$form->addSubmit('set_default', 'Zobraz všekto')\n\t\t\t\t->setValidationScope(NULL)\n\t\t\t\t->getControlPrototype()\n\t\t\t\t->class('design');\n\t\t$form->addSubmit('back', 'Naspäť')\n\t\t\t\t->setValidationScope(NULL)\n\t\t\t\t->getControlPrototype()\n\t\t\t\t->class('design');\n\t\t\n\t\t$form->onSuccess[] = callback($this, 'dateRangeFormSubmit');\n\t\t\n\t\treturn $form;\n\t}", "public function form( $instance ) {\n\t\t// Set widget defaults\n\t\t$defaults = array(\n\t\t\t'title' => 'remoteok.io Jobs',\n\t\t\t'page_size' => 10\n\t\t);\n\t\t\n\t\t// Parse current settings with defaults\n extract( wp_parse_args( ( array ) $instance, $defaults ) ); ?>\n \n\t\t<p>\n\t\t\t<label for=\"<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>\"><?php _e( 'Widget Title', 'mtc_text' ); ?></label>\n\t\t\t<input class=\"widefat\" id=\"<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>\" name=\"<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>\" type=\"text\" value=\"<?php echo esc_attr( $title ); ?>\" />\n\t\t</p>\n\t\t<p>\n\t\t\t<label for=\"<?php echo esc_attr( $this->get_field_id( 'page_size' ) ); ?>\"><?php _e( 'Page Size:', 'mtc_text' ); ?></label>\n\t\t\t<input class=\"widefat\" id=\"<?php echo esc_attr( $this->get_field_id( 'page_size' ) ); ?>\" name=\"<?php echo esc_attr( $this->get_field_name( 'page_size' ) ); ?>\" type=\"number\" min=\"1\" value=\"<?php echo esc_attr( $page_size ); ?>\" />\n\t\t</p>\n\t<?php }", "public function form_footer_progress_block_html() {\n\n\t\t$progress_style = ! empty( $this->form_data['settings']['conversational_forms_progress_bar'] ) ? $this->form_data['settings']['conversational_forms_progress_bar'] : '';\n\n\t\t?>\n\t\t<div class=\"wpforms-conversational-form-footer-progress\">\n\t\t\t<div class=\"wpforms-conversational-form-footer-progress-status\">\n\t\t\t\t<?php\n\t\t\t\tif ( 'proportion' === $progress_style ) {\n\t\t\t\t\t$this->form_footer_progress_status_proportion_html();\n\t\t\t\t} else {\n\t\t\t\t\t$this->form_footer_progress_status_percentage_html();\n\t\t\t\t}\n\t\t\t\t?>\n\t\t\t</div>\n\t\t\t<div class=\"wpforms-conversational-form-footer-progress-bar\">\n\t\t\t\t<div class=\"wpforms-conversational-form-footer-progress-completed\"></div>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t}", "protected function form()\n {\n $form = new Form(new Good);\n $form->text('name', __('名称'))->rules('required');\n $form->decimal('amount', __('价格'))->default(0.00)->rules('required');\n $form->text('unit', __('单位'))->rules('required');\n $form->image('list_img', __('缩略图(320*320)'))->creationRules('required');\n $form->hasMany('goodsimgs', __('轮播图(640*640)'),function(Form\\NestedForm $form){\n $form->image('img',__('轮播图'))->creationRules('required');\n });\n $form->kindeditor('describe', __('描述'));\n // 去掉`查看`checkbox\n $form->disableViewCheck();\n // 去掉`继续编辑`checkbox\n $form->disableEditingCheck();\n // 去掉`继续创建`checkbox\n $form->disableCreatingCheck();\n return $form;\n }", "protected function form()\n {\n $form = new Form(new BuSong);\n\n// $form->number('serialid', __('Serialid'));\n $form->text('svrkey', __('svrkey'));\n $form->text('songname', __('歌名'));\n $form->text('singer', __('歌星'));\n $form->select('langtype', __('语种'))->options([0=>'国语',1=>'粤语',2=>'英语',3=>'台语',4=>'日语',5=>'韩语',6=>'不详']);\n $form->text('remarks', __('备注'));\n $form->datetime('createdate', __('创建时间'))->default(date('Y-m-d H:i:s'));\n $form->select('ischeck', __('是否检查'))->options([0=>'否',1=>'是']);\n $form->select('buState', __('状态'))->options([0=>'新增',1=>'处理中',2=>'完成',3=>'歌曲信息出错',4=>'取消无法处理',5=>'已上传',6=>'彻底删除']);\n $form->text('musicdbpk', __('musicdbpk'));\n $form->text('optionRemarks', __('操作日志'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Information);\n \n \n\n $form->text('name', __('项目名称'))->autofocus()->placeholder('例:上汽大众新能源汽车工厂项目')->required();\n $form->text('industry', __('行业类别'))->required();\n $form->currency('investment', __('投资金额'))->icon('fa-usd')->required(); \n $form->text('cont_name', __('资方联系人'))->placeholder('选填内容,可为空');\n $form->text('cont_phone', __('资方联系方式'))->placeholder('选填内容,可为空');\n $form->text('staff_name', __('工作人员姓名'));\n $form->text('staff_phone', __('工作人员电话'));\n $form->hidden('adminuser_id', __('adminuser_id'))->value(Admin::user()->id);\n $form->textarea('content', __('项目情况'))->required()->placeholder('请填写项目介绍(包括项目投资额度、产业类别等)、项目需求(如土地、排放、能耗等)、谈判进度等......');\n\n\n\n $form->tools(function (Form\\Tools $tools) {\n\n // 去掉`列表`按钮\n $tools->disableList();\n\n });\n\n $form->footer(function ($footer) {\n\n // 去掉`重置`按钮\n $footer->disableReset();\n\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n\n // 去掉`继续编辑`checkbox\n $footer->disableEditingCheck();\n\n // 去掉`继续创建`checkbox\n $footer->disableCreatingCheck();\n\n });\n\n $form->setAction('../admin/myinfo');\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new LotteryCode());\n\n $form->text('code', __('Code'));\n $form->number('batch_num', __('Batch num'));\n $form->text('prizes_name', __('Prizes name'));\n $form->datetime('valid_period', __('Valid period'))->default(date('Y-m-d H:i:s'));\n $form->datetime('prizes_time', __('Prizes time'))->default(date('Y-m-d H:i:s'));\n $form->text('operator', __('Operator'));\n $form->switch('award_status', __('Award status'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new gameLog());\n\n $form->text('onlyId', ___('OnlyId'));\n $form->number('bigBlindIndex', ___('BigBlindIndex'));\n $form->number('gameNums', ___('GameNums'));\n $form->number('smallBlindIndex', ___('SmallBlindIndex'));\n $form->textarea('tableCards', ___('TableCards'));\n $form->number('tableId', ___('TableId'));\n $form->textarea('tableSeat1Str1', ___('TableSeat1Str1'));\n $form->textarea('tableSeat1Str2', ___('TableSeat1Str2'));\n $form->textarea('tableSeat1Str3', ___('TableSeat1Str3'));\n $form->textarea('tableSeat1Str4', ___('TableSeat1Str4'));\n $form->textarea('tableSeat1Str5', ___('TableSeat1Str5'));\n $form->textarea('tableSeat1Str6', ___('TableSeat1Str6'));\n $form->textarea('tableSeat1Str7', ___('TableSeat1Str7'));\n $form->number('time', ___('Time'));\n\n return $form;\n }" ]
[ "0.77083474", "0.6770756", "0.6582365", "0.62868875", "0.6283344", "0.6056346", "0.60378045", "0.60249215", "0.595588", "0.5948091", "0.57597005", "0.5717113", "0.57070196", "0.5703448", "0.5602351", "0.5581841", "0.5547263", "0.5502277", "0.5478038", "0.5475706", "0.5434613", "0.54240876", "0.539587", "0.53778464", "0.5359825", "0.53590983", "0.5339037", "0.5321328", "0.5318948", "0.5309997", "0.5308763", "0.5306407", "0.52934027", "0.52694947", "0.52674586", "0.5263945", "0.52618235", "0.52587044", "0.5246304", "0.5233099", "0.52288944", "0.5221508", "0.52138895", "0.5209269", "0.52089834", "0.5206813", "0.52010256", "0.5186561", "0.5182961", "0.51678663", "0.51643145", "0.5163652", "0.51619506", "0.516182", "0.5145591", "0.5139777", "0.5136229", "0.5124329", "0.5122386", "0.5115804", "0.51133114", "0.5109674", "0.5103184", "0.5088838", "0.5088361", "0.50863606", "0.50861907", "0.5084361", "0.50782883", "0.5077335", "0.5075169", "0.5073754", "0.50718427", "0.5070721", "0.5067243", "0.50662994", "0.5050853", "0.50462085", "0.5045296", "0.50337905", "0.50323945", "0.5032061", "0.5029078", "0.50278485", "0.5021534", "0.50132006", "0.50122815", "0.5006161", "0.5001968", "0.49970314", "0.49937168", "0.49930912", "0.4989337", "0.49843767", "0.49839061", "0.49812287", "0.49774504", "0.49765617", "0.49743992", "0.49743298" ]
0.76451546
1
Builds the form that define cell properties of your progress bar
function buildForm() { $this->buildTabs(); // tab caption $this->addElement('header', null, 'Progress2 Generator - Control Panel: cell properties'); $this->addElement('text', 'cellid', 'Id mask:', array('size' => 32)); $this->addElement('text', 'cellclass', 'CSS class:', array('size' => 32)); $cellvalue['min'] =& $this->createElement('text', 'min', 'minimum', array('size' => 4)); $cellvalue['max'] =& $this->createElement('text', 'max', 'maximum', array('size' => 4)); $cellvalue['inc'] =& $this->createElement('text', 'inc', 'increment', array('size' => 4)); $this->addGroup($cellvalue, 'cellvalue', 'Value:', ' '); $cellsize['width'] =& $this->createElement('text', 'width', 'width', array('size' => 4)); $cellsize['height'] =& $this->createElement('text', 'height', 'height', array('size' => 4)); $cellsize['spacing'] =& $this->createElement('text', 'spacing', 'spacing', array('size' => 2)); $cellsize['count'] =& $this->createElement('text', 'count', 'count', array('size' => 2)); $this->addGroup($cellsize, 'cellsize', 'Size:', ' '); $cellcolor['active'] =& $this->createElement('text', 'active', 'active', array('size' => 7)); $cellcolor['inactive'] =& $this->createElement('text', 'inactive', 'inactive', array('size' => 7)); $cellcolor['bgcolor'] =& $this->createElement('text', 'bgcolor', 'background', array('size' => 7)); $this->addGroup($cellcolor, 'cellcolor', 'Color:', ' '); $cellfont['family'] =& $this->createElement('text', 'family', 'family', array('size' => 32)); $cellfont['size'] =& $this->createElement('text', 'size', 'size', array('size' => 2)); $cellfont['color'] =& $this->createElement('text', 'color', 'color', array('size' => 7)); $this->addGroup($cellfont, 'cellfont', 'Font:', ' '); // Buttons of the wizard to do the job $this->buildButtons(array('apply','process')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: main properties');\r\n\r\n $shape[] =& $this->createElement('radio', null, null, 'Horizontal', '1');\r\n $shape[] =& $this->createElement('radio', null, null, 'Vertical', '2');\r\n $this->addGroup($shape, 'shape', 'Shape:');\r\n\r\n $way[] =& $this->createElement('radio', null, null, 'Natural', 'natural');\r\n $way[] =& $this->createElement('radio', null, null, 'Reverse', 'reverse');\r\n $this->addGroup($way, 'way', 'Direction:');\r\n\r\n $autosize[] =& $this->createElement('radio', null, null, 'Yes', true);\r\n $autosize[] =& $this->createElement('radio', null, null, 'No', false);\r\n $this->addGroup($autosize, 'autosize', 'Best size:');\r\n\r\n $psize['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 4));\r\n $psize['height'] =& $this->createElement('text',\r\n 'height', 'height',\r\n array('size' => 4));\r\n $psize['left'] =& $this->createElement('text',\r\n 'left', 'left',\r\n array('size' => 4));\r\n $psize['top'] =& $this->createElement('text',\r\n 'top', 'top',\r\n array('size' => 4));\r\n $psize['position'] =& $this->createElement('text',\r\n 'position', 'position',\r\n array('disabled' => 'true'));\r\n $psize['bgcolor'] =& $this->createElement('text',\r\n 'bgcolor', 'bgcolor',\r\n array('size' => 7));\r\n $this->addGroup($psize, 'progresssize',\r\n 'Size, position and color:', ' ');\r\n\r\n $this->addElement('text', 'rAnimSpeed',\r\n array('Animation speed :',\r\n '(0-1000 ; 0:fast, 1000:slow)'));\r\n $this->addRule('rAnimSpeed',\r\n 'Should be between 0 and 1000',\r\n 'rangelength', array(0,1000), 'client');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('back','apply','process'));\r\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: run demo');\r\n\r\n $this->addElement('static', 'progressBar',\r\n 'Your progress meter looks like:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('reset','process'));\r\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: string properties');\r\n\r\n $stringpainted[] =& $this->createElement('radio', null, null, 'Yes', true);\r\n $stringpainted[] =& $this->createElement('radio', null, null, 'No', false);\r\n $this->addGroup($stringpainted, 'stringpainted', 'Render a custom string:');\r\n\r\n $this->addElement('text', 'stringid', 'Id:', array('size' => 32));\r\n $this->addElement('text', 'stringclass', 'CSS class:', array('size' => 32));\r\n $this->addElement('text', 'stringvalue', 'Content:', array('size' => 32));\r\n\r\n $stringsize['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 4));\r\n $stringsize['height'] =& $this->createElement('text',\r\n 'height', 'height',\r\n array('size' => 4));\r\n $stringsize['left'] =& $this->createElement('text',\r\n 'left', 'left',\r\n array('size' => 4));\r\n $stringsize['top'] =& $this->createElement('text',\r\n 'top', 'top',\r\n array('size' => 4));\r\n $stringsize['bgcolor'] =& $this->createElement('text',\r\n 'bgcolor', 'bgcolor',\r\n array('size' => 7));\r\n $this->addGroup($stringsize, 'stringsize', 'Size, position and color:', ' ');\r\n\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Left', 'left');\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Right', 'right');\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Top', 'top');\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Bottom', 'bottom');\r\n $this->addGroup($stringvalign, 'stringvalign', 'Vertical alignment:');\r\n\r\n $stringalign[] =& $this->createElement('radio', null, null,\r\n 'Left', 'left');\r\n $stringalign[] =& $this->createElement('radio', null, null,\r\n 'Right', 'right');\r\n $stringalign[] =& $this->createElement('radio', null, null,\r\n 'Center', 'center');\r\n $this->addGroup($stringalign, 'stringalign', 'Horizontal alignment:');\r\n\r\n $stringfont['family'] =& $this->createElement('text',\r\n 'family', 'family',\r\n array('size' => 40));\r\n $stringfont['size'] =& $this->createElement('text',\r\n 'size', 'size',\r\n array('size' => 2));\r\n $stringfont['color'] =& $this->createElement('text',\r\n 'color', 'color',\r\n array('size' => 7));\r\n $this->addGroup($stringfont, 'stringfont', 'Font:', ' ');\r\n\r\n $stringweight[] =& $this->createElement('radio', null, null,\r\n 'normal', 'normal');\r\n $stringweight[] =& $this->createElement('radio', null, null,\r\n 'Bold', 'bold');\r\n $this->addGroup($stringweight, 'stringweight', 'Font weight:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('apply','process'));\r\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: border properties');\r\n\r\n $borderpainted[] =& $this->createElement('radio', null, null, 'Yes', true);\r\n $borderpainted[] =& $this->createElement('radio', null, null, 'No', false);\r\n $this->addGroup($borderpainted, 'borderpainted', 'Display the border:');\r\n\r\n $this->addElement('text', 'borderclass', 'CSS class:', array('size' => 32));\r\n\r\n $borderstyle['style'] =& $this->createElement('select',\r\n 'style', 'style',\r\n array('solid' => 'Solid',\r\n 'dashed' => 'Dashed',\r\n 'dotted' => 'Dotted',\r\n 'inset' => 'Inset',\r\n 'outset' => 'Outset'));\r\n $borderstyle['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 2));\r\n $borderstyle['color'] =& $this->createElement('text',\r\n 'color', 'color',\r\n array('size' => 7));\r\n $this->addGroup($borderstyle, 'borderstyle', null, ' ');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('apply','process'));\r\n }", "public function build_table()\n {\n if (count($this->properties) > 0)\n {\n foreach ($this->properties as $property => $values)\n {\n $contents = array();\n $contents[] = $property;\n \n if (! is_array($values))\n {\n $values = array($values);\n }\n \n if (count($values) > 0)\n {\n foreach ($values as $value)\n {\n $contents[] = $value;\n }\n }\n \n $this->addRow($contents);\n }\n \n $this->setColAttributes(0, array('class' => 'header'));\n }\n else\n {\n $contents = array();\n $contents[] = Translation::get('NoResults', null, Utilities::COMMON_LIBRARIES);\n $row = $this->addRow($contents);\n $this->setCellAttributes($row, 0, 'style=\"font-style: italic;text-align:center;\" colspan=2');\n }\n }", "function formProperties() {\n\t\tglobal $l_we_class;\n\n\t\t// Create table\n\t\t$_content = new we_htmlTable(array(\"border\" => 0, \"cellpadding\" => 0, \"cellspacing\" => 0), 12, 5);\n\n\t\t// Row 1\n\t\t$_content->setCol(0, 0, null, $this->formInput2(155, \"width\", 10, \"attrib\", 'onChange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\t\t$_content->setCol(0, 2, null, $this->formInput2(155, \"height\", 10, \"attrib\", 'onChange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\t\t$_content->setCol(0, 4, null, $this->formInput2(155, \"border\", 10, \"attrib\", 'onChange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\n\t\t$_content->setCol(0, 1, null, getPixel(18, 1));\n\t\t$_content->setCol(0, 3, null, getPixel(18, 1));\n\n\t\t// Row 2\n\t\t$_content->setCol(1, 0, array(\"colspan\" => 5), getPixel(1, 5));\n\n\t\t// Row 3\n\t\t$_content->setCol(2, 0, null, $this->formInput2(155, \"align\", 10, \"attrib\", 'onChange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\t\t$_content->setCol(2, 2, null, $this->formInput2(155, \"hspace\", 10, \"attrib\", 'onChange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\t\t$_content->setCol(2, 4, null, $this->formInput2(155, \"vspace\", 10, \"attrib\", 'onChange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\n\t\t$_content->setCol(2, 1, null, getPixel(18, 1));\n\t\t$_content->setCol(2, 3, null, getPixel(18, 1));\n\n\t\t// Row 4\n\t\t$_content->setCol(3, 0, array(\"colspan\" => 5), getPixel(1, 5));\n\n\t\t// Row 5\n\t\t$_content->setCol(4, 0, array(\"colspan\" => 3), $this->formInput2(328, \"alt\", 23, \"attrib\", 'onChange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\t\t$_content->setCol(4, 3, null, getPixel(18, 1));\n\t\t$_content->setCol(4, 4, null, $this->formInput2(155, \"name\", 10, \"attrib\", 'onChange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\n\t\t// Row 6\n\t\t$_content->setCol(5, 0, array(\"colspan\" => 5), getPixel(1, 5));\n\n\t\t//\tRow 7\n\t\t$_content->setCol(6, 0, array(\"colspan\" => 3), $this->formInput2(328, \"title\", 23, \"attrib\", ($this->getElement(\"useMetaTitle\") == 1 ? \"readonly='readonly'\" : \"\") . '\" onChange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\n\t\t$_content->setCol(6, 3, null, getPixel(18, 1));\n\t\t\t$_titleField = \"we_\".$this->Name.\"_attrib[title]\";\n\t\t\t$_metaTitleField = \"we_\".$this->Name.\"_txt[Title]\";\n\t\t\t$useMetaTitle = \"we_\".$this->Name.\"_txt[useMetaTitle]\";\n\t\t//\tdisable field 'title' when checked or not.\n\t\t$_content->setCol(6, 4, array(\"valign\" => \"bottom\"), we_forms::checkboxWithHidden($this->getElement(\"useMetaTitle\"), $useMetaTitle, $l_we_class[\"use_meta_title\"], false, \"defaultfont\", \"if(this.checked){ document.forms[0]['$_titleField'].setAttribute('readonly', 'readonly', 'false'); document.forms[0]['$_titleField'].value = ''; }else{ document.forms[0]['$_titleField'].removeAttribute('readonly', 'false');}_EditorFrame.setEditorIsHot(true);\"));\n\n\t\t// longdesc should be available in images.\n\t\t// check if longdesc is set and get path\n\t\t$longdesc_id_name = \"we_\".$this->Name.\"_attrib[longdescid]\";\n\t\t$longdesc_text_name = 'tmp_longdesc';\n\t\t$longdesc_id = $this->getElement('longdescid');\n\t\tif($longdesc_id){\n $longdescPath = id_to_path($longdesc_id);\n\t\t} else {\n $longdescPath = '';\n\t\t}\n\n\t\t$we_button = new we_button();\n\n\t\t$yuiSuggest =& weSuggest::getInstance();\n\t\t$yuiSuggest->setAcId(\"LonDesc\");\n\t\t$yuiSuggest->setContentType(\"folder,text/webEdition,text/html\");\n\t\t$yuiSuggest->setInput($longdesc_text_name,$longdescPath);\n\t\t$yuiSuggest->setLabel($l_we_class[\"longdesc_text\"]);\n\t\t$yuiSuggest->setMaxResults(20);\n\t\t$yuiSuggest->setMayBeEmpty(1);\n\t\t$yuiSuggest->setResult($longdesc_id_name, $longdesc_id);\n\t\t$yuiSuggest->setSelector(\"Docselector\");\n\t\t$yuiSuggest->setWidth(328);\n\t\t$yuiSuggest->setSelectButton($we_button->create_button(\"select\", \"javascript:we_cmd('openDocselector',document.we_form.elements['$longdesc_id_name'].value,'\" . FILE_TABLE . \"','document.we_form.elements[\\\\'$longdesc_id_name\\\\'].value','document.we_form.elements[\\\\'$longdesc_text_name\\\\'].value','opener._EditorFrame.setEditorIsHot(true);opener.top.we_cmd(\\'reload_editpage\\');','\".session_id().\"','','text/webedition,text/plain,text/html',1)\"));\n\t\t$yuiSuggest->setTrashButton($we_button->create_button('image:btn_function_trash',\"javascript:document.we_form.elements['$longdesc_id_name'].value='-1';document.we_form.elements['$longdesc_text_name'].value='';_EditorFrame.setEditorIsHot(true); YAHOO.autocoml.setValidById('\".$yuiSuggest->getInputId().\"')\"));\n\t\t$_content->setCol(7, 0, array(\"colspan\" => 5), getPixel(1, 5));\n\t\t$_content->setCol(8, 0, array(\"valign\" => \"bottom\", 'colspan' => 5), $yuiSuggest->getYuiFiles() . $yuiSuggest->getHTML() . $yuiSuggest->getYuiCode());\n\n\t\t// Return HTML\n\t\treturn $_content->getHtmlCode();\n \t}", "public function buildForm()\n {\n $this\n ->addMeasureList()\n ->addAscendingList()\n ->addTitles(['class' => 'indicator_title_title_narrative', 'narrative_true' => true])\n ->addDescriptions(['class' => 'indicator_description_title_narrative'])\n ->addCollection('reference', 'Activity\\Reference', 'reference', [], trans('elementForm.reference'))\n ->addAddMoreButton('add_reference', 'reference')\n ->addBaselines()\n ->addPeriods()\n ->addAddMoreButton('add_period', 'period')\n ->addRemoveThisButton('remove_indicator');\n }", "protected function buildForm()\n {\n $this->form = Yii::createObject(array_merge([\n 'scenario' => $this->scenario,\n 'parent_id' => $this->parent_id,\n 'parentTariff' => $this->parentTariff,\n 'tariff' => $this->tariff,\n ], $this->getFormOptions()));\n }", "function formProperties(){\n\t\t// Create table\n\t\t$_content = new we_html_table(array('class' => 'default propertydualtable'), 5, 3);\n\t\t$row = 0;\n\t\t// Row 1\n\t\t$_content->setCol($row, 0, null, $this->formInputInfo2(155, 'width', 10, 'attrib', 'onchange=\"_EditorFrame.setEditorIsHot(true);\"', \"origwidth\"));\n\t\t$_content->setCol($row, 1, null, $this->formInputInfo2(155, 'height', 10, 'attrib', 'onchange=\"_EditorFrame.setEditorIsHot(true);\"', \"origheight\"));\n\t\t$_content->setCol($row++, 2, null, $this->formInput2(155, 'border', 10, 'attrib', 'onchange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\n\n\t\t// Row 2\n\t\t$_content->setCol($row, 0, null, $this->formInput2(155, 'align', 10, 'attrib', 'onchange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\t\t$_content->setCol($row, 1, null, $this->formInput2(155, 'hspace', 10, 'attrib', 'onchange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\t\t$_content->setCol($row++, 2, null, $this->formInput2(155, 'vspace', 10, 'attrib', 'onchange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\n\n\t\t// Row 3\n\t\t$_content->setCol($row, 0, array('colspan' => 3), $this->formInput2(328, 'alt', 23, 'attrib', 'onchange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\t\t$_content->setCol($row++, 2, null, $this->formInput2(155, 'name', 10, 'attrib', 'onchange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\n\n\t\t//\tRow 4\n\t\t$_content->setCol($row, 0, array('colspan' => 3), $this->formInput2(328, 'title', 23, 'attrib', ($this->getElement('useMetaTitle') == 1 ? \"readonly='readonly'\" : \"\") . '\" onchange=\"_EditorFrame.setEditorIsHot(true);\"', 'Title'));\n\n\t\t$_titleField = 'we_' . $this->Name . '_attrib[title]';\n\t\t$_metaTitleField = 'we_' . $this->Name . '_txt[Title]';\n\t\t$useMetaTitle = 'we_' . $this->Name . '_attrib[useMetaTitle]';\n\t\t//\tdisable field 'title' when checked or not. on checked true: document.forms[0]['$_titleField'].value='$this->getElement('Title')' and onchecked false: document.forms[0]['$_titleField'].value='' added to fix bug #5814\n\t\t$_content->setCol($row++, 2, array('style' => 'vertical-align:bottom'), we_html_forms::checkboxWithHidden($this->getElement('useMetaTitle'), $useMetaTitle, g_l('weClass', '[use_meta_title]'), false, 'defaultfont', \"if(this.checked){ document.forms[0]['\" . $_titleField . \"'].setAttribute('readonly', 'readonly', 'false'); document.forms[0]['\" . $_titleField . \"'].value = '\" . $this->getElement('Title') . \"'; }else{ document.forms[0]['\" . $_titleField . \"'].removeAttribute('readonly', 'false'); document.forms[0]['\" . $_titleField . \"'].value='';}_EditorFrame.setEditorIsHot(true);\"));\n\n\t\t// longdesc should be available in images.\n\t\t// check if longdesc is set and get path\n\t\t$longdesc_id_name = 'we_' . $this->Name . '_attrib[longdescid]';\n\t\t$longdesc_text_name = 'tmp_longdesc';\n\t\t$longdesc_id = $this->getElement('longdescid');\n\t\t$longdescPath = ($longdesc_id ? id_to_path($longdesc_id) : '');\n\n\t\t$yuiSuggest = & weSuggest::getInstance();\n\t\t$yuiSuggest->setAcId('LonDesc');\n\t\t$yuiSuggest->setContentType('folder,' . we_base_ContentTypes::WEDOCUMENT . ',' . we_base_ContentTypes::HTML);\n\t\t$yuiSuggest->setInput($longdesc_text_name, $longdescPath);\n\t\t$yuiSuggest->setLabel(g_l('weClass', '[longdesc_text]'));\n\t\t$yuiSuggest->setMaxResults(20);\n\t\t$yuiSuggest->setMayBeEmpty(1);\n\t\t$yuiSuggest->setResult($longdesc_id_name, $longdesc_id);\n\t\t$yuiSuggest->setSelector(weSuggest::DocSelector);\n\t\t$yuiSuggest->setWidth(328);\n\t\t$cmd1 = \"document.we_form.elements['\" . $longdesc_id_name . \"'].value\";\n\n\t\t$yuiSuggest->setSelectButton(we_html_button::create_button(we_html_button::SELECT, \"javascript:we_cmd('we_selector_image',\" . $cmd1 . \",'\" . FILE_TABLE . \"','\" . we_base_request::encCmd($cmd1) . \"','\" . we_base_request::encCmd(\"document.we_form.elements['\" . $longdesc_text_name . \"'].value\") . \"','\" . we_base_request::encCmd(\"opener._EditorFrame.setEditorIsHot(true);opener.top.we_cmd('reload_editpage');\") . \"','','','\" . we_base_ContentTypes::WEDOCUMENT . \",\" . we_base_ContentTypes::TEXT . \",\" . we_base_ContentTypes::HTML . \"',1)\"));\n\t\t$yuiSuggest->setTrashButton(we_html_button::create_button(we_html_button::TRASH, \"javascript:document.we_form.elements['\" . $longdesc_id_name . \"'].value='-1';document.we_form.elements['\" . $longdesc_text_name . \"'].value='';_EditorFrame.setEditorIsHot(true); YAHOO.autocoml.setValidById('\" . $yuiSuggest->getInputId() . \"')\"));\n\t\t$_content->setCol($row, 0, array('style' => 'vertical-align:bottom', 'colspan' => 5), $yuiSuggest->getHTML() . $yuiSuggest->getYuiJs());\n\n\t\t// Return HTML\n\t\treturn $_content->getHtml();\n\t}", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: save PHP/CSS code');\r\n\r\n $code[] =& $this->createElement('checkbox', 'P', null, 'PHP');\r\n $code[] =& $this->createElement('checkbox', 'C', null, 'CSS');\r\n $this->addGroup($code, 'phpcss', 'PHP and/or StyleSheet source code:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('next','apply'));\r\n }", "function value_form(&$form, &$form_state) {\n $form['value']['column'] = array(\n '#type' => 'textfield',\n '#title' => t('Property column'),\n '#default_value' => $this->value['column'],\n '#description' => t('Name of the database column to use in the comparison.'),\n );\n\n // We know which properties are available, so we can show a select box.\n if (isset($this->definition['available_properties'])) {\n $form['value']['column']['#type'] = 'select';\n $form['value']['column']['#options'] = array_combine($this->definition['available_properties'], $this->definition['available_properties']);\n }\n\n $form['value']['value'] = array(\n '#type' => 'textfield',\n '#title' => t('Value'),\n '#size' => 30,\n '#default_value' => $this->value['value'],\n '#process' => array('ctools_dependent_process'),\n '#dependency' => array('radio:options[operator]' => array_map('htmlentities', $this->operator_values(1))),\n );\n $form['value']['min'] = array(\n '#type' => 'textfield',\n '#title' => t('Min'),\n '#size' => 30,\n '#default_value' => $this->value['min'],\n '#process' => array('ctools_dependent_process'),\n '#dependency' => array('radio:options[operator]' => array_map('htmlentities', $this->operator_values(2))),\n );\n $form['value']['max'] = array(\n '#type' => 'textfield',\n '#title' => t('And max'),\n '#size' => 30,\n '#default_value' => $this->value['max'],\n '#process' => array('ctools_dependent_process'),\n '#dependency' => array('radio:options[operator]' => array_map('htmlentities', $this->operator_values(2))),\n );\n }", "protected function build()\n {\n $stockalign = new GtkAlignment(0, 0, 0, 0);\n $stockalign->add(\n GtkImage::new_from_stock(\n Gtk::STOCK_DIALOG_ERROR, Gtk::ICON_SIZE_DIALOG\n )\n );\n $this->pack_start($stockalign, false, true);\n\n\n $this->expander = new GtkExpander('');\n\n $this->message = new GtkLabel();\n $this->expander->set_label_widget($this->message);\n $this->message->set_selectable(true);\n $this->message->set_line_wrap(true);\n\n $this->userinfo = new GtkLabel();\n $this->userinfo->set_selectable(true);\n $this->userinfo->set_line_wrap(true);\n //FIXME: add scrolled window\n $this->expander->add($this->userinfo);\n\n $this->pack_start($this->expander);\n }", "public function buildForm() {\n\t\t$form = '';\n\n\t\tforeach ($this->_properties as $row) {\n\t\t\tif (!in_array($row['Field'],$this->_ignore)) {\n\t\t\t\t$elem = $this->buildElement($row);\n\t\t\t\t$row['Comment'] != '' ? $comment = $row['Comment'].\"<br />\": $comment = '';\n\t\t\t\t$this->_properties[$row['Field']]['HTMLElement']=$elem;\n\t\t\t\tif ($row['ElementType']=='hidden')\n\t\t\t\t\t$form .= $elem;\n\t\t\t\telse \n\t\t\t\t\t$form .= sprintf(\"<div class='formElem'>\\n%s<br />\\n%s\\n%s</div>\\n\",ucwords (str_replace (\"_\",\" \",$row['Field'])),$comment,$elem);\n\t\t\t}\n\t\t}\n\t\treturn $form;\n\t}", "function __construct()\n {\n parent::__construct();\n \n // creates the form\n $this->form = new TQuickForm('form_historicotrabalho');\n $this->form->class = 'tform'; // change CSS class\n \n $this->form->style = 'display: table;width:100%'; // change style\n \n // Define Título da página\n $this->form->setFormTitle('Banco de Horas - Lançamento de Escalas');\n // Inicía ferramentas auxiliares\n $fer = new TFerramentas(); // Ferramentas diversas\n $sicad = new TSicadDados(); // Ferramentas de acesso ao SICAD\n //Realiza definições iniciais de acesso\n $profile = TSession::getValue('profile'); //Profile da Conta do usuário\n if ($this->opm_operador==false) //Carrega OPM do usuário\n {\n //Confere se já foi carregado a OPM, senão carrega...ou se o ambiente for de desenvolvimento usa a OPM = 140\n $this->opm_operador = ($fer->is_dev()==true) ? 140 : $profile['unidade']['id'];\n }\n if (!$this->nivel_sistema || $this->config_load == false) //Carrega OPMs que tem acesso\n {\n $this->nivel_sistema = $fer->getnivel (get_class($this));//Verifica qual nível de acesso do usuário\n $this->listas = $sicad->get_OpmsRegiao($this->opm_operador);//Carregas as OPMs que o usuário administra\n $this->config = $fer->getConfig($this->sistema); //Busca o Nível de acesso que o usuário tem para a Classe\n $this->config_load = true; //Informa que configuração foi carregada\n }\n \n // Cria os Itens do Formulário\n $rgmilitar = new TEntry('rgmilitar');\n \n //Monta ComboBox com OPMs que o Operador pode ver\n //echo $this->nivel_sistema.'---'.$this->opm_operador;\n if ($this->nivel_sistema>=80) //Adm e Gestor\n {\n $criteria = null;\n }\n else if ($this->nivel_sistema>=50 ) //Nível Operador (carrega OPM e subOPMs)\n {\n $criteria = new TCriteria;\n //Se não há lista de OPM, carrega só a OPM do usuário\n $lista = ($this->listas['valores']!='') ? $this->listas['valores'] : $profile['unidade']['id'];\n $query = \"(SELECT DISTINCT id FROM g_geral.opm WHERE id IN (\".$lista.\"))\";\n $criteria->add (new TFilter ('id','IN',$query));\n }\n else if ($this->nivel_sistema<50) //nível de visitante (só a própria OPM)\n {\n $criteria = new TCriteria;\n $query = \"(SELECT DISTINCT id FROM g_geral.opm WHERE id IN (\".$this->opm_operador.\"))\";\n $criteria->add (new TFilter ('id','IN',$query));\n }\n $opm = new TDBCombo('opm','sicad','OPM','id','nome','nome',$criteria);\n \n $ativo = new TCombo('ativo');\n $lista_opm = new TSelect('lista_opm');\n $lista_slc = new TSelect('lista_slc');\n //Critério para os Turnos de Serviço (Deve-se excluir os ocultos e o item id=13)\n $criteria = new TCriteria; \n $criteria->add(new TFilter('oculto', '=', 'f'));\n $criteria->add(new TFilter('id', '!=', 13));\n $turno = new TDBCombo('turno','sicad','turnos','id','nome','nome',$criteria);\n \n $datainicial = new TDate('dataInicial');\n $datafinal = new TDate('dataFinal');\n $horaIncialOrdinario = new TEntry('horaInicialOrdinario');\n $opm_id_info = new TDBCombo('opm_id_info','sicad','OPM','id','sigla','sigla');\n $opm_info_atual = new TCombo('OPM_info_Atual');\n $diasExtra = new TEntry('diasExtra');\n $mesExtra = new TCombo('mesExtra');\n $anoExtra = new TCombo('anoExtra');\n $horaInicioExtra = new TEntry('horaInicioExtra');\n $horasTrabalhadas = new TEntry('horasTrabalhadas');\n $tipoExtra = new TCombo('tipoExtra');\n $afasta_id = new TDBCombo('afasta_id','sicad','afastamentos','id','nome','nome');\n $dtinicioaf = new TDate('dtinicioaf');\n $dtfimaf = new TDate('dtfimaf');\n $bgaf = new TEntry('bgaf');\n $anobgaf = new TEntry('anobgaf');\n \n //Formatar Itens\n $rgmilitar->setSize(80);\n $opm->setSize(300);\n $lista_opm->setSize(280,256);\n $lista_slc->setSize(280,256);\n $turno->setSize(200);\n $datainicial->setSize(80);\n $datafinal->setSize(80);\n $horaIncialOrdinario->setSize(50);\n $opm_id_info->setSize(150);\n $opm_info_atual->setSize(80);\n $diasExtra->setSize(200);\n $mesExtra->setSize(80);\n $anoExtra->setSize(80);\n $horaInicioExtra->setSize(50);\n $horasTrabalhadas->setSize(50);\n $tipoExtra->setSize(120);\n $afasta_id->setSize(150);\n $dtinicioaf->setSize(80);\n $dtfimaf->setSize(80);\n $bgaf->setSize(80);\n $anobgaf->setSize(80);\n $ativo->setSize(80);\n //Style\n $lista_opm->style = \"font-size: 12px;\";\n $lista_slc->style = \"font-size: 12px;\";\n\n //Mascaras\n $datainicial->setMask('dd-mm-yyyy');\n $datafinal->setMask('dd-mm-yyyy');\n $dtinicioaf->setMask('dd-mm-yyyy');\n $dtfimaf->setMask('dd-mm-yyyy');\n $horaIncialOrdinario->setMask('99:99');\n $horaInicioExtra->setMask('99:99');\n $horasTrabalhadas->setMask('99');\n\n //Dados\n $opm_info_atual->addItems($fer->lista_sim_nao());//($item);\n $opm_info_atual->setValue('N');\n $ativo->addItems($fer->lista_sim_nao());//($item);\n $ativo->setValue('N');\n //\n $item = array (\"S\"=>\"Remunerada\",\"N\"=>\"Administrativa\");\n $tipoExtra->addItems($item);\n $tipoExtra->setValue('N');\n //\n $fer = new TFerramentas;\n $mesExtra->addItems($fer->lista_meses());\n $anoExtra->addItems($fer->lista_anos());\n //Tips\n $rgmilitar->setTip('Preencha com o RG do Militar pretendido...');\n $opm->setTip('Selecione a OPM para que possa preencher o campo de Lista da OPM com os componentes da Unidade.');\n $lista_opm->setTip('Lista dos Militares pertencente à Unidade Selecionada acima.<br>'.\n 'Vale lembrar que esta lista é atualizada diáriamente, assim os que estão aqui reflete as listas do SICAD.<br>' .\n 'Outro ponto a se considerar é a possibilidade de selecionar vários PMs, para isso basta usar<br>'.\n 'as teclas Control (ctrl) ou shift (seta pra cima);');\n $lista_slc->setTip('Militares Selecionados. Todos que estão nesta lista serão afetados, quer por uma escala ou por afastamentos...');\n $turno->setTip('Selecione uma Escala conforme a necessidade.');\n $datainicial->setTip('Selecione a data inicial da Escala Ordinária.');\n $datafinal->setTip('Selecione a data final da Escala Ordinária');\n $horaIncialOrdinario->setTip('Informe a hora de inicio do primeiro turno da Escala Ordinária.');\n $opm_id_info->setTip('Selecione qual foi a OPM informante da Escala.<br>É útil quando o militar está prestando serviços em uma OPM diferente da sua.');\n $opm_info_atual->setTip('A unidade Informante é a Unidade Atual? Se SIM, irei substituir a unidade que por ventura está na ficha do militar pela que foi informada...');\n $diasExtra->setTip('Defina os dias que o militar trabalhou podendo ser:<br> - Um dia apenas (Ex: 1);<br>- Alguns dias separados por vírgula(Ex: 2,5,8);<br>- Um intervalo de dias ligados por traço (Ex: 2-10);<br>- Um misto de combinações (Ex: 1,3-5,8,15-25). ');\n $mesExtra->setTip('Mês que ocorreu o serviço extra.');\n $anoExtra->setTip('Ano que ocorreu o serviço extra.');\n $horaInicioExtra->setTip('Hora que o serviço extra iniciou.');\n $horasTrabalhadas->setTip('Quantas horas foram trabalhadas neste serviço extra.');\n $tipoExtra->setTip('Defina se a escala foi Administrativa (sem remuneração AC-4) ou Remunerada (com pagamento de AC-4).');\n $afasta_id->setTip('Qual tipo de afastamento o militar fez jus.');\n $dtinicioaf->setTip('Data inicial do afastamento.');\n $dtfimaf->setTip('Data final do afastamento.');\n $bgaf->setTip('Numero do BG onde foi publicado o afastamento(Opcional).');\n $anobgaf->setTip('Ano de publicação do BG de Afastamento (Opcional).');\n $ativo->setTip('Se desejar que os militares inativos façam parte da seleção, marque como SIM para seleciona-los.'.\n '<br>Caso troque esta opção, não haverá a limpeza dos já selecionados.');\n //Ações\n //$change_action = new TAction(array($this, 'onSelectOpm_old'));//Ação de Popular lista de PMs\n //$opm->setChangeAction($change_action);\n //$ativo->setChangeAction($change_action);\n \n //Controle de Nível\n if ($this->nivel_sistema<$this->config[$this->cfg_chg_opm])\n {\n $opm_id_info->setEditable(FALSE);\n $opm_info_atual->setEditable(FALSE);\n }\n //Botões\n //Seleciona PMs\n $addPM = new TButton('addPM');\n $addPM->setImage('fa:arrow-down black');\n $addPM->class = 'btn btn-primary btn-sm';\n $Action = new TAction(array($this, 'onSelectMilitar'));\n $addPM->setAction($Action);\n $addPM->setLabel('Seleciona');\n \n //Botão Gera Escala Ordinária\n $runOrd = new TButton('runOrd');\n $runOrd->setImage('fa:floppy-o red');\n $runOrd->class = 'btn btn-primary btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_ord]) ? new TAction(array($this, 'onGeraOrdinaria')) : new TAction(array($this, 'NoAcess'));\n $runOrd->setAction($Action);\n $runOrd->setLabel('Gera Escala');\n \n //Botão Gera Escala Extra\n $runExt = new TButton('runExt');\n $runExt->setImage('fa:floppy-o red');\n $runExt->class = 'btn btn-primary btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_ext]) ? new TAction(array($this, 'onGeraExtra')) : new TAction(array($this, 'NoAcess'));\n $runExt->setAction($Action);\n $runExt->setLabel('Gera Escala');\n \n //Botão Gera Afastamento\n $runAfa = new TButton('runAfa');\n $runAfa->setImage('fa:floppy-o red');\n $runAfa->class = 'btn btn-primary btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_afa]) ? new TAction(array($this, 'onGeraAfastamento')) : new TAction(array($this, 'NoAcess'));\n $runAfa->setAction($Action);\n $runAfa->setLabel('Gera Afastamento');\n \n //Botão Limpa Afastamento\n $runCls = new TButton('runCls');\n $runCls->setImage('fa:trash black');\n $runCls->class = 'btn btn-danger btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_cls_afa]) ? new TAction(array($this, 'onLimpaAfastamento')) : new TAction(array($this, 'NoAcess'));\n $runCls->setAction($Action);\n $runCls->setLabel('Limpa Afastamento');\n \n //Botão Verifica Escala\n $runVer = new TButton('runVer');\n $runVer->setImage('fa:eye black');\n $runVer->class = 'btn btn-info btn-sm';\n $Action = new TAction(array($this, 'onListaEscala'));\n $runVer->setAction($Action);\n $runVer->setLabel('Ver Escala');\n \n //Botão limpa Escalas\n $runLmp = new TButton('runLmp');\n $runLmp->setImage('fa:trash black');\n $runLmp->class = 'btn btn-danger btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_cls_esc]) ? new TAction(array($this, 'onLimpaEscala')) : new TAction(array($this, 'NoAcess'));\n $runLmp->setAction($Action);\n $runLmp->setLabel('Limpa Escala');\n \n //Botão Carrega OPM na Lista da OPM\n $runOpm = new TButton('runOpm');\n $runOpm->setImage('fa:retweet');\n $runOpm->class = 'btn btn-success btn-sm';\n $Action = new TAction(array($this, 'onSelectOpm_old'));\n $runOpm->setAction($Action);\n $runOpm->setLabel('Carrega OPM');\n \n $table = new TTable();\n $table-> border = '0';\n $table-> cellpadding = '4';\n $table-> style = 'border-collapse:collapse; text-align: center;';\n\n //Monta selecionador\n $hbox1 = new THBox;\n $hbox1->addRowSet( new TLabel('RG:'),$rgmilitar,$addPM,new TLabel('Unidade:'),$opm,new TLabel('Seleciona Inativos?'),$ativo,$runOpm);\n $frame1 = new TFrame;\n $frame1->setLegend('Selecione os PMs ou a OPM');\n $frame1->add($hbox1);\n //Monta Labels das tabelas de distribuição\n $title4 = new TLabel('Listagem da OPM');\n $title4->setFontSize(12);\n $title4->setFontFace('Arial');\n $title4->setFontColor('black');\n $title4->setFontStyle('b');\n \n $title3 = new TLabel('Comandos');\n $title3->setFontSize(12);\n $title3->setFontFace('Arial');\n $title3->setFontColor('black');\n $title3->setFontStyle('b');\n \n $title2 = new TLabel('PMs Selecionados');\n $title2->setFontSize(12);\n $title2->setFontFace('Arial');\n $title2->setFontColor('black');\n $title2->setFontStyle('b');\n \n $title1 = new TLabel('Gestão da Escala');\n $title1->setFontSize(12);\n $title1->setFontFace('Arial');\n $title1->setFontColor('black');\n $title1->setFontStyle('b');\n \n //Botões de Serviço\n $add = new TButton('add_opm');\n $del = new TButton('del_opm');\n $cls = new TButton('clear');\n $ret = new TButton('return');\n \n //Tabelas Auxiliares de Cadastro\n $table_ord = new TTable;//Escalas Ordinárias\n $table_ext = new TTable;//Escalas Extras\n $table_afa = new TTable;//Afastamentos\n\n //Cria no Notebook \n $notebook = new TNotebook(200, 220);\n // Crias as Abas no notebook\n $notebook->appendPage('Ordinária' , $table_ord);\n $notebook->appendPage('Extra' , $table_ext);\n $notebook->appendPage('Afastamento', $table_afa);\n\n //Itens: Escala Ordinária\n $table_ord->addRowSet(array(new TLabel('Escala'),$turno));\n $table_ord->addRowSet(array(new TLabel('De'),$datainicial,new TLabel('A'),$datafinal));\n $table_ord->addRowSet(array(new TLabel('Hora Inicial'),$horaIncialOrdinario));\n $table_ord->addRowSet(array(new TLabel('OPM Informante'),$opm_id_info));\n $table_ord->addRowSet(array(new TLabel('Usar Informante com Atual'),$opm_info_atual));\n $table_ord->addRowSet(array($runLmp,$runOrd));\n //Itens: Escala Extra\n $table_ext->addRowSet(array(new TLabel('Dias'),$diasExtra));\n $table_ext->addRowSet(array(new TLabel('Mês'),$mesExtra,new TLabel('Ano'),$anoExtra));\n $table_ext->addRowSet(array(new TLabel('Hr Início'),$horaInicioExtra,new TLabel('Hrs. Trab.'),$horasTrabalhadas));\n $table_ext->addRowSet(array(new TLabel('Tipo Escala'),$tipoExtra));\n $table_ext->addRowSet($runExt);\n //Itens: Afastamento\n $table_afa->addRowSet(array(new TLabel('Afastamento'),$afasta_id));\n $table_afa->addRowSet(array(new TLabel('De'),$dtinicioaf,new TLabel('A'),$dtfimaf));\n $table_afa->addRowSet(array(new TLabel('BG'),$bgaf,new TLabel('/'),$anobgaf));\n $table_afa->addRowSet(array($runCls,$runAfa));\n\n //Ações\n $add->setAction(new TAction(array($this, 'onAddPMSelect')));\n $del->setAction(new TAction(array($this, 'onDelPMSelect')));\n $cls->setAction(new TAction(array($this, 'onClearSelect')));\n $ret->setAction(new TAction(array($this, 'onReturn')));\n //Labels\n $add->setLabel('Adiciona');\n $del->setLabel('Remove');\n $cls->setLabel('Limpa');\n $ret->setLabel('Volta ao Gerenciador');\n //Icones\n $add->setImage('fa:plus green');\n $del->setImage('fa:minus red');\n $cls->setImage('fa:file-o black');\n $ret->setImage('fa:backward black');\n //Classes\n $ret->class = 'btn btn-warning';\n //PopUps\n if ($this->popAtivo)\n {\n $addPM->popover = 'true';\n $addPM->popside = 'top';\n $addPM->poptitle = 'Seleciona Militar';\n $addPM->popcontent = 'Clique aqui ou tecle ENTER para selecionar o militar.';\n //\n $add->popover = 'true';\n $add->popside = 'top';\n $add->poptitle = 'Adiciona Seleção de Militares';\n $add->popcontent = 'Adiciona o(s) Militar(es) selecionado(s) da caixa Lista da OPM.';\n //\n $del->popover = 'true';\n $del->popside = 'top';\n $del->poptitle = 'Remove Seleção de Militares';\n $del->popcontent = 'Remove o(s) Militar(es) selecionado(s) da caixa Selecionados.';\n //\n $cls->popover = 'true';\n $cls->popside = 'top';\n $cls->poptitle = 'Limpa toda Seleção de Militares';\n $cls->popcontent = 'Remove TODOS os Militares selecionados da caixa Selecionados.';\n //\n $ret->popover = 'true';\n $ret->popside = 'top';\n $ret->poptitle = 'Retorno à Tela de Gerenciamento';\n $ret->popcontent = 'Retorna para a Tela de Gerenciamento do Banco de Horas.<br>A lista e Militares já selecionados permanecerá até o fechamento do sistema.';\n //\n $runOrd->popover = 'true';\n $runOrd->popside = 'top';\n $runOrd->poptitle = 'Gera Escala Ordinária.';\n $runOrd->popcontent = 'São campos necessários:<br>- Turno;<br>- Data inicial e final;<br>- Hora de Início da Escala.';//.\n //\n $runExt->popover = 'true';\n $runExt->popside = 'top';\n $runExt->poptitle = 'Gera Escala Extra';\n $runExt->popcontent = 'São Campos necessários:<br>- Dias (preencher com um ou mais);<br>- Mês e Ano;<br>- Hora Início;<br>'.\n '- Horas Trabalhadas;<br>- Tipo Escala.';\n //\n $runCls->popover = 'true';\n $runCls->popside = 'top';\n $runCls->poptitle = 'Limpa Afastamentos e Restrições (apenas)';\n $runCls->popcontent = 'Use os campos acima como filtro.';\n //\n $runAfa->popover = 'true';\n $runAfa->popside = 'top';\n $runAfa->poptitle = 'Gera Afastamentos e Restrições';\n $runAfa->popcontent = 'São Campos necessários:<br>- Afastamento;<br>- O intervalo de datas.';\n //\n $runVer->popover = 'true';\n $runVer->popside = 'top';\n $runVer->poptitle = 'Verifica a Escala';\n $runVer->popcontent = 'É necessário escolher um militar (um apenas) quer no Campo Lista da OPM quer no Campo Selecionados.';\n //\n $runLmp->popover = 'true';\n $runLmp->popside = 'top';\n $runLmp->poptitle = 'Limpa as Escalas e Afastamentos';\n $runLmp->popcontent = 'Limpa Escalas (ordinária e Extra) e Afastamentos dos militares Selecionados e no intervalo de datas';\n \n $runOpm->popover = 'true';\n $runOpm->popside = 'top';\n $runOpm->poptitle = 'Carrega os militares da Unidade';\n $runOpm->popcontent = 'Carrega os Militares da unidade escolhida filtrando os ativos e inativos conforme se escolhe Sim ou Não no campo Seleciona inativos:';\n }\n //Tabela com Comandos\n $frame_tempo = new TFrame();\n $hboxc = new THBox;\n $hboxc->addRowSet($add);\n $hboxc->addRowSet($del);\n $hboxc->addRowSet($cls);\n $hboxc->addRowSet($runVer);\n $hboxc->addRowSet($ret);\n\n $frame1->add($hboxc);\n $frame1->style = \"width: 100%; display: table-cell; vertical-align: top; text-align: center;\";\n\n //Frame com Lista da OPM\n $vbox2 = new TVBox;\n $frame4 = new TFrame(260,330);\n $frame4->setLegend('Lista de Militares da OPM');\n $frame4->add($lista_opm);\n $frame4->style = \"width: 280px; display: table-cell; vertical-align: top;\";\n $vbox2->add($frame4);\n //Frame de Seleção\n $vbox4 = new TVBox;\n $frame6 = new TFrame(260,330);\n $frame6->setLegend('Militares Selecionados');\n $frame6->add($lista_slc);\n $frame6->style = \"width: 280px; display: table-cell; vertical-align: top;\";\n $vbox4->add($frame6);\n //Frame de Geração\n $vbox5 = new TVBox;\n $frame3 = new TFrame(280,330);\n $frame3->setLegend('Funções de Geração');\n $frame3->add($notebook);\n $frame3->style = \"width: 280px; display: table-cell; vertical-align: top;\";\n $vbox5->add($frame3);\n \n $frame2 = new TFrame;\n $frame2->style = \"width: 100%; display: table-cell; vertical-align: top;\";\n $frame2->add($vbox2);\n $frame2->add($vbox4);\n $frame2->add($vbox5);\n\n $this->form->setFields(array($rgmilitar,$opm,$addPM,$lista_opm,$lista_slc,$opm_info_atual,$opm_id_info,$turno,\n $datafinal,$datainicial,$dtinicioaf,$dtfimaf,$horaIncialOrdinario,$horaInicioExtra,$horasTrabalhadas,\n $diasExtra,$mesExtra,$anoExtra,$bgaf,$anobgaf,$tipoExtra,$afasta_id,$ativo,\n $add,$del,$cls,$ret,$runOrd,$runExt,$runAfa,$runCls,$runVer,$runLmp,$runOpm)); \n // vertical box container\n $container = new TVBox;\n $container->style = 'width: 90%';\n $container->add(new TXMLBreadCrumb('menu.xml', 'bdhManagerForm'));\n $container->add($frame1);\n //$container->add($frame_tempo);\n $container->add($frame2);\n $this->form->add($container);\n\n //parent::add($container);\n parent::add($this->form);\n if ($opm->getValue())\n {\n self::onSelectOpm_old(array('opm'=>$opm->getValue(),'ativo'=>$ativo->getValue()));\n }\n $lista_slc = TSession::getValue(__CLASS__.'_lista_slc');\n self::onLoadPMSelect();\n self::popula_escalas();\n\n }", "protected function definition_inner(&$mform) {\n\n $norepeats = $this->_customdata['norepeats']; // number of dimensions to display\n $descriptionopts = $this->_customdata['descriptionopts']; // wysiwyg fields options\n $current = $this->_customdata['current']; // current data to be set\n\n $mform->addElement('hidden', 'norepeats', $norepeats);\n $mform->setType('norepeats', PARAM_INT);\n // value not to be overridden by submitted value\n $mform->setConstants(array('norepeats' => $norepeats));\n\n $levelgrades = array();\n for ($i = 100; $i >= 0; $i--) {\n $levelgrades[$i] = $i;\n }\n\n for ($i = 0; $i < $norepeats; $i++) {\n $mform->addElement('header', 'dimension'.$i, get_string('dimensionnumber', 'workshopform_rubric', $i+1));\n $mform->addElement('hidden', 'dimensionid__idx_'.$i);\n $mform->setType('dimensionid__idx_'.$i, PARAM_INT);\n $mform->addElement('editor', 'description__idx_'.$i.'_editor',\n get_string('dimensiondescription', 'workshopform_rubric'), '', $descriptionopts);\n if (isset($current->{'numoflevels__idx_' . $i})) {\n $numoflevels = max($current->{'numoflevels__idx_' . $i} + self::ADDLEVELS, self::MINLEVELS);\n } else {\n $numoflevels = self::MINLEVELS;\n }\n $prevlevel = -1;\n for ($j = 0; $j < $numoflevels; $j++) {\n $mform->addElement('hidden', 'levelid__idx_' . $i . '__idy_' . $j);\n $mform->setType('levelid__idx_' . $i . '__idy_' . $j, PARAM_INT);\n $levelgrp = array();\n $levelgrp[] = $mform->createElement('select', 'grade__idx_'.$i.'__idy_'.$j,'', $levelgrades);\n $levelgrp[] = $mform->createElement('textarea', 'definition__idx_'.$i.'__idy_'.$j, '', array('cols' => 60, 'rows' => 3));\n $mform->addGroup($levelgrp, 'level__idx_'.$i.'__idy_'.$j, get_string('levelgroup', 'workshopform_rubric'), array(' '), false);\n $mform->setDefault('grade__idx_'.$i.'__idy_'.$j, $prevlevel + 1);\n if (isset($current->{'grade__idx_'.$i.'__idy_'.$j})) {\n $prevlevel = $current->{'grade__idx_'.$i.'__idy_'.$j};\n } else {\n $prevlevel++;\n }\n }\n }\n\n $mform->registerNoSubmitButton('adddims');\n $mform->addElement('submit', 'adddims', get_string('addmoredimensions', 'workshopform_rubric',\n workshop_rubric_strategy::ADDDIMS));\n $mform->closeHeaderBefore('adddims');\n\n $mform->addElement('header', 'configheader', get_string('configuration', 'workshopform_rubric'));\n $layoutgrp = array();\n $layoutgrp[] = $mform->createElement('radio', 'config_layout', '',\n get_string('layoutlist', 'workshopform_rubric'), 'list');\n $layoutgrp[] = $mform->createElement('radio', 'config_layout', '',\n get_string('layoutgrid', 'workshopform_rubric'), 'grid');\n $mform->addGroup($layoutgrp, 'layoutgrp', get_string('layout', 'workshopform_rubric'), array('<br />'), false);\n $mform->setDefault('config_layout', 'list');\n $this->set_data($current);\n }", "public function buildForm(array $form, FormStateInterface $form_state) {\n $form['time_duration'] = [\n '#type' => 'number',\n '#title' => $this->t('Time duration'),\n '#min' => 100,\n '#step' => 100,\n '#description' => $this->t(\n \"Time in seconds from the user's last login. Used as an event to \n update the relationships between the user and companies.\"\n ),\n '#default_value' => $this->config('pmmi_sso.company.settings')->get('time_duration'),\n '#required' => TRUE,\n ];\n $form['submit'] = [\n '#type' => 'submit',\n '#value' => $this->t('Save'),\n ];\n return $form;\n }", "public function buildFormLayout()\n {\n $this->addColumn(6, function(FormLayoutColumn $column) {\n $column->withSingleField('title');\n })->addColumn(6, function(FormLayoutColumn $column) {\n $column->withSingleField('cover');\n $column->withSingleField('description');\n $column->withSingleField('price');\n $column->withSingleField('tags');\n });\n }", "public function __construct()\n {\n parent::__construct();\n \n $this->form = new BootstrapFormBuilder;\n $this->form->setFormTitle('Bootstrap Form Builder');\n \n $label1 = new TLabel('Some label', '#7D78B6', 12, 'bi');\n $label1->style='text-align:left;border-bottom:1px solid #c0c0c0;width:100%';\n \n $this->form->appendPage('Page 1');\n $this->form->addContent( [$label1] );\n \n $field1a = new TEntry('row1a');\n $field2a = new TDate('row2a');\n $field2b = new TCombo('row2b');\n $field3a = new TEntry('row3a');\n $field3b = new TEntry('row3b');\n $field3c = new TEntry('row3c');\n $field3d = new TEntry('row3d');\n $field4a = new TText('row4a');\n \n // add a row with 2 slots\n $this->form->addFields( [ new TLabel('Row 1') ],\n [ $field1a ] );\n \n // add a row with 2 slots\n $this->form->addFields( [ new TLabel('Row 2') ],\n [ $field2a, $field2b ] );\n \n // add a row with 4 slots\n $this->form->addFields( [ new TLabel('Row 3') ],\n [ $field3a, $field3b ],\n [ new TLabel('Label') ],\n [ $field3c, $field3d ] );\n \n $field2b->addItems( ['1' => 'One', '2' => 'Two'] );\n \n $field1a->setSize('70%');\n $field2a->setSize('120');\n $field2b->setSize('75%');\n \n $field3a->setSize('50%');\n $field3b->setSize('50%');\n $field3c->setSize('50%');\n $field3d->setSize('50%');\n \n $this->form->appendPage('Page 2');\n \n $label2 = new TLabel('Another label', '#7D78B6', 12, 'bi');\n $label2->style='text-align:left;border-bottom:1px solid #c0c0c0;width:100%';\n \n $this->form->addContent( [$label2] );\n $this->form->addFields( [new TLabel('Row 4')], [$field4a ]);\n $field4a->setSize('100%', 100);\n \n $this->form->addAction('Send', new TAction(array($this, 'onSend')), 'fa:check-circle-o green');\n \n // wrap the page content using vertical box\n $vbox = new TVBox;\n $vbox->add(new TXMLBreadCrumb('menu.xml', __CLASS__));\n $vbox->add($this->form);\n\n parent::add($this->form);\n }", "function buildSettingsForm() {}", "function make_form_row(){\n\t\t$index = $this->col_index;\n\t\t# remove the * at the start of the first line\n\t\t$this->col_data = preg_replace(\"/^\\*/\",\"\",$this->col_data);\n\t\t# split the lines and remove the * from each. The value in each line goes into the array $values\n\t\t$values = preg_split(\"/\\n\\*?/\", $this->col_data);\n\t\t# pad the values array to make sure there are 3 entries\n\t\t$values = array_pad($values, 3, \"\");\n\t\t\n\t\t/*\n\t\tmake three input boxes. TableEdit takes row input from an input array named field a \n\t\tvalue for a particular field[$index] can be an array\n\t\t\tfield[$index][] is the field name\n\t\t\t40 is the length of the box\n\t\t\t$value is the value for the ith line\n\t\t \n\t\t */\n\t\t $form = ''; #initialize\n\t\t foreach($values as $i => $value){\n\t\t\t$form .= \"$i:\".XML::input(\"field[$index][]\",40,$value, array('maxlength'=>255)).\"<br>\\n\";\n\t\t}\n\t\treturn $form;\n\t\n\t}", "public function progressBar()\n {\n \n self::$view='adminlte::progress.bar';\n return $this;\n \n }", "private function build_form()\n {\n $ldm = LaikaDataManager :: get_instance();\n\n // The Laika Scales\n $scales = $ldm->retrieve_laika_scales(null, null, null, new ObjectTableOrder(LaikaScale :: PROPERTY_TITLE));\n $scale_options = array();\n while ($scale = $scales->next_result())\n {\n $scale_options[$scale->get_id()] = $scale->get_title();\n }\n\n // The Laika Percentile Codes\n $codes = $ldm->retrieve_percentile_codes();\n $code_options = array();\n foreach ($codes as $code)\n {\n $code_options[$code] = $code;\n }\n\n $this->addElement('category', Translation :: get('Dates'));\n $this->add_timewindow(self :: GRAPH_FILTER_START_DATE, self :: GRAPH_FILTER_END_DATE, Translation :: get('StartTimeWindow'), Translation :: get('EndTimeWindow'), false);\n $this->addElement('category');\n\n $this->addElement('category', Translation :: get('Groups', null, 'group'));\n\n $group_options = $this->get_groups();\n\n if (count($group_options) > 0)\n {\n if (count($group_options) < 10)\n {\n $count = count($group_options);\n }\n else\n {\n $count = 10;\n }\n\n $this->addElement('select', self :: GRAPH_FILTER_GROUP, Translation :: get('Group', null, Utilities::GROUP), $this->get_groups(), array('multiple', 'size' => $count));\n $this->addRule(self :: GRAPH_FILTER_GROUP, Translation :: get('ThisFieldIsRequired', null, Utilities::COMMON_LIBRARIES), 'required');\n }\n else\n {\n $this->addElement('static', 'group_text', Translation :: get('Group'), Translation :: get('NoGroupsAvailable'));\n $this->addElement('hidden', self :: GRAPH_FILTER_GROUP, null);\n }\n\n $this->addElement('category');\n\n $this->addElement('category', Translation :: get('Results'));\n $this->addElement('select', self :: GRAPH_FILTER_SCALE, Translation :: get('Scale'), $scale_options, array('multiple', 'size' => '10'));\n $this->addRule(self :: GRAPH_FILTER_SCALE, Translation :: get('ThisFieldIsRequired', null, Utilities::COMMON_LIBRARIES), 'required');\n $this->addElement('select', self :: GRAPH_FILTER_CODE, Translation :: get('Code'), $code_options, array('multiple', 'size' => '4'));\n $this->addRule(self :: GRAPH_FILTER_CODE, Translation :: get('ThisFieldIsRequired', null, Utilities::COMMON_LIBRARIES), 'required');\n $this->addElement('category');\n\n $this->addElement('category', Translation :: get('Options'));\n\n $group = array();\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_TYPE, null, Translation :: get('RenderGraphAndTable'), LaikaGraphRenderer :: RENDER_GRAPH_AND_TABLE);\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_TYPE, null, Translation :: get('RenderGraph'), LaikaGraphRenderer :: RENDER_GRAPH);\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_TYPE, null, Translation :: get('RenderTable'), LaikaGraphRenderer :: RENDER_TABLE);\n $this->addGroup($group, self :: GRAPH_FILTER_TYPE, Translation :: get('RenderType'), '<br/>', false);\n\n $allow_save = PlatformSetting :: get('allow_save', LaikaManager :: APPLICATION_NAME);\n if ($allow_save == true)\n {\n $this->addElement('checkbox', self :: GRAPH_FILTER_SAVE, Translation :: get('SaveToRepository'));\n }\n\n $maximum_attempts = PlatformSetting :: get('maximum_attempts', LaikaManager :: APPLICATION_NAME);\n if ($maximum_attempts > 1)\n {\n $group = array();\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_ATTEMPT, null, Translation :: get('OnlyIncludeFirstAttempt'), LaikaGraphRenderer :: RENDER_ATTEMPT_FIRST);\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_ATTEMPT, null, Translation :: get('OnlyIncludeMostRecentAttempt'), LaikaGraphRenderer :: RENDER_ATTEMPT_LAST);\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_ATTEMPT, null, Translation :: get('IncludeAllAttempts'), LaikaGraphRenderer :: RENDER_ATTEMPT_ALL);\n $this->addGroup($group, self :: GRAPH_FILTER_ATTEMPT, Translation :: get('AttemptsToInclude'), '<br/>', false);\n }\n else\n {\n $this->addElement('hidden', self :: GRAPH_FILTER_ATTEMPT, LaikaGraphRenderer :: RENDER_ATTEMPT_ALL);\n }\n\n $this->addElement('category');\n\n $buttons = array();\n\n $buttons[] = $this->createElement('style_submit_button', 'submit', Translation :: get('Filter', null, Utilities::COMMON_LIBRARIES), array('class' => 'normal search'));\n $buttons[] = $this->createElement('style_reset_button', 'reset', Translation :: get('Reset', null, Utilities::COMMON_LIBRARIES), array('class' => 'normal empty'));\n\n $this->addGroup($buttons, 'buttons', null, '&nbsp;', false);\n }", "function SLFramework_Progressbar($length=300, $height=20, $start=0, $insideText=\"\", $id=\"progressbar\") {\r\n\t\t\t$this->length = $length ; \r\n\t\t\t$this->insideText = $insideText ; \r\n\t\t\t$this->height = $height ; \r\n\t\t\t$this->start = $start ; \r\n\t\t\t$this->id = $id ; \r\n\t\t}", "protected function form()\n {\n $form = new Form(new UserHealth());\n\n $form->number('height', __('Height'));\n $form->number('weight', __('Weight'));\n $form->text('blood_pressure', __('Blood pressure'));\n $form->text('sugar_level', __('Sugar level'));\n $form->text('blood_type', __('Blood type'));\n $form->decimal('muscle_mass', __('Muscle mass'))->default(0);\n $form->text('metabolism', __('Metabolism'));\n $form->textarea('genetic_history', __('Genetic history'));\n $form->textarea('illness_history', __('Illness history'));\n $form->textarea('allergies', __('Allergies'));\n $form->textarea('prescription', __('Prescription'));\n $form->textarea('operations', __('Operations'));\n $form->number('user_id', __('User id'));\n\n return $form;\n }", "protected function Form_Create() {\n\t\t\t$this->dtgFichasNotases = new FichasNotasDataGrid($this);\n\n\t\t\t// Style the DataGrid (if desired)\n\t\t\t$this->dtgFichasNotases->CssClass = 'datagrid';\n\t\t\t$this->dtgFichasNotases->AlternateRowStyle->CssClass = 'alternate';\n\n\t\t\t// Add Pagination (if desired)\n\t\t\t$this->dtgFichasNotases->Paginator = new QPaginator($this->dtgFichasNotases);\n\t\t\t$this->dtgFichasNotases->ItemsPerPage = 20;\n\n\t\t\t// Use the MetaDataGrid functionality to add Columns for this datagrid\n\n\t\t\t// Create an Edit Column\n\t\t\t$strEditPageUrl = __VIRTUAL_DIRECTORY__ . __FORM_DRAFTS__ . '/fichas_notas_edit.php';\n\t\t\t$this->dtgFichasNotases->MetaAddEditLinkColumn($strEditPageUrl, QApplication::Translate('Edit'), QApplication::Translate('Edit'));\n\n\t\t\t// Create the Other Columns (note that you can use strings for fichas_notas's properties, or you\n\t\t\t// can traverse down QQN::fichas_notas() to display fields that are down the hierarchy)\n\t\t\t$this->dtgFichasNotases->MetaAddColumn('IdFichaNota');\n\t\t\t$this->dtgFichasNotases->MetaAddColumn(QQN::FichasNotas()->IdFichasObject);\n\t\t\t$this->dtgFichasNotases->MetaAddColumn('IdNota');\n\t\t}", "public function buildForm()\n {\n }", "function build_basic_form()\r\n {\r\n $this->addElement('select', LanguagePack :: PROPERTY_BRANCH, Translation :: get('Branch'), LanguagePack :: get_branch_options());\r\n \r\n \t$this->addElement('file', 'file', Translation :: get('FileName'));\r\n $allowed_upload_types = array('zip');\r\n $this->addRule('file', Translation :: get('OnlyZIPAllowed'), 'filetype', $allowed_upload_types);\r\n $this->addRule('file', Translation :: get('ThisFieldIsRequired', null, Utilities :: COMMON_LIBRARIES), 'required');\r\n \r\n // Submit button\r\n //$this->addElement('submit', 'user_settings', 'OK');\r\n $buttons[] = $this->createElement('style_submit_button', 'submit', Translation :: get('Import', null, Utilities :: COMMON_LIBRARIES), array('class' => 'positive'));\r\n $buttons[] = $this->createElement('style_reset_button', 'reset', Translation :: get('Reset', null, Utilities :: COMMON_LIBRARIES), array('class' => 'normal empty'));\r\n \r\n $this->addGroup($buttons, 'buttons', null, '&nbsp;', false);\r\n }", "function _name_field_settings_pre_render($form) {\n\n $warning = t('<strong>Warning! Changing this setting after data has been created could result in the loss of data!</strong>');\n\n $form['field_properties'] = array(\n '#prefix' => '<table>',\n '#suffix' => '</table>',\n '#weight' => 1,\n 'thead' => array(\n '#prefix' => '<thead><tr><th>' . t('Field') . '</th>',\n '#suffix' => '</tr></thead>',\n '#weight' => 0,\n ),\n 'tbody' => array(\n '#prefix' => '<tbody>',\n '#suffix' => '</tbody>',\n '#weight' => 1,\n 'components' => array(\n '#prefix' => '<tr><td><strong>' . t('Components') . ' <sup>1</sup></strong></td>',\n '#suffix' => '</tr>',\n '#weight' => 1,\n ),\n 'minimum_components' => array(\n '#prefix' => '<tr><td><strong>' . t('Minimum components') . ' <sup>2</sup></strong></td>',\n '#suffix' => '</tr>',\n '#weight' => 2,\n ),\n 'max_length' => array(\n '#prefix' => '<tr><td><strong>' . t('Maximum length') . ' <sup>3</sup></strong></td>',\n '#suffix' => '</tr>',\n '#weight' => 3,\n ),\n 'labels' => array(\n '#prefix' => '<tr><td><strong>' . t('Labels') . ' <sup>4</sup></strong></td>',\n '#suffix' => '</tr>',\n '#weight' => 4,\n ),\n 'sort_options' => array(\n '#prefix' => '<tr><td><strong>' . t('Sort options') . ' <sup>5</sup></strong></td>',\n '#suffix' => '</tr>',\n '#weight' => 5,\n ),\n\n ),\n 'tfoot' => array(\n '#value' => '<tfoot><tr><td colspan=\"6\"><ol>'\n . '<li>'. t('Only selected components will be activated on this field. All non-selected components / component settings will be ignored.')\n . '<br/>'. $warning .'</li>'\n . '<li>'. t('The minimal set of components required before considered the name field to be incomplete.') . '</li>'\n . '<li>'. t('The maximum length of the field in characters. This must be between 1 and 255.')\n . '<br/>'. $warning .'</li>'\n . '<li>'. t('The labels are used to distinguish the fields. You can use the special label \"!tag\" to hide this.', array('!tag' => '<none>')) . '</li>'\n . '<li>'. t('This enables sorting on the options after the vocabulary terms are added and duplicate values are removed.') . '</li>'\n . '</ol></td></tr></tfoot>',\n '#weight' => 2,\n ),\n );\n\n $i = 0;\n foreach (_name_translations() as $key => $title) {\n // Adds the table header for the particullar field.\n $form['field_properties']['thead'][$key]['#value'] = '<th>' . $title . '</th>';\n $form['field_properties']['thead'][$key]['#weight'] = ++$i;\n\n // Strip the title & description.\n unset($form['components'][$key]['#description']);\n unset($form['components'][$key]['#title']);\n\n unset($form['minimum_components'][$key]['#description']);\n unset($form['minimum_components'][$key]['#title']);\n\n unset($form['max_length'][$key]['#description']);\n unset($form['max_length'][$key]['#title']);\n $form['max_length'][$key]['#size'] = 10;\n\n unset($form['labels'][$key]['#description']);\n unset($form['labels'][$key]['#title']);\n $form['labels'][$key]['#size'] = 10;\n\n if (isset($form['sort_options'][$key])) {\n unset($form['sort_options'][$key]['#description']);\n unset($form['sort_options'][$key]['#title']);\n }\n\n // Moves the elements into the table.\n $form['field_properties']['tbody']['components'][$key] = $form['components'][$key];\n $form['field_properties']['tbody']['components'][$key]['#prefix'] = '<td>';\n $form['field_properties']['tbody']['components'][$key]['#suffix'] = '</td>';\n $form['field_properties']['tbody']['components'][$key]['#weight'] = $i;\n\n $form['field_properties']['tbody']['minimum_components'][$key] = $form['minimum_components'][$key];\n $form['field_properties']['tbody']['minimum_components'][$key]['#prefix'] = '<td>';\n $form['field_properties']['tbody']['minimum_components'][$key]['#suffix'] = '</td>';\n $form['field_properties']['tbody']['minimum_components'][$key]['#weight'] = $i;\n\n $form['field_properties']['tbody']['max_length'][$key] = $form['max_length'][$key];\n $form['field_properties']['tbody']['max_length'][$key]['#prefix'] = '<td>';\n $form['field_properties']['tbody']['max_length'][$key]['#suffix'] = '</td>';\n $form['field_properties']['tbody']['max_length'][$key]['#weight'] = $i;\n\n $form['field_properties']['tbody']['labels'][$key] = $form['labels'][$key];\n $form['field_properties']['tbody']['labels'][$key]['#prefix'] = '<td>';\n $form['field_properties']['tbody']['labels'][$key]['#suffix'] = '</td>';\n $form['field_properties']['tbody']['labels'][$key]['#weight'] = $i;\n\n if (isset($form['sort_options'][$key])) {\n $form['field_properties']['tbody']['sort_options'][$key] = $form['sort_options'][$key];\n }\n else {\n $form['field_properties']['tbody']['sort_options'][$key] = array('#value' => '&nbsp;');\n }\n $form['field_properties']['tbody']['sort_options'][$key]['#prefix'] = '<td>';\n $form['field_properties']['tbody']['sort_options'][$key]['#suffix'] = '</td>';\n $form['field_properties']['tbody']['sort_options'][$key]['#weight'] = $i;\n\n // Clean up the leftovers.\n unset($form['components'][$key]);\n $form['components']['#access'] = FALSE;\n\n unset($form['minimum_components'][$key]);\n $form['minimum_components']['#access'] = FALSE;\n\n unset($form['max_length'][$key]);\n $form['max_length']['#access'] = FALSE;\n\n unset($form['labels'][$key]);\n $form['labels']['#access'] = FALSE;\n\n if (isset($form['sort_options'][$key])) {\n unset($form['sort_options'][$key]);\n $form['sort_options']['#access'] = FALSE;\n }\n }\n\n // Move the additional options under the table.\n $form['extra_fields'] = array(\n '#weight' => 2,\n );\n $form['title_options']['#weight'] = 0;\n $form['generational_options']['#weight'] = 1;\n $form['extra_fields']['title_options'] = $form['title_options'];\n $form['extra_fields']['generational_options'] = $form['generational_options'];\n unset($form['title_options']);\n unset($form['generational_options']);\n\n return $form;\n}", "public function initConfigurationForm()\n\t{\n\t\tglobal $lng, $ilCtrl;\n\t\t\n\t\t$pl = $this->getPluginObject();\n\t\n\t\tinclude_once(\"Services/Form/classes/class.ilPropertyFormGUI.php\");\n\t\t$form = new ilPropertyFormGUI();\n\t\n\t\t// setting 1 (a checkbox)\n\t\t$cb = new ilCheckboxInputGUI($pl->txt(\"setting_1\"), \"setting_1\");\n\t\t$form->addItem($cb);\n\t\t\n\t\t// setting 2 (text)\n\t\t$ti = new ilTextInputGUI($pl->txt(\"setting_2\"), \"setting_2\");\n\t\t$ti->setRequired(true);\n\t\t$ti->setMaxLength(10);\n\t\t$ti->setSize(10);\n\t\t$form->addItem($ti);\n\t\n\t\t$form->addCommandButton(\"save\", $lng->txt(\"save\"));\n\t \n\t\t$form->setTitle($pl->txt(\"example_plugin_configuration\"));\n\t\t$form->setFormAction($ilCtrl->getFormAction($this));\n\t\t\n\t\treturn $form;\n\t}", "function show_answers_progress($real_taskcount, $taskcount, $pid, $colspan = -1){\n\t\n\tif($colspan == -1){\n\t\t$colspan = \"\";\n\t}else{\n\t\t$colspan = \" colspan = '$colspan'\";\n\t}\n\t\n\t//taskcount formatting\n\t$delta_tc = $taskcount - $real_taskcount;\n\t$const = 60;\n\tif($delta_tc >= 0 || $taskcount == 0){\n\t\t$width = $const;\n\t}else{\n\t\t$width = $const * $taskcount / $real_taskcount;\n\t\t$sec_width = $const * abs($delta_tc) / $real_taskcount;\n\t}\n\t\n\techo \"<td$colspan>\n\t\t<meter id='bar$pid' min='0' max='100' low='25' high='75' optimum='100' value='\";\n\tif($taskcount == 0){\n\t\techo \"0\";\n\t}else{\n\t\techo $real_taskcount / $taskcount * 100;\n\t}\n\techo \"' style='width:\".$width.\"%;'></meter>\";\n\tif($delta_tc < 0 && $taskcount != 0){\n\t\techo \"<meter min='0' max='100' low='0' high='0' optimum='0' value='100' style='width:\".$sec_width.\"%;'></meter>\";\n\t}\n\techo \"<label for='bar$pid'> $real_taskcount/$taskcount</label>\";\n\techo \"</td>\";\n}", "protected function form()\n {\n $form = new Form(new Direction());\n\n $form->text('name', __(trans('hhx.name')));\n $form->text('intro', __(trans('hhx.intro')));\n $form->image('Img', __(trans('hhx.img')))->move('daily/direction')->uniqueName();\n $form->select('status', __(trans('hhx.status')))->options(config('hhx.status'));;\n $form->number('order_num', __(trans('hhx.order_num')));\n $form->hidden('all_num', __(trans('hhx.all_num')))->default(0.00);\n $form->decimal('stock', __(trans('hhx.stock')));\n\n return $form;\n }", "protected function definition_inner($mform) {\n global $PAGE;\n $PAGE->requires->jquery();\n $PAGE->requires->jquery_plugin('ui');\n $PAGE->requires->jquery_plugin('ui-css');\n\n $PAGE->requires->strings_for_js(array('itemsettingserror', 'editquestiontext', 'additemsettings',\n 'correct', 'incorrect'), 'qtype_gapfill');\n $PAGE->requires->js('/question/type/gapfill/questionedit.js');\n $mform->addElement('hidden', 'reload', 1);\n $mform->setType('reload', PARAM_RAW);\n\n $mform->removeelement('questiontext');\n /*for storing the json containing the settings data */\n $mform->addElement('hidden', 'itemsettings', '', array('size' => '80'));\n $mform->setType('itemsettings', PARAM_RAW);\n\n /* popup for entering feedback for individual words */\n $mform->addElement('html', '<div id=\"id_itemsettings_popup\" title=\"' . get_string('additemsettings', 'qtype_gapfill')\n . '\" style=\"display:none;background-color:lightgrey\" >');\n $mform->addElement('editor', 'correct', '', array('size' => 70, 'rows' => 4), $this->editoroptions);\n $mform->addElement('editor', 'incorrect', '', array('size' => 70, 'rows' => 4), $this->editoroptions);\n $mform->addElement('html', '</div>');\n\n /* presented for clicking on the gaps once they have been given numberical ids */\n $mform->addElement('html',\n '<div class=\"gapfill\" id=\"id_itemsettings_canvas\" style=\"display:none;background-color:lightgrey\" ></div>');\n\n $mform->addElement('html', '<div id=\"questiontext\" >');\n $mform->addElement('editor', 'questiontext', get_string('questiontext', 'question'), array('rows' => 10),\n $this->editoroptions);\n $mform->addElement('html', '</div>');\n\n $mform->setType('questiontext', PARAM_RAW);\n $mform->addHelpButton('questiontext', 'questiontext', 'qtype_gapfill');\n\n $mform->addElement('button', 'itemsettings_button', get_string('itemsettingsbutton', 'qtype_gapfill'));\n $mform->addHelpButton('itemsettings_button', 'itemsettings_button', 'qtype_gapfill');\n\n $mform->removeelement('generalfeedback');\n\n // Default mark will be set to 1 * number of fields.\n $mform->removeelement('defaultmark');\n\n $mform->addElement('editor', 'wronganswers', get_string('wronganswers', 'qtype_gapfill'),\n array('size' => 70, 'rows' => 1), $this->editoroptions);\n $mform->addHelpButton('wronganswers', 'wronganswers', 'qtype_gapfill');\n\n /* Only allow plain text in for the comma delimited set of wrong answer values\n * wrong answers really should be a set of zero marked ordinary answers in the answers\n * table.\n */\n $mform->setType('wronganswers', PARAM_TEXT);\n\n $mform->addElement('editor', 'generalfeedback', get_string('generalfeedback', 'question')\n , array('rows' => 10), $this->editoroptions);\n\n $mform->setType('generalfeedback', PARAM_RAW);\n $mform->addHelpButton('generalfeedback', 'generalfeedback', 'question');\n $mform->addElement('header', 'feedbackheader', get_string('moreoptions', 'qtype_gapfill'));\n\n // The delimiting characters around fields.\n $config = get_config('qtype_gapfill');\n /* turn config->delimitchars into an array) */\n $delimitchars = explode(\",\", $config->delimitchars);\n /* copies the values into the keys */\n $delimitchars = array_combine($delimitchars, $delimitchars);\n /* strip any spaces from keys. This is about backward compatibility with old code\n * and avoiding having to expand the size of the delimitchar column from its current\n * 2. The value in the drop down looks better with a gap between the delimitchars, but\n * a gap in the key will break the insert into the question_gapfill table\n */\n foreach ($delimitchars as $key => $value) {\n $key2 = str_replace(' ', '', $key);\n $delimitchars2[$key2] = $value;\n }\n $mform->addElement('select', 'delimitchars', get_string('delimitchars', 'qtype_gapfill'), $delimitchars2);\n $mform->addHelpButton('delimitchars', 'delimitchars', 'qtype_gapfill');\n\n $answerdisplaytypes = array(\"dragdrop\" => get_string('displaydragdrop', 'qtype_gapfill'),\n \"gapfill\" => get_string('displaygapfill', 'qtype_gapfill'),\n \"dropdown\" => get_string('displaydropdown', 'qtype_gapfill'));\n\n $mform->addElement('select', 'answerdisplay', get_string('answerdisplay', 'qtype_gapfill'), $answerdisplaytypes);\n $mform->addHelpButton('answerdisplay', 'answerdisplay', 'qtype_gapfill');\n\n /* sets all gaps to the size of the largest gap, avoids giving clues to the correct answer */\n $mform->addElement('advcheckbox', 'fixedgapsize', get_string('fixedgapsize', 'qtype_gapfill'));\n $mform->addHelpButton('fixedgapsize', 'fixedgapsize', 'qtype_gapfill');\n\n /* put draggable answer options after the text. They don't have to be dragged as far, handy on small screens */\n $mform->addElement('advcheckbox', 'optionsaftertext', get_string('optionsaftertext', 'qtype_gapfill'));\n $mform->setDefault('optionsaftertext', $config->optionsaftertext);\n $mform->addHelpButton('optionsaftertext', 'optionsaftertext', 'qtype_gapfill');\n\n /* use plain string matching instead of regular expressions */\n $mform->addElement('advcheckbox', 'disableregex', get_string('disableregex', 'qtype_gapfill'));\n $mform->addHelpButton('disableregex', 'disableregex', 'qtype_gapfill');\n $mform->setDefault('disableregex', $config->disableregex);\n $mform->setAdvanced('disableregex');\n\n $mform->addElement('advcheckbox', 'letterhints', get_string('letterhints', 'qtype_gapfill'));\n $mform->setDefault('letterhints', $config->letterhints);\n $mform->addHelpButton('letterhints', 'letterhints', 'qtype_gapfill');\n\n /* Discards duplicates before processing answers, useful for tables with gaps like [cat|dog][cat|dog] */\n $mform->addElement('advcheckbox', 'noduplicates', get_string('noduplicates', 'qtype_gapfill'));\n $mform->addHelpButton('noduplicates', 'noduplicates', 'qtype_gapfill');\n $mform->setAdvanced('noduplicates');\n\n /* Makes marking case sensitive so Cat is not the same as cat */\n $mform->addElement('advcheckbox', 'casesensitive', get_string('casesensitive', 'qtype_gapfill'));\n $mform->setDefault('casesensitive', $config->casesensitive);\n $mform->addHelpButton('casesensitive', 'casesensitive', 'qtype_gapfill');\n $mform->setAdvanced('casesensitive');\n\n // To add combined feedback (correct, partial and incorrect).\n $this->add_combined_feedback_fields(true);\n\n // Adds hinting features.\n $this->add_interactive_settings(true, true);\n if ($config->letterhints && $config->addhinttext) {\n $this->_form->getElement('hint[0]')->setValue(array('text' => get_string('letterhint0', 'qtype_gapfill')));\n $this->_form->getElement('hint[1]')->setValue(array('text' => get_string('letterhint1', 'qtype_gapfill')));\n }\n }", "protected function Form_Create() {\n\t\t\t$this->txtValue1 = new QTextBox($this);\n\t\t\t\n\t\t\t$this->txtValue2 = new QTextBox($this);\n\t\t\t\n\t\t\t$this->lstOperation = new QListBox($this);\n\t\t\t$this->lstOperation->AddItem('+', 'add');\n\t\t\t$this->lstOperation->AddItem('-', 'subtract');\n\t\t\t$this->lstOperation->AddItem('*', 'multiply');\n\t\t\t$this->lstOperation->AddItem('/', 'divide');\n\t\t\t\n\t\t\t$this->btnCalculate = new QButton($this);\n\t\t\t$this->btnCalculate->Text = 'Calculate';\n\t\t\t$this->btnCalculate->AddAction(new QClickEvent(), new QServerAction('btnCalculate_Click'));\n\t\t\t\n\t\t\t$this->lblResult = new QLabel($this);\n\t\t\t$this->lblResult->HtmlEntities = false;\n\t\t}", "function getForm($form, &$form_state, $disabled, $myvalues)\n {\n $form[\"data_entry_area1\"] = array(\n '#prefix' => \"\\n<section class='protocollib-admin raptor-dialog-table'>\\n\",\n '#suffix' => \"\\n</section>\\n\",\n );\n $form[\"data_entry_area1\"]['table_container'] = array(\n '#type' => 'item', \n '#prefix' => '<div class=\"raptor-dialog-table-container\">',\n '#suffix' => '</div>', \n '#tree' => TRUE,\n );\n\n \n $oDD = new \\raptor\\DashboardData($this->m_oContext);\n $oPSD = new \\raptor\\ProtocolSupportingData($this->m_oContext);\n $radiology_reports_detail = $oPSD->getRadiologyReportsDetail();\n $raptor_protocoldashboard = $oDD->getDashboardDetails();\n \n $patientDFN=$raptor_protocoldashboard['PatientID'];\n $patientICN=$raptor_protocoldashboard['mpiPid'];\n \n $rows = '';\n foreach($radiology_reports_detail as $data_row) \n {\n $reportID=$data_row['ReportID'];\n $caseNumber=$data_row['CaseNumber']; \n $rows .= \"\\n\".'<tr>'\n . '<td>'.$data_row[\"Title\"].'</td>'\n . '<td>'.$data_row[\"ReportedDate\"].'</td>'\n . '<td><a href=\"#\" class=\"raptor-details\">'.$data_row[\"Snippet\"].'</a>'.GetRadiologyReportsTab::raptor_print_details($data_row[\"Details\"]).'</td>'\n . '<td>'.GetRadiologyReportsTab::getImageInfoAsHTML($this->m_oContext, $patientDFN, $patientICN, $reportID, $caseNumber).'</td>'\n . '</tr>';\n }\n \n $form[\"data_entry_area1\"]['table_container']['reports'] = array('#type' => 'item',\n '#markup' => '<table id=\"my-raptor-dialog-table\" class=\"dataTable\">'\n . '<thead>'\n . '<tr>'\n . '<th>Title</th>'\n . '<th>Date</th>'\n . '<th>Details</th>'\n . '<th>Existing Images</th>'\n . '</tr>'\n . '</thead>'\n . '<tbody>'\n . $rows\n . '</tbody>'\n . '</table>');\n \n return $form;\n }", "function _name_field_instance_settings_pre_render($form) {\n\n $form['instance_properties'] = array(\n '#prefix' => '<table>',\n '#suffix' => '</table>',\n '#weight' => 1,\n 'thead' => array(\n '#prefix' => '<thead><tr><th>' . t('Field') . '</th>',\n '#suffix' => '</tr></thead>',\n '#weight' => 0,\n ),\n 'tbody' => array(\n '#prefix' => '<tbody>',\n '#suffix' => '</tbody>',\n '#weight' => 1,\n 'title_display' => array(\n '#prefix' => '<tr><td><strong>' . t('Title display') . ' <sup>1</sup></strong></td>',\n '#suffix' => '</tr>',\n '#weight' => 1,\n ),\n 'size' => array(\n '#prefix' => '<tr><td><strong>' . t('HTML size') . ' <sup>2</sup></strong></td>',\n '#suffix' => '</tr>',\n '#weight' => 2,\n ),\n 'inline_css_enabled' => array(\n '#prefix' => '<tr><td><strong>' . t('Inline style') . ' <sup>3</sup></strong></td>',\n '#suffix' => '</tr>',\n '#weight' => 3,\n ),\n ),\n 'tfoot' => array(\n '#value' => '<tfoot><tr><td colspan=\"6\"><ol>'\n . '<li>'. t('The title display controls how the label of the name component is displayed in the form. \"%above\" is the standard title; \"%below\" is the standard description; \"%hidden\" removes the label.',\n array('%above' => t('above'), '%below' => t('below'), '%hidden' => t('hidden'))) . '</li>'\n . '<li>'. t('The HTML size property tells the browser what the width of the field should be when it is rendered. This gets overriden by the themes CSS properties. This must be between 1 and 255.') . '</li>'\n . '<li>'. t('The inline style property tells the browser what the width of the field <strong>really</strong> should be when it is rendered. This is dynamically calculated from the HTML size property.') . '</li>'\n . '</ol></td></tr></tfoot>' ,\n '#weight' => 2,\n ),\n 'extra_fields' => array(\n '#weight' => 3,\n ),\n );\n\n $i = 0;\n foreach (_name_translations() as $key => $title) {\n // Adds the table header for the particullar field.\n $form['instance_properties']['thead'][$key]['#value'] = '<th>' . $title . '</th>';\n $form['instance_properties']['thead'][$key]['#weight'] = ++$i;\n\n // Strip the title & description.\n unset($form['size'][$key]['#description']);\n unset($form['size'][$key]['#title']);\n $form['size'][$key]['#size'] = 5;\n\n unset($form['title_display'][$key]['#description']);\n unset($form['title_display'][$key]['#title']);\n\n unset($form['inline_css_enabled'][$key]['#description']);\n unset($form['inline_css_enabled'][$key]['#title']);\n\n // Moves the size element into the table.\n $form['instance_properties']['tbody']['size'][$key] = $form['size'][$key];\n $form['instance_properties']['tbody']['size'][$key]['#prefix'] = '<td>';\n $form['instance_properties']['tbody']['size'][$key]['#suffix'] = '</td>';\n $form['instance_properties']['tbody']['size'][$key]['#weight'] = $i;\n\n $form['instance_properties']['tbody']['title_display'][$key] = $form['title_display'][$key];\n $form['instance_properties']['tbody']['title_display'][$key]['#prefix'] = '<td>';\n $form['instance_properties']['tbody']['title_display'][$key]['#suffix'] = '</td>';\n $form['instance_properties']['tbody']['title_display'][$key]['#weight'] = $i;\n\n $form['instance_properties']['tbody']['inline_css_enabled'][$key] = $form['inline_css_enabled'][$key];\n $form['instance_properties']['tbody']['inline_css_enabled'][$key]['#prefix'] = '<td>';\n $form['instance_properties']['tbody']['inline_css_enabled'][$key]['#suffix'] = '</td>';\n $form['instance_properties']['tbody']['inline_css_enabled'][$key]['#weight'] = $i;\n\n // Clean up the leftovers.\n unset($form['size'][$key]);\n $form['size']['#access'] = FALSE;\n\n unset($form['title_display'][$key]);\n $form['title_display']['#access'] = FALSE;\n\n unset($form['inline_css_enabled'][$key]);\n $form['inline_css_enabled']['#access'] = FALSE;\n\n }\n\n // Move the additional options under the table.\n $form['extra_fields'] = array(\n '#weight' => 2,\n );\n $form['inline_css']['#weight'] = 0;\n $form['title_field']['#weight'] = 1;\n $form['generational_field']['#weight'] = 2;\n $form['extra_fields']['inline_css'] = $form['inline_css'];\n $form['extra_fields']['title_field'] = $form['title_field'];\n $form['extra_fields']['generational_field'] = $form['generational_field'];\n unset($form['title_field']);\n unset($form['inline_css']);\n unset($form['generational_field']);\n\n return $form;\n}", "protected function form()\n {\n $form = new Form(new DbTop());\n $form->select('status', __(trans('hhx.status')))->options(config('hhx.db_status'));;\n $form->text('pan_url', __(trans('hhx.pan_url')));\n $form->text('pan_code', __(trans('hhx.pan_code')));\n\n return $form;\n }", "function createForm(){\n\t\t$this->createFormBase();\n\t\t$this->addElement('reset','reset','Reset');\t\t\t\n\t\t$tab['seeker_0'] = '0';\n\t\t$this->setDefaults($tab);\n\t\t$this->addElement('submit','bouton_add_pi','Add a contact',array('onclick' => \"document.getElementById('frmvadataset').action += '#a_contact'\"));\n\t\t$this->createVaFormResolution();\n\t\t$this->createFormGeoCoverage();\n\t\t$this->createFormGrid();\t\n\t\t//Required format\n\t\t$dformat = new data_format;\n\t\t$dformat_select = $dformat->chargeFormDestFormat($this,'required_data_format','Required data format','NetCDF');\n\t\t$this->addElement($dformat_select);\n\t\t$this->getElement('organism_0')->setLabel(\"Organism short name\");\n\t\t$this->getElement('project_0')->setLabel(\"Useful in the framework of\");\n\t\t$this->getElement('dats_abstract')->setLabel(\"Abstract \");\n\t\t$this->getElement('dats_purpose')->setLabel(\"Purpose\");\n\t\t$this->getElement('database')->setLabel(\"Data center\");\n\t\t$this->getElement('new_db_url')->setLabel(\"Data center url\");\n\t\t$this->getElement('dats_use_constraints')->setLabel(\"Access and use constraints\");\t\t\t\n\t\t$this->getElement('sensor_resol_tmp')->setLabel('Temporal (hh:mm:ss)');\t\t\t\n\t\t$this->getElement('place_alt_min_0')->setLabel(\"Altitude min\");\n\t\t$this->getElement('place_alt_max_0')->setLabel(\"Altitude max\");\n\t\t$this->getElement('data_format_0')->setLabel(\"Original data format\");\n\t\t$this->addElement('file','upload_doc','Attached document');\n\t\t$this->addElement('submit','upload','Upload');\n\t\t$this->addElement('submit','delete','Delete');\n\t\t\n\t\tfor ($i = 0; $i < $this->dataset->nbVars; $i++){\n\t\t\t$this->getElement('methode_acq_'.$i)->setLabel(\"Parameter processing related information\");\n\t\t}\n\t\t$this->addElement('submit','bouton_add_variable','Add a parameter',array('onclick' => \"document.getElementById('frmvadataset').action += '#a_param'\"));\n\t\t\n\t\t$this->addElement('submit','bouton_add_projet','Add a project',array('onclick' => \"document.getElementById('frmvadataset').action += '#a_general'\"));\n\t\t$option = array();\n\t\t$option['default'] = \"\";\n\t\t$option['model'] = \"Model\";\n\t\t$option['instrument'] = \"Instrument\";\n\t\t$option['satellite'] = \"Satellite\";\n\t\t$this->addElement('select','source_type','source type :',$option,array('onchange' => \"DeactivateButtonAddSource()\",'onclick' => \"DeactivateButtonAddSource();\",'onmouseover' => 'DeactivateButtonAddSource();' ));\n\t\t$this->addElement('submit','bouton_add_source','Add a source',array('disabled' => 'true','onclick' => \"document.getElementById('frmvadataset').action += '#a_source'\",'onmouseout' => 'DeactivateButtonAddSource();'));\n\t\t\n\t\tif (isset ( $this->dataset->dats_sensors ) && ! empty ( $this->dataset->dats_sensors )) {\n\t\t\t$this->dats_sensors = array();\n\t\t\t$this->dats_sensors = $this->dataset->dats_sensors ;\n\t\t}\n\t\tif (isset ( $this->dataset->sites ) && ! empty ( $this->dataset->sites )) {\n\t\t\t$this->sites = array();\n\t\t\t$this->sites = $this->dataset->sites;\n\t\t}\n\t\t\n\t\tif ( isset ( $this->dataset->dats_id ) && $this->dataset->dats_id > 0) {\n\t\t\tif (isset ( $this->dataset->nbModFormSensor )){\n\t\t\t\tif($this->dataset->nbModForm <= $this->dataset->nbModFormSensor ){\n\t\t\t\t\t$this->dataset->nbModForm = $this->dataset->nbModFormSensor;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isset ( $this->dataset->nbSatFormSensor )){\n\t\t\t\t//$this->dataset->nbSatFormSensor = $this->dataset->nbSatFormSensor - 1;\n\t\t\t\tif($this->dataset->nbSatForm <= $this->dataset->nbSatFormSensor){\n\t\t\t\t\t$this->dataset->nbSatForm = $this->dataset->nbSatFormSensor;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isset ( $this->dataset->nbInstruFormSensor )){\n\t\t\t\tif($this->dataset->nbInstruForm <= $this->dataset->nbInstruFormSensor){\n\t\t\t\t\t$this->dataset->nbInstruForm = $this->dataset->nbInstruFormSensor;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif($this->dataset->nbModForm > 0)\n\t\t\t$this->addMod();\n\t\tif($this->dataset->nbInstruForm > 0)\n\t\t\t$this->addInstru();\t\n\t\tif($this->dataset->nbSatForm > 0)\n\t\t\t$this->addSat();\n\t\t\n\t\t$this->dataset->dats_sensors = null ;\n\t\t$this->dataset->sites = null;\n\t}", "public function form()\n {\n $this->switch('auto_df_switch', __('message.tikuanconfig.auto_df_switch'));\n $this->timeRange('auto_df_stime', 'auto_df_etime', '开启时间');\n $this->text('auto_df_maxmoney', __('message.tikuanconfig.auto_df_maxmoney'))->setWidth(2);\n $this->text('auto_df_max_count', __('message.tikuanconfig.auto_df_max_count'))->setWidth(2);\n $this->text('auto_df_max_sum', __('message.tikuanconfig.auto_df_max_sum'))->setWidth(2);\n\n }", "protected function constructGrid()\n {\n // jquery script for loading first page of grid\n $table = \"\n <script type=\\\"text/javascript\\\">\n // load first page\n WschangeModelPagination(\n '$this->_id',\n '$this->_action',\n '$this->_modelName',\n '$this->noDataText',\n $this->itemsPerPage,\n $this->showEdit,\n '$this->_order',\n '$this->_formId',\n 0,\n '$this->_id'+'_0',\n '$this->_edit_action',\n '$this->_delete_action'\n );\n </script>\n \";\n\n // container for edit dialog\n if ($this->showEdit) {\n $table .= '<div class=\"uk-modal\" id=\"'.$this->_formId.'\"></div>';\n $table .= '<div class=\"uk-modal\" id=\"'.$this->_formId.'_new\"></div>';\n }\n\n // title\n $table .= '<div class=\"uk-grid\">';\n $table .= '<div class=\"uk-width-small-1-1 uk-width-medium-1-1\">';\n $table .= '<h1>'.$this->_model->metaName.'</h1>';\n $table .= '</div>';\n $table .= '</div>';\n\n // add and search controls\n $table .= '<div class=\"uk-grid\">';\n $table .= '<div class=\"uk-width-small-1-1 uk-width-medium-1-2\">';\n $table .= '<form class=\"uk-form uk-form-horizontal\">';\n $table .= '<fieldset data-uk-margin>';\n // new item button\n if ($this->showEdit) {\n $table .= '<button class=\"uk-button uk-button-success\"'\n .' data-uk-modal=\"{target:\\'#'.$this->_formId\n .'_new\\', center:true}\"'\n .' id=\"btn_create_'.$this->_id.'\"'\n .' type=\"button\" onclick=\"WseditModelID('\n .'\\''.$this->_formId.'_new\\', '\n .'\\''.$this->_modelName.'\\', '\n .'0, \\''.$this->_edit_action.'\\')\">';\n $table .= '<i class=\"uk-icon-plus\"></i>';\n $table .= '</button>';\n }\n // search control\n $table .= '<input';\n $table .= ' type=\"text\" id=\"search_'.$this->_id.'\"';\n $table .= '/>';\n $table .= '<button class=\"uk-button\"'\n .' id=\"btn_search_'.$this->_id\n .'\" type=\"button\" onclick=\"WschangeModelPagination('\n .'\\''.$this->_id.'\\', '\n .'\\''.$this->_action.'\\', '\n .'\\''.$this->_modelName.'\\', '\n .'\\''.$this->noDataText.'\\', '\n .$this->itemsPerPage.', '\n .$this->showEdit.', '\n .'\\''.$this->_order.'\\', '\n .'\\''.$this->_formId.'\\', '\n .'0, \\''.$this->_id.'\\'+\\'_0\\', '\n .'\\''.$this->_edit_action.'\\', '\n .'\\''.$this->_delete_action.'\\')\">';\n $table .= '<i class=\"uk-icon-search\"></i>';\n $table .= '</button>';\n\n $table .= '</fieldset>';\n $table .= '</form>';\n $table .= '</div>';\n $table .= '</div>';\n\n // Grid View table\n $table .= '<div class=\"uk-grid\">';\n $table .= '<div class=\"uk-width-1-1\">';\n $table .= '<div class=\"uk-overflow-container\">';\n $table .= '<table class=\"uk-table uk-table-hover uk-table-striped\">';\n $table .= '<thead>';\n $table .= '<tr>';\n foreach ($this->_model->columns as $column) {\n if (!in_array($column, $this->_model->hiddenColumns)) {\n if (isset($this->_model->columnHeaders[$column])) {\n $table .= '<th>'\n .$this->_model->columnHeaders[$column];\n $table .= '</th>';\n } else {\n $table .= '<th>'.$column.'</th>';\n }\n }\n }\n if ($this->showEdit) {\n $table .= '<th></th>';\n }\n $table .= '</tr>';\n $table .= '</thead>';\n\n // container of table data loaded from AJAX request\n $table .= '<tbody id=\"'.$this->_id.'\"></tbody>';\n\n // end of grid table\n $table .= '</table>';\n $table .= '</div>';\n $table .= '</div>';\n $table .= '</div>';\n\n // get number ow rows from query so that we can make pager\n $db = new WsDatabase();\n $countQuery = 'SELECT COUNT(*) AS nrows FROM '.$this->_model->tableName;\n $result = $db->query($countQuery);\n $this->nRows = intval($result[0]['nrows']);\n $db->close();\n\n // number of items in pager\n $nPages = $this->getPagination($this->nRows);\n\n // construct pager\n $table .= '<ul class=\"uk-pagination uk-pagination-left\">';\n // links to pages\n for ($i = 0; $i < $nPages; $i++) {\n $table .= '<li>';\n $table .= '\n <a id=\"'.$this->_id.'_'.$i.'\"\n href=\"javascript:void(0)\"\n onclick=\"WschangeModelPagination('\n .'\\''.$this->_id.'\\', '\n .'\\''.$this->_action.'\\', '\n .'\\''.$this->_modelName.'\\', '\n .'\\''.$this->noDataText.'\\', '\n .$this->itemsPerPage.', '\n .$this->showEdit.', '\n .'\\''.$this->_order.'\\', '\n .'\\''.$this->_formId.'\\', '\n .$i.',\\''.$this->_id.'_'.$i.'\\', '\n .'\\''.$this->_edit_action.'\\', '\n .'\\''.$this->_delete_action.'\\')\"/>'\n .($i+1).'</a>';\n $table .= '</li>';\n }\n // end of pager\n $table .= '</ul>';\n\n // end of master div element\n $table .= '<br/>';\n\n $table .= '<script type=\"text/javascript\">'\n .'$(\"#search_'.$this->_id.'\").keydown(function(event) {'\n .' if(event.keyCode == 13) {'\n .' event.preventDefault();'\n .' $(\"#btn_search_'.$this->_id.'\").click();'\n .' }'\n .'});'\n .'</script>';\n\n unset($i, $nPages, $db, $result, $countQuery);\n return $table;\n }", "protected function form()\n {\n $form = new Form(new Activity());\n\n $form->text('name', __('Name'));\n $form->image('image', __('Image'));\n $form->text('intro', __('Intro'));\n $form->UEditor('details', __('Details'));\n $form->datetime('start_at', __('Start at'))->default(date('Y-m-d H:i:s'));\n $form->datetime('end_at', __('End at'))->default(date('Y-m-d H:i:s'));\n $form->text('location', __('Location'));\n $form->decimal('fee', __('Fee'))->default(0.00);\n $form->number('involves', __('Involves'));\n $form->number('involves_min', __('Involves min'));\n $form->number('involves_max', __('Involves max'));\n $form->switch('status', __('Status'));\n $form->text('organizers', __('Organizers'));\n $form->number('views', __('Views'));\n $form->switch('is_stick', __('Is stick'));\n\n return $form;\n }", "protected function initializeForm()\n {\n $this->form = new Form();\n $this->form->add(Element::create(\"FieldSet\",\"Report Format\")->add\n (\n Element::create(\"SelectionList\", \"File Format\", \"report_format\")\n ->addOption(\"Hypertext Markup Language (HTML)\",\"html\")\n ->addOption(\"Portable Document Format (PDF)\",\"pdf\")\n ->addOption(\"Microsoft Excel (XLS)\",\"xls\")\n ->addOption(\"Microsoft Word (DOC)\",\"doc\")\n ->setRequired(true)\n ->setValue(\"pdf\"),\n Element::create(\"SelectionList\", \"Page Orientation\", \"page_orientation\")\n ->addOption(\"Landscape\", \"L\")\n ->addOption(\"Portrait\", \"P\")\n ->setValue(\"L\"),\n Element::create(\"SelectionList\", \"Paper Size\", \"paper_size\")\n ->addOption(\"A4\", \"A4\")\n ->addOption(\"A3\", \"A3\")\n ->setValue(\"A4\")\n )->setId(\"report_formats\")->addAttribute(\"style\",\"width:50%\")\n );\n $this->form->setSubmitValue(\"Generate\");\n $this->form->addAttribute(\"action\",Application::getLink($this->path.\"/generate\"));\n $this->form->addAttribute(\"target\",\"blank\");\n }", "function box_build_attributes($properties, $i, $showtrunc = true, $showfont = true, $showborder = true, $showfill = true, $pre = '', $title = '') {\n global $kFonts, $kFontSizes, $kFontAlign, $kFontColors, $kLineSizes;\n $fields = array('font', 'size', 'align', 'color', 'bordershow', 'bordersize', 'bordercolor', 'fillshow', 'fillcolor');\n\tforeach ($fields as $value) {\n $temp = $pre . $value;\n\t $$value = $properties->$temp;\n\t}\n $output = NULL;\n $output .= '<table class=\"ui-widget\" style=\"border-collapse:collapse;margin-left:auto;margin-right:auto;\">' . nl;\n $output .= ' <thead class=\"ui-widget-header\">' . nl;\n $output .= ' <tr><th colspan=\"5\">' . ($title ? $title : TEXT_ATTRIBUTES) . '</th></tr>' . nl;\n $output .= ' </thead>' . nl;\n $output .= ' <tbody class=\"ui-widget-content\">' . nl;\n if ($showtrunc) {\n $output .= ' <tr>' . nl;\n $output .= ' <td colspan=\"2\">' . TEXT_TRUNCATE . html_radio_field($pre.'box_trun_' . $i, '0', (!$properties->truncate) ? true : false) . TEXT_NO . html_radio_field($pre.'box_trun_' . $i, '1', ($properties->truncate) ? true : false) . TEXT_YES . '</td>' . nl;\n $output .= ' <td colspan=\"3\">' . TEXT_DISPLAY_ON . html_radio_field($pre.'box_last_' . $i, '0', (!$properties->display || $properties->display == '0') ? true : false) . TEXT_ALL_PAGES . html_radio_field($pre.'box_last_' . $i, '1', ($properties->display == '1') ? true : false) . TEXT_FIRST_PAGE . html_radio_field($pre.'box_last_' . $i, '2', ($properties->display == '2') ? true : false) . TEXT_LAST_PAGE . '</td>' . nl;\n $output .= ' </tr>' . nl;\n }\n if ($showfont) {\n $output .= ' <tr class=\"ui-widget-header\">' . nl;\n $output .= ' <th>' . '&nbsp;' . '</th>' . nl;\n $output .= ' <th>' . TEXT_STYLE . '</th>' . nl;\n $output .= ' <th>' . TEXT_SIZE . '</th>' . nl;\n $output .= ' <th>' . TEXT_ALIGN . '</th>' . nl;\n $output .= ' <th>' . TEXT_COLOR . '</th>' . nl;\n $output .= ' </tr>' . nl;\n $output .= ' <tr>' . nl;\n $output .= ' <td>' . TEXT_FONT .'</td>' . nl;\n $output .= ' <td>' . html_pull_down_menu($pre.'box_fnt_' . $i, $kFonts, $font) . '</td>' . nl;\n $output .= ' <td>' . html_pull_down_menu($pre.'box_size_'. $i, $kFontSizes, $size) . '</td>' . nl;\n $output .= ' <td>' . html_pull_down_menu($pre.'box_aln_' . $i, $kFontAlign, $align) . '</td>' . nl;\n $output .= ' <td id=\"' . $pre.'box_td_' . $i . '\" style=\"background-color:#' . convertPfColor($color) . '\">' . nl;\n $output .= ' <div id=\"' . $pre.'box_whl_' . $i . '\" \n\t onmousemove=\"moved(event, \\''.$pre.'box_whl_' . $i . '\\', \\''.$pre.'box_td_' . $i . '\\', \\''.$pre.'box_clr_' . $i . '\\')\" \n\t onclick=\"setCustom(\\''.$pre.'box_whl_' . $i . '\\', \\''.$pre.'sel_clr_' . $i . '\\')\" style=\"position:absolute; display:none; top:0px; left:0px; z-index:10000\">\n\t <img src=\"'.DIR_WS_MODULES.'phreeform/images/colorwheel.jpg\" width=\"256\" height=\"256\" alt=\"\" />' . nl;\n $output .= ' </div>' . nl;\n $output .= html_hidden_field($pre.'box_clr_' . $i, $color ? $color : '0:0:0') . nl;\n $output .= html_pull_down_menu($pre.'sel_clr_' . $i, $kFontColors, $color ? $color : '0:0:0', 'onchange=\"colorSet(\\''.$pre.'sel_clr_' . $i . '\\', \\''.$pre.'box_td_' . $i . '\\', \\''.$pre.'box_clr_' . $i . '\\')\"') . nl;\n $output .= html_icon('categories/applications-graphics.png', TEXT_CUSTOM, 'small', 'onclick=\"showCustom(\\''.$pre.'box_whl_' . $i . '\\', \\''.$pre.'sel_clr_' . $i . '\\')\"') . nl;\n $output .= ' </td>'. nl;\n $output .= ' </tr>' . nl;\n }\n if ($showborder) {\n $output .= ' <tr>' . nl;\n $output .= ' <td>' . TEXT_BORDER_AREA . '</td>' . nl;\n $output .= ' <td>' . html_checkbox_field($pre.'box_bdr_' . $i, '1', ($bordershow) ? true : false) . '</td>' . nl;\n $output .= ' <td>' . html_pull_down_menu($pre.'box_bsz_' . $i, $kLineSizes, $bordersize) . TEXT_POINTS . '</td>' . nl;\n $output .= ' <td>' . '&nbsp;' . '</td>' . nl;\n $output .= ' <td id=\"'.$pre.'box_btd_' . $i . '\" style=\"background-color:#' . convertPfColor($bordercolor) . '\">' . nl;\n $output .= ' <div id=\"'.$pre.'box_bwhl_' . $i . '\" \n\t onmousemove=\"moved(event, \\''.$pre.'box_bwhl_' . $i . '\\', \\''.$pre.'box_btd_' . $i . '\\', \\''.$pre.'box_bclr_' . $i . '\\')\" \n\t onclick=\"setCustom(\\''.$pre.'box_bwhl_' . $i . '\\', \\''.$pre.'sel_bclr_' . $i . '\\')\" style=\"position:absolute; display:none; top:0px; left:0px; z-index:10000\">\n\t <img src=\"'.DIR_WS_MODULES.'phreeform/images/colorwheel.jpg\" width=\"256\" height=\"256\" alt=\"\" />' . nl;\n $output .= ' </div>' . nl;\n $output .= html_hidden_field($pre.'box_bclr_' . $i, $bordercolor ? $bordercolor : '0:0:0') . nl;\n $output .= html_pull_down_menu($pre.'sel_bclr_' . $i, $kFontColors, $bordercolor ? $bordercolor : '0:0:0', 'onchange=\"colorSet(\\''.$pre.'sel_bclr_' . $i . '\\', \\''.$pre.'box_btd_' . $i . '\\', \\''.$pre.'box_bclr_' . $i . '\\')\"') . nl;\n $output .= html_icon('categories/applications-graphics.png', TEXT_CUSTOM, 'small', 'onclick=\"showCustom(\\''.$pre.'box_bwhl_' . $i . '\\', \\''.$pre.'sel_bclr_' . $i . '\\')\"') . nl;\n $output .= ' </td>'. nl;\n $output .= '</tr>' . nl;\n }\n if ($showfill) {\n $output .= '<tr>' . nl;\n $output .= ' <td>'. TEXT_FILL_AREA . '</td>' . nl;\n $output .= ' <td>'. html_checkbox_field($pre.'box_fill_' . $i, '1', ($fillshow) ? true : false) . '</td>' . nl;\n $output .= ' <td>'. '&nbsp;' . '</td>' . nl;\n $output .= ' <td>'. '&nbsp;' . '</td>' . nl;\n $output .= ' <td id=\"'.$pre.'box_ftd_' . $i .'\" style=\"background-color:#' . convertPfColor($fillcolor) .'\">' . nl;\n $output .= ' <div id=\"'.$pre.'box_fwhl_' . $i . '\" \n\t onmousemove=\"moved(event, \\''.$pre.'box_fwhl_' . $i . '\\', \\''.$pre.'box_ftd_' . $i . '\\', \\''.$pre.'box_fclr_' . $i . '\\')\" \n\t onclick=\"setCustom(\\''.$pre.'box_fwhl_' . $i . '\\', \\''.$pre.'sel_fclr_' . $i . '\\')\" style=\"position:absolute; display:none; top:0px; left:0px; z-index:10000\">\n\t <img src=\"'.DIR_WS_MODULES.'phreeform/images/colorwheel.jpg\" width=\"256\" height=\"256\" alt=\"\" />' . nl;\n $output .= ' </div>' . nl;\n $output .= html_hidden_field($pre.'box_fclr_' . $i, $fillcolor ? $fillcolor : '0:0:0') . nl;\n $output .= html_pull_down_menu($pre.'sel_fclr_' . $i, $kFontColors, $fillcolor ? $fillcolor : '0:0:0', 'onchange=\"colorSet(\\''.$pre.'sel_fclr_' . $i . '\\', \\''.$pre.'box_ftd_' . $i . '\\', \\''.$pre.'box_fclr_' . $i . '\\')\"') . nl;\n $output .= html_icon('categories/applications-graphics.png', TEXT_CUSTOM, 'small', 'onclick=\"showCustom(\\''.$pre.'box_fwhl_' . $i . '\\', \\''.$pre.'sel_fclr_' . $i . '\\')\"') . nl;\n $output .= ' </td>'. nl;\n $output .= '</tr>' . nl;\n }\n $output .= '</tbody></table>' . nl;\n return $output;\n}", "function showform() {\r\n $this->showerror();\r\n\r\n # make sure cursor does not point to invalid index\r\n if ($this->_cursor > ($this->db_count-1)) $this->_cursor = $this->db_count-1;\r\n if ($this->_cursor < 0) $this->_cursor = 0;\r\n\r\n $this->grid_command[] = array('csv',lang('Generate CSV'));\r\n\r\n # prepare javascript validation and confirmation function for each action\r\n echo '<!-- 1223 --> <script type=\"text/javascript\">';\r\n if ($this->action == 'browse') {\r\n echo 'function form_submit_confirm(myform) {\r\n action = myform.elements[\\'act\\'].value;\r\n if (action == \\'del\\') {\r\n if (!confirm(\\''.lang('Are you sure you want to delete').'?\\')) {\r\n return false;\r\n }\r\n myform.submit();\r\n return true;\r\n }\r\n else {\r\n myform.submit();\r\n return true;\r\n }\r\n return false;\r\n }\r\n ';\r\n } else { # callback to function like $this->form_submit_confirm_new()\r\n echo $this->{'form_submit_confirm_'.$this->action}();\r\n }\r\n\r\n echo '</script>';\r\n\r\n echo '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" summary=\"paging\">'; //style=\"border-collapse: collapse;\"\r\n echo '<tr valign=\"top\">';\r\n\r\n if ($this->action == 'browse') {\r\n if ($this->db_count > 1) {\r\n echo '<td valign=\"top\" nowrap>&nbsp;&nbsp;';\r\n # determine on which index current rowid is\r\n if ($this->_cursor > 0) {\r\n $r = 0;\r\n $url = $_SERVER['PHP_SELF'].'?m='.$this->module.'&amp;act=browse&amp;cursor='.$r.'&amp;orderby='.$this->_orderby.'&amp;sortdir='.$this->_sortdir.'&amp;query='.urlencode($this->_query).'&amp;qf='.urlencode($_REQUEST['qf']);\r\n echo '<a href=\"'.$url.'\"><img src=\"images/b_firstpage.gif\" border=\"0\" alt=\"first record\"></a> ';\r\n $r = $this->_cursor - 1;\r\n $url = $_SERVER['PHP_SELF'].'?m='.$this->module.'&amp;act=browse&amp;cursor='.$r.'&amp;orderby='.$this->_orderby.'&amp;sortdir='.$this->_sortdir.'&amp;query='.urlencode($this->_query).'&amp;qf='.urlencode($_REQUEST['qf']);\r\n echo '<a href=\"'.$url.'\"><img src=\"images/b_prevpage.gif\" border=\"0\" alt=\"prev record\"></a> ';\r\n }\r\n else {\r\n echo '<img src=\"images/bd_firstpage.gif\" border=\"0\" alt=\"first record\"> ';\r\n echo '<img src=\"images/bd_prevpage.gif\" border=\"0\" alt=\"prev record\"> ';\r\n }\r\n\r\n if ($this->_cursor < ($this->db_count -1)) {\r\n $r = $this->_cursor + 1;\r\n $url = $_SERVER['PHP_SELF'].'?m='.$this->module.'&amp;act=browse&amp;cursor='.$r.'&amp;orderby='.$this->_orderby.'&amp;sortdir='.$this->_sortdir.'&amp;query='.urlencode($this->_query).'&amp;qf='.urlencode($_REQUEST['qf']);\r\n echo '<a href=\"'.$url.'\"><img src=\"images/b_nextpage.gif\" border=\"0\" alt=\"next record\"></a> ';\r\n $r = $this->db_count - 1;\r\n $url = $_SERVER['PHP_SELF'].'?m='.$this->module.'&amp;act=browse&amp;cursor='.$r.'&amp;orderby='.$this->_orderby.'&amp;sortdir='.$this->_sortdir.'&amp;query='.urlencode($this->_query).'&amp;qf='.urlencode($_REQUEST['qf']);\r\n echo '<a href=\"'.$url.'\"><img src=\"images/b_lastpage.gif\" border=\"0\" alt=\"last record\"></a> ';\r\n }\r\n else {\r\n echo '<img src=\"images/bd_nextpage.gif\" border=\"0\" alt=\"next record\"> ';\r\n echo '<img src=\"images/bd_lastpage.gif\" border=\"0\" alt=\"last record\"> ';\r\n }\r\n echo '</td>';\r\n }\r\n echo '<form method=\"POST\" action=\"'.$_SERVER['PHP_SELF'].'\">';\r\n echo '<input type=hidden name=m value=\"'.$this->module.'\">';\r\n echo '<input type=hidden name=go value=\"'.htmlentities($GLOBALS['full_self_url']).'\">'; # url to go after successful submitation\r\n echo '<input type=hidden name=\"rowid[]\" value=\"'.$this->ds->_rowid[$this->_cursor].'\">'; # for edit-action\r\n echo '<input type=\"hidden\" name=\"act\">';\r\n echo '<td>&nbsp;&nbsp;';\r\n echo '<input type=\"button\" onclick=\"this.form.act.value = \\'edit\\';form_submit_confirm(this.form);\" value=\"'.lang('Edit').'\" '.(($this->allow_edit and $this->db_count > 0)?'':'disabled').'> ';\r\n echo '<input type=\"button\" onclick=\"this.form.act.value = \\'del\\';form_submit_confirm(this.form);\" value=\"'.lang('Delete').'\" '.(($this->allow_delete and $this->db_count > 0)?'':'disabled').'> ';\r\n echo '<input type=\"button\" onclick=\"this.form.act.value = \\'duplicate\\';form_submit_confirm(this.form);\" value=\"'.lang('Duplicate').'\" '.(($this->allow_duplicate and $this->db_count > 0)?'':'disabled').'> ';\r\n echo '<input type=\"button\" onclick=\"this.form.act.value = \\'view\\';form_submit_confirm(this.form);\" value=\"'.lang('View').'\" '.(($this->allow_view and $this->db_count > 0)?'':'disabled').'> ';\r\n echo '<input type=\"button\" onclick=\"this.form.act.value = \\'new\\';form_submit_confirm(this.form);\" value=\"'.lang('New').'\" '.($this->allow_new?'':'disabled').'> ';\r\n\r\n if (count($this->grid_command))\r\n echo ' | Other: ';\r\n\r\n foreach ($this->grid_command as $command) {\r\n #~ echo '<input type=\"button\" onclick=\"this.form.act.value = \\''.$command[0].'\\';submit_confirm(this.form);\" value=\"'.lang($command[1]).'\"> ';\r\n echo '<input type=\"button\" onclick=\"this.form.act.value = \\''.$command[0].'\\';this.form.submit();\" value=\"'.lang($command[1]).'\"> ';\r\n }\r\n echo '</form>';\r\n echo '</td>';\r\n }\r\n echo '</tr></table>'; //outer table\r\n\r\n if ($this->_query != '') {\r\n if ($this->db_count == 0) {\r\n echo '<p><b>'.lang('The search').' \"'.$this->_query.'\" '.lang('returns no record').'</b>. <a href=\"'.$_SERVER['PHP_SELF'].'?m='.$this->module.'\">'.lang('Reset Search').'</a>.</p>';\r\n return;\r\n }\r\n else {\r\n echo '<p><b>'.lang('The search').' \"'.$this->_query.'\" '.lang('found').' '.$this->db_count.' '.lang($this->unit).'</b>. <a href=\"'.$_SERVER['PHP_SELF'].'?m='.$this->module.'\">'.lang('Reset Search').'</a>.</p>';\r\n }\r\n }\r\n\r\n echo $this->body[$this->action]['prefix']; # show prefix body\r\n\r\n echo '<table border=\"0\" summary=\"form format\">';\r\n # form for new record\r\n echo '<form method=post enctype=\"multipart/form-data\" action=\"'.$_SERVER['PHP_SELF'].'\" onSubmit=\"return form_submit_confirm(this);\" autocomplete=\"off\">';\r\n echo '<input type=hidden name=m value=\"'.$this->module.'\">'; # this module\r\n echo '<input type=hidden name=act value=\"'.$this->action.'\">'; # contains the action (edit/new)\r\n #~ echo '<input type=hidden name=save value=\"'.$this->_save.'\">'; # marker to indicate form submitation\r\n if (!$this->_preview)\r\n echo '<input type=hidden name=save value=\"-1\">'; # marker to indicate form submitation\r\n else\r\n echo '<input type=hidden name=save value=\"1\">'; # marker to indicate form submitation\r\n #~ echo '<input type=hidden name=save value=\"-1\">'; # marker to indicate form submitation\r\n echo '<input type=hidden name=go value=\"'.htmlentities($this->_go).'\">'; # url to go after successful submitation\r\n echo '<input type=hidden name=\"num_row\" value=\"'.$this->db_count.'\">';\r\n echo '<input type=hidden name=\"rowid['.$this->_cursor.']\" value=\"'.$this->ds->_rowid[$this->_cursor].'\">'; # for edit-action\r\n\r\n # decide, which columns to show in form\r\n $this->colgrid = array();\r\n foreach ($this->properties as $key=>$col) {\r\n if ($this->action == 'browse' and $col->hidden) continue;\r\n if ($this->action == 'edit' and !$col->updatable) continue;\r\n if ($this->action == 'new' and !$col->insertable) continue;\r\n $this->colgrid[] = $key;\r\n }\r\n $i = 0; # html table rows\r\n $i2 = 0; # datasource columns\r\n\r\n for ($ci = 0; $ci < count($this->colgrid); $ci++) {\r\n $colvar = $this->colgrid[$ci];\r\n $i2++;\r\n $col = &$this->properties[$colvar];\r\n\r\n if ($col->box_start != '') { # box start append a title line\r\n echo '<tr><td colspan=\"2\"><br><b>'.$col->box_start.'</b></td></tr>';\r\n }\r\n\r\n if ($this->action != 'browse' or $this->browse_mode != 'form' or ($i2 % $this->browse_form_cols == 1)) {\r\n $rowcolour = ($i++ % 2 == 0)? 'greyformlight': 'greyformdark';\r\n echo '<tr class=\"'.$rowcolour.'\">';\r\n }\r\n\r\n echo '<td>';\r\n #~ if ($this->action != 'browse' and $col->required)\r\n #~ echo '<span class=\"asterix\">*</span>';\r\n $label = $col->colspan_label != ''? $col->colspan_label: $col->label;\r\n #~ if ($col->is_key)\r\n #~ echo '<b>'.$label.'</b>';\r\n #~ else\r\n echo $label;\r\n echo '</td>';\r\n\r\n echo '<td>';\r\n $max_colspan = $col->colspan; # save this first, since $col will be change on subsequent loops\r\n for ($colspan=0; $colspan < $max_colspan; $colspan++) {\r\n $colvar = $this->colgrid[$ci + $colspan];\r\n $col = &$this->properties[$colvar];\r\n $value = $this->ds->{$colvar}[$this->_cursor];\r\n if ($this->_preview) { # preview me\r\n echo '<input type=\"hidden\" name=\"field['.$colvar.']['.$this->_cursor.']\" value=\"'.$value.'\">';\r\n echo ' '.$value.' ';\r\n }\r\n else {\r\n echo $col->prefix_text;\r\n if ($this->action == 'browse') {\r\n if ($col->enumerate) { # if field is enumerated, get the enumerate value instead\r\n $value = '';\r\n if (is_string($col->enumerate) and $value != '') {\r\n $e = instantiate_module($col->enumerate);\r\n $value = $e->enum_decode($value);\r\n if ($value === False) {\r\n $col->notes = '<span style=\"color:f00\"><b>(ref?)</b></span> '.$col->notes;\r\n }\r\n }\r\n elseif (is_array($col->enumerate)) {\r\n $value = $col->enumerate[$value];\r\n }\r\n }\r\n elseif ($col->inputtype=='combobox' and $col->choices) { # if field is using simple enumeration, also get the choice value instead\r\n $value = $col->choices[$value];\r\n }\r\n else {\r\n #~ $value = $this->ds->{$colvar}[$rowindex];\r\n #pass\r\n }\r\n\r\n if ($col->inputtype == 'combobox') {\r\n $col->inputtype = 'text';\r\n }\r\n }\r\n\r\n if ($this->action == 'browse' and $this->browse_form_statictext) {\r\n echo '<b>';\r\n echo ' '.$value.' ';\r\n echo '</b>';\r\n }\r\n else {\r\n $this->input_widget(\"field[$colvar][{$this->_cursor}]\", $value, $colvar);\r\n }\r\n }\r\n }\r\n $ci += $max_colspan - 1; # since ->colspan starts at 1\r\n if ($this->action != 'browse' and $this->_save != -1) # edit/add mode and not preview\r\n echo '&nbsp;'.$col->notes;\r\n echo '</td>';\r\n\r\n if ($this->action != 'browse' or $this->browse_mode != 'form' or ($i2 % $this->browse_form_cols == 0)) {\r\n echo \"</tr>\\r\\n\";\r\n }\r\n\r\n if ($col->box_end) {\r\n echo '<tr><td colspan=\"2\"><br></td></tr>';\r\n }\r\n\r\n\r\n }\r\n echo '</table>';\r\n\r\n # show prefix/suffix body\r\n if (method_exists($this, $this->body[$this->action]['suffix'])) # give chance for suffix to execute them self.\r\n echo $this->{$this->body[$this->action]['suffix']}();\r\n else\r\n echo $this->body[$this->action]['suffix'];\r\n\r\n $_submitlabel = ($this->preview[$this->action] and !$this->_preview)? ' '.lang('Preview').' ': ' '.$this->submit_label['new'].' ';\r\n if ($this->action != 'browse') {\r\n echo '<p><input type=submit value=\"'.$_submitlabel.'\"> | ';\r\n #~ echo '<b><a href=\"'.$this->_go.'\">Cancel</a></b></p>';\r\n echo '<input type=button value=\"'.lang('Cancel').'\" onclick=\"window.location=\\''.$this->_go.'\\'\">';\r\n #~ echo '<b><a href=\"\" onclick=\"window.history.back();return false;\">Cancel</a></b>';\r\n }\r\n echo '</form>';\r\n\r\n # show suffix2 body (after previous big form)\r\n if (method_exists($this, $this->body[$this->action]['suffix2'])) # give chance for suffix to execute them self.\r\n echo $this->{$this->body[$this->action]['suffix2']}();\r\n else\r\n echo $this->body[$this->action]['suffix2'];\r\n }", "protected function formCreate() {\n\t\t$this->pxyLink = new \\QCubed\\Control\\Proxy($this);\n\t\t$this->pxyLink->AddAction(new \\QCubed\\Event\\MouseOver(), new \\QCubed\\Action\\Ajax('mouseOver'));\n\n\t\t// Define the DataGrid\n\t\t$this->tblProjects = new \\QCubed\\Project\\Control\\Table($this);\n\n\t\t// This css class is used to style alternate rows and the header, all in css\n\t\t$this->tblProjects->CssClass = 'simple_table';\n\n\t\t// Define Columns\n\n\t\t// Create a link column that shows the name of the project, and when clicked, calls back to this page with an id\n\t\t// of the item clicked on\n\t\t$this->tblProjects->CreateLinkColumn('Project', '->Name', \\QCubed\\Project\\Application::instance()->context()->scriptName(), ['intId'=>'->Id']);\n\n\t\t// Create a link column using a proxy\n\t\t$col = $this->tblProjects->CreateLinkColumn('Status', '->ProjectStatusType', $this->pxyLink, '->Id');\n\n\t\t$this->tblProjects->SetDataBinder('tblProjects_Bind');\n\n\t\t$this->pnlClick = new \\QCubed\\Control\\Panel($this);\n\n\t\tif (($intId = \\QCubed\\Project\\Application::instance()->context()->queryStringItem('intId')) && ($objProject = Project::Load($intId))) {\n\t\t\t$this->pnlClick->Text = 'You clicked on ' . $objProject->Name;\n\t\t}\n\n\t}", "public function definition() {\n\t\t\tglobal $CFG, $DB;\t\n\t\t\n\t\t$mform = $this->_form; // Don't forget the underscore!\n\t\n\t\t$result= $DB->get_records_sql(\"SELECT DISTINCT `intensidad` FROM `mdl_ejercicios`\");\n\t\t$result_tren= $DB->get_records_sql(\"SELECT DISTINCT `categoria` FROM `mdl_ejercicios`\");\n\t\t$options= array();\n\t\tforeach($result as $rs)\n\t\t\t\t$options[$rs->intensidad] = $rs->intensidad;\n\t\t\n\t\t$options_tren= array();\n\t\tforeach ($result_tren as $rst)\n\t\t\t$options_tren[$rst->categoria]= $rst->categoria;\n\t\t$mform->addElement('header', 'header', 'Para crear una rutina aleatoria');\n\t\t\n\t\t$mform->addElement('select', 'intensidad', '¿Qué intensidad quieres?:',$options);\n\n\t\t//$mform->addElement('select', 'categoria', '¿Qué tren de tu cuerpo quieres trabajar?:',$options_tren);\n\t\t\n\t\t\n\t\t$buttonarray=array();\n\t\t$buttonarray[] = &$mform->createElement('submit', 'submitbutton', 'Buscar rutina');\n\t\t$buttonarray[] = &$mform->createElement('reset', 'resetbutton', 'Resetear');\n\t\t$buttonarray[] = &$mform->createElement('cancel', 'cancel', 'Cancelar');\n\t\t$mform->addGroup($buttonarray, 'buttonar', '', array(' '), false);\n\t\t$mform->addElement('hidden', 'end');\n\t\t$mform->setType('end', PARAM_NOTAGS);\n\t\t$mform->closeHeaderBefore('end');\n\t}", "protected function createComponentRateForm()\r\n\t{\r\n\t\t$form = new Form;\r\n\t\t$form->addText('tarif', 'Tarifní sazba:')\r\n\t\t\t\t->setRequired('Uveďte tarifní hodinovou sazbu.')\r\n\t\t\t\t->setAttribute('class', 'cislo')\r\n\t\t\t\t->addFilter(array('Nette\\Forms\\Controls\\TextBase', 'filterFloat'))\r\n\t\t\t\t\t->controlPrototype->autocomplete('off')\r\n\t\t\t\t->addCondition($form::FILLED)\r\n\t\t\t\t\t\t->addRule($form::FLOAT, 'Hodnota musí být celé nebo reálné číslo.');\r\n\t\t\r\n\t\t$form->addText('hodnota', 'Kalkulační hodnota:')\r\n\t\t\t\t->setRequired('Uveďte kalkulační hodnotu tarifu.')\r\n\t\t\t\t->setAttribute('class', 'cislo')\r\n\t\t\t\t->addFilter(array('Nette\\Forms\\Controls\\TextBase', 'filterFloat'))\r\n\t\t\t\t\t->controlPrototype->autocomplete('off')\r\n\t\t\t\t->addCondition($form::FILLED)\r\n\t\t\t\t\t\t->addRule($form::FLOAT, 'Hodnota musí být celé nebo reálné číslo.');\r\n\r\n\t\t$form->addHidden('id_set_tarifu');\r\n\t\t$form->addHidden('id_typy_tarifu');\r\n\r\n\t\t$form->addSubmit('save', 'Uložit')->setAttribute('class', 'default');\r\n\t\t$form->addSubmit('cancel', 'Storno')->setValidationScope(FALSE);\r\n\t\t$form->onSuccess[] = callback($this, 'rateFormSubmitted');\r\n\r\n\t\t$form->addProtection(self::MESS_PROTECT);\r\n\t\treturn $form;\r\n\t}", "public function buildForm(array $form, FormStateInterface $form_state) {\n // Call the parent implementation to inherit from the save button and\n // form style.\n $form = parent::buildForm($form, $form_state);\n\n // Add our custom form fields.\n $form['opening_hours'] = array(\n '#type' => 'textarea',\n '#title' => 'Opening hours',\n '#description' => 'Days / hours of the library',\n '#default_value' => $this->config('happy_alexandrie.library_config')->get('opening_hours'),\n '#rows' => 5,\n );\n return $form;\n }", "public function generate()\n {\n switch ($this->sColumn) {\n case 'description':\n $this->oForm->addElement(\n new Textarea(\n t('Description:'),\n $this->sColumn,\n [\n 'id' => $this->getFieldId('str'),\n 'onblur' => 'CValid(this.value,this.id,20,4000)',\n 'value' => $this->sVal,\n 'validation' => new Str(20, 4000),\n 'required' => 1\n ]\n )\n );\n $this->addCheckErrSpan('str');\n break;\n\n case 'punchline':\n $this->oForm->addElement(\n new Textbox(\n t('Punchline/Headline:'),\n 'punchline',\n [\n 'id' => $this->getFieldId('str'),\n 'onblur' => 'CValid(this.value,this.id,5,150)',\n 'value' => $this->sVal,\n 'validation' => new Str(5, 150)\n ]\n )\n );\n $this->addCheckErrSpan('str');\n break;\n\n case 'country':\n $this->oForm->addElement(\n new Country(\n t('Country:'),\n $this->sColumn,\n [\n 'id' => $this->getFieldId('str'),\n 'value' => $this->sVal,\n 'required' => 1\n ]\n )\n );\n break;\n\n case 'city':\n $this->oForm->addElement(\n new Textbox(\n t('City:'),\n $this->sColumn,\n [\n 'id' => $this->getFieldId('str'),\n 'onblur' => 'CValid(this.value,this.id,2,150)',\n 'value' => $this->sVal,\n 'validation' => new Str(2, 150),\n 'required' => 1\n ]\n )\n );\n $this->addCheckErrSpan('str');\n break;\n\n case 'state':\n $this->oForm->addElement(\n new Textbox(\n t('State/Province:'),\n $this->sColumn,\n [\n 'id' => $this->getFieldId('str'),\n 'onblur' => 'CValid(this.value,this.id,2,150)',\n 'value' => $this->sVal,\n 'validation' => new Str(2, 150)\n ]\n )\n );\n $this->addCheckErrSpan('str');\n break;\n\n case 'zipCode':\n $this->oForm->addElement(\n new Textbox(\n t('Postal Code:'),\n $this->sColumn,\n [\n 'id' => $this->getFieldId('str'),\n 'onblur' => 'CValid(this.value,this.id,2,15)',\n 'value' => $this->sVal,\n 'validation' => new Str(2, 15)\n ]\n )\n );\n $this->addCheckErrSpan('str');\n break;\n\n case 'middleName':\n $this->oForm->addElement(\n new Textbox(\n t('Middle Name:'),\n $this->sColumn,\n [\n 'id' => $this->getFieldId('name'),\n 'onblur' => 'CValid(this.value,this.id)',\n 'value' => $this->sVal,\n 'validation' => new Name\n ]\n )\n );\n $this->addCheckErrSpan('name');\n break;\n\n case 'height':\n $this->oForm->addElement(\n new Height(\n t('Height:'),\n $this->sColumn,\n [\n 'value' => $this->sVal\n ]\n )\n );\n break;\n\n case 'weight':\n $this->oForm->addElement(\n new Weight(\n t('Weight:'),\n $this->sColumn,\n [\n 'value' => $this->sVal\n ]\n )\n );\n break;\n\n case 'website':\n case 'socialNetworkSite':\n $sLabel = $this->sColumn === 'socialNetworkSite' ? t('Social Media Profile:') : t('Website:');\n $sDesc = $this->sColumn === 'socialNetworkSite' ? t('The URL of your social profile, such as Facebook, Instagram, Snapchat, LinkedIn, ...') : t('Your Personal Website/Blog (any promotional/affiliated contents will be removed)');\n $this->oForm->addElement(\n new Url(\n $sLabel,\n $this->sColumn, [\n 'id' => $this->getFieldId('url'),\n 'onblur' => 'CValid(this.value,this.id)',\n 'description' => $sDesc,\n 'value' => $this->sVal\n ]\n )\n );\n $this->addCheckErrSpan('url');\n break;\n\n case 'phone':\n $this->oForm->addElement(\n new Phone(\n t('Phone Number:'),\n $this->sColumn,\n array_merge(\n [\n 'id' => $this->getFieldId('phone'),\n 'onblur' => 'CValid(this.value, this.id)',\n 'value' => $this->sVal,\n ],\n self::setCustomValidity(\n t('Enter full number with area code.')\n ),\n )\n )\n );\n $this->addCheckErrSpan('phone');\n break;\n\n default:\n $sLangKey = strtolower($this->sColumn);\n $sClass = '\\PFBC\\Element\\\\' . $this->getFieldType();\n $this->oForm->addElement(new $sClass(t($sLangKey), $this->sColumn, ['value' => $this->sVal]));\n }\n\n return $this->oForm;\n }", "public function MapperForm()\n {\n $fields = new FieldList(\n CheckboxField::create(\n \"HasHeader\",\n \"This data includes a header row.\",\n true\n )\n );\n if ($this->component->getCanClearData()) {\n $fields->push(\n CheckboxField::create(\n \"ClearData\",\n \"Remove all existing records before import.\"\n )\n );\n }\n $actions = FieldList::create(\n FormAction::create(\"import\", \"Import CSV\")\n ->setUseButtonTag(true)\n ->addExtraClass(\"btn btn-primary btn--icon-large font-icon-upload\"),\n FormAction::create(\"cancel\", \"Cancel\")\n ->setUseButtonTag(true)\n ->addExtraClass(\"btn btn-outline-danger btn-hide-outline font-icon-cancel-circled\")\n );\n\n $form = new Form($this, __FUNCTION__, $fields, $actions);\n\n return $form;\n }", "public function ajax_example_progressbar_callback($form, &$form_state) {\n $variable_name = 'example_progressbar_' . $form_state['time'];\n $commands = array();\n\n variable_set($variable_name, 10);\n sleep(2);\n variable_set($variable_name, 40);\n sleep(2);\n variable_set($variable_name, 70);\n sleep(2);\n variable_set($variable_name, 90);\n sleep(2);\n variable_del($variable_name);\n\n $commands[] = HtmlCommand('#progress-status', $this->t('Executed.'));\n\n return array(\n '#type' => 'ajax',\n '#commands' => $commands,\n );\n}", "protected function buildForm()\n {\n $this->formBuilder\n ->add('host', 'text', array(\n 'data' => ElasticProduct::getConfigValue('host'),\n 'required' => false,\n 'attr' => ['placeholder' => 'localhost'],\n 'label' => Translator::getInstance()->trans('Host', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'host'\n )\n ))\n ->add('port', 'text', array(\n 'data' => ElasticProduct::getConfigValue('port'),\n 'required' => false,\n 'attr' => ['placeholder' => '9200'],\n 'label' => Translator::getInstance()->trans('Port', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'port'\n )\n ))\n ->add('username', 'text', array(\n 'data' => ElasticProduct::getConfigValue('username'),\n 'required' => false,\n 'label' => Translator::getInstance()->trans('Username', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'username'\n )\n ))\n ->add('password', PasswordType::class, array(\n 'data' => ElasticProduct::getConfigValue('password'),\n 'required' => false,\n 'label' => Translator::getInstance()->trans('Password', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'password'\n )\n ))\n ->add('index_prefix', 'text', array(\n 'data' => ElasticProduct::getConfigValue('index_prefix'),\n 'required' => false,\n 'attr' => ['placeholder' => 'my_website_name'],\n 'label' => Translator::getInstance()->trans('Index prefix', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'index_prefix'\n )\n ));\n }", "protected function form()\n {\n $form = new Form(new Task);\n\n $form->text('eid', 'Eid');\n $form->text('store', 'Store');\n $form->text('etype', 'Etype');\n $form->text('uid', 'Uid');\n $form->text('uname', 'Uname');\n $form->text('qq', 'Qq');\n $form->number('qtype', 'Qtype');\n $form->number('times', 'Times')->default(1);\n $form->textarea('content', 'Content');\n $form->text('deadline', 'Deadline');\n $form->file('file', 'File');\n $form->number('isok', 'Isok');\n $form->number('istag', 'Istag');\n $form->text('sid', 'Sid');\n $form->text('sname', 'Sname');\n $form->text('score', 'Score');\n\n return $form;\n }", "function usp_ews_completion_progress($iCompletion, $colour='') {\n\t// total width block - completed percentage\n\t$width = 100 - $iCompletion;\n\t\n\tif($colour == ''){\n\t\t$colour = usp_ews_find_color_percentage($iCompletion);\n\t}\n\t// html content\n\t// creating the bar in table \n\t$contenthtml = '';\n\t\n\t// inline css for the table properties\n\t$tableoption = array('class' => 'usp_ewsBarDashboardTable');\n\t$contenthtml .= HTML_WRITER::start_tag('table', $tableoption); // <table>\n\n\t$contenthtml .= HTML_WRITER::start_tag('tr'); // <tr>\n\t// <td> properties\n\t$tdoption = array('class' => 'usp_ewsotherCell',\n\t\t\t\t\t\t'title' => \"$iCompletion%\",\t\t\t\t\t\t\n\t\t\t\t\t\t'style' => 'background:' . $colour .'; width:' . $iCompletion . '%;');\n\t$contenthtml .= HTML_WRITER::start_tag('td', $tdoption); // <td>\n\t$contenthtml .= HTML_WRITER::end_tag('td'); // </td>\n\t\n\t$tdoption1 = array( 'class' => 'usp_ewsotherCell',\t\t\t\t\t\t\n\t\t\t\t\t\t'style' => 'background:#D3D3D3; width:' . $width . '%;');\n\t$contenthtml .= HTML_WRITER::start_tag('td', $tdoption1); // <td>\t \t\t\t\t\n\t$contenthtml .= HTML_WRITER::end_tag('td'); // </td>\n\n\t$contenthtml .= HTML_WRITER::end_tag('tr'); // </tr>\n\t$contenthtml .= HTML_WRITER::end_tag('table'); // <table>\n\n\t// returns the content\n\treturn $contenthtml;\n}", "protected function Form_Create() {\n\t\t\t$this->dtgTenPAssessments = new TenPAssessmentDataGrid($this);\n\n\t\t\t// Style the DataGrid (if desired)\n\t\t\t$this->dtgTenPAssessments->CssClass = 'datagrid';\n\t\t\t$this->dtgTenPAssessments->AlternateRowStyle->CssClass = 'alternate';\n\n\t\t\t// Add Pagination (if desired)\n\t\t\t$this->dtgTenPAssessments->Paginator = new QPaginator($this->dtgTenPAssessments);\n\t\t\t$this->dtgTenPAssessments->ItemsPerPage = 20;\n\n\t\t\t// Use the MetaDataGrid functionality to add Columns for this datagrid\n\n\t\t\t// Create an Edit Column\n\t\t\t$strEditPageUrl = __VIRTUAL_DIRECTORY__ . __FORM_DRAFTS__ . '/ten_p_assessment_edit.php';\n\t\t\t$this->dtgTenPAssessments->MetaAddEditLinkColumn($strEditPageUrl, 'Edit', 'Edit');\n\n\t\t\t// Create the Other Columns (note that you can use strings for ten_p_assessment's properties, or you\n\t\t\t// can traverse down QQN::ten_p_assessment() to display fields that are down the hierarchy)\n\t\t\t$this->dtgTenPAssessments->MetaAddColumn('Id');\n\t\t\t$this->dtgTenPAssessments->MetaAddColumn(QQN::TenPAssessment()->ResourceStatus);\n\t\t\t$this->dtgTenPAssessments->MetaAddColumn(QQN::TenPAssessment()->Company);\n\t\t\t$this->dtgTenPAssessments->MetaAddColumn(QQN::TenPAssessment()->Resource);\n\t\t\t$this->dtgTenPAssessments->MetaAddColumn(QQN::TenPAssessment()->User);\n\t\t\t$this->dtgTenPAssessments->MetaAddColumn(QQN::TenPAssessment()->Group);\n\t\t}", "function erpal_contract_helper_config_form($form, $form_state) {\n $form = array();\n \n $form['cancelation_precalculate_range'] = array(\n '#type' => 'textfield',\n '#title' => t('Precalculation range contract duration'),\n '#description' => t('Number of month the date items for contract calculation are precalculated.'),\n '#default_value' => _erpal_contract_helper_cancelation_precalculate_range(),\n ); \n \n $form['submit'] = array(\n '#value' => t('save'),\n '#type' => 'submit',\n '#submit' => array('_erpal_contract_helper_config_form_submit'),\n );\n\n return $form;\n}", "protected function set_up_blank_object()\n {\n return $this->create_cell(array('content'=>'','colCount'=>1));\n }", "protected function createComponentTarifForm()\r\n\t{\r\n\t\t$form = new Form;\r\n\t\t$form->addText('name', 'Jméno:')\r\n\t\t\t->setRequired('Zadej jméno.');\r\n\r\n\t\t$form->addText('apicode', 'API Code:');\r\n\r\n\t\t$form->addText('price', 'Cena:')\r\n\t\t ->addRule(Form::INTEGER, 'Cena musí být číslo')\r\n\t\t\t->setRequired('Zadej cenu.');\r\n\t\t\r\n\t\t$form->addText('description', 'Popis:');\r\n\t\t\t\r\n\t\t$form->addSubmit('save', 'Uložit')\r\n\t\t\t->setAttribute('class', 'default')\r\n\t\t\t->onClick[] = $this->tarifFormSucceeded;\r\n\r\n\t\t$form->addSubmit('cancel', 'Cancel')\r\n\t\t\t->setValidationScope(NULL)\r\n\t\t\t->onClick[] = $this->formCancelled;\r\n\r\n\t\t$form->addProtection();\r\n\t\treturn $form;\r\n\t}", "protected function createComponentMoveForm() {\r\n\t\t$form = new Form;\r\n\t\t$options = $this->closureModel->getOptions();\r\n\t\t$form->addSelect(\"parentId\", \"Branch Parent\", $options);\r\n\t\t$form->addHidden(\"id\", $this->edit_id);\r\n\t\t$form->addSubmit('save', 'Save')\r\n\t\t\t\t->onClick[] = callback($this, 'moveFormSubmitted');\r\n\t\t$form->setRenderer(new \\Kdyby\\BootstrapFormRenderer\\BootstrapRenderer());\r\n\t\treturn $form;\r\n\t}", "public function definition() {\n global $CFG;\n $mform = $this->_form;\n // Define hidden element for id.\n $id = $this->_customdata['id'];\n $mform->addElement('hidden', 'id', $id);\n $mform->setType('id', PARAM_INT);\n\n // Define hidden element for course id.\n $courseid = $this->_customdata['courseid'];\n $mform->addElement('hidden', 'courseid', $courseid);\n $mform->setType('courseid', PARAM_INT);\n // Text element to hold name data.\n $mform->addElement('text', 'name', get_string('name', 'tool_sumitnegi'));\n $mform->setType('name', PARAM_NOTAGS);\n // Checkbox to set completion for the record.\n $mform->addElement('checkbox', 'completed', get_string('completed', 'tool_sumitnegi'));\n $mform->addElement('editor', 'description_editor', get_string('description', 'tool_sumitnegi'),\n null, tool_sumitnegi\\api::editor_options());\n $mform->setType('description', PARAM_RAW);\n $this->add_action_buttons();\n }", "protected function form()\n {\n $form = new Form(new Good);\n $form->text('name', __('名称'))->rules('required');\n $form->decimal('amount', __('价格'))->default(0.00)->rules('required');\n $form->text('unit', __('单位'))->rules('required');\n $form->image('list_img', __('缩略图(320*320)'))->creationRules('required');\n $form->hasMany('goodsimgs', __('轮播图(640*640)'),function(Form\\NestedForm $form){\n $form->image('img',__('轮播图'))->creationRules('required');\n });\n $form->kindeditor('describe', __('描述'));\n // 去掉`查看`checkbox\n $form->disableViewCheck();\n // 去掉`继续编辑`checkbox\n $form->disableEditingCheck();\n // 去掉`继续创建`checkbox\n $form->disableCreatingCheck();\n return $form;\n }", "public function build(Form $form):Form\n {\n foreach ($this->classType->getProperties() as $property) {\n $this->add($form, $property);\n }\n \n return $form;\n }", "protected function form()\n {\n $form = new Form(new Boarding()); \n \n $form->select('pet_id',__('Pet Name'))->options(Pet::all()->pluck('name','id'))->rules('required');\n $form->select('reservation_id',__('Reservation'))->options(Reservation::all()->pluck('date','id'))->rules('required');\n $form->select('cage_id',__('Available Cages'))->options(Cage::get()->where(\"availability\",\"Available\")->pluck('id','id'))->rules('required');\n $form->datetime('end_date', __('End date'))->default(date('Y-m-d H:i:s'))->rules('required');\n \n return $form; \n }", "protected function getConfigForm()\n {\n return array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Settings'),\n 'icon' => 'icon-cogs',\n ),\n 'input' => array(\n\n\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-envelope\"></i>',\n 'desc' => $this->l('Enter an image'),\n 'name' => 'title',\n 'label' => $this->l('Titre'),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-envelope\"></i>',\n 'desc' => $this->l('Enter an image'),\n 'name' => 'description',\n 'label' => $this->l('Description'),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-envelope\"></i>',\n 'desc' => $this->l('Enter an image'),\n 'name' => 'legend',\n 'label' => $this->l('Légende'),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-envelope\"></i>',\n 'desc' => $this->l('Enter an image'),\n 'name' => 'url',\n 'label' => $this->l('Url'),\n ), \n array(\n 'col' => 6,\n 'type' => 'file',\n 'prefix' => '<i class=\"icon icon-envelope\"></i>',\n 'desc' => $this->l('Enter an image'),\n 'name' => 'image',\n 'label' => $this->l('Image_up'),\n ),\n array(\n 'col' => 4,\n 'type' => 'date',\n 'prefix' => '<i class=\"icon icon-envelope\"></i>',\n 'desc' => $this->l('Enter a start date'),\n 'name' => 'debut',\n 'label' => $this->l('Debut'),\n ),\n array(\n 'col' => 4,\n 'type' => 'date',\n 'prefix' => '<i class=\"icon icon-envelope\"></i>',\n 'desc' => $this->l('Enter a end date'),\n 'name' => 'fin',\n 'label' => $this->l('Fin'),\n ),\n ),\n 'submit' => array(\n 'title' => $this->l('Save'),\n ),\n ),\n );\n }", "function form($instance) {\n\n\t\t// Get stored preferences\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$title = isset( $instance['title'] ) ? esc_attr($instance['title']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$show_title_text = isset( $instance['show_title_text'] ) ? $instance['show_title_text'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$order = isset( $instance['order'] ) ? esc_attr($instance['order']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$size_from = isset( $instance['size_from'] ) ? esc_attr($instance['size_from']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$size_to = isset( $instance['size_to'] ) ? esc_attr($instance['size_to']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$max = isset( $instance['max'] ) ? esc_attr($instance['max']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$taxonomy = isset( $instance['taxonomy'] ) ? esc_attr($instance['taxonomy']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$color = isset( $instance['color'] ) ? esc_attr($instance['color']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$color_span_from = isset( $instance['color_span_from'] ) ? esc_attr($instance['color_span_from']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$color_span_to = isset( $instance['color_span_to'] ) ? esc_attr($instance['color_span_to']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$letter_spacing = isset( $instance['letter_spacing'] ) ? esc_attr($instance['letter_spacing']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$word_spacing = isset( $instance['word_spacing'] ) ? esc_attr($instance['word_spacing']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$tag_spacing = isset( $instance['tag_spacing'] ) ? esc_attr($instance['tag_spacing']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$case = isset( $instance['case'] ) ? esc_attr($instance['case']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$minimum\t\t = isset( $instance['minimum'] ) ? esc_attr($instance['minimum']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$tags_list = isset( $instance['tags_list'] ) && is_array($instance['tags_list']) ? $instance['tags_list'] : array();\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$tags_list_type = isset( $instance['tags_list_type'] ) ? esc_attr($instance['tags_list_type']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$reverse = isset( $instance['reverse'] ) ? $instance['reverse'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$authors = isset( $instance['authors'] ) && is_array($instance['authors']) ? $instance['authors'] : array();\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$color_set = isset( $instance['color_set'] ) && is_array($instance['color_set']) ? $instance['color_set'] : array();\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$case_sensitive = isset( $instance['case_sensitive'] ) ? $instance['case_sensitive'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$debug \t\t\t\t= isset( $instance['debug'] ) ? $instance['debug'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$show_title = isset( $instance['show_title'] ) ? $instance['show_title'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$link_underline = isset( $instance['link_underline'] ) ? $instance['link_underline'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$link_bold = isset( $instance['link_bold'] ) ? $instance['link_bold'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$link_italic = isset( $instance['link_italic'] ) ? $instance['link_italic'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$link_bg_color = isset( $instance['link_bg_color'] ) ? esc_attr($instance['link_bg_color']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$link_border_width = isset( $instance['link_border_width'] ) ? esc_attr($instance['link_border_width']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$link_border_style = isset( $instance['link_border_style'] ) ? $instance['link_border_style'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$link_border_color = isset( $instance['link_border_color'] ) ? esc_attr($instance['link_border_color']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$hover_underline = isset( $instance['hover_underline'] ) ? $instance['hover_underline'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$hover_bold = isset( $instance['hover_bold'] ) ? $instance['hover_bold'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$hover_italic = isset( $instance['hover_italic'] ) ? $instance['hover_italic'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$hover_bg_color = isset( $instance['hover_bg_color'] ) ? esc_attr($instance['hover_bg_color']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$hover_color = isset( $instance['hover_color'] ) ? esc_attr($instance['hover_color']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$hover_border_width = isset( $instance['hover_border_width'] ) ? esc_attr($instance['hover_border_width']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$hover_border_style = isset( $instance['hover_border_style'] ) ? $instance['hover_border_style'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$hover_border_color = isset( $instance['hover_border_color'] ) ? esc_attr($instance['hover_border_color']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$days_old \t\t\t= isset( $instance['days_old'] ) ? esc_attr($instance['days_old']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$line_height \t\t= isset( $instance['line_height'] ) ? esc_attr($instance['line_height']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$separator \t\t\t= isset( $instance['separator'] ) ? esc_attr($instance['separator']) : '';\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$prefix \t\t\t= isset( $instance['prefix'] ) ? esc_attr($instance['prefix']) : '';\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$suffix \t\t\t= isset( $instance['suffix'] ) ? esc_attr($instance['suffix']) : '';\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$post_type = isset( $instance['post_type'] ) ? $instance['post_type'] : array('post');\n\n\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$configurations = get_option('utcw_saved_configs');\n\n\t\t$args = array(\n\t\t\t'public' => true\n\t\t);\n\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$available_post_types = get_post_types($args);\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$available_taxonomies = get_taxonomies();\n\n\t\t// Content of the widget settings form\n\t\trequire \"settings.php\";\n\t}", "public function definition() {\n global $CFG, $PAGE;\n\n $mform =& $this->_form;\n\n //edit section\n $mform->addElement('header', 'configheader', get_string('exitingcrontitle', 'tool_servercron'));\n\n $existing = $this->_customdata['existingrecs'];\n $rows = '';\n\n if (count($existing)) {\n //set up heading for the table\n $row = html_writer::tag('th', get_string('minuteprompt', 'tool_servercron'),\n array('width' => '5%', 'style' => 'padding:5px; text-align:right'));\n\n $row .= html_writer::tag('th', get_string('hourprompt', 'tool_servercron'),\n array('width' => '5%', 'style' => 'padding:5px; text-align:right'));\n\n $row .= html_writer::tag('th', get_string('dayprompt', 'tool_servercron'),\n array('width' => '5%', 'style' => 'padding:5px; text-align:right'));\n\n $row .= html_writer::tag('th', get_string('monthprompt', 'tool_servercron'),\n array('width' => '5%', 'style' => 'padding:5px; text-align:right'));\n\n $row .= html_writer::tag('th', get_string('wdayprompt', 'tool_servercron'),\n array('width' => '5%', 'style' => 'padding:5px; text-align:right'));\n\n $row .= html_writer::tag('th', get_string('commandprompt', 'tool_servercron'),\n array('width' => '30%', 'style' => 'padding:5px; text-align:center'));\n\n $row .= html_writer::tag('th', get_string('actionsprompt', 'tool_servercron'),\n array('style' => 'padding:5px; text-align:center'));\n\n $row = html_writer::tag('tr', $row, array('width' => '100%'));\n $rows .= $row .\"\\n\";\n\n foreach ($existing as $exists) {\n // make up the edit line\n $row = html_writer::tag('td', $exists->minute, array('style' => 'text-align: right'));\n $row .= html_writer::tag('td', $exists->hour, array('style' => 'text-align: right'));\n $row .= html_writer::tag('td', $exists->day, array('style' => 'text-align: right'));\n $row .= html_writer::tag('td', $exists->month, array('style' => 'text-align: right'));\n $row .= html_writer::tag('td', $exists->wday, array('style' => 'text-align: right'));\n $row .= html_writer::tag('td', $exists->commandline);\n\n //editing links\n $row .= html_writer::start_tag('td', array('style' => 'padding:5px; text-align:center'));\n\n $row .= html_writer::tag('a', '['.get_string('editcronjob', 'tool_servercron').']',\n array('id' => 'svrcrn'.$exists->id,\n 'href' => $PAGE->url.\"?action=edit&cronjobid=\".$exists->id));\n\n $row .= '&nbsp;&nbsp;';\n\n $row .= html_writer::tag('a', '['.get_string('deletecronjob', 'tool_servercron').']',\n array('id' => 'svrcrn'.$exists->id, 'href' => $PAGE->url.\"?action=delete&cronjobid=\".$exists->id));\n\n $row .= html_writer::end_tag('td');\n\n $row = html_writer::tag('tr', $row);\n $rows .= $row .\"\\n\";\n }\n\n $mform->addElement('html', html_writer::tag('table', $rows, array('width' => '100%'))); //enclose in table\n } else {\n //if no rec id specified - then we have no records\n if (!$this->_customdata['cronjobid']) {\n $mform->addElement('html', html_writer::tag('p', get_string('noexistingcrons', 'tool_servercron')));\n }\n }\n\n $editing = false; //deafult not editing existing record\n if ($this->_customdata['cronjobid'] != 0) {\n $editing = true;\n }\n //new section\n if ($editing) {\n $mform->addElement('header', 'configheader', get_string('editcronstitle', 'tool_servercron') .' [' .\n $this->_customdata['cronjobid'] . ']' );\n } else {\n $mform->addElement('header', 'configheader', get_string('newcronstitle', 'tool_servercron'));\n }\n\n if (isset($this->_customdata['error'])) {\n $mform->addElement('html', '<h3 style=\"color: red\">'.$this->_customdata['error'].'</h3>');\n }\n\n //hidden field\n $mform->addElement('hidden', 'cronjobid', $this->_customdata['cronjobid'], array('id' => 'id_cronjobid'));//0=new\n // default action is save - have to check for cancel in php code to avoid reliance on JS\n $mform->addElement('hidden', 'action', 'save', array('id' => 'id_action'));\n\n $timingdets=array();\n\n $select = $mform->createElement('select', 'minute', get_string('minuteprompt', 'tool_servercron'),\n $this->_customdata['minutes']);\n $select->setMultiple(true);\n $timingdets[] = $select;\n\n $select = $mform->createElement('select', 'hour', get_string('hourprompt', 'tool_servercron'),\n $this->_customdata['hours']);\n $select->setMultiple(true);\n $timingdets[] = $select;\n\n $select = $mform->createElement('select', 'day', get_string('dayprompt', 'tool_servercron'),\n $this->_customdata['days']);\n $select->setMultiple(true);\n $timingdets[] = $select;\n\n $select = $mform->createElement('select', 'month', get_string('monthprompt', 'tool_servercron'),\n $this->_customdata['months']);\n $select->setMultiple(true);\n $timingdets[] = $select;\n\n $select = $mform->createElement('select', 'wday', get_string('wdayprompt', 'tool_servercron'),\n $this->_customdata['wdays']);\n $select->setMultiple(true);\n $timingdets[] = $select;\n\n //set the defaults for all the dropdowns as every *\n if (isset($this->_customdata['minute'])) {\n $mform->setDefault('minute', $this->_customdata['minute']);\n } else {\n $mform->setDefault('minute', -1);\n }\n\n if (isset($this->_customdata['hour'])) {\n $mform->setDefault('hour', $this->_customdata['hour']);\n } else {\n $mform->setDefault('hour', -1);\n }\n\n if (isset($this->_customdata['day'])) {\n $mform->setDefault('day', $this->_customdata['day']);\n } else {\n $mform->setDefault('day', -1);\n }\n\n if (isset($this->_customdata['month'])) {\n $mform->setDefault('month', $this->_customdata['month']);\n } else {\n $mform->setDefault('month', -1);\n }\n\n if (isset($this->_customdata['wday'])) {\n $mform->setDefault('wday', $this->_customdata['wday']);\n } else {\n $mform->setDefault('wday', -1);\n }\n\n //now add the group to the form\n $mform->addGroup($timingdets, 'timings', get_string('timingsprompt', 'tool_servercron'), array(' '), false);\n\n //servercron title\n $mform->addElement('text', 'commandline', get_string('commandprompt', 'tool_servercron'), array('size' => 100));\n $mform->setDefault('commandline', $this->_customdata['commandline']);\n $mform->setType('commandline', PARAM_TEXT);\n\n //buttons\n $buttonarray=array();\n $buttonarray[] = $mform->createElement('submit', 'save', get_string('cronjobsave', 'tool_servercron'));\n\n if ($editing) {\n $buttonarray[] = $mform->createElement('cancel', 'cancel', get_string('croneditcancel', 'tool_servercron'));\n }\n\n $buttonarray[] = $mform->createElement('reset', 'resetbutton', get_string('cronjobreset', 'tool_servercron'));\n $mform->addGroup($buttonarray, 'buttonar', '', array(' '), false);\n\n }", "public function __construct()\n {\n parent::__construct();\n parent::setSize(640, null);\n parent::setTitle('AgendaEntry');\n parent::removePadding();\n \n // creates the form\n $this->form = new BootstrapFormBuilder('form_Entry');\n $this->form->setProperty('style', 'margin-bottom:0');\n \n $hours = array();\n $durations = array();\n for ($n=0; $n<24; $n++)\n {\n $hours[$n] = \"$n:00\";\n $durations[$n+1] = $n+1 . ' h';\n }\n array_pop($durations);\n // create the form fields\n $id = new TEntry('id');\n $entry_date = new TDate('entry_date');\n $start_hour = new TCombo('start_hour');\n $duration = new TCombo('duration');\n $title = new TEntry('title');\n $description = new TText('description');\n \n $start_hour->addItems($hours);\n $duration->addItems($durations);\n $id->setEditable(FALSE);\n \n // define the sizes\n $id->setSize(40);\n $entry_date->setSize(100);\n $start_hour->setSize(100);\n $duration->setSize(100);\n $title->setSize(400);\n $description->setSize(400, 50);\n \n // add one row for each form field\n $this->form->addFields( [new TLabel('ID:')], [$id] );\n $this->form->addFields( [new TLabel('Entry Date:')], [$entry_date] );\n $this->form->addFields( [new TLabel('Start Hour:')], [$start_hour] );\n $this->form->addFields( [new TLabel('Duration:')], [$duration] );\n $this->form->addFields( [new TLabel('Title:')], [$title] );\n $this->form->addFields( [new TLabel('Description:')], [$description] );\n\n $this->form->addAction( _t('Save'), new TAction(array($this, 'onSave')), 'fa:save green');\n $this->form->addAction( _t('Clear'), new TAction(array($this, 'onEdit')), 'fa:eraser red');\n \n parent::add($this->form);\n }", "function initStylePropertiesForm()\n\t{\n\t\tglobal $ilCtrl, $lng, $ilTabs, $ilSetting;\n\t\t\n\t\tinclude_once(\"./Services/Style/classes/class.ilObjStyleSheet.php\");\n\t\t$lng->loadLanguageModule(\"style\");\n\n\t\tinclude_once(\"./Services/Form/classes/class.ilPropertyFormGUI.php\");\n\t\t$this->form = new ilPropertyFormGUI();\n\t\t\n\t\t$fixed_style = $ilSetting->get(\"fixed_content_style_id\");\n\t\t$style_id = $this->object->getStyleSheetId();\n\n\t\tif ($fixed_style > 0)\n\t\t{\n\t\t\t$st = new ilNonEditableValueGUI($lng->txt(\"style_current_style\"));\n\t\t\t$st->setValue(ilObject::_lookupTitle($fixed_style).\" (\".\n\t\t\t\t$this->lng->txt(\"global_fixed\").\")\");\n\t\t\t$this->form->addItem($st);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$st_styles = ilObjStyleSheet::_getStandardStyles(true, false,\n\t\t\t\t$_GET[\"ref_id\"]);\n\n\t\t\t$st_styles[0] = $this->lng->txt(\"default\");\n\t\t\tksort($st_styles);\n\n\t\t\tif ($style_id > 0)\n\t\t\t{\n\t\t\t\t// individual style\n\t\t\t\tif (!ilObjStyleSheet::_lookupStandard($style_id))\n\t\t\t\t{\n\t\t\t\t\t$st = new ilNonEditableValueGUI($lng->txt(\"style_current_style\"));\n\t\t\t\t\t$st->setValue(ilObject::_lookupTitle($style_id));\n\t\t\t\t\t$this->form->addItem($st);\n\n//$this->ctrl->getLinkTargetByClass(\"ilObjStyleSheetGUI\", \"edit\"));\n\n\t\t\t\t\t// delete command\n\t\t\t\t\t$this->form->addCommandButton(\"editStyle\",\n\t\t\t\t\t\t$lng->txt(\"style_edit_style\"));\n\t\t\t\t\t$this->form->addCommandButton(\"deleteStyle\",\n\t\t\t\t\t\t$lng->txt(\"style_delete_style\"));\n//$this->ctrl->getLinkTargetByClass(\"ilObjStyleSheetGUI\", \"delete\"));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($style_id <= 0 || ilObjStyleSheet::_lookupStandard($style_id))\n\t\t\t{\n\t\t\t\t$style_sel = ilUtil::formSelect ($style_id, \"style_id\",\n\t\t\t\t\t$st_styles, false, true);\n\t\t\t\t$style_sel = new ilSelectInputGUI($lng->txt(\"style_current_style\"), \"style_id\");\n\t\t\t\t$style_sel->setOptions($st_styles);\n\t\t\t\t$style_sel->setValue($style_id);\n\t\t\t\t$this->form->addItem($style_sel);\n//$this->ctrl->getLinkTargetByClass(\"ilObjStyleSheetGUI\", \"create\"));\n\t\t\t\t$this->form->addCommandButton(\"saveStyleSettings\",\n\t\t\t\t\t\t$lng->txt(\"save\"));\n\t\t\t\t$this->form->addCommandButton(\"createStyle\",\n\t\t\t\t\t$lng->txt(\"sty_create_ind_style\"));\n\t\t\t}\n\t\t}\n\t\t$this->form->setTitle($lng->txt(\"wiki_style\"));\n\t\t$this->form->setFormAction($ilCtrl->getFormAction($this));\n\t}", "function __buildGDL()\n {\n $gdl = new SwimTeamJobsAdminGUIDataList('Swim Team Jobs',\n '100%', 'jobstatus, jobposition', false) ;\n\n $gdl->set_alternating_row_colors(true) ;\n $gdl->set_show_empty_datalist_actionbar(true) ;\n\n return $gdl ;\n }", "protected function getConfigForm()\n {\n return array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Settings'),\n 'icon' => 'icon-cogs',\n ),\n 'input' => array(\n array(\n 'col' => 4,\n 'type' => 'text',\n 'desc' => $this->l('Show manufacturer name'),\n 'name' => 'MF_TITLE',\n 'label' => $this->l('Enable Manufacturers Name'),\n 'required' => true,\n ),\n array(\n 'col' => 4,\n 'type' => 'text',\n 'desc' => $this->l('Show manufacturer description'),\n 'name' => 'MF_DESCRIPTION',\n 'label' => $this->l('Provide a description for the heading'),\n 'required' => true,\n ),\n array(\n 'col' => 4,\n 'type' => 'text',\n 'desc' => $this->l('Number of manufacturers to display (Enter 0 to display all)'),\n 'name' => 'MF_MAN_NUMBER',\n 'label' => $this->l('Number of Manufacturers'),\n 'required' => true,\n ),\n array(\n 'col' => 4,\n 'type' => 'text',\n 'desc' => $this->l('How many logo\\'s should be visible on desktops'),\n 'name' => 'MF_PER_ROW_DESKTOP',\n 'label' => $this->l('Logo\\'s per row (Desktop)'),\n 'required' => true,\n ),\n array(\n 'col' => 4,\n 'type' => 'text',\n 'desc' => $this->l('How many logo\\'s should be visible on tablets'),\n 'name' => 'MF_PER_ROW_TABLET',\n 'label' => $this->l('Logo\\'s per row (Tablet)'),\n 'required' => true,\n ),\n array(\n 'col' => 4,\n 'type' => 'text',\n 'desc' => $this->l('How many logo\\'s should be visible on mobiles'),\n 'name' => 'MF_PER_ROW_MOBILE',\n 'label' => $this->l('Logo\\'s per row (Mobile)'),\n 'required' => true,\n ),\n array(\n 'type' => 'select',\n 'desc' => 'How the logo\\'s should be sorted',\n 'name' => 'MF_MAN_ORDER',\n 'label' => $this->l('Order by'),\n 'options' => array(\n 'query' => array(\n array(\n 'id_option' => 'name_asc',\n 'name' => $this->l('Name ASC'),\n ),\n array(\n 'id_option' => 'name_desc',\n 'name' => $this->l('Name DESC'),\n ),\n array(\n 'id_option' => 'manu_asc',\n 'name' => $this->l('Manufacturer ID ASC'),\n ),\n array(\n 'id_option' => 'manu_desc',\n 'name' => $this->l('Manufacturer ID DESC'),\n ),\n ),\n 'id' => 'id_option',\n 'name' => 'name',\n ),\n ),\n array(\n 'type' => 'switch',\n 'label' => $this->l('Enable Manufacturers Name'),\n 'name' => 'MF_SHOW_MAN_NAME',\n 'is_bool' => true,\n 'desc' => $this->l('Use this module in live mode'),\n 'values' => array(\n array(\n 'id' => 'active_on',\n 'value' => 1,\n 'label' => $this->l('Yes'),\n ),\n array(\n 'id' => 'active_off',\n 'value' => 0,\n 'label' => $this->l('No'),\n )\n ),\n ),\n ),\n 'submit' => array(\n 'title' => $this->l('Save'),\n ),\n ),\n );\n }", "protected function form()\n {\n $form = new Form(new Activity());\n\n $form->text('log_name', __('Log name'));\n $form->text('description', __('Description'));\n $form->number('subject_id', __('Subject id'));\n $form->text('subject_type', __('Subject type'));\n $form->number('causer_id', __('Causer id'));\n $form->text('causer_type', __('Causer type'));\n $form->textarea('properties', __('Properties'));\n\n return $form;\n }", "protected function createComponentProjectForm(): Form {\n $form = new Form; \n\n //Get all available project types for select field\n $types = $this->database->table('types');\n $types_arr = array();\n foreach($types as $type) {\n $types_arr[$type->id] = $type->title;\n }\n\n $form->addText('title', \"Project Title:\")\n ->setRequired()\n ->addRule($form::MAX_LENGTH, 'The Project title need to be less than %d character long', 60);\n\n $form->addSelect(\"type_id\", \"Project Type\", $types_arr)\n ->setRequired();\n\n $form->addText('start_date', \"Start Date\")\n ->setHtmlType('date')\n ->setRequired();\n\n $form->addText('end_date', \"End Date\")\n ->setHtmlType('date')\n ->setRequired();\n\n $form->addSubmit('send', \"Publish Project\");\n\n $form->onSuccess[] = [$this, 'projectFormSucceeded'];\n\n return $form;\n }", "public function definition() {\n global $CFG;\n\n $mform = $this->_form; // Don't forget the underscore! \n\n $mform->addElement('filepicker', 'excelfile', get_string('excelfile', 'booking'), null, array('maxbytes' => $CFG->maxbytes, 'accepted_types' => '*'));\n $mform->addRule('excelfile', null, 'required', null, 'client');\n\n $this->add_action_buttons(TRUE, get_string('importexceltitle', 'booking'));\n }", "protected function form()\n {\n $form = new Form(new ScanRechargeOrder());\n $form->select('scan_recharge_channel_id', __('scan-recharge::order.scan_recharge_channel_id'))\n ->options(ScanRechargeChannel::select('id', 'name')->pluck('name', 'id'))\n ->required();\n $form->text('user_id', __('scan-recharge::order.user_id'))\n ->required()\n ->help(__('scan-recharge::order.user_id_help'));\n $form->currency('amount', __('scan-recharge::order.amount'))->symbol('¥')\n ->default(0)\n ->required();\n $form->textarea('desc', __('scan-recharge::order.desc'))\n ->required()\n ->help(__('scan-recharge::order.desc_help'));\n $form->textarea('reply', __('scan-recharge::order.reply'))\n ->help(__('scan-recharge::order.reply_help'));\n $form->select('status', __('scan-recharge::order.status'))\n ->options(__('scan-recharge::order.status_value'));\n $form->saving(function (Form $form) {\n if ($form->status == 1 && $form->model()->id) {\n RechargeSuccessUserAccountJob::dispatch(ScanRechargeOrder::find($form->model()->id));\n }\n });\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Resources);\n\n $form->text('name', '名称')->rules('required',['required' => '请输入 配置项的名称']);\n\n $form->radio('type', '类型')->options(Resources::TYPE);\n\n $form->cropper('url','图片');\n\n $form->number('sort_num','排序');\n\n $form->textarea('memo','备注');\n\n $form->tools(function (Form\\Tools $tools) {\n // 去掉`删除`按钮\n $tools->disableDelete();\n\n // 去掉`查看`按钮\n $tools->disableView();\n });\n $form->footer(function ($footer) {\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n\n // 去掉`继续编辑`checkbox\n $footer->disableEditingCheck();\n\n // 去掉`继续创建`checkbox\n $footer->disableCreatingCheck();\n\n });\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new JournalVoucher);\n\n $form->saved(function(Form $form){\n self::postToLedger($form->model());\n });\n\n $form->date('date', __('Date'))->default(date('Y-m-d'));\n \n \\App\\Helpers\\SelectHelper::buildAjaxSelect(\n $form, \n 'project_id', \n __('Project'), \n 'admin/projects/create', \n '\\App\\Project')\n ->rules('required');\n\n \\App\\Helpers\\SelectHelper::buildAjaxSelect(\n $form, \n 'phase_id', \n __('Phase'), \n 'admin/phases/create', \n '\\App\\Phase')\n ->rules('required');\n\n $form->hasMany('journalVoucherDetails', __('Entries'), function (Form\\NestedForm $form) {\n \n \\App\\Helpers\\SelectHelper::buildAjaxSelect(\n $form, \n 'account_head_id', \n __('Account Head'), \n 'admin/account-heads/create', \n '\\App\\AccountHead')\n ->rules('required');\n \n $form->text('description', __('Description'))->rules('required');\n\n $form->decimal('debit', __('Debit'));\n \n $form->decimal('credit', __('Credit'));\n\n \\App\\Helpers\\SelectHelper::buildAjaxSelect(\n $form, \n 'person_id', \n __('Person (Optional)'), \n '', \n '\\App\\Person');\n\n \\App\\Helpers\\SelectHelper::buildAjaxSelect(\n $form, \n 'property_file_id', \n __('Property File (Optional)'), \n '', \n '\\App\\PropertyFile');\n\n\n })->mode('table');\n\n return $form;\n }", "function dwsim_flowsheet_completed_tab_form($form, $form_state)\n{\n\t$options_first = _flowsheet_details_year_wise();\n\t$selected = isset($form_state['values']['howmany_select']) ? $form_state['values']['howmany_select'] : key($options_first);\n\t$form = array();\n\t$form['howmany_select'] = array(\n\t'#title' => t('Sorting projects according to year:'),\n '#type' => 'select',\n '#options' => _flowsheet_details_year_wise(),\n /*'#options' => array(\n \t'Please select...' => 'Please select...',\n \t'2017' => '2017',\n \t'2018' => '2018', \n \t'2019' => '2019', \n \t'2020' => '2020', \n \t'2021' => '2021'),*/\n '#default_value' => $selected,\n '#ajax' => array(\n 'callback' => 'ajax_example_autocheckboxes_callback',\n ),\n '#suffix' => '<div id=\"ajax-selected-flowsheet\"></div>'\n\n\t );\n\treturn $form;\n}", "protected function form() {\n\t\treturn Admin::form(WhtSpiderLogModel::class,function (Form $form) {\n\t\t\t$directors = [\n\t\t\t\t'成功' => 1,\n\t\t\t\t'失败' => 0,\n\t\t\t];\n\t\t\t$form->select('status','状态')->options($directors);\n\t\t\t$form->setAction('采集');\n\t\t});\n\t}", "public function buildPaneForm(array $pane_form, FormStateInterface $form_state, array &$complete_form);", "public function buildFormFields()\n {\n $this->addFormField(\n SharpTextFormFieldConfig::create(\"titre\")\n ->setLabel(\"Titre\")\n );\n\n $this->addFormField(\n SharpTextFormFieldConfig::create(\"soustitre\")\n ->setLabel(\"Sous-titre\")\n );\n\n $this->addFormField(\n SharpTextFormFieldConfig::create(\"slug\")\n ->setLabel(\"Slug\")\n );\n\n $this->addFormField(\n SharpTextFormFieldConfig::create(\"url\")\n ->setLabel(\"URL du projet\")\n );\n\n $this->addFormField(\n SharpMarkdownFormFieldConfig::create(\"texte\")\n ->setLabel(\"Texte\")\n ->showToolbar(true)\n );\n\n $this->addFormField(\n SharpCheckFormFieldConfig::create(\"is_open_source\")\n ->setText(\"Projet Open-source\")\n );\n\n $this->addFormField(\n SharpPivotFormFieldConfig::create(\"technos\", SharpTechnoRepository::class)\n ->setLabel(\"Technologies\")\n ->setAddable(true)\n ->setSortable(true)\n ->setOrderAttribute(\"ordre\")\n ->setCreateAttribute(\"nom\")\n );\n\n $this->addFormField(\n SharpListFormFieldConfig::create(\"screenshots\")\n ->setLabel(\"Screenshots\")\n ->setSortable(true)->setOrderAttribute(\"ordre\")\n ->setAddable(true)->setAddButtonText(\"Ajouter un screenshot\")\n ->setRemovable(true)->setRemoveButtonText(\"Supprimer\")\n ->addItemFormField(\n SharpFileFormFieldConfig::create(\"fichier\")\n ->setFileFilterImages()\n ->setMaxFileSize(5)\n ->setThumbnail(\"100x100\")\n ->addGeneratedThumbnail(\"600x\"))\n ->addItemFormField(\n SharpTextFormFieldConfig::create(\"tag\")\n ->addAttribute(\"placeholder\", \"Tag\"))\n ->addItemFormField(\n SharpTextareaFormFieldConfig::create(\"legende\")\n ->setRows(3))\n ->setItemFormTemplate(\n SharpListItemFormTemplateConfig::create()\n ->addField(\"fichier\")\n ->addField(\"tag\")\n ->addField(\"legende\")\n )\n );\n\n $this->addFormTemplateColumn(\n SharpFormTemplateColumnConfig::create(7)\n ->addField(\"titre\")\n ->addField(\"soustitre\")\n ->addField([\"slug:5\", \"url:7\"])\n ->addField(\"technos\")\n ->addField(\"is_open_source\")\n\n )->addFormTemplateColumn(\n SharpFormTemplateColumnConfig::create(5)\n ->addField(\"texte\")\n ->addField(\"screenshots\")\n );\n }", "public static function formrow(){\n\n\n $forms = \"<tr class='row100 body'>\\n\";\n $forms .= \"<td class='cell100 column1'>\";\n return $forms;\n }", "protected function getConfigForm()\n {\n return array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Settings'),\n 'icon' => 'icon-cogs',\n ),\n 'input' => array(\n array(\n 'col' => 6,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-key\"></i>',\n 'desc' => $this->l('Ingrese un token de empresa - Vea la documentación'),\n 'name' => 'APISFACT_PRESTASHOP_TOKEN',\n 'label' => $this->l('Token'),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-circle text-success\"></i>',\n 'desc' => $this->l('Ingrese la serie para las facturas'),\n 'name' => 'APISFACT_PRESTASHOP_SERIEF',\n 'label' => $this->l('Serie Factura'),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-circle text-success\"></i>',\n 'desc' => $this->l('Ingrese el número inicial para las facturas'),\n 'name' => 'APISFACT_PRESTASHOP_NUMEROF',\n 'label' => $this->l('Numero de Factura'),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-circle\"></i>',\n 'desc' => $this->l('Ingrese la serie para las boletas'),\n 'name' => 'APISFACT_PRESTASHOP_SERIEB',\n 'label' => $this->l('Serie Boleta'),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-circle\"></i>',\n 'desc' => $this->l('Ingrese el número inicial para las boletas'),\n 'name' => 'APISFACT_PRESTASHOP_NUMEROB',\n 'label' => $this->l('Numero de Boleta'),\n )\n ),\n 'submit' => array(\n 'title' => $this->l('Save'),\n ),\n ),\n );\n }", "protected function form()\n {\n $form = new Form(new gameLog());\n\n $form->text('onlyId', ___('OnlyId'));\n $form->number('bigBlindIndex', ___('BigBlindIndex'));\n $form->number('gameNums', ___('GameNums'));\n $form->number('smallBlindIndex', ___('SmallBlindIndex'));\n $form->textarea('tableCards', ___('TableCards'));\n $form->number('tableId', ___('TableId'));\n $form->textarea('tableSeat1Str1', ___('TableSeat1Str1'));\n $form->textarea('tableSeat1Str2', ___('TableSeat1Str2'));\n $form->textarea('tableSeat1Str3', ___('TableSeat1Str3'));\n $form->textarea('tableSeat1Str4', ___('TableSeat1Str4'));\n $form->textarea('tableSeat1Str5', ___('TableSeat1Str5'));\n $form->textarea('tableSeat1Str6', ___('TableSeat1Str6'));\n $form->textarea('tableSeat1Str7', ___('TableSeat1Str7'));\n $form->number('time', ___('Time'));\n\n return $form;\n }", "public function __construct($pIndex = 'A')\n {\n \t// Initialise values\n \t$this->_columnIndex\t\t= $pIndex;\n \t$this->_width\t\t\t= -1;\n \t$this->_autoSize\t\t= false;\n \t$this->_visible\t\t\t= true;\n \t$this->_outlineLevel\t= 0;\n \t$this->_collapsed\t\t= false;\n\n\t\t// set default index to cellXf\n\t\t$this->_xfIndex = 0;\n }", "function buildWidgets(&$table,$row) {\n //print_r($this);\n $this->table = &$table;\n $widgets = array(\n // format:\n //name display, width, pos , span , \n 'name' => array(null, 1 , 1),\n 'type' => array(null, 2 , 1),\n 'length' => array(null, 3 , 1),\n 'notnull' => array('n', 4 , 1),\n 'isIndex' => array('I', 5 , 1),\n 'sequence' => array('+', 6 , 1),\n 'unique' => array('u', 7 , 1),\n 'default' => array(null, 8 , 2)\n \n );\n \n foreach ($widgets as $string=>$config) {\n \n switch($string) {\n \n case 'name':\n case 'length':\n case 'default':\n $this->widgets[$string] = &new GtkEntry;\n $this->widgets[$string]->set_text((string) $this->$string);\n $this->widgets[$string]->connect('changed',array(&$this,'callbackSetValue'),$string);\n $this->widgets[$string]->connect('leave-notify-event', array(&$this->table->database,'save'));\n if ($string == 'name') {\n $this->widgets[$string]->connect_after('drag_begin',array(&$this,'callbackNamePressed'));\n $this->widgets[$string]->connect_after('drag-end',array(&$this,'callbackNameReleased'));\n $this->widgets[$string]->show();\n //$this->widgets[$string]->show();\n // $this->widgets[$string]->realize();\n $this->widgets[$string]->connect('drag_data_get', array(&$this,'callbackDropAsk'));\n $this->widgets[$string]->drag_source_set(\n GDK_BUTTON1_MASK|GDK_BUTTON3_MASK, \n array(array('text/plain', 0, -1)),\n GDK_ACTION_COPY\n );\n $this->widgets[$string]->connect('drag_data_received', array(&$this,'callbackDropReceived'));\n $this->widgets[$string]->drag_dest_set(\n GTK_DEST_DEFAULT_ALL, \n array(array('text/plain', 0, -1)) ,\n GDK_ACTION_COPY);\n\n }\n break;\n \n case 'type':\n $this->widgets[$string] = &new GtkEntry;\n $this->widgets[$string]->set_text((string) $this->$string);\n $this->widgets[$string]->connect('button-press-event',array(&$this,'callbackTypePressed'),$string);\n $this->widgets[$string]->set_editable(false); \n break;\n case 'notnull':\n case 'isIndex':\n case 'sequence':\n case 'unique':\n $this->widgets[$string] = &new GtkToggleButton($config[0]);\n $this->widgets[$string]->set_active((int) $this->$string);\n $this->widgets[$string]->connect('toggled',array(&$this,'callbackSetValue'),$string);\n \n break;\n case 'delete':\n $this->widgets[$string] = &new GtkButton('X');\n $this->widgets[$string]->connect('pressed',array(&$this,'callbackRowDelete'));\n break;\n \n } \n \n \n $this->table->addCell($this->widgets[$string],$config[1],$row, $config[2], GTK_EXPAND|GTK_FILL);\n $this->widgets[$string]->show();\n }\n $this->setSizes();\n \n $this->deleteMenuItem = &new GtkMenuItem($this->name);\n $this->deleteMenuItem->show();\n $this->deleteMenuItem->connect('activate',array(&$this,'callbackRowDelete'));\n $this->table->deleteMenu->add( $this->deleteMenuItem);\n $this->setVisable();\n \n \n \n }", "function conf__prop_basicas($form)\n\t{\n\t\t$datos = $this->get_entidad()->tabla('prop_basicas')->get();\n\t\t$datos['posicion_botonera'] = $this->get_entidad()->tabla('base')->get_columna('posicion_botonera');\n\t\t$form->set_datos($datos);\n\t}", "protected function form()\n {\n $form = new Form(new Procurement);\n\n $form->number('u_id', 'U id');\n $form->number('brand', 'Brand');\n $form->number('type', 'Type');\n $form->number('models', 'Models');\n $form->number('material', 'Material');\n $form->decimal('area', 'Area');\n $form->radio('status', '审核')->options(['0' => '待审核', '1'=> '通过','2'=>'未通过'])->default('0');\n $form->number('room_city', 'Room city');\n $form->text('address', 'Address');\n $form->number('brick_time', 'Brick time')->default(1);\n $form->text('images', 'Images');\n $form->number('ctime', 'Ctime');\n $form->number('utime', 'Utime');\n\n return $form;\n }", "public function buildForm()\n {\n $this\n ->addNarrative('location_description_narrative')\n ->addAddMoreButton('add', 'location_description_narrative');\n }", "protected function form()\n {\n $form = new Form(new Activity);\n\n $form->text('log_name', 'Log name');\n $form->textarea('description', 'Description');\n $form->number('subject_id', 'Subject id');\n $form->text('subject_type', 'Subject type');\n $form->number('causer_id', 'Causer id');\n $form->text('causer_type', 'Causer type');\n $form->text('properties', 'Properties');\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Carousel);\n\n $form->select('carousel_category_id', __('carousel::carousel.carousel_category_id'))\n ->options(CarouselCategory::all()->pluck('name', 'id'));\n $form->text('title', __('carousel::carousel.title'));\n $form->text('url', __('carousel::carousel.url'));\n $form->image('img_src', __('carousel::carousel.img_src'))\n ->removable()\n ->uniqueName()\n ->move('carousel');\n $form->text('alt', __('carousel::carousel.alt'));\n $form->textarea('remark', __('carousel::carousel.remark'));\n $form->select('status', __('carousel::carousel.status.label'))\n ->default(1)\n ->options(__('carousel::carousel.status.value'));\n $form->datetime('start_time', __('carousel::carousel.start_time'))\n ->default(date('Y-m-d H:i:s'));\n $form->datetime('end_time', __('carousel::carousel.end_time'))\n ->default(date('Y-m-d H:i:s'));\n\n return $form;\n }", "protected function getConfigForm()\n {\n return array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Settings'),\n 'icon' => 'icon-cogs',\n ),\n 'input' => array(\n array(\n 'type' => 'textarea',\n 'label' => $this->l('CGV'),\n 'name' => 'MYETICKETS_CGV',\n 'desc' => $this->l('Set the CGV that will be print to e-tckets.'),\n ),\n array(\n 'type' => 'text',\n 'label' => $this->l('Number of days to use e-tickets'),\n 'name' => 'MYETICKETS_PERIOD',\n 'class' => 'fixed-width-xs',\n 'desc' => $this->l('Set the number of days to use and check e-tckets.'),\n ),\n ),\n 'submit' => array(\n 'title' => $this->l('Save'),\n ),\n ),\n );\n }", "function definition() {\n\t\tglobal $CFG, $DB;\n\n\t\t$mform =& $this->_form; // Don't forget the underscore!\n\t\t$instance = $this->_customdata;\n\t\t$buildingid = $instance['idbuilding'];\n\t\t$prevaction=$instance['prevaction'];\n\t\t$name = $instance['buildingname'];\n\t\t$modules=$instance['modules'];\n\t\t$places=$instance['place'];\n\t\t$idres = optional_param('building', NULL, PARAM_RAW);\n\t\t$moduleforline = implode('', $modules);\n\t\t$buildingplace = $DB->get_record('bookingrooms_buildings', array('id'=>$buildingid));\n\t\t$placename = $DB->get_record('bookingrooms_campus', array('id'=>$buildingplace->campus_id));\n\t\t\n\t\t\n\t\t$mform->addElement('select', 'campus', get_string('campus', 'local_bookingrooms').': ', $places); //add the select to the campus\n\t\t$mform->setDefault('campus',$placename->id);\n\t\t$mform->setType('campus', PARAM_INT);\n\t\t$mform->addElement('text', 'building',get_string('newbuildingname', 'local_bookingrooms').': ', array('value'=>$name));// Add new edificos\n\t\t$mform->setType('building', PARAM_TEXT);\n\t\t$mform->addElement('hidden', 'testbuilding', $name);\n\t\t$mform->setType('testbuilding', PARAM_TEXT);\n\t\t$mform->addRule('building',get_string('indicatenametobuilding', 'local_bookingrooms').': ','required');\n\t\t$mform->addElement('textarea', 'modules', get_string('modules', 'local_bookingrooms').': ');\n\t\t$mform->setDefault('modules',$moduleforline);\n\t\t$mform->setType('modules', PARAM_TEXT);\n\t\t$mform->addRule('modules', get_string('indicatemodules', 'local_bookingrooms'), 'required');\n\t\t$mform->addElement('static', 'rule', get_string('modulerule', 'local_bookingrooms').': ');\n\t\t$mform->addElement('static', 'condition', get_string('modulecondition', 'local_bookingrooms'));\n\t\t$mform->addElement('hidden','action','edit');\n\t\t$mform->setType('action', PARAM_TEXT);\n\t\t$mform->addElement('hidden','buildingid',$buildingid);\n\t\t$mform->setType('buildingid', PARAM_INT);\n\t\t$mform->addElement('hidden','prevaction',$prevaction);\n\t\t$mform->setType('prevaction', PARAM_INT);\n\t\t$this->add_action_buttons(true,get_string('changebuilding', 'local_bookingrooms'));\n\t}", "public function form(){\n \t \tif($this->layoutWidgetInfo){\n \t\t$setting = json_decode($this->layoutWidgetInfo->setting, true);\n \t}\n\n \t//default option(type[text], cols[3-9], rows[1], label[$key], name[$key], value[$setting[$k]])\n \t//add option(class, id, stype, styleRow, required, placeholder, attr, [options, code])\n \t$settingForm = array(\n \t\t'layout_widget_id' \t=> array('type' => 'hidden', 'value' => $this->layoutWidgetInfo->layoutWidgetId),\n \t\t'widget_controller' => array('type' => 'hidden', 'value' => $this->widgetController),\n \t\t'header' \t=> array('type' => 'custom', 'value' => \"<h4 class='widget_header col-md-12'>{$this->widgetController}</h4>\", 'label' => ''),\n\n \t\t'title' => array(),\n \t\t'class'\t=> array(),\n 'bg_color'\t=> array('label' => 'Màu nền', 'class' => 'ColorPickerSliders',\n 'addElement' => '<a href=\"index.php?r=admin/help/view&helpId=4\" target=\"_blank\">Xem thêm</a>'),\n \t\t'category_id'\t=> array('type' => 'select_category', 'label' => 'Category', 'required' => true,\n \t\t\t\t'options' => CategoryExt::getCategoryList()),\n \t\t'style'\t=> array('type' => 'select', 'options' => $this->settingDefault['style']),\n \t\t'order_by' => array('type' => 'select', 'options' => $this->settingDefault['order_by']),\n \t\t'order_direction' => array('type' => 'select', 'options' => $this->settingDefault['order_direction']),\n \t);\n\n \t$settingAll = array(\n \t\t'cols' => '3-9'\n \t);\n\n \t//render setting from\n \tTemplateHelper::renderForm($settingForm, $setting, $settingAll);\n TemplateHelper::getTemplate('layout/_extra/add_setting.php', $setting);\n TemplateHelper::getTemplate('layout/_extra/color_picker.php');\n \t}", "function build() {\n $this->to_usd = new view_field(\"To USD\");\n $this->to_local = new view_field(\"To local\");\n $this->timestamp = new view_field(\"Created\");\n $this->expire_date_time = new view_field(\"Expired\");\n parent::build();\n }", "function getForm($form, &$form_state, $disabled, $myvalues)\n {\n $form[\"data_entry_area1\"] = array(\n '#prefix' => \"\\n<section class='protocollib-admin raptor-dialog-table'>\\n\",\n '#suffix' => \"\\n</section>\\n\",\n );\n $form[\"data_entry_area1\"]['table_container'] = array(\n '#type' => 'item', \n '#prefix' => '<div class=\"raptor-dialog-table-container\">',\n '#suffix' => '</div>', \n '#tree' => TRUE,\n );\n\n\tglobal $base_url;\n $language_infer = new \\raptor_formulas\\LanguageInference();\n\t\t\n $showDeleteOption = $this->m_oUserInfo->hasPrivilege('REP1');\n $showAddOption = $this->m_oUserInfo->hasPrivilege('UNP1');\n \n $rows = \"\\n\";\n $result = db_select('raptor_protocol_lib', 'p')\n ->fields('p')\n ->orderBy('protocol_shortname')\n ->execute();\n foreach($result as $item) \n {\n $protocol_shortname = $item->protocol_shortname;\n if($item->original_file_upload_dt == NULL)\n {\n $docuploadedmarkup = 'No';\n } else {\n $docuploadedmarkup = '<span class=\"hovertips\" title=\"uploaded '\n .$item->original_filename\n .' on '\n .$item->original_file_upload_dt.'\">Yes</span>';\n }\n $keywords = $this->getFormattedKeywordsForTable($protocol_shortname);\n $active_markup = $item->active_yn == 1 ? '<b>Yes</b>' : 'No';\n $declaredHasContrast = $item->contrast_yn == 1 ? TRUE : FALSE;\n $hasSedation = $item->sedation_yn == 1 ? '<b>Yes</b>' : 'No';\n $hasRadioisotope = $item->sedation_yn == 1 ? '<b>Yes</b>' : 'No';\n $fullname = $item->name;\n $infered_hasContrast = $language_infer->inferContrastFromPhrase($fullname);\n $hasContrastMarkup = $declaredHasContrast ? '<b>Yes</b>' : 'No';\n if($infered_hasContrast !== NULL)\n {\n if(!(\n ($declaredHasContrast && $infered_hasContrast) || \n (!$declaredHasContrast && !$infered_hasContrast))\n )\n {\n if($infered_hasContrast)\n {\n $troublemsg = \"protocol long name implies YES contrast\";\n } else {\n $troublemsg = \"protocol long name implies NO contrast\";\n }\n $hasContrastMarkup = \"<span class='medical-health-warn' title='$troublemsg'>!!! $hasContrastMarkup !!!</span>\";\n }\n }\n if(!$showAddOption)\n {\n $addActionMarkup = '';\n $editActionMarkup = '';\n } else {\n $addActionMarkup = '<a href=\"'.$base_url.'/raptor/viewprotocollib?protocol_shortname='.$item->protocol_shortname.'\">View</a>';\n $editActionMarkup = '<a href=\"'.$base_url.'/raptor/editprotocollib?protocol_shortname='.$item->protocol_shortname.'\">Edit</a>';\n }\n if(!$showDeleteOption)\n {\n $deleteActionMarkup = '';\n } else {\n $deleteActionMarkup = '<a href=\"'.$base_url.'/raptor/deleteprotocollib?protocol_shortname='.$item->protocol_shortname.'\">Delete</a>';\n }\n $rows .= \"\\n\".'<tr>'\n . '<td>'.$protocol_shortname.'</td>'\n . '<td>'.$fullname.'</td>'\n . '<td>'.$active_markup.'</td>'\n . '<td>'.$hasContrastMarkup.'</td>'\n . '<td>'.$hasSedation.'</td>'\n . '<td>'.$hasRadioisotope.'</td>'\n . '<td>'.$item->modality_abbr.'</td>'\n . '<td>'.$item->version.'</td>'\n . '<td>'.$docuploadedmarkup.'</td>'\n . '<td>'.$keywords.'</td>'\n . \"<td>$addActionMarkup</td>\"\n . \"<td>$editActionMarkup</td>\"\n . \"<td>$deleteActionMarkup</td>\"\n . '</tr>';\n }\n\n $form[\"data_entry_area1\"]['table_container']['protocols'] = array('#type' => 'item',\n '#markup' => '<table id=\"my-raptor-dialog-table\" class=\"dataTable\">'\n . '<thead>'\n . '<tr>'\n . '<th title=\"System unique identifier for the protocol\">Short Name</th>'\n . '<th title=\"Full name of the protocol\">Long Name</th>'\n . '<th title=\"Only active protocols are available for use on new exams\">Is Active</th>'\n . '<th title=\"Has contrast\">C</th>'\n . '<th title=\"Has sedation\">S</th>'\n . '<th title=\"Has radioisotope\">R</th>'\n . '<th title=\"The equipment context for this protocol\">Modality</th>'\n . '<th title=\"Value increases with each saved edit\">Version</th>'\n . '<th title=\"The scanned document\">Doc Uploaded</th>'\n . '<th title=\"Keywords used for matching this protocol programatically\">Keywords</th>'\n . '<th title=\"Just view the protocol\">View</th>'\n . '<th title=\"Edit the protocol details\">Edit</th>'\n . '<th title=\"Remove this protocol from the library\">Delete</th>'\n . '</tr>'\n . '</thead>'\n . '<tbody>'\n . $rows\n . '</tbody>'\n . '</table>');\n \n $form['data_entry_area1']['action_buttons'] = array(\n '#type' => 'item', \n '#prefix' => '<div class=\"raptor-action-buttons\">',\n '#suffix' => '</div>', \n '#tree' => TRUE,\n );\n $form['data_entry_area1']['action_buttons']['createlink'] \n = array('#type' => 'item'\n , '#markup' => '<a class=\"button\" href=\"'\n .$base_url.'/raptor/addprotocollib\">Add Protocol</a>');\n\n $form['data_entry_area1']['action_buttons']['cancel'] = array('#type' => 'item'\n , '#markup' => '<input class=\"raptor-dialog-cancel\" type=\"button\" value=\"Exit\" />'); \n \n \n return $form;\n }", "function form_content()\r\n {\r\n $table = html_table($this->_width,0,4) ;\r\n $table->set_style(\"border: 0px solid\") ;\r\n\r\n $table->add_row($this->element_label($this->getUploadFileLabel()),\r\n $this->element_form($this->getUploadFileLabel())) ;\r\n\r\n $td = html_td(null, null, $this->element_form('Override Z0 Record Validation')) ;\r\n $td->set_tag_attribute('colspan', 2) ;\r\n $table->add_row($td) ;\r\n\r\n $this->add_form_block(null, $table) ;\r\n }", "protected function form()\n {\n $form = new Form(new PrizesLog);\n\n // 去掉`删除`按钮\n $form->tools(function (Form\\Tools $tools) {\n $tools->disableDelete();\n $tools->disableView();\n });\n\n $form->text('group.title', '奖品组')->readonly();\n $form->text('prize.name', '奖品名称')->readonly();\n $form->text('material.title', '物料名称')->readonly();\n $form->text('material_code', '物料代码')->readonly();\n $form->text('user.username', '用户名')->readonly();\n $form->text('user.mobile', '用户手机号')->readonly();\n $form->select('source', '来源')->options([\n '' => '', 'exchange' => '兑换/领取', 'lottery' => '抽奖'\n ])->readonly();\n $form->ip('ip', 'IP地址')->readonly();\n $form->datetime('created_at', '中奖时间')->readonly();\n $form->embeds('leaving_capital', '留资信息', function ($form) {\n $form->text('name', '收件人');\n $form->mobile('mobile', '手机号');\n $form->text('address', '收件地址');\n });\n $form->radio('status', '状态')->options([\n '0' => '作废', '1' => '有效'\n ])->default('1');\n return $form;\n }", "public function __construct()\n {\n parent::__construct();\n\n // creates the form\n $this->form = new BootstrapFormBuilder(self::$formName);\n\n // define the form title\n $this->form->setFormTitle('Avaliações');\n\n $inscricao_evento_id = new TDBUniqueSearch('inscricao_evento_id', 'eventtus', 'Evento', 'id', 'id','nome asc' );\n\n $inscricao_evento_id->setSize('100%');\n $inscricao_evento_id->setMinLength(0);\n $inscricao_evento_id->setMask('{nome}');\n\n $row1 = $this->form->addFields([new TLabel('Evento', null, '14px', null),$inscricao_evento_id]);\n $row1->layout = ['col-sm-6'];\n\n // keep the form filled during navigation with session data\n $this->form->setData( TSession::getValue(__CLASS__.'_filter_data') );\n\n $btn_ongenerate = $this->form->addAction('Gerar', new TAction([$this, 'onGenerate']), 'fa:search #ffffff');\n $btn_ongenerate->addStyleClass('btn-primary'); \n\n // vertical box container\n $container = new TVBox;\n $container->style = 'width: 100%';\n $container->add(TBreadCrumb::create(['Cadastros','Avaliações']));\n $container->add($this->form);\n\n parent::add($container);\n\n }", "protected function form()\n {\n $form = new Form(new $this->currentModel);\n \n $form->display('id', 'ID');\n $form->select('company_id', '公司名称')->options(Company::getSelectOptions());\n $form->text('project_name', '项目名称');\n $form->image('project_photo', '项目图片')->uniqueName()->move('public/photo/images/custom_thum/');\n $form->url('link_url', '项目链接');\n $form->radio('display', '公开度')->options(['0' => '公开', '-1'=> '保密'])->default('0');\n //$form->display('created_at', 'Created At');\n //$form->display('updated_at', 'Updated At');\n\n return $form;\n }", "public function definition() {\n global $DB;\n\n $m =& $this->_form;\n\n $m->addElement('hidden', 'id', '');\n\n $queries = $DB->get_records_menu('block_up_export_queries', null, 'name desc', 'id, name');\n\n $label = get_string('query_name', 'block_up_grade_export');\n $m->addElement('select', 'queryid', $label, $queries);\n\n $label = get_string('automated', 'block_up_grade_export');\n $m->addElement('checkbox', 'automated', $label, '');\n\n $course = $this->_customdata['course'];\n\n if (empty($course)) {\n $label = get_string('course') . ' ' . get_string('shortname');\n $m->addElement('text', 'shortname', $label);\n }\n\n $courses = $this->_customdata['courses'];\n\n if ($courses) {\n $m->addElement('static', 'page_top', '', $this->_customdata['pagination']);\n foreach ($courses as $course) {\n $m->addElement('radio', 'course', '', $course->fullname, $course->id);\n }\n $m->addElement('static', 'page_bottom', '', $this->_customdata['pagination']);\n\n $m->addRule('course', null, 'required', null, 'client');\n $m->setType('course', PARAM_INT);\n }\n\n $grade_seq = $this->_customdata['grade_seq'];\n\n if ($grade_seq and $grade_seq->items) {\n $label = get_string('clear_course', 'block_up_grade_export');\n $m->addElement('checkbox', 'clear_course', $label, '');\n\n $structure = $this->_customdata['structure'];\n $struct_params = function ($item) {\n return array('type' => 'item', 'object' => $item);\n };\n\n $label = get_string('select_grade', 'block_up_grade_export');\n $m->addElement('static', 'selected_course', $label, $course->fullname);\n\n foreach ($grade_seq->items as $grade_item) {\n $grade_icon = $structure->get_element_icon($struct_params($grade_item));\n\n $name = $grade_item->is_category_item() ?\n $grade_item->get_item_category()->get_name() :\n $grade_item->get_name();\n\n $label = \" $grade_icon{$name}\";\n\n $m->addElement('radio', 'itemid', '', $label, $grade_item->id);\n }\n\n $m->addElement('hidden', 'course', $course->id);\n $m->addRule('queryid', null, 'required', null, 'client');\n $m->setType('queryid', PARAM_MULTILANG);\n\n $m->disabledIf('itemid', 'clear_course', 'checked');\n }\n\n $label = $grade_seq ? 'submit' : 'next';\n $buttons = array(\n $m->createElement('submit', 'submit', get_string($label)),\n $m->createElement('cancel'),\n );\n\n $m->addGroup($buttons, 'buttons', '&nbsp;', array(' '), false);\n }", "function generateCell($type) {\n\t\t\n\t\tif($this->getV()) {\n\t\t\n\t\t\t$str = \"{v: \";\n\t\t\t\n\t\t\tif($type==\"string\") {\n\t\t\t\t$str.= \"'\".$this->escapeJSChars($this->getV()).\"',\";\n\t\t\t} elseif($type==\"boolean\") {\n\t\t\t\t$str.= \"'\".$this->getV().\"',\";\n\t\t\t} elseif($type==\"date\") {\n\t\t\t\t$str.= \"new Date(\".substr($this->getV(),0,4).\",\".(substr($this->getV(),5,2) - 1).\",\".substr($this->getV(),8,2).\"),\";\n\t\t\t} elseif($type==\"datetime\") {\n\t\t\t\t$str.= \"new Date(\".substr($this->getV(),0,4).\",\".(substr($this->getV(),5,2) - 1).\",\".substr($this->getV(),8,2).\",\".substr($this->getV(),11,2).\",\".substr($this->getV(),14,2).\",\".substr($this->getV(),17,2).\"),\";\n\t\t\t} elseif($type==\"timeofday\") {\n\t\t\t\t$str.= \"[\".substr($this->getV(),11,2).\",\".substr($this->getV(),14,2).\",\".substr($this->getV(),17,2).\"],\";\n\t\t\t} else {\t\t\n\t\t\t\t$str.= $this->escapeJSChars($this->getV()).\",\";\n\t\t\t}\n\t\t\t\n\t\t\tif($this->getF()) {\n\t\t\t\t$str.= \"f: '\".$this->getF().\"',\";\n\t\t\t}\t\t\n\t\t\t\n\t\t\tif($this->getClassName()) {\n\t\t\t\t$str.=\"p: {'className': '\".$this->getClassName().\"'},\";\n\t\t\t}\n\t\t\t\n\t\t\t$str = substr($str,0,-1);\n\t\t\t$str.= \"}\";\n\n\t\t} else {\n\t\t\n\t\t\t$str = \"\";\n\t\t\t\n\t\t}\n\t\t\n\t\treturn $str;\n\t\t\n\t}" ]
[ "0.6875267", "0.6660737", "0.61252147", "0.59181416", "0.5750583", "0.5628293", "0.56004137", "0.54911566", "0.5465777", "0.54592305", "0.5447524", "0.5405576", "0.5394894", "0.5352851", "0.5344981", "0.5321192", "0.5305566", "0.52538455", "0.51949364", "0.51825327", "0.5163714", "0.5151167", "0.51504636", "0.5136932", "0.51298517", "0.5082424", "0.5072682", "0.50598717", "0.50482756", "0.5039891", "0.5039271", "0.5037", "0.50292027", "0.5025533", "0.5019413", "0.5002462", "0.4987194", "0.49759224", "0.4970492", "0.4969992", "0.49566022", "0.49321628", "0.49292305", "0.49200353", "0.49078193", "0.48963696", "0.48928815", "0.48868367", "0.48796776", "0.48722807", "0.48678347", "0.48674512", "0.48659116", "0.48600763", "0.4856441", "0.4856267", "0.48517552", "0.48496294", "0.4846484", "0.4843509", "0.4842198", "0.48376042", "0.48323908", "0.4825812", "0.4822906", "0.48223424", "0.48222628", "0.48221713", "0.4821793", "0.48172328", "0.48157609", "0.4810527", "0.48095164", "0.48028076", "0.4801619", "0.48001236", "0.47951415", "0.47940224", "0.47898644", "0.47820336", "0.47804153", "0.47779062", "0.47743312", "0.4763918", "0.47623333", "0.4760224", "0.47580373", "0.47508883", "0.475038", "0.4749847", "0.4747031", "0.4743838", "0.4743728", "0.47400537", "0.4730476", "0.4727005", "0.4723434", "0.47214702", "0.47200248", "0.47181758" ]
0.7368667
0
Builds the form that define border properties of your progress bar
function buildForm() { $this->buildTabs(); // tab caption $this->addElement('header', null, 'Progress2 Generator - Control Panel: border properties'); $borderpainted[] =& $this->createElement('radio', null, null, 'Yes', true); $borderpainted[] =& $this->createElement('radio', null, null, 'No', false); $this->addGroup($borderpainted, 'borderpainted', 'Display the border:'); $this->addElement('text', 'borderclass', 'CSS class:', array('size' => 32)); $borderstyle['style'] =& $this->createElement('select', 'style', 'style', array('solid' => 'Solid', 'dashed' => 'Dashed', 'dotted' => 'Dotted', 'inset' => 'Inset', 'outset' => 'Outset')); $borderstyle['width'] =& $this->createElement('text', 'width', 'width', array('size' => 2)); $borderstyle['color'] =& $this->createElement('text', 'color', 'color', array('size' => 7)); $this->addGroup($borderstyle, 'borderstyle', null, ' '); // Buttons of the wizard to do the job $this->buildButtons(array('apply','process')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: main properties');\r\n\r\n $shape[] =& $this->createElement('radio', null, null, 'Horizontal', '1');\r\n $shape[] =& $this->createElement('radio', null, null, 'Vertical', '2');\r\n $this->addGroup($shape, 'shape', 'Shape:');\r\n\r\n $way[] =& $this->createElement('radio', null, null, 'Natural', 'natural');\r\n $way[] =& $this->createElement('radio', null, null, 'Reverse', 'reverse');\r\n $this->addGroup($way, 'way', 'Direction:');\r\n\r\n $autosize[] =& $this->createElement('radio', null, null, 'Yes', true);\r\n $autosize[] =& $this->createElement('radio', null, null, 'No', false);\r\n $this->addGroup($autosize, 'autosize', 'Best size:');\r\n\r\n $psize['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 4));\r\n $psize['height'] =& $this->createElement('text',\r\n 'height', 'height',\r\n array('size' => 4));\r\n $psize['left'] =& $this->createElement('text',\r\n 'left', 'left',\r\n array('size' => 4));\r\n $psize['top'] =& $this->createElement('text',\r\n 'top', 'top',\r\n array('size' => 4));\r\n $psize['position'] =& $this->createElement('text',\r\n 'position', 'position',\r\n array('disabled' => 'true'));\r\n $psize['bgcolor'] =& $this->createElement('text',\r\n 'bgcolor', 'bgcolor',\r\n array('size' => 7));\r\n $this->addGroup($psize, 'progresssize',\r\n 'Size, position and color:', ' ');\r\n\r\n $this->addElement('text', 'rAnimSpeed',\r\n array('Animation speed :',\r\n '(0-1000 ; 0:fast, 1000:slow)'));\r\n $this->addRule('rAnimSpeed',\r\n 'Should be between 0 and 1000',\r\n 'rangelength', array(0,1000), 'client');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('back','apply','process'));\r\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: run demo');\r\n\r\n $this->addElement('static', 'progressBar',\r\n 'Your progress meter looks like:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('reset','process'));\r\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: cell properties');\r\n\r\n $this->addElement('text', 'cellid', 'Id mask:', array('size' => 32));\r\n $this->addElement('text', 'cellclass', 'CSS class:', array('size' => 32));\r\n\r\n $cellvalue['min'] =& $this->createElement('text',\r\n 'min', 'minimum',\r\n array('size' => 4));\r\n $cellvalue['max'] =& $this->createElement('text',\r\n 'max', 'maximum',\r\n array('size' => 4));\r\n $cellvalue['inc'] =& $this->createElement('text',\r\n 'inc', 'increment',\r\n array('size' => 4));\r\n $this->addGroup($cellvalue, 'cellvalue', 'Value:', ' ');\r\n\r\n $cellsize['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 4));\r\n $cellsize['height'] =& $this->createElement('text',\r\n 'height', 'height',\r\n array('size' => 4));\r\n $cellsize['spacing'] =& $this->createElement('text',\r\n 'spacing', 'spacing',\r\n array('size' => 2));\r\n $cellsize['count'] =& $this->createElement('text',\r\n 'count', 'count',\r\n array('size' => 2));\r\n $this->addGroup($cellsize, 'cellsize', 'Size:', ' ');\r\n\r\n $cellcolor['active'] =& $this->createElement('text',\r\n 'active', 'active',\r\n array('size' => 7));\r\n $cellcolor['inactive'] =& $this->createElement('text',\r\n 'inactive', 'inactive',\r\n array('size' => 7));\r\n $cellcolor['bgcolor'] =& $this->createElement('text',\r\n 'bgcolor', 'background',\r\n array('size' => 7));\r\n $this->addGroup($cellcolor, 'cellcolor', 'Color:', ' ');\r\n\r\n $cellfont['family'] =& $this->createElement('text',\r\n 'family', 'family',\r\n array('size' => 32));\r\n $cellfont['size'] =& $this->createElement('text',\r\n 'size', 'size',\r\n array('size' => 2));\r\n $cellfont['color'] =& $this->createElement('text',\r\n 'color', 'color',\r\n array('size' => 7));\r\n $this->addGroup($cellfont, 'cellfont', 'Font:', ' ');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('apply','process'));\r\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: string properties');\r\n\r\n $stringpainted[] =& $this->createElement('radio', null, null, 'Yes', true);\r\n $stringpainted[] =& $this->createElement('radio', null, null, 'No', false);\r\n $this->addGroup($stringpainted, 'stringpainted', 'Render a custom string:');\r\n\r\n $this->addElement('text', 'stringid', 'Id:', array('size' => 32));\r\n $this->addElement('text', 'stringclass', 'CSS class:', array('size' => 32));\r\n $this->addElement('text', 'stringvalue', 'Content:', array('size' => 32));\r\n\r\n $stringsize['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 4));\r\n $stringsize['height'] =& $this->createElement('text',\r\n 'height', 'height',\r\n array('size' => 4));\r\n $stringsize['left'] =& $this->createElement('text',\r\n 'left', 'left',\r\n array('size' => 4));\r\n $stringsize['top'] =& $this->createElement('text',\r\n 'top', 'top',\r\n array('size' => 4));\r\n $stringsize['bgcolor'] =& $this->createElement('text',\r\n 'bgcolor', 'bgcolor',\r\n array('size' => 7));\r\n $this->addGroup($stringsize, 'stringsize', 'Size, position and color:', ' ');\r\n\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Left', 'left');\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Right', 'right');\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Top', 'top');\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Bottom', 'bottom');\r\n $this->addGroup($stringvalign, 'stringvalign', 'Vertical alignment:');\r\n\r\n $stringalign[] =& $this->createElement('radio', null, null,\r\n 'Left', 'left');\r\n $stringalign[] =& $this->createElement('radio', null, null,\r\n 'Right', 'right');\r\n $stringalign[] =& $this->createElement('radio', null, null,\r\n 'Center', 'center');\r\n $this->addGroup($stringalign, 'stringalign', 'Horizontal alignment:');\r\n\r\n $stringfont['family'] =& $this->createElement('text',\r\n 'family', 'family',\r\n array('size' => 40));\r\n $stringfont['size'] =& $this->createElement('text',\r\n 'size', 'size',\r\n array('size' => 2));\r\n $stringfont['color'] =& $this->createElement('text',\r\n 'color', 'color',\r\n array('size' => 7));\r\n $this->addGroup($stringfont, 'stringfont', 'Font:', ' ');\r\n\r\n $stringweight[] =& $this->createElement('radio', null, null,\r\n 'normal', 'normal');\r\n $stringweight[] =& $this->createElement('radio', null, null,\r\n 'Bold', 'bold');\r\n $this->addGroup($stringweight, 'stringweight', 'Font weight:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('apply','process'));\r\n }", "function border($args) {\r\n\t\t$description = $args['description'];\r\n\t\tunset($args['description']);\r\n\t\t\r\n\t\t// if plain is true at this point we must have come from a post meta box so do some switching of the args around\r\n\t\t$form_prefix = $this->metabox_id_fix($args);\r\n\t\t$form_value = $this->metabox_value_fix($args);\r\n\t\t\r\n\t\t\r\n\t\t$args['selections'] = array('0'=>'0','1'=>'1','2'=>'2','3'=>'3','4'=>'4','5'=>'5','6'=>'6','7'=>'7','8'=>'8','9'=>'9','10'=>'10','11'=>'11','12'=>'12','13'=>'13','14'=>'14','15'=>'15','16'=>'16','17'=>'17');\r\n\t\t$args['plain']=true; // switch to plain mode\r\n\t\t\r\n\t\tunset($args['description']); // kill off descriptions till the end\r\n\t\t$args['id'] = $form_prefix . \"[size]\";\r\n\t\t$args['value'] =$form_value[size];\r\n\t\t$args['width'] = '75';\r\n\t\t$args['tooltip'] = 'Choose the border size';\r\n\t\t$this->select($args);\r\n\t\t\r\n\t\t// add font units\r\n\t\t$args['id'] = $form_prefix . \"[unit]\";\r\n\t\t$args['value'] = $form_value['unit'];\r\n\t\t$args['width'] = '65';\r\n\t\t\t$args['tooltip'] = 'Choose the border size units';\r\n\t\t$this->fontunit($args);\r\n\t\t\r\n\t\t// add font size\r\n\t\t$args['id'] = $form_prefix . \"[type]\";\r\n\t\t$args['value'] = $form_value[type];\r\n\t\t$args['width'] = '165';\r\n\t\t$args['tooltip'] = 'Choose the border type';\r\n\t\t$this->bordertype($args);\r\n\t\t\r\n\t\t// add font units\r\n\t\t$args['id'] = $form_prefix . \"[color]\";\r\n\t\t$args['value'] = $form_value[color];\r\n\t\t$args['width'] = '75';\r\n\t\t$args['tooltip'] = 'Choose the border color';\r\n\t\t$this->color($args);\r\n\r\n\t\t$this->description($description);\r\n\t}", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: save PHP/CSS code');\r\n\r\n $code[] =& $this->createElement('checkbox', 'P', null, 'PHP');\r\n $code[] =& $this->createElement('checkbox', 'C', null, 'CSS');\r\n $this->addGroup($code, 'phpcss', 'PHP and/or StyleSheet source code:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('next','apply'));\r\n }", "public function getBorderStyle() {}", "public function getBorderStyle() {}", "function SLFramework_Progressbar($length=300, $height=20, $start=0, $insideText=\"\", $id=\"progressbar\") {\r\n\t\t\t$this->length = $length ; \r\n\t\t\t$this->insideText = $insideText ; \r\n\t\t\t$this->height = $height ; \r\n\t\t\t$this->start = $start ; \r\n\t\t\t$this->id = $id ; \r\n\t\t}", "public function getBorderStyle() {}", "public function getBorderStyle() {}", "public function getBorderStyle() {}", "public function getBorderStyle() {}", "public function getBorderStyle() {}", "protected function build()\n {\n $stockalign = new GtkAlignment(0, 0, 0, 0);\n $stockalign->add(\n GtkImage::new_from_stock(\n Gtk::STOCK_DIALOG_ERROR, Gtk::ICON_SIZE_DIALOG\n )\n );\n $this->pack_start($stockalign, false, true);\n\n\n $this->expander = new GtkExpander('');\n\n $this->message = new GtkLabel();\n $this->expander->set_label_widget($this->message);\n $this->message->set_selectable(true);\n $this->message->set_line_wrap(true);\n\n $this->userinfo = new GtkLabel();\n $this->userinfo->set_selectable(true);\n $this->userinfo->set_line_wrap(true);\n //FIXME: add scrolled window\n $this->expander->add($this->userinfo);\n\n $this->pack_start($this->expander);\n }", "public function buildForm()\n {\n $this\n ->addMeasureList()\n ->addAscendingList()\n ->addTitles(['class' => 'indicator_title_title_narrative', 'narrative_true' => true])\n ->addDescriptions(['class' => 'indicator_description_title_narrative'])\n ->addCollection('reference', 'Activity\\Reference', 'reference', [], trans('elementForm.reference'))\n ->addAddMoreButton('add_reference', 'reference')\n ->addBaselines()\n ->addPeriods()\n ->addAddMoreButton('add_period', 'period')\n ->addRemoveThisButton('remove_indicator');\n }", "protected function Form_Create() {\n\t\t\t$this->txtValue1 = new QTextBox($this);\n\t\t\t\n\t\t\t$this->txtValue2 = new QTextBox($this);\n\t\t\t\n\t\t\t$this->lstOperation = new QListBox($this);\n\t\t\t$this->lstOperation->AddItem('+', 'add');\n\t\t\t$this->lstOperation->AddItem('-', 'subtract');\n\t\t\t$this->lstOperation->AddItem('*', 'multiply');\n\t\t\t$this->lstOperation->AddItem('/', 'divide');\n\t\t\t\n\t\t\t$this->btnCalculate = new QButton($this);\n\t\t\t$this->btnCalculate->Text = 'Calculate';\n\t\t\t$this->btnCalculate->AddAction(new QClickEvent(), new QServerAction('btnCalculate_Click'));\n\t\t\t\n\t\t\t$this->lblResult = new QLabel($this);\n\t\t\t$this->lblResult->HtmlEntities = false;\n\t\t}", "function border() {\n\t\t\t// Matches field # of register_setting\n\t\t\t$options = get_option( 'subpages_as_tabs_options' );\n?>\n\t\t\t<input id=\"spat_border\" name=\"subpages_as_tabs_options[border]\" class=\"color_pick\" type=\"color\" size=\"7\" value=\"<?php _e( $options['border'] );?>\" />\n<?php\n\t\t}", "function build_basic_form()\r\n {\r\n $this->addElement('select', LanguagePack :: PROPERTY_BRANCH, Translation :: get('Branch'), LanguagePack :: get_branch_options());\r\n \r\n \t$this->addElement('file', 'file', Translation :: get('FileName'));\r\n $allowed_upload_types = array('zip');\r\n $this->addRule('file', Translation :: get('OnlyZIPAllowed'), 'filetype', $allowed_upload_types);\r\n $this->addRule('file', Translation :: get('ThisFieldIsRequired', null, Utilities :: COMMON_LIBRARIES), 'required');\r\n \r\n // Submit button\r\n //$this->addElement('submit', 'user_settings', 'OK');\r\n $buttons[] = $this->createElement('style_submit_button', 'submit', Translation :: get('Import', null, Utilities :: COMMON_LIBRARIES), array('class' => 'positive'));\r\n $buttons[] = $this->createElement('style_reset_button', 'reset', Translation :: get('Reset', null, Utilities :: COMMON_LIBRARIES), array('class' => 'normal empty'));\r\n \r\n $this->addGroup($buttons, 'buttons', null, '&nbsp;', false);\r\n }", "function buildTabs()\r\n {\r\n $this->_formBuilt = true;\r\n\r\n // Here we get all page names in the controller\r\n $pages = array();\r\n $myName = $current = $this->getAttribute('id');\r\n while (null !== ($current = $this->controller->getPrevName($current))) {\r\n $pages[] = $current;\r\n }\r\n $pages = array_reverse($pages);\r\n $pages[] = $current = $myName;\r\n while (null !== ($current = $this->controller->getNextName($current))) {\r\n $pages[] = $current;\r\n }\r\n // Here we display buttons for all pages, the current one's is disabled\r\n foreach ($pages as $pageName) {\r\n $disabled = ($pageName == $myName ? array('disabled' => 'disabled')\r\n : array());\r\n\r\n $tabs[] = $this->createElement('submit',\r\n $this->getButtonName($pageName),\r\n ucfirst($pageName),\r\n array('class' => 'flat') + $disabled);\r\n }\r\n $this->addGroup($tabs, 'tabs', null, '&nbsp;', false);\r\n }", "public function getFormStyle()\n {\n $prop = array();\n\n $prop['alignment'] = $this->value['text-align'];\n\n if (isset($this->value['background']['color']) && is_array($this->value['background']['color'])) {\n $prop['fillColor'] = $this->value['background']['color'];\n }\n\n if (isset($this->value['border']['t']['color'])) {\n $prop['strokeColor'] = $this->value['border']['t']['color'];\n }\n\n if (isset($this->value['border']['t']['width'])) {\n $prop['lineWidth'] = $this->value['border']['t']['width'];\n }\n\n if (isset($this->value['border']['t']['type'])) {\n $prop['borderStyle'] = $this->value['border']['t']['type'];\n }\n\n if (!empty($this->value['color'])) {\n $prop['textColor'] = $this->value['color'];\n }\n\n if (!empty($this->value['font-size'])) {\n $prop['textSize'] = $this->value['font-size'];\n }\n\n return $prop;\n }", "protected function buildForm()\n {\n $this->form = Yii::createObject(array_merge([\n 'scenario' => $this->scenario,\n 'parent_id' => $this->parent_id,\n 'parentTariff' => $this->parentTariff,\n 'tariff' => $this->tariff,\n ], $this->getFormOptions()));\n }", "public function __construct(\n private readonly int $borderWidth = 4,\n private string|array $backgroundColour = '#ffffff',\n private string|array $foregroundColour = '#000000',\n private string $format = 'png',\n ) {\n $this->backgroundColour = $this->handleColour($this->backgroundColour);\n $this->foregroundColour = $this->handleColour($this->foregroundColour);\n $this->format = strtolower($this->format);\n }", "public function buildForm()\n {\n }", "function render()\n {\n\t\t$value = $this->_value;\n\t\t$i = 0;\n\t\treturn \t\"<div>\".\n\t\t\t\t\t\"<label class=\\\"inline\\\">\"._AM_TMANAGER_BORDERBOX.\" :</label>&nbsp;&nbsp;&nbsp;\".\n\t\t\t\t\t\"<input type=\\\"radio\\\" name=\\\"\".$this->getName().\"_yn\\\" class='borders_r_same'style=\\\"vertical-align: baseline;margin:0\\\" value=\\\"1\\\" \".($value['same']?'checked=\\\"checked\\\"':'').\">&nbsp;\"._YES.\"&nbsp;&nbsp;\".\n\t\t\t\t\t\"<input type=\\\"radio\\\" name=\\\"\".$this->getName().\"_yn\\\" class='borders_r_same'style=\\\"vertical-align: baseline;margin:0\\\" value=\\\"0\\\" \".($value['same']?'':'checked=\\\"checked\\\"').\">&nbsp;\"._NO.\n\t\t\t\t\t\"<div id='\".$this->getName().\"_sameborders' style='display:\".($value['same']?'block':'none').\"'>\".\n\t\t\t\t\t\t$this->SingleBorder(_ALL, $value['size'][0], $value['type'][0], $value['color'][0], 'all').\n\t\t\t\t\t\"</div>\".\n\t\t\t\t\t\"<div id='\".$this->getName().\"_diffborders' style='display:\".($value['same']?'none':'block').\"'>\".\t\t\t\t\n\t\t\t\t\t\t$this->SingleBorder(_AM_TMANAGER_BOX_TOP, $value['size'][$i], $value['type'][$i], $value['color'][$i++], 'top').\n\t\t\t\t\t\t$this->SingleBorder(_AM_TMANAGER_BOX_LEFT, $value['size'][$i], $value['type'][$i], $value['color'][$i++], 'left').\n\t\t\t\t\t\t$this->SingleBorder(_AM_TMANAGER_BOX_RIGHT, $value['size'][$i], $value['type'][$i], $value['color'][$i++], 'right').\n\t\t\t\t\t\t$this->SingleBorder(_AM_TMANAGER_BOX_BOTTOM, $value['size'][$i], $value['type'][$i], $value['color'][$i++], 'bot').\n\t\t\t\t\t\"</div>\".\n\t\t\t\t\"</div>\";\n }", "public function print_form_styles() {\n\n\t\tif ( empty( $this->form_data['settings']['conversational_forms_color_scheme'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$color = \\sanitize_hex_color( $this->form_data['settings']['conversational_forms_color_scheme'] );\n\n\t\tif ( empty( $color ) ) {\n\t\t\t$color = '#448ccb';\n\t\t}\n\n\t\t$min = \\wpforms_get_min_suffix();\n\n\t\tswitch ( $color ) {\n\t\t\tcase '#448ccb':\n\t\t\t\t$theme = 'color-scheme-blue';\n\t\t\t\tbreak;\n\t\t\tcase '#1a3c5a':\n\t\t\t\t$theme = 'color-scheme-dark_blue';\n\t\t\t\tbreak;\n\t\t\tcase '#4aa891':\n\t\t\t\t$theme = 'color-scheme-teal';\n\t\t\t\tbreak;\n\t\t\tcase '#9178b3':\n\t\t\t\t$theme = 'color-scheme-purple';\n\t\t\t\tbreak;\n\t\t\tcase '#cccccc':\n\t\t\t\t$theme = 'color-scheme-light';\n\t\t\t\tbreak;\n\t\t\tcase '#363636':\n\t\t\t\t$theme = 'color-scheme-dark';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$theme = '';\n\t\t}\n\n\t\tif ( ! $theme ) {\n\t\t\trequire \\plugin_dir_path( WPFORMS_CONVERSATIONAL_FORMS_FILE ) . 'templates/dynamic-color-scheme-styles.php';\n\t\t\treturn;\n\t\t}\n\n\t\t\\wp_enqueue_style(\n\t\t\t\"wpforms-conversational-forms-{$theme}\",\n\t\t\t\\wpforms_conversational_forms()->url . \"assets/css/color-schemes/{$theme}{$min}.css\",\n\t\t\tarray( 'wpforms-conversational-forms' ),\n\t\t\t\\WPFORMS_CONVERSATIONAL_FORMS_VERSION\n\t\t);\n\t}", "function renderForm()\t{\n\n\t\t$fields[] = $this->renderField( $GLOBALS['LANG']->getLL('settings'), 'divider', '');\n\t\t$fields[] = $this->renderField( $GLOBALS['LANG']->getLL('spaceTitle'), 'text', 'title');\n\t\n\t\tif(count($this->error) > 0) {\n\t\t\t$form .= \"<span style='display:block;color:red;font-weight:bold;padding:10px;'>\" .\n\t\t\t\t\t\t\t implode(\"<br />\", $this->error) . \n\t\t\t\t\t \"</span>\";\t\n\t\t}\n\n\t\t$form .= \"<form action=\" . t3lib_div::getThisUrl() . \"><table border='0' cellpadding='7'>\";\n\t\t$form .= implode(\"\\n\", $fields);\n\t\t$form .= \"<tr><td colspan='2' align='right'>\" .\n\t\t\t\t \"<input type='hidden' name='formPosted' value='1'>\" . \n\t\t\t\t \"<input type='submit' value='\" . $GLOBALS['LANG']->getLL('createSpace') . \"'></td></tr></table></form>\";\n\n\t\treturn $form;\n\t}", "function buildSettingsForm() {}", "function initStylePropertiesForm()\n\t{\n\t\tglobal $ilCtrl, $lng, $ilTabs, $ilSetting;\n\t\t\n\t\tinclude_once(\"./Services/Style/classes/class.ilObjStyleSheet.php\");\n\t\t$lng->loadLanguageModule(\"style\");\n\n\t\tinclude_once(\"./Services/Form/classes/class.ilPropertyFormGUI.php\");\n\t\t$this->form = new ilPropertyFormGUI();\n\t\t\n\t\t$fixed_style = $ilSetting->get(\"fixed_content_style_id\");\n\t\t$style_id = $this->object->getStyleSheetId();\n\n\t\tif ($fixed_style > 0)\n\t\t{\n\t\t\t$st = new ilNonEditableValueGUI($lng->txt(\"style_current_style\"));\n\t\t\t$st->setValue(ilObject::_lookupTitle($fixed_style).\" (\".\n\t\t\t\t$this->lng->txt(\"global_fixed\").\")\");\n\t\t\t$this->form->addItem($st);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$st_styles = ilObjStyleSheet::_getStandardStyles(true, false,\n\t\t\t\t$_GET[\"ref_id\"]);\n\n\t\t\t$st_styles[0] = $this->lng->txt(\"default\");\n\t\t\tksort($st_styles);\n\n\t\t\tif ($style_id > 0)\n\t\t\t{\n\t\t\t\t// individual style\n\t\t\t\tif (!ilObjStyleSheet::_lookupStandard($style_id))\n\t\t\t\t{\n\t\t\t\t\t$st = new ilNonEditableValueGUI($lng->txt(\"style_current_style\"));\n\t\t\t\t\t$st->setValue(ilObject::_lookupTitle($style_id));\n\t\t\t\t\t$this->form->addItem($st);\n\n//$this->ctrl->getLinkTargetByClass(\"ilObjStyleSheetGUI\", \"edit\"));\n\n\t\t\t\t\t// delete command\n\t\t\t\t\t$this->form->addCommandButton(\"editStyle\",\n\t\t\t\t\t\t$lng->txt(\"style_edit_style\"));\n\t\t\t\t\t$this->form->addCommandButton(\"deleteStyle\",\n\t\t\t\t\t\t$lng->txt(\"style_delete_style\"));\n//$this->ctrl->getLinkTargetByClass(\"ilObjStyleSheetGUI\", \"delete\"));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($style_id <= 0 || ilObjStyleSheet::_lookupStandard($style_id))\n\t\t\t{\n\t\t\t\t$style_sel = ilUtil::formSelect ($style_id, \"style_id\",\n\t\t\t\t\t$st_styles, false, true);\n\t\t\t\t$style_sel = new ilSelectInputGUI($lng->txt(\"style_current_style\"), \"style_id\");\n\t\t\t\t$style_sel->setOptions($st_styles);\n\t\t\t\t$style_sel->setValue($style_id);\n\t\t\t\t$this->form->addItem($style_sel);\n//$this->ctrl->getLinkTargetByClass(\"ilObjStyleSheetGUI\", \"create\"));\n\t\t\t\t$this->form->addCommandButton(\"saveStyleSettings\",\n\t\t\t\t\t\t$lng->txt(\"save\"));\n\t\t\t\t$this->form->addCommandButton(\"createStyle\",\n\t\t\t\t\t$lng->txt(\"sty_create_ind_style\"));\n\t\t\t}\n\t\t}\n\t\t$this->form->setTitle($lng->txt(\"wiki_style\"));\n\t\t$this->form->setFormAction($ilCtrl->getFormAction($this));\n\t}", "protected function definition_inner(&$mform) {\n\n $norepeats = $this->_customdata['norepeats']; // number of dimensions to display\n $descriptionopts = $this->_customdata['descriptionopts']; // wysiwyg fields options\n $current = $this->_customdata['current']; // current data to be set\n\n $mform->addElement('hidden', 'norepeats', $norepeats);\n $mform->setType('norepeats', PARAM_INT);\n // value not to be overridden by submitted value\n $mform->setConstants(array('norepeats' => $norepeats));\n\n $levelgrades = array();\n for ($i = 100; $i >= 0; $i--) {\n $levelgrades[$i] = $i;\n }\n\n for ($i = 0; $i < $norepeats; $i++) {\n $mform->addElement('header', 'dimension'.$i, get_string('dimensionnumber', 'workshopform_rubric', $i+1));\n $mform->addElement('hidden', 'dimensionid__idx_'.$i);\n $mform->setType('dimensionid__idx_'.$i, PARAM_INT);\n $mform->addElement('editor', 'description__idx_'.$i.'_editor',\n get_string('dimensiondescription', 'workshopform_rubric'), '', $descriptionopts);\n if (isset($current->{'numoflevels__idx_' . $i})) {\n $numoflevels = max($current->{'numoflevels__idx_' . $i} + self::ADDLEVELS, self::MINLEVELS);\n } else {\n $numoflevels = self::MINLEVELS;\n }\n $prevlevel = -1;\n for ($j = 0; $j < $numoflevels; $j++) {\n $mform->addElement('hidden', 'levelid__idx_' . $i . '__idy_' . $j);\n $mform->setType('levelid__idx_' . $i . '__idy_' . $j, PARAM_INT);\n $levelgrp = array();\n $levelgrp[] = $mform->createElement('select', 'grade__idx_'.$i.'__idy_'.$j,'', $levelgrades);\n $levelgrp[] = $mform->createElement('textarea', 'definition__idx_'.$i.'__idy_'.$j, '', array('cols' => 60, 'rows' => 3));\n $mform->addGroup($levelgrp, 'level__idx_'.$i.'__idy_'.$j, get_string('levelgroup', 'workshopform_rubric'), array(' '), false);\n $mform->setDefault('grade__idx_'.$i.'__idy_'.$j, $prevlevel + 1);\n if (isset($current->{'grade__idx_'.$i.'__idy_'.$j})) {\n $prevlevel = $current->{'grade__idx_'.$i.'__idy_'.$j};\n } else {\n $prevlevel++;\n }\n }\n }\n\n $mform->registerNoSubmitButton('adddims');\n $mform->addElement('submit', 'adddims', get_string('addmoredimensions', 'workshopform_rubric',\n workshop_rubric_strategy::ADDDIMS));\n $mform->closeHeaderBefore('adddims');\n\n $mform->addElement('header', 'configheader', get_string('configuration', 'workshopform_rubric'));\n $layoutgrp = array();\n $layoutgrp[] = $mform->createElement('radio', 'config_layout', '',\n get_string('layoutlist', 'workshopform_rubric'), 'list');\n $layoutgrp[] = $mform->createElement('radio', 'config_layout', '',\n get_string('layoutgrid', 'workshopform_rubric'), 'grid');\n $mform->addGroup($layoutgrp, 'layoutgrp', get_string('layout', 'workshopform_rubric'), array('<br />'), false);\n $mform->setDefault('config_layout', 'list');\n $this->set_data($current);\n }", "function __construct()\n {\n parent::__construct();\n \n // creates the form\n $this->form = new TQuickForm('form_historicotrabalho');\n $this->form->class = 'tform'; // change CSS class\n \n $this->form->style = 'display: table;width:100%'; // change style\n \n // Define Título da página\n $this->form->setFormTitle('Banco de Horas - Lançamento de Escalas');\n // Inicía ferramentas auxiliares\n $fer = new TFerramentas(); // Ferramentas diversas\n $sicad = new TSicadDados(); // Ferramentas de acesso ao SICAD\n //Realiza definições iniciais de acesso\n $profile = TSession::getValue('profile'); //Profile da Conta do usuário\n if ($this->opm_operador==false) //Carrega OPM do usuário\n {\n //Confere se já foi carregado a OPM, senão carrega...ou se o ambiente for de desenvolvimento usa a OPM = 140\n $this->opm_operador = ($fer->is_dev()==true) ? 140 : $profile['unidade']['id'];\n }\n if (!$this->nivel_sistema || $this->config_load == false) //Carrega OPMs que tem acesso\n {\n $this->nivel_sistema = $fer->getnivel (get_class($this));//Verifica qual nível de acesso do usuário\n $this->listas = $sicad->get_OpmsRegiao($this->opm_operador);//Carregas as OPMs que o usuário administra\n $this->config = $fer->getConfig($this->sistema); //Busca o Nível de acesso que o usuário tem para a Classe\n $this->config_load = true; //Informa que configuração foi carregada\n }\n \n // Cria os Itens do Formulário\n $rgmilitar = new TEntry('rgmilitar');\n \n //Monta ComboBox com OPMs que o Operador pode ver\n //echo $this->nivel_sistema.'---'.$this->opm_operador;\n if ($this->nivel_sistema>=80) //Adm e Gestor\n {\n $criteria = null;\n }\n else if ($this->nivel_sistema>=50 ) //Nível Operador (carrega OPM e subOPMs)\n {\n $criteria = new TCriteria;\n //Se não há lista de OPM, carrega só a OPM do usuário\n $lista = ($this->listas['valores']!='') ? $this->listas['valores'] : $profile['unidade']['id'];\n $query = \"(SELECT DISTINCT id FROM g_geral.opm WHERE id IN (\".$lista.\"))\";\n $criteria->add (new TFilter ('id','IN',$query));\n }\n else if ($this->nivel_sistema<50) //nível de visitante (só a própria OPM)\n {\n $criteria = new TCriteria;\n $query = \"(SELECT DISTINCT id FROM g_geral.opm WHERE id IN (\".$this->opm_operador.\"))\";\n $criteria->add (new TFilter ('id','IN',$query));\n }\n $opm = new TDBCombo('opm','sicad','OPM','id','nome','nome',$criteria);\n \n $ativo = new TCombo('ativo');\n $lista_opm = new TSelect('lista_opm');\n $lista_slc = new TSelect('lista_slc');\n //Critério para os Turnos de Serviço (Deve-se excluir os ocultos e o item id=13)\n $criteria = new TCriteria; \n $criteria->add(new TFilter('oculto', '=', 'f'));\n $criteria->add(new TFilter('id', '!=', 13));\n $turno = new TDBCombo('turno','sicad','turnos','id','nome','nome',$criteria);\n \n $datainicial = new TDate('dataInicial');\n $datafinal = new TDate('dataFinal');\n $horaIncialOrdinario = new TEntry('horaInicialOrdinario');\n $opm_id_info = new TDBCombo('opm_id_info','sicad','OPM','id','sigla','sigla');\n $opm_info_atual = new TCombo('OPM_info_Atual');\n $diasExtra = new TEntry('diasExtra');\n $mesExtra = new TCombo('mesExtra');\n $anoExtra = new TCombo('anoExtra');\n $horaInicioExtra = new TEntry('horaInicioExtra');\n $horasTrabalhadas = new TEntry('horasTrabalhadas');\n $tipoExtra = new TCombo('tipoExtra');\n $afasta_id = new TDBCombo('afasta_id','sicad','afastamentos','id','nome','nome');\n $dtinicioaf = new TDate('dtinicioaf');\n $dtfimaf = new TDate('dtfimaf');\n $bgaf = new TEntry('bgaf');\n $anobgaf = new TEntry('anobgaf');\n \n //Formatar Itens\n $rgmilitar->setSize(80);\n $opm->setSize(300);\n $lista_opm->setSize(280,256);\n $lista_slc->setSize(280,256);\n $turno->setSize(200);\n $datainicial->setSize(80);\n $datafinal->setSize(80);\n $horaIncialOrdinario->setSize(50);\n $opm_id_info->setSize(150);\n $opm_info_atual->setSize(80);\n $diasExtra->setSize(200);\n $mesExtra->setSize(80);\n $anoExtra->setSize(80);\n $horaInicioExtra->setSize(50);\n $horasTrabalhadas->setSize(50);\n $tipoExtra->setSize(120);\n $afasta_id->setSize(150);\n $dtinicioaf->setSize(80);\n $dtfimaf->setSize(80);\n $bgaf->setSize(80);\n $anobgaf->setSize(80);\n $ativo->setSize(80);\n //Style\n $lista_opm->style = \"font-size: 12px;\";\n $lista_slc->style = \"font-size: 12px;\";\n\n //Mascaras\n $datainicial->setMask('dd-mm-yyyy');\n $datafinal->setMask('dd-mm-yyyy');\n $dtinicioaf->setMask('dd-mm-yyyy');\n $dtfimaf->setMask('dd-mm-yyyy');\n $horaIncialOrdinario->setMask('99:99');\n $horaInicioExtra->setMask('99:99');\n $horasTrabalhadas->setMask('99');\n\n //Dados\n $opm_info_atual->addItems($fer->lista_sim_nao());//($item);\n $opm_info_atual->setValue('N');\n $ativo->addItems($fer->lista_sim_nao());//($item);\n $ativo->setValue('N');\n //\n $item = array (\"S\"=>\"Remunerada\",\"N\"=>\"Administrativa\");\n $tipoExtra->addItems($item);\n $tipoExtra->setValue('N');\n //\n $fer = new TFerramentas;\n $mesExtra->addItems($fer->lista_meses());\n $anoExtra->addItems($fer->lista_anos());\n //Tips\n $rgmilitar->setTip('Preencha com o RG do Militar pretendido...');\n $opm->setTip('Selecione a OPM para que possa preencher o campo de Lista da OPM com os componentes da Unidade.');\n $lista_opm->setTip('Lista dos Militares pertencente à Unidade Selecionada acima.<br>'.\n 'Vale lembrar que esta lista é atualizada diáriamente, assim os que estão aqui reflete as listas do SICAD.<br>' .\n 'Outro ponto a se considerar é a possibilidade de selecionar vários PMs, para isso basta usar<br>'.\n 'as teclas Control (ctrl) ou shift (seta pra cima);');\n $lista_slc->setTip('Militares Selecionados. Todos que estão nesta lista serão afetados, quer por uma escala ou por afastamentos...');\n $turno->setTip('Selecione uma Escala conforme a necessidade.');\n $datainicial->setTip('Selecione a data inicial da Escala Ordinária.');\n $datafinal->setTip('Selecione a data final da Escala Ordinária');\n $horaIncialOrdinario->setTip('Informe a hora de inicio do primeiro turno da Escala Ordinária.');\n $opm_id_info->setTip('Selecione qual foi a OPM informante da Escala.<br>É útil quando o militar está prestando serviços em uma OPM diferente da sua.');\n $opm_info_atual->setTip('A unidade Informante é a Unidade Atual? Se SIM, irei substituir a unidade que por ventura está na ficha do militar pela que foi informada...');\n $diasExtra->setTip('Defina os dias que o militar trabalhou podendo ser:<br> - Um dia apenas (Ex: 1);<br>- Alguns dias separados por vírgula(Ex: 2,5,8);<br>- Um intervalo de dias ligados por traço (Ex: 2-10);<br>- Um misto de combinações (Ex: 1,3-5,8,15-25). ');\n $mesExtra->setTip('Mês que ocorreu o serviço extra.');\n $anoExtra->setTip('Ano que ocorreu o serviço extra.');\n $horaInicioExtra->setTip('Hora que o serviço extra iniciou.');\n $horasTrabalhadas->setTip('Quantas horas foram trabalhadas neste serviço extra.');\n $tipoExtra->setTip('Defina se a escala foi Administrativa (sem remuneração AC-4) ou Remunerada (com pagamento de AC-4).');\n $afasta_id->setTip('Qual tipo de afastamento o militar fez jus.');\n $dtinicioaf->setTip('Data inicial do afastamento.');\n $dtfimaf->setTip('Data final do afastamento.');\n $bgaf->setTip('Numero do BG onde foi publicado o afastamento(Opcional).');\n $anobgaf->setTip('Ano de publicação do BG de Afastamento (Opcional).');\n $ativo->setTip('Se desejar que os militares inativos façam parte da seleção, marque como SIM para seleciona-los.'.\n '<br>Caso troque esta opção, não haverá a limpeza dos já selecionados.');\n //Ações\n //$change_action = new TAction(array($this, 'onSelectOpm_old'));//Ação de Popular lista de PMs\n //$opm->setChangeAction($change_action);\n //$ativo->setChangeAction($change_action);\n \n //Controle de Nível\n if ($this->nivel_sistema<$this->config[$this->cfg_chg_opm])\n {\n $opm_id_info->setEditable(FALSE);\n $opm_info_atual->setEditable(FALSE);\n }\n //Botões\n //Seleciona PMs\n $addPM = new TButton('addPM');\n $addPM->setImage('fa:arrow-down black');\n $addPM->class = 'btn btn-primary btn-sm';\n $Action = new TAction(array($this, 'onSelectMilitar'));\n $addPM->setAction($Action);\n $addPM->setLabel('Seleciona');\n \n //Botão Gera Escala Ordinária\n $runOrd = new TButton('runOrd');\n $runOrd->setImage('fa:floppy-o red');\n $runOrd->class = 'btn btn-primary btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_ord]) ? new TAction(array($this, 'onGeraOrdinaria')) : new TAction(array($this, 'NoAcess'));\n $runOrd->setAction($Action);\n $runOrd->setLabel('Gera Escala');\n \n //Botão Gera Escala Extra\n $runExt = new TButton('runExt');\n $runExt->setImage('fa:floppy-o red');\n $runExt->class = 'btn btn-primary btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_ext]) ? new TAction(array($this, 'onGeraExtra')) : new TAction(array($this, 'NoAcess'));\n $runExt->setAction($Action);\n $runExt->setLabel('Gera Escala');\n \n //Botão Gera Afastamento\n $runAfa = new TButton('runAfa');\n $runAfa->setImage('fa:floppy-o red');\n $runAfa->class = 'btn btn-primary btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_afa]) ? new TAction(array($this, 'onGeraAfastamento')) : new TAction(array($this, 'NoAcess'));\n $runAfa->setAction($Action);\n $runAfa->setLabel('Gera Afastamento');\n \n //Botão Limpa Afastamento\n $runCls = new TButton('runCls');\n $runCls->setImage('fa:trash black');\n $runCls->class = 'btn btn-danger btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_cls_afa]) ? new TAction(array($this, 'onLimpaAfastamento')) : new TAction(array($this, 'NoAcess'));\n $runCls->setAction($Action);\n $runCls->setLabel('Limpa Afastamento');\n \n //Botão Verifica Escala\n $runVer = new TButton('runVer');\n $runVer->setImage('fa:eye black');\n $runVer->class = 'btn btn-info btn-sm';\n $Action = new TAction(array($this, 'onListaEscala'));\n $runVer->setAction($Action);\n $runVer->setLabel('Ver Escala');\n \n //Botão limpa Escalas\n $runLmp = new TButton('runLmp');\n $runLmp->setImage('fa:trash black');\n $runLmp->class = 'btn btn-danger btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_cls_esc]) ? new TAction(array($this, 'onLimpaEscala')) : new TAction(array($this, 'NoAcess'));\n $runLmp->setAction($Action);\n $runLmp->setLabel('Limpa Escala');\n \n //Botão Carrega OPM na Lista da OPM\n $runOpm = new TButton('runOpm');\n $runOpm->setImage('fa:retweet');\n $runOpm->class = 'btn btn-success btn-sm';\n $Action = new TAction(array($this, 'onSelectOpm_old'));\n $runOpm->setAction($Action);\n $runOpm->setLabel('Carrega OPM');\n \n $table = new TTable();\n $table-> border = '0';\n $table-> cellpadding = '4';\n $table-> style = 'border-collapse:collapse; text-align: center;';\n\n //Monta selecionador\n $hbox1 = new THBox;\n $hbox1->addRowSet( new TLabel('RG:'),$rgmilitar,$addPM,new TLabel('Unidade:'),$opm,new TLabel('Seleciona Inativos?'),$ativo,$runOpm);\n $frame1 = new TFrame;\n $frame1->setLegend('Selecione os PMs ou a OPM');\n $frame1->add($hbox1);\n //Monta Labels das tabelas de distribuição\n $title4 = new TLabel('Listagem da OPM');\n $title4->setFontSize(12);\n $title4->setFontFace('Arial');\n $title4->setFontColor('black');\n $title4->setFontStyle('b');\n \n $title3 = new TLabel('Comandos');\n $title3->setFontSize(12);\n $title3->setFontFace('Arial');\n $title3->setFontColor('black');\n $title3->setFontStyle('b');\n \n $title2 = new TLabel('PMs Selecionados');\n $title2->setFontSize(12);\n $title2->setFontFace('Arial');\n $title2->setFontColor('black');\n $title2->setFontStyle('b');\n \n $title1 = new TLabel('Gestão da Escala');\n $title1->setFontSize(12);\n $title1->setFontFace('Arial');\n $title1->setFontColor('black');\n $title1->setFontStyle('b');\n \n //Botões de Serviço\n $add = new TButton('add_opm');\n $del = new TButton('del_opm');\n $cls = new TButton('clear');\n $ret = new TButton('return');\n \n //Tabelas Auxiliares de Cadastro\n $table_ord = new TTable;//Escalas Ordinárias\n $table_ext = new TTable;//Escalas Extras\n $table_afa = new TTable;//Afastamentos\n\n //Cria no Notebook \n $notebook = new TNotebook(200, 220);\n // Crias as Abas no notebook\n $notebook->appendPage('Ordinária' , $table_ord);\n $notebook->appendPage('Extra' , $table_ext);\n $notebook->appendPage('Afastamento', $table_afa);\n\n //Itens: Escala Ordinária\n $table_ord->addRowSet(array(new TLabel('Escala'),$turno));\n $table_ord->addRowSet(array(new TLabel('De'),$datainicial,new TLabel('A'),$datafinal));\n $table_ord->addRowSet(array(new TLabel('Hora Inicial'),$horaIncialOrdinario));\n $table_ord->addRowSet(array(new TLabel('OPM Informante'),$opm_id_info));\n $table_ord->addRowSet(array(new TLabel('Usar Informante com Atual'),$opm_info_atual));\n $table_ord->addRowSet(array($runLmp,$runOrd));\n //Itens: Escala Extra\n $table_ext->addRowSet(array(new TLabel('Dias'),$diasExtra));\n $table_ext->addRowSet(array(new TLabel('Mês'),$mesExtra,new TLabel('Ano'),$anoExtra));\n $table_ext->addRowSet(array(new TLabel('Hr Início'),$horaInicioExtra,new TLabel('Hrs. Trab.'),$horasTrabalhadas));\n $table_ext->addRowSet(array(new TLabel('Tipo Escala'),$tipoExtra));\n $table_ext->addRowSet($runExt);\n //Itens: Afastamento\n $table_afa->addRowSet(array(new TLabel('Afastamento'),$afasta_id));\n $table_afa->addRowSet(array(new TLabel('De'),$dtinicioaf,new TLabel('A'),$dtfimaf));\n $table_afa->addRowSet(array(new TLabel('BG'),$bgaf,new TLabel('/'),$anobgaf));\n $table_afa->addRowSet(array($runCls,$runAfa));\n\n //Ações\n $add->setAction(new TAction(array($this, 'onAddPMSelect')));\n $del->setAction(new TAction(array($this, 'onDelPMSelect')));\n $cls->setAction(new TAction(array($this, 'onClearSelect')));\n $ret->setAction(new TAction(array($this, 'onReturn')));\n //Labels\n $add->setLabel('Adiciona');\n $del->setLabel('Remove');\n $cls->setLabel('Limpa');\n $ret->setLabel('Volta ao Gerenciador');\n //Icones\n $add->setImage('fa:plus green');\n $del->setImage('fa:minus red');\n $cls->setImage('fa:file-o black');\n $ret->setImage('fa:backward black');\n //Classes\n $ret->class = 'btn btn-warning';\n //PopUps\n if ($this->popAtivo)\n {\n $addPM->popover = 'true';\n $addPM->popside = 'top';\n $addPM->poptitle = 'Seleciona Militar';\n $addPM->popcontent = 'Clique aqui ou tecle ENTER para selecionar o militar.';\n //\n $add->popover = 'true';\n $add->popside = 'top';\n $add->poptitle = 'Adiciona Seleção de Militares';\n $add->popcontent = 'Adiciona o(s) Militar(es) selecionado(s) da caixa Lista da OPM.';\n //\n $del->popover = 'true';\n $del->popside = 'top';\n $del->poptitle = 'Remove Seleção de Militares';\n $del->popcontent = 'Remove o(s) Militar(es) selecionado(s) da caixa Selecionados.';\n //\n $cls->popover = 'true';\n $cls->popside = 'top';\n $cls->poptitle = 'Limpa toda Seleção de Militares';\n $cls->popcontent = 'Remove TODOS os Militares selecionados da caixa Selecionados.';\n //\n $ret->popover = 'true';\n $ret->popside = 'top';\n $ret->poptitle = 'Retorno à Tela de Gerenciamento';\n $ret->popcontent = 'Retorna para a Tela de Gerenciamento do Banco de Horas.<br>A lista e Militares já selecionados permanecerá até o fechamento do sistema.';\n //\n $runOrd->popover = 'true';\n $runOrd->popside = 'top';\n $runOrd->poptitle = 'Gera Escala Ordinária.';\n $runOrd->popcontent = 'São campos necessários:<br>- Turno;<br>- Data inicial e final;<br>- Hora de Início da Escala.';//.\n //\n $runExt->popover = 'true';\n $runExt->popside = 'top';\n $runExt->poptitle = 'Gera Escala Extra';\n $runExt->popcontent = 'São Campos necessários:<br>- Dias (preencher com um ou mais);<br>- Mês e Ano;<br>- Hora Início;<br>'.\n '- Horas Trabalhadas;<br>- Tipo Escala.';\n //\n $runCls->popover = 'true';\n $runCls->popside = 'top';\n $runCls->poptitle = 'Limpa Afastamentos e Restrições (apenas)';\n $runCls->popcontent = 'Use os campos acima como filtro.';\n //\n $runAfa->popover = 'true';\n $runAfa->popside = 'top';\n $runAfa->poptitle = 'Gera Afastamentos e Restrições';\n $runAfa->popcontent = 'São Campos necessários:<br>- Afastamento;<br>- O intervalo de datas.';\n //\n $runVer->popover = 'true';\n $runVer->popside = 'top';\n $runVer->poptitle = 'Verifica a Escala';\n $runVer->popcontent = 'É necessário escolher um militar (um apenas) quer no Campo Lista da OPM quer no Campo Selecionados.';\n //\n $runLmp->popover = 'true';\n $runLmp->popside = 'top';\n $runLmp->poptitle = 'Limpa as Escalas e Afastamentos';\n $runLmp->popcontent = 'Limpa Escalas (ordinária e Extra) e Afastamentos dos militares Selecionados e no intervalo de datas';\n \n $runOpm->popover = 'true';\n $runOpm->popside = 'top';\n $runOpm->poptitle = 'Carrega os militares da Unidade';\n $runOpm->popcontent = 'Carrega os Militares da unidade escolhida filtrando os ativos e inativos conforme se escolhe Sim ou Não no campo Seleciona inativos:';\n }\n //Tabela com Comandos\n $frame_tempo = new TFrame();\n $hboxc = new THBox;\n $hboxc->addRowSet($add);\n $hboxc->addRowSet($del);\n $hboxc->addRowSet($cls);\n $hboxc->addRowSet($runVer);\n $hboxc->addRowSet($ret);\n\n $frame1->add($hboxc);\n $frame1->style = \"width: 100%; display: table-cell; vertical-align: top; text-align: center;\";\n\n //Frame com Lista da OPM\n $vbox2 = new TVBox;\n $frame4 = new TFrame(260,330);\n $frame4->setLegend('Lista de Militares da OPM');\n $frame4->add($lista_opm);\n $frame4->style = \"width: 280px; display: table-cell; vertical-align: top;\";\n $vbox2->add($frame4);\n //Frame de Seleção\n $vbox4 = new TVBox;\n $frame6 = new TFrame(260,330);\n $frame6->setLegend('Militares Selecionados');\n $frame6->add($lista_slc);\n $frame6->style = \"width: 280px; display: table-cell; vertical-align: top;\";\n $vbox4->add($frame6);\n //Frame de Geração\n $vbox5 = new TVBox;\n $frame3 = new TFrame(280,330);\n $frame3->setLegend('Funções de Geração');\n $frame3->add($notebook);\n $frame3->style = \"width: 280px; display: table-cell; vertical-align: top;\";\n $vbox5->add($frame3);\n \n $frame2 = new TFrame;\n $frame2->style = \"width: 100%; display: table-cell; vertical-align: top;\";\n $frame2->add($vbox2);\n $frame2->add($vbox4);\n $frame2->add($vbox5);\n\n $this->form->setFields(array($rgmilitar,$opm,$addPM,$lista_opm,$lista_slc,$opm_info_atual,$opm_id_info,$turno,\n $datafinal,$datainicial,$dtinicioaf,$dtfimaf,$horaIncialOrdinario,$horaInicioExtra,$horasTrabalhadas,\n $diasExtra,$mesExtra,$anoExtra,$bgaf,$anobgaf,$tipoExtra,$afasta_id,$ativo,\n $add,$del,$cls,$ret,$runOrd,$runExt,$runAfa,$runCls,$runVer,$runLmp,$runOpm)); \n // vertical box container\n $container = new TVBox;\n $container->style = 'width: 90%';\n $container->add(new TXMLBreadCrumb('menu.xml', 'bdhManagerForm'));\n $container->add($frame1);\n //$container->add($frame_tempo);\n $container->add($frame2);\n $this->form->add($container);\n\n //parent::add($container);\n parent::add($this->form);\n if ($opm->getValue())\n {\n self::onSelectOpm_old(array('opm'=>$opm->getValue(),'ativo'=>$ativo->getValue()));\n }\n $lista_slc = TSession::getValue(__CLASS__.'_lista_slc');\n self::onLoadPMSelect();\n self::popula_escalas();\n\n }", "protected function createComponentRateForm()\r\n\t{\r\n\t\t$form = new Form;\r\n\t\t$form->addText('tarif', 'Tarifní sazba:')\r\n\t\t\t\t->setRequired('Uveďte tarifní hodinovou sazbu.')\r\n\t\t\t\t->setAttribute('class', 'cislo')\r\n\t\t\t\t->addFilter(array('Nette\\Forms\\Controls\\TextBase', 'filterFloat'))\r\n\t\t\t\t\t->controlPrototype->autocomplete('off')\r\n\t\t\t\t->addCondition($form::FILLED)\r\n\t\t\t\t\t\t->addRule($form::FLOAT, 'Hodnota musí být celé nebo reálné číslo.');\r\n\t\t\r\n\t\t$form->addText('hodnota', 'Kalkulační hodnota:')\r\n\t\t\t\t->setRequired('Uveďte kalkulační hodnotu tarifu.')\r\n\t\t\t\t->setAttribute('class', 'cislo')\r\n\t\t\t\t->addFilter(array('Nette\\Forms\\Controls\\TextBase', 'filterFloat'))\r\n\t\t\t\t\t->controlPrototype->autocomplete('off')\r\n\t\t\t\t->addCondition($form::FILLED)\r\n\t\t\t\t\t\t->addRule($form::FLOAT, 'Hodnota musí být celé nebo reálné číslo.');\r\n\r\n\t\t$form->addHidden('id_set_tarifu');\r\n\t\t$form->addHidden('id_typy_tarifu');\r\n\r\n\t\t$form->addSubmit('save', 'Uložit')->setAttribute('class', 'default');\r\n\t\t$form->addSubmit('cancel', 'Storno')->setValidationScope(FALSE);\r\n\t\t$form->onSuccess[] = callback($this, 'rateFormSubmitted');\r\n\r\n\t\t$form->addProtection(self::MESS_PROTECT);\r\n\t\treturn $form;\r\n\t}", "function box_build_attributes($properties, $i, $showtrunc = true, $showfont = true, $showborder = true, $showfill = true, $pre = '', $title = '') {\n global $kFonts, $kFontSizes, $kFontAlign, $kFontColors, $kLineSizes;\n $fields = array('font', 'size', 'align', 'color', 'bordershow', 'bordersize', 'bordercolor', 'fillshow', 'fillcolor');\n\tforeach ($fields as $value) {\n $temp = $pre . $value;\n\t $$value = $properties->$temp;\n\t}\n $output = NULL;\n $output .= '<table class=\"ui-widget\" style=\"border-collapse:collapse;margin-left:auto;margin-right:auto;\">' . nl;\n $output .= ' <thead class=\"ui-widget-header\">' . nl;\n $output .= ' <tr><th colspan=\"5\">' . ($title ? $title : TEXT_ATTRIBUTES) . '</th></tr>' . nl;\n $output .= ' </thead>' . nl;\n $output .= ' <tbody class=\"ui-widget-content\">' . nl;\n if ($showtrunc) {\n $output .= ' <tr>' . nl;\n $output .= ' <td colspan=\"2\">' . TEXT_TRUNCATE . html_radio_field($pre.'box_trun_' . $i, '0', (!$properties->truncate) ? true : false) . TEXT_NO . html_radio_field($pre.'box_trun_' . $i, '1', ($properties->truncate) ? true : false) . TEXT_YES . '</td>' . nl;\n $output .= ' <td colspan=\"3\">' . TEXT_DISPLAY_ON . html_radio_field($pre.'box_last_' . $i, '0', (!$properties->display || $properties->display == '0') ? true : false) . TEXT_ALL_PAGES . html_radio_field($pre.'box_last_' . $i, '1', ($properties->display == '1') ? true : false) . TEXT_FIRST_PAGE . html_radio_field($pre.'box_last_' . $i, '2', ($properties->display == '2') ? true : false) . TEXT_LAST_PAGE . '</td>' . nl;\n $output .= ' </tr>' . nl;\n }\n if ($showfont) {\n $output .= ' <tr class=\"ui-widget-header\">' . nl;\n $output .= ' <th>' . '&nbsp;' . '</th>' . nl;\n $output .= ' <th>' . TEXT_STYLE . '</th>' . nl;\n $output .= ' <th>' . TEXT_SIZE . '</th>' . nl;\n $output .= ' <th>' . TEXT_ALIGN . '</th>' . nl;\n $output .= ' <th>' . TEXT_COLOR . '</th>' . nl;\n $output .= ' </tr>' . nl;\n $output .= ' <tr>' . nl;\n $output .= ' <td>' . TEXT_FONT .'</td>' . nl;\n $output .= ' <td>' . html_pull_down_menu($pre.'box_fnt_' . $i, $kFonts, $font) . '</td>' . nl;\n $output .= ' <td>' . html_pull_down_menu($pre.'box_size_'. $i, $kFontSizes, $size) . '</td>' . nl;\n $output .= ' <td>' . html_pull_down_menu($pre.'box_aln_' . $i, $kFontAlign, $align) . '</td>' . nl;\n $output .= ' <td id=\"' . $pre.'box_td_' . $i . '\" style=\"background-color:#' . convertPfColor($color) . '\">' . nl;\n $output .= ' <div id=\"' . $pre.'box_whl_' . $i . '\" \n\t onmousemove=\"moved(event, \\''.$pre.'box_whl_' . $i . '\\', \\''.$pre.'box_td_' . $i . '\\', \\''.$pre.'box_clr_' . $i . '\\')\" \n\t onclick=\"setCustom(\\''.$pre.'box_whl_' . $i . '\\', \\''.$pre.'sel_clr_' . $i . '\\')\" style=\"position:absolute; display:none; top:0px; left:0px; z-index:10000\">\n\t <img src=\"'.DIR_WS_MODULES.'phreeform/images/colorwheel.jpg\" width=\"256\" height=\"256\" alt=\"\" />' . nl;\n $output .= ' </div>' . nl;\n $output .= html_hidden_field($pre.'box_clr_' . $i, $color ? $color : '0:0:0') . nl;\n $output .= html_pull_down_menu($pre.'sel_clr_' . $i, $kFontColors, $color ? $color : '0:0:0', 'onchange=\"colorSet(\\''.$pre.'sel_clr_' . $i . '\\', \\''.$pre.'box_td_' . $i . '\\', \\''.$pre.'box_clr_' . $i . '\\')\"') . nl;\n $output .= html_icon('categories/applications-graphics.png', TEXT_CUSTOM, 'small', 'onclick=\"showCustom(\\''.$pre.'box_whl_' . $i . '\\', \\''.$pre.'sel_clr_' . $i . '\\')\"') . nl;\n $output .= ' </td>'. nl;\n $output .= ' </tr>' . nl;\n }\n if ($showborder) {\n $output .= ' <tr>' . nl;\n $output .= ' <td>' . TEXT_BORDER_AREA . '</td>' . nl;\n $output .= ' <td>' . html_checkbox_field($pre.'box_bdr_' . $i, '1', ($bordershow) ? true : false) . '</td>' . nl;\n $output .= ' <td>' . html_pull_down_menu($pre.'box_bsz_' . $i, $kLineSizes, $bordersize) . TEXT_POINTS . '</td>' . nl;\n $output .= ' <td>' . '&nbsp;' . '</td>' . nl;\n $output .= ' <td id=\"'.$pre.'box_btd_' . $i . '\" style=\"background-color:#' . convertPfColor($bordercolor) . '\">' . nl;\n $output .= ' <div id=\"'.$pre.'box_bwhl_' . $i . '\" \n\t onmousemove=\"moved(event, \\''.$pre.'box_bwhl_' . $i . '\\', \\''.$pre.'box_btd_' . $i . '\\', \\''.$pre.'box_bclr_' . $i . '\\')\" \n\t onclick=\"setCustom(\\''.$pre.'box_bwhl_' . $i . '\\', \\''.$pre.'sel_bclr_' . $i . '\\')\" style=\"position:absolute; display:none; top:0px; left:0px; z-index:10000\">\n\t <img src=\"'.DIR_WS_MODULES.'phreeform/images/colorwheel.jpg\" width=\"256\" height=\"256\" alt=\"\" />' . nl;\n $output .= ' </div>' . nl;\n $output .= html_hidden_field($pre.'box_bclr_' . $i, $bordercolor ? $bordercolor : '0:0:0') . nl;\n $output .= html_pull_down_menu($pre.'sel_bclr_' . $i, $kFontColors, $bordercolor ? $bordercolor : '0:0:0', 'onchange=\"colorSet(\\''.$pre.'sel_bclr_' . $i . '\\', \\''.$pre.'box_btd_' . $i . '\\', \\''.$pre.'box_bclr_' . $i . '\\')\"') . nl;\n $output .= html_icon('categories/applications-graphics.png', TEXT_CUSTOM, 'small', 'onclick=\"showCustom(\\''.$pre.'box_bwhl_' . $i . '\\', \\''.$pre.'sel_bclr_' . $i . '\\')\"') . nl;\n $output .= ' </td>'. nl;\n $output .= '</tr>' . nl;\n }\n if ($showfill) {\n $output .= '<tr>' . nl;\n $output .= ' <td>'. TEXT_FILL_AREA . '</td>' . nl;\n $output .= ' <td>'. html_checkbox_field($pre.'box_fill_' . $i, '1', ($fillshow) ? true : false) . '</td>' . nl;\n $output .= ' <td>'. '&nbsp;' . '</td>' . nl;\n $output .= ' <td>'. '&nbsp;' . '</td>' . nl;\n $output .= ' <td id=\"'.$pre.'box_ftd_' . $i .'\" style=\"background-color:#' . convertPfColor($fillcolor) .'\">' . nl;\n $output .= ' <div id=\"'.$pre.'box_fwhl_' . $i . '\" \n\t onmousemove=\"moved(event, \\''.$pre.'box_fwhl_' . $i . '\\', \\''.$pre.'box_ftd_' . $i . '\\', \\''.$pre.'box_fclr_' . $i . '\\')\" \n\t onclick=\"setCustom(\\''.$pre.'box_fwhl_' . $i . '\\', \\''.$pre.'sel_fclr_' . $i . '\\')\" style=\"position:absolute; display:none; top:0px; left:0px; z-index:10000\">\n\t <img src=\"'.DIR_WS_MODULES.'phreeform/images/colorwheel.jpg\" width=\"256\" height=\"256\" alt=\"\" />' . nl;\n $output .= ' </div>' . nl;\n $output .= html_hidden_field($pre.'box_fclr_' . $i, $fillcolor ? $fillcolor : '0:0:0') . nl;\n $output .= html_pull_down_menu($pre.'sel_fclr_' . $i, $kFontColors, $fillcolor ? $fillcolor : '0:0:0', 'onchange=\"colorSet(\\''.$pre.'sel_fclr_' . $i . '\\', \\''.$pre.'box_ftd_' . $i . '\\', \\''.$pre.'box_fclr_' . $i . '\\')\"') . nl;\n $output .= html_icon('categories/applications-graphics.png', TEXT_CUSTOM, 'small', 'onclick=\"showCustom(\\''.$pre.'box_fwhl_' . $i . '\\', \\''.$pre.'sel_fclr_' . $i . '\\')\"') . nl;\n $output .= ' </td>'. nl;\n $output .= '</tr>' . nl;\n }\n $output .= '</tbody></table>' . nl;\n return $output;\n}", "public function ajax_example_progressbar_callback($form, &$form_state) {\n $variable_name = 'example_progressbar_' . $form_state['time'];\n $commands = array();\n\n variable_set($variable_name, 10);\n sleep(2);\n variable_set($variable_name, 40);\n sleep(2);\n variable_set($variable_name, 70);\n sleep(2);\n variable_set($variable_name, 90);\n sleep(2);\n variable_del($variable_name);\n\n $commands[] = HtmlCommand('#progress-status', $this->t('Executed.'));\n\n return array(\n '#type' => 'ajax',\n '#commands' => $commands,\n );\n}", "protected function createComponentTarifForm()\r\n\t{\r\n\t\t$form = new Form;\r\n\t\t$form->addText('name', 'Jméno:')\r\n\t\t\t->setRequired('Zadej jméno.');\r\n\r\n\t\t$form->addText('apicode', 'API Code:');\r\n\r\n\t\t$form->addText('price', 'Cena:')\r\n\t\t ->addRule(Form::INTEGER, 'Cena musí být číslo')\r\n\t\t\t->setRequired('Zadej cenu.');\r\n\t\t\r\n\t\t$form->addText('description', 'Popis:');\r\n\t\t\t\r\n\t\t$form->addSubmit('save', 'Uložit')\r\n\t\t\t->setAttribute('class', 'default')\r\n\t\t\t->onClick[] = $this->tarifFormSucceeded;\r\n\r\n\t\t$form->addSubmit('cancel', 'Cancel')\r\n\t\t\t->setValidationScope(NULL)\r\n\t\t\t->onClick[] = $this->formCancelled;\r\n\r\n\t\t$form->addProtection();\r\n\t\treturn $form;\r\n\t}", "protected function createComponentPrihozForm()\n {\n $id = (int) $this->getParameter('id');\n $form = new Nette\\Application\\UI\\Form;\n \n $form->addText('id_uzivatel')\n ->setAttribute('style', 'display:none')\n ->setDefaultValue($this->user->id);\n\n $form->addText('id_nemovitost')\n ->setAttribute('style', 'display:none')\n ->setDefaultValue($id);\n \n $form->addText('pocet')\n ->setAttribute('style', 'display:none');\n \n $form->addText('vkladana_castka', 'Přihazovaná částka:')\n ->setType('number')\n ->setRequired('Prosím vložte částku, kterou chcete přihodit.')\n ->addRule(Nette\\Application\\UI\\Form::MIN, 'Prosím vložte vyšší částku. Minimální příhoz je 5,000 Kč.', 5000)\n ->setAttribute('placeholder', 'Sem vložte částku v Kč.')\n ->setAttribute('class', 'castka')\n ->setAttribute('step', '1');\n\n $form->addSubmit('send', 'Odeslat formulář')\n ->setAttribute('class', 'btn btn-primary');\n\n $form->onSuccess[] = $this->prihozFormSucceeded;\n return $form;\n }", "private function build_form()\n {\n $ldm = LaikaDataManager :: get_instance();\n\n // The Laika Scales\n $scales = $ldm->retrieve_laika_scales(null, null, null, new ObjectTableOrder(LaikaScale :: PROPERTY_TITLE));\n $scale_options = array();\n while ($scale = $scales->next_result())\n {\n $scale_options[$scale->get_id()] = $scale->get_title();\n }\n\n // The Laika Percentile Codes\n $codes = $ldm->retrieve_percentile_codes();\n $code_options = array();\n foreach ($codes as $code)\n {\n $code_options[$code] = $code;\n }\n\n $this->addElement('category', Translation :: get('Dates'));\n $this->add_timewindow(self :: GRAPH_FILTER_START_DATE, self :: GRAPH_FILTER_END_DATE, Translation :: get('StartTimeWindow'), Translation :: get('EndTimeWindow'), false);\n $this->addElement('category');\n\n $this->addElement('category', Translation :: get('Groups', null, 'group'));\n\n $group_options = $this->get_groups();\n\n if (count($group_options) > 0)\n {\n if (count($group_options) < 10)\n {\n $count = count($group_options);\n }\n else\n {\n $count = 10;\n }\n\n $this->addElement('select', self :: GRAPH_FILTER_GROUP, Translation :: get('Group', null, Utilities::GROUP), $this->get_groups(), array('multiple', 'size' => $count));\n $this->addRule(self :: GRAPH_FILTER_GROUP, Translation :: get('ThisFieldIsRequired', null, Utilities::COMMON_LIBRARIES), 'required');\n }\n else\n {\n $this->addElement('static', 'group_text', Translation :: get('Group'), Translation :: get('NoGroupsAvailable'));\n $this->addElement('hidden', self :: GRAPH_FILTER_GROUP, null);\n }\n\n $this->addElement('category');\n\n $this->addElement('category', Translation :: get('Results'));\n $this->addElement('select', self :: GRAPH_FILTER_SCALE, Translation :: get('Scale'), $scale_options, array('multiple', 'size' => '10'));\n $this->addRule(self :: GRAPH_FILTER_SCALE, Translation :: get('ThisFieldIsRequired', null, Utilities::COMMON_LIBRARIES), 'required');\n $this->addElement('select', self :: GRAPH_FILTER_CODE, Translation :: get('Code'), $code_options, array('multiple', 'size' => '4'));\n $this->addRule(self :: GRAPH_FILTER_CODE, Translation :: get('ThisFieldIsRequired', null, Utilities::COMMON_LIBRARIES), 'required');\n $this->addElement('category');\n\n $this->addElement('category', Translation :: get('Options'));\n\n $group = array();\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_TYPE, null, Translation :: get('RenderGraphAndTable'), LaikaGraphRenderer :: RENDER_GRAPH_AND_TABLE);\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_TYPE, null, Translation :: get('RenderGraph'), LaikaGraphRenderer :: RENDER_GRAPH);\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_TYPE, null, Translation :: get('RenderTable'), LaikaGraphRenderer :: RENDER_TABLE);\n $this->addGroup($group, self :: GRAPH_FILTER_TYPE, Translation :: get('RenderType'), '<br/>', false);\n\n $allow_save = PlatformSetting :: get('allow_save', LaikaManager :: APPLICATION_NAME);\n if ($allow_save == true)\n {\n $this->addElement('checkbox', self :: GRAPH_FILTER_SAVE, Translation :: get('SaveToRepository'));\n }\n\n $maximum_attempts = PlatformSetting :: get('maximum_attempts', LaikaManager :: APPLICATION_NAME);\n if ($maximum_attempts > 1)\n {\n $group = array();\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_ATTEMPT, null, Translation :: get('OnlyIncludeFirstAttempt'), LaikaGraphRenderer :: RENDER_ATTEMPT_FIRST);\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_ATTEMPT, null, Translation :: get('OnlyIncludeMostRecentAttempt'), LaikaGraphRenderer :: RENDER_ATTEMPT_LAST);\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_ATTEMPT, null, Translation :: get('IncludeAllAttempts'), LaikaGraphRenderer :: RENDER_ATTEMPT_ALL);\n $this->addGroup($group, self :: GRAPH_FILTER_ATTEMPT, Translation :: get('AttemptsToInclude'), '<br/>', false);\n }\n else\n {\n $this->addElement('hidden', self :: GRAPH_FILTER_ATTEMPT, LaikaGraphRenderer :: RENDER_ATTEMPT_ALL);\n }\n\n $this->addElement('category');\n\n $buttons = array();\n\n $buttons[] = $this->createElement('style_submit_button', 'submit', Translation :: get('Filter', null, Utilities::COMMON_LIBRARIES), array('class' => 'normal search'));\n $buttons[] = $this->createElement('style_reset_button', 'reset', Translation :: get('Reset', null, Utilities::COMMON_LIBRARIES), array('class' => 'normal empty'));\n\n $this->addGroup($buttons, 'buttons', null, '&nbsp;', false);\n }", "public function buildForm(array $form, FormStateInterface $form_state) {\n $form['time_duration'] = [\n '#type' => 'number',\n '#title' => $this->t('Time duration'),\n '#min' => 100,\n '#step' => 100,\n '#description' => $this->t(\n \"Time in seconds from the user's last login. Used as an event to \n update the relationships between the user and companies.\"\n ),\n '#default_value' => $this->config('pmmi_sso.company.settings')->get('time_duration'),\n '#required' => TRUE,\n ];\n $form['submit'] = [\n '#type' => 'submit',\n '#value' => $this->t('Save'),\n ];\n return $form;\n }", "protected function setLoginBar()\n {\n $this->loginBar = new FormBuilder(\"login\", \"login\", \"post\");\n $loginTitle = new Comment(\"Member Login:\");\n $loginTitle->setBold();\n $loginTitle->setUnderlined();\n $this->loginBar->add($loginTitle);\n\n $this->loginBar->buildComment(\"username: \", false)\n ->buildTextField(\"username\")\n ->buildComment(\"password: \", false)\n ->buildPasswordField(\"password\", \"password\", \"\", true)\n ->buildButton(\"Log In\", \"submit\", \"submit\")\n ->buildComment(\"Don't have an account?\");\n \n $register = new Link(\"register\");\n $register->setText(\"Register New Account\");\n $register->setLineBreak(true);\n $forgot = new Link(\"forgotpass\");\n $forgot->setText(\"Forgot Password?\");\n \n $this->loginBar->add($register);\n $this->loginBar->add($forgot);\n $this->setDivision($this->loginBar);\n }", "protected function definition_inner($mform) {\n\n $mform->addElement('header', 'previewareaheader',\n get_string('previewareaheader', 'qtype_'.$this->qtype()));\n $mform->setExpanded('previewareaheader');\n $mform->addElement('static', 'previewarea', '',\n get_string('previewareamessage', 'qtype_'.$this->qtype()));\n\n $mform->registerNoSubmitButton('refresh');\n $mform->addElement('submit', 'refresh', get_string('refresh', 'qtype_'.$this->qtype()));\n $mform->addElement('filepicker', 'bgimage', get_string('bgimage', 'qtype_'.$this->qtype()),\n null, self::file_picker_options());\n $mform->closeHeaderBefore('dropzoneheader');\n\n // Add the draggable image fields & drop zones to the form.\n list($itemrepeatsatstart, $imagerepeats) = $this->get_drag_item_repeats();\n $this->definition_draggable_items($mform, $itemrepeatsatstart);\n $this->definition_drop_zones($mform, $imagerepeats);\n\n $this->add_combined_feedback_fields(true);\n $this->add_interactive_settings(true, true);\n }", "public function progressBar()\n {\n \n self::$view='adminlte::progress.bar';\n return $this;\n \n }", "protected function form()\n {\n $form = new Form(new MachinesStyle());\n\n $form->text('style_name', __('型号名称'));\n\n $form->select('aa', __('所属类型'))->options(MachinesType::where('state', '1')->get()->pluck('name', 'id'))->load('factory_id', '/api/getAdminFactory');\n\n $form->select('factory_id', __('所属厂商'))->required();\n\n $form->ignore(['aa']);\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new PrizesLog);\n\n // 去掉`删除`按钮\n $form->tools(function (Form\\Tools $tools) {\n $tools->disableDelete();\n $tools->disableView();\n });\n\n $form->text('group.title', '奖品组')->readonly();\n $form->text('prize.name', '奖品名称')->readonly();\n $form->text('material.title', '物料名称')->readonly();\n $form->text('material_code', '物料代码')->readonly();\n $form->text('user.username', '用户名')->readonly();\n $form->text('user.mobile', '用户手机号')->readonly();\n $form->select('source', '来源')->options([\n '' => '', 'exchange' => '兑换/领取', 'lottery' => '抽奖'\n ])->readonly();\n $form->ip('ip', 'IP地址')->readonly();\n $form->datetime('created_at', '中奖时间')->readonly();\n $form->embeds('leaving_capital', '留资信息', function ($form) {\n $form->text('name', '收件人');\n $form->mobile('mobile', '手机号');\n $form->text('address', '收件地址');\n });\n $form->radio('status', '状态')->options([\n '0' => '作废', '1' => '有效'\n ])->default('1');\n return $form;\n }", "protected function createComponentMoveForm() {\r\n\t\t$form = new Form;\r\n\t\t$options = $this->closureModel->getOptions();\r\n\t\t$form->addSelect(\"parentId\", \"Branch Parent\", $options);\r\n\t\t$form->addHidden(\"id\", $this->edit_id);\r\n\t\t$form->addSubmit('save', 'Save')\r\n\t\t\t\t->onClick[] = callback($this, 'moveFormSubmitted');\r\n\t\t$form->setRenderer(new \\Kdyby\\BootstrapFormRenderer\\BootstrapRenderer());\r\n\t\treturn $form;\r\n\t}", "function ps_set_border_style($psdoc, $style, $width)\n{\n}", "protected function createStyle()\n\t{\n\t\treturn new TPanelStyle;\n\t}", "function setDefaults() {\r\n\t\t$this->border='1px solid #46b0ee';\r\n\t\t$this->fgColor='#ff9000';\r\n\t\t$this->bgColor='#FFFFFF';\r\n\t}", "public function setBorderWidth($borderWidth) {}", "public function buildForm() {\n\t\t$form = '';\n\n\t\tforeach ($this->_properties as $row) {\n\t\t\tif (!in_array($row['Field'],$this->_ignore)) {\n\t\t\t\t$elem = $this->buildElement($row);\n\t\t\t\t$row['Comment'] != '' ? $comment = $row['Comment'].\"<br />\": $comment = '';\n\t\t\t\t$this->_properties[$row['Field']]['HTMLElement']=$elem;\n\t\t\t\tif ($row['ElementType']=='hidden')\n\t\t\t\t\t$form .= $elem;\n\t\t\t\telse \n\t\t\t\t\t$form .= sprintf(\"<div class='formElem'>\\n%s<br />\\n%s\\n%s</div>\\n\",ucwords (str_replace (\"_\",\" \",$row['Field'])),$comment,$elem);\n\t\t\t}\n\t\t}\n\t\treturn $form;\n\t}", "public function __construct($width=NULL, $height=NULL)\n\t{\n\t\tparent::__construct($width, $height);\n\n\t\t$this->set_margins(5);\n\n\t\t$this->colors['bar_color'] = \t\t\t\tarray('#e0d62e', NULL, NULL);\n\t\t$this->colors['bar_border_color'] = array('#747014', 10, \t NULL);\n\t\t$this->colors['line_color'] = \t\t\tarray('#dfdfdf', NULL, NULL);\t// primary color of lines\n\t\t$this->colors['line_color2'] =\t\t\tarray('#969696', NULL, NULL);\t// for short lines by the legend for example\n\t}", "protected function form()\n {\n $form = new Form(new Direction());\n\n $form->text('name', __(trans('hhx.name')));\n $form->text('intro', __(trans('hhx.intro')));\n $form->image('Img', __(trans('hhx.img')))->move('daily/direction')->uniqueName();\n $form->select('status', __(trans('hhx.status')))->options(config('hhx.status'));;\n $form->number('order_num', __(trans('hhx.order_num')));\n $form->hidden('all_num', __(trans('hhx.all_num')))->default(0.00);\n $form->decimal('stock', __(trans('hhx.stock')));\n\n return $form;\n }", "public function construct()\r\n\t{\r\n\t\t\r\n\t\t\r\n\t\t$class = ($this->classClr) ? 'w50 clr' : 'w50';\r\n\t\t$class = ($this->classLong) ? 'long clr' : $class;\r\n\t\t$class .= ($this->picker) ? ' wizard' : '';\r\n\t\t\r\n\t\t$wizard = ($this->picker == 'page') ? array(array('tl_content', 'pagePicker')) : false;\r\n\t\t\r\n\t\t// input unit\r\n\t\tif (($this->picker == 'unit'))\r\n\t\t{\r\n\t\t\t$options = array();\r\n\t\t\tforeach (deserialize($this->units) as $arrOption)\r\n\t\t\t{\r\n\t\t\t\t$options[$arrOption['value']] = $arrOption['label'];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// the text field\r\n\t\t$this->generateDCA(($this->picker != 'unit') ? ($this->multiple) ? 'multiField' : 'textField' : 'inputUnit', array\r\n\t\t(\r\n\t\t\t'inputType' =>\t($this->picker == 'unit') ? 'inputUnit' : 'text',\r\n\t\t\t'label'\t\t=>\tarray($this->label, $this->description),\r\n\t\t\t'default'\t=>\t$this->defaultValue,\r\n\t\t\t'wizard'\t=>\t$wizard,\r\n\t\t\t'options'\t=>\t$options,\r\n\t\t\t'eval'\t\t=>\tarray\r\n\t\t\t(\r\n\t\t\t\t'mandatory'\t\t=>\t($this->mandatory) ? true : false, \r\n\t\t\t\t'minlength'\t\t=>\t$this->minlength, \r\n\t\t\t\t'maxlength'\t\t=>\t$this->maxLength, \r\n\t\t\t\t'tl_class'\t\t=>\t$class,\r\n\t\t\t\t'rgxp'\t\t\t=>\t$this->rgxp,\r\n\t\t\t\t'multiple'\t\t=>\t($this->multiple) ? true : false,\r\n\t\t\t\t'size'\t\t\t=>\t$this->multiple,\r\n\t\t\t\t'datepicker' \t=> \t($this->picker == 'datetime') ? true : false,\r\n\t\t\t\t'colorpicker' \t=> \t($this->picker == 'color') ? true : false,\r\n\t\t\t\t'isHexColor' \t=> \t($this->picker == 'color') ? true : false,\r\n\t\t\t),\r\n\t\t));\r\n\t\t\r\n\t}", "function style(){\r\n\t\t// Sorry mom :(\r\n\t\t$style=\"<style>\r\n\t\t\t.debug{\r\n\t\t\t\tposition: relative;\r\n\t\t\t\tpadding: 15px;\r\n\t\t\t\tmargin: 15px;\r\n\t\t\t\tborder: 1px solid black;\r\n\t\t\t\tcolor: black;\r\n\t\t\t\tfont-size: 14px;\r\n\t\t\t\tfont-family: monospace;\r\n\t\t\t\toverflow: auto;\r\n\t\t\t\t\r\n\t\t\t\ttext-align: left;\r\n\t\t\t\tline-height: 14px;\r\n\t\t\t\tborder-radius: 10px;\r\n\t\t\t\tmoz-border-radiuz: 10px;\r\n\t\t\t\t\r\n\t\t\t\tbackground-image: linear-gradient(bottom, rgb(251,255,199) 90%, rgb(227,222,157) 100%);\r\n\t\t\t\tbackground-image: -o-linear-gradient(bottom, rgb(251,255,199) 90%, rgb(227,222,157) 100%);\r\n\t\t\t\tbackground-image: -moz-linear-gradient(bottom, rgb(251,255,199) 90%, rgb(227,222,157) 100%);\r\n\t\t\t\tbackground-image: -webkit-linear-gradient(bottom, rgb(251,255,199) 90%, rgb(227,222,157) 100%);\r\n\t\t\t\tbackground-image: -ms-linear-gradient(bottom, rgb(251,255,199) 90%, rgb(227,222,157) 100%);\r\n\t\t\t\t\r\n\t\t\t\tbackground-image: -webkit-gradient(\r\n\t\t\t\t\tlinear,\r\n\t\t\t\t\tleft bottom,\r\n\t\t\t\t\tleft top,\r\n\t\t\t\t\tcolor-stop(0.9, rgb(251,255,199)),\r\n\t\t\t\t\tcolor-stop(1, rgb(227,222,157))\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t\t</style>\r\n\t\t \";\r\n\t\treturn $style;\r\n\t}", "protected function form()\n {\n $form = new Form(new DbTop());\n $form->select('status', __(trans('hhx.status')))->options(config('hhx.db_status'));;\n $form->text('pan_url', __(trans('hhx.pan_url')));\n $form->text('pan_code', __(trans('hhx.pan_code')));\n\n return $form;\n }", "public function initClientOverviewForm()\n\t{\n\t\tglobal $lng, $ilCtrl;\n\n\t\t$settings = $this->setup->getClient()->getAllSettings();\n\n\t\tinclude_once(\"Services/Form/classes/class.ilPropertyFormGUI.php\");\n\t\t$this->form = new ilPropertyFormGUI();\n\n\t\t$this->form->setTitle($lng->txt(\"client_info\"));\n\n\t\t// installation name\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"inst_name\"), \"inst_name\");\n\t\t$ne->setValue(($this->setup->getClient()->getName())\n\t\t\t? $this->setup->getClient()->getName()\n\t\t\t: \"&lt;\".$this->lng->txt(\"no_client_name\").\"&gt;\");\n\t\t$ne->setInfo($this->setup->getClient()->getDescription());\n\t\t$this->form->addItem($ne);\n\n\t\t// client id\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"client_id\"), \"client_id\");\n\t\t$ne->setValue($this->setup->getClient()->getId());\n\t\t$this->form->addItem($ne);\n\n\t\t// nic id\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"ilias_nic_id\"), \"nic_id\");\n\t\t$ne->setValue(($this->setup->getClient()->db_installed)\n\t\t\t? $settings[\"inst_id\"]\n\t\t\t: $txt_no_database);\n\t\t$this->form->addItem($ne);\n\n\t\t// database version\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"db_version\"), \"db_vers\");\n\t\t$ne->setValue(($this->setup->getClient()->db_installed)\n\t\t\t? $settings[\"db_version\"]\n\t\t\t: $txt_no_database);\n\t\t$this->form->addItem($ne);\n\n\t\t// access status\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"access_status\"), \"status\");\n\t\t//$access_link = \"&nbsp;&nbsp;[<a href=\\\"setup.php?cmd=changeaccess&client_id=\".$this->setup->getClient()->getId().\"&back=view\\\">\".$this->lng->txt($access_button).\"</a>]\";\n\t\t$access_status = ($this->setup->getClient()->status[\"access\"][\"status\"]) ? \"online\" : \"disabled\";\n\t\t$ne->setValue($this->lng->txt($access_status).$access_link);\n\t\t$this->form->addItem($ne);\n\n\t\t// server information\n\t\t$sh = new ilFormSectionHeaderGUI();\n\t\t$sh->setTitle($this->lng->txt(\"server_info\"));\n\t\t$this->form->addItem($sh);\n\n\t\t// ilias version\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"ilias_version\"), \"il_vers\");\n\t\t$ne->setValue(ILIAS_VERSION);\n\t\t$this->form->addItem($ne);\n\n\t\t// host\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"host\"), \"host\");\n\t\t$ne->setValue($_SERVER[\"SERVER_NAME\"]);\n\t\t$this->form->addItem($ne);\n\n\t\t// ip address and port\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"ip_address\").\" & \".\n\t\t\t$lng->txt(\"port\"));\n\t\t$ne->setValue($_SERVER[\"SERVER_ADDR\"].\":\".$_SERVER[\"SERVER_PORT\"]);\n\t\t$this->form->addItem($ne);\n\n\t\t// server software\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"server_software\"), \"server_softw\");\n\t\t$ne->setValue($_SERVER[\"SERVER_SOFTWARE\"]);\n\t\t$this->form->addItem($ne);\n\n\t\t// http path\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"http_path\"), \"http_path\");\n\t\t$ne->setValue(ILIAS_HTTP_PATH);\n\t\t$this->form->addItem($ne);\n\n\t\t// absolute path\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"absolute_path\"), \"absolute_path\");\n\t\t$ne->setValue(ILIAS_ABSOLUTE_PATH);\n\t\t$this->form->addItem($ne);\n\n\t\t// third party tools\n\t\t$sh = new ilFormSectionHeaderGUI();\n\t\t$sh->setTitle($this->lng->txt(\"3rd_party_software\"));\n\t\t$this->form->addItem($sh);\n\n\t\t$tools = array(\"convert\", \"zip\", \"unzip\", \"ghostscript\", \"java\", \"htmldoc\", \"ffmpeg\");\n\n\t\tforeach ($tools as $tool)\n\t\t{\n\t\t\t// tool\n\t\t\t$ne = new ilNonEditableValueGUI($lng->txt($tool.\"_path\"), $tool.\"_path\");\n\t\t\t$p = $this->setup->ini->readVariable(\"tools\", $tool);\n\t\t\t$ne->setValue($p ? $p : $this->lng->txt(\"not_configured\"));\n\t\t\t$this->form->addItem($ne);\n\t\t}\n\n\t\t// latex\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"url_to_latex\"), \"latex_url\");\n\t\t$p = $this->setup->ini->readVariable(\"tools\", \"latex\"); // #13109\n\t\t$ne->setValue($p ? $p : $this->lng->txt(\"not_configured\"));\n\t\t$this->form->addItem($ne);\n\n\t\t// virus scanner\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"virus_scanner\"), \"vscan\");\n\t\t$ne->setValue($this->setup->ini->readVariable(\"tools\",\"vscantype\"));\n\t\t$this->form->addItem($ne);\n\n\t\t// scan command\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"scan_command\"), \"scan\");\n\t\t$p = $this->setup->ini->readVariable(\"tools\",\"scancommand\");\n\t\t$ne->setValue($p ? $p : $this->lng->txt(\"not_configured\"));\n\t\t$this->form->addItem($ne);\n\n\t\t// clean command\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"clean_command\"), \"clean\");\n\t\t$p = $this->setup->ini->readVariable(\"tools\",\"cleancommand\");\n\t\t$ne->setValue($p ? $p : $this->lng->txt(\"not_configured\"));\n\t\t$this->form->addItem($ne);\n\n\t\t$this->form->setFormAction(\"setup.php?cmd=gateway\");\n\t}", "protected function buildForm()\n\t{\t\n\t\t$mid = $this->Form->newInput( 'hidden' );\n\t\t$mid->set( 'name', 'mid' );\n\t\t$mid->set( 'id', 'mid' );\n\t\t$mid->set( 'value', $this->data['id'] );\n\t\t\n\t\t$submit = $this->Form->newInput( 'submit' );\n\t\t$submit->set( 'name', 'submit' );\n\t\t$submit->set( 'id', 'submit' );\n\t\t$submit->set( 'value', 'Restore' );\n\t}", "public static function drawLoggingOptions()\n {\n $buildopts = array(\n 'files' => jgettext('Log file contents')\n , 'profile' => jgettext('Profile')\n );\n\n //--Get component parameters\n $params = JComponentHelper::getParams('com_easycreator');\n\n echo NL.'<div class=\"logging-options\">';\n\n $js = \"v =( $('div_buildopts').getStyle('display') == 'block') ? 'none' : 'block';\";\n $js .= \"$('div_buildopts').setStyle('display', v);\";\n\n $checked =($params->get('logging')) ? ' checked=\"checked\"' : '';\n echo NL.'<input type=\"checkbox\" onchange=\"'.$js.'\" name=\"buildopts[]\"'.$checked.' value=\"logging\" id=\"logging\" />';\n echo NL.'<label for=\"logging\">'.jgettext('Activate logging').'</label>';\n\n $style =($params->get('logging')) ? '' : ' style=\"display: none;\"';\n echo NL.' <div id=\"div_buildopts\"'.$style.'>';\n\n foreach($buildopts as $name => $titel)\n {\n //--Get component parameters\n $checked =($params->get($name)) ? ' checked=\"checked\"' : '';\n\n echo NL.'&nbsp;|__';\n echo NL.'<input type=\"checkbox\" name=\"buildopts[]\"'.$checked.' value=\"'.$name.'\" id=\"'.$name.'\" />';\n echo NL.'<label for=\"'.$name.'\">'.$titel.'</label><br />';\n }//foreach\n\n echo NL.' </div>';\n echo NL.'</div>';\n }", "function createForm(){\n\t\t$this->createFormBase();\n\t\t$this->addElement('reset','reset','Reset');\t\t\t\n\t\t$tab['seeker_0'] = '0';\n\t\t$this->setDefaults($tab);\n\t\t$this->addElement('submit','bouton_add_pi','Add a contact',array('onclick' => \"document.getElementById('frmvadataset').action += '#a_contact'\"));\n\t\t$this->createVaFormResolution();\n\t\t$this->createFormGeoCoverage();\n\t\t$this->createFormGrid();\t\n\t\t//Required format\n\t\t$dformat = new data_format;\n\t\t$dformat_select = $dformat->chargeFormDestFormat($this,'required_data_format','Required data format','NetCDF');\n\t\t$this->addElement($dformat_select);\n\t\t$this->getElement('organism_0')->setLabel(\"Organism short name\");\n\t\t$this->getElement('project_0')->setLabel(\"Useful in the framework of\");\n\t\t$this->getElement('dats_abstract')->setLabel(\"Abstract \");\n\t\t$this->getElement('dats_purpose')->setLabel(\"Purpose\");\n\t\t$this->getElement('database')->setLabel(\"Data center\");\n\t\t$this->getElement('new_db_url')->setLabel(\"Data center url\");\n\t\t$this->getElement('dats_use_constraints')->setLabel(\"Access and use constraints\");\t\t\t\n\t\t$this->getElement('sensor_resol_tmp')->setLabel('Temporal (hh:mm:ss)');\t\t\t\n\t\t$this->getElement('place_alt_min_0')->setLabel(\"Altitude min\");\n\t\t$this->getElement('place_alt_max_0')->setLabel(\"Altitude max\");\n\t\t$this->getElement('data_format_0')->setLabel(\"Original data format\");\n\t\t$this->addElement('file','upload_doc','Attached document');\n\t\t$this->addElement('submit','upload','Upload');\n\t\t$this->addElement('submit','delete','Delete');\n\t\t\n\t\tfor ($i = 0; $i < $this->dataset->nbVars; $i++){\n\t\t\t$this->getElement('methode_acq_'.$i)->setLabel(\"Parameter processing related information\");\n\t\t}\n\t\t$this->addElement('submit','bouton_add_variable','Add a parameter',array('onclick' => \"document.getElementById('frmvadataset').action += '#a_param'\"));\n\t\t\n\t\t$this->addElement('submit','bouton_add_projet','Add a project',array('onclick' => \"document.getElementById('frmvadataset').action += '#a_general'\"));\n\t\t$option = array();\n\t\t$option['default'] = \"\";\n\t\t$option['model'] = \"Model\";\n\t\t$option['instrument'] = \"Instrument\";\n\t\t$option['satellite'] = \"Satellite\";\n\t\t$this->addElement('select','source_type','source type :',$option,array('onchange' => \"DeactivateButtonAddSource()\",'onclick' => \"DeactivateButtonAddSource();\",'onmouseover' => 'DeactivateButtonAddSource();' ));\n\t\t$this->addElement('submit','bouton_add_source','Add a source',array('disabled' => 'true','onclick' => \"document.getElementById('frmvadataset').action += '#a_source'\",'onmouseout' => 'DeactivateButtonAddSource();'));\n\t\t\n\t\tif (isset ( $this->dataset->dats_sensors ) && ! empty ( $this->dataset->dats_sensors )) {\n\t\t\t$this->dats_sensors = array();\n\t\t\t$this->dats_sensors = $this->dataset->dats_sensors ;\n\t\t}\n\t\tif (isset ( $this->dataset->sites ) && ! empty ( $this->dataset->sites )) {\n\t\t\t$this->sites = array();\n\t\t\t$this->sites = $this->dataset->sites;\n\t\t}\n\t\t\n\t\tif ( isset ( $this->dataset->dats_id ) && $this->dataset->dats_id > 0) {\n\t\t\tif (isset ( $this->dataset->nbModFormSensor )){\n\t\t\t\tif($this->dataset->nbModForm <= $this->dataset->nbModFormSensor ){\n\t\t\t\t\t$this->dataset->nbModForm = $this->dataset->nbModFormSensor;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isset ( $this->dataset->nbSatFormSensor )){\n\t\t\t\t//$this->dataset->nbSatFormSensor = $this->dataset->nbSatFormSensor - 1;\n\t\t\t\tif($this->dataset->nbSatForm <= $this->dataset->nbSatFormSensor){\n\t\t\t\t\t$this->dataset->nbSatForm = $this->dataset->nbSatFormSensor;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isset ( $this->dataset->nbInstruFormSensor )){\n\t\t\t\tif($this->dataset->nbInstruForm <= $this->dataset->nbInstruFormSensor){\n\t\t\t\t\t$this->dataset->nbInstruForm = $this->dataset->nbInstruFormSensor;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif($this->dataset->nbModForm > 0)\n\t\t\t$this->addMod();\n\t\tif($this->dataset->nbInstruForm > 0)\n\t\t\t$this->addInstru();\t\n\t\tif($this->dataset->nbSatForm > 0)\n\t\t\t$this->addSat();\n\t\t\n\t\t$this->dataset->dats_sensors = null ;\n\t\t$this->dataset->sites = null;\n\t}", "public function createComponentDateRangeForm() {\n\t\t$form = new NAppForm();\n\t\t\n\t\t$form->addGroup();\n\t\t$form->addText('from', 'Zobrazovať projekty od')\n\t\t\t\t->addRule(NForm::FILLED, 'Vyplňte od akého dátumu sa majú projekty zobrazovať.')\n\t\t\t\t->getControlPrototype()\n\t\t\t\t\t->class('datepicker');\n\t\t$form->addText('to', 'Zobrazovať projekty do')\n\t\t\t\t->addRule(NForm::FILLED, 'Vyplňte do akého dátumu sa majú projekty zobrazovať.')\n\t\t\t\t->getControlPrototype()\n\t\t\t\t\t->class('datepicker');\n\t\t\n\t\t$form->setCurrentGroup(NULL);\n\t\n\t\t$form->addSubmit('process', 'Nastav')\n\t\t\t\t->getControlPrototype()\n\t\t\t\t->class('design');\n\t\t$form->addSubmit('set_default', 'Zobraz všekto')\n\t\t\t\t->setValidationScope(NULL)\n\t\t\t\t->getControlPrototype()\n\t\t\t\t->class('design');\n\t\t$form->addSubmit('back', 'Naspäť')\n\t\t\t\t->setValidationScope(NULL)\n\t\t\t\t->getControlPrototype()\n\t\t\t\t->class('design');\n\t\t\n\t\t$form->onSuccess[] = callback($this, 'dateRangeFormSubmit');\n\t\t\n\t\treturn $form;\n\t}", "public function form_footer_progress_block_html() {\n\n\t\t$progress_style = ! empty( $this->form_data['settings']['conversational_forms_progress_bar'] ) ? $this->form_data['settings']['conversational_forms_progress_bar'] : '';\n\n\t\t?>\n\t\t<div class=\"wpforms-conversational-form-footer-progress\">\n\t\t\t<div class=\"wpforms-conversational-form-footer-progress-status\">\n\t\t\t\t<?php\n\t\t\t\tif ( 'proportion' === $progress_style ) {\n\t\t\t\t\t$this->form_footer_progress_status_proportion_html();\n\t\t\t\t} else {\n\t\t\t\t\t$this->form_footer_progress_status_percentage_html();\n\t\t\t\t}\n\t\t\t\t?>\n\t\t\t</div>\n\t\t\t<div class=\"wpforms-conversational-form-footer-progress-bar\">\n\t\t\t\t<div class=\"wpforms-conversational-form-footer-progress-completed\"></div>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t}", "private function initImportBookmarksForm()\n\t{\n\t\tglobal $lng, $ilCtrl, $ilUser;\n\t\t\n\t\tif (!$this->tree->isInTree($this->id))\n\t\t{\n\t\t\t$this->ctrl->setParameter($this, 'bmf_id', '');\n\t\t\t$this->ctrl->redirect($this);\n\t\t}\n\n\t\tinclude_once 'Services/Form/classes/class.ilPropertyFormGUI.php';\n\t\t$form = new ilPropertyFormGUI();\n\t\t$form->setTopAnchor(\"bookmark_top\");\n\t\t$form->setTitle($lng->txt(\"bkm_import\"));\n\t\t\n\t\t$fi = new ilFileInputGUI($lng->txt(\"file_add\"), \"bkmfile\");\n\t\t$fi->setRequired(true);\n\t\t$form->addItem($fi);\n\n\t\t$form->addCommandButton(\"importFile\", $lng->txt('import'));\n\t\t$form->addCommandButton('cancel', $lng->txt('cancel'));\n\t\t\n\t\treturn $form;\n\t}", "public function __construct()\n {\n $this->foregroundColors[ self::BLACK_NAME ] = self::BLACK_FOREGROUND_COLOR;\n $this->foregroundColors[ self::DARK_GRAY_NAME ] = self::DARK_GRAY_FOREGROUND_COLOR;\n $this->foregroundColors[ self::BLUE_NAME ] = self::BLUE_FOREGROUND_COLOR;\n $this->foregroundColors[ self::LIGHT_BLUE_NAME ] = self::LIGHT_BLUE_FOREGROUND_COLOR;\n $this->foregroundColors[ self::GREEN_NAME ] = self::GREEN_FOREGROUND_COLOR;\n $this->foregroundColors[ self::LIGHT_GREEN_NAME ] = self::LIGHT_GREEN_FOREGROUND_COLOR;\n $this->foregroundColors[ self::CYAN_NAME ] = self::CYAN_FOREGROUND_COLOR;\n $this->foregroundColors[ self::LIGHT_CYAN_NAME ] = self::LIGHT_CYAN_FOREGROUND_COLOR;\n $this->foregroundColors[ self::RED_NAME ] = self::RED_FOREGROUND_COLOR;\n $this->foregroundColors[ self::LIGHT_RED_NAME ] = self::LIGHT_RED_FOREGROUND_COLOR;\n $this->foregroundColors[ self::PURPLE_NAME ] = self::PURPLE_FOREGROUND_COLOR;\n $this->foregroundColors[ self::LIGHT_PURPLE_NAME ] = self::LIGHT_PURPLE_FOREGROUND_COLOR;\n $this->foregroundColors[ self::BROWN_NAME ] = self::BROWN_FOREGROUND_COLOR;\n $this->foregroundColors[ self::YELLOW_NAME ] = self::YELLOW_FOREGROUND_COLOR;\n $this->foregroundColors[ self::LIGHT_GRAY_NAME ] = self::LIGHT_GRAY_FOREGROUND_COLOR;\n $this->foregroundColors[ self::WHITE_NAME ] = self::WHITE_FOREGROUND_COLOR;\n\n $this->backgroundColors[ self::BLACK_NAME ] = self::BLACK_BACKGROUND_COLOR;\n $this->backgroundColors[ self::RED_NAME ] = self::RED_BACKGROUND_COLOR;\n $this->backgroundColors[ self::GREEN_NAME ] = self::GREEN_BACKGROUND_COLOR;\n $this->backgroundColors[ self::YELLOW_NAME ] = self::YELLOW_BACKGROUND_COLOR;\n $this->backgroundColors[ self::BLUE_NAME ] = self::BLUE_BACKGROUND_COLOR;\n $this->backgroundColors[ self::MAGENTA_NAME ] = self::MAGENTA_BACKGROUND_COLOR;\n $this->backgroundColors[ self::CYAN_NAME ] = self::CYAN_BACKGROUND_COLOR;\n $this->backgroundColors[ self::LIGHT_GRAY_NAME ] = self::LIGHT_GRAY_BACKGROUND_COLOR;\n }", "function book_form($piecemakerId='') \n\t{\n\t\tif($piecemakerId == '') // default values\n\t\t{ \n\t\t\t// MAIN\n $piecemaker['Width'] = \"900\";\n\t\t\t$piecemaker['Height'] = \"360\";\n\t\t\t$piecemaker['LoaderColor'] = \"0x333333\";\n\t\t\t$piecemaker['InnerSideColor'] = \"0x222222\";\n\t\t\t$piecemaker['Autoplay'] = \"10\";\n\t\t\t$piecemaker['FieldOfView'] = \"45\";\n\t\t\t\n\t\t\t// SHADOWS\n\t\t\t$piecemaker['SideShadowAlpha'] = \"0.8\";\n\t\t\t$piecemaker['DropShadowAlpha'] = \"0.7\";\n\t\t\t$piecemaker['DropShadowDistance'] = \"25\";\n\t\t\t$piecemaker['DropShadowScale'] = \"0.95\";\n\t\t\t$piecemaker['DropShadowBlurX'] = \"40\";\n\t\t\t$piecemaker['DropShadowBlurY'] = \"4\";\n\t\t\t\n\t\t\t// MENU\n\t\t\t$piecemaker['MenuDistanceX'] = \"20\";\n\t\t\t$piecemaker['MenuDistanceY'] = \"50\";\n\t\t\t$piecemaker['MenuColor1'] = \"0x999999\";\n\t\t\t$piecemaker['MenuColor2'] = \"0x333333\";\n\t\t\t$piecemaker['MenuColor3'] = \"0xFFFFFF\";\n\t\t\t\n\t\t\t// CONTROLS\n\t\t\t$piecemaker['ControlSize'] = \"100\";\n\t\t\t$piecemaker['ControlDistance'] = \"20\";\n\t\t\t$piecemaker['ControlColor1'] = \"0x222222\";\n\t\t\t$piecemaker['ControlColor2'] = \"0xFFFFFF\";\n\t\t\t$piecemaker['ControlAlpha'] = \"0.8\";\n $piecemaker['ControlAlphaOver'] = \"0.95\";\n $piecemaker['ControlsX'] = \"450\";\n $piecemaker['ControlsY'] = \"280\";\n $piecemaker['ControlsAlign'] = \"center\";\n\n\t\t\t// TOOLTIPS\n $piecemaker['TooltipHeight'] = \"31\";\n $piecemaker['TooltipColor'] = \"0x222222\";\n\t\t\t$piecemaker['TooltipTextY'] = \"5\";\n\t\t\t$piecemaker['TooltipTextStyle'] = \"P-Italic\";\n\t\t\t$piecemaker['TooltipTextColor'] = \"0xFFFFFF\";\n\t\t\t$piecemaker['TooltipMarginLeft'] = \"5\";\n\t\t\t$piecemaker['TooltipMarginRight'] = \"7\";\n\t\t\t$piecemaker['TooltipTextSharpness'] = \"50\";\n\t\t\t$piecemaker['TooltipTextThickness'] = \"-100\";\n\n\t\t\t// INFO\n\t\t\t$piecemaker['InfoWidth'] = \"400\";\n\t\t\t$piecemaker['InfoBackground'] = \"0xFFFFFF\";\n\t\t\t$piecemaker['InfoBackgroundAlpha'] = \"0.95\";\n\t\t\t$piecemaker['InfoMargin'] = \"15\";\n\t\t\t$piecemaker['InfoSharpness'] = \"0\";\n\t\t\t$piecemaker['InfoThickness'] = \"0\";\n\n\t\t\t// OTHER\n\t\t\t$piecemaker['name'] = \"Piecemaker 2\";\n $piecemaker['button'] = \"Add Piecemaker\";\n $piecemaker['title'] = \"Add Piecemaker\";\n $piecemaker['action'] = \"addbook\";\n $piecemaker['id'] = \"0\";\n } else { // if the piecemaker is edited, exists\n\t\t\t\tglobal $wpdb;\n\t\t\t\t$piecemaker_xml = $this->get_xml($piecemakerId);\n\t\t\t\t$sql = \"select `name` from `\".$this->table_name.\"` where `id` = '\".$piecemakerId.\"'\";\n\t\t\t\n\t\t\t\t$piecemaker['Width'] = $piecemaker_xml->Settings->attributes()->ImageWidth;\n\t\t\t\t$piecemaker['Height'] = $piecemaker_xml->Settings->attributes()->ImageHeight;\n\t\t\t\t$piecemaker['LoaderColor'] = $piecemaker_xml->Settings->attributes()->LoaderColor;\n\t\t\t\t$piecemaker['InnerSideColor'] = $piecemaker_xml->Settings->attributes()->InnerSideColor;\n\t\t\t\t$piecemaker['Autoplay'] = $piecemaker_xml->Settings->attributes()->Autoplay;\n\t\t\t\t$piecemaker['FieldOfView'] = $piecemaker_xml->Settings->attributes()->FieldOfView;\n\n\t\t\t\t// SHADOWS\n\t\t\t\t$piecemaker['SideShadowAlpha'] = $piecemaker_xml->Settings->attributes()->SideShadowAlpha;\n\t\t\t\t$piecemaker['DropShadowAlpha'] = $piecemaker_xml->Settings->attributes()->DropShadowAlpha;\n\t\t\t\t$piecemaker['DropShadowDistance'] = $piecemaker_xml->Settings->attributes()->DropShadowDistance;\n\t\t\t\t$piecemaker['DropShadowScale'] = $piecemaker_xml->Settings->attributes()->DropShadowScale;\n\t\t\t\t$piecemaker['DropShadowBlurX'] = $piecemaker_xml->Settings->attributes()->DropShadowBlurX;\n\t\t\t\t$piecemaker['DropShadowBlurY'] = $piecemaker_xml->Settings->attributes()->DropShadowBlurY;\n\n\t\t\t\t// MENU\n\t\t\t\t$piecemaker['MenuDistanceX'] = $piecemaker_xml->Settings->attributes()->MenuDistanceX;\n\t\t\t\t$piecemaker['MenuDistanceY'] = $piecemaker_xml->Settings->attributes()->MenuDistanceY;\n\t\t\t\t$piecemaker['MenuColor1'] = $piecemaker_xml->Settings->attributes()->MenuColor1;\n\t\t\t\t$piecemaker['MenuColor2'] = $piecemaker_xml->Settings->attributes()->MenuColor2;\n\t\t\t\t$piecemaker['MenuColor3'] = $piecemaker_xml->Settings->attributes()->MenuColor3;\n\n\t\t\t\t// CONTROLS\n\t\t\t\t$piecemaker['ControlSize'] = $piecemaker_xml->Settings->attributes()->ControlSize;\n\t\t\t\t$piecemaker['ControlDistance'] = $piecemaker_xml->Settings->attributes()->ControlDistance;\n\t\t\t\t$piecemaker['ControlColor1'] = $piecemaker_xml->Settings->attributes()->ControlColor1;\n\t\t\t\t$piecemaker['ControlColor2'] = $piecemaker_xml->Settings->attributes()->ControlColor2;\n\t\t\t\t$piecemaker['ControlAlpha'] = $piecemaker_xml->Settings->attributes()->ControlAlpha;\n\t $piecemaker['ControlAlphaOver'] = $piecemaker_xml->Settings->attributes()->ControlAlphaOver;\n\t $piecemaker['ControlsX'] = $piecemaker_xml->Settings->attributes()->ControlsX;\n\t $piecemaker['ControlsY'] = $piecemaker_xml->Settings->attributes()->ControlsY;\n\t $piecemaker['ControlsAlign'] = $piecemaker_xml->Settings->attributes()->ControlsAlign;\n\n\t\t\t\t// TOOLTIPS\n\t $piecemaker['TooltipHeight'] = $piecemaker_xml->Settings->attributes()->TooltipHeight;\n\t $piecemaker['TooltipColor'] = $piecemaker_xml->Settings->attributes()->TooltipColor;\n\t\t\t\t$piecemaker['TooltipTextY'] = $piecemaker_xml->Settings->attributes()->TooltipTextY;\n\t\t\t\t$piecemaker['TooltipTextStyle'] = $piecemaker_xml->Settings->attributes()->TooltipTextStyle;\n\t\t\t\t$piecemaker['TooltipTextColor'] = $piecemaker_xml->Settings->attributes()->TooltipTextColor;\n\t\t\t\t$piecemaker['TooltipMarginLeft'] = $piecemaker_xml->Settings->attributes()->TooltipMarginLeft;\n\t\t\t\t$piecemaker['TooltipMarginRight'] = $piecemaker_xml->Settings->attributes()->TooltipMarginRight;\n\t\t\t\t$piecemaker['TooltipTextSharpness'] = $piecemaker_xml->Settings->attributes()->TooltipTextSharpness;\n\t\t\t\t$piecemaker['TooltipTextThickness'] = $piecemaker_xml->Settings->attributes()->TooltipTextThickness;\n\n\t\t\t\t// INFO\n\t\t\t\t$piecemaker['InfoWidth'] = $piecemaker_xml->Settings->attributes()->InfoWidth;\n\t\t\t\t$piecemaker['InfoBackground'] = $piecemaker_xml->Settings->attributes()->InfoBackground;\n\t\t\t\t$piecemaker['InfoBackgroundAlpha'] = $piecemaker_xml->Settings->attributes()->InforBackgroundAlpha;\n\t\t\t\t$piecemaker['InfoMargin'] = $piecemaker_xml->Settings->attributes()->InfoMargin;\n\t\t\t\t$piecemaker['InfoSharpness'] = $piecemaker_xml->Settings->attributes()->InfoSharpness;\n\t\t\t\t$piecemaker['InfoThickness'] = $piecemaker_xml->Settings->attributes()->InfoThickness;\n\n\t\t\t\t// OTHER\n\t\t\t\t$piecemaker['name'] = $wpdb->get_var($sql, 0, 0);\n\t\t\t\t$piecemaker['button'] = \"Save Changes\";\n\t\t\t\t$piecemaker['title'] = \"Piecemaker properties\";\n\t\t\t\t$piecemaker['action'] = \"editbook\";\n\t\t\t\t$piecemaker['id'] = $piecemakerId;\n\t\t\t\n\t\t\t}\n ?>\n <br />\n\t\t\t<div class=\"wrap\">\n\t\t\t\n\t\t\t\t<div id=\"ajax-response\"></div>\t<!-- book form -->\n\t\t\t\t<form name=\"addpiecemaker\" id=\"addpiecemaker\" method=\"post\" action=\"\" enctype=\"multipart/form-data\" class=\"add:the-list: validate\">\n\t\t\t\t\t<input name=\"action\" value=\"<?php echo $piecemaker['action'];?>\" type=\"hidden\">\n\t\t\t\t\t<input name=\"piecemakerId\" value=\"<?php echo $piecemaker['id'];?>\" type=\"hidden\">\n\n\t\t\t\t\t<script type=\"text/javascript\" src=\"http://code.jquery.com/jquery-1.4.2.min.js\"></script>\n\t\t\t\t\t<script src=\"<?php echo $this->path_to_plugin; ?>js/tabs.js\" type=\"text/javascript\"></script>\n\n\t\t\t\t\t<div id=\"options_piecemaker\">\n\t\t\t\t\t\t\t<ul class=\"tabs\">\n\t\t\t\t\t\t\t\t<li><a href=\"#tab1\" class=\"tab\"><span>Piecemaker</span></a></li>\n\t\t\t\t\t\t\t\t<li><a href=\"#tab2\" class=\"tab\"><span>Shadows</span></a></li>\n\t\t\t\t\t\t\t\t<li><a href=\"#tab3\" class=\"tab\"><span>Menu</span></a></li>\n\t\t\t\t\t\t\t\t<li><a href=\"#tab4\" class=\"tab\"><span>Controls</span></a></li>\n\t\t\t\t\t\t\t\t<li><a href=\"#tab5\" class=\"tab\"><span>Tooltips</span></a></li>\n\t\t\t\t\t\t\t\t<li><a href=\"#tab6\" class=\"tab\"><span>Info</span></a></li>\n\t\t\t\t\t\t </ul> \n\t\t\t\t\t\t <div class=\"blue\"></div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=\"tab_container\">\n\t\t\t\t\t\t<div id=\"tab1\" class=\"tab_content\">\n\t\t\t\t\t\t\t<table class=\"form-table\">\n\t\t\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t\t\t\t<th class=\"table_heading\" colspan=\"3\"><h3>Piecemaker</h3></th>\n\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"Width\">Width</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"Width\" id=\"Width\" value=\"<?php echo $piecemaker['Width'];?>\" size=\"20\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Width of every Image</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"Height\">Height</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"Height\" id=\"Height\" value=\"<?php echo $piecemaker['Height'];?>\" size=\"20\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Height of every Image</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"LoaderColor\">Loader Color</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"LoaderColor\" id=\"LoaderColor\" value=\"<?php echo $piecemaker['LoaderColor'];?>\" size=\"20\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Color of the cubes before the first image appears, also the color of the back sides of the cube, which become visible at some transition types</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"InnerSideColor\">Inner Side Color</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"InnerSideColor\" id=\"InnerSideColor\" value=\"<?php echo $piecemaker['InnerSideColor'];?>\" size=\"20\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Color of the inner sides of the cube when sliced </p></td>\n\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"Autoplay\">Autoplay</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"Autoplay\" id=\"Autoplay\" value=\"<?php echo $piecemaker['Autoplay'];?>\" size=\"20\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Number of seconds from one transition to another, if not stopped. Set to 0 to disable autoplay</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"> <label for=\"FieldOfView\">Field Of View</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"FieldOfView\" id=\"FieldOfView\" value=\"<?php echo $piecemaker['FieldOfView'];?>\" size=\"20\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p><a href=\"http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/geom/PerspectiveProjection.html#fieldOfView\">see this</a></p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div id=\"tab2\" class=\"tab_content\">\n\t\t\t\t\t\t\t<table class=\"form-table\" > \n\t\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t\t<th class=\"table_heading\" colspan=\"3\"><h3>Shadows</h3></th>\n\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under parent\"><label for=\"SideShadowAlpha\">Side Shadow Alpha</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"SideShadowAlpha\" id=\"SideShadowAlpha\" value=\"<?php echo $piecemaker['SideShadowAlpha'];?>\" size=\"20\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Sides get darker when moved away from the front. This is the\n\t\t\t\t\t\t\t\t\t\t\t\tdegree of darkness - 0 == no change, 1 == 100% black</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under parent\"><label for=\"DropShadowAlpha\">Drop Shadow Alpha</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"DropShadowAlpha\" id=\"DropShadowAlpha\" value=\"<?php echo $piecemaker['DropShadowAlpha'];?>\" size=\"20\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Alpha of the drop shadow - 0 == no shadow, 1 == opaque</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under parent\"><label for=\"DropShadowDistance\">Drop Shadow Distance</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"DropShadowDistance\" id=\"DropShadowDistance\" value=\"<?php echo $piecemaker['DropShadowDistance'];?>\" size=\"20\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Distance of the shadow from the bottom of the image</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"DropShadowScale\">Drop Shadow Scale</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"DropShadowScale\" id=\"DropShadowScale\" value=\"<?php echo $piecemaker['DropShadowScale'];?>\" size=\"20\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>As the shadow is blurred, it appears wider that the actual image, when not resized. Thus it's a good idea to make it slightly smaller. - 1 would be no resizing at all</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"DropShadowBlurX\">Drop Shadow BlurX</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"DropShadowBlurX\" id=\"DropShadowBlurX\" value=\"<?php echo $piecemaker['DropShadowBlurX'];?>\" size=\"20\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Blur of the drop shadow on the x-axis</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"DropShadowBlurY\">Drop Shadow Blur Y</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"DropShadowBlurY\" id=\"DropShadowBlurY\" value=\"<?php echo $piecemaker['DropShadowBlurY'];?>\" size=\"20\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Blur of the drop shadow on the y-axis</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t</div>\n\n\n\t\t\t\t\t\t<div id=\"tab3\" class=\"tab_content\">\n\t\t\t\t\t\t\t<table class=\"form-table\" > \n\t\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t\t<th class=\"table_heading\" colspan=\"3\"><h3>Menu</h3></th>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"MenuDistanceX\">Menu Distance X</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"MenuDistanceX\" id=\"MenuDistanceX\" value=\"<?php echo $piecemaker['MenuDistanceX'];?>\" size=\"20\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Distance between two menu items (from center to center)</p></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"> <label for=\"MenuDistanceY\">Menu Distance Y</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"MenuDistanceY\" id=\"MenuDistanceY\" value=\"<?php echo $piecemaker['MenuDistanceY'];?>\" size=\"20\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>SDistance of the menu from the bottom of the image</p></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"MenuColor1\">Menu Color 1</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"MenuColor1\" id=\"MenuColor1\" value=\"<?php echo $piecemaker['MenuColor1'];?>\" size=\"20\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Color of an inactive menu item</p></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"MenuColor2\">Menu Color 2</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"MenuColor2\" id=\"MenuColor2\" value=\"<?php echo $piecemaker['MenuColor2'];?>\" size=\"20\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Color of an active menu item</p></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"MenuColor3\">Menu Color 3</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"MenuColor3\" id=\"MenuColor3\" value=\"<?php echo $piecemaker['MenuColor3'];?>\" size=\"20\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Color of the inner circle of an active menu item. Should equal the background color of the whole thing</p></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t\t</table> \n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div id=\"tab4\" class=\"tab_content\">\n\t\t\t\t\t\t\t<table class=\"form-table\"> \n\t\t\t\t\t\t\t\t<tbody>\n\n\t\t\t\t\t\t\t\t\t\t<th class=\"table_heading\" colspan=\"3\"><h3>Controls</h3></th>\n\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"ControlSize\">Control Size</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"ControlSize\" id=\"ControlSize\" value=\"<?php echo $piecemaker['ControlSize'];?>\" size=\"35\" type=\"text\"></td>\n\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Size of the controls, which appear on rollover (play, stop, info, link)</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"ControlDistance\">Control Distance</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"ControlDistance\" id=\"ControlDistance\" value=\"<?php echo $piecemaker['ControlDistance'];?>\" size=\"35\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Distance between the controls (from the borders)</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"ControlColor1\">Control Color 1</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"ControlColor1\" id=\"ControlColor1\" value=\"<?php echo $piecemaker['ControlColor1'];?>\" size=\"35\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Background color of the controls</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"ControlColor2\">Control Color 2</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"ControlColor2\" id=\"ControlColor2\" value=\"<?php echo $piecemaker['ControlColor2'];?>\" size=\"35\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Font color of the controls</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"ControlAlpha\">Control Alpha</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"ControlAlpha\" id=\"ControlAlpha\" value=\"<?php echo $piecemaker['ControlAlpha'];?>\" size=\"35\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Alpha of a control, when mouse is not over</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"ControlAlphaOver\">Control Alpha Over</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"ControlAlphaOver\" id=\"ControlAlphaOver\" value=\"<?php echo $piecemaker['ControlAlphaOver'];?>\" size=\"35\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Alpha of a control, when mouse is over</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"ControlsX\">Controls X</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"ControlsX\" id=\"ControlsX\" value=\"<?php echo $piecemaker['ControlsX'];?>\" size=\"35\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>X-position of the point, which aligns the controls (measured from [0,0] of the image)</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"ControlsY\">Controls Y</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"ControlsY\" id=\"ControlsY\" value=\"<?php echo $piecemaker['ControlsY'];?>\" size=\"35\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Y-position of the point, which aligns the controls (measured from [0,0] of the image)</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"ControlsAlign\">Controls Align</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><!--<input name=\"ControlsAlign\" id=\"ControlsAlign\" value=\"<?php echo $piecemaker['ControlsAlign'];?>\" size=\"35\" type=\"text\">-->\n\t\t\t\t\t\t\t\t\t\t\t\t\t<select name=\"ControlsAlign\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<?php if($piecemaker['ControlsAlign'] == \"center\") {?>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"center\" selected=\"yes\">center</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"left\">left</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"right\">right</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<?php } elseif($piecemaker['ControlsAlign'] == \"left\") {?>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"center\">center</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"left\" selected=\"yes\">left</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"right\">right</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<?php } elseif($piecemaker['ControlsAlign'] == \"right\") {?>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"center\">center</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"left\">left</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"right\" selected=\"yes\">right</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<?php } ?>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</select></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Type of alignment from the point [controlsX, controlsY] - can be \"center\", \"left\" or \"right\"</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t\t</table> \n\n\t\t\t\t\t\t</div>\n\n\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div id=\"tab5\" class=\"tab_content\">\n\t\t\t\t\t\t\t<table class=\"form-table\" > \n\t\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t\t<th class=\"table_heading\" colspan=\"3\"><h3>Tooltips</h3></th>\n\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"TooltipHeight\">Tooltip Height</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"TooltipHeight\" id=\"TooltipHeight\" value=\"<?php echo $piecemaker['TooltipHeight'];?>\" size=\"35\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Height of the tooltip surface in the menu</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"TooltipColor\">Tooltip Color</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"TooltipColor\" id=\"TooltipColor\" value=\"<?php echo $piecemaker['TooltipColor'];?>\" size=\"35\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Color of the tooltip surface in the menu</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"TooltipTextY\">Tooltip Text Y</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"TooltipTextY\" id=\"TooltipTextY\" value=\"<?php echo $piecemaker['TooltipTextY'];?>\" size=\"35\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Color of the tooltip surface in the menu</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"TooltipTextStyle\">Tooltip Text Style</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"TooltipTextStyle\" id=\"TooltipTextStyle\" value=\"<?php echo $piecemaker['TooltipTextStyle'];?>\" size=\"35\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>The style of the tooltip text, specified in the CSS file</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"TooltipTextColor\">Tooltip Text Color</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"TooltipTextColor\" id=\"TooltipTextColor\" value=\"<?php echo $piecemaker['TooltipTextColor'];?>\" size=\"35\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Color of the tooltip text</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"TooltipMarginLeft\">Tooltip Margin Left</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"TooltipMarginLeft\" id=\"TooltipMarginLeft\" value=\"<?php echo $piecemaker['TooltipMarginLeft'];?>\" size=\"35\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Margin of the text to the left end of the tooltip</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"TooltipMarginRight\">Tooltip Margin Right</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"TooltipMarginRight\" id=\"TooltipMarginRight\" value=\"<?php echo $piecemaker['TooltipMarginRight'];?>\" size=\"35\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Margin of the text to the right end of the tooltip</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"TooltipTextSharpness\">Tooltip Text Sharpness</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"TooltipTextSharpness\" id=\"TooltipTextSharpness\" value=\"<?php echo $piecemaker['TooltipTextSharpness'];?>\" size=\"35\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Sharpness of the tooltip text (-400 to 400) - <a href=\"http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/text/TextField.html#sharpness\">read this</a></p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"TooltipTextThickness\">Tooltip Text Thickness</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"TooltipTextThickness\" id=\"TooltipTextThickness\" value=\"<?php echo $piecemaker['TooltipTextThickness'];?>\" size=\"35\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Thickness of the tooltip text (-400 to 400) - <a href=\"http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/text/TextField.html#thickness\">read this</a></p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t\t</table> \n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div id=\"tab6\" class=\"tab_content\">\n\t\t\t\t\t\t\t\t<table class=\"form-table\"> \n\t\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t\t<th class=\"table_heading\" colspan=\"3\"><h3>Info</h3></th>\n\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"InfoWidth\">Info Width</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"InfoWidth\" id=\"InfoWidth\" value=\"<?php echo $piecemaker['InfoWidth'];?>\" size=\"35\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>The width of the info text field</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"InfoBackground\">Info Background</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"InfoBackground\" id=\"InfoBackground\" value=\"<?php echo $piecemaker['InfoBackground'];?>\" size=\"35\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>The background color of the info text field</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"InfoBackgroundAlpha\">Info Background Alpha</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"InfoBackgroundAlpha\" id=\"InfoBackgroundAlpha\" value=\"<?php echo $piecemaker['InfoBackgroundAlpha'];?>\" size=\"35\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>The alpha of the background of the info text, the image shines through, when smaller than 1</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"InfoMargin\">Info Margin</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"InfoMargin\" id=\"InfoMargin\" value=\"<?php echo $piecemaker['InfoMargin'];?>\" size=\"35\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>The margin of the text field in the info section to all sides.</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"InfoSharpness\">Info Sharpness</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"InfoSharpness\" id=\"InfoSharpness\" value=\"<?php echo $piecemaker['InfoSharpness'];?>\" size=\"35\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Sharpness of the info text (see above)</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"InfoThickness\">Info Thickness</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"InfoThickness\" id=\"InfoThickness\" value=\"<?php echo $piecemaker['InfoThickness'];?>\" size=\"35\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Thickness of the info text (see above)</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t</div><!-- .tab_container -->\n\n\t\t\t\t\t<br />\n\t\t\t\t\t\t<table>\n\t\t\t\t\t\t\t<input class=\"button-primary\" name=\"submit\" value=\"<?php echo $piecemaker['button'];?>\" type=\"submit\">\n\t\t\t\t\t\t\t\t <?php\n\t\t\t\t\t\t\t\t\t if($piecemakerId !== '') echo \"<a href=\\\"\\\" name=\\\"do\\\" class=\\\"button-primary\\\" value=\\\"Back\\\" type=\\\"submit\\\" title=\\\"Back\\\">Back</a>\";\n\t\t\t\t\t\t\t\t ?>\n\t\t\t\t\t\t</table>\n\n\n\t\t\t\t</form>\n\t\t\t</div>\n\t\t<?php\n\t}", "protected function definition_inner($mform) {\n global $PAGE;\n $PAGE->requires->jquery();\n $PAGE->requires->jquery_plugin('ui');\n $PAGE->requires->jquery_plugin('ui-css');\n\n $PAGE->requires->strings_for_js(array('itemsettingserror', 'editquestiontext', 'additemsettings',\n 'correct', 'incorrect'), 'qtype_gapfill');\n $PAGE->requires->js('/question/type/gapfill/questionedit.js');\n $mform->addElement('hidden', 'reload', 1);\n $mform->setType('reload', PARAM_RAW);\n\n $mform->removeelement('questiontext');\n /*for storing the json containing the settings data */\n $mform->addElement('hidden', 'itemsettings', '', array('size' => '80'));\n $mform->setType('itemsettings', PARAM_RAW);\n\n /* popup for entering feedback for individual words */\n $mform->addElement('html', '<div id=\"id_itemsettings_popup\" title=\"' . get_string('additemsettings', 'qtype_gapfill')\n . '\" style=\"display:none;background-color:lightgrey\" >');\n $mform->addElement('editor', 'correct', '', array('size' => 70, 'rows' => 4), $this->editoroptions);\n $mform->addElement('editor', 'incorrect', '', array('size' => 70, 'rows' => 4), $this->editoroptions);\n $mform->addElement('html', '</div>');\n\n /* presented for clicking on the gaps once they have been given numberical ids */\n $mform->addElement('html',\n '<div class=\"gapfill\" id=\"id_itemsettings_canvas\" style=\"display:none;background-color:lightgrey\" ></div>');\n\n $mform->addElement('html', '<div id=\"questiontext\" >');\n $mform->addElement('editor', 'questiontext', get_string('questiontext', 'question'), array('rows' => 10),\n $this->editoroptions);\n $mform->addElement('html', '</div>');\n\n $mform->setType('questiontext', PARAM_RAW);\n $mform->addHelpButton('questiontext', 'questiontext', 'qtype_gapfill');\n\n $mform->addElement('button', 'itemsettings_button', get_string('itemsettingsbutton', 'qtype_gapfill'));\n $mform->addHelpButton('itemsettings_button', 'itemsettings_button', 'qtype_gapfill');\n\n $mform->removeelement('generalfeedback');\n\n // Default mark will be set to 1 * number of fields.\n $mform->removeelement('defaultmark');\n\n $mform->addElement('editor', 'wronganswers', get_string('wronganswers', 'qtype_gapfill'),\n array('size' => 70, 'rows' => 1), $this->editoroptions);\n $mform->addHelpButton('wronganswers', 'wronganswers', 'qtype_gapfill');\n\n /* Only allow plain text in for the comma delimited set of wrong answer values\n * wrong answers really should be a set of zero marked ordinary answers in the answers\n * table.\n */\n $mform->setType('wronganswers', PARAM_TEXT);\n\n $mform->addElement('editor', 'generalfeedback', get_string('generalfeedback', 'question')\n , array('rows' => 10), $this->editoroptions);\n\n $mform->setType('generalfeedback', PARAM_RAW);\n $mform->addHelpButton('generalfeedback', 'generalfeedback', 'question');\n $mform->addElement('header', 'feedbackheader', get_string('moreoptions', 'qtype_gapfill'));\n\n // The delimiting characters around fields.\n $config = get_config('qtype_gapfill');\n /* turn config->delimitchars into an array) */\n $delimitchars = explode(\",\", $config->delimitchars);\n /* copies the values into the keys */\n $delimitchars = array_combine($delimitchars, $delimitchars);\n /* strip any spaces from keys. This is about backward compatibility with old code\n * and avoiding having to expand the size of the delimitchar column from its current\n * 2. The value in the drop down looks better with a gap between the delimitchars, but\n * a gap in the key will break the insert into the question_gapfill table\n */\n foreach ($delimitchars as $key => $value) {\n $key2 = str_replace(' ', '', $key);\n $delimitchars2[$key2] = $value;\n }\n $mform->addElement('select', 'delimitchars', get_string('delimitchars', 'qtype_gapfill'), $delimitchars2);\n $mform->addHelpButton('delimitchars', 'delimitchars', 'qtype_gapfill');\n\n $answerdisplaytypes = array(\"dragdrop\" => get_string('displaydragdrop', 'qtype_gapfill'),\n \"gapfill\" => get_string('displaygapfill', 'qtype_gapfill'),\n \"dropdown\" => get_string('displaydropdown', 'qtype_gapfill'));\n\n $mform->addElement('select', 'answerdisplay', get_string('answerdisplay', 'qtype_gapfill'), $answerdisplaytypes);\n $mform->addHelpButton('answerdisplay', 'answerdisplay', 'qtype_gapfill');\n\n /* sets all gaps to the size of the largest gap, avoids giving clues to the correct answer */\n $mform->addElement('advcheckbox', 'fixedgapsize', get_string('fixedgapsize', 'qtype_gapfill'));\n $mform->addHelpButton('fixedgapsize', 'fixedgapsize', 'qtype_gapfill');\n\n /* put draggable answer options after the text. They don't have to be dragged as far, handy on small screens */\n $mform->addElement('advcheckbox', 'optionsaftertext', get_string('optionsaftertext', 'qtype_gapfill'));\n $mform->setDefault('optionsaftertext', $config->optionsaftertext);\n $mform->addHelpButton('optionsaftertext', 'optionsaftertext', 'qtype_gapfill');\n\n /* use plain string matching instead of regular expressions */\n $mform->addElement('advcheckbox', 'disableregex', get_string('disableregex', 'qtype_gapfill'));\n $mform->addHelpButton('disableregex', 'disableregex', 'qtype_gapfill');\n $mform->setDefault('disableregex', $config->disableregex);\n $mform->setAdvanced('disableregex');\n\n $mform->addElement('advcheckbox', 'letterhints', get_string('letterhints', 'qtype_gapfill'));\n $mform->setDefault('letterhints', $config->letterhints);\n $mform->addHelpButton('letterhints', 'letterhints', 'qtype_gapfill');\n\n /* Discards duplicates before processing answers, useful for tables with gaps like [cat|dog][cat|dog] */\n $mform->addElement('advcheckbox', 'noduplicates', get_string('noduplicates', 'qtype_gapfill'));\n $mform->addHelpButton('noduplicates', 'noduplicates', 'qtype_gapfill');\n $mform->setAdvanced('noduplicates');\n\n /* Makes marking case sensitive so Cat is not the same as cat */\n $mform->addElement('advcheckbox', 'casesensitive', get_string('casesensitive', 'qtype_gapfill'));\n $mform->setDefault('casesensitive', $config->casesensitive);\n $mform->addHelpButton('casesensitive', 'casesensitive', 'qtype_gapfill');\n $mform->setAdvanced('casesensitive');\n\n // To add combined feedback (correct, partial and incorrect).\n $this->add_combined_feedback_fields(true);\n\n // Adds hinting features.\n $this->add_interactive_settings(true, true);\n if ($config->letterhints && $config->addhinttext) {\n $this->_form->getElement('hint[0]')->setValue(array('text' => get_string('letterhint0', 'qtype_gapfill')));\n $this->_form->getElement('hint[1]')->setValue(array('text' => get_string('letterhint1', 'qtype_gapfill')));\n }\n }", "protected function form()\n {\n $form = new Form(new Banner);\n\n $form->text('title', 'Title');\n $form->image('image', 'Image')->rules('required')->move('images/banners');\n $form->switch('status', 'Published')->default(1);\n\n $form->footer(function ($footer) {\n // disable `View` checkbox\n $footer->disableViewCheck();\n\n // disable `Continue editing` checkbox\n $footer->disableEditingCheck();\n\n // disable `Continue Creating` checkbox\n $footer->disableCreatingCheck();\n\n });\n return $form;\n }", "protected function form()\n {\n $form = new Form(new WithdrawDepositOrder);\n\n $form->number('apply_amount', __('Apply amount'));\n $form->number('transfer_amount', __('Transfer amount'));\n $form->number('master_id', __('Master id'));\n $form->switch('status', __('Status'));\n $form->textarea('comment', __('Comment'));\n\n return $form;\n }", "public function getBankForm()\n {\n\n $config = array(\n 'kwota' => 999.99,\n 'opis' => 'Transaction description',\n 'crc' => '100020003000',\n 'wyn_url' => 'http://example.pl/examples/notificationBasic.php?transaction_confirmation',\n 'wyn_email' => '[email protected]',\n 'pow_url' => 'http://example.pl/examples/success.html',\n 'email' => '[email protected]',\n 'imie' => 'Jan',\n 'nazwisko' => 'Kowalski',\n );\n\n $form = $this->getBankSelectionForm($config, false, true);\n\n echo $form;\n }", "public function build(Form $form):Form\n {\n foreach ($this->classType->getProperties() as $property) {\n $this->add($form, $property);\n }\n \n return $form;\n }", "public function box()\n {\n echo \"<div style='height:54px;width:54px;background-color:{$this};color:{$this->black_or_white()};padding:3px;'>{$this}</div>\";\n }", "function drawStyle()\r\n\t{\r\n\t}", "function ShowBorder($exterior=true,$interior=true) {\n\t$this->pie_border = $exterior;\n\t$this->pie_interior_border = $interior;\n }", "function form($instance) {\n\n\t\t// Get stored preferences\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$title = isset( $instance['title'] ) ? esc_attr($instance['title']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$show_title_text = isset( $instance['show_title_text'] ) ? $instance['show_title_text'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$order = isset( $instance['order'] ) ? esc_attr($instance['order']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$size_from = isset( $instance['size_from'] ) ? esc_attr($instance['size_from']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$size_to = isset( $instance['size_to'] ) ? esc_attr($instance['size_to']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$max = isset( $instance['max'] ) ? esc_attr($instance['max']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$taxonomy = isset( $instance['taxonomy'] ) ? esc_attr($instance['taxonomy']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$color = isset( $instance['color'] ) ? esc_attr($instance['color']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$color_span_from = isset( $instance['color_span_from'] ) ? esc_attr($instance['color_span_from']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$color_span_to = isset( $instance['color_span_to'] ) ? esc_attr($instance['color_span_to']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$letter_spacing = isset( $instance['letter_spacing'] ) ? esc_attr($instance['letter_spacing']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$word_spacing = isset( $instance['word_spacing'] ) ? esc_attr($instance['word_spacing']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$tag_spacing = isset( $instance['tag_spacing'] ) ? esc_attr($instance['tag_spacing']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$case = isset( $instance['case'] ) ? esc_attr($instance['case']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$minimum\t\t = isset( $instance['minimum'] ) ? esc_attr($instance['minimum']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$tags_list = isset( $instance['tags_list'] ) && is_array($instance['tags_list']) ? $instance['tags_list'] : array();\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$tags_list_type = isset( $instance['tags_list_type'] ) ? esc_attr($instance['tags_list_type']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$reverse = isset( $instance['reverse'] ) ? $instance['reverse'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$authors = isset( $instance['authors'] ) && is_array($instance['authors']) ? $instance['authors'] : array();\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$color_set = isset( $instance['color_set'] ) && is_array($instance['color_set']) ? $instance['color_set'] : array();\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$case_sensitive = isset( $instance['case_sensitive'] ) ? $instance['case_sensitive'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$debug \t\t\t\t= isset( $instance['debug'] ) ? $instance['debug'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$show_title = isset( $instance['show_title'] ) ? $instance['show_title'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$link_underline = isset( $instance['link_underline'] ) ? $instance['link_underline'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$link_bold = isset( $instance['link_bold'] ) ? $instance['link_bold'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$link_italic = isset( $instance['link_italic'] ) ? $instance['link_italic'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$link_bg_color = isset( $instance['link_bg_color'] ) ? esc_attr($instance['link_bg_color']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$link_border_width = isset( $instance['link_border_width'] ) ? esc_attr($instance['link_border_width']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$link_border_style = isset( $instance['link_border_style'] ) ? $instance['link_border_style'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$link_border_color = isset( $instance['link_border_color'] ) ? esc_attr($instance['link_border_color']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$hover_underline = isset( $instance['hover_underline'] ) ? $instance['hover_underline'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$hover_bold = isset( $instance['hover_bold'] ) ? $instance['hover_bold'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$hover_italic = isset( $instance['hover_italic'] ) ? $instance['hover_italic'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$hover_bg_color = isset( $instance['hover_bg_color'] ) ? esc_attr($instance['hover_bg_color']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$hover_color = isset( $instance['hover_color'] ) ? esc_attr($instance['hover_color']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$hover_border_width = isset( $instance['hover_border_width'] ) ? esc_attr($instance['hover_border_width']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$hover_border_style = isset( $instance['hover_border_style'] ) ? $instance['hover_border_style'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$hover_border_color = isset( $instance['hover_border_color'] ) ? esc_attr($instance['hover_border_color']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$days_old \t\t\t= isset( $instance['days_old'] ) ? esc_attr($instance['days_old']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$line_height \t\t= isset( $instance['line_height'] ) ? esc_attr($instance['line_height']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$separator \t\t\t= isset( $instance['separator'] ) ? esc_attr($instance['separator']) : '';\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$prefix \t\t\t= isset( $instance['prefix'] ) ? esc_attr($instance['prefix']) : '';\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$suffix \t\t\t= isset( $instance['suffix'] ) ? esc_attr($instance['suffix']) : '';\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$post_type = isset( $instance['post_type'] ) ? $instance['post_type'] : array('post');\n\n\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$configurations = get_option('utcw_saved_configs');\n\n\t\t$args = array(\n\t\t\t'public' => true\n\t\t);\n\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$available_post_types = get_post_types($args);\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$available_taxonomies = get_taxonomies();\n\n\t\t// Content of the widget settings form\n\t\trequire \"settings.php\";\n\t}", "protected function form()\n {\n $form = new Form(new LotteryCode());\n\n $form->text('code', __('Code'));\n $form->number('batch_num', __('Batch num'));\n $form->text('prizes_name', __('Prizes name'));\n $form->datetime('valid_period', __('Valid period'))->default(date('Y-m-d H:i:s'));\n $form->datetime('prizes_time', __('Prizes time'))->default(date('Y-m-d H:i:s'));\n $form->text('operator', __('Operator'));\n $form->switch('award_status', __('Award status'));\n\n return $form;\n }", "private function buildGitLabWForm(&$form) {\n $git_settings = $this->configFactory->get('simple_git.settings');\n\n $form['git_lab'] = [\n '#type' => 'fieldset',\n '#title' => $this->t('GitLab Web settings'),\n '#collapsible' => TRUE,\n '#collapsed' => FALSE,\n ];\n\n $form['git_lab']['git_lab_app_id'] = [\n '#type' => 'textfield',\n '#title' => $this->t('GitLab App Web Id'),\n '#description' => $this->t('GitLab App Web Id value'),\n '#default_value' => $git_settings->get(\n ModuleConstantInterface::GIT_TYPE_GITLAB\n )['app_id'],\n ];\n\n $form['git_lab']['git_lab_app_secret'] = [\n '#type' => 'textfield',\n '#title' => $this->t('GitLab App Web Secret'),\n '#description' => $this->t('GitLab App Web Secret value'),\n '#default_value' => $git_settings->get(\n ModuleConstantInterface::GIT_TYPE_GITLAB\n )['app_secret'],\n ];\n\n $form['git_lab']['git_lab_app_url_redirect'] = [\n '#type' => 'textfield',\n '#title' => $this->t('GitLab URL Web Redirect'),\n '#description' => $this->t('GitLab URL Web Redirect value'),\n '#default_value' => $git_settings->get(\n ModuleConstantInterface::GIT_TYPE_GITLAB\n )['app_url_redirect'],\n ];\n\n }", "public function __construct()\n\t{\n\t\t$this->setWidth('600px');\n\t\t$this->setHeight('250px');\n\t\tparent::__construct();\n\t}", "protected function form()\n {\n $form = new Form(new Boarding()); \n \n $form->select('pet_id',__('Pet Name'))->options(Pet::all()->pluck('name','id'))->rules('required');\n $form->select('reservation_id',__('Reservation'))->options(Reservation::all()->pluck('date','id'))->rules('required');\n $form->select('cage_id',__('Available Cages'))->options(Cage::get()->where(\"availability\",\"Available\")->pluck('id','id'))->rules('required');\n $form->datetime('end_date', __('End date'))->default(date('Y-m-d H:i:s'))->rules('required');\n \n return $form; \n }", "public function init()\n\t{\n\t\tparent::init();\n\t\t$this->addCssClass($this->options, 'progress');\n\t}", "public function __construct($color = \"green\", $size = '', $progress = 0, $indeterminate = false)\n {\n $this->color = $color;\n $this->size = $size;\n $this->progress = $progress;\n $this->indeterminate = $indeterminate;\n }", "protected function form()\n {\n $form = new Form(new Resources);\n\n $form->text('name', '名称')->rules('required',['required' => '请输入 配置项的名称']);\n\n $form->radio('type', '类型')->options(Resources::TYPE);\n\n $form->cropper('url','图片');\n\n $form->number('sort_num','排序');\n\n $form->textarea('memo','备注');\n\n $form->tools(function (Form\\Tools $tools) {\n // 去掉`删除`按钮\n $tools->disableDelete();\n\n // 去掉`查看`按钮\n $tools->disableView();\n });\n $form->footer(function ($footer) {\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n\n // 去掉`继续编辑`checkbox\n $footer->disableEditingCheck();\n\n // 去掉`继续创建`checkbox\n $footer->disableCreatingCheck();\n\n });\n\n return $form;\n }", "protected function createComponentDeletePrihozForm()\n {\n $form = new Nette\\Application\\UI\\Form;\n \n $form->addText('id_nemovitost')\n ->setAttribute('style', 'display:none');\n \n $form->addSubmit('send', 'Odeslat formulář')\n ->setAttribute('class', 'btn btn-primary');\n\n $form->onSuccess[] = $this->deletePrihozFormSucceeded;\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Carousel);\n\n $form->select('carousel_category_id', __('carousel::carousel.carousel_category_id'))\n ->options(CarouselCategory::all()->pluck('name', 'id'));\n $form->text('title', __('carousel::carousel.title'));\n $form->text('url', __('carousel::carousel.url'));\n $form->image('img_src', __('carousel::carousel.img_src'))\n ->removable()\n ->uniqueName()\n ->move('carousel');\n $form->text('alt', __('carousel::carousel.alt'));\n $form->textarea('remark', __('carousel::carousel.remark'));\n $form->select('status', __('carousel::carousel.status.label'))\n ->default(1)\n ->options(__('carousel::carousel.status.value'));\n $form->datetime('start_time', __('carousel::carousel.start_time'))\n ->default(date('Y-m-d H:i:s'));\n $form->datetime('end_time', __('carousel::carousel.end_time'))\n ->default(date('Y-m-d H:i:s'));\n\n return $form;\n }", "static function lengthForm (ViewRegistry $context) {\n $lengths=array(10,20,50,100,\"*\");\n\n $form=\"<form action=\\\"\\\" method=\\\"get\\\" id=\\\"perPage\\\" drawer=\\\"Per\\\"><p>\".l(\"Per page:\").\" <select name=\\\"length\\\">\";\n $optList=\"\";\n foreach ($lengths as $l) {\n $optList.=\"<option value=\\\"\".$l.\"\\\"\";\n if ( $l==$context->g(\"length\") ) $optList.=\" selected=\\\"selected\\\"\";\n $optList.=\">\".$l.\"</option>\";\n }\n //<option value=\"10\">10</option>\n $form.=$optList;\n $form.=\"</select> <input type=\\\"submit\\\" value=\\\"\".l(\"Apply\").\"\\\"/>\";\n $defineBase=\"<input type=\\\"hidden\\\" name=\\\"\";\n $bs=$context->g(\"base\");\n $defineBase.=$bs.\"\\\" value=\\\"\";\n if ( $bs == \"begin\" ) $defineBase.=$context->g(\"begin\");\n else if ( $bs == \"end\" ) $defineBase.=$context->g(\"end\");\n else throw new UsageException (\"Illegal value at \\\"base\\\" key :\".$bs.'!');\n $defineBase.=\"\\\"/>\";\n $form.=$defineBase.\"</p></form>\";\n return ($form);\n }", "public function form(){\n \t \tif($this->layoutWidgetInfo){\n \t\t$setting = json_decode($this->layoutWidgetInfo->setting, true);\n \t}\n\n \t//default option(type[text], cols[3-9], rows[1], label[$key], name[$key], value[$setting[$k]])\n \t//add option(class, id, stype, styleRow, required, placeholder, attr, [options, code])\n \t$settingForm = array(\n \t\t'layout_widget_id' \t=> array('type' => 'hidden', 'value' => $this->layoutWidgetInfo->layoutWidgetId),\n \t\t'widget_controller' => array('type' => 'hidden', 'value' => $this->widgetController),\n \t\t'header' \t=> array('type' => 'custom', 'value' => \"<h4 class='widget_header col-md-12'>{$this->widgetController}</h4>\", 'label' => ''),\n\n \t\t'title' => array(),\n \t\t'class'\t=> array(),\n 'bg_color'\t=> array('label' => 'Màu nền', 'class' => 'ColorPickerSliders',\n 'addElement' => '<a href=\"index.php?r=admin/help/view&helpId=4\" target=\"_blank\">Xem thêm</a>'),\n \t\t'category_id'\t=> array('type' => 'select_category', 'label' => 'Category', 'required' => true,\n \t\t\t\t'options' => CategoryExt::getCategoryList()),\n \t\t'style'\t=> array('type' => 'select', 'options' => $this->settingDefault['style']),\n \t\t'order_by' => array('type' => 'select', 'options' => $this->settingDefault['order_by']),\n \t\t'order_direction' => array('type' => 'select', 'options' => $this->settingDefault['order_direction']),\n \t);\n\n \t$settingAll = array(\n \t\t'cols' => '3-9'\n \t);\n\n \t//render setting from\n \tTemplateHelper::renderForm($settingForm, $setting, $settingAll);\n TemplateHelper::getTemplate('layout/_extra/add_setting.php', $setting);\n TemplateHelper::getTemplate('layout/_extra/color_picker.php');\n \t}", "public function getBorderWidth() {}", "public function buildForm(array $form, FormStateInterface $form_state) {\n // Call the parent implementation to inherit from the save button and\n // form style.\n $form = parent::buildForm($form, $form_state);\n\n // Add our custom form fields.\n $form['opening_hours'] = array(\n '#type' => 'textarea',\n '#title' => 'Opening hours',\n '#description' => 'Days / hours of the library',\n '#default_value' => $this->config('happy_alexandrie.library_config')->get('opening_hours'),\n '#rows' => 5,\n );\n return $form;\n }", "public function __construct()\n {\n parent::__construct();\n \n $this->form = new BootstrapFormBuilder;\n $this->form->setFormTitle('Bootstrap Form Builder');\n \n $label1 = new TLabel('Some label', '#7D78B6', 12, 'bi');\n $label1->style='text-align:left;border-bottom:1px solid #c0c0c0;width:100%';\n \n $this->form->appendPage('Page 1');\n $this->form->addContent( [$label1] );\n \n $field1a = new TEntry('row1a');\n $field2a = new TDate('row2a');\n $field2b = new TCombo('row2b');\n $field3a = new TEntry('row3a');\n $field3b = new TEntry('row3b');\n $field3c = new TEntry('row3c');\n $field3d = new TEntry('row3d');\n $field4a = new TText('row4a');\n \n // add a row with 2 slots\n $this->form->addFields( [ new TLabel('Row 1') ],\n [ $field1a ] );\n \n // add a row with 2 slots\n $this->form->addFields( [ new TLabel('Row 2') ],\n [ $field2a, $field2b ] );\n \n // add a row with 4 slots\n $this->form->addFields( [ new TLabel('Row 3') ],\n [ $field3a, $field3b ],\n [ new TLabel('Label') ],\n [ $field3c, $field3d ] );\n \n $field2b->addItems( ['1' => 'One', '2' => 'Two'] );\n \n $field1a->setSize('70%');\n $field2a->setSize('120');\n $field2b->setSize('75%');\n \n $field3a->setSize('50%');\n $field3b->setSize('50%');\n $field3c->setSize('50%');\n $field3d->setSize('50%');\n \n $this->form->appendPage('Page 2');\n \n $label2 = new TLabel('Another label', '#7D78B6', 12, 'bi');\n $label2->style='text-align:left;border-bottom:1px solid #c0c0c0;width:100%';\n \n $this->form->addContent( [$label2] );\n $this->form->addFields( [new TLabel('Row 4')], [$field4a ]);\n $field4a->setSize('100%', 100);\n \n $this->form->addAction('Send', new TAction(array($this, 'onSend')), 'fa:check-circle-o green');\n \n // wrap the page content using vertical box\n $vbox = new TVBox;\n $vbox->add(new TXMLBreadCrumb('menu.xml', __CLASS__));\n $vbox->add($this->form);\n\n parent::add($this->form);\n }", "protected function form()\n {\n $form = new Form(new BoxOrder);\n\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Terrace());\n\n $form->image('image', __('平台图片'))->rules('required', ['required' => '平台图片不能为空']);\n $form->text('name', __('平台名称'))->rules('required', ['required' => '平台名称不能为空']);\n $form->text('path', __('外链'))->rules('required', ['required' => '平台外链不能为空']);\n $form->text('notice_info', __('提示语'))->rules('required', ['required' => '平台提示语不能为空']);\n $form->radio('status','状态')->options(['1' => '未推荐', '2'=> '已推荐'])->default(1);\n\n return $form;\n }", "public function makeImage()\n {\n $x_width = 200;\n $y_width = 125;\n\n $this->image = imagecreatetruecolor(200, 125);\n\n $this->white = imagecolorallocate($this->image, 255, 255, 255);\n $this->black = imagecolorallocate($this->image, 0, 0, 0);\n $this->red = imagecolorallocate($this->image, 255, 0, 0);\n $this->green = imagecolorallocate($this->image, 0, 255, 0);\n $this->grey = imagecolorallocate($this->image, 128, 128, 128);\n\n $this->red = imagecolorallocate($this->image, 231, 0, 0);\n\n $this->yellow = imagecolorallocate($this->image, 255, 239, 0);\n $this->green = imagecolorallocate($this->image, 0, 129, 31);\n\n $this->color_palette = [$this->red, $this->yellow, $this->green];\n\n imagefilledrectangle($this->image, 0, 0, 200, 125, $this->white);\n\n $border = 25;\n\n $lines = [\"e\", \"g\", \"b\", \"d\", \"f\"];\n $i = 0;\n foreach ($lines as $key => $line) {\n $x1 = 0;\n $x2 = $x_width;\n $y1 = $i * 15 + 25;\n $y2 = $y1;\n imageline(\n $this->image,\n $x1 + $border,\n $y1,\n $x2 - $border,\n $y2,\n $this->black\n );\n $i = $i + 1;\n }\n\n imageline(\n $this->image,\n 0 + $border,\n 25,\n 0 + $border,\n 4 * 15 + 25,\n $this->black\n );\n imageline(\n $this->image,\n 200 - $border,\n 25,\n 200 - $border,\n 4 * 15 + 25,\n $this->black\n );\n\n $textcolor = $this->black;\n\n $font = $this->default_font;\n\n $size = 10;\n $angle = 0;\n\n if (!isset($this->bar_count) or $this->bar_count == \"X\") {\n $this->bar_count = 0;\n }\n $count_notation = $this->bar_count + 1;\n\n if (file_exists($font)) {\n if (\n $count_notation != 1 or\n $count_notation == $this->max_bar_count\n ) {\n imagettftext(\n $this->image,\n $size,\n $angle,\n 0 + 10,\n 110,\n $this->black,\n $font,\n $count_notation\n );\n }\n\n if (\n $count_notation + 1 != 1 or\n $count_notation + 1 == $this->max_bar_count + 1\n ) {\n imagettftext(\n $this->image,\n $size,\n $angle,\n 200 - 25,\n 110,\n $this->black,\n $font,\n $count_notation + 1\n );\n }\n }\n }", "function creaped() {\n\t\t// Esto debe hacerse por dataform\n\t\t$styles = \"\\n<!-- Estilos -->\\n\";\n\t\t$styles .= style('rapyd.css');\n\t\t$styles .= style('ventanas.css');\n\t\t$styles .= style('themes/proteo/proteo.css');\n\t\t$styles .= style(\"themes/ui.jqgrid.css\");\n\t\t$styles .= style(\"themes/ui.multiselect.css\");\n\t\t$styles .= style('layout1.css');\n\t\t$styles .= '<link rel=\"stylesheet\" href=\"'.base_url().'system/application/rapyd/elements/proteo/css/rapyd_components.css\" type=\"text/css\" />'.\"\\n\";\n\n\n\t\t$styles .= '\n<style type=\"text/css\">\n\tp {font-size:1em; margin: 1ex 0;}\n\tp.buttons {text-align:center;line-height:2.5em;}\n\tbutton {line-height: normal;}\n\t.hidden {display: none;}\n\tul {z-index:100000;margin:1ex 0;padding:0;list-style:none;cursor:pointer;border:1px solid Black;width:15ex;position:\trelative;}\n\tul li {background-color: #EEE;padding: 0.15em 1em 0.3em 5px;}\n\tul ul {display:none;position:absolute;width:100%;left:-1px;bottom:0;margin:0;margin-bottom: 1.55em;}\n\t.ui-layout-north ul ul {bottom:auto;margin:0;margin-top:1.45em;}\n\tul ul li { padding: 3px 1em 3px 5px; }\n\tul ul li:hover { background-color: #FF9; }\n\tul li:hover ul { display:block; background-color: #EEE; }\n\n\t#feedback { font-size: 0.8em; }\n\t#tablas .ui-selecting { background: #FECA40; }\n\t#tablas .ui-selected { background: #F39814; color: white; }\n\t#tablas { list-style-type: none; margin: 0; padding: 0; width: 90%; }\n\t#tablas li { margin: 1px; padding: 0em; font-size: 0.8em; height: 14px; }\n\n\ttable.tc td.header {padding-right: 1px;padding-left: 1px;font-weight: bold;font-size: 8pt;color: navy;background-color: #f4edd5;text-align:center;}\n\ttable.tc td.title{padding-right: 1px;padding-left: 1px;font-weight: bold;font-size: 8pt;color:navy;text-align:center;background-color: #fdffdf;}\n\ttable.tc td.resalte{border-left:solid 1px #daac00;border-top:solid 1px #daac00;text-align:center;font-weight: bold;}\n\ttable.tc td{ border-left:solid 1px #DAAC00;border-TOP:solid 1px #DAAC00;}\n\ttable.tc {border-right: #daac00 1px solid;padding-right: 0px;border-top: medium none;padding-left: 0px;padding-bottom: 0px;border-left: medium none;border-bottom: #daac00 1px solid;font-family: verdana;font-size:8pt;cellspacing: 0px}\n\ttable.tc td.sin_borde{border-left:solid 1px #DAAC00;border-TOP:solid 1px #DAAC00;text-align:center;border-right:solid 5px #f6f6f6;border-bottom:solid 5px #f6f6f6;}\n\n\t.custom-combobox {position: relative;display: inline-block;}\n\t.custom-combobox-toggle {position: absolute;top: 0;bottom: 0;margin-left: -1px;padding: 0;}\n\t.custom-combobox-input {margin: 0;padding: 5px 10px;}\n\n</style>\n';\n\n\t\t$title = \"\n<div id='encabe'>\n<table width='98%'>\n\t<tr>\n\t\t<td>\".heading('Generar Orden de Produccion').\"</td>\n\t\t<td align='right' width='40'>\".image('cerrar.png','Cerrar Ventana',array('onclick'=>'window.close()','height'=>'20')).\"</td>\n\t</tr>\n</table>\n</div>\n\";\n\t\t$script = \"\\n<!-- JQUERY -->\\n\";\n\t\t$script .= script('jquery-min.js');\n\t\t$script .= script('jquery-migrate-min.js');\n\t\t$script .= script('jquery-ui.custom.min.js');\n\n\t\t$script .= script(\"jquery.layout.js\");\n\t\t$script .= script(\"i18n/grid.locale-sp.js\");\n\n\t\t$script .= script(\"ui.multiselect.js\");\n\t\t$script .= script(\"jquery.jqGrid.min.js\");\n\t\t$script .= script(\"jquery.tablednd.js\");\n\t\t$script .= script(\"jquery.contextmenu.js\");\n\n\t\t$script .= script('plugins/jquery.numeric.pack.js');\n\t\t$script .= script('plugins/jquery.floatnumber.js');\n\t\t$script .= script('plugins/jquery.maskedinput.min.js');\n\n\t\t$script .= '\n<script type=\"text/javascript\">\n\t$(function(){\n\t\t$(\".inputnum\").numeric(\".\");\n\t});\n\t$(function() {\n\t\t$( \"input:submit, a, button\", \".botones\",\".otros\" ).button();\n\t});\n';\n\n\t\t$script .= '\n\t// set EVERY state here so will undo ALL layout changes\n\t// used by the Reset State button: myLayout.loadState( stateResetSettings )\n\tvar stateResetSettings = {\n\t\tnorth__size:\t\t\"auto\"\n\t,\tnorth__initClosed:\tfalse\n\t,\tnorth__initHidden:\tfalse\n\t,\tsouth__size:\t\t\"auto\"\n\t,\tsouth__initClosed:\tfalse\n\t,\tsouth__initHidden:\tfalse\n\t,\twest__size:\t\t\t200\n\t,\twest__initClosed:\tfalse\n\t,\twest__initHidden:\tfalse\n\t,\teast__size:\t\t\t100\n\t,\teast__initClosed:\ttrue\n\t,\teast__initHidden:\ttrue\n\n\t};\n\n\tvar myLayout;\n\n\t$(document).ready(function () {\n\n\t\t// this layout could be created with NO OPTIONS - but showing some here just as a sample...\n\t\t// myLayout = $(\"body\").layout(); -- syntax with No Options\n\n\t\tmyLayout = $(\"body\").layout({\n\n\t\t//\treference only - these options are NOT required because \"true\" is the default\n\t\t\tclosable: true,\tresizable:\ttrue, slidable:\ttrue, livePaneResizing:\ttrue\n\t\t//\tsome resizing/toggling settings\n\t\t,\tnorth__slidable: false, north__togglerLength_closed: \"100%\", north__spacing_closed:\t20\n\t\t,\tsouth__resizable:false,\tsouth__spacing_open:0\n\t\t,\tsouth__spacing_closed:20\n\t\t//\tsome pane-size settings\n\t\t,\twest__minSize: 100, east__size: 100, east__minSize: 50, east__maxSize: .5, center__minWidth: 100\n\t\t//\tsome pane animation settings\n\t\t,\twest__animatePaneSizing: false,\twest__fxSpeed_size:\t\"fast\",\twest__fxSpeed_open: 1000\n\t\t,\twest__fxSettings_open:{ easing: \"easeOutBounce\" },\twest__fxName_close:\"none\"\n\t\t//\tenable showOverflow on west-pane so CSS popups will overlap north pane\n\t\t//,\twest__showOverflowOnHover:\ttrue\n\t\t,\tstateManagement__enabled:true, showDebugMessages: true\n\t\t});\n\n\t\t$(function() {\n\t\t\t$(\"button\").button().click(function(event) {event.preventDefault();});\n\t\t\t//$( \"#almacen\" ).combobox();\n\t\t});\n\n\n \t});\n\n\tfunction sumar(j){\n\t\tvar nn = \\'[name=\"codigo_\\'+j+\\'\"]\\';\n\t\tvar k = 0;\n\t\tvar t;\n\t\tvar totalc = 0;\n\t\tvar maximo = 0;\n\n\t\t// Valida el maximo\n\t\t$(\"#resultados\").html(\"Maximo \"+maximo);\n\n\t\t$(nn).each( function() {\n\t\t\tk = $(this).val();\n\t\t\tt = Number($(\"#cana_\"+k).val());\n\t\t\tmaximo = Number($(\"#falta_\"+k).val());\n\t\t\tif ( t > maximo ){\n\t\t\t\tt = maximo;\n\t\t\t\t$(\"#cana_\"+k).val(maximo);\n\t\t\t}\n\t\t\ttotalc += t;\n\t\t});\n\t\t$(\\'#totalc_\\'+j).val(totalc);\n\t}\n\n\tfunction guardar(){\n\t\talert(\"Guardar\");\n\t\t$.post( \"'.base_url().'inventario/prdo/guardaoe\", $(\"#guardar\").serialize(),\n\t\t\tfunction(data) {\n\t\t\t\talert(data);\n\t\t\t\tlocation.reload();\n\t\t\t\twindow.opener.actualiza();\n\t\t\t}\n\t\t);\n\t}\n</script>\n';\n\n// ENCABEZADO\n$tabla = '\n<div class=\"ui-layout-north\" onmouseover=\"myLayout.allowOverflow(\\'north\\')\" onmouseout=\"myLayout.resetOverflow(this)\">\n<table width=\"100%\" bgcolor=\"#2067B5\">\n\t<tr>\n\t\t<td align=\"left\" width=\"80px\"><img src=\"'.base_url().'assets/default/css/templete_01.jpg\" width=\"120\"></td><td align=\"center\"><h1 style=\"font-size: 20px; color: rgb(255, 255, 255);\" onclick=\"history.back()\">ORDEN DE PRODUCCION</h1></td><td align=\"left\" width=\"100px\" nowrap=\"nowrap\"><font style=\"color:#FFFFFF;font-size:12px\">Usuario: '.$this->secu->usuario().'<br/>'.$this->secu->getnombre().'</font></td><td align=\"right\" width=\"28px\"></td>\n\t</tr>\n</table>\n</div>\n';\n\n// IZQUIERDO\n$tabla .= '\n<div class=\"ui-layout-west\">\n<form id=\"guardar\" >\n<center>\n<lable>Almacen</lable> ';\n$tabla .= $this->datasis->llenaopciones(\"SELECT ubica, ubides FROM caub WHERE gasto='N' ORDER BY ubica\", false, $id='almacen' );\n\n$tabla .= '\n\t<br><br>\n\t<lable>Instruciones</lable>\n\t<textarea rows=\"4\" cols=\"25\" id=\"instrucciones\" name=\"instrucciones\"></textarea>\n\t<br><br>\n\t<button type=\"button\" onclick=\"guardar()\">Guardar Orden</button>\n\t<div id=\"resultados\"></div>\n</center>\n</div>';\n\n// INFERIOR\n$tabla .= '\n<div class=\"ui-layout-south\">\n';\n\n$tabla .= $this->datasis->traevalor('TITULO1');\n\n$tabla .= '\n</div>\n';\n\n// DERECHA\n$tabla .= '\n<div class=\"ui-layout-east\">\n</div>\n';\n\n// CENTRO\n$norden = $this->datasis->dameval('SELECT MAX(id) maxi FROM prdo');\nif ($norden == '') $norden = 0;\n\n$tabla .= '\n<div class=\"ui-layout-center\">';\n\n$mSQL = '\nSELECT a.id, b.numero, b.fecha, b.cod_cli, b.nombre, a.codigoa, a.desca, a.cana, COALESCE(sum(e.ordenado),0) producido, a.cana-COALESCE(sum(e.ordenado),0) falta, COALESCE(sum(e.ordenado),0) ordenado, d.ruta, d.descrip\nFROM itpfac a\nJOIN pfac b ON a.numa = b.numero\nLEFT JOIN sclitrut c ON b.cod_cli=c.cliente\nLEFT JOIN sclirut d ON c.ruta=d.ruta\nLEFT JOIN itprdo e ON a.id = e.idpfac\nWHERE b.producir=\"S\" AND ( b.ordprod=\"\" OR b.ordprod IS NULL )\nGROUP BY a.id\nHAVING falta>0\nORDER BY a.codigoa, d.ruta, a.numa\n';\n\n$query = $this->db->query($mSQL);\n$ruta = 'XX0XX';\n$codigo = 'XXZZWWXXWWXXZZZZ';\n$i = 0;\n$c = 0;\nif ($query->num_rows() > 0){\n\tforeach ($query->result() as $row){\n\t\tif ( $codigo != $row->codigoa ){\n\t\t\tif ( $i > 0 ) $tabla .= \"</tbody></table><br>\\n\";\n\t\t\t$tabla .= '<table class=\"tc\" width=\"100%\">';\n\t\t\t$tabla .= \"<tbody>\\n\";\n\n\t\t\tif ( $i > 0 ) $c++;\n\n\t\t\t$tabla .= \"<tr style='background:#2067B5;color:#FFFFFF;'>\\n\";\n\t\t\t$tabla .= \"\t<td colspan='7'>Cod: \".$row->codigoa.\" Desc: \".$row->desca.\"</td>\\n\";\n\t\t\t//$tabla .= \"\t<td>&nbsp;</td>\\n\";\n\t\t\t$tabla .= \"\t<td><input class='inputnum' name='totalc_$c' id='totalc_$c' size='4' type='text' readonly></td>\\n\";\n\t\t\t$tabla .= \"</tr>\\n\";\n\n\t\t\t$tabla .= \"<tr bgcolor='#BEDCFD'>\\n\";\n\t\t\t$tabla .= \"\t<td >Ruta</td>\\n\";\n\t\t\t$tabla .= \"\t<td >Pedido</td>\\n\";\n\t\t\t$tabla .= \"\t<td >Fecha</td>\\n\";\n\t\t\t$tabla .= \"\t<td >Cliente</td>\\n\";\n\t\t\t$tabla .= \"\t<td >Nombre</td>\\n\";\n\t\t\t$tabla .= \"\t<td >Cantidad</td>\\n\";\n\t\t\t$tabla .= \"\t<td >Producido</td>\\n\";\n\t\t\t$tabla .= \"\t<td >Ordenado</td>\\n\";\n\t\t\t$tabla .= \"</tr>\\n\";\n\n\t\t\t$codigo = $row->codigoa;\n\t\t}\n\n\t\t$tabla .= \"<tr>\\n\";\n\t\t$tabla .= \"\t<td><a href='#' title='\".$row->descrip.\"'>\".$row->ruta.\"&nbsp;</a></td>\\n\";\n\t\t$tabla .= \"\t<td>\".$row->numero.\"</td>\\n\";\n\t\t$tabla .= \"\t<td>\".$row->fecha.\"</td>\\n\";\n\t\t$tabla .= \"\t<td>\".$row->cod_cli.\"</td>\\n\";\n\t\t$tabla .= \"\t<td>\".$row->nombre.\"</td>\\n\";\n\t\t$tabla .= \"\t<td align='right'>\".$row->cana.\"</td>\\n\";\n\t\t$tabla .= \"\t<td align='right'>\".$row->producido.\"</td>\\n\";\n\n\t\t$tabla .= \"\t<td>\\n\";\n\t\t$tabla .= \"\t\t<input class='inputnum' name='cana_$i' id='cana_$i' size='4' onkeyUp='sumar($c)' value='0.00' >\\n\";\n\t\t$tabla .= \"\t\t<input name='codigo_$c' id='codigo_$c' type='hidden' value='$i' >\\n\";\n\t\t$tabla .= \"\t\t<input name='idpfac_$i' id='idpfac_$i' type='hidden' value='\".$row->id. \"' >\\n\";\n\t\t$tabla .= \"\t\t<input name='falta_$i' id='falta_$i' type='hidden' value='\".$row->falta.\"' >\\n\";\n\t\t$tabla .= \"\t</td>\\n\";\n\n\t\t$tabla .= \"</tr>\\n\";\n\t\t$i++;\n\t}\n\t$tabla .= \"</table>\\n\";\n}\n\n$tabla .= '\n<input id=\"totalitem\" name=\"totalitem\" type=\"hidden\" value=\"'.$i.'\">\n</form>\n</div>\n';\n\t\t$data['content'] = $tabla;\n\t\t$data['title'] = $title;\n\t\t$data['head'] = $styles;\n\t\t$data['head'] .= $script;\n\t\t$this->load->view('view_ventanas_lite',$data);\n\t}", "function form( $instance ){\n\n\t\t\t// $instance Defaults\n\t\t\t$instance_defaults = $this->defaults;\n\n\t\t\t// If we have information in this widget, then ignore the defaults\n\t\t\tif( !empty( $instance ) ) $instance_defaults = array();\n\n\t\t\t// Parse $instance\n\t\t\t$instance = wp_parse_args( $instance, $instance_defaults );\n\t\t\textract( $instance, EXTR_SKIP );\n\n\t\t\t$design_bar_components = apply_filters( 'layers_' . $this->widget_id . '_widget_design_bar_components' , array(\n\t\t\t\t\t'custom',\n\t\t\t\t\t'advanced'\n\t\t\t\t) );\n\n\t\t\t$design_bar_custom_components = apply_filters( 'layers_' . $this->widget_id . '_widget_design_bar_custom_components' , array(\n\t\t\t\t\t'layout' => array(\n\t\t\t\t\t\t'icon-css' => 'icon-layout-fullwidth',\n\t\t\t\t\t\t'label' => __( 'Layout', 'layerswp' ),\n\t\t\t\t\t\t'wrapper-class' => 'layers-pop-menu-wrapper layers-small',\n\t\t\t\t\t\t'elements' => array(\n\t\t\t\t\t\t\t'layout' => array(\n\t\t\t\t\t\t\t\t'type' => 'select-icons',\n\t\t\t\t\t\t\t\t'label' => __( '' , 'layerswp' ),\n\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'design' ) . '[layout]' ,\n\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'design-layout' ) ,\n\t\t\t\t\t\t\t\t'value' => ( isset( $design['layout'] ) ) ? $design['layout'] : NULL,\n\t\t\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t\t\t'layout-boxed' => __( 'Boxed' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t'layout-fullwidth' => __( 'Full Width' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t'layout-full-screen' => __( 'Full Screen' , 'layerswp' )\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\t'display' => array(\n\t\t\t\t\t\t'icon-css' => 'icon-slider',\n\t\t\t\t\t\t'label' => __( 'Slider', 'layerswp' ),\n\t\t\t\t\t\t'elements' => array(\n\t\t\t\t\t\t\t\t'show_slider_arrows' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_slider_arrows' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_slider_arrows' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_slider_arrows ) ) ? $show_slider_arrows : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Slider Arrows' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'show_slider_dots' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_slider_dots' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_slider_dots' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_slider_dots ) ) ? $show_slider_dots : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Slider Dots' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'autoplay_slides' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'autoplay_slides' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'autoplay_slides' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $autoplay_slides ) ) ? $autoplay_slides : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Autoplay Slides' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'slide_time' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'number',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'slide_time' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'slide_time' ) ,\n\t\t\t\t\t\t\t\t\t'min' => 1,\n\t\t\t\t\t\t\t\t\t'max' => 10,\n\t\t\t\t\t\t\t\t\t'placeholder' => __( 'Time in seconds, eg. 2' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $slide_time ) ) ? $slide_time : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Slide Interval' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t'data' => array( 'show-if-selector' => '#' . $this->get_field_id( 'autoplay_slides' ), 'show-if-value' => 'true' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'slide_height' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'number',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'slide_height' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'slide_height' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $slide_height ) ) ? $slide_height : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Slider Height' , 'layerswp' )\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t) );\n\n\t\t\t$this->design_bar(\n\t\t\t\t'side', // CSS Class Name\n\t\t\t\tarray(\n\t\t\t\t\t'name' => $this->get_field_name( 'design' ),\n\t\t\t\t\t'id' => $this->get_field_id( 'design' ),\n\t\t\t\t), // Widget Object\n\t\t\t\t$instance, // Widget Values\n\t\t\t\t$design_bar_components, // Standard Components\n\t\t\t\t$design_bar_custom_components // Add-on Components\n\t\t\t); ?>\n\t\t\t<div class=\"layers-container-large\" id=\"layers-slide-widget-<?php echo esc_attr( $this->number ); ?>\">\n\n\t\t\t\t<?php $this->form_elements()->header( array(\n\t\t\t\t\t'title' =>'Sliders',\n\t\t\t\t\t'icon_class' =>'slider'\n\t\t\t\t) ); ?>\n\n\t\t\t\t<section class=\"layers-accordion-section layers-content\">\n\t\t\t\t\t\t<?php echo $this->form_elements()->input(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'type' => 'hidden',\n\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'slide_ids' ) ,\n\t\t\t\t\t\t\t\t'id' => 'slide_ids_input_' . $this->number,\n\t\t\t\t\t\t\t\t'value' => ( isset( $slide_ids ) ) ? $slide_ids : NULL\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t); ?>\n\n\t\t\t\t\t\t<?php // If we have some slides, let's break out their IDs into an array\n\t\t\t\t\t\tif( isset( $slide_ids ) && '' != $slide_ids ) $slides = explode( ',' , $slide_ids ); ?>\n\n\t\t\t\t\t\t<ul id=\"slide_list_<?php echo esc_attr( $this->number ); ?>\" class=\"layers-accordions layers-accordions-sortable layers-sortable\" data-id_base=\"<?php echo $this->id_base; ?>\" data-number=\"<?php echo esc_attr( $this->number ); ?>\">\n\t\t\t\t\t\t\t<?php if( isset( $slides ) && is_array( $slides ) ) { ?>\n\t\t\t\t\t\t\t\t<?php foreach( $slides as $slide ) {\n\t\t\t\t\t\t\t\t\t$this->slide_item( array(\n\t\t\t\t\t\t\t\t\t\t\t\t'id_base' => $this->id_base ,\n\t\t\t\t\t\t\t\t\t\t\t\t'number' => $this->number\n\t\t\t\t\t\t\t\t\t\t\t) ,\n\t\t\t\t\t\t\t\t\t\t\t$slide ,\n\t\t\t\t\t\t\t\t\t\t\t( isset( $instance[ 'slides' ][ $slide ] ) ) ? $instance[ 'slides' ][ $slide ] : NULL );\n\t\t\t\t\t\t\t\t} ?>\n\t\t\t\t\t\t\t<?php } ?>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t<button class=\"layers-button btn-full layers-add-widget-slide add-new-widget\" data-number=\"<?php echo esc_attr( $this->number ); ?>\"><?php _e( 'Add New Slide' , 'layerswp' ) ; ?></button>\n\t\t\t\t</section>\n\n\t\t\t</div>\n\n\t\t<?php }", "private function StartForm(){\r\n\t\t\t$this->formHTML .= \"<form method=\\\"{$this->method}\\\" action=\\\"{$this->action}\\\"\";\r\n\t\t\tif($this->enctype){\r\n\t\t\t\t$this->formHTML .= \" enctype=\\\"{$this->enctype}\\\"\";\r\n\t\t\t}\r\n\t\t\t$this->formHTML .= \" name=\\\"{$this->formName}\\\" class=\\\"c{$this->formName}\\\" id=\\\"i{$this->formName}\\\"\";\r\n\t\t\t$this->formHTML .= \">\";\r\n\t\t}", "protected function createComponentProjectForm(): Form {\n $form = new Form; \n\n //Get all available project types for select field\n $types = $this->database->table('types');\n $types_arr = array();\n foreach($types as $type) {\n $types_arr[$type->id] = $type->title;\n }\n\n $form->addText('title', \"Project Title:\")\n ->setRequired()\n ->addRule($form::MAX_LENGTH, 'The Project title need to be less than %d character long', 60);\n\n $form->addSelect(\"type_id\", \"Project Type\", $types_arr)\n ->setRequired();\n\n $form->addText('start_date', \"Start Date\")\n ->setHtmlType('date')\n ->setRequired();\n\n $form->addText('end_date', \"End Date\")\n ->setHtmlType('date')\n ->setRequired();\n\n $form->addSubmit('send', \"Publish Project\");\n\n $form->onSuccess[] = [$this, 'projectFormSucceeded'];\n\n return $form;\n }", "function __construct($aowner=null)\r\n {\r\n //Calls inherited constructor\r\n parent::__construct($aowner);\r\n\r\n $this->Width=65;\r\n $this->Height=65;\r\n $this->_pen=new Pen();\r\n $this->_pen->_control=$this;\r\n $this->_brush=new Brush();\r\n $this->_brush->_control=$this;\r\n\r\n }", "protected function buildForm()\n {\n $this->formBuilder\n ->add('host', 'text', array(\n 'data' => ElasticProduct::getConfigValue('host'),\n 'required' => false,\n 'attr' => ['placeholder' => 'localhost'],\n 'label' => Translator::getInstance()->trans('Host', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'host'\n )\n ))\n ->add('port', 'text', array(\n 'data' => ElasticProduct::getConfigValue('port'),\n 'required' => false,\n 'attr' => ['placeholder' => '9200'],\n 'label' => Translator::getInstance()->trans('Port', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'port'\n )\n ))\n ->add('username', 'text', array(\n 'data' => ElasticProduct::getConfigValue('username'),\n 'required' => false,\n 'label' => Translator::getInstance()->trans('Username', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'username'\n )\n ))\n ->add('password', PasswordType::class, array(\n 'data' => ElasticProduct::getConfigValue('password'),\n 'required' => false,\n 'label' => Translator::getInstance()->trans('Password', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'password'\n )\n ))\n ->add('index_prefix', 'text', array(\n 'data' => ElasticProduct::getConfigValue('index_prefix'),\n 'required' => false,\n 'attr' => ['placeholder' => 'my_website_name'],\n 'label' => Translator::getInstance()->trans('Index prefix', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'index_prefix'\n )\n ));\n }", "public function __construct($width=NULL, $height=NULL)\n\t{\n\t\tparent::__construct($width, $height);\n\t\t\n\t\t$this->set_margins(5);\n\t\t\n\t\t$this->colors['pen_color'] = array(\t// for drawing \"value lines\"\n\t\t\t\tarray('#c45e31', NULL, NULL),\n\t\t\t\tarray('#b7da2d', NULL, NULL)\n\t\t\t);\n\t\t$this->colors['point_color'] = array(\t// point border color\n\t\t\t\tarray('#c45e31', NULL, NULL),\n\t\t\t\tarray('#b7da2d', NULL, NULL)\n\t\t\t);\n\t\t$this->colors['point_fill_color'] = array('#ffffff', NULL, NULL);\t// point fill color\n\t\t$this->colors['line_color'] = \t\t\tarray('#dfdfdf', NULL, NULL);\t// primary color of lines\n\t\t$this->colors['line_color2'] =\t\t\tarray('#969696', NULL, NULL);\t// for short lines by the legend for example\n\t\t$this->colors['legend_color'] = \t\tarray('#fefefe', NULL, NULL); // background legend color\n\t}", "public function __construct()\n {\n \t// Initialise values\n \t$this->_horizontal\t\t\t= PHPPowerPoint_Style_Alignment::HORIZONTAL_LEFT;\n \t$this->_vertical\t\t\t= PHPPowerPoint_Style_Alignment::VERTICAL_BASE;\n \t$this->_level\t\t\t\t= 0;\n\t\t$this->_indent\t\t\t\t= 0;\n }", "protected function form()\n {\n $form = new Form(new Cate());\n\n $form->text('name', __('Name'));\n $form->url('link', __('Link'));\n $form->text('thumb', __('Thumb'));\n $form->switch('status', __('Status'));\n $form->number('sort', __('Sort'));\n $form->datetime('createtime', __('Createtime'))->default(date('Y-m-d H:i:s'));\n\n return $form;\n }", "abstract public function createForm();", "abstract public function createForm();" ]
[ "0.69055814", "0.68195033", "0.61908114", "0.61072564", "0.5682266", "0.56485695", "0.5436292", "0.5436292", "0.5434116", "0.5432274", "0.5432274", "0.5432274", "0.5432274", "0.5432274", "0.5430103", "0.53658926", "0.5246863", "0.5181012", "0.516103", "0.5084275", "0.50808173", "0.50668967", "0.50278145", "0.5017033", "0.49811444", "0.4950983", "0.49413857", "0.4937674", "0.49348432", "0.48909384", "0.48762122", "0.48659104", "0.4862793", "0.48360148", "0.48299643", "0.48123047", "0.4802906", "0.48011452", "0.4791999", "0.4764162", "0.47428182", "0.47376797", "0.47370127", "0.4734007", "0.47336948", "0.4719728", "0.4718893", "0.47185218", "0.47160634", "0.47091165", "0.46864396", "0.46821767", "0.4669702", "0.466719", "0.4661036", "0.46547955", "0.46512067", "0.4651137", "0.4651035", "0.4645653", "0.46383762", "0.46234447", "0.46203667", "0.4611601", "0.46023747", "0.45981586", "0.4595627", "0.4586037", "0.45845112", "0.45823428", "0.45817629", "0.4581508", "0.45781982", "0.45717323", "0.45711395", "0.45709863", "0.45691243", "0.45647332", "0.45617408", "0.45617038", "0.45508695", "0.4549374", "0.45453638", "0.45446625", "0.45445773", "0.45395055", "0.4520069", "0.45163256", "0.4516016", "0.45087415", "0.45020804", "0.44947883", "0.44943383", "0.44942337", "0.449213", "0.44872504", "0.4485907", "0.44853836", "0.4479297", "0.4479297" ]
0.75592405
0
Builds the form that define label properties of your progress bar
function buildForm() { $this->buildTabs(); // tab caption $this->addElement('header', null, 'Progress2 Generator - Control Panel: string properties'); $stringpainted[] =& $this->createElement('radio', null, null, 'Yes', true); $stringpainted[] =& $this->createElement('radio', null, null, 'No', false); $this->addGroup($stringpainted, 'stringpainted', 'Render a custom string:'); $this->addElement('text', 'stringid', 'Id:', array('size' => 32)); $this->addElement('text', 'stringclass', 'CSS class:', array('size' => 32)); $this->addElement('text', 'stringvalue', 'Content:', array('size' => 32)); $stringsize['width'] =& $this->createElement('text', 'width', 'width', array('size' => 4)); $stringsize['height'] =& $this->createElement('text', 'height', 'height', array('size' => 4)); $stringsize['left'] =& $this->createElement('text', 'left', 'left', array('size' => 4)); $stringsize['top'] =& $this->createElement('text', 'top', 'top', array('size' => 4)); $stringsize['bgcolor'] =& $this->createElement('text', 'bgcolor', 'bgcolor', array('size' => 7)); $this->addGroup($stringsize, 'stringsize', 'Size, position and color:', ' '); $stringvalign[] =& $this->createElement('radio', null, null, 'Left', 'left'); $stringvalign[] =& $this->createElement('radio', null, null, 'Right', 'right'); $stringvalign[] =& $this->createElement('radio', null, null, 'Top', 'top'); $stringvalign[] =& $this->createElement('radio', null, null, 'Bottom', 'bottom'); $this->addGroup($stringvalign, 'stringvalign', 'Vertical alignment:'); $stringalign[] =& $this->createElement('radio', null, null, 'Left', 'left'); $stringalign[] =& $this->createElement('radio', null, null, 'Right', 'right'); $stringalign[] =& $this->createElement('radio', null, null, 'Center', 'center'); $this->addGroup($stringalign, 'stringalign', 'Horizontal alignment:'); $stringfont['family'] =& $this->createElement('text', 'family', 'family', array('size' => 40)); $stringfont['size'] =& $this->createElement('text', 'size', 'size', array('size' => 2)); $stringfont['color'] =& $this->createElement('text', 'color', 'color', array('size' => 7)); $this->addGroup($stringfont, 'stringfont', 'Font:', ' '); $stringweight[] =& $this->createElement('radio', null, null, 'normal', 'normal'); $stringweight[] =& $this->createElement('radio', null, null, 'Bold', 'bold'); $this->addGroup($stringweight, 'stringweight', 'Font weight:'); // Buttons of the wizard to do the job $this->buildButtons(array('apply','process')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: run demo');\r\n\r\n $this->addElement('static', 'progressBar',\r\n 'Your progress meter looks like:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('reset','process'));\r\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: main properties');\r\n\r\n $shape[] =& $this->createElement('radio', null, null, 'Horizontal', '1');\r\n $shape[] =& $this->createElement('radio', null, null, 'Vertical', '2');\r\n $this->addGroup($shape, 'shape', 'Shape:');\r\n\r\n $way[] =& $this->createElement('radio', null, null, 'Natural', 'natural');\r\n $way[] =& $this->createElement('radio', null, null, 'Reverse', 'reverse');\r\n $this->addGroup($way, 'way', 'Direction:');\r\n\r\n $autosize[] =& $this->createElement('radio', null, null, 'Yes', true);\r\n $autosize[] =& $this->createElement('radio', null, null, 'No', false);\r\n $this->addGroup($autosize, 'autosize', 'Best size:');\r\n\r\n $psize['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 4));\r\n $psize['height'] =& $this->createElement('text',\r\n 'height', 'height',\r\n array('size' => 4));\r\n $psize['left'] =& $this->createElement('text',\r\n 'left', 'left',\r\n array('size' => 4));\r\n $psize['top'] =& $this->createElement('text',\r\n 'top', 'top',\r\n array('size' => 4));\r\n $psize['position'] =& $this->createElement('text',\r\n 'position', 'position',\r\n array('disabled' => 'true'));\r\n $psize['bgcolor'] =& $this->createElement('text',\r\n 'bgcolor', 'bgcolor',\r\n array('size' => 7));\r\n $this->addGroup($psize, 'progresssize',\r\n 'Size, position and color:', ' ');\r\n\r\n $this->addElement('text', 'rAnimSpeed',\r\n array('Animation speed :',\r\n '(0-1000 ; 0:fast, 1000:slow)'));\r\n $this->addRule('rAnimSpeed',\r\n 'Should be between 0 and 1000',\r\n 'rangelength', array(0,1000), 'client');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('back','apply','process'));\r\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: border properties');\r\n\r\n $borderpainted[] =& $this->createElement('radio', null, null, 'Yes', true);\r\n $borderpainted[] =& $this->createElement('radio', null, null, 'No', false);\r\n $this->addGroup($borderpainted, 'borderpainted', 'Display the border:');\r\n\r\n $this->addElement('text', 'borderclass', 'CSS class:', array('size' => 32));\r\n\r\n $borderstyle['style'] =& $this->createElement('select',\r\n 'style', 'style',\r\n array('solid' => 'Solid',\r\n 'dashed' => 'Dashed',\r\n 'dotted' => 'Dotted',\r\n 'inset' => 'Inset',\r\n 'outset' => 'Outset'));\r\n $borderstyle['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 2));\r\n $borderstyle['color'] =& $this->createElement('text',\r\n 'color', 'color',\r\n array('size' => 7));\r\n $this->addGroup($borderstyle, 'borderstyle', null, ' ');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('apply','process'));\r\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: save PHP/CSS code');\r\n\r\n $code[] =& $this->createElement('checkbox', 'P', null, 'PHP');\r\n $code[] =& $this->createElement('checkbox', 'C', null, 'CSS');\r\n $this->addGroup($code, 'phpcss', 'PHP and/or StyleSheet source code:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('next','apply'));\r\n }", "public function buildForm()\n {\n $this\n ->addMeasureList()\n ->addAscendingList()\n ->addTitles(['class' => 'indicator_title_title_narrative', 'narrative_true' => true])\n ->addDescriptions(['class' => 'indicator_description_title_narrative'])\n ->addCollection('reference', 'Activity\\Reference', 'reference', [], trans('elementForm.reference'))\n ->addAddMoreButton('add_reference', 'reference')\n ->addBaselines()\n ->addPeriods()\n ->addAddMoreButton('add_period', 'period')\n ->addRemoveThisButton('remove_indicator');\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: cell properties');\r\n\r\n $this->addElement('text', 'cellid', 'Id mask:', array('size' => 32));\r\n $this->addElement('text', 'cellclass', 'CSS class:', array('size' => 32));\r\n\r\n $cellvalue['min'] =& $this->createElement('text',\r\n 'min', 'minimum',\r\n array('size' => 4));\r\n $cellvalue['max'] =& $this->createElement('text',\r\n 'max', 'maximum',\r\n array('size' => 4));\r\n $cellvalue['inc'] =& $this->createElement('text',\r\n 'inc', 'increment',\r\n array('size' => 4));\r\n $this->addGroup($cellvalue, 'cellvalue', 'Value:', ' ');\r\n\r\n $cellsize['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 4));\r\n $cellsize['height'] =& $this->createElement('text',\r\n 'height', 'height',\r\n array('size' => 4));\r\n $cellsize['spacing'] =& $this->createElement('text',\r\n 'spacing', 'spacing',\r\n array('size' => 2));\r\n $cellsize['count'] =& $this->createElement('text',\r\n 'count', 'count',\r\n array('size' => 2));\r\n $this->addGroup($cellsize, 'cellsize', 'Size:', ' ');\r\n\r\n $cellcolor['active'] =& $this->createElement('text',\r\n 'active', 'active',\r\n array('size' => 7));\r\n $cellcolor['inactive'] =& $this->createElement('text',\r\n 'inactive', 'inactive',\r\n array('size' => 7));\r\n $cellcolor['bgcolor'] =& $this->createElement('text',\r\n 'bgcolor', 'background',\r\n array('size' => 7));\r\n $this->addGroup($cellcolor, 'cellcolor', 'Color:', ' ');\r\n\r\n $cellfont['family'] =& $this->createElement('text',\r\n 'family', 'family',\r\n array('size' => 32));\r\n $cellfont['size'] =& $this->createElement('text',\r\n 'size', 'size',\r\n array('size' => 2));\r\n $cellfont['color'] =& $this->createElement('text',\r\n 'color', 'color',\r\n array('size' => 7));\r\n $this->addGroup($cellfont, 'cellfont', 'Font:', ' ');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('apply','process'));\r\n }", "function SLFramework_Progressbar($length=300, $height=20, $start=0, $insideText=\"\", $id=\"progressbar\") {\r\n\t\t\t$this->length = $length ; \r\n\t\t\t$this->insideText = $insideText ; \r\n\t\t\t$this->height = $height ; \r\n\t\t\t$this->start = $start ; \r\n\t\t\t$this->id = $id ; \r\n\t\t}", "function build_basic_form()\r\n {\r\n $this->addElement('select', LanguagePack :: PROPERTY_BRANCH, Translation :: get('Branch'), LanguagePack :: get_branch_options());\r\n \r\n \t$this->addElement('file', 'file', Translation :: get('FileName'));\r\n $allowed_upload_types = array('zip');\r\n $this->addRule('file', Translation :: get('OnlyZIPAllowed'), 'filetype', $allowed_upload_types);\r\n $this->addRule('file', Translation :: get('ThisFieldIsRequired', null, Utilities :: COMMON_LIBRARIES), 'required');\r\n \r\n // Submit button\r\n //$this->addElement('submit', 'user_settings', 'OK');\r\n $buttons[] = $this->createElement('style_submit_button', 'submit', Translation :: get('Import', null, Utilities :: COMMON_LIBRARIES), array('class' => 'positive'));\r\n $buttons[] = $this->createElement('style_reset_button', 'reset', Translation :: get('Reset', null, Utilities :: COMMON_LIBRARIES), array('class' => 'normal empty'));\r\n \r\n $this->addGroup($buttons, 'buttons', null, '&nbsp;', false);\r\n }", "protected function build()\n {\n $stockalign = new GtkAlignment(0, 0, 0, 0);\n $stockalign->add(\n GtkImage::new_from_stock(\n Gtk::STOCK_DIALOG_ERROR, Gtk::ICON_SIZE_DIALOG\n )\n );\n $this->pack_start($stockalign, false, true);\n\n\n $this->expander = new GtkExpander('');\n\n $this->message = new GtkLabel();\n $this->expander->set_label_widget($this->message);\n $this->message->set_selectable(true);\n $this->message->set_line_wrap(true);\n\n $this->userinfo = new GtkLabel();\n $this->userinfo->set_selectable(true);\n $this->userinfo->set_line_wrap(true);\n //FIXME: add scrolled window\n $this->expander->add($this->userinfo);\n\n $this->pack_start($this->expander);\n }", "public function form()\n\t{\n\t\tglobal $L;\n\n\t\t$html = '<div class=\"mb-3\">';\n\t\t$html .= '<label class=\"form-label\" for=\"label\">' . $L->get('Label') . '</label>';\n\t\t$html .= '<input class=\"form-control\" id=\"label\" name=\"label\" type=\"text\" value=\"' . $this->getValue('label') . '\">';\n\t\t$html .= '<div class=\"form-text\">' . $L->get('This title is almost always used in the sidebar of the site') . '</div>';\n\t\t$html .= '</div>';\n\n\t\tif (defined('BLUDIT_PRO')) {\n\t\t\t$html .= '<div class=\"mb-3\">';\n\t\t\t$html .= '<label class=\"form-label\" for=\"excludeAdmins\">' . $L->get('Exclude administrators users') . '</label>';\n\t\t\t$html .= '<select class=\"form-select\" id=\"excludeAdmins\" name=\"excludeAdmins\">';\n\t\t\t$html .= '<option value=\"true\" ' . ($this->getValue('excludeAdmins') === true ? 'selected' : '') . '>' . $L->get('Enabled') . '</option>';\n\t\t\t$html .= '<option value=\"false\" ' . ($this->getValue('excludeAdmins') === false ? 'selected' : '') . '>' . $L->get('Disabled') . '</option>';\n\t\t\t$html .= '</select>';\n\t\t\t$html .= '</div>';\n\t\t}\n\n\t\treturn $html;\n\t}", "protected function Form_Create() {\n\t\t\t$this->txtValue1 = new QTextBox($this);\n\t\t\t\n\t\t\t$this->txtValue2 = new QTextBox($this);\n\t\t\t\n\t\t\t$this->lstOperation = new QListBox($this);\n\t\t\t$this->lstOperation->AddItem('+', 'add');\n\t\t\t$this->lstOperation->AddItem('-', 'subtract');\n\t\t\t$this->lstOperation->AddItem('*', 'multiply');\n\t\t\t$this->lstOperation->AddItem('/', 'divide');\n\t\t\t\n\t\t\t$this->btnCalculate = new QButton($this);\n\t\t\t$this->btnCalculate->Text = 'Calculate';\n\t\t\t$this->btnCalculate->AddAction(new QClickEvent(), new QServerAction('btnCalculate_Click'));\n\t\t\t\n\t\t\t$this->lblResult = new QLabel($this);\n\t\t\t$this->lblResult->HtmlEntities = false;\n\t\t}", "protected function buildForm()\n {\n $this->form = Yii::createObject(array_merge([\n 'scenario' => $this->scenario,\n 'parent_id' => $this->parent_id,\n 'parentTariff' => $this->parentTariff,\n 'tariff' => $this->tariff,\n ], $this->getFormOptions()));\n }", "public function ajax_example_progressbar_callback($form, &$form_state) {\n $variable_name = 'example_progressbar_' . $form_state['time'];\n $commands = array();\n\n variable_set($variable_name, 10);\n sleep(2);\n variable_set($variable_name, 40);\n sleep(2);\n variable_set($variable_name, 70);\n sleep(2);\n variable_set($variable_name, 90);\n sleep(2);\n variable_del($variable_name);\n\n $commands[] = HtmlCommand('#progress-status', $this->t('Executed.'));\n\n return array(\n '#type' => 'ajax',\n '#commands' => $commands,\n );\n}", "private function build_form()\n {\n $ldm = LaikaDataManager :: get_instance();\n\n // The Laika Scales\n $scales = $ldm->retrieve_laika_scales(null, null, null, new ObjectTableOrder(LaikaScale :: PROPERTY_TITLE));\n $scale_options = array();\n while ($scale = $scales->next_result())\n {\n $scale_options[$scale->get_id()] = $scale->get_title();\n }\n\n // The Laika Percentile Codes\n $codes = $ldm->retrieve_percentile_codes();\n $code_options = array();\n foreach ($codes as $code)\n {\n $code_options[$code] = $code;\n }\n\n $this->addElement('category', Translation :: get('Dates'));\n $this->add_timewindow(self :: GRAPH_FILTER_START_DATE, self :: GRAPH_FILTER_END_DATE, Translation :: get('StartTimeWindow'), Translation :: get('EndTimeWindow'), false);\n $this->addElement('category');\n\n $this->addElement('category', Translation :: get('Groups', null, 'group'));\n\n $group_options = $this->get_groups();\n\n if (count($group_options) > 0)\n {\n if (count($group_options) < 10)\n {\n $count = count($group_options);\n }\n else\n {\n $count = 10;\n }\n\n $this->addElement('select', self :: GRAPH_FILTER_GROUP, Translation :: get('Group', null, Utilities::GROUP), $this->get_groups(), array('multiple', 'size' => $count));\n $this->addRule(self :: GRAPH_FILTER_GROUP, Translation :: get('ThisFieldIsRequired', null, Utilities::COMMON_LIBRARIES), 'required');\n }\n else\n {\n $this->addElement('static', 'group_text', Translation :: get('Group'), Translation :: get('NoGroupsAvailable'));\n $this->addElement('hidden', self :: GRAPH_FILTER_GROUP, null);\n }\n\n $this->addElement('category');\n\n $this->addElement('category', Translation :: get('Results'));\n $this->addElement('select', self :: GRAPH_FILTER_SCALE, Translation :: get('Scale'), $scale_options, array('multiple', 'size' => '10'));\n $this->addRule(self :: GRAPH_FILTER_SCALE, Translation :: get('ThisFieldIsRequired', null, Utilities::COMMON_LIBRARIES), 'required');\n $this->addElement('select', self :: GRAPH_FILTER_CODE, Translation :: get('Code'), $code_options, array('multiple', 'size' => '4'));\n $this->addRule(self :: GRAPH_FILTER_CODE, Translation :: get('ThisFieldIsRequired', null, Utilities::COMMON_LIBRARIES), 'required');\n $this->addElement('category');\n\n $this->addElement('category', Translation :: get('Options'));\n\n $group = array();\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_TYPE, null, Translation :: get('RenderGraphAndTable'), LaikaGraphRenderer :: RENDER_GRAPH_AND_TABLE);\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_TYPE, null, Translation :: get('RenderGraph'), LaikaGraphRenderer :: RENDER_GRAPH);\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_TYPE, null, Translation :: get('RenderTable'), LaikaGraphRenderer :: RENDER_TABLE);\n $this->addGroup($group, self :: GRAPH_FILTER_TYPE, Translation :: get('RenderType'), '<br/>', false);\n\n $allow_save = PlatformSetting :: get('allow_save', LaikaManager :: APPLICATION_NAME);\n if ($allow_save == true)\n {\n $this->addElement('checkbox', self :: GRAPH_FILTER_SAVE, Translation :: get('SaveToRepository'));\n }\n\n $maximum_attempts = PlatformSetting :: get('maximum_attempts', LaikaManager :: APPLICATION_NAME);\n if ($maximum_attempts > 1)\n {\n $group = array();\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_ATTEMPT, null, Translation :: get('OnlyIncludeFirstAttempt'), LaikaGraphRenderer :: RENDER_ATTEMPT_FIRST);\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_ATTEMPT, null, Translation :: get('OnlyIncludeMostRecentAttempt'), LaikaGraphRenderer :: RENDER_ATTEMPT_LAST);\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_ATTEMPT, null, Translation :: get('IncludeAllAttempts'), LaikaGraphRenderer :: RENDER_ATTEMPT_ALL);\n $this->addGroup($group, self :: GRAPH_FILTER_ATTEMPT, Translation :: get('AttemptsToInclude'), '<br/>', false);\n }\n else\n {\n $this->addElement('hidden', self :: GRAPH_FILTER_ATTEMPT, LaikaGraphRenderer :: RENDER_ATTEMPT_ALL);\n }\n\n $this->addElement('category');\n\n $buttons = array();\n\n $buttons[] = $this->createElement('style_submit_button', 'submit', Translation :: get('Filter', null, Utilities::COMMON_LIBRARIES), array('class' => 'normal search'));\n $buttons[] = $this->createElement('style_reset_button', 'reset', Translation :: get('Reset', null, Utilities::COMMON_LIBRARIES), array('class' => 'normal empty'));\n\n $this->addGroup($buttons, 'buttons', null, '&nbsp;', false);\n }", "public function __construct()\n {\n parent::__construct();\n \n $this->form = new BootstrapFormBuilder;\n $this->form->setFormTitle('Bootstrap Form Builder');\n \n $label1 = new TLabel('Some label', '#7D78B6', 12, 'bi');\n $label1->style='text-align:left;border-bottom:1px solid #c0c0c0;width:100%';\n \n $this->form->appendPage('Page 1');\n $this->form->addContent( [$label1] );\n \n $field1a = new TEntry('row1a');\n $field2a = new TDate('row2a');\n $field2b = new TCombo('row2b');\n $field3a = new TEntry('row3a');\n $field3b = new TEntry('row3b');\n $field3c = new TEntry('row3c');\n $field3d = new TEntry('row3d');\n $field4a = new TText('row4a');\n \n // add a row with 2 slots\n $this->form->addFields( [ new TLabel('Row 1') ],\n [ $field1a ] );\n \n // add a row with 2 slots\n $this->form->addFields( [ new TLabel('Row 2') ],\n [ $field2a, $field2b ] );\n \n // add a row with 4 slots\n $this->form->addFields( [ new TLabel('Row 3') ],\n [ $field3a, $field3b ],\n [ new TLabel('Label') ],\n [ $field3c, $field3d ] );\n \n $field2b->addItems( ['1' => 'One', '2' => 'Two'] );\n \n $field1a->setSize('70%');\n $field2a->setSize('120');\n $field2b->setSize('75%');\n \n $field3a->setSize('50%');\n $field3b->setSize('50%');\n $field3c->setSize('50%');\n $field3d->setSize('50%');\n \n $this->form->appendPage('Page 2');\n \n $label2 = new TLabel('Another label', '#7D78B6', 12, 'bi');\n $label2->style='text-align:left;border-bottom:1px solid #c0c0c0;width:100%';\n \n $this->form->addContent( [$label2] );\n $this->form->addFields( [new TLabel('Row 4')], [$field4a ]);\n $field4a->setSize('100%', 100);\n \n $this->form->addAction('Send', new TAction(array($this, 'onSend')), 'fa:check-circle-o green');\n \n // wrap the page content using vertical box\n $vbox = new TVBox;\n $vbox->add(new TXMLBreadCrumb('menu.xml', __CLASS__));\n $vbox->add($this->form);\n\n parent::add($this->form);\n }", "public function buildForm()\n {\n }", "private function build_label_field($_meta, $_ptype, $_class = \"\", $_index, $_cloneable = \"\" ) {\r\n $_meta[\"message\"] = isset($_meta[\"message\"]) ? $_meta[\"message\"] : \"\";\r\n $_meta[\"message_type\"] = isset($_meta[\"message_type\"]) ? $_meta[\"message_type\"] : \"info\";\r\n \r\n /* Is init field show or hide */\r\n $onload_field = (isset($_meta[\"initial_show\"]) && $_meta[\"initial_show\"] == \"no\" ) ? \"display: none;\" : \"\";\r\n if ($_meta[\"message\"] != \"\") {\r\n $html = '<div style=\"'.$onload_field.'\" data-labelfield=\"'.$_meta[\"key\"].'\" data-fkey=\"'. $_meta[\"key\"] .'\" class=\"wcff-label wccpf_fields_table' . $_class . ' wcff-label-' . $_meta[\"message_type\"] . '\" '.$_cloneable.'>' . html_entity_decode($_meta[\"message\"]) . '<input type=\"hidden\" name=\"' . esc_attr($_meta[\"key\"] . $_index) . '\"></div>';\r\n if($_ptype == \"wcccf\"){\r\n $html = $this->built_field_wrapper($html, $_meta, $_ptype, $_index);\r\n }\r\n return $html;\r\n }\r\n return \"\";\r\n }", "public function lblBatchLabel_Create($strControlId = null) {\n\t\t\t$this->lblBatchLabel = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblBatchLabel->Name = QApplication::Translate('Batch Label');\n\t\t\t$this->lblBatchLabel->Text = $this->objStewardshipBatch->BatchLabel;\n\t\t\t$this->lblBatchLabel->Required = true;\n\t\t\treturn $this->lblBatchLabel;\n\t\t}", "function buildSettingsForm() {}", "function buildForm(){\n\t\t# menampilkan form\n\t}", "public function init(){\n\t\t\n\t\tparent::init();\n\t\t\n\t\t$this->_html .= $this->get_label();\n\t\t\n\t\t$this->_html .= '<input type=\"submit\" ';\n\t\t\n\t\tif(isset($this->_options['id'])){\n\t\t\t$this->_html .= 'id=\"'.$this->_options['id'].'\" ';\n\t\t}\n\t\t\n\t\tif(isset($this->_options['class'])){\n\t\t\t$this->_html .= 'class=\"'.$this->_options['class'].'\" ';\n\t\t}\n\t\t\n\t\tif(isset($this->_options['value'])){\n\t\t\t$this->_html .= 'value=\"'.$this->_options['value'].'\" ';\n\t\t}\t\n\t\t\n\t\tif(isset($this->_options['name'])){\n\t\t\t$this->_html .= 'name=\"'.esc_attr($this->_options['name']).'\" ';\n\t\t}\t\t\t\t\t\t\t\t\t\t\n\t\t\n\t\t$this->_html .= ' />';\n\t}", "public function buildForm()\n {\n $this\n ->addNarrative('location_description_narrative')\n ->addAddMoreButton('add', 'location_description_narrative');\n }", "public function buildForm(array $form, FormStateInterface $form_state) {\n $form['time_duration'] = [\n '#type' => 'number',\n '#title' => $this->t('Time duration'),\n '#min' => 100,\n '#step' => 100,\n '#description' => $this->t(\n \"Time in seconds from the user's last login. Used as an event to \n update the relationships between the user and companies.\"\n ),\n '#default_value' => $this->config('pmmi_sso.company.settings')->get('time_duration'),\n '#required' => TRUE,\n ];\n $form['submit'] = [\n '#type' => 'submit',\n '#value' => $this->t('Save'),\n ];\n return $form;\n }", "public function form()\n {\n $this->switch('auto_df_switch', __('message.tikuanconfig.auto_df_switch'));\n $this->timeRange('auto_df_stime', 'auto_df_etime', '开启时间');\n $this->text('auto_df_maxmoney', __('message.tikuanconfig.auto_df_maxmoney'))->setWidth(2);\n $this->text('auto_df_max_count', __('message.tikuanconfig.auto_df_max_count'))->setWidth(2);\n $this->text('auto_df_max_sum', __('message.tikuanconfig.auto_df_max_sum'))->setWidth(2);\n\n }", "function __construct() {\n $this->label = __( 'Future Past', 'fwp' );\n }", "protected function createComponentTarifForm()\r\n\t{\r\n\t\t$form = new Form;\r\n\t\t$form->addText('name', 'Jméno:')\r\n\t\t\t->setRequired('Zadej jméno.');\r\n\r\n\t\t$form->addText('apicode', 'API Code:');\r\n\r\n\t\t$form->addText('price', 'Cena:')\r\n\t\t ->addRule(Form::INTEGER, 'Cena musí být číslo')\r\n\t\t\t->setRequired('Zadej cenu.');\r\n\t\t\r\n\t\t$form->addText('description', 'Popis:');\r\n\t\t\t\r\n\t\t$form->addSubmit('save', 'Uložit')\r\n\t\t\t->setAttribute('class', 'default')\r\n\t\t\t->onClick[] = $this->tarifFormSucceeded;\r\n\r\n\t\t$form->addSubmit('cancel', 'Cancel')\r\n\t\t\t->setValidationScope(NULL)\r\n\t\t\t->onClick[] = $this->formCancelled;\r\n\r\n\t\t$form->addProtection();\r\n\t\treturn $form;\r\n\t}", "protected function buildValueLabel() : string\n {\n // if min is negative it can be longer than the max value...\n $iLen = (strlen((string)$this->iMin) > strlen((string)$this->iMax)) ? strlen((string)$this->iMin) : strlen((string)$this->iMax);\n\n $strHTML = '<label class=\"slider_label\"';\n $strHTML .= ' for=\"' . $this->strID . '\"';\n $strHTML .= ' style=\"width: ' . $iLen . 'em;';\n if ($this->oFlags->isSet(FormFlags::ALIGN_RIGHT)) {\n $strHTML .= ' text-align: right;';\n }\n $strHTML .= '\">';\n $strHTML .= $this->iValue;\n $strHTML .= '</label>' . PHP_EOL;\n\n return $strHTML;\n }", "public function beginLabelSheet ()\r\n {\r\n $this->label_column = 1;\r\n $this->label_row = 1;\r\n return '\r\n <div class=\"labelpage\">\r\n <div class=\"labelrow\">\r\n <div class=\"labelbody\">';\r\n }", "function icu_drush_print_progress($label, $current=NULL, $range=NULL) {\n static $green = \"\\033[1;32m\";\n static $white = \"\\033[0;37m\";\n\n if (is_null($current)) {\n $output = $green . \"Progress: $label \\n\";\n print $output;\n return;\n }\n\n $ratio = ($current+1) / $range;\n $percentage = floor($ratio * 100) . '%';\n $columns = drush_get_context('DRUSH_COLUMNS', 80);\n // Subtract 10 characters for the percentage, brackets, spaces and arrow.\n $progress_columns = $columns - 10;\n // If ratio is 1 (complete), the > becomes a = to make a full bar.\n $arrow = ($ratio < 1) ? '>' : '=';\n // Print a new line if ratio is 1 (complete). Otherwise, use a CR.\n $line_ending = ($ratio < 1) ? \"\\r\" : \"\\n\";\n\n // Determine the current length of the progress string.\n $current_length = floor($ratio * $progress_columns);\n $progress_string = str_pad('', $current_length, \"=\");\n\n $output = $green . '[';\n $output .= $progress_string . $arrow;\n $output .= str_pad('', $progress_columns - $current_length);\n $output .= ']';\n $output .= str_pad('', 5 - strlen($percentage)) . $percentage;\n $output .= $line_ending . $white;\n\n print $output;\n}", "public function lblParMotorTorque_Create($strControlId = null) {\n\t\t\t$this->lblParMotorTorque = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblParMotorTorque->Name = QApplication::Translate('Par Motor Torque');\n\t\t\t$this->lblParMotorTorque->Text = $this->objFichas->ParMotorTorque;\n\t\t\treturn $this->lblParMotorTorque;\n\t\t}", "protected function form()\n {\n $form = new Form(new Activity());\n\n $form->text('name', __('Name'));\n $form->image('image', __('Image'));\n $form->text('intro', __('Intro'));\n $form->UEditor('details', __('Details'));\n $form->datetime('start_at', __('Start at'))->default(date('Y-m-d H:i:s'));\n $form->datetime('end_at', __('End at'))->default(date('Y-m-d H:i:s'));\n $form->text('location', __('Location'));\n $form->decimal('fee', __('Fee'))->default(0.00);\n $form->number('involves', __('Involves'));\n $form->number('involves_min', __('Involves min'));\n $form->number('involves_max', __('Involves max'));\n $form->switch('status', __('Status'));\n $form->text('organizers', __('Organizers'));\n $form->number('views', __('Views'));\n $form->switch('is_stick', __('Is stick'));\n\n return $form;\n }", "public function buildForm()\n {\n $this->add('organization_identifier_code', 'text', ['label' => trans('elementForm.organisation_identifier_code')])\n ->add('provider_activity_id', 'text', ['label' => trans('elementForm.provider_activity_id')])\n ->addSelect('type', $this->getCodeList('OrganisationType', 'Activity'), trans('elementForm.type'), $this->addHelpText('Activity_ParticipatingOrg-type'))\n ->addNarrative('provider_org_narrative')\n ->addAddMoreButton('add_provider_org_narrative', 'provider_org_narrative');\n }", "protected function initializeForm()\n {\n $this->form = new Form();\n $this->form->add(Element::create(\"FieldSet\",\"Report Format\")->add\n (\n Element::create(\"SelectionList\", \"File Format\", \"report_format\")\n ->addOption(\"Hypertext Markup Language (HTML)\",\"html\")\n ->addOption(\"Portable Document Format (PDF)\",\"pdf\")\n ->addOption(\"Microsoft Excel (XLS)\",\"xls\")\n ->addOption(\"Microsoft Word (DOC)\",\"doc\")\n ->setRequired(true)\n ->setValue(\"pdf\"),\n Element::create(\"SelectionList\", \"Page Orientation\", \"page_orientation\")\n ->addOption(\"Landscape\", \"L\")\n ->addOption(\"Portrait\", \"P\")\n ->setValue(\"L\"),\n Element::create(\"SelectionList\", \"Paper Size\", \"paper_size\")\n ->addOption(\"A4\", \"A4\")\n ->addOption(\"A3\", \"A3\")\n ->setValue(\"A4\")\n )->setId(\"report_formats\")->addAttribute(\"style\",\"width:50%\")\n );\n $this->form->setSubmitValue(\"Generate\");\n $this->form->addAttribute(\"action\",Application::getLink($this->path.\"/generate\"));\n $this->form->addAttribute(\"target\",\"blank\");\n }", "function __construct()\n {\n parent::__construct();\n \n // creates the form\n $this->form = new TQuickForm('form_historicotrabalho');\n $this->form->class = 'tform'; // change CSS class\n \n $this->form->style = 'display: table;width:100%'; // change style\n \n // Define Título da página\n $this->form->setFormTitle('Banco de Horas - Lançamento de Escalas');\n // Inicía ferramentas auxiliares\n $fer = new TFerramentas(); // Ferramentas diversas\n $sicad = new TSicadDados(); // Ferramentas de acesso ao SICAD\n //Realiza definições iniciais de acesso\n $profile = TSession::getValue('profile'); //Profile da Conta do usuário\n if ($this->opm_operador==false) //Carrega OPM do usuário\n {\n //Confere se já foi carregado a OPM, senão carrega...ou se o ambiente for de desenvolvimento usa a OPM = 140\n $this->opm_operador = ($fer->is_dev()==true) ? 140 : $profile['unidade']['id'];\n }\n if (!$this->nivel_sistema || $this->config_load == false) //Carrega OPMs que tem acesso\n {\n $this->nivel_sistema = $fer->getnivel (get_class($this));//Verifica qual nível de acesso do usuário\n $this->listas = $sicad->get_OpmsRegiao($this->opm_operador);//Carregas as OPMs que o usuário administra\n $this->config = $fer->getConfig($this->sistema); //Busca o Nível de acesso que o usuário tem para a Classe\n $this->config_load = true; //Informa que configuração foi carregada\n }\n \n // Cria os Itens do Formulário\n $rgmilitar = new TEntry('rgmilitar');\n \n //Monta ComboBox com OPMs que o Operador pode ver\n //echo $this->nivel_sistema.'---'.$this->opm_operador;\n if ($this->nivel_sistema>=80) //Adm e Gestor\n {\n $criteria = null;\n }\n else if ($this->nivel_sistema>=50 ) //Nível Operador (carrega OPM e subOPMs)\n {\n $criteria = new TCriteria;\n //Se não há lista de OPM, carrega só a OPM do usuário\n $lista = ($this->listas['valores']!='') ? $this->listas['valores'] : $profile['unidade']['id'];\n $query = \"(SELECT DISTINCT id FROM g_geral.opm WHERE id IN (\".$lista.\"))\";\n $criteria->add (new TFilter ('id','IN',$query));\n }\n else if ($this->nivel_sistema<50) //nível de visitante (só a própria OPM)\n {\n $criteria = new TCriteria;\n $query = \"(SELECT DISTINCT id FROM g_geral.opm WHERE id IN (\".$this->opm_operador.\"))\";\n $criteria->add (new TFilter ('id','IN',$query));\n }\n $opm = new TDBCombo('opm','sicad','OPM','id','nome','nome',$criteria);\n \n $ativo = new TCombo('ativo');\n $lista_opm = new TSelect('lista_opm');\n $lista_slc = new TSelect('lista_slc');\n //Critério para os Turnos de Serviço (Deve-se excluir os ocultos e o item id=13)\n $criteria = new TCriteria; \n $criteria->add(new TFilter('oculto', '=', 'f'));\n $criteria->add(new TFilter('id', '!=', 13));\n $turno = new TDBCombo('turno','sicad','turnos','id','nome','nome',$criteria);\n \n $datainicial = new TDate('dataInicial');\n $datafinal = new TDate('dataFinal');\n $horaIncialOrdinario = new TEntry('horaInicialOrdinario');\n $opm_id_info = new TDBCombo('opm_id_info','sicad','OPM','id','sigla','sigla');\n $opm_info_atual = new TCombo('OPM_info_Atual');\n $diasExtra = new TEntry('diasExtra');\n $mesExtra = new TCombo('mesExtra');\n $anoExtra = new TCombo('anoExtra');\n $horaInicioExtra = new TEntry('horaInicioExtra');\n $horasTrabalhadas = new TEntry('horasTrabalhadas');\n $tipoExtra = new TCombo('tipoExtra');\n $afasta_id = new TDBCombo('afasta_id','sicad','afastamentos','id','nome','nome');\n $dtinicioaf = new TDate('dtinicioaf');\n $dtfimaf = new TDate('dtfimaf');\n $bgaf = new TEntry('bgaf');\n $anobgaf = new TEntry('anobgaf');\n \n //Formatar Itens\n $rgmilitar->setSize(80);\n $opm->setSize(300);\n $lista_opm->setSize(280,256);\n $lista_slc->setSize(280,256);\n $turno->setSize(200);\n $datainicial->setSize(80);\n $datafinal->setSize(80);\n $horaIncialOrdinario->setSize(50);\n $opm_id_info->setSize(150);\n $opm_info_atual->setSize(80);\n $diasExtra->setSize(200);\n $mesExtra->setSize(80);\n $anoExtra->setSize(80);\n $horaInicioExtra->setSize(50);\n $horasTrabalhadas->setSize(50);\n $tipoExtra->setSize(120);\n $afasta_id->setSize(150);\n $dtinicioaf->setSize(80);\n $dtfimaf->setSize(80);\n $bgaf->setSize(80);\n $anobgaf->setSize(80);\n $ativo->setSize(80);\n //Style\n $lista_opm->style = \"font-size: 12px;\";\n $lista_slc->style = \"font-size: 12px;\";\n\n //Mascaras\n $datainicial->setMask('dd-mm-yyyy');\n $datafinal->setMask('dd-mm-yyyy');\n $dtinicioaf->setMask('dd-mm-yyyy');\n $dtfimaf->setMask('dd-mm-yyyy');\n $horaIncialOrdinario->setMask('99:99');\n $horaInicioExtra->setMask('99:99');\n $horasTrabalhadas->setMask('99');\n\n //Dados\n $opm_info_atual->addItems($fer->lista_sim_nao());//($item);\n $opm_info_atual->setValue('N');\n $ativo->addItems($fer->lista_sim_nao());//($item);\n $ativo->setValue('N');\n //\n $item = array (\"S\"=>\"Remunerada\",\"N\"=>\"Administrativa\");\n $tipoExtra->addItems($item);\n $tipoExtra->setValue('N');\n //\n $fer = new TFerramentas;\n $mesExtra->addItems($fer->lista_meses());\n $anoExtra->addItems($fer->lista_anos());\n //Tips\n $rgmilitar->setTip('Preencha com o RG do Militar pretendido...');\n $opm->setTip('Selecione a OPM para que possa preencher o campo de Lista da OPM com os componentes da Unidade.');\n $lista_opm->setTip('Lista dos Militares pertencente à Unidade Selecionada acima.<br>'.\n 'Vale lembrar que esta lista é atualizada diáriamente, assim os que estão aqui reflete as listas do SICAD.<br>' .\n 'Outro ponto a se considerar é a possibilidade de selecionar vários PMs, para isso basta usar<br>'.\n 'as teclas Control (ctrl) ou shift (seta pra cima);');\n $lista_slc->setTip('Militares Selecionados. Todos que estão nesta lista serão afetados, quer por uma escala ou por afastamentos...');\n $turno->setTip('Selecione uma Escala conforme a necessidade.');\n $datainicial->setTip('Selecione a data inicial da Escala Ordinária.');\n $datafinal->setTip('Selecione a data final da Escala Ordinária');\n $horaIncialOrdinario->setTip('Informe a hora de inicio do primeiro turno da Escala Ordinária.');\n $opm_id_info->setTip('Selecione qual foi a OPM informante da Escala.<br>É útil quando o militar está prestando serviços em uma OPM diferente da sua.');\n $opm_info_atual->setTip('A unidade Informante é a Unidade Atual? Se SIM, irei substituir a unidade que por ventura está na ficha do militar pela que foi informada...');\n $diasExtra->setTip('Defina os dias que o militar trabalhou podendo ser:<br> - Um dia apenas (Ex: 1);<br>- Alguns dias separados por vírgula(Ex: 2,5,8);<br>- Um intervalo de dias ligados por traço (Ex: 2-10);<br>- Um misto de combinações (Ex: 1,3-5,8,15-25). ');\n $mesExtra->setTip('Mês que ocorreu o serviço extra.');\n $anoExtra->setTip('Ano que ocorreu o serviço extra.');\n $horaInicioExtra->setTip('Hora que o serviço extra iniciou.');\n $horasTrabalhadas->setTip('Quantas horas foram trabalhadas neste serviço extra.');\n $tipoExtra->setTip('Defina se a escala foi Administrativa (sem remuneração AC-4) ou Remunerada (com pagamento de AC-4).');\n $afasta_id->setTip('Qual tipo de afastamento o militar fez jus.');\n $dtinicioaf->setTip('Data inicial do afastamento.');\n $dtfimaf->setTip('Data final do afastamento.');\n $bgaf->setTip('Numero do BG onde foi publicado o afastamento(Opcional).');\n $anobgaf->setTip('Ano de publicação do BG de Afastamento (Opcional).');\n $ativo->setTip('Se desejar que os militares inativos façam parte da seleção, marque como SIM para seleciona-los.'.\n '<br>Caso troque esta opção, não haverá a limpeza dos já selecionados.');\n //Ações\n //$change_action = new TAction(array($this, 'onSelectOpm_old'));//Ação de Popular lista de PMs\n //$opm->setChangeAction($change_action);\n //$ativo->setChangeAction($change_action);\n \n //Controle de Nível\n if ($this->nivel_sistema<$this->config[$this->cfg_chg_opm])\n {\n $opm_id_info->setEditable(FALSE);\n $opm_info_atual->setEditable(FALSE);\n }\n //Botões\n //Seleciona PMs\n $addPM = new TButton('addPM');\n $addPM->setImage('fa:arrow-down black');\n $addPM->class = 'btn btn-primary btn-sm';\n $Action = new TAction(array($this, 'onSelectMilitar'));\n $addPM->setAction($Action);\n $addPM->setLabel('Seleciona');\n \n //Botão Gera Escala Ordinária\n $runOrd = new TButton('runOrd');\n $runOrd->setImage('fa:floppy-o red');\n $runOrd->class = 'btn btn-primary btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_ord]) ? new TAction(array($this, 'onGeraOrdinaria')) : new TAction(array($this, 'NoAcess'));\n $runOrd->setAction($Action);\n $runOrd->setLabel('Gera Escala');\n \n //Botão Gera Escala Extra\n $runExt = new TButton('runExt');\n $runExt->setImage('fa:floppy-o red');\n $runExt->class = 'btn btn-primary btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_ext]) ? new TAction(array($this, 'onGeraExtra')) : new TAction(array($this, 'NoAcess'));\n $runExt->setAction($Action);\n $runExt->setLabel('Gera Escala');\n \n //Botão Gera Afastamento\n $runAfa = new TButton('runAfa');\n $runAfa->setImage('fa:floppy-o red');\n $runAfa->class = 'btn btn-primary btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_afa]) ? new TAction(array($this, 'onGeraAfastamento')) : new TAction(array($this, 'NoAcess'));\n $runAfa->setAction($Action);\n $runAfa->setLabel('Gera Afastamento');\n \n //Botão Limpa Afastamento\n $runCls = new TButton('runCls');\n $runCls->setImage('fa:trash black');\n $runCls->class = 'btn btn-danger btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_cls_afa]) ? new TAction(array($this, 'onLimpaAfastamento')) : new TAction(array($this, 'NoAcess'));\n $runCls->setAction($Action);\n $runCls->setLabel('Limpa Afastamento');\n \n //Botão Verifica Escala\n $runVer = new TButton('runVer');\n $runVer->setImage('fa:eye black');\n $runVer->class = 'btn btn-info btn-sm';\n $Action = new TAction(array($this, 'onListaEscala'));\n $runVer->setAction($Action);\n $runVer->setLabel('Ver Escala');\n \n //Botão limpa Escalas\n $runLmp = new TButton('runLmp');\n $runLmp->setImage('fa:trash black');\n $runLmp->class = 'btn btn-danger btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_cls_esc]) ? new TAction(array($this, 'onLimpaEscala')) : new TAction(array($this, 'NoAcess'));\n $runLmp->setAction($Action);\n $runLmp->setLabel('Limpa Escala');\n \n //Botão Carrega OPM na Lista da OPM\n $runOpm = new TButton('runOpm');\n $runOpm->setImage('fa:retweet');\n $runOpm->class = 'btn btn-success btn-sm';\n $Action = new TAction(array($this, 'onSelectOpm_old'));\n $runOpm->setAction($Action);\n $runOpm->setLabel('Carrega OPM');\n \n $table = new TTable();\n $table-> border = '0';\n $table-> cellpadding = '4';\n $table-> style = 'border-collapse:collapse; text-align: center;';\n\n //Monta selecionador\n $hbox1 = new THBox;\n $hbox1->addRowSet( new TLabel('RG:'),$rgmilitar,$addPM,new TLabel('Unidade:'),$opm,new TLabel('Seleciona Inativos?'),$ativo,$runOpm);\n $frame1 = new TFrame;\n $frame1->setLegend('Selecione os PMs ou a OPM');\n $frame1->add($hbox1);\n //Monta Labels das tabelas de distribuição\n $title4 = new TLabel('Listagem da OPM');\n $title4->setFontSize(12);\n $title4->setFontFace('Arial');\n $title4->setFontColor('black');\n $title4->setFontStyle('b');\n \n $title3 = new TLabel('Comandos');\n $title3->setFontSize(12);\n $title3->setFontFace('Arial');\n $title3->setFontColor('black');\n $title3->setFontStyle('b');\n \n $title2 = new TLabel('PMs Selecionados');\n $title2->setFontSize(12);\n $title2->setFontFace('Arial');\n $title2->setFontColor('black');\n $title2->setFontStyle('b');\n \n $title1 = new TLabel('Gestão da Escala');\n $title1->setFontSize(12);\n $title1->setFontFace('Arial');\n $title1->setFontColor('black');\n $title1->setFontStyle('b');\n \n //Botões de Serviço\n $add = new TButton('add_opm');\n $del = new TButton('del_opm');\n $cls = new TButton('clear');\n $ret = new TButton('return');\n \n //Tabelas Auxiliares de Cadastro\n $table_ord = new TTable;//Escalas Ordinárias\n $table_ext = new TTable;//Escalas Extras\n $table_afa = new TTable;//Afastamentos\n\n //Cria no Notebook \n $notebook = new TNotebook(200, 220);\n // Crias as Abas no notebook\n $notebook->appendPage('Ordinária' , $table_ord);\n $notebook->appendPage('Extra' , $table_ext);\n $notebook->appendPage('Afastamento', $table_afa);\n\n //Itens: Escala Ordinária\n $table_ord->addRowSet(array(new TLabel('Escala'),$turno));\n $table_ord->addRowSet(array(new TLabel('De'),$datainicial,new TLabel('A'),$datafinal));\n $table_ord->addRowSet(array(new TLabel('Hora Inicial'),$horaIncialOrdinario));\n $table_ord->addRowSet(array(new TLabel('OPM Informante'),$opm_id_info));\n $table_ord->addRowSet(array(new TLabel('Usar Informante com Atual'),$opm_info_atual));\n $table_ord->addRowSet(array($runLmp,$runOrd));\n //Itens: Escala Extra\n $table_ext->addRowSet(array(new TLabel('Dias'),$diasExtra));\n $table_ext->addRowSet(array(new TLabel('Mês'),$mesExtra,new TLabel('Ano'),$anoExtra));\n $table_ext->addRowSet(array(new TLabel('Hr Início'),$horaInicioExtra,new TLabel('Hrs. Trab.'),$horasTrabalhadas));\n $table_ext->addRowSet(array(new TLabel('Tipo Escala'),$tipoExtra));\n $table_ext->addRowSet($runExt);\n //Itens: Afastamento\n $table_afa->addRowSet(array(new TLabel('Afastamento'),$afasta_id));\n $table_afa->addRowSet(array(new TLabel('De'),$dtinicioaf,new TLabel('A'),$dtfimaf));\n $table_afa->addRowSet(array(new TLabel('BG'),$bgaf,new TLabel('/'),$anobgaf));\n $table_afa->addRowSet(array($runCls,$runAfa));\n\n //Ações\n $add->setAction(new TAction(array($this, 'onAddPMSelect')));\n $del->setAction(new TAction(array($this, 'onDelPMSelect')));\n $cls->setAction(new TAction(array($this, 'onClearSelect')));\n $ret->setAction(new TAction(array($this, 'onReturn')));\n //Labels\n $add->setLabel('Adiciona');\n $del->setLabel('Remove');\n $cls->setLabel('Limpa');\n $ret->setLabel('Volta ao Gerenciador');\n //Icones\n $add->setImage('fa:plus green');\n $del->setImage('fa:minus red');\n $cls->setImage('fa:file-o black');\n $ret->setImage('fa:backward black');\n //Classes\n $ret->class = 'btn btn-warning';\n //PopUps\n if ($this->popAtivo)\n {\n $addPM->popover = 'true';\n $addPM->popside = 'top';\n $addPM->poptitle = 'Seleciona Militar';\n $addPM->popcontent = 'Clique aqui ou tecle ENTER para selecionar o militar.';\n //\n $add->popover = 'true';\n $add->popside = 'top';\n $add->poptitle = 'Adiciona Seleção de Militares';\n $add->popcontent = 'Adiciona o(s) Militar(es) selecionado(s) da caixa Lista da OPM.';\n //\n $del->popover = 'true';\n $del->popside = 'top';\n $del->poptitle = 'Remove Seleção de Militares';\n $del->popcontent = 'Remove o(s) Militar(es) selecionado(s) da caixa Selecionados.';\n //\n $cls->popover = 'true';\n $cls->popside = 'top';\n $cls->poptitle = 'Limpa toda Seleção de Militares';\n $cls->popcontent = 'Remove TODOS os Militares selecionados da caixa Selecionados.';\n //\n $ret->popover = 'true';\n $ret->popside = 'top';\n $ret->poptitle = 'Retorno à Tela de Gerenciamento';\n $ret->popcontent = 'Retorna para a Tela de Gerenciamento do Banco de Horas.<br>A lista e Militares já selecionados permanecerá até o fechamento do sistema.';\n //\n $runOrd->popover = 'true';\n $runOrd->popside = 'top';\n $runOrd->poptitle = 'Gera Escala Ordinária.';\n $runOrd->popcontent = 'São campos necessários:<br>- Turno;<br>- Data inicial e final;<br>- Hora de Início da Escala.';//.\n //\n $runExt->popover = 'true';\n $runExt->popside = 'top';\n $runExt->poptitle = 'Gera Escala Extra';\n $runExt->popcontent = 'São Campos necessários:<br>- Dias (preencher com um ou mais);<br>- Mês e Ano;<br>- Hora Início;<br>'.\n '- Horas Trabalhadas;<br>- Tipo Escala.';\n //\n $runCls->popover = 'true';\n $runCls->popside = 'top';\n $runCls->poptitle = 'Limpa Afastamentos e Restrições (apenas)';\n $runCls->popcontent = 'Use os campos acima como filtro.';\n //\n $runAfa->popover = 'true';\n $runAfa->popside = 'top';\n $runAfa->poptitle = 'Gera Afastamentos e Restrições';\n $runAfa->popcontent = 'São Campos necessários:<br>- Afastamento;<br>- O intervalo de datas.';\n //\n $runVer->popover = 'true';\n $runVer->popside = 'top';\n $runVer->poptitle = 'Verifica a Escala';\n $runVer->popcontent = 'É necessário escolher um militar (um apenas) quer no Campo Lista da OPM quer no Campo Selecionados.';\n //\n $runLmp->popover = 'true';\n $runLmp->popside = 'top';\n $runLmp->poptitle = 'Limpa as Escalas e Afastamentos';\n $runLmp->popcontent = 'Limpa Escalas (ordinária e Extra) e Afastamentos dos militares Selecionados e no intervalo de datas';\n \n $runOpm->popover = 'true';\n $runOpm->popside = 'top';\n $runOpm->poptitle = 'Carrega os militares da Unidade';\n $runOpm->popcontent = 'Carrega os Militares da unidade escolhida filtrando os ativos e inativos conforme se escolhe Sim ou Não no campo Seleciona inativos:';\n }\n //Tabela com Comandos\n $frame_tempo = new TFrame();\n $hboxc = new THBox;\n $hboxc->addRowSet($add);\n $hboxc->addRowSet($del);\n $hboxc->addRowSet($cls);\n $hboxc->addRowSet($runVer);\n $hboxc->addRowSet($ret);\n\n $frame1->add($hboxc);\n $frame1->style = \"width: 100%; display: table-cell; vertical-align: top; text-align: center;\";\n\n //Frame com Lista da OPM\n $vbox2 = new TVBox;\n $frame4 = new TFrame(260,330);\n $frame4->setLegend('Lista de Militares da OPM');\n $frame4->add($lista_opm);\n $frame4->style = \"width: 280px; display: table-cell; vertical-align: top;\";\n $vbox2->add($frame4);\n //Frame de Seleção\n $vbox4 = new TVBox;\n $frame6 = new TFrame(260,330);\n $frame6->setLegend('Militares Selecionados');\n $frame6->add($lista_slc);\n $frame6->style = \"width: 280px; display: table-cell; vertical-align: top;\";\n $vbox4->add($frame6);\n //Frame de Geração\n $vbox5 = new TVBox;\n $frame3 = new TFrame(280,330);\n $frame3->setLegend('Funções de Geração');\n $frame3->add($notebook);\n $frame3->style = \"width: 280px; display: table-cell; vertical-align: top;\";\n $vbox5->add($frame3);\n \n $frame2 = new TFrame;\n $frame2->style = \"width: 100%; display: table-cell; vertical-align: top;\";\n $frame2->add($vbox2);\n $frame2->add($vbox4);\n $frame2->add($vbox5);\n\n $this->form->setFields(array($rgmilitar,$opm,$addPM,$lista_opm,$lista_slc,$opm_info_atual,$opm_id_info,$turno,\n $datafinal,$datainicial,$dtinicioaf,$dtfimaf,$horaIncialOrdinario,$horaInicioExtra,$horasTrabalhadas,\n $diasExtra,$mesExtra,$anoExtra,$bgaf,$anobgaf,$tipoExtra,$afasta_id,$ativo,\n $add,$del,$cls,$ret,$runOrd,$runExt,$runAfa,$runCls,$runVer,$runLmp,$runOpm)); \n // vertical box container\n $container = new TVBox;\n $container->style = 'width: 90%';\n $container->add(new TXMLBreadCrumb('menu.xml', 'bdhManagerForm'));\n $container->add($frame1);\n //$container->add($frame_tempo);\n $container->add($frame2);\n $this->form->add($container);\n\n //parent::add($container);\n parent::add($this->form);\n if ($opm->getValue())\n {\n self::onSelectOpm_old(array('opm'=>$opm->getValue(),'ativo'=>$ativo->getValue()));\n }\n $lista_slc = TSession::getValue(__CLASS__.'_lista_slc');\n self::onLoadPMSelect();\n self::popula_escalas();\n\n }", "protected function form()\n {\n $form = new Form(new Direction());\n\n $form->text('name', __(trans('hhx.name')));\n $form->text('intro', __(trans('hhx.intro')));\n $form->image('Img', __(trans('hhx.img')))->move('daily/direction')->uniqueName();\n $form->select('status', __(trans('hhx.status')))->options(config('hhx.status'));;\n $form->number('order_num', __(trans('hhx.order_num')));\n $form->hidden('all_num', __(trans('hhx.all_num')))->default(0.00);\n $form->decimal('stock', __(trans('hhx.stock')));\n\n return $form;\n }", "public function __construct( string $label, string $for ) {\n\t\t$this->label = $label;\n\t\t$this->for = $for;\n\t}", "protected function createLabel($config)\n {\n $tmpl = $this->getOptionalTemplate(\n $config,\n ARCH_PATH.'/theme/form/label.php'\n );\n $config['label'] = empty($config['label']) ? '' : $config['label'];\n return new \\Arch\\Registry\\View($tmpl, $config);\n }", "public function createComponentAddTaskForm() {\r\n $form = new UI\\Form;\r\n\r\n $form->getElementPrototype()->novalidate = 'novalidate';\r\n\r\n $form->addText('name', 'Task name:')\r\n ->setRequired('Please provide a task name.');\r\n\r\n $form->addTextArea('description', 'Description:');\r\n\r\n $form->addText('date', 'Deadline')->setOption('description', 'Use format: YYYY-MM-DD')\r\n ->addCondition(UI\\Form::FILLED)\r\n ->addRule(UI\\Form::PATTERN, 'Může být v rozmezí 2011-01-01 až 2019-12-31', '^(20)\\d\\d[- /.](0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])$');\r\n\r\n\r\n\r\n $form->addRadioList('priority', 'Priority', array(\r\n '1' => '1',\r\n '2' => '2',\r\n '3' => '3',\r\n ));\r\n\r\n $result = dibi::query('SELECT idcategory, name FROM `categories` WHERE iduser = %i', $this->getUser()->getId())->fetchPairs('idcategory', 'name');\r\n\r\n $form->addRadioList('category', 'Category', $result)\r\n ->setRequired('Please select category.')\r\n ->setDefaultValue($this->getParam('id'));\r\n\r\n $form->addSubmit('addtask', 'Add Task');\r\n\r\n $form->onSuccess[] = callback($this, 'AddTaskFormSubmitted');\r\n return $form;\r\n }", "public function __construct($name,$label,$status = \"visible\",$type=\"input\",$height=NULL,$width=NULL,$limit = NULL,$target=NULL){\n\t\n\t if($name == null){ exit(\"fddm_ERROR in cls_fddm_fieldView/construct: A fieldname must be provided\"); }\n\t $this->name = $name;\n\t\n\t // If no label is provided the label will be set to be the fieldname\n\t $this->label = $label;\n\t if($label==null){ $this->label = $name; }\n\t\n\t $this->status = $status;\n\t $this->type = $type;\n \t$this->width = $width;\n\t $this->height = $height;\n\t $this->target = $target;\n\t $this->limit = $limit;\n\t\n\t}", "public function initConfigurationForm()\n\t{\n\t\tglobal $lng, $ilCtrl;\n\t\t\n\t\t$pl = $this->getPluginObject();\n\t\n\t\tinclude_once(\"Services/Form/classes/class.ilPropertyFormGUI.php\");\n\t\t$form = new ilPropertyFormGUI();\n\t\n\t\t// setting 1 (a checkbox)\n\t\t$cb = new ilCheckboxInputGUI($pl->txt(\"setting_1\"), \"setting_1\");\n\t\t$form->addItem($cb);\n\t\t\n\t\t// setting 2 (text)\n\t\t$ti = new ilTextInputGUI($pl->txt(\"setting_2\"), \"setting_2\");\n\t\t$ti->setRequired(true);\n\t\t$ti->setMaxLength(10);\n\t\t$ti->setSize(10);\n\t\t$form->addItem($ti);\n\t\n\t\t$form->addCommandButton(\"save\", $lng->txt(\"save\"));\n\t \n\t\t$form->setTitle($pl->txt(\"example_plugin_configuration\"));\n\t\t$form->setFormAction($ilCtrl->getFormAction($this));\n\t\t\n\t\treturn $form;\n\t}", "public function buildForm() {\n\t\t$form = '';\n\n\t\tforeach ($this->_properties as $row) {\n\t\t\tif (!in_array($row['Field'],$this->_ignore)) {\n\t\t\t\t$elem = $this->buildElement($row);\n\t\t\t\t$row['Comment'] != '' ? $comment = $row['Comment'].\"<br />\": $comment = '';\n\t\t\t\t$this->_properties[$row['Field']]['HTMLElement']=$elem;\n\t\t\t\tif ($row['ElementType']=='hidden')\n\t\t\t\t\t$form .= $elem;\n\t\t\t\telse \n\t\t\t\t\t$form .= sprintf(\"<div class='formElem'>\\n%s<br />\\n%s\\n%s</div>\\n\",ucwords (str_replace (\"_\",\" \",$row['Field'])),$comment,$elem);\n\t\t\t}\n\t\t}\n\t\treturn $form;\n\t}", "public function form_footer_progress_status_proportion_html() {\n\n\t\t?>\n\t\t<div class=\"wpforms-conversational-form-footer-progress-status-proportion\">\n\t\t\t<?php\n\t\t\tprintf(\n\t\t\t\t/* translators: %1$s - Number of fields completed, %2$s - Number of fields in total. */\n\t\t\t\t\\esc_html__(\n\t\t\t\t\t'%1$s of %2$s completed',\n\t\t\t\t\t'wpforms-conversational-forms'\n\t\t\t\t),\n\t\t\t\t'<span class=\"completed\"></span>',\n\t\t\t\t'<span class=\"completed-of\"></span>'\n\t\t\t);\n\t\t\t?>\n\t\t</div>\n\t\t<div class=\"wpforms-conversational-form-footer-progress-status-proportion-completed\" style=\"display: none\">\n\t\t\t<?php \\esc_html_e( 'Form completed', 'wpforms-conversational-forms' ); ?>\n\t\t</div>\n\t\t<?php\n\t}", "function toString()\n\t{\n\t\t// Start main form attributes\n\t\t$formAttributes = array();\n\t\t$formAttributes['method'] = 'POST';\t\n\t\t\n\t\t// Use custom action attribute?\n\t\tif ($this->actionURL) {\n\t\t\t$formAttributes['action'] = $this->actionURL;\n\t\t} else {\n\t\t\t// Current page\n\t\t\t$formAttributes['action'] = str_replace( '%7E', '~', $_SERVER['REQUEST_URI']);\n\t\t}\n\t\t\n\t\t// Add the form name if specified\n\t\t$namestring = \"\";\n\t\tif ($this->formName) {\n\t\t\t$formAttributes['name'] = $this->formName;\t\n\t\t\t$formAttributes['id'] = $this->formName;\n\t\t}\n\t\t\n\t\t// Need extra attribute if there's a upload field\n\t\tif ($this->haveFileUploadField()) {\n\t\t\t$formAttributes['enctype'] = 'multipart/form-data';\n\t\t}\n\t\t\n\t\t// Render form with all attributes\n\t\t$attributeString = false;\n\t\tforeach($formAttributes as $name => $value) {\n\t\t\t$attributeString .= sprintf('%s=\"%s\" ', $name, $value);\n\t\t}\n\t\t\n\t\t// Start form\n\t\t$resultString = \"\\n<form $attributeString>\\n\";\n\t\t\n\t\t// Is first item a break? If so, render it.\n\t\tif (isset($this->breakList[FORM_BUILDER_START_OF_FORM])) {\n\t\t\t$resultString .= $this->createTableHeader(array('id' => $this->breakList[FORM_BUILDER_START_OF_FORM]['sectionid']), $this->breakList[FORM_BUILDER_START_OF_FORM]['prefixHTML']);\n\t\t} else {\n\t\t\t$resultString .= $this->createTableHeader();\n\t\t}\t\t\n\t\t\n\t\t// Now add all form elements\n\t\tforeach ($this->elementList as $element)\n\t\t{\n\t\t\t// Hidden elements are added later\n\t\t\tif ($element->type == 'hidden') {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// Render form element\t\t\t\t\n\t\t\t$resultString .= $element->toString($this->showRequiredLabels);\n\n\t\t\t// Add section breaks if this element is in the break list.\n\t\t\t// Add break after element HTML\n\t\t\tif (in_array($element->name, array_keys($this->breakList)))\n\t\t\t{\n\t\t\t\t$resultString .= $this->createTableFooter();\n\t\t\t\t$resultString .= $this->createTableHeader(array('id' => $this->breakList[$element->name]['sectionid']), $this->breakList[$element->name]['prefixHTML']);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t$resultString .= $this->createTableFooter();\n\t\t\n\t\t// Button area\n\t\t$resultString .= '<p class=\"submit\">'.\"\\n\";\n\t\t\n\t\t// Add submit button\n\t\t$resultString .= \"\\t\".'<input class=\"button-primary\" type=\"submit\" name=\"Submit\" value=\"'.$this->submitlabel.'\" />'.\"\\n\";\n\t\t\n\t\t// Add remaining buttons\n\t\tforeach ($this->buttonList as $buttonName => $buttonLabel) {\n\t\t\t$resultString .= \"\\t<input type=\\\"submit\\\" class=\\\"button-secondary\\\" name=\\\"$buttonName\\\" value=\\\"$buttonLabel\\\" />\\n\";\t\t\n\t\t}\n\t\t\t\t\n\t\t// Hidden field to indicate update is happening\n\t\t$resultString .= sprintf(\"\\t\".'<input type=\"hidden\" name=\"update\" value=\"%s\" />'.\"\\n\", $this->formName);\n\t\t\t\t\n\t\t// Add any extra hidden elements\n\t\tforeach ($this->elementList as $element)\n\t\t{\n\t\t\t// Leave all hidden elements until the end.\n\t\t\tif ($element->type == 'hidden') {\t\n\t\t\t\t$resultString .= \"\\t\".'<input type=\"hidden\" name=\"'.$element->name.'\" value=\"'.$element->value.'\" />'.\"\\n\";\n\t\t\t}\n\t\t}\t\t\n\t\t\n\t\t$resultString .= '</p>'.\"\\n\";\n\t\t\t\t\t\t\t\n\t\t// End form\n\t\t$resultString .= \"\\n</form>\\n\";\n\t\t\n\t\treturn $resultString;\n\t}", "function show_form()\n\t\t{\n\t\t\t//set a global template for interactive activities\n\t\t\t$this->t->set_file('run_activity','run_activity.tpl');\n\t\t\t\n\t\t\t//set the css style files links\n\t\t\t$this->t->set_var(array(\n\t\t\t\t'run_activity_css_link'\t=> $this->get_css_link('run_activity', $this->print_mode),\n\t\t\t\t'run_activity_print_css_link'\t=> $this->get_css_link('run_activity', true),\n\t\t\t));\n\t\t\t\n\t\t\t\n\t\t\t// draw the activity's title zone\n\t\t\t$this->parse_title($this->activity_name);\n\n\t\t\t//draw the instance_name input or label\n\t\t\t// init wf_name to the requested one or the stored name\n\t\t\t// the requested one handle the looping in activity form\n\n\t\t\t$wf_name = get_var('wf_name','post',$this->instance->getName());\n\t\t\t$this->parse_instance_name($wf_name);\n\n\t\t\t//draw the instance_name input or label\n\t\t\t// init wf_set_owner to the requested one or the stored owner\n\t\t\t// the requested one handle the looping in activity form\n\t\t\t$wf_set_owner = get_var('wf_set_owner','post',$this->instance->getOwner());\n\t\t\t$this->parse_instance_owner($wf_set_owner);\n\t\t\t\n\t\t\t// draw the activity central user form\n\t\t\t$this->t->set_var(array('activity_template' => $this->wf_template->parse('output', 'template')));\n\t\t\t\n\t\t\t//draw the select priority box\n\t\t\t// init priority to the requested one or the stored priority\n\t\t\t// the requested one handle the looping in activity form\n\t\t\t$priority = get_var('wf_priority','post',$this->instance->getPriority());\n\t\t\t$this->parse_priority($priority);\n\t\t\t\n\t\t\t//draw the select next_user box\n\t\t\t// init next_user to the requested one or the stored one\n\t\t\t// the requested one handle the looping in activity form\n\t\t\t$next_user = get_var('wf_next_user','POST',$this->instance->getNextUser());\n\t\t\t$this->parse_next_user($next_user);\n\t\t\t\n\t\t\t//draw print_mode buttons\n\t\t\t$this->parse_print_mode_buttons();\n\t\t\t\n\t\t\t//draw the activity submit buttons\t\n\t\t\t$this->parse_submit();\n\t\t\t\n\t\t\t//draw the info zone\n\t\t\t$this->parse_info_zone();\n\t\t\t\n\t\t\t//draw the history zone if user wanted it\n\t\t\t$this->parse_history_zone();\n\t\t\t\n\t\t\t$this->translate_template('run_activity');\n\t\t\t$this->t->pparse('output', 'run_activity');\n\t\t\t$GLOBALS['egw']->common->egw_footer();\n\t\t}", "public function progressBar()\n {\n \n self::$view='adminlte::progress.bar';\n return $this;\n \n }", "function buildTabs()\r\n {\r\n $this->_formBuilt = true;\r\n\r\n // Here we get all page names in the controller\r\n $pages = array();\r\n $myName = $current = $this->getAttribute('id');\r\n while (null !== ($current = $this->controller->getPrevName($current))) {\r\n $pages[] = $current;\r\n }\r\n $pages = array_reverse($pages);\r\n $pages[] = $current = $myName;\r\n while (null !== ($current = $this->controller->getNextName($current))) {\r\n $pages[] = $current;\r\n }\r\n // Here we display buttons for all pages, the current one's is disabled\r\n foreach ($pages as $pageName) {\r\n $disabled = ($pageName == $myName ? array('disabled' => 'disabled')\r\n : array());\r\n\r\n $tabs[] = $this->createElement('submit',\r\n $this->getButtonName($pageName),\r\n ucfirst($pageName),\r\n array('class' => 'flat') + $disabled);\r\n }\r\n $this->addGroup($tabs, 'tabs', null, '&nbsp;', false);\r\n }", "protected function Form_Create() {\n\t\t\t// Define the Label\n\t\t\t$this->lblMessage = new QLabel($this);\n\t\t\t$this->lblMessage->Text = 'Click the button to change my message.';\n\n\t\t\t// Define the Button\n\t\t\t$this->btnButton = new QButton($this);\n\t\t\t$this->btnButton->Text = 'Click Me!';\n\n\t\t\t// Add a Click event handler to the button\n\t\t\t$this->btnButton->AddAction(new QClickEvent(), new QServerAction('btnButton_Click'));\n\t\t}", "public function createForm() {\n module_load_include('inc', 'islandora_form_builder', 'FormGenerator');\n $form_values = &$this->formState['values'];\n $file = isset($form_values['ingest-file-location']) ? $form_values['ingest-file-location'] : '';\n $form['#attributes']['enctype'] = 'multipart/form-data';\n $form['indicator']['ingest-file-location'] = array(\n '#type' => 'file',\n '#title' => t('Upload Document'),\n '#size' => 48,\n '#description' => t('Select file to be added the the object.'),\n );\n $form_generator = FormGenerator::CreateFromModel($this->contentModelPid, $this->contentModelDsid);\n $form[FORM_ROOT] = $form_generator->generate($this->formName); // TODO get from user .\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Ingest'),\n '#prefix' => t('Please be patient. Once you click next there may be a number of files created. ' .\n 'Depending on your content model this could take a few minutes to process.<br />')\n );\n return $form;\n }", "public function txtBatchLabel_Create($strControlId = null) {\n\t\t\t$this->txtBatchLabel = new QTextBox($this->objParentObject, $strControlId);\n\t\t\t$this->txtBatchLabel->Name = QApplication::Translate('Batch Label');\n\t\t\t$this->txtBatchLabel->Text = $this->objStewardshipBatch->BatchLabel;\n\t\t\t$this->txtBatchLabel->Required = true;\n\t\t\t$this->txtBatchLabel->MaxLength = StewardshipBatch::BatchLabelMaxLength;\n\t\t\treturn $this->txtBatchLabel;\n\t\t}", "function __construct($label, $value)\n\t{\n\t\t$this->label = $label;\n \t$this->value = $value;\n\t}", "static function lengthForm (ViewRegistry $context) {\n $lengths=array(10,20,50,100,\"*\");\n\n $form=\"<form action=\\\"\\\" method=\\\"get\\\" id=\\\"perPage\\\" drawer=\\\"Per\\\"><p>\".l(\"Per page:\").\" <select name=\\\"length\\\">\";\n $optList=\"\";\n foreach ($lengths as $l) {\n $optList.=\"<option value=\\\"\".$l.\"\\\"\";\n if ( $l==$context->g(\"length\") ) $optList.=\" selected=\\\"selected\\\"\";\n $optList.=\">\".$l.\"</option>\";\n }\n //<option value=\"10\">10</option>\n $form.=$optList;\n $form.=\"</select> <input type=\\\"submit\\\" value=\\\"\".l(\"Apply\").\"\\\"/>\";\n $defineBase=\"<input type=\\\"hidden\\\" name=\\\"\";\n $bs=$context->g(\"base\");\n $defineBase.=$bs.\"\\\" value=\\\"\";\n if ( $bs == \"begin\" ) $defineBase.=$context->g(\"begin\");\n else if ( $bs == \"end\" ) $defineBase.=$context->g(\"end\");\n else throw new UsageException (\"Illegal value at \\\"base\\\" key :\".$bs.'!');\n $defineBase.=\"\\\"/>\";\n $form.=$defineBase.\"</p></form>\";\n return ($form);\n }", "public function lblConsumoUrbano_Create($strControlId = null) {\n\t\t\t$this->lblConsumoUrbano = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblConsumoUrbano->Name = QApplication::Translate('Consumo Urbano');\n\t\t\t$this->lblConsumoUrbano->Text = $this->objFichas->ConsumoUrbano;\n\t\t\treturn $this->lblConsumoUrbano;\n\t\t}", "private function StartForm(){\r\n\t\t\t$this->formHTML .= \"<form method=\\\"{$this->method}\\\" action=\\\"{$this->action}\\\"\";\r\n\t\t\tif($this->enctype){\r\n\t\t\t\t$this->formHTML .= \" enctype=\\\"{$this->enctype}\\\"\";\r\n\t\t\t}\r\n\t\t\t$this->formHTML .= \" name=\\\"{$this->formName}\\\" class=\\\"c{$this->formName}\\\" id=\\\"i{$this->formName}\\\"\";\r\n\t\t\t$this->formHTML .= \">\";\r\n\t\t}", "function __construct() {\n\t\t$this->label = __( 'HTML 1', 'customify' );\n\t}", "protected function createComponentProjectForm(): Form {\n $form = new Form; \n\n //Get all available project types for select field\n $types = $this->database->table('types');\n $types_arr = array();\n foreach($types as $type) {\n $types_arr[$type->id] = $type->title;\n }\n\n $form->addText('title', \"Project Title:\")\n ->setRequired()\n ->addRule($form::MAX_LENGTH, 'The Project title need to be less than %d character long', 60);\n\n $form->addSelect(\"type_id\", \"Project Type\", $types_arr)\n ->setRequired();\n\n $form->addText('start_date', \"Start Date\")\n ->setHtmlType('date')\n ->setRequired();\n\n $form->addText('end_date', \"End Date\")\n ->setHtmlType('date')\n ->setRequired();\n\n $form->addSubmit('send', \"Publish Project\");\n\n $form->onSuccess[] = [$this, 'projectFormSucceeded'];\n\n return $form;\n }", "public function buildForm() {\n\t\techo \"<!DOCTYPE html>\n\t\t<html>\n\t\t<head>\n\t\t\t<title>$this->title</title>\n\t\t</head>\n\t\t<body>\n\t\t<form method=\\\"$this->method\\\">\";\n\t\tforeach ($this->_inputs as $key => $input) {\n\t\t\t// Check if email validation is required.\n\t\t\tif (isset($input['rule']) && in_array('email', $input['rule'])) {\n\t\t\t\t$input['inputType'] = 'email';\n\t\t\t}\n\n\t\t\techo \"<label>\".$input['label'].\"</label><input type=\\\"\".$input['inputType'].\"\\\" id=\\\"\".$input['name'].\"\\\" name=\\\"\".$input['name'].\"\\\" value=\\\"\".$input['defaultValue'].\"\\\"\";\n\n\t\t\t// Check if field was required.\n\t\t\tif (isset($input['rule']) && in_array('required', $input['rule'])) {\n\t\t\t\techo \" required\";\n\t\t\t}\n\n\t\t\techo \"><br></form>\";\n\t\t}\n\t}", "protected function form()\n {\n $form = new Form(new Carousel);\n\n $form->select('carousel_category_id', __('carousel::carousel.carousel_category_id'))\n ->options(CarouselCategory::all()->pluck('name', 'id'));\n $form->text('title', __('carousel::carousel.title'));\n $form->text('url', __('carousel::carousel.url'));\n $form->image('img_src', __('carousel::carousel.img_src'))\n ->removable()\n ->uniqueName()\n ->move('carousel');\n $form->text('alt', __('carousel::carousel.alt'));\n $form->textarea('remark', __('carousel::carousel.remark'));\n $form->select('status', __('carousel::carousel.status.label'))\n ->default(1)\n ->options(__('carousel::carousel.status.value'));\n $form->datetime('start_time', __('carousel::carousel.start_time'))\n ->default(date('Y-m-d H:i:s'));\n $form->datetime('end_time', __('carousel::carousel.end_time'))\n ->default(date('Y-m-d H:i:s'));\n\n return $form;\n }", "protected function buildElementLabel($data, $form)\n {\n $helpMessage = '';\n if ($form->settings['layout']['helpMessagePlacement'] == 'with_label') {\n $helpMessage = $this->getLabelHelpMessage($data);\n }\n\n $id = isset($data['attributes']['id']) ? $data['attributes']['id'] : '';\n $label = isset($data['settings']['label']) ? $data['settings']['label'] : '';\n $requiredClass = $this->getRequiredClass(ArrayHelper::get($data, 'settings.validation_rules', []));\n $classes = trim('ff-el-input--label ' . $requiredClass . $this->getAsteriskPlacement($form));\n\n return \"<div class='\" . $classes . \"'><label for='\" . $id . \"'>\" . $label . \"</label>{$helpMessage}</div>\";\n }", "protected function form()\n {\n $form = new Form(new UserHealth());\n\n $form->number('height', __('Height'));\n $form->number('weight', __('Weight'));\n $form->text('blood_pressure', __('Blood pressure'));\n $form->text('sugar_level', __('Sugar level'));\n $form->text('blood_type', __('Blood type'));\n $form->decimal('muscle_mass', __('Muscle mass'))->default(0);\n $form->text('metabolism', __('Metabolism'));\n $form->textarea('genetic_history', __('Genetic history'));\n $form->textarea('illness_history', __('Illness history'));\n $form->textarea('allergies', __('Allergies'));\n $form->textarea('prescription', __('Prescription'));\n $form->textarea('operations', __('Operations'));\n $form->number('user_id', __('User id'));\n\n return $form;\n }", "protected function buildForm()\n {\n $this->formBuilder\n ->add('host', 'text', array(\n 'data' => ElasticProduct::getConfigValue('host'),\n 'required' => false,\n 'attr' => ['placeholder' => 'localhost'],\n 'label' => Translator::getInstance()->trans('Host', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'host'\n )\n ))\n ->add('port', 'text', array(\n 'data' => ElasticProduct::getConfigValue('port'),\n 'required' => false,\n 'attr' => ['placeholder' => '9200'],\n 'label' => Translator::getInstance()->trans('Port', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'port'\n )\n ))\n ->add('username', 'text', array(\n 'data' => ElasticProduct::getConfigValue('username'),\n 'required' => false,\n 'label' => Translator::getInstance()->trans('Username', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'username'\n )\n ))\n ->add('password', PasswordType::class, array(\n 'data' => ElasticProduct::getConfigValue('password'),\n 'required' => false,\n 'label' => Translator::getInstance()->trans('Password', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'password'\n )\n ))\n ->add('index_prefix', 'text', array(\n 'data' => ElasticProduct::getConfigValue('index_prefix'),\n 'required' => false,\n 'attr' => ['placeholder' => 'my_website_name'],\n 'label' => Translator::getInstance()->trans('Index prefix', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'index_prefix'\n )\n ));\n }", "public function form_footer_progress_status_percentage_html() {\n\n\t\t?>\n\t\t<div class=\"wpforms-conversational-form-footer-progress-status-percentage\">\n\t\t\t<?php\n\t\t\tprintf(\n\t\t\t\t/* translators: %s - Percentage of fields completed. */\n\t\t\t\t\\esc_html__(\n\t\t\t\t\t'%s%% completed',\n\t\t\t\t\t'wpforms-conversational-forms'\n\t\t\t\t),\n\t\t\t\t'<span class=\"completed\">100</span>'\n\t\t\t);\n\t\t\t?>\n\t\t</div>\n\t\t<?php\n\t}", "function addLabel ($for, $label, $attributes = array ())\n\t{\n\t\t$html = \"<label for=\\\"$for\\\"\";\n\t\tif ($attributes) {\n\t\t\t$html .= $this -> addAttributes($attributes);\n\t\t}\n\t\t$html .= \">$label</label>\";\n\n\t\treturn $html;\n\t}", "public function form_footer_progress_block_html() {\n\n\t\t$progress_style = ! empty( $this->form_data['settings']['conversational_forms_progress_bar'] ) ? $this->form_data['settings']['conversational_forms_progress_bar'] : '';\n\n\t\t?>\n\t\t<div class=\"wpforms-conversational-form-footer-progress\">\n\t\t\t<div class=\"wpforms-conversational-form-footer-progress-status\">\n\t\t\t\t<?php\n\t\t\t\tif ( 'proportion' === $progress_style ) {\n\t\t\t\t\t$this->form_footer_progress_status_proportion_html();\n\t\t\t\t} else {\n\t\t\t\t\t$this->form_footer_progress_status_percentage_html();\n\t\t\t\t}\n\t\t\t\t?>\n\t\t\t</div>\n\t\t\t<div class=\"wpforms-conversational-form-footer-progress-bar\">\n\t\t\t\t<div class=\"wpforms-conversational-form-footer-progress-completed\"></div>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t}", "public function stepStart($data, $form)\n {\n if (!$data) return;\n\n if ($data['settings']['progress_indicator'] == 'steps') {\n $nav = \"<ul class='ff-step-titles'><li class='ff_active'><span>\" . implode('</span></li><li><span>', $data['settings']['step_titles']) . \"</span></li></ul>\";\n } elseif ($data['settings']['progress_indicator'] == 'progress-bar') {\n $nav = \"<div class='ff-el-progress-status'></div>\n <div class='ff-el-progress'>\n <div class='ff-el-progress-bar'><span></span></div>\n </div>\n <ul style='display: none' class='ff-el-progress-title'>\n <li>\" . implode('</li><li>', $data['settings']['step_titles']) . \"</li>\n </ul>\";\n } else {\n $nav = '';\n }\n\n $data['attributes']['data-disable_auto_focus'] = ArrayHelper::get($data, 'settings.disable_auto_focus', 'no');\n $data['attributes']['data-enable_auto_slider'] = ArrayHelper::get($data, 'settings.enable_auto_slider', 'no');\n\n $data['attributes']['data-enable_step_data_persistency'] = ArrayHelper::get($data, 'settings.enable_step_data_persistency', 'no');\n $data['attributes']['data-enable_step_page_resume'] = ArrayHelper::get($data, 'settings.enable_step_page_resume', 'no');\n\n $atts = $this->buildAttributes(\n \\FluentForm\\Framework\\Helpers\\ArrayHelper::except($data['attributes'], 'name')\n );\n\n echo \"<div class='ff-step-container' {$atts}>\";\n if ($nav) {\n echo \"<div class='ff-step-header'>{$nav}</div>\";\n }\n\n echo \"<span class='ff_step_start'></span><div class='ff-step-body'>\";\n $data['attributes']['class'] .= ' fluentform-step';\n $data['attributes']['class'] = trim($data['attributes']['class']) . ' active';\n $atts = $this->buildAttributes(\n \\FluentForm\\Framework\\Helpers\\ArrayHelper::except($data['attributes'], 'name')\n );\n echo \"<div {$atts}>\";\n }", "function show_answers_progress($real_taskcount, $taskcount, $pid, $colspan = -1){\n\t\n\tif($colspan == -1){\n\t\t$colspan = \"\";\n\t}else{\n\t\t$colspan = \" colspan = '$colspan'\";\n\t}\n\t\n\t//taskcount formatting\n\t$delta_tc = $taskcount - $real_taskcount;\n\t$const = 60;\n\tif($delta_tc >= 0 || $taskcount == 0){\n\t\t$width = $const;\n\t}else{\n\t\t$width = $const * $taskcount / $real_taskcount;\n\t\t$sec_width = $const * abs($delta_tc) / $real_taskcount;\n\t}\n\t\n\techo \"<td$colspan>\n\t\t<meter id='bar$pid' min='0' max='100' low='25' high='75' optimum='100' value='\";\n\tif($taskcount == 0){\n\t\techo \"0\";\n\t}else{\n\t\techo $real_taskcount / $taskcount * 100;\n\t}\n\techo \"' style='width:\".$width.\"%;'></meter>\";\n\tif($delta_tc < 0 && $taskcount != 0){\n\t\techo \"<meter min='0' max='100' low='0' high='0' optimum='0' value='100' style='width:\".$sec_width.\"%;'></meter>\";\n\t}\n\techo \"<label for='bar$pid'> $real_taskcount/$taskcount</label>\";\n\techo \"</td>\";\n}", "protected function form()\n {\n $form = new Form(new Activity());\n\n $form->text('log_name', __('Log name'));\n $form->text('description', __('Description'));\n $form->number('subject_id', __('Subject id'));\n $form->text('subject_type', __('Subject type'));\n $form->number('causer_id', __('Causer id'));\n $form->text('causer_type', __('Causer type'));\n $form->textarea('properties', __('Properties'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Terrace());\n\n $form->image('image', __('平台图片'))->rules('required', ['required' => '平台图片不能为空']);\n $form->text('name', __('平台名称'))->rules('required', ['required' => '平台名称不能为空']);\n $form->text('path', __('外链'))->rules('required', ['required' => '平台外链不能为空']);\n $form->text('notice_info', __('提示语'))->rules('required', ['required' => '平台提示语不能为空']);\n $form->radio('status','状态')->options(['1' => '未推荐', '2'=> '已推荐'])->default(1);\n\n return $form;\n }", "private function buildGitLabWForm(&$form) {\n $git_settings = $this->configFactory->get('simple_git.settings');\n\n $form['git_lab'] = [\n '#type' => 'fieldset',\n '#title' => $this->t('GitLab Web settings'),\n '#collapsible' => TRUE,\n '#collapsed' => FALSE,\n ];\n\n $form['git_lab']['git_lab_app_id'] = [\n '#type' => 'textfield',\n '#title' => $this->t('GitLab App Web Id'),\n '#description' => $this->t('GitLab App Web Id value'),\n '#default_value' => $git_settings->get(\n ModuleConstantInterface::GIT_TYPE_GITLAB\n )['app_id'],\n ];\n\n $form['git_lab']['git_lab_app_secret'] = [\n '#type' => 'textfield',\n '#title' => $this->t('GitLab App Web Secret'),\n '#description' => $this->t('GitLab App Web Secret value'),\n '#default_value' => $git_settings->get(\n ModuleConstantInterface::GIT_TYPE_GITLAB\n )['app_secret'],\n ];\n\n $form['git_lab']['git_lab_app_url_redirect'] = [\n '#type' => 'textfield',\n '#title' => $this->t('GitLab URL Web Redirect'),\n '#description' => $this->t('GitLab URL Web Redirect value'),\n '#default_value' => $git_settings->get(\n ModuleConstantInterface::GIT_TYPE_GITLAB\n )['app_url_redirect'],\n ];\n\n }", "public function createComponentGenerateForm() {\n $form = new Form;\n\n\n $groups = $this->groups->getForTest($this->user->id);\n\n $form->addSelect('groupBox', 'Skupina:', $groups);\n $form->addHidden('test_id', $this->getParameter('testId'));\n $form->addText('questionCount')->setRequired('Zadejte počet otázek');\n $form->addText('answerCount')->setRequired('Zadejte počet odpovědí');\n $form->addRadioList('pageFormat', 'Formát stránky', array('a4' => 'A4', 'a5' => 'A5'))\n ->setRequired('Vyberte formát stránky');\n $form->addTextArea('students');\n\n $form->onSuccess[] = callback($this, 'generateFormSubmitted');\n $form->addSubmit('submit');\n\n return $form;\n }", "public function buildFormFields()\n {\n $this->addField(\n SharpFormTextField::make('title')\n ->setLabel('Title')\n )->addField(\n SharpFormUploadField::make('cover')\n ->setLabel('Cover')\n ->setFileFilterImages()\n ->setCropRatio('1:1')\n ->setStorageBasePath('data/service')\n )->addField(\n SharpFormNumberField::make('price')\n ->setLabel('Price')\n )->addField(\n SharpFormMarkdownField::make('description')->setToolbar([\n SharpFormMarkdownField::B, SharpFormMarkdownField::I,\n SharpFormMarkdownField::SEPARATOR,\n SharpFormMarkdownField::IMG,\n SharpFormMarkdownField::SEPARATOR,\n SharpFormMarkdownField::A,\n ])\n )->addField(\n SharpFormTagsField::make('tags',\n Tag::orderBy('label')->get()->pluck('label', 'id')->all()\n )->setLabel('Tags')\n ->setCreatable(true)\n ->setCreateAttribute('name')\n );\n }", "public function __construct(\n $label = null,\n $name = null,\n $value = null,\n $help = null,\n $required = false,\n //$disabled = false,\n //$readonly = false,\n //$before = null,\n //$after = null,\n $errorRelated = null,\n $errorBag = null,\n\n $toolbar = null,\n $headings = null,\n $paragraphs = null,\n $divs = null,\n $formats = null,\n $colors = null,\n $emojis = null\n\n )\n {\n $this->label = $label;\n $this->name = $name;\n $this->value = $value;\n $this->help = $help;\n $this->isRequired = $required;\n $this->errorRelated = $errorRelated;\n $this->errorBag = $errorBag;\n\n $this->cleanName = array_to_dot($this->name);\n $this->toolbar = is_null($toolbar) ? config('bs-component.editor.toolbar') : explode('|', $toolbar);\n $this->headings = is_null($headings) ? config('bs-component.editor.headings') : ($headings ? explode('|', $headings) : []);\n $this->paragraphs = is_null($paragraphs) ? config('bs-component.editor.paragraphs') : explode('|', $paragraphs);\n $this->divs = is_null($divs) ? config('bs-component.editor.divs') : explode('|', $divs);\n $this->formats = is_null($formats) ? config('bs-component.editor.formats') : explode('|', $formats);\n $this->colors = is_null($colors) ? config('bs-component.editor.colors') : explode('|', $colors);\n $this->emojis = is_null($emojis) ? config('bs-component.editor.emojis') : explode('|', $emojis);\n\n }", "public function label(){\n\t\treturn '<label class=\"control-label\" for=\"'.$this->name.'\">'.$this->label.'</label>';\n\t}", "public function get_component() {\n $file_types = json_encode($this->file_types);\n $is_image = json_encode($this->is_image);\n $image_dimensions = json_encode($this->image_dimensions);\n $error_tooltip = $this->error_message ? new Tooltip([\n \"content\" => $this->error_message,\n \"focus\" => $this->label,\n \"is_error\" => true,\n \"position\" => \"bottom\",\n \"\"\n ]) : \"$this->label\";\n $this->label_classes .= \"label\";\n \n return \"\n <div {$this->class()}>\n <div class=\\\"label_container\\\">\n <label>\n <input\n class=\\\"file_upload\\\"\n type=\\\"file\\\"\n {$this->id()}\n name=\\\"$this->name\\\"\n data-file-types='$file_types'\n data-file-size=\\\"$this->file_size\\\"\n data-is-image='$is_image'\n data-image-dimensions='$image_dimensions'\n data-validation=\\\"true\\\"\n />\n <div class=\\\"value_text\\\">\n <div>\n <span>None Selected</span>\n <i class=\\\"fa fa-upload\\\" aria-hidden=\\\"true\\\"></i>\n </div>\n </div>\n </label>\n </div>\n <div {$this->label_class()} {$this->required()}>\n $error_tooltip\n </div>\n </div>\n \";\n }", "public function __construct()\n {\n parent::__construct();\n\n // creates the form\n $this->form = new BootstrapFormBuilder(self::$formName);\n\n // define the form title\n $this->form->setFormTitle('Avaliações');\n\n $inscricao_evento_id = new TDBUniqueSearch('inscricao_evento_id', 'eventtus', 'Evento', 'id', 'id','nome asc' );\n\n $inscricao_evento_id->setSize('100%');\n $inscricao_evento_id->setMinLength(0);\n $inscricao_evento_id->setMask('{nome}');\n\n $row1 = $this->form->addFields([new TLabel('Evento', null, '14px', null),$inscricao_evento_id]);\n $row1->layout = ['col-sm-6'];\n\n // keep the form filled during navigation with session data\n $this->form->setData( TSession::getValue(__CLASS__.'_filter_data') );\n\n $btn_ongenerate = $this->form->addAction('Gerar', new TAction([$this, 'onGenerate']), 'fa:search #ffffff');\n $btn_ongenerate->addStyleClass('btn-primary'); \n\n // vertical box container\n $container = new TVBox;\n $container->style = 'width: 100%';\n $container->add(TBreadCrumb::create(['Cadastros','Avaliações']));\n $container->add($this->form);\n\n parent::add($container);\n\n }", "abstract public function getFormDesc();", "protected function form()\n {\n $form = new Form(new DbTop());\n $form->select('status', __(trans('hhx.status')))->options(config('hhx.db_status'));;\n $form->text('pan_url', __(trans('hhx.pan_url')));\n $form->text('pan_code', __(trans('hhx.pan_code')));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Resources);\n\n $form->text('name', '名称')->rules('required',['required' => '请输入 配置项的名称']);\n\n $form->radio('type', '类型')->options(Resources::TYPE);\n\n $form->cropper('url','图片');\n\n $form->number('sort_num','排序');\n\n $form->textarea('memo','备注');\n\n $form->tools(function (Form\\Tools $tools) {\n // 去掉`删除`按钮\n $tools->disableDelete();\n\n // 去掉`查看`按钮\n $tools->disableView();\n });\n $form->footer(function ($footer) {\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n\n // 去掉`继续编辑`checkbox\n $footer->disableEditingCheck();\n\n // 去掉`继续创建`checkbox\n $footer->disableCreatingCheck();\n\n });\n\n return $form;\n }", "public function lblMotorShort_Create($strControlId = null) {\n\t\t\t$this->lblMotorShort = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblMotorShort->Name = QApplication::Translate('Motor Short');\n\t\t\t$this->lblMotorShort->Text = $this->objFichas->MotorShort;\n\t\t\treturn $this->lblMotorShort;\n\t\t}", "private function loadForm()\n {\n // init settings form\n $this->frm = new Form('settings');\n\n // add festival year\n $this->frm->addText('year', $this->get('fork.settings')->get($this->URL->getModule(), 'year'));\n\n // add fields for pagination\n $this->frm->addDropdown(\n 'overview_num_items',\n array_combine(range(1, 30), range(1, 30)),\n $this->get('fork.settings')->get($this->URL->getModule(), 'overview_num_items', 10)\n );\n $this->frm->addDropdown(\n 'recent_festival_list_num_items',\n array_combine(range(1, 30), range(1, 30)),\n $this->get('fork.settings')->get($this->URL->getModule(), 'recent_festival_list_num_items', 5)\n );\n\n // add functions fields\n $this->frm->addCheckbox('cover_image_enabled', $this->get('fork.settings')->get($this->URL->getModule(), 'cover_image_enabled', false));\n $this->frm->addCheckbox('cover_image_required', $this->get('fork.settings')->get($this->URL->getModule(), 'cover_image_required', false));\n $this->frm->addCheckbox('multi_images_enabled', $this->get('fork.settings')->get($this->URL->getModule(), 'multi_images_enabled', false));\n\n // add god user only fields\n if ($this->godUser) {\n $this->frm->addText('image_size_limit', (float) $this->get('fork.settings')->get($this->URL->getModule(), 'image_size_limit', 10));\n }\n }", "private function buildGitLabMForm(&$form) {\n $git_settings = $this->configFactory->get('simple_git.settings');\n\n $form['git_labM'] = [\n '#type' => 'fieldset',\n '#title' => $this->t('GitLab Mobile settings'),\n '#collapsible' => TRUE,\n '#collapsed' => FALSE,\n ];\n\n $form['git_labM']['git_labM_app_id'] = [\n '#type' => 'textfield',\n '#title' => $this->t('GitLab App Mobile Id'),\n '#description' => $this->t('GitLab App Mobile Id value'),\n '#default_value' => $git_settings->get(\n ModuleConstantInterface::GIT_TYPE_GITLABM\n )['app_id'],\n ];\n\n $form['git_labM']['git_labM_app_secret'] = [\n '#type' => 'textfield',\n '#title' => $this->t('GitLab App Mobile Secret'),\n '#description' => $this->t('GitLab App <mobile Secret value'),\n '#default_value' => $git_settings->get(\n ModuleConstantInterface::GIT_TYPE_GITLABM\n )['app_secret'],\n ];\n\n $form['git_labM']['git_labM_app_url_redirect'] = [\n '#type' => 'textfield',\n '#title' => $this->t('GitLab URL Mobile Redirect'),\n '#description' => $this->t('GitLab URL Mobile Redirect value'),\n '#default_value' => $git_settings->get(\n ModuleConstantInterface::GIT_TYPE_GITLABM\n )['app_url_redirect'],\n ];\n\n }", "public function generateLabel()\n\t{\n\t\tif ($this->strLabel == '')\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\treturn sprintf('<label for=\"ctrl_%s\" class=\"mandatory%s\"><span class=\"invisible\">%s </span>%s<span class=\"mandatory\">*</span><span class=\"invisible\"> %s</span></label>',\n\t\t\t\t\t\t$this->strId,\n\t\t\t\t\t\t(($this->strClass != '') ? ' ' . $this->strClass : ''),\n\t\t\t\t\t\t$GLOBALS['TL_LANG']['MSC']['mandatory'],\n\t\t\t\t\t\t$this->strLabel,\n\t\t\t\t\t\t$this->getQuestion());\n\t}", "function renderProgress($tot_complete, $tot_failed, $total, $show_title = false) {\n\t\n\tif($total == 0) return '';\n\t$perc_complete \t= round(($tot_complete / $total) * 100, 2);\n\t$perc_failed \t= round(($tot_failed / $total) * 100, 2);\n\t\n\t$title = str_replace('[total]', $total, Lang::t('_PROGRESS_TITLE', 'course'));\n\t$title = str_replace('[complete]', $tot_complete, $title);\n\t$title = str_replace('[failed]', $tot_failed, $title);\n\t\n\t$html = '';\n\tif($show_title === true) $html .= '<span class=\"progress_title\">'.$title.'</span><br />';\n\tif($perc_complete >= 100) {\n\t\t\n\t\t$html .= \"\\n\".'<div class=\"box_progress_complete\" title=\"'.$title.'\">'\n\t\t\t.'<div class=\"nofloat\">'\n\t\t\t.'</div></div>'.\"\\n\";\n\t} elseif($perc_failed + $perc_complete >= 100) {\n\t\t\n\t\t$html .= \"\\n\".'<div class=\"box_progress_failed\" title=\"'.$title.'\">';\n\t\tif($perc_complete != 0) $html .= '<div class=\"bar_complete\" style=\"width: '.$perc_complete.'%;\"></div>';\n\t\t$html .= '<div class=\"nofloat\">'\n\t\t\t.'</div></div>'.\"\\n\";\n\t} else {\n\t\t\n\t\t$html .= \"\\n\".'<div class=\"box_progress_bar\" title=\"'.$title.'\">';\n\t\tif($perc_complete != 0) $html .= '<div class=\"bar_complete\" style=\"width: '.$perc_complete.'%;\"></div>';\n\t\tif($perc_failed != 0) $html .= '<div class=\"bar_failed\" style=\"width: '.$perc_failed.'%;\"></div>';\n\t\t$html .= '<div class=\"nofloat\">'\n\t\t\t.'</div></div>'.\"\\n\";\n\t}\n\t\n\treturn $html;\n}", "public function __construct($name, $label = '', $class = '', $value = '', $form = null)\n {\n $this->name = $name;\n $this->class = $class;\n $this->label = $label;\n $this->value = $value;\n $this->form = $form;\n }", "protected function form()\n {\n $form = new Form(new LotteryCode());\n\n $form->text('code', __('Code'));\n $form->number('batch_num', __('Batch num'));\n $form->text('prizes_name', __('Prizes name'));\n $form->datetime('valid_period', __('Valid period'))->default(date('Y-m-d H:i:s'));\n $form->datetime('prizes_time', __('Prizes time'))->default(date('Y-m-d H:i:s'));\n $form->text('operator', __('Operator'));\n $form->switch('award_status', __('Award status'));\n\n return $form;\n }", "public function createConfigForm(HTML_QuickForm $form,$prefix=''){\n $this->_configprefix = $prefix;\n foreach($this->_options as $key=>$value) {\n $form->addElement('text',$prefix.$key,$key);\n $defaults[$prefix.$key] = $value;\n }\n }", "protected function createComponentPrihozForm()\n {\n $id = (int) $this->getParameter('id');\n $form = new Nette\\Application\\UI\\Form;\n \n $form->addText('id_uzivatel')\n ->setAttribute('style', 'display:none')\n ->setDefaultValue($this->user->id);\n\n $form->addText('id_nemovitost')\n ->setAttribute('style', 'display:none')\n ->setDefaultValue($id);\n \n $form->addText('pocet')\n ->setAttribute('style', 'display:none');\n \n $form->addText('vkladana_castka', 'Přihazovaná částka:')\n ->setType('number')\n ->setRequired('Prosím vložte částku, kterou chcete přihodit.')\n ->addRule(Nette\\Application\\UI\\Form::MIN, 'Prosím vložte vyšší částku. Minimální příhoz je 5,000 Kč.', 5000)\n ->setAttribute('placeholder', 'Sem vložte částku v Kč.')\n ->setAttribute('class', 'castka')\n ->setAttribute('step', '1');\n\n $form->addSubmit('send', 'Odeslat formulář')\n ->setAttribute('class', 'btn btn-primary');\n\n $form->onSuccess[] = $this->prihozFormSucceeded;\n return $form;\n }", "public function init()\n\t{\n\t\tparent::init();\n\t\t$this->addCssClass($this->options, 'progress');\n\t}", "protected function form() {\n\t\treturn Admin::form(WhtSpiderLogModel::class,function (Form $form) {\n\t\t\t$directors = [\n\t\t\t\t'成功' => 1,\n\t\t\t\t'失败' => 0,\n\t\t\t];\n\t\t\t$form->select('status','状态')->options($directors);\n\t\t\t$form->setAction('采集');\n\t\t});\n\t}", "private function build()\n {\n $this->form->addText(\n 'name',\n $this->teamMember === null ? null : $this->teamMember->getName(),\n null,\n 'inputText title',\n 'inputTextError title'\n );\n\n $this->form->addEditor(\n 'description',\n $this->teamMember === null ? null : $this->teamMember->getDescription()\n );\n\n $this->meta = new Meta(\n $this->form,\n $this->teamMember === null ? null : $this->teamMember->getMetaId(),\n 'name',\n true\n );\n }", "protected function createComponentRateForm()\r\n\t{\r\n\t\t$form = new Form;\r\n\t\t$form->addText('tarif', 'Tarifní sazba:')\r\n\t\t\t\t->setRequired('Uveďte tarifní hodinovou sazbu.')\r\n\t\t\t\t->setAttribute('class', 'cislo')\r\n\t\t\t\t->addFilter(array('Nette\\Forms\\Controls\\TextBase', 'filterFloat'))\r\n\t\t\t\t\t->controlPrototype->autocomplete('off')\r\n\t\t\t\t->addCondition($form::FILLED)\r\n\t\t\t\t\t\t->addRule($form::FLOAT, 'Hodnota musí být celé nebo reálné číslo.');\r\n\t\t\r\n\t\t$form->addText('hodnota', 'Kalkulační hodnota:')\r\n\t\t\t\t->setRequired('Uveďte kalkulační hodnotu tarifu.')\r\n\t\t\t\t->setAttribute('class', 'cislo')\r\n\t\t\t\t->addFilter(array('Nette\\Forms\\Controls\\TextBase', 'filterFloat'))\r\n\t\t\t\t\t->controlPrototype->autocomplete('off')\r\n\t\t\t\t->addCondition($form::FILLED)\r\n\t\t\t\t\t\t->addRule($form::FLOAT, 'Hodnota musí být celé nebo reálné číslo.');\r\n\r\n\t\t$form->addHidden('id_set_tarifu');\r\n\t\t$form->addHidden('id_typy_tarifu');\r\n\r\n\t\t$form->addSubmit('save', 'Uložit')->setAttribute('class', 'default');\r\n\t\t$form->addSubmit('cancel', 'Storno')->setValidationScope(FALSE);\r\n\t\t$form->onSuccess[] = callback($this, 'rateFormSubmitted');\r\n\r\n\t\t$form->addProtection(self::MESS_PROTECT);\r\n\t\treturn $form;\r\n\t}", "public function buildForm()\n {\n $this\n ->add('group_name', 'text')\n ->add(\n 'organizations',\n 'choice',\n [\n 'choices' => $this->getOrganizationName(),\n 'attr' => ['style' => 'height:100px'],\n 'multiple' => true\n ]\n )\n ->add(\n 'group_identifier',\n 'text',\n [\n 'attr' => [\n 'id' => 'group_identifier'\n ],\n 'help_block' => [\n 'text' => \"Your group identifier will be used as a prefix for your organisation group. We recommend that you use a short abbreviation that uniquely identifies your organisation group. If your group identifier is 'abc' the username for the group created with this registration will be 'abc_group'.\",\n 'tag' => 'p',\n 'attr' => ['class' => 'help-block']\n ],\n 'label' => 'Group Identifier'\n ]\n );\n }", "public function initClientOverviewForm()\n\t{\n\t\tglobal $lng, $ilCtrl;\n\n\t\t$settings = $this->setup->getClient()->getAllSettings();\n\n\t\tinclude_once(\"Services/Form/classes/class.ilPropertyFormGUI.php\");\n\t\t$this->form = new ilPropertyFormGUI();\n\n\t\t$this->form->setTitle($lng->txt(\"client_info\"));\n\n\t\t// installation name\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"inst_name\"), \"inst_name\");\n\t\t$ne->setValue(($this->setup->getClient()->getName())\n\t\t\t? $this->setup->getClient()->getName()\n\t\t\t: \"&lt;\".$this->lng->txt(\"no_client_name\").\"&gt;\");\n\t\t$ne->setInfo($this->setup->getClient()->getDescription());\n\t\t$this->form->addItem($ne);\n\n\t\t// client id\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"client_id\"), \"client_id\");\n\t\t$ne->setValue($this->setup->getClient()->getId());\n\t\t$this->form->addItem($ne);\n\n\t\t// nic id\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"ilias_nic_id\"), \"nic_id\");\n\t\t$ne->setValue(($this->setup->getClient()->db_installed)\n\t\t\t? $settings[\"inst_id\"]\n\t\t\t: $txt_no_database);\n\t\t$this->form->addItem($ne);\n\n\t\t// database version\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"db_version\"), \"db_vers\");\n\t\t$ne->setValue(($this->setup->getClient()->db_installed)\n\t\t\t? $settings[\"db_version\"]\n\t\t\t: $txt_no_database);\n\t\t$this->form->addItem($ne);\n\n\t\t// access status\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"access_status\"), \"status\");\n\t\t//$access_link = \"&nbsp;&nbsp;[<a href=\\\"setup.php?cmd=changeaccess&client_id=\".$this->setup->getClient()->getId().\"&back=view\\\">\".$this->lng->txt($access_button).\"</a>]\";\n\t\t$access_status = ($this->setup->getClient()->status[\"access\"][\"status\"]) ? \"online\" : \"disabled\";\n\t\t$ne->setValue($this->lng->txt($access_status).$access_link);\n\t\t$this->form->addItem($ne);\n\n\t\t// server information\n\t\t$sh = new ilFormSectionHeaderGUI();\n\t\t$sh->setTitle($this->lng->txt(\"server_info\"));\n\t\t$this->form->addItem($sh);\n\n\t\t// ilias version\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"ilias_version\"), \"il_vers\");\n\t\t$ne->setValue(ILIAS_VERSION);\n\t\t$this->form->addItem($ne);\n\n\t\t// host\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"host\"), \"host\");\n\t\t$ne->setValue($_SERVER[\"SERVER_NAME\"]);\n\t\t$this->form->addItem($ne);\n\n\t\t// ip address and port\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"ip_address\").\" & \".\n\t\t\t$lng->txt(\"port\"));\n\t\t$ne->setValue($_SERVER[\"SERVER_ADDR\"].\":\".$_SERVER[\"SERVER_PORT\"]);\n\t\t$this->form->addItem($ne);\n\n\t\t// server software\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"server_software\"), \"server_softw\");\n\t\t$ne->setValue($_SERVER[\"SERVER_SOFTWARE\"]);\n\t\t$this->form->addItem($ne);\n\n\t\t// http path\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"http_path\"), \"http_path\");\n\t\t$ne->setValue(ILIAS_HTTP_PATH);\n\t\t$this->form->addItem($ne);\n\n\t\t// absolute path\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"absolute_path\"), \"absolute_path\");\n\t\t$ne->setValue(ILIAS_ABSOLUTE_PATH);\n\t\t$this->form->addItem($ne);\n\n\t\t// third party tools\n\t\t$sh = new ilFormSectionHeaderGUI();\n\t\t$sh->setTitle($this->lng->txt(\"3rd_party_software\"));\n\t\t$this->form->addItem($sh);\n\n\t\t$tools = array(\"convert\", \"zip\", \"unzip\", \"ghostscript\", \"java\", \"htmldoc\", \"ffmpeg\");\n\n\t\tforeach ($tools as $tool)\n\t\t{\n\t\t\t// tool\n\t\t\t$ne = new ilNonEditableValueGUI($lng->txt($tool.\"_path\"), $tool.\"_path\");\n\t\t\t$p = $this->setup->ini->readVariable(\"tools\", $tool);\n\t\t\t$ne->setValue($p ? $p : $this->lng->txt(\"not_configured\"));\n\t\t\t$this->form->addItem($ne);\n\t\t}\n\n\t\t// latex\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"url_to_latex\"), \"latex_url\");\n\t\t$p = $this->setup->ini->readVariable(\"tools\", \"latex\"); // #13109\n\t\t$ne->setValue($p ? $p : $this->lng->txt(\"not_configured\"));\n\t\t$this->form->addItem($ne);\n\n\t\t// virus scanner\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"virus_scanner\"), \"vscan\");\n\t\t$ne->setValue($this->setup->ini->readVariable(\"tools\",\"vscantype\"));\n\t\t$this->form->addItem($ne);\n\n\t\t// scan command\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"scan_command\"), \"scan\");\n\t\t$p = $this->setup->ini->readVariable(\"tools\",\"scancommand\");\n\t\t$ne->setValue($p ? $p : $this->lng->txt(\"not_configured\"));\n\t\t$this->form->addItem($ne);\n\n\t\t// clean command\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"clean_command\"), \"clean\");\n\t\t$p = $this->setup->ini->readVariable(\"tools\",\"cleancommand\");\n\t\t$ne->setValue($p ? $p : $this->lng->txt(\"not_configured\"));\n\t\t$this->form->addItem($ne);\n\n\t\t$this->form->setFormAction(\"setup.php?cmd=gateway\");\n\t}", "protected function initHorizontal()\n {\n $hor = $this->horizontalCssClasses;\n $span = $this->getConfigParam('labelSpan', '');\n $size = $this->getConfigParam('deviceSize', '');\n $bsVer = $this->form->getBsVer();\n if ($bsVer > 3) {\n Html::addCssClass($this->options, 'row');\n }\n // check horizontalCssClasses['wrapper'] if there is a col- class\n if (isset($hor['wrapper']) && Lib::strpos($hor['wrapper'], 'col-') !== false) {\n $span = '';\n }\n if (empty($span) && !isset($hor['wrapper'])) {\n $span = $this->_settings['labelSpan'];\n }\n if (empty($size)) {\n $size = ArrayHelper::getValue($this->_settings, 'deviceSize');\n }\n $this->deviceSize = $size;\n if (empty($span)) {\n $span = ActiveForm::DEFAULT_LABEL_SPAN;\n }\n if ($span != self::NOT_SET && intval($span) > 0) {\n $span = intval($span);\n\n // validate if invalid labelSpan is passed - else set to DEFAULT_LABEL_SPAN\n if ($span <= 0 || $span >= $this->form->fullSpan) {\n $span = $this->form->fullSpan;\n }\n\n // validate if invalid deviceSize is passed - else default to SIZE_MEDIUM\n $sizes = [ActiveForm::SIZE_TINY, ActiveForm::SIZE_SMALL, ActiveForm::SIZE_MEDIUM, ActiveForm::SIZE_LARGE];\n if ($size == self::NOT_SET || !in_array($size, $sizes)) {\n $size = ActiveForm::SIZE_MEDIUM;\n }\n\n $this->labelSpan = $span;\n $prefix = $this->getColCss($size);\n $this->_labelCss = $prefix.$span;\n $this->_inputCss = $prefix.($this->form->fullSpan - $span);\n }\n\n if (isset($hor['wrapper'])) {\n if ($span !== self::NOT_SET) {\n $this->_inputCss .= \" \";\n }\n $this->_inputCss .= implode(' ', (array)$hor['wrapper']);\n }\n\n if (isset($hor['label'])) {\n if ($span !== self::NOT_SET) {\n $this->_labelCss .= \" \";\n }\n $this->_labelCss .= implode(' ', (array)$hor['label']);\n }\n\n if (isset($hor['error'])) {\n Html::addCssClass($this->errorOptions, $hor['error']);\n }\n }", "protected function getForm() {\n\t\tglobal $wgScript;\n\n\t\t$this->opts['title'] = $this->getPageTitle()->getPrefixedText();\n\t\tif ( !isset( $this->opts['target'] ) ) {\n\t\t\t$this->opts['target'] = '';\n\t\t} else {\n\t\t\t$this->opts['target'] = str_replace( '_', ' ', $this->opts['target'] );\n\t\t}\n\n\t\tif ( !isset( $this->opts['namespace'] ) ) {\n\t\t\t$this->opts['namespace'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['nsInvert'] ) ) {\n\t\t\t$this->opts['nsInvert'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['associated'] ) ) {\n\t\t\t$this->opts['associated'] = false;\n\t\t}\n\n\t\tif ( !isset( $this->opts['contribs'] ) ) {\n\t\t\t$this->opts['contribs'] = 'user';\n\t\t}\n\n\t\tif ( !isset( $this->opts['year'] ) ) {\n\t\t\t$this->opts['year'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['month'] ) ) {\n\t\t\t$this->opts['month'] = '';\n\t\t}\n\n\t\tif ( $this->opts['contribs'] == 'newbie' ) {\n\t\t\t$this->opts['target'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['tagfilter'] ) ) {\n\t\t\t$this->opts['tagfilter'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['topOnly'] ) ) {\n\t\t\t$this->opts['topOnly'] = false;\n\t\t}\n\n\t\tif ( !isset( $this->opts['newOnly'] ) ) {\n\t\t\t$this->opts['newOnly'] = false;\n\t\t}\n\n\t\t$form = Html::openElement(\n\t\t\t'form',\n\t\t\tarray(\n\t\t\t\t'method' => 'get',\n\t\t\t\t'action' => $wgScript,\n\t\t\t\t'class' => 'mw-contributions-form'\n\t\t\t)\n\t\t);\n\n\t\t# Add hidden params for tracking except for parameters in $skipParameters\n\t\t$skipParameters = array(\n\t\t\t'namespace',\n\t\t\t'nsInvert',\n\t\t\t'deletedOnly',\n\t\t\t'target',\n\t\t\t'contribs',\n\t\t\t'year',\n\t\t\t'month',\n\t\t\t'topOnly',\n\t\t\t'newOnly',\n\t\t\t'associated'\n\t\t);\n\n\t\tforeach ( $this->opts as $name => $value ) {\n\t\t\tif ( in_array( $name, $skipParameters ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$form .= \"\\t\" . Html::hidden( $name, $value ) . \"\\n\";\n\t\t}\n\n\t\t$tagFilter = ChangeTags::buildTagFilterSelector( $this->opts['tagfilter'] );\n\n\t\tif ( $tagFilter ) {\n\t\t\t$filterSelection = Html::rawElement(\n\t\t\t\t'td',\n\t\t\t\tarray( 'class' => 'mw-label' ),\n\t\t\t\tarray_shift( $tagFilter )\n\t\t\t);\n\t\t\t$filterSelection .= Html::rawElement(\n\t\t\t\t'td',\n\t\t\t\tarray( 'class' => 'mw-input' ),\n\t\t\t\timplode( '&#160', $tagFilter )\n\t\t\t);\n\t\t} else {\n\t\t\t$filterSelection = Html::rawElement( 'td', array( 'colspan' => 2 ), '' );\n\t\t}\n\n\t\t$labelNewbies = Xml::radioLabel(\n\t\t\t$this->msg( 'sp-contributions-newbies' )->text(),\n\t\t\t'contribs',\n\t\t\t'newbie',\n\t\t\t'newbie',\n\t\t\t$this->opts['contribs'] == 'newbie',\n\t\t\tarray( 'class' => 'mw-input' )\n\t\t);\n\t\t$labelUsername = Xml::radioLabel(\n\t\t\t$this->msg( 'sp-contributions-username' )->text(),\n\t\t\t'contribs',\n\t\t\t'user',\n\t\t\t'user',\n\t\t\t$this->opts['contribs'] == 'user',\n\t\t\tarray( 'class' => 'mw-input' )\n\t\t);\n\t\t$input = Html::input(\n\t\t\t'target',\n\t\t\t$this->opts['target'],\n\t\t\t'text',\n\t\t\tarray( 'size' => '40', 'required' => '', 'class' => 'mw-input' ) +\n\t\t\t\t( $this->opts['target'] ? array() : array( 'autofocus' )\n\t\t\t\t)\n\t\t);\n\t\t$targetSelection = Html::rawElement(\n\t\t\t'td',\n\t\t\tarray( 'colspan' => 2 ),\n\t\t\t$labelNewbies . '<br />' . $labelUsername . ' ' . $input . ' '\n\t\t);\n\n\t\t$namespaceSelection = Xml::tags(\n\t\t\t'td',\n\t\t\tarray( 'class' => 'mw-label' ),\n\t\t\tXml::label(\n\t\t\t\t$this->msg( 'namespace' )->text(),\n\t\t\t\t'namespace',\n\t\t\t\t''\n\t\t\t)\n\t\t);\n\t\t$namespaceSelection .= Html::rawElement(\n\t\t\t'td',\n\t\t\tnull,\n\t\t\tHtml::namespaceSelector(\n\t\t\t\tarray( 'selected' => $this->opts['namespace'], 'all' => '' ),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => 'namespace',\n\t\t\t\t\t'id' => 'namespace',\n\t\t\t\t\t'class' => 'namespaceselector',\n\t\t\t\t)\n\t\t\t) . '&#160;' .\n\t\t\t\tHtml::rawElement(\n\t\t\t\t\t'span',\n\t\t\t\t\tarray( 'style' => 'white-space: nowrap' ),\n\t\t\t\t\tXml::checkLabel(\n\t\t\t\t\t\t$this->msg( 'invert' )->text(),\n\t\t\t\t\t\t'nsInvert',\n\t\t\t\t\t\t'nsInvert',\n\t\t\t\t\t\t$this->opts['nsInvert'],\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'title' => $this->msg( 'tooltip-invert' )->text(),\n\t\t\t\t\t\t\t'class' => 'mw-input'\n\t\t\t\t\t\t)\n\t\t\t\t\t) . '&#160;'\n\t\t\t\t) .\n\t\t\t\tHtml::rawElement( 'span', array( 'style' => 'white-space: nowrap' ),\n\t\t\t\t\tXml::checkLabel(\n\t\t\t\t\t\t$this->msg( 'namespace_association' )->text(),\n\t\t\t\t\t\t'associated',\n\t\t\t\t\t\t'associated',\n\t\t\t\t\t\t$this->opts['associated'],\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'title' => $this->msg( 'tooltip-namespace_association' )->text(),\n\t\t\t\t\t\t\t'class' => 'mw-input'\n\t\t\t\t\t\t)\n\t\t\t\t\t) . '&#160;'\n\t\t\t\t)\n\t\t);\n\n\t\tif ( $this->getUser()->isAllowed( 'deletedhistory' ) ) {\n\t\t\t$deletedOnlyCheck = Html::rawElement(\n\t\t\t\t'span',\n\t\t\t\tarray( 'style' => 'white-space: nowrap' ),\n\t\t\t\tXml::checkLabel(\n\t\t\t\t\t$this->msg( 'history-show-deleted' )->text(),\n\t\t\t\t\t'deletedOnly',\n\t\t\t\t\t'mw-show-deleted-only',\n\t\t\t\t\t$this->opts['deletedOnly'],\n\t\t\t\t\tarray( 'class' => 'mw-input' )\n\t\t\t\t)\n\t\t\t);\n\t\t} else {\n\t\t\t$deletedOnlyCheck = '';\n\t\t}\n\n\t\t$checkLabelTopOnly = Html::rawElement(\n\t\t\t'span',\n\t\t\tarray( 'style' => 'white-space: nowrap' ),\n\t\t\tXml::checkLabel(\n\t\t\t\t$this->msg( 'sp-contributions-toponly' )->text(),\n\t\t\t\t'topOnly',\n\t\t\t\t'mw-show-top-only',\n\t\t\t\t$this->opts['topOnly'],\n\t\t\t\tarray( 'class' => 'mw-input' )\n\t\t\t)\n\t\t);\n\t\t$checkLabelNewOnly = Html::rawElement(\n\t\t\t'span',\n\t\t\tarray( 'style' => 'white-space: nowrap' ),\n\t\t\tXml::checkLabel(\n\t\t\t\t$this->msg( 'sp-contributions-newonly' )->text(),\n\t\t\t\t'newOnly',\n\t\t\t\t'mw-show-new-only',\n\t\t\t\t$this->opts['newOnly'],\n\t\t\t\tarray( 'class' => 'mw-input' )\n\t\t\t)\n\t\t);\n\t\t$extraOptions = Html::rawElement(\n\t\t\t'td',\n\t\t\tarray( 'colspan' => 2 ),\n\t\t\t$deletedOnlyCheck . $checkLabelTopOnly . $checkLabelNewOnly\n\t\t);\n\n\t\t$dateSelectionAndSubmit = Xml::tags( 'td', array( 'colspan' => 2 ),\n\t\t\tXml::dateMenu(\n\t\t\t\t$this->opts['year'] === '' ? MWTimestamp::getInstance()->format( 'Y' ) : $this->opts['year'],\n\t\t\t\t$this->opts['month']\n\t\t\t) . ' ' .\n\t\t\t\tXml::submitButton(\n\t\t\t\t\t$this->msg( 'sp-contributions-submit' )->text(),\n\t\t\t\t\tarray( 'class' => 'mw-submit' )\n\t\t\t\t)\n\t\t);\n\n\t\t$form .= Xml::fieldset( $this->msg( 'sp-contributions-search' )->text() );\n\t\t$form .= Html::rawElement( 'table', array( 'class' => 'mw-contributions-table' ), \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $targetSelection ) . \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $namespaceSelection ) . \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $filterSelection ) . \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $extraOptions ) . \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $dateSelectionAndSubmit ) . \"\\n\"\n\t\t);\n\n\t\t$explain = $this->msg( 'sp-contributions-explain' );\n\t\tif ( !$explain->isBlank() ) {\n\t\t\t$form .= \"<p id='mw-sp-contributions-explain'>{$explain->parse()}</p>\";\n\t\t}\n\n\t\t$form .= Xml::closeElement( 'fieldset' ) . Xml::closeElement( 'form' );\n\n\t\treturn $form;\n\t}", "private function display_progress_bar($args){\n $number_of_steps = count($this->step_ids);\n $current_step = $args['step'];\n\n echo '<ul class=\"list-unstyled\">';\n for($i = 1; $i < $number_of_steps - 1; $i++){\n echo '<li style=\"display:inline-block; margin-right:15px;\">Step ' . $i . '</li>';\n }\n echo '</ul>';\n }", "public function create(TaskFormBuilder $form)\n {\n return $form->render();\n }", "public function lblTamanhoId_Create($strControlId = null) {\n\t\t\t$this->lblTamanhoId = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblTamanhoId->Name = QApplication::Translate('Tamanho');\n\t\t\t$this->lblTamanhoId->Text = ($this->objComandoRisco->Tamanho) ? $this->objComandoRisco->Tamanho->__toString() : null;\n\t\t\t$this->lblTamanhoId->Required = true;\n\t\t\treturn $this->lblTamanhoId;\n\t\t}", "public function label() { }", "public function buildForm()\n {\n $this\n ->add(\n 'new_organization_group',\n 'collection',\n [\n 'type' => 'form',\n 'options' => [\n 'class' => 'App\\SuperAdmin\\Forms\\OrganizationGroupInformation',\n 'label' => false,\n ]\n ]\n )\n ->add(\n 'group_admin_information',\n 'collection',\n [\n 'type' => 'form',\n 'options' => [\n 'class' => 'App\\SuperAdmin\\Forms\\GroupAdmin',\n 'label' => false,\n ]\n ]\n )\n ->addSaveButton();\n }", "protected function form()\n {\n $form = new Form(new Category);\n\n $form->text('name', 'Имя');\n\n $form->textarea('text');\n\n $form->switch('status', 'Статус')->states([\n 'on' => ['value' => '1', 'text' => 'Публиковать', 'color' => 'success'],\n 'off' => ['value' => '0', 'text' => 'Не публиковать', 'color' => 'danger'],\n ]);\n\n\n return $form;\n }" ]
[ "0.73174626", "0.7069547", "0.61137474", "0.6010999", "0.5921938", "0.590024", "0.58631486", "0.5731205", "0.5695295", "0.56791323", "0.56460327", "0.5556063", "0.5541505", "0.5540495", "0.5534142", "0.5522498", "0.54466337", "0.54130286", "0.5405719", "0.53947335", "0.5379109", "0.53557545", "0.5343691", "0.53426117", "0.5328375", "0.5319822", "0.5313484", "0.5297975", "0.52861404", "0.5276629", "0.5267887", "0.5243647", "0.52406365", "0.52393824", "0.5218301", "0.5214838", "0.52020305", "0.51919734", "0.51902425", "0.5188809", "0.5187739", "0.51695585", "0.51620317", "0.51613456", "0.51576656", "0.51531386", "0.51519346", "0.5148538", "0.5145446", "0.5134276", "0.513239", "0.51310986", "0.5123028", "0.51134026", "0.51119286", "0.50979364", "0.50973195", "0.50776404", "0.5074554", "0.50666463", "0.5064477", "0.5061274", "0.5058611", "0.50541097", "0.50522614", "0.5048059", "0.5047317", "0.5042805", "0.5041308", "0.5038246", "0.50344646", "0.5032195", "0.5029596", "0.50185883", "0.5018513", "0.50162196", "0.50119406", "0.5008883", "0.5006235", "0.50025", "0.50013536", "0.4998796", "0.49981797", "0.49973005", "0.4993986", "0.49933988", "0.4986602", "0.49864584", "0.49859157", "0.49857464", "0.49836382", "0.49807253", "0.49779898", "0.49774688", "0.49760714", "0.49752578", "0.4973015", "0.49695745", "0.4969083", "0.4967902" ]
0.67848015
2
Builds the form that show a preview of your progress bar design
function buildForm() { $this->buildTabs(); // tab caption $this->addElement('header', null, 'Progress2 Generator - Control Panel: run demo'); $this->addElement('static', 'progressBar', 'Your progress meter looks like:'); // Buttons of the wizard to do the job $this->buildButtons(array('reset','process')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: main properties');\r\n\r\n $shape[] =& $this->createElement('radio', null, null, 'Horizontal', '1');\r\n $shape[] =& $this->createElement('radio', null, null, 'Vertical', '2');\r\n $this->addGroup($shape, 'shape', 'Shape:');\r\n\r\n $way[] =& $this->createElement('radio', null, null, 'Natural', 'natural');\r\n $way[] =& $this->createElement('radio', null, null, 'Reverse', 'reverse');\r\n $this->addGroup($way, 'way', 'Direction:');\r\n\r\n $autosize[] =& $this->createElement('radio', null, null, 'Yes', true);\r\n $autosize[] =& $this->createElement('radio', null, null, 'No', false);\r\n $this->addGroup($autosize, 'autosize', 'Best size:');\r\n\r\n $psize['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 4));\r\n $psize['height'] =& $this->createElement('text',\r\n 'height', 'height',\r\n array('size' => 4));\r\n $psize['left'] =& $this->createElement('text',\r\n 'left', 'left',\r\n array('size' => 4));\r\n $psize['top'] =& $this->createElement('text',\r\n 'top', 'top',\r\n array('size' => 4));\r\n $psize['position'] =& $this->createElement('text',\r\n 'position', 'position',\r\n array('disabled' => 'true'));\r\n $psize['bgcolor'] =& $this->createElement('text',\r\n 'bgcolor', 'bgcolor',\r\n array('size' => 7));\r\n $this->addGroup($psize, 'progresssize',\r\n 'Size, position and color:', ' ');\r\n\r\n $this->addElement('text', 'rAnimSpeed',\r\n array('Animation speed :',\r\n '(0-1000 ; 0:fast, 1000:slow)'));\r\n $this->addRule('rAnimSpeed',\r\n 'Should be between 0 and 1000',\r\n 'rangelength', array(0,1000), 'client');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('back','apply','process'));\r\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: border properties');\r\n\r\n $borderpainted[] =& $this->createElement('radio', null, null, 'Yes', true);\r\n $borderpainted[] =& $this->createElement('radio', null, null, 'No', false);\r\n $this->addGroup($borderpainted, 'borderpainted', 'Display the border:');\r\n\r\n $this->addElement('text', 'borderclass', 'CSS class:', array('size' => 32));\r\n\r\n $borderstyle['style'] =& $this->createElement('select',\r\n 'style', 'style',\r\n array('solid' => 'Solid',\r\n 'dashed' => 'Dashed',\r\n 'dotted' => 'Dotted',\r\n 'inset' => 'Inset',\r\n 'outset' => 'Outset'));\r\n $borderstyle['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 2));\r\n $borderstyle['color'] =& $this->createElement('text',\r\n 'color', 'color',\r\n array('size' => 7));\r\n $this->addGroup($borderstyle, 'borderstyle', null, ' ');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('apply','process'));\r\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: save PHP/CSS code');\r\n\r\n $code[] =& $this->createElement('checkbox', 'P', null, 'PHP');\r\n $code[] =& $this->createElement('checkbox', 'C', null, 'CSS');\r\n $this->addGroup($code, 'phpcss', 'PHP and/or StyleSheet source code:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('next','apply'));\r\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: string properties');\r\n\r\n $stringpainted[] =& $this->createElement('radio', null, null, 'Yes', true);\r\n $stringpainted[] =& $this->createElement('radio', null, null, 'No', false);\r\n $this->addGroup($stringpainted, 'stringpainted', 'Render a custom string:');\r\n\r\n $this->addElement('text', 'stringid', 'Id:', array('size' => 32));\r\n $this->addElement('text', 'stringclass', 'CSS class:', array('size' => 32));\r\n $this->addElement('text', 'stringvalue', 'Content:', array('size' => 32));\r\n\r\n $stringsize['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 4));\r\n $stringsize['height'] =& $this->createElement('text',\r\n 'height', 'height',\r\n array('size' => 4));\r\n $stringsize['left'] =& $this->createElement('text',\r\n 'left', 'left',\r\n array('size' => 4));\r\n $stringsize['top'] =& $this->createElement('text',\r\n 'top', 'top',\r\n array('size' => 4));\r\n $stringsize['bgcolor'] =& $this->createElement('text',\r\n 'bgcolor', 'bgcolor',\r\n array('size' => 7));\r\n $this->addGroup($stringsize, 'stringsize', 'Size, position and color:', ' ');\r\n\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Left', 'left');\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Right', 'right');\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Top', 'top');\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Bottom', 'bottom');\r\n $this->addGroup($stringvalign, 'stringvalign', 'Vertical alignment:');\r\n\r\n $stringalign[] =& $this->createElement('radio', null, null,\r\n 'Left', 'left');\r\n $stringalign[] =& $this->createElement('radio', null, null,\r\n 'Right', 'right');\r\n $stringalign[] =& $this->createElement('radio', null, null,\r\n 'Center', 'center');\r\n $this->addGroup($stringalign, 'stringalign', 'Horizontal alignment:');\r\n\r\n $stringfont['family'] =& $this->createElement('text',\r\n 'family', 'family',\r\n array('size' => 40));\r\n $stringfont['size'] =& $this->createElement('text',\r\n 'size', 'size',\r\n array('size' => 2));\r\n $stringfont['color'] =& $this->createElement('text',\r\n 'color', 'color',\r\n array('size' => 7));\r\n $this->addGroup($stringfont, 'stringfont', 'Font:', ' ');\r\n\r\n $stringweight[] =& $this->createElement('radio', null, null,\r\n 'normal', 'normal');\r\n $stringweight[] =& $this->createElement('radio', null, null,\r\n 'Bold', 'bold');\r\n $this->addGroup($stringweight, 'stringweight', 'Font weight:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('apply','process'));\r\n }", "public function buildForm()\n {\n $this\n ->addMeasureList()\n ->addAscendingList()\n ->addTitles(['class' => 'indicator_title_title_narrative', 'narrative_true' => true])\n ->addDescriptions(['class' => 'indicator_description_title_narrative'])\n ->addCollection('reference', 'Activity\\Reference', 'reference', [], trans('elementForm.reference'))\n ->addAddMoreButton('add_reference', 'reference')\n ->addBaselines()\n ->addPeriods()\n ->addAddMoreButton('add_period', 'period')\n ->addRemoveThisButton('remove_indicator');\n }", "function show_form()\n\t\t{\n\t\t\t//set a global template for interactive activities\n\t\t\t$this->t->set_file('run_activity','run_activity.tpl');\n\t\t\t\n\t\t\t//set the css style files links\n\t\t\t$this->t->set_var(array(\n\t\t\t\t'run_activity_css_link'\t=> $this->get_css_link('run_activity', $this->print_mode),\n\t\t\t\t'run_activity_print_css_link'\t=> $this->get_css_link('run_activity', true),\n\t\t\t));\n\t\t\t\n\t\t\t\n\t\t\t// draw the activity's title zone\n\t\t\t$this->parse_title($this->activity_name);\n\n\t\t\t//draw the instance_name input or label\n\t\t\t// init wf_name to the requested one or the stored name\n\t\t\t// the requested one handle the looping in activity form\n\n\t\t\t$wf_name = get_var('wf_name','post',$this->instance->getName());\n\t\t\t$this->parse_instance_name($wf_name);\n\n\t\t\t//draw the instance_name input or label\n\t\t\t// init wf_set_owner to the requested one or the stored owner\n\t\t\t// the requested one handle the looping in activity form\n\t\t\t$wf_set_owner = get_var('wf_set_owner','post',$this->instance->getOwner());\n\t\t\t$this->parse_instance_owner($wf_set_owner);\n\t\t\t\n\t\t\t// draw the activity central user form\n\t\t\t$this->t->set_var(array('activity_template' => $this->wf_template->parse('output', 'template')));\n\t\t\t\n\t\t\t//draw the select priority box\n\t\t\t// init priority to the requested one or the stored priority\n\t\t\t// the requested one handle the looping in activity form\n\t\t\t$priority = get_var('wf_priority','post',$this->instance->getPriority());\n\t\t\t$this->parse_priority($priority);\n\t\t\t\n\t\t\t//draw the select next_user box\n\t\t\t// init next_user to the requested one or the stored one\n\t\t\t// the requested one handle the looping in activity form\n\t\t\t$next_user = get_var('wf_next_user','POST',$this->instance->getNextUser());\n\t\t\t$this->parse_next_user($next_user);\n\t\t\t\n\t\t\t//draw print_mode buttons\n\t\t\t$this->parse_print_mode_buttons();\n\t\t\t\n\t\t\t//draw the activity submit buttons\t\n\t\t\t$this->parse_submit();\n\t\t\t\n\t\t\t//draw the info zone\n\t\t\t$this->parse_info_zone();\n\t\t\t\n\t\t\t//draw the history zone if user wanted it\n\t\t\t$this->parse_history_zone();\n\t\t\t\n\t\t\t$this->translate_template('run_activity');\n\t\t\t$this->t->pparse('output', 'run_activity');\n\t\t\t$GLOBALS['egw']->common->egw_footer();\n\t\t}", "public function ajax_example_progressbar_callback($form, &$form_state) {\n $variable_name = 'example_progressbar_' . $form_state['time'];\n $commands = array();\n\n variable_set($variable_name, 10);\n sleep(2);\n variable_set($variable_name, 40);\n sleep(2);\n variable_set($variable_name, 70);\n sleep(2);\n variable_set($variable_name, 90);\n sleep(2);\n variable_del($variable_name);\n\n $commands[] = HtmlCommand('#progress-status', $this->t('Executed.'));\n\n return array(\n '#type' => 'ajax',\n '#commands' => $commands,\n );\n}", "public function progressBar()\n {\n \n self::$view='adminlte::progress.bar';\n return $this;\n \n }", "public function createForm() {\n module_load_include('inc', 'islandora_form_builder', 'FormGenerator');\n $form_values = &$this->formState['values'];\n $file = isset($form_values['ingest-file-location']) ? $form_values['ingest-file-location'] : '';\n $form['#attributes']['enctype'] = 'multipart/form-data';\n $form['indicator']['ingest-file-location'] = array(\n '#type' => 'file',\n '#title' => t('Upload Document'),\n '#size' => 48,\n '#description' => t('Select file to be added the the object.'),\n );\n $form_generator = FormGenerator::CreateFromModel($this->contentModelPid, $this->contentModelDsid);\n $form[FORM_ROOT] = $form_generator->generate($this->formName); // TODO get from user .\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Ingest'),\n '#prefix' => t('Please be patient. Once you click next there may be a number of files created. ' .\n 'Depending on your content model this could take a few minutes to process.<br />')\n );\n return $form;\n }", "public function display() {\r\n self::createUploaderScript();\r\n\r\n $this->echoOptionHeader();\r\n\r\n // Display the preview file name.\r\n $value = $this->getValue();\r\n if ( ! is_array( $value ) ) {\r\n $value = $this->getValue();\r\n }\r\n\r\n $previewFile = '';\r\n if ( ! empty( $value ) ) {\r\n $previewFile = \"<i class='dashicons dashicons-no-alt remove'></i><p>\". basename( get_attached_file( $value ) ) . \"</p>\";\r\n } else {\r\n $previewFile = $this->settings['label'];\r\n }\r\n echo \"<div class='tf-file-upload'>\" . $previewFile . '</div>';\r\n\r\n printf('<input name=\"%s\" placeholder=\"%s\" id=\"%s\" type=\"hidden\" value=\"%s\" />',\r\n $this->getID(),\r\n $this->settings['placeholder'],\r\n $this->getID(),\r\n esc_attr( $this->getValue() )\r\n );\r\n $this->echoOptionFooter();\r\n }", "function build_basic_form()\r\n {\r\n $this->addElement('select', LanguagePack :: PROPERTY_BRANCH, Translation :: get('Branch'), LanguagePack :: get_branch_options());\r\n \r\n \t$this->addElement('file', 'file', Translation :: get('FileName'));\r\n $allowed_upload_types = array('zip');\r\n $this->addRule('file', Translation :: get('OnlyZIPAllowed'), 'filetype', $allowed_upload_types);\r\n $this->addRule('file', Translation :: get('ThisFieldIsRequired', null, Utilities :: COMMON_LIBRARIES), 'required');\r\n \r\n // Submit button\r\n //$this->addElement('submit', 'user_settings', 'OK');\r\n $buttons[] = $this->createElement('style_submit_button', 'submit', Translation :: get('Import', null, Utilities :: COMMON_LIBRARIES), array('class' => 'positive'));\r\n $buttons[] = $this->createElement('style_reset_button', 'reset', Translation :: get('Reset', null, Utilities :: COMMON_LIBRARIES), array('class' => 'normal empty'));\r\n \r\n $this->addGroup($buttons, 'buttons', null, '&nbsp;', false);\r\n }", "public function form_footer_progress_block_html() {\n\n\t\t$progress_style = ! empty( $this->form_data['settings']['conversational_forms_progress_bar'] ) ? $this->form_data['settings']['conversational_forms_progress_bar'] : '';\n\n\t\t?>\n\t\t<div class=\"wpforms-conversational-form-footer-progress\">\n\t\t\t<div class=\"wpforms-conversational-form-footer-progress-status\">\n\t\t\t\t<?php\n\t\t\t\tif ( 'proportion' === $progress_style ) {\n\t\t\t\t\t$this->form_footer_progress_status_proportion_html();\n\t\t\t\t} else {\n\t\t\t\t\t$this->form_footer_progress_status_percentage_html();\n\t\t\t\t}\n\t\t\t\t?>\n\t\t\t</div>\n\t\t\t<div class=\"wpforms-conversational-form-footer-progress-bar\">\n\t\t\t\t<div class=\"wpforms-conversational-form-footer-progress-completed\"></div>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t}", "protected function form()\n {\n $form = new Form(new Activity());\n\n $form->text('name', __('Name'));\n $form->image('image', __('Image'));\n $form->text('intro', __('Intro'));\n $form->UEditor('details', __('Details'));\n $form->datetime('start_at', __('Start at'))->default(date('Y-m-d H:i:s'));\n $form->datetime('end_at', __('End at'))->default(date('Y-m-d H:i:s'));\n $form->text('location', __('Location'));\n $form->decimal('fee', __('Fee'))->default(0.00);\n $form->number('involves', __('Involves'));\n $form->number('involves_min', __('Involves min'));\n $form->number('involves_max', __('Involves max'));\n $form->switch('status', __('Status'));\n $form->text('organizers', __('Organizers'));\n $form->number('views', __('Views'));\n $form->switch('is_stick', __('Is stick'));\n\n return $form;\n }", "public function buildForm()\n {\n }", "public function append_media_upload_form() {\n \n ?>\n <!-- Add from Media Library -->\n <a href=\"#\" class=\"envira-media-library button\" title=\"<?php _e( 'Click Here to Insert from Other Image Sources', 'envira-gallery' ); ?>\" style=\"vertical-align: baseline;\">\n <?php _e( 'Select Files from Other Sources', 'envira-gallery' ); ?>\n </a>\n\n <!-- Progress Bar -->\n <div class=\"envira-progress-bar\">\n <div class=\"envira-progress-bar-inner\"></div>\n <div class=\"envira-progress-bar-status\">\n <span class=\"uploading\">\n <?php _e( 'Uploading Image', 'envira-gallery' ); ?>\n <span class=\"current\">1</span>\n <?php _e( 'of', 'envira-gallery' ); ?>\n <span class=\"total\">3</span>\n </span>\n\n <span class=\"done\"><?php _e( 'All images uploaded.', 'envira-gallery' ); ?></span>\n </div>\n </div>\n <?php\n\n }", "protected function build()\n {\n $stockalign = new GtkAlignment(0, 0, 0, 0);\n $stockalign->add(\n GtkImage::new_from_stock(\n Gtk::STOCK_DIALOG_ERROR, Gtk::ICON_SIZE_DIALOG\n )\n );\n $this->pack_start($stockalign, false, true);\n\n\n $this->expander = new GtkExpander('');\n\n $this->message = new GtkLabel();\n $this->expander->set_label_widget($this->message);\n $this->message->set_selectable(true);\n $this->message->set_line_wrap(true);\n\n $this->userinfo = new GtkLabel();\n $this->userinfo->set_selectable(true);\n $this->userinfo->set_line_wrap(true);\n //FIXME: add scrolled window\n $this->expander->add($this->userinfo);\n\n $this->pack_start($this->expander);\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: cell properties');\r\n\r\n $this->addElement('text', 'cellid', 'Id mask:', array('size' => 32));\r\n $this->addElement('text', 'cellclass', 'CSS class:', array('size' => 32));\r\n\r\n $cellvalue['min'] =& $this->createElement('text',\r\n 'min', 'minimum',\r\n array('size' => 4));\r\n $cellvalue['max'] =& $this->createElement('text',\r\n 'max', 'maximum',\r\n array('size' => 4));\r\n $cellvalue['inc'] =& $this->createElement('text',\r\n 'inc', 'increment',\r\n array('size' => 4));\r\n $this->addGroup($cellvalue, 'cellvalue', 'Value:', ' ');\r\n\r\n $cellsize['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 4));\r\n $cellsize['height'] =& $this->createElement('text',\r\n 'height', 'height',\r\n array('size' => 4));\r\n $cellsize['spacing'] =& $this->createElement('text',\r\n 'spacing', 'spacing',\r\n array('size' => 2));\r\n $cellsize['count'] =& $this->createElement('text',\r\n 'count', 'count',\r\n array('size' => 2));\r\n $this->addGroup($cellsize, 'cellsize', 'Size:', ' ');\r\n\r\n $cellcolor['active'] =& $this->createElement('text',\r\n 'active', 'active',\r\n array('size' => 7));\r\n $cellcolor['inactive'] =& $this->createElement('text',\r\n 'inactive', 'inactive',\r\n array('size' => 7));\r\n $cellcolor['bgcolor'] =& $this->createElement('text',\r\n 'bgcolor', 'background',\r\n array('size' => 7));\r\n $this->addGroup($cellcolor, 'cellcolor', 'Color:', ' ');\r\n\r\n $cellfont['family'] =& $this->createElement('text',\r\n 'family', 'family',\r\n array('size' => 32));\r\n $cellfont['size'] =& $this->createElement('text',\r\n 'size', 'size',\r\n array('size' => 2));\r\n $cellfont['color'] =& $this->createElement('text',\r\n 'color', 'color',\r\n array('size' => 7));\r\n $this->addGroup($cellfont, 'cellfont', 'Font:', ' ');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('apply','process'));\r\n }", "protected function buildForm()\n {\n $this->form = Yii::createObject(array_merge([\n 'scenario' => $this->scenario,\n 'parent_id' => $this->parent_id,\n 'parentTariff' => $this->parentTariff,\n 'tariff' => $this->tariff,\n ], $this->getFormOptions()));\n }", "function showPreviewForm()\n {\n $ok = $this->preview();\n if (!$ok) {\n // @todo FIXME maybe provide a cancel button or link back?\n return;\n }\n\n $this->elementStart('div', 'entity_actions');\n $this->elementStart('ul');\n $this->elementStart('li', 'entity_subscribe');\n $this->elementStart('form', array('method' => 'post',\n 'id' => 'form_ostatus_sub',\n 'class' => 'form_remote_authorize',\n 'action' =>\n $this->selfLink()));\n $this->elementStart('fieldset');\n $this->hidden('token', common_session_token());\n $this->hidden('profile', $this->profile_uri);\n if ($this->oprofile->isGroup()) {\n // TRANS: Button text.\n $this->submit('submit', _m('Join'), 'submit', null,\n // TRANS: Tooltip for button \"Join\".\n _m('BUTTON','Join this group'));\n } else {\n // TRANS: Button text.\n $this->submit('submit', _m('BUTTON','Confirm'), 'submit', null,\n // TRANS: Tooltip for button \"Confirm\".\n _m('Subscribe to this user'));\n }\n $this->elementEnd('fieldset');\n $this->elementEnd('form');\n $this->elementEnd('li');\n $this->elementEnd('ul');\n $this->elementEnd('div');\n }", "protected function form()\n {\n $form = new Form(new PrizesLog);\n\n // 去掉`删除`按钮\n $form->tools(function (Form\\Tools $tools) {\n $tools->disableDelete();\n $tools->disableView();\n });\n\n $form->text('group.title', '奖品组')->readonly();\n $form->text('prize.name', '奖品名称')->readonly();\n $form->text('material.title', '物料名称')->readonly();\n $form->text('material_code', '物料代码')->readonly();\n $form->text('user.username', '用户名')->readonly();\n $form->text('user.mobile', '用户手机号')->readonly();\n $form->select('source', '来源')->options([\n '' => '', 'exchange' => '兑换/领取', 'lottery' => '抽奖'\n ])->readonly();\n $form->ip('ip', 'IP地址')->readonly();\n $form->datetime('created_at', '中奖时间')->readonly();\n $form->embeds('leaving_capital', '留资信息', function ($form) {\n $form->text('name', '收件人');\n $form->mobile('mobile', '手机号');\n $form->text('address', '收件地址');\n });\n $form->radio('status', '状态')->options([\n '0' => '作废', '1' => '有效'\n ])->default('1');\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Carousel);\n\n $form->select('carousel_category_id', __('carousel::carousel.carousel_category_id'))\n ->options(CarouselCategory::all()->pluck('name', 'id'));\n $form->text('title', __('carousel::carousel.title'));\n $form->text('url', __('carousel::carousel.url'));\n $form->image('img_src', __('carousel::carousel.img_src'))\n ->removable()\n ->uniqueName()\n ->move('carousel');\n $form->text('alt', __('carousel::carousel.alt'));\n $form->textarea('remark', __('carousel::carousel.remark'));\n $form->select('status', __('carousel::carousel.status.label'))\n ->default(1)\n ->options(__('carousel::carousel.status.value'));\n $form->datetime('start_time', __('carousel::carousel.start_time'))\n ->default(date('Y-m-d H:i:s'));\n $form->datetime('end_time', __('carousel::carousel.end_time'))\n ->default(date('Y-m-d H:i:s'));\n\n return $form;\n }", "function SLFramework_Progressbar($length=300, $height=20, $start=0, $insideText=\"\", $id=\"progressbar\") {\r\n\t\t\t$this->length = $length ; \r\n\t\t\t$this->insideText = $insideText ; \r\n\t\t\t$this->height = $height ; \r\n\t\t\t$this->start = $start ; \r\n\t\t\t$this->id = $id ; \r\n\t\t}", "public function form()\n {\n $this->switch('auto_df_switch', __('message.tikuanconfig.auto_df_switch'));\n $this->timeRange('auto_df_stime', 'auto_df_etime', '开启时间');\n $this->text('auto_df_maxmoney', __('message.tikuanconfig.auto_df_maxmoney'))->setWidth(2);\n $this->text('auto_df_max_count', __('message.tikuanconfig.auto_df_max_count'))->setWidth(2);\n $this->text('auto_df_max_sum', __('message.tikuanconfig.auto_df_max_sum'))->setWidth(2);\n\n }", "protected function form() {\n\t\treturn Admin::form(WhtSpiderLogModel::class,function (Form $form) {\n\t\t\t$directors = [\n\t\t\t\t'成功' => 1,\n\t\t\t\t'失败' => 0,\n\t\t\t];\n\t\t\t$form->select('status','状态')->options($directors);\n\t\t\t$form->setAction('采集');\n\t\t});\n\t}", "function buildSettingsForm() {}", "function update_spinner_preview() {\n if (! isset($_POST)) wp_die();\n\n $type = isset($_POST['type']) ? $_POST['type'] : '';\n\n $wfc_preloader_options = $this->wfc_preloader_options();\n WFC_Preloader_Spinners::spinner($type, $wfc_preloader_options['spinner_size'], $wfc_preloader_options['spinner_color']);\n\n wp_die();\n }", "protected function form()\n {\n $form = new Form(new Banner);\n\n $form->text('title', 'Title');\n $form->image('image', 'Image')->rules('required')->move('images/banners');\n $form->switch('status', 'Published')->default(1);\n\n $form->footer(function ($footer) {\n // disable `View` checkbox\n $footer->disableViewCheck();\n\n // disable `Continue editing` checkbox\n $footer->disableEditingCheck();\n\n // disable `Continue Creating` checkbox\n $footer->disableCreatingCheck();\n\n });\n return $form;\n }", "public function renderUploadForm() {}", "function form( $instance ) {\n\t\t\n\t\tTrends()->view->load(\n\t\t\t'/view/backend',\n\t\t\tarray(\n\t\t\t\t'widget' => $this,\n\t\t\t\t'instance' => $instance\n\t\t\t),\n\t\t\tfalse,\n\t\t\tdirname( __FILE__ )\n\t\t);\n\t\t\n\t}", "function form( $instance ){\n\n\t\t\t// $instance Defaults\n\t\t\t$instance_defaults = $this->defaults;\n\n\t\t\t// If we have information in this widget, then ignore the defaults\n\t\t\tif( !empty( $instance ) ) $instance_defaults = array();\n\n\t\t\t// Parse $instance\n\t\t\t$instance = wp_parse_args( $instance, $instance_defaults );\n\n\t\t\textract( $instance, EXTR_SKIP );\n\n\t\t\t$design_bar_components = apply_filters( 'layers_' . $this->widget_id . '_widget_design_bar_components' , array(\n\t\t\t\t\t'layout',\n\t\t\t\t\t'fonts',\n\t\t\t\t\t'custom',\n\t\t\t\t\t'columns',\n\t\t\t\t\t'liststyle',\n\t\t\t\t\t'imageratios',\n\t\t\t\t\t'background',\n\t\t\t\t\t'advanced'\n\t\t\t\t) );\n\n\t\t\t$design_bar_custom_components = apply_filters( 'layers_' . $this->widget_id . '_widget_design_bar_custom_components' , array(\n\t\t\t\t\t'display' => array(\n\t\t\t\t\t\t'icon-css' => 'icon-display',\n\t\t\t\t\t\t'label' => __( 'Display', 'layerswp' ),\n\t\t\t\t\t\t'elements' => array(\n\t\t\t\t\t\t\t\t'text_style' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'text_style' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'text_style' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $text_style ) ) ? $text_style : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Title &amp; Excerpt Position' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t\t\t\t\t'regular' => __( 'Regular' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t\t\t'overlay' => __( 'Overlay' , 'layerswp' )\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'show_media' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_media' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_media' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_media ) ) ? $show_media : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Featured Images' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'show_titles' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_titles' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_titles' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_titles ) ) ? $show_titles : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Post Titles' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'show_excerpts' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_excerpts' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_excerpts' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_excerpts ) ) ? $show_excerpts : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Post Excerpts' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n 'excerpt_length' => array(\n 'type' => 'number',\n 'name' => $this->get_field_name( 'excerpt_length' ) ,\n 'id' => $this->get_field_id( 'excerpt_length' ) ,\n 'min' => 0,\n 'max' => 10000,\n 'value' => ( isset( $excerpt_length ) ) ? $excerpt_length : NULL,\n 'label' => __( 'Excerpts Length' , 'layerswp' )\n ),\n\t\t\t\t\t\t\t\t'show_dates' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_dates' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_dates' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_dates ) ) ? $show_dates : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Post Dates' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'show_author' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_author' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_author' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_author ) ) ? $show_author : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Post Author' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'show_tags' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_tags' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_tags' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_tags ) ) ? $show_tags : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Tags' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'show_categories' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_categories' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_categories' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_categories ) ) ? $show_categories : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Categories' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'show_call_to_action' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_call_to_action' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_call_to_action' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_call_to_action ) ) ? $show_call_to_action : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show \"Read More\" Buttons' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n 'call_to_action' => array(\n 'type' => 'text',\n 'name' => $this->get_field_name( 'call_to_action' ) ,\n 'id' => $this->get_field_id( 'call_to_action' ) ,\n 'value' => ( isset( $call_to_action ) ) ? $call_to_action : NULL,\n 'label' => __( '\"Read More\" Text' , 'layerswp' )\n ),\n\t\t\t\t\t\t\t\t'show_pagination' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_pagination' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_pagination' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_pagination ) ) ? $show_pagination : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Pagination' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t) );\n\n\t\t\t$this->design_bar(\n\t\t\t\t'side', // CSS Class Name\n\t\t\t\tarray(\n\t\t\t\t\t'name' => $this->get_field_name( 'design' ),\n\t\t\t\t\t'id' => $this->get_field_id( 'design' ),\n\t\t\t\t), // Widget Object\n\t\t\t\t$instance, // Widget Values\n\t\t\t\t$design_bar_components, // Standard Components\n\t\t\t\t$design_bar_custom_components // Add-on Components\n\t\t\t); ?>\n\t\t\t<div class=\"layers-container-large\">\n\n\t\t\t\t<?php $this->form_elements()->header( array(\n\t\t\t\t\t'title' => __( 'Post' , 'layerswp' ),\n\t\t\t\t\t'icon_class' =>'post'\n\t\t\t\t) ); ?>\n\n\t\t\t\t<section class=\"layers-accordion-section layers-content\">\n\n\t\t\t\t\t<div class=\"layers-row layers-push-bottom\">\n\t\t\t\t\t\t<p class=\"layers-form-item\">\n\t\t\t\t\t\t\t<?php echo $this->form_elements()->input(\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'title' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'title' ) ,\n\t\t\t\t\t\t\t\t\t'placeholder' => __( 'Enter title here' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $title ) ) ? $title : NULL ,\n\t\t\t\t\t\t\t\t\t'class' => 'layers-text layers-large'\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t); ?>\n\t\t\t\t\t\t</p>\n\n\t\t\t\t\t\t<p class=\"layers-form-item\">\n\t\t\t\t\t\t\t<?php echo $this->form_elements()->input(\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'type' => 'textarea',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'excerpt' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'excerpt' ) ,\n\t\t\t\t\t\t\t\t\t'placeholder' => __( 'Short Excerpt' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $excerpt ) ) ? $excerpt : NULL ,\n\t\t\t\t\t\t\t\t\t'class' => 'layers-textarea layers-large'\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t); ?>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<?php // Grab the terms as an array and loop 'em to generate the $options for the input\n\t\t\t\t\t\t$terms = get_terms( $this->taxonomy );\n\t\t\t\t\t\tif( !is_wp_error( $terms ) ) { ?>\n\t\t\t\t\t\t\t<p class=\"layers-form-item\">\n\t\t\t\t\t\t\t\t<label for=\"<?php echo $this->get_field_id( 'category' ); ?>\"><?php echo __( 'Category to Display' , 'layerswp' ); ?></label>\n\t\t\t\t\t\t\t\t<?php $category_options[ 0 ] = __( 'All' , 'layerswp' );\n\t\t\t\t\t\t\t\tforeach ( $terms as $t ) $category_options[ $t->term_id ] = $t->name;\n\t\t\t\t\t\t\t\techo $this->form_elements()->input(\n\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'category' ) ,\n\t\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'category' ) ,\n\t\t\t\t\t\t\t\t\t\t'placeholder' => __( 'Select a Category' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t\t'value' => ( isset( $category ) ) ? $category : NULL ,\n\t\t\t\t\t\t\t\t\t\t'options' => $category_options\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t); ?>\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<?php } // if !is_wp_error ?>\n\t\t\t\t\t\t<p class=\"layers-form-item\">\n\t\t\t\t\t\t\t<label for=\"<?php echo $this->get_field_id( 'posts_per_page' ); ?>\"><?php echo __( 'Number of items to show' , 'layerswp' ); ?></label>\n\t\t\t\t\t\t\t<?php $select_options[ '-1' ] = __( 'Show All' , 'layerswp' );\n\t\t\t\t\t\t\t$select_options = $this->form_elements()->get_incremental_options( $select_options , 1 , 20 , 1);\n\t\t\t\t\t\t\techo $this->form_elements()->input(\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'type' => 'number',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'posts_per_page' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'posts_per_page' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $posts_per_page ) ) ? $posts_per_page : NULL ,\n\t\t\t\t\t\t\t\t\t'min' => '-1',\n\t\t\t\t\t\t\t\t\t'max' => '100'\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t); ?>\n\t\t\t\t\t\t</p>\n\n\t\t\t\t\t\t<p class=\"layers-form-item\">\n\t\t\t\t\t\t\t<label for=\"<?php echo $this->get_field_id( 'order' ); ?>\"><?php echo __( 'Sort by' , 'layerswp' ); ?></label>\n\t\t\t\t\t\t\t<?php echo $this->form_elements()->input(\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'order' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'order' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $order ) ) ? $order : NULL ,\n\t\t\t\t\t\t\t\t\t'options' => $this->form_elements()->get_sort_options()\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t); ?>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t</section>\n\n\t\t\t</div>\n\t\t<?php }", "protected function buildForm()\n\t{\t\n\t\t$mid = $this->Form->newInput( 'hidden' );\n\t\t$mid->set( 'name', 'mid' );\n\t\t$mid->set( 'id', 'mid' );\n\t\t$mid->set( 'value', $this->data['id'] );\n\t\t\n\t\t$submit = $this->Form->newInput( 'submit' );\n\t\t$submit->set( 'name', 'submit' );\n\t\t$submit->set( 'id', 'submit' );\n\t\t$submit->set( 'value', 'Restore' );\n\t}", "protected function Form_Create() {\n\t\t\t$this->txtValue1 = new QTextBox($this);\n\t\t\t\n\t\t\t$this->txtValue2 = new QTextBox($this);\n\t\t\t\n\t\t\t$this->lstOperation = new QListBox($this);\n\t\t\t$this->lstOperation->AddItem('+', 'add');\n\t\t\t$this->lstOperation->AddItem('-', 'subtract');\n\t\t\t$this->lstOperation->AddItem('*', 'multiply');\n\t\t\t$this->lstOperation->AddItem('/', 'divide');\n\t\t\t\n\t\t\t$this->btnCalculate = new QButton($this);\n\t\t\t$this->btnCalculate->Text = 'Calculate';\n\t\t\t$this->btnCalculate->AddAction(new QClickEvent(), new QServerAction('btnCalculate_Click'));\n\t\t\t\n\t\t\t$this->lblResult = new QLabel($this);\n\t\t\t$this->lblResult->HtmlEntities = false;\n\t\t}", "function showform() {\r\n $this->showerror();\r\n\r\n # make sure cursor does not point to invalid index\r\n if ($this->_cursor > ($this->db_count-1)) $this->_cursor = $this->db_count-1;\r\n if ($this->_cursor < 0) $this->_cursor = 0;\r\n\r\n $this->grid_command[] = array('csv',lang('Generate CSV'));\r\n\r\n # prepare javascript validation and confirmation function for each action\r\n echo '<!-- 1223 --> <script type=\"text/javascript\">';\r\n if ($this->action == 'browse') {\r\n echo 'function form_submit_confirm(myform) {\r\n action = myform.elements[\\'act\\'].value;\r\n if (action == \\'del\\') {\r\n if (!confirm(\\''.lang('Are you sure you want to delete').'?\\')) {\r\n return false;\r\n }\r\n myform.submit();\r\n return true;\r\n }\r\n else {\r\n myform.submit();\r\n return true;\r\n }\r\n return false;\r\n }\r\n ';\r\n } else { # callback to function like $this->form_submit_confirm_new()\r\n echo $this->{'form_submit_confirm_'.$this->action}();\r\n }\r\n\r\n echo '</script>';\r\n\r\n echo '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" summary=\"paging\">'; //style=\"border-collapse: collapse;\"\r\n echo '<tr valign=\"top\">';\r\n\r\n if ($this->action == 'browse') {\r\n if ($this->db_count > 1) {\r\n echo '<td valign=\"top\" nowrap>&nbsp;&nbsp;';\r\n # determine on which index current rowid is\r\n if ($this->_cursor > 0) {\r\n $r = 0;\r\n $url = $_SERVER['PHP_SELF'].'?m='.$this->module.'&amp;act=browse&amp;cursor='.$r.'&amp;orderby='.$this->_orderby.'&amp;sortdir='.$this->_sortdir.'&amp;query='.urlencode($this->_query).'&amp;qf='.urlencode($_REQUEST['qf']);\r\n echo '<a href=\"'.$url.'\"><img src=\"images/b_firstpage.gif\" border=\"0\" alt=\"first record\"></a> ';\r\n $r = $this->_cursor - 1;\r\n $url = $_SERVER['PHP_SELF'].'?m='.$this->module.'&amp;act=browse&amp;cursor='.$r.'&amp;orderby='.$this->_orderby.'&amp;sortdir='.$this->_sortdir.'&amp;query='.urlencode($this->_query).'&amp;qf='.urlencode($_REQUEST['qf']);\r\n echo '<a href=\"'.$url.'\"><img src=\"images/b_prevpage.gif\" border=\"0\" alt=\"prev record\"></a> ';\r\n }\r\n else {\r\n echo '<img src=\"images/bd_firstpage.gif\" border=\"0\" alt=\"first record\"> ';\r\n echo '<img src=\"images/bd_prevpage.gif\" border=\"0\" alt=\"prev record\"> ';\r\n }\r\n\r\n if ($this->_cursor < ($this->db_count -1)) {\r\n $r = $this->_cursor + 1;\r\n $url = $_SERVER['PHP_SELF'].'?m='.$this->module.'&amp;act=browse&amp;cursor='.$r.'&amp;orderby='.$this->_orderby.'&amp;sortdir='.$this->_sortdir.'&amp;query='.urlencode($this->_query).'&amp;qf='.urlencode($_REQUEST['qf']);\r\n echo '<a href=\"'.$url.'\"><img src=\"images/b_nextpage.gif\" border=\"0\" alt=\"next record\"></a> ';\r\n $r = $this->db_count - 1;\r\n $url = $_SERVER['PHP_SELF'].'?m='.$this->module.'&amp;act=browse&amp;cursor='.$r.'&amp;orderby='.$this->_orderby.'&amp;sortdir='.$this->_sortdir.'&amp;query='.urlencode($this->_query).'&amp;qf='.urlencode($_REQUEST['qf']);\r\n echo '<a href=\"'.$url.'\"><img src=\"images/b_lastpage.gif\" border=\"0\" alt=\"last record\"></a> ';\r\n }\r\n else {\r\n echo '<img src=\"images/bd_nextpage.gif\" border=\"0\" alt=\"next record\"> ';\r\n echo '<img src=\"images/bd_lastpage.gif\" border=\"0\" alt=\"last record\"> ';\r\n }\r\n echo '</td>';\r\n }\r\n echo '<form method=\"POST\" action=\"'.$_SERVER['PHP_SELF'].'\">';\r\n echo '<input type=hidden name=m value=\"'.$this->module.'\">';\r\n echo '<input type=hidden name=go value=\"'.htmlentities($GLOBALS['full_self_url']).'\">'; # url to go after successful submitation\r\n echo '<input type=hidden name=\"rowid[]\" value=\"'.$this->ds->_rowid[$this->_cursor].'\">'; # for edit-action\r\n echo '<input type=\"hidden\" name=\"act\">';\r\n echo '<td>&nbsp;&nbsp;';\r\n echo '<input type=\"button\" onclick=\"this.form.act.value = \\'edit\\';form_submit_confirm(this.form);\" value=\"'.lang('Edit').'\" '.(($this->allow_edit and $this->db_count > 0)?'':'disabled').'> ';\r\n echo '<input type=\"button\" onclick=\"this.form.act.value = \\'del\\';form_submit_confirm(this.form);\" value=\"'.lang('Delete').'\" '.(($this->allow_delete and $this->db_count > 0)?'':'disabled').'> ';\r\n echo '<input type=\"button\" onclick=\"this.form.act.value = \\'duplicate\\';form_submit_confirm(this.form);\" value=\"'.lang('Duplicate').'\" '.(($this->allow_duplicate and $this->db_count > 0)?'':'disabled').'> ';\r\n echo '<input type=\"button\" onclick=\"this.form.act.value = \\'view\\';form_submit_confirm(this.form);\" value=\"'.lang('View').'\" '.(($this->allow_view and $this->db_count > 0)?'':'disabled').'> ';\r\n echo '<input type=\"button\" onclick=\"this.form.act.value = \\'new\\';form_submit_confirm(this.form);\" value=\"'.lang('New').'\" '.($this->allow_new?'':'disabled').'> ';\r\n\r\n if (count($this->grid_command))\r\n echo ' | Other: ';\r\n\r\n foreach ($this->grid_command as $command) {\r\n #~ echo '<input type=\"button\" onclick=\"this.form.act.value = \\''.$command[0].'\\';submit_confirm(this.form);\" value=\"'.lang($command[1]).'\"> ';\r\n echo '<input type=\"button\" onclick=\"this.form.act.value = \\''.$command[0].'\\';this.form.submit();\" value=\"'.lang($command[1]).'\"> ';\r\n }\r\n echo '</form>';\r\n echo '</td>';\r\n }\r\n echo '</tr></table>'; //outer table\r\n\r\n if ($this->_query != '') {\r\n if ($this->db_count == 0) {\r\n echo '<p><b>'.lang('The search').' \"'.$this->_query.'\" '.lang('returns no record').'</b>. <a href=\"'.$_SERVER['PHP_SELF'].'?m='.$this->module.'\">'.lang('Reset Search').'</a>.</p>';\r\n return;\r\n }\r\n else {\r\n echo '<p><b>'.lang('The search').' \"'.$this->_query.'\" '.lang('found').' '.$this->db_count.' '.lang($this->unit).'</b>. <a href=\"'.$_SERVER['PHP_SELF'].'?m='.$this->module.'\">'.lang('Reset Search').'</a>.</p>';\r\n }\r\n }\r\n\r\n echo $this->body[$this->action]['prefix']; # show prefix body\r\n\r\n echo '<table border=\"0\" summary=\"form format\">';\r\n # form for new record\r\n echo '<form method=post enctype=\"multipart/form-data\" action=\"'.$_SERVER['PHP_SELF'].'\" onSubmit=\"return form_submit_confirm(this);\" autocomplete=\"off\">';\r\n echo '<input type=hidden name=m value=\"'.$this->module.'\">'; # this module\r\n echo '<input type=hidden name=act value=\"'.$this->action.'\">'; # contains the action (edit/new)\r\n #~ echo '<input type=hidden name=save value=\"'.$this->_save.'\">'; # marker to indicate form submitation\r\n if (!$this->_preview)\r\n echo '<input type=hidden name=save value=\"-1\">'; # marker to indicate form submitation\r\n else\r\n echo '<input type=hidden name=save value=\"1\">'; # marker to indicate form submitation\r\n #~ echo '<input type=hidden name=save value=\"-1\">'; # marker to indicate form submitation\r\n echo '<input type=hidden name=go value=\"'.htmlentities($this->_go).'\">'; # url to go after successful submitation\r\n echo '<input type=hidden name=\"num_row\" value=\"'.$this->db_count.'\">';\r\n echo '<input type=hidden name=\"rowid['.$this->_cursor.']\" value=\"'.$this->ds->_rowid[$this->_cursor].'\">'; # for edit-action\r\n\r\n # decide, which columns to show in form\r\n $this->colgrid = array();\r\n foreach ($this->properties as $key=>$col) {\r\n if ($this->action == 'browse' and $col->hidden) continue;\r\n if ($this->action == 'edit' and !$col->updatable) continue;\r\n if ($this->action == 'new' and !$col->insertable) continue;\r\n $this->colgrid[] = $key;\r\n }\r\n $i = 0; # html table rows\r\n $i2 = 0; # datasource columns\r\n\r\n for ($ci = 0; $ci < count($this->colgrid); $ci++) {\r\n $colvar = $this->colgrid[$ci];\r\n $i2++;\r\n $col = &$this->properties[$colvar];\r\n\r\n if ($col->box_start != '') { # box start append a title line\r\n echo '<tr><td colspan=\"2\"><br><b>'.$col->box_start.'</b></td></tr>';\r\n }\r\n\r\n if ($this->action != 'browse' or $this->browse_mode != 'form' or ($i2 % $this->browse_form_cols == 1)) {\r\n $rowcolour = ($i++ % 2 == 0)? 'greyformlight': 'greyformdark';\r\n echo '<tr class=\"'.$rowcolour.'\">';\r\n }\r\n\r\n echo '<td>';\r\n #~ if ($this->action != 'browse' and $col->required)\r\n #~ echo '<span class=\"asterix\">*</span>';\r\n $label = $col->colspan_label != ''? $col->colspan_label: $col->label;\r\n #~ if ($col->is_key)\r\n #~ echo '<b>'.$label.'</b>';\r\n #~ else\r\n echo $label;\r\n echo '</td>';\r\n\r\n echo '<td>';\r\n $max_colspan = $col->colspan; # save this first, since $col will be change on subsequent loops\r\n for ($colspan=0; $colspan < $max_colspan; $colspan++) {\r\n $colvar = $this->colgrid[$ci + $colspan];\r\n $col = &$this->properties[$colvar];\r\n $value = $this->ds->{$colvar}[$this->_cursor];\r\n if ($this->_preview) { # preview me\r\n echo '<input type=\"hidden\" name=\"field['.$colvar.']['.$this->_cursor.']\" value=\"'.$value.'\">';\r\n echo ' '.$value.' ';\r\n }\r\n else {\r\n echo $col->prefix_text;\r\n if ($this->action == 'browse') {\r\n if ($col->enumerate) { # if field is enumerated, get the enumerate value instead\r\n $value = '';\r\n if (is_string($col->enumerate) and $value != '') {\r\n $e = instantiate_module($col->enumerate);\r\n $value = $e->enum_decode($value);\r\n if ($value === False) {\r\n $col->notes = '<span style=\"color:f00\"><b>(ref?)</b></span> '.$col->notes;\r\n }\r\n }\r\n elseif (is_array($col->enumerate)) {\r\n $value = $col->enumerate[$value];\r\n }\r\n }\r\n elseif ($col->inputtype=='combobox' and $col->choices) { # if field is using simple enumeration, also get the choice value instead\r\n $value = $col->choices[$value];\r\n }\r\n else {\r\n #~ $value = $this->ds->{$colvar}[$rowindex];\r\n #pass\r\n }\r\n\r\n if ($col->inputtype == 'combobox') {\r\n $col->inputtype = 'text';\r\n }\r\n }\r\n\r\n if ($this->action == 'browse' and $this->browse_form_statictext) {\r\n echo '<b>';\r\n echo ' '.$value.' ';\r\n echo '</b>';\r\n }\r\n else {\r\n $this->input_widget(\"field[$colvar][{$this->_cursor}]\", $value, $colvar);\r\n }\r\n }\r\n }\r\n $ci += $max_colspan - 1; # since ->colspan starts at 1\r\n if ($this->action != 'browse' and $this->_save != -1) # edit/add mode and not preview\r\n echo '&nbsp;'.$col->notes;\r\n echo '</td>';\r\n\r\n if ($this->action != 'browse' or $this->browse_mode != 'form' or ($i2 % $this->browse_form_cols == 0)) {\r\n echo \"</tr>\\r\\n\";\r\n }\r\n\r\n if ($col->box_end) {\r\n echo '<tr><td colspan=\"2\"><br></td></tr>';\r\n }\r\n\r\n\r\n }\r\n echo '</table>';\r\n\r\n # show prefix/suffix body\r\n if (method_exists($this, $this->body[$this->action]['suffix'])) # give chance for suffix to execute them self.\r\n echo $this->{$this->body[$this->action]['suffix']}();\r\n else\r\n echo $this->body[$this->action]['suffix'];\r\n\r\n $_submitlabel = ($this->preview[$this->action] and !$this->_preview)? ' '.lang('Preview').' ': ' '.$this->submit_label['new'].' ';\r\n if ($this->action != 'browse') {\r\n echo '<p><input type=submit value=\"'.$_submitlabel.'\"> | ';\r\n #~ echo '<b><a href=\"'.$this->_go.'\">Cancel</a></b></p>';\r\n echo '<input type=button value=\"'.lang('Cancel').'\" onclick=\"window.location=\\''.$this->_go.'\\'\">';\r\n #~ echo '<b><a href=\"\" onclick=\"window.history.back();return false;\">Cancel</a></b>';\r\n }\r\n echo '</form>';\r\n\r\n # show suffix2 body (after previous big form)\r\n if (method_exists($this, $this->body[$this->action]['suffix2'])) # give chance for suffix to execute them self.\r\n echo $this->{$this->body[$this->action]['suffix2']}();\r\n else\r\n echo $this->body[$this->action]['suffix2'];\r\n }", "public function getFormPage()\n {\n return new TwigResponse('image_queue.html');\n }", "public function buildForm(array $form, FormStateInterface $form_state) {\n $form = parent::buildForm($form, $form_state);\n\n $form['help_1'] = [\n '#prefix' => '<p>',\n '#markup' => $this->t('Release content to update the front end of this demo environment with the latest published content changes.'),\n '#suffix' => '</p>',\n '#weight' => -10,\n ];\n\n $form['section_1']['title'] = [\n '#type' => 'item',\n '#prefix' => '<h2>',\n '#markup' => $this->t('1. Release content'),\n '#suffix' => '</h2>',\n ];\n $form['section_1']['selection'] = [\n '#title' => $this->t('Which version of the VA.gov front end would you like to use?'),\n '#type' => 'radios',\n '#options' => [\n 'default' => $this->t('Use default - the frontend version from the time this demo environment was created.'),\n 'choose' => $this->t('Select a different frontend branch/pull request - for example, to see your content in a newer frontend design.'),\n ],\n '#default_value' => 'default',\n ];\n $form['section_1']['git_ref'] = [\n '#type' => 'textfield',\n '#title' => $this->t('Select branch/pull request'),\n '#description' => $this->t('Start typing to select a branch for the frontend version you want to use.'),\n '#autocomplete_route_name' => 'va_gov_build_trigger.front_end_branches_autocomplete',\n '#autocomplete_route_parameters' => [\n 'count' => 10,\n ],\n '#size' => 72,\n '#maxlength' => 1024,\n '#hidden' => TRUE,\n '#states' => [\n 'visible' => [':input[name=\"selection\"]' => ['value' => 'choose']],\n ],\n ];\n\n $form['section_1']['actions']['#type'] = 'actions';\n $form['section_1']['actions']['submit'] = [\n '#type' => 'submit',\n '#value' => $this->t('Release content'),\n '#button_type' => 'primary',\n ];\n\n $form['section_2']['title'] = [\n '#type' => 'item',\n '#prefix' => '<h2>',\n '#markup' => $this->t('2. Wait for the release to complete'),\n '#suffix' => '</h2>',\n ];\n $help_url = Url::fromUri(\n 'https://va-gov.atlassian.net/servicedesk/customer/portal/3/group/8/create/26',\n ['attributes' => ['target' => '_blank']]\n );\n $help_link = Link::fromTextAndUrl($this->t('contact the CMS help desk'), $help_url);\n $description = $this->t(\n 'It may take up to one minute for the status of new content releases to appear here in the queue. Content releases will complete in the order released. If you encounter an error, please @help_link.',\n ['@help_link' => $help_link->toString()]\n );\n $form['section_2']['help'] = [\n '#type' => 'item',\n '#title' => $this->t('Recent content releases'),\n '#description' => $description,\n ];\n $form['section_2']['content_release_status_block'] = $this->getContentReleaseStatusBlock();\n\n $form['section_3']['title'] = [\n '#type' => 'item',\n '#prefix' => '<h2>',\n '#markup' => $this->t('3. Access the frontend environment'),\n '#suffix' => '</h2>',\n ];\n $description = $this->t('Once the release is completed successfully, see how your content will appear to site visitors on the front end.');\n $form['section_3']['environment_target'] = [\n '#type' => 'item',\n '#markup' => $description,\n ];\n $target = $this->environmentDiscovery->getWebUrl();\n $target_url = Url::fromUri($target, ['attributes' => ['target' => '_blank']]);\n $target_link = Link::fromTextAndUrl($this->t('Go to front end'), $target_url);\n $form['section_3']['cta'] = [\n '#type' => 'item',\n '#wrapper_attributes' => ['class' => ['button button--primary']],\n '#markup' => $target_link->toString(),\n ];\n\n return $form;\n }", "function form( $instance ){\n\n\t\t\t// $instance Defaults\n\t\t\t$instance_defaults = $this->defaults;\n\n\t\t\t// If we have information in this widget, then ignore the defaults\n\t\t\tif( !empty( $instance ) ) $instance_defaults = array();\n\n\t\t\t// Parse $instance\n\t\t\t$instance = wp_parse_args( $instance, $instance_defaults );\n\t\t\textract( $instance, EXTR_SKIP );\n\n\t\t\t$design_bar_components = apply_filters( 'layers_' . $this->widget_id . '_widget_design_bar_components' , array(\n\t\t\t\t\t'custom',\n\t\t\t\t\t'advanced'\n\t\t\t\t) );\n\n\t\t\t$design_bar_custom_components = apply_filters( 'layers_' . $this->widget_id . '_widget_design_bar_custom_components' , array(\n\t\t\t\t\t'layout' => array(\n\t\t\t\t\t\t'icon-css' => 'icon-layout-fullwidth',\n\t\t\t\t\t\t'label' => __( 'Layout', 'layerswp' ),\n\t\t\t\t\t\t'wrapper-class' => 'layers-pop-menu-wrapper layers-small',\n\t\t\t\t\t\t'elements' => array(\n\t\t\t\t\t\t\t'layout' => array(\n\t\t\t\t\t\t\t\t'type' => 'select-icons',\n\t\t\t\t\t\t\t\t'label' => __( '' , 'layerswp' ),\n\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'design' ) . '[layout]' ,\n\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'design-layout' ) ,\n\t\t\t\t\t\t\t\t'value' => ( isset( $design['layout'] ) ) ? $design['layout'] : NULL,\n\t\t\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t\t\t'layout-boxed' => __( 'Boxed' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t'layout-fullwidth' => __( 'Full Width' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t'layout-full-screen' => __( 'Full Screen' , 'layerswp' )\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\t'display' => array(\n\t\t\t\t\t\t'icon-css' => 'icon-slider',\n\t\t\t\t\t\t'label' => __( 'Slider', 'layerswp' ),\n\t\t\t\t\t\t'elements' => array(\n\t\t\t\t\t\t\t\t'show_slider_arrows' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_slider_arrows' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_slider_arrows' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_slider_arrows ) ) ? $show_slider_arrows : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Slider Arrows' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'show_slider_dots' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_slider_dots' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_slider_dots' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_slider_dots ) ) ? $show_slider_dots : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Slider Dots' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'autoplay_slides' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'autoplay_slides' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'autoplay_slides' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $autoplay_slides ) ) ? $autoplay_slides : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Autoplay Slides' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'slide_time' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'number',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'slide_time' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'slide_time' ) ,\n\t\t\t\t\t\t\t\t\t'min' => 1,\n\t\t\t\t\t\t\t\t\t'max' => 10,\n\t\t\t\t\t\t\t\t\t'placeholder' => __( 'Time in seconds, eg. 2' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $slide_time ) ) ? $slide_time : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Slide Interval' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t'data' => array( 'show-if-selector' => '#' . $this->get_field_id( 'autoplay_slides' ), 'show-if-value' => 'true' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'slide_height' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'number',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'slide_height' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'slide_height' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $slide_height ) ) ? $slide_height : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Slider Height' , 'layerswp' )\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t) );\n\n\t\t\t$this->design_bar(\n\t\t\t\t'side', // CSS Class Name\n\t\t\t\tarray(\n\t\t\t\t\t'name' => $this->get_field_name( 'design' ),\n\t\t\t\t\t'id' => $this->get_field_id( 'design' ),\n\t\t\t\t), // Widget Object\n\t\t\t\t$instance, // Widget Values\n\t\t\t\t$design_bar_components, // Standard Components\n\t\t\t\t$design_bar_custom_components // Add-on Components\n\t\t\t); ?>\n\t\t\t<div class=\"layers-container-large\" id=\"layers-slide-widget-<?php echo esc_attr( $this->number ); ?>\">\n\n\t\t\t\t<?php $this->form_elements()->header( array(\n\t\t\t\t\t'title' =>'Sliders',\n\t\t\t\t\t'icon_class' =>'slider'\n\t\t\t\t) ); ?>\n\n\t\t\t\t<section class=\"layers-accordion-section layers-content\">\n\t\t\t\t\t\t<?php echo $this->form_elements()->input(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'type' => 'hidden',\n\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'slide_ids' ) ,\n\t\t\t\t\t\t\t\t'id' => 'slide_ids_input_' . $this->number,\n\t\t\t\t\t\t\t\t'value' => ( isset( $slide_ids ) ) ? $slide_ids : NULL\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t); ?>\n\n\t\t\t\t\t\t<?php // If we have some slides, let's break out their IDs into an array\n\t\t\t\t\t\tif( isset( $slide_ids ) && '' != $slide_ids ) $slides = explode( ',' , $slide_ids ); ?>\n\n\t\t\t\t\t\t<ul id=\"slide_list_<?php echo esc_attr( $this->number ); ?>\" class=\"layers-accordions layers-accordions-sortable layers-sortable\" data-id_base=\"<?php echo $this->id_base; ?>\" data-number=\"<?php echo esc_attr( $this->number ); ?>\">\n\t\t\t\t\t\t\t<?php if( isset( $slides ) && is_array( $slides ) ) { ?>\n\t\t\t\t\t\t\t\t<?php foreach( $slides as $slide ) {\n\t\t\t\t\t\t\t\t\t$this->slide_item( array(\n\t\t\t\t\t\t\t\t\t\t\t\t'id_base' => $this->id_base ,\n\t\t\t\t\t\t\t\t\t\t\t\t'number' => $this->number\n\t\t\t\t\t\t\t\t\t\t\t) ,\n\t\t\t\t\t\t\t\t\t\t\t$slide ,\n\t\t\t\t\t\t\t\t\t\t\t( isset( $instance[ 'slides' ][ $slide ] ) ) ? $instance[ 'slides' ][ $slide ] : NULL );\n\t\t\t\t\t\t\t\t} ?>\n\t\t\t\t\t\t\t<?php } ?>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t<button class=\"layers-button btn-full layers-add-widget-slide add-new-widget\" data-number=\"<?php echo esc_attr( $this->number ); ?>\"><?php _e( 'Add New Slide' , 'layerswp' ) ; ?></button>\n\t\t\t\t</section>\n\n\t\t\t</div>\n\n\t\t<?php }", "private function showProgress()\n {\n $allQuestions = $this->questionRepository->list(['id', 'question']);\n $this->transformProgressList($allQuestions);\n\n $this->console->info( ' ************ Your progress is ************');\n\n foreach ($this->progress as $option) {\n $validate = $option['is_true'] ? __('True') : __('False');\n $this->console->info( ' Question: ' . $option['question']);\n if(null !== $option['is_true'])\n $this->console->info( ' Answer: ' . $option['answer'] . '('.$validate .')');\n $this->console->info( ' ');\n }\n $this->console->info( ' *******************************************');\n }", "private function StartForm(){\r\n\t\t\t$this->formHTML .= \"<form method=\\\"{$this->method}\\\" action=\\\"{$this->action}\\\"\";\r\n\t\t\tif($this->enctype){\r\n\t\t\t\t$this->formHTML .= \" enctype=\\\"{$this->enctype}\\\"\";\r\n\t\t\t}\r\n\t\t\t$this->formHTML .= \" name=\\\"{$this->formName}\\\" class=\\\"c{$this->formName}\\\" id=\\\"i{$this->formName}\\\"\";\r\n\t\t\t$this->formHTML .= \">\";\r\n\t\t}", "protected function definition_inner($mform) {\n\n $mform->addElement('header', 'previewareaheader',\n get_string('previewareaheader', 'qtype_'.$this->qtype()));\n $mform->setExpanded('previewareaheader');\n $mform->addElement('static', 'previewarea', '',\n get_string('previewareamessage', 'qtype_'.$this->qtype()));\n\n $mform->registerNoSubmitButton('refresh');\n $mform->addElement('submit', 'refresh', get_string('refresh', 'qtype_'.$this->qtype()));\n $mform->addElement('filepicker', 'bgimage', get_string('bgimage', 'qtype_'.$this->qtype()),\n null, self::file_picker_options());\n $mform->closeHeaderBefore('dropzoneheader');\n\n // Add the draggable image fields & drop zones to the form.\n list($itemrepeatsatstart, $imagerepeats) = $this->get_drag_item_repeats();\n $this->definition_draggable_items($mform, $itemrepeatsatstart);\n $this->definition_drop_zones($mform, $imagerepeats);\n\n $this->add_combined_feedback_fields(true);\n $this->add_interactive_settings(true, true);\n }", "protected function getForm() {\n $lUpdate = ($this -> mPhraseTyp == 'product') ? 'yes' : 'no';\n $this -> setParam('ref_update', $lUpdate);\n\n $lRet = '<div id=\"job_form\" class=\"frm\">'.LF;\n\t$lRet.= $this -> getFieldForm();\n $lRet.= '</div>' . LF;\n \n /*if($this -> mCanBuild) {\n $lRet.= '<div id=\"save_dialog\" title=\"Publish PDF\" style=\"display:none;\">'.LF;\n\t $lRet.= '<input id=\"templateId\" type=\"hidden\" value=\"\" />'.LF;\n $lRet.= '<iframe src=\"\" onload=\"javascript:GetEditor()\" id=\"chiliEditor\" class=\"dn\" style=\"width:100%;height:100%;\"></iframe>'.LF;\n $lRet.= '</div>'.LF;\n }*/\n \n $lDlg = new CJob_Cms_Content_Dialog($this -> mJobId, $this -> mSrc, $this -> mJob);\n $lRet.= $lDlg -> getContent();\n \n $lRet.= $lDlg -> getModals();\n \n return $lRet;\n }", "public function form_footer_progress_status_proportion_html() {\n\n\t\t?>\n\t\t<div class=\"wpforms-conversational-form-footer-progress-status-proportion\">\n\t\t\t<?php\n\t\t\tprintf(\n\t\t\t\t/* translators: %1$s - Number of fields completed, %2$s - Number of fields in total. */\n\t\t\t\t\\esc_html__(\n\t\t\t\t\t'%1$s of %2$s completed',\n\t\t\t\t\t'wpforms-conversational-forms'\n\t\t\t\t),\n\t\t\t\t'<span class=\"completed\"></span>',\n\t\t\t\t'<span class=\"completed-of\"></span>'\n\t\t\t);\n\t\t\t?>\n\t\t</div>\n\t\t<div class=\"wpforms-conversational-form-footer-progress-status-proportion-completed\" style=\"display: none\">\n\t\t\t<?php \\esc_html_e( 'Form completed', 'wpforms-conversational-forms' ); ?>\n\t\t</div>\n\t\t<?php\n\t}", "function ch_qti2_display_form()\n{\n $name_tools = get_lang('ImportQtiQuiz');\n $form = '<div class=\"actions\">';\n $form .= '<a href=\"' . api_get_path(WEB_CODE_PATH) . 'exercise/exercise.php?show=test&'.api_get_cidreq().'\">'.\n Display :: return_icon('back.png', get_lang('BackToExercisesList'), '', ICON_SIZE_MEDIUM).'</a>';\n $form .= '</div>';\n $formValidator = new FormValidator(\n 'qti_upload',\n 'post',\n api_get_self().\"?\".api_get_cidreq(),\n null,\n array('enctype' => 'multipart/form-data')\n );\n $formValidator->addElement('header', $name_tools);\n $formValidator->addElement('file', 'userFile', get_lang('DownloadFile'));\n $formValidator->addButtonImport(get_lang('Upload'));\n $form .= $formValidator->returnForm();\n echo $form;\n}", "public function form( $instance ) {\n\t\t// Set widget defaults\n\t\t$defaults = array(\n\t\t\t'title' => 'remoteok.io Jobs',\n\t\t\t'page_size' => 10\n\t\t);\n\t\t\n\t\t// Parse current settings with defaults\n extract( wp_parse_args( ( array ) $instance, $defaults ) ); ?>\n \n\t\t<p>\n\t\t\t<label for=\"<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>\"><?php _e( 'Widget Title', 'mtc_text' ); ?></label>\n\t\t\t<input class=\"widefat\" id=\"<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>\" name=\"<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>\" type=\"text\" value=\"<?php echo esc_attr( $title ); ?>\" />\n\t\t</p>\n\t\t<p>\n\t\t\t<label for=\"<?php echo esc_attr( $this->get_field_id( 'page_size' ) ); ?>\"><?php _e( 'Page Size:', 'mtc_text' ); ?></label>\n\t\t\t<input class=\"widefat\" id=\"<?php echo esc_attr( $this->get_field_id( 'page_size' ) ); ?>\" name=\"<?php echo esc_attr( $this->get_field_name( 'page_size' ) ); ?>\" type=\"number\" min=\"1\" value=\"<?php echo esc_attr( $page_size ); ?>\" />\n\t\t</p>\n\t<?php }", "protected function render() : string\n {\n $html = '<div class=\"progress\">';\n\n foreach ($this->values as $k => $value) {\n $styles = $this->styles($value);\n if (strlen($styles) > 0) {\n $styles = 'style=\"' . trim($styles) . '\"';\n }\n\n $html .= '<div class=\"progress-bar' . $this->classes($this->bg_colors[$k]) . '\" role=\"progressbar\" ' .\n $styles . ' aria-valuenow=\"' . $value . '\" aria-valuemin=\"0\" aria-valuemax=\"100\"></div>';\n }\n\n $html .= '</div>';\n\n return $html;\n }", "protected function form()\n {\n $form = new Form(new $this->currentModel);\n \n $form->display('id', 'ID');\n $form->select('company_id', '公司名称')->options(Company::getSelectOptions());\n $form->text('project_name', '项目名称');\n $form->image('project_photo', '项目图片')->uniqueName()->move('public/photo/images/custom_thum/');\n $form->url('link_url', '项目链接');\n $form->radio('display', '公开度')->options(['0' => '公开', '-1'=> '保密'])->default('0');\n //$form->display('created_at', 'Created At');\n //$form->display('updated_at', 'Updated At');\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Procurement);\n\n $form->number('u_id', 'U id');\n $form->number('brand', 'Brand');\n $form->number('type', 'Type');\n $form->number('models', 'Models');\n $form->number('material', 'Material');\n $form->decimal('area', 'Area');\n $form->radio('status', '审核')->options(['0' => '待审核', '1'=> '通过','2'=>'未通过'])->default('0');\n $form->number('room_city', 'Room city');\n $form->text('address', 'Address');\n $form->number('brick_time', 'Brick time')->default(1);\n $form->text('images', 'Images');\n $form->number('ctime', 'Ctime');\n $form->number('utime', 'Utime');\n\n return $form;\n }", "private function display_progress_bar($args){\n $number_of_steps = count($this->step_ids);\n $current_step = $args['step'];\n\n echo '<ul class=\"list-unstyled\">';\n for($i = 1; $i < $number_of_steps - 1; $i++){\n echo '<li style=\"display:inline-block; margin-right:15px;\">Step ' . $i . '</li>';\n }\n echo '</ul>';\n }", "protected function form()\n {\n $form = new Form(new Direction());\n\n $form->text('name', __(trans('hhx.name')));\n $form->text('intro', __(trans('hhx.intro')));\n $form->image('Img', __(trans('hhx.img')))->move('daily/direction')->uniqueName();\n $form->select('status', __(trans('hhx.status')))->options(config('hhx.status'));;\n $form->number('order_num', __(trans('hhx.order_num')));\n $form->hidden('all_num', __(trans('hhx.all_num')))->default(0.00);\n $form->decimal('stock', __(trans('hhx.stock')));\n\n return $form;\n }", "function buildTabs()\r\n {\r\n $this->_formBuilt = true;\r\n\r\n // Here we get all page names in the controller\r\n $pages = array();\r\n $myName = $current = $this->getAttribute('id');\r\n while (null !== ($current = $this->controller->getPrevName($current))) {\r\n $pages[] = $current;\r\n }\r\n $pages = array_reverse($pages);\r\n $pages[] = $current = $myName;\r\n while (null !== ($current = $this->controller->getNextName($current))) {\r\n $pages[] = $current;\r\n }\r\n // Here we display buttons for all pages, the current one's is disabled\r\n foreach ($pages as $pageName) {\r\n $disabled = ($pageName == $myName ? array('disabled' => 'disabled')\r\n : array());\r\n\r\n $tabs[] = $this->createElement('submit',\r\n $this->getButtonName($pageName),\r\n ucfirst($pageName),\r\n array('class' => 'flat') + $disabled);\r\n }\r\n $this->addGroup($tabs, 'tabs', null, '&nbsp;', false);\r\n }", "public function buildForm(array $form, FormStateInterface $form_state) {\n $form['time_duration'] = [\n '#type' => 'number',\n '#title' => $this->t('Time duration'),\n '#min' => 100,\n '#step' => 100,\n '#description' => $this->t(\n \"Time in seconds from the user's last login. Used as an event to \n update the relationships between the user and companies.\"\n ),\n '#default_value' => $this->config('pmmi_sso.company.settings')->get('time_duration'),\n '#required' => TRUE,\n ];\n $form['submit'] = [\n '#type' => 'submit',\n '#value' => $this->t('Save'),\n ];\n return $form;\n }", "protected function form()\n {\n return Admin::form(QQAlbum::class, function (Form $form) {\n\n $form->display('id', 'ID');\n\n $form->display('created_at', 'Created At');\n $form->display('updated_at', 'Updated At');\n });\n }", "protected function form()\n {\n $form = new Form(new DbTop());\n $form->select('status', __(trans('hhx.status')))->options(config('hhx.db_status'));;\n $form->text('pan_url', __(trans('hhx.pan_url')));\n $form->text('pan_code', __(trans('hhx.pan_code')));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new ScanRechargeOrder());\n $form->select('scan_recharge_channel_id', __('scan-recharge::order.scan_recharge_channel_id'))\n ->options(ScanRechargeChannel::select('id', 'name')->pluck('name', 'id'))\n ->required();\n $form->text('user_id', __('scan-recharge::order.user_id'))\n ->required()\n ->help(__('scan-recharge::order.user_id_help'));\n $form->currency('amount', __('scan-recharge::order.amount'))->symbol('¥')\n ->default(0)\n ->required();\n $form->textarea('desc', __('scan-recharge::order.desc'))\n ->required()\n ->help(__('scan-recharge::order.desc_help'));\n $form->textarea('reply', __('scan-recharge::order.reply'))\n ->help(__('scan-recharge::order.reply_help'));\n $form->select('status', __('scan-recharge::order.status'))\n ->options(__('scan-recharge::order.status_value'));\n $form->saving(function (Form $form) {\n if ($form->status == 1 && $form->model()->id) {\n RechargeSuccessUserAccountJob::dispatch(ScanRechargeOrder::find($form->model()->id));\n }\n });\n return $form;\n }", "public function doRender(){\r\n\t\t$label = ($this->label != '') ? Label::get($this)->doRender() : '';\r\n\r\n\t\treturn\r\n\t\t\t '<div class=\"'.$this->printWrapperClasses().'\">'\r\n\t\t\t\t.$label\r\n\t\t\t\t.'<div class=\"'.parent::WIDGETCLASS.'\">'\r\n\t\t\t\t\t.'<input'\r\n\t\t\t\t\t\t.$this->printId()\r\n\t\t\t\t\t\t.$this->printName()\r\n\t\t\t\t\t\t.' type=\"file\"'\r\n\t\t\t\t\t\t.$this->printTitle()\r\n\t\t\t\t\t\t.$this->printAccept()\r\n\t\t\t\t\t\t.$this->printSize()\r\n\t\t\t\t\t\t.$this->printMaxLength()\r\n\t\t\t\t\t\t.$this->printCssClasses()\r\n\t\t\t\t\t\t.$this->printJavascriptEventHandler()\r\n\t\t\t\t\t\t.$this->printTabindex()\r\n\t\t\t\t\t\t.$this->printReadonly()\r\n\t\t\t\t\t\t.$this->printDisabled()\r\n\t\t\t\t\t\t.$this->masterForm->printSlash()\r\n\t\t\t\t\t.'>'\r\n\t\t\t\t.'</div>'\r\n\t\t\t\t.$this->masterForm->printFloatBreak()\r\n\t\t\t.'</div>'\r\n\t\t;\r\n\t}", "private function loadForm()\n {\n // init settings form\n $this->frm = new Form('settings');\n\n // add festival year\n $this->frm->addText('year', $this->get('fork.settings')->get($this->URL->getModule(), 'year'));\n\n // add fields for pagination\n $this->frm->addDropdown(\n 'overview_num_items',\n array_combine(range(1, 30), range(1, 30)),\n $this->get('fork.settings')->get($this->URL->getModule(), 'overview_num_items', 10)\n );\n $this->frm->addDropdown(\n 'recent_festival_list_num_items',\n array_combine(range(1, 30), range(1, 30)),\n $this->get('fork.settings')->get($this->URL->getModule(), 'recent_festival_list_num_items', 5)\n );\n\n // add functions fields\n $this->frm->addCheckbox('cover_image_enabled', $this->get('fork.settings')->get($this->URL->getModule(), 'cover_image_enabled', false));\n $this->frm->addCheckbox('cover_image_required', $this->get('fork.settings')->get($this->URL->getModule(), 'cover_image_required', false));\n $this->frm->addCheckbox('multi_images_enabled', $this->get('fork.settings')->get($this->URL->getModule(), 'multi_images_enabled', false));\n\n // add god user only fields\n if ($this->godUser) {\n $this->frm->addText('image_size_limit', (float) $this->get('fork.settings')->get($this->URL->getModule(), 'image_size_limit', 10));\n }\n }", "public function buildForm()\n {\n $this->add('organization_identifier_code', 'text', ['label' => trans('elementForm.organisation_identifier_code')])\n ->add('provider_activity_id', 'text', ['label' => trans('elementForm.provider_activity_id')])\n ->addSelect('type', $this->getCodeList('OrganisationType', 'Activity'), trans('elementForm.type'), $this->addHelpText('Activity_ParticipatingOrg-type'))\n ->addNarrative('provider_org_narrative')\n ->addAddMoreButton('add_provider_org_narrative', 'provider_org_narrative');\n }", "public function render()\n {\n return view('components::element.progress');\n }", "protected function form()\n {\n $form = new Form(new Goodss);\n $form->switch('is_enable','状态')->options([\n 'on' => ['value' => 1, 'text' => '正常', 'color' => 'primary'],\n 'off' => ['value' => 0, 'text' => '禁止', 'color' => 'default'],\n ]);\n $form->tools(function (Form\\Tools $tools) {\n // 去掉`删除`按钮\n $tools->disableDelete();\n // 去掉`查看`按钮\n $tools->disableView();\n });\n $form->footer(function ($footer) {\n\n // 去掉`重置`按钮\n //$footer->disableReset();\n\n // 去掉`提交`按钮\n //$footer->disableSubmit();\n\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n\n // 去掉`继续编辑`checkbox\n $footer->disableEditingCheck();\n\n // 去掉`继续创建`checkbox\n $footer->disableCreatingCheck();\n\n });\n return $form;\n }", "private function build_form()\n {\n $ldm = LaikaDataManager :: get_instance();\n\n // The Laika Scales\n $scales = $ldm->retrieve_laika_scales(null, null, null, new ObjectTableOrder(LaikaScale :: PROPERTY_TITLE));\n $scale_options = array();\n while ($scale = $scales->next_result())\n {\n $scale_options[$scale->get_id()] = $scale->get_title();\n }\n\n // The Laika Percentile Codes\n $codes = $ldm->retrieve_percentile_codes();\n $code_options = array();\n foreach ($codes as $code)\n {\n $code_options[$code] = $code;\n }\n\n $this->addElement('category', Translation :: get('Dates'));\n $this->add_timewindow(self :: GRAPH_FILTER_START_DATE, self :: GRAPH_FILTER_END_DATE, Translation :: get('StartTimeWindow'), Translation :: get('EndTimeWindow'), false);\n $this->addElement('category');\n\n $this->addElement('category', Translation :: get('Groups', null, 'group'));\n\n $group_options = $this->get_groups();\n\n if (count($group_options) > 0)\n {\n if (count($group_options) < 10)\n {\n $count = count($group_options);\n }\n else\n {\n $count = 10;\n }\n\n $this->addElement('select', self :: GRAPH_FILTER_GROUP, Translation :: get('Group', null, Utilities::GROUP), $this->get_groups(), array('multiple', 'size' => $count));\n $this->addRule(self :: GRAPH_FILTER_GROUP, Translation :: get('ThisFieldIsRequired', null, Utilities::COMMON_LIBRARIES), 'required');\n }\n else\n {\n $this->addElement('static', 'group_text', Translation :: get('Group'), Translation :: get('NoGroupsAvailable'));\n $this->addElement('hidden', self :: GRAPH_FILTER_GROUP, null);\n }\n\n $this->addElement('category');\n\n $this->addElement('category', Translation :: get('Results'));\n $this->addElement('select', self :: GRAPH_FILTER_SCALE, Translation :: get('Scale'), $scale_options, array('multiple', 'size' => '10'));\n $this->addRule(self :: GRAPH_FILTER_SCALE, Translation :: get('ThisFieldIsRequired', null, Utilities::COMMON_LIBRARIES), 'required');\n $this->addElement('select', self :: GRAPH_FILTER_CODE, Translation :: get('Code'), $code_options, array('multiple', 'size' => '4'));\n $this->addRule(self :: GRAPH_FILTER_CODE, Translation :: get('ThisFieldIsRequired', null, Utilities::COMMON_LIBRARIES), 'required');\n $this->addElement('category');\n\n $this->addElement('category', Translation :: get('Options'));\n\n $group = array();\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_TYPE, null, Translation :: get('RenderGraphAndTable'), LaikaGraphRenderer :: RENDER_GRAPH_AND_TABLE);\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_TYPE, null, Translation :: get('RenderGraph'), LaikaGraphRenderer :: RENDER_GRAPH);\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_TYPE, null, Translation :: get('RenderTable'), LaikaGraphRenderer :: RENDER_TABLE);\n $this->addGroup($group, self :: GRAPH_FILTER_TYPE, Translation :: get('RenderType'), '<br/>', false);\n\n $allow_save = PlatformSetting :: get('allow_save', LaikaManager :: APPLICATION_NAME);\n if ($allow_save == true)\n {\n $this->addElement('checkbox', self :: GRAPH_FILTER_SAVE, Translation :: get('SaveToRepository'));\n }\n\n $maximum_attempts = PlatformSetting :: get('maximum_attempts', LaikaManager :: APPLICATION_NAME);\n if ($maximum_attempts > 1)\n {\n $group = array();\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_ATTEMPT, null, Translation :: get('OnlyIncludeFirstAttempt'), LaikaGraphRenderer :: RENDER_ATTEMPT_FIRST);\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_ATTEMPT, null, Translation :: get('OnlyIncludeMostRecentAttempt'), LaikaGraphRenderer :: RENDER_ATTEMPT_LAST);\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_ATTEMPT, null, Translation :: get('IncludeAllAttempts'), LaikaGraphRenderer :: RENDER_ATTEMPT_ALL);\n $this->addGroup($group, self :: GRAPH_FILTER_ATTEMPT, Translation :: get('AttemptsToInclude'), '<br/>', false);\n }\n else\n {\n $this->addElement('hidden', self :: GRAPH_FILTER_ATTEMPT, LaikaGraphRenderer :: RENDER_ATTEMPT_ALL);\n }\n\n $this->addElement('category');\n\n $buttons = array();\n\n $buttons[] = $this->createElement('style_submit_button', 'submit', Translation :: get('Filter', null, Utilities::COMMON_LIBRARIES), array('class' => 'normal search'));\n $buttons[] = $this->createElement('style_reset_button', 'reset', Translation :: get('Reset', null, Utilities::COMMON_LIBRARIES), array('class' => 'normal empty'));\n\n $this->addGroup($buttons, 'buttons', null, '&nbsp;', false);\n }", "public function displayForm() {\n\t\t$output = $this->getOutput();\n\n\t\t$form_class = $this->adapter->getFormClass();\n\t\t// TODO: use interface. static ctor.\n\t\tif ( $form_class && class_exists( $form_class ) ){\n\t\t\t$form_obj = new $form_class();\n\t\t\t$form_obj->setGateway( $this->adapter );\n\t\t\t$form_obj->setGatewayPage( $this );\n\t\t\t$form = $form_obj->getForm();\n\t\t\t$output->addModules( $form_obj->getResources() );\n\t\t\t$output->addModuleStyles( $form_obj->getStyleModules() );\n\t\t\t$output->addHTML( $form );\n\t\t} else {\n\t\t\t$this->logger->error( \"Displaying fail page for bad form class '$form_class'\" );\n\t\t\t$this->displayFailPage( false );\n\t\t}\n\t}", "function renderForm()\t{\n\n\t\t$fields[] = $this->renderField( $GLOBALS['LANG']->getLL('settings'), 'divider', '');\n\t\t$fields[] = $this->renderField( $GLOBALS['LANG']->getLL('spaceTitle'), 'text', 'title');\n\t\n\t\tif(count($this->error) > 0) {\n\t\t\t$form .= \"<span style='display:block;color:red;font-weight:bold;padding:10px;'>\" .\n\t\t\t\t\t\t\t implode(\"<br />\", $this->error) . \n\t\t\t\t\t \"</span>\";\t\n\t\t}\n\n\t\t$form .= \"<form action=\" . t3lib_div::getThisUrl() . \"><table border='0' cellpadding='7'>\";\n\t\t$form .= implode(\"\\n\", $fields);\n\t\t$form .= \"<tr><td colspan='2' align='right'>\" .\n\t\t\t\t \"<input type='hidden' name='formPosted' value='1'>\" . \n\t\t\t\t \"<input type='submit' value='\" . $GLOBALS['LANG']->getLL('createSpace') . \"'></td></tr></table></form>\";\n\n\t\treturn $form;\n\t}", "public function displayForm() {\n\t\t$output = $this->getOutput();\n\n\t\t$form_class = $this->adapter->getFormClass();\n\t\t// TODO: use interface. static ctor.\n\t\tif ( $form_class && class_exists( $form_class ) ) {\n\t\t\t$form_obj = new $form_class();\n\t\t\t$form_obj->setGateway( $this->adapter );\n\t\t\t$form_obj->setGatewayPage( $this );\n\t\t\t$form = $form_obj->getForm();\n\t\t\t$output->addModules( $form_obj->getResources() );\n\t\t\t$output->addModuleStyles( $form_obj->getStyleModules() );\n\t\t\t$output->addHTML( $form );\n\t\t} else {\n\t\t\t$this->logger->error( \"Displaying fail page for bad form class '$form_class'\" );\n\t\t\t$this->displayFailPage( false );\n\t\t}\n\t}", "function buildForm(){\n\t\t# menampilkan form\n\t}", "public function getPanel() {\n $isAdditionalBar = \\TracyDebugger::isAdditionalBar();\n $out = \"<h1>{$this->icon} {$this->label}\" . ($isAdditionalBar ? \" (\".$isAdditionalBar.\")\" : \"\") . \"</h1>\";\n\n $out .= '<span class=\"tracy-icons\"><span class=\"resizeIcons\"><a href=\"#\" title=\"Maximize / Restore\" onclick=\"tracyResizePanel(\\'' . $this->className . '\\')\">+</a></span></span>';\n\n // panel body\n $out .= '<div class=\"tracy-inner\">';\n\n $numOrphanFiles = count($this->orphanFiles);\n\n if($numOrphanFiles > 0) {\n $out .= '\n <form style=\"display:inline\" method=\"post\" action=\"'.\\TracyDebugger::inputUrl(true).'\" onsubmit=\"return confirm(\\'Do you really want to delete all the orange highlighted orphan files?\\');\">\n <input type=\"hidden\" name=\"orphanPaths\" value=\"'.implode('|', $this->orphanFiles).'\" />\n <input type=\"submit\" style=\"color:'.\\TracyDebugger::COLOR_WARN.' !important; color: #FFFFFF\" name=\"deleteOrphanFiles\" value=\"Delete '.$numOrphanFiles.' orphan'._n('', 's', $numOrphanFiles).'\" />\n </form>&nbsp&nbsp;';\n }\n\n if($this->numMissingFiles > 0) {\n $out .= '\n <form style=\"display:inline\" method=\"post\" action=\"'.\\TracyDebugger::inputUrl(true).'\" onsubmit=\"return confirm(\\'Do you really want to delete all the red highlighted missing pagefiles?\\');\">\n <input type=\"hidden\" name=\"missingPaths\" value=\"'.urlencode(json_encode($this->missingFiles)).'\" />\n <input type=\"submit\" style=\"color:'.\\TracyDebugger::COLOR_ALERT.' !important; color: #FFFFFF\" name=\"deleteMissingFiles\" value=\"Delete '.$this->numMissingFiles.' missing pagefile'._n('', 's', $this->numMissingFiles).'\" />\n </form>';\n }\n\n if($numOrphanFiles > 0 || $this->numMissingFiles > 0) {\n $out .= '<br /><br />';\n }\n\n $out .= '<div id=\"tracyPageFilesList\">'.$this->filesListStr.'</div>';\n\n $out .= \\TracyDebugger::generatePanelFooter($this->name, \\Tracy\\Debugger::timer($this->name), strlen($out));\n $out .= '</div>';\n\n return parent::loadResources() . $out;\n }", "function renderWholeForm() {\n\t\t$output = $this->renderCurrentStep();\n\t\t$output .= $this->renderSubmitButtons();\n\n\t\treturn $this->wrapWithForm ($output);\n\t}", "public function buildForm()\n {\n $this\n ->addNarrative('location_description_narrative')\n ->addAddMoreButton('add', 'location_description_narrative');\n }", "protected function form()\n {\n $form = new Form(new Resources);\n\n $form->text('name', '名称')->rules('required',['required' => '请输入 配置项的名称']);\n\n $form->radio('type', '类型')->options(Resources::TYPE);\n\n $form->cropper('url','图片');\n\n $form->number('sort_num','排序');\n\n $form->textarea('memo','备注');\n\n $form->tools(function (Form\\Tools $tools) {\n // 去掉`删除`按钮\n $tools->disableDelete();\n\n // 去掉`查看`按钮\n $tools->disableView();\n });\n $form->footer(function ($footer) {\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n\n // 去掉`继续编辑`checkbox\n $footer->disableEditingCheck();\n\n // 去掉`继续创建`checkbox\n $footer->disableCreatingCheck();\n\n });\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new ThemePoster());\n\n $form->select('domain_id', __('domain_id'))->options(DomainConfig::getDomainMap())->rules('required');\n $form->radio('type', __('type'))->options(ThemePoster::getTypeMap())->when(1, function (Form $form){\n $form->select('type_id', __('type_id'))->options(array_merge(['0' => '总列表'], Product::getCategoryMap()->toArray()))->rules('required');\n\n })->when(2, function (Form $form){\n $form->select('type_id', __('type_id'))->options(array_merge(['0' => '总列表'], Article::getCategoryMap()))->rules('required');\n\n });\n $form->text('title', __('title'))->rules('required');\n $form->text('alt', __('alt'))->rules('required');\n $form->image('site', '图片尺寸 1600*300')\n ->uniqueName()\n ->rules('required|max:150')->resize(1600, 300);\n $form->url('link', __('link'));\n $form->switch('is_show', __('is_show'));\n\n return $form;\n }", "function form($instance) {\n\t\t\n\t\t$defaults= array(\t\t\t\t\n\t\t\t'skill_title' => 'Skill',\n\t\t\t'skill_level' => '70',\t\t\t\n\t\t\t'skill_color' => '#ebebeb'\t\t\n\t\t);\n\t\t\n\t\t$instance = wp_parse_args($instance, $defaults);\n\t\textract($instance);\n\t\t\n\t\t?>\n\t\t\n\t\t<p class=\"description\">\n\t\t\t<label for=\"<?php echo $this->get_field_id('skill_title') ?>\">\n\t\t\t\tSkill Title<br/>\n\t\t\t\t<?php echo aq_field_input('skill_title', $block_id, $skill_title) ?>\t\t\n\t\t\t</label>\n\t\t</p>\n\t\t<p class=\"description\">\n\t\t\t<label for=\"<?php echo $this->get_field_id('skill_level') ?>\">\n\t\t\t\tSkill Level<br/>\n\t\t\t\t<?php echo aq_field_input('skill_level', $block_id, $skill_level, 'min', 'number') ?>\n\t\t\t</label>\n\t\t</p>\n\t\t<div class=\"description\">\n\t\t\t<label for=\"<?php echo $this->get_field_id('skill_color') ?>\">\n\t\t\t\tSkill Graph Color<br/>\n\t\t\t\t<?php echo aq_field_color_picker('skill_color', $block_id, $skill_color) ?>\n\t\t\t</label>\n\t\t\t\n\t\t</div>\n\t\t\n\t\t\n\t\t<?php\n\t\t\n\t}", "protected function form()\n {\n $form = new Form(new Activity());\n\n $form->text('log_name', __('Log name'));\n $form->text('description', __('Description'));\n $form->number('subject_id', __('Subject id'));\n $form->text('subject_type', __('Subject type'));\n $form->number('causer_id', __('Causer id'));\n $form->text('causer_type', __('Causer type'));\n $form->textarea('properties', __('Properties'));\n\n return $form;\n }", "function createCtfEstimateForm($extra=false) {\n\t// check if coming directly from a session\n\t$expId = $_GET['expId'];\n\tif ($expId) {\n\t\t$sessionId=$expId;\n\t\t$formAction=$_SERVER['PHP_SELF'].\"?expId=$expId\";\n\t}\n\telse {\n\t\t$sessionId=$_POST['sessionId'];\n\t\t$formAction=$_SERVER['PHP_SELF'];\t\n\t}\n\t$projectId=getProjectId();\n\n\t// check if running ctffind or ctftilt\n\t$progname = \"Xmipp CTF Estimator\";\n\t$runbase = \"xmippctf\";\n\n\t$presetval = ($_POST['preset']) ? $_POST['preset'] : 'en';\n\t$javafunctions = \"\";\n\t$javafunctions .= writeJavaPopupFunctions('appion');\n\tprocessing_header(\"$progname Launcher\", \"$progname\", $javafunctions);\n\n\tif ($extra) {\n\t\techo \"<font color='#cc3333' size='+2'>$extra</font>\\n<hr/>\\n\";\n\t}\n\n\techo\"\n\t<form name='viewerform' method='POST' action='$formAction'>\\n\";\n\t$sessiondata=getSessionList($projectId,$expId);\n\t$sessioninfo=$sessiondata['info'];\n\t$presets=$sessiondata['presets'];\n\tif (!empty($sessioninfo)) {\n\t\t$sessionpath=getBaseAppionPath($sessioninfo).'/ctf/';\n\t}\n\t$ctf = new particledata();\n\t$lastrunnumber = $ctf->getLastRunNumberForType($sessionId,'ApAceRunData','name'); \n\twhile (file_exists($sessionpath.$runbase.'run'.($lastrunnumber+1)))\n\t\t$lastrunnumber += 1;\n\t$defrunname = ($_POST['runname']) ? $_POST['runname'] : $runbase.'run'.($lastrunnumber+1);\n\n\t// set defaults and check posted values\n\t$form_fieldsz = ($_POST['fieldsize']) ? $_POST['fieldsize'] : 512;\n\t$form_resmin = ($_POST['resmin']) ? $_POST['resmin'] : '100';\n\t$form_resmax = ($_POST['resmax']) ? $_POST['resmax'] : '10';\n\n\techo\"\n\t<TABLE BORDER=0 CLASS=tableborder CELLPADDING=15>\n\t<TR>\n\t <TD VALIGN='TOP'>\";\n\n\tcreateAppionLoopTable($sessiondata, $defrunname, \"ctf\");\n\techo\"\n\t </TD>\n\t <TD CLASS='tablebg'>\";\n\n\techo \"<b>$progname Values</b><br/>\\n\";\n\techo \"<INPUT TYPE='text' NAME='fieldsize' VALUE='$form_fieldsz' size='6'>\\n\";\n\techo docpop('field','Field Size');\n\techo \"<br />\\n\";\n\techo \"<input type='text' name='resmin' value='$form_resmin' size='6'>\\n\";\n\techo docpop('resmin','Minimum Resolution');\n\techo \" (&Aring;ngstroms)<br />\\n\";\n\techo \"<input type='text' name='resmax' value='$form_resmax' size='6'>\\n\";\n\techo docpop('resmax','Maximum Resolution');\n\techo \" (&Aring;ngstroms)<br />\\n\";\n\techo \"<br />\\n\";\n\n\techo\"\n\t </TD>\n\t</tr>\n\t<TR>\n\t <TD COLSPAN='2' ALIGN='CENTER'>\\n<hr />\";\n\techo getSubmitForm(\"Run $progname\");\n\techo \"\n\t </td>\n\t</tr>\n\t</table>\n\t</form>\\n\";\n\n\techo referenceBox(\"Fast, robust, and accurate determination of transmission electron microscopy contrast transfer function.\", 2007, \"Sorzano CO, Jonic S, Núñez-Ramírez R, Boisset N, Carazo JM.\", \"J Struct Biol.\", 160, 2, 17911028, false, false, \"img/xmipp_logo.png\");\n\n\tprocessing_footer();\n}", "function build() {\n\t\t$this->order_id = new view_field(\"Order ID\");\n\t\t$this->timestamp = new view_field(\"Date\");\n\t\t$this->total_amount = new view_field(\"Amount\");\n $this->view= new view_element(\"static\");\n \n $translations = new translations(\"fields\");\n $invoice_name = $translations->translate(\"fields\",\"Invoice\",true);\n $this->view->value=\"<a href=\\\"/orders/order_details.php?order_id={$this->_order_id}\\\" target=\\\"invoice\\\">\".$invoice_name.\"</a>\";\n\n\t\tif(isset($_SESSION['wizard']['complete']['process_time']))\n\t\t{\n\t\t\t$this->process_time = new view_field(\"Seconds to process\");\n\t\t\t$this->process_time->value=$_SESSION['wizard']['complete']['process_time'];\n\t\t\t$this->server = new view_field();\n\t\t\t$address_parts = explode('.',$_SERVER['SERVER_ADDR']);\n\t\t\t$this->server->value = $address_parts[count($address_parts) - 1];\n\t\t}\n\t\tparent::build();\n\t}", "protected function form()\n {\n $form = new Form(new Good);\n $form->text('name', __('名称'))->rules('required');\n $form->decimal('amount', __('价格'))->default(0.00)->rules('required');\n $form->text('unit', __('单位'))->rules('required');\n $form->image('list_img', __('缩略图(320*320)'))->creationRules('required');\n $form->hasMany('goodsimgs', __('轮播图(640*640)'),function(Form\\NestedForm $form){\n $form->image('img',__('轮播图'))->creationRules('required');\n });\n $form->kindeditor('describe', __('描述'));\n // 去掉`查看`checkbox\n $form->disableViewCheck();\n // 去掉`继续编辑`checkbox\n $form->disableEditingCheck();\n // 去掉`继续创建`checkbox\n $form->disableCreatingCheck();\n return $form;\n }", "protected function form()\n {\n $form = new Form(new LotteryCode());\n\n $form->text('code', __('Code'));\n $form->number('batch_num', __('Batch num'));\n $form->text('prizes_name', __('Prizes name'));\n $form->datetime('valid_period', __('Valid period'))->default(date('Y-m-d H:i:s'));\n $form->datetime('prizes_time', __('Prizes time'))->default(date('Y-m-d H:i:s'));\n $form->text('operator', __('Operator'));\n $form->switch('award_status', __('Award status'));\n\n return $form;\n }", "public function renderProgressBar()\n {\n if (!isset($this->progressBarOptions['id'])) {\n $this->progressBarOptions['id'] = $this->options['id'] . static::ID_PROGRESS_SUFFIX;\n }\n if (!isset($this->clientOptions['progressBarId'])) {\n $this->clientOptions['progressBarId'] = $this->progressBarOptions['id'];\n }\n return Html::tag($this->progressBarTag, '', $this->progressBarOptions);\n }", "protected function getForm() {\n\t\tglobal $wgScript;\n\n\t\t$this->opts['title'] = $this->getPageTitle()->getPrefixedText();\n\t\tif ( !isset( $this->opts['target'] ) ) {\n\t\t\t$this->opts['target'] = '';\n\t\t} else {\n\t\t\t$this->opts['target'] = str_replace( '_', ' ', $this->opts['target'] );\n\t\t}\n\n\t\tif ( !isset( $this->opts['namespace'] ) ) {\n\t\t\t$this->opts['namespace'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['nsInvert'] ) ) {\n\t\t\t$this->opts['nsInvert'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['associated'] ) ) {\n\t\t\t$this->opts['associated'] = false;\n\t\t}\n\n\t\tif ( !isset( $this->opts['contribs'] ) ) {\n\t\t\t$this->opts['contribs'] = 'user';\n\t\t}\n\n\t\tif ( !isset( $this->opts['year'] ) ) {\n\t\t\t$this->opts['year'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['month'] ) ) {\n\t\t\t$this->opts['month'] = '';\n\t\t}\n\n\t\tif ( $this->opts['contribs'] == 'newbie' ) {\n\t\t\t$this->opts['target'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['tagfilter'] ) ) {\n\t\t\t$this->opts['tagfilter'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['topOnly'] ) ) {\n\t\t\t$this->opts['topOnly'] = false;\n\t\t}\n\n\t\tif ( !isset( $this->opts['newOnly'] ) ) {\n\t\t\t$this->opts['newOnly'] = false;\n\t\t}\n\n\t\t$form = Html::openElement(\n\t\t\t'form',\n\t\t\tarray(\n\t\t\t\t'method' => 'get',\n\t\t\t\t'action' => $wgScript,\n\t\t\t\t'class' => 'mw-contributions-form'\n\t\t\t)\n\t\t);\n\n\t\t# Add hidden params for tracking except for parameters in $skipParameters\n\t\t$skipParameters = array(\n\t\t\t'namespace',\n\t\t\t'nsInvert',\n\t\t\t'deletedOnly',\n\t\t\t'target',\n\t\t\t'contribs',\n\t\t\t'year',\n\t\t\t'month',\n\t\t\t'topOnly',\n\t\t\t'newOnly',\n\t\t\t'associated'\n\t\t);\n\n\t\tforeach ( $this->opts as $name => $value ) {\n\t\t\tif ( in_array( $name, $skipParameters ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$form .= \"\\t\" . Html::hidden( $name, $value ) . \"\\n\";\n\t\t}\n\n\t\t$tagFilter = ChangeTags::buildTagFilterSelector( $this->opts['tagfilter'] );\n\n\t\tif ( $tagFilter ) {\n\t\t\t$filterSelection = Html::rawElement(\n\t\t\t\t'td',\n\t\t\t\tarray( 'class' => 'mw-label' ),\n\t\t\t\tarray_shift( $tagFilter )\n\t\t\t);\n\t\t\t$filterSelection .= Html::rawElement(\n\t\t\t\t'td',\n\t\t\t\tarray( 'class' => 'mw-input' ),\n\t\t\t\timplode( '&#160', $tagFilter )\n\t\t\t);\n\t\t} else {\n\t\t\t$filterSelection = Html::rawElement( 'td', array( 'colspan' => 2 ), '' );\n\t\t}\n\n\t\t$labelNewbies = Xml::radioLabel(\n\t\t\t$this->msg( 'sp-contributions-newbies' )->text(),\n\t\t\t'contribs',\n\t\t\t'newbie',\n\t\t\t'newbie',\n\t\t\t$this->opts['contribs'] == 'newbie',\n\t\t\tarray( 'class' => 'mw-input' )\n\t\t);\n\t\t$labelUsername = Xml::radioLabel(\n\t\t\t$this->msg( 'sp-contributions-username' )->text(),\n\t\t\t'contribs',\n\t\t\t'user',\n\t\t\t'user',\n\t\t\t$this->opts['contribs'] == 'user',\n\t\t\tarray( 'class' => 'mw-input' )\n\t\t);\n\t\t$input = Html::input(\n\t\t\t'target',\n\t\t\t$this->opts['target'],\n\t\t\t'text',\n\t\t\tarray( 'size' => '40', 'required' => '', 'class' => 'mw-input' ) +\n\t\t\t\t( $this->opts['target'] ? array() : array( 'autofocus' )\n\t\t\t\t)\n\t\t);\n\t\t$targetSelection = Html::rawElement(\n\t\t\t'td',\n\t\t\tarray( 'colspan' => 2 ),\n\t\t\t$labelNewbies . '<br />' . $labelUsername . ' ' . $input . ' '\n\t\t);\n\n\t\t$namespaceSelection = Xml::tags(\n\t\t\t'td',\n\t\t\tarray( 'class' => 'mw-label' ),\n\t\t\tXml::label(\n\t\t\t\t$this->msg( 'namespace' )->text(),\n\t\t\t\t'namespace',\n\t\t\t\t''\n\t\t\t)\n\t\t);\n\t\t$namespaceSelection .= Html::rawElement(\n\t\t\t'td',\n\t\t\tnull,\n\t\t\tHtml::namespaceSelector(\n\t\t\t\tarray( 'selected' => $this->opts['namespace'], 'all' => '' ),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => 'namespace',\n\t\t\t\t\t'id' => 'namespace',\n\t\t\t\t\t'class' => 'namespaceselector',\n\t\t\t\t)\n\t\t\t) . '&#160;' .\n\t\t\t\tHtml::rawElement(\n\t\t\t\t\t'span',\n\t\t\t\t\tarray( 'style' => 'white-space: nowrap' ),\n\t\t\t\t\tXml::checkLabel(\n\t\t\t\t\t\t$this->msg( 'invert' )->text(),\n\t\t\t\t\t\t'nsInvert',\n\t\t\t\t\t\t'nsInvert',\n\t\t\t\t\t\t$this->opts['nsInvert'],\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'title' => $this->msg( 'tooltip-invert' )->text(),\n\t\t\t\t\t\t\t'class' => 'mw-input'\n\t\t\t\t\t\t)\n\t\t\t\t\t) . '&#160;'\n\t\t\t\t) .\n\t\t\t\tHtml::rawElement( 'span', array( 'style' => 'white-space: nowrap' ),\n\t\t\t\t\tXml::checkLabel(\n\t\t\t\t\t\t$this->msg( 'namespace_association' )->text(),\n\t\t\t\t\t\t'associated',\n\t\t\t\t\t\t'associated',\n\t\t\t\t\t\t$this->opts['associated'],\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'title' => $this->msg( 'tooltip-namespace_association' )->text(),\n\t\t\t\t\t\t\t'class' => 'mw-input'\n\t\t\t\t\t\t)\n\t\t\t\t\t) . '&#160;'\n\t\t\t\t)\n\t\t);\n\n\t\tif ( $this->getUser()->isAllowed( 'deletedhistory' ) ) {\n\t\t\t$deletedOnlyCheck = Html::rawElement(\n\t\t\t\t'span',\n\t\t\t\tarray( 'style' => 'white-space: nowrap' ),\n\t\t\t\tXml::checkLabel(\n\t\t\t\t\t$this->msg( 'history-show-deleted' )->text(),\n\t\t\t\t\t'deletedOnly',\n\t\t\t\t\t'mw-show-deleted-only',\n\t\t\t\t\t$this->opts['deletedOnly'],\n\t\t\t\t\tarray( 'class' => 'mw-input' )\n\t\t\t\t)\n\t\t\t);\n\t\t} else {\n\t\t\t$deletedOnlyCheck = '';\n\t\t}\n\n\t\t$checkLabelTopOnly = Html::rawElement(\n\t\t\t'span',\n\t\t\tarray( 'style' => 'white-space: nowrap' ),\n\t\t\tXml::checkLabel(\n\t\t\t\t$this->msg( 'sp-contributions-toponly' )->text(),\n\t\t\t\t'topOnly',\n\t\t\t\t'mw-show-top-only',\n\t\t\t\t$this->opts['topOnly'],\n\t\t\t\tarray( 'class' => 'mw-input' )\n\t\t\t)\n\t\t);\n\t\t$checkLabelNewOnly = Html::rawElement(\n\t\t\t'span',\n\t\t\tarray( 'style' => 'white-space: nowrap' ),\n\t\t\tXml::checkLabel(\n\t\t\t\t$this->msg( 'sp-contributions-newonly' )->text(),\n\t\t\t\t'newOnly',\n\t\t\t\t'mw-show-new-only',\n\t\t\t\t$this->opts['newOnly'],\n\t\t\t\tarray( 'class' => 'mw-input' )\n\t\t\t)\n\t\t);\n\t\t$extraOptions = Html::rawElement(\n\t\t\t'td',\n\t\t\tarray( 'colspan' => 2 ),\n\t\t\t$deletedOnlyCheck . $checkLabelTopOnly . $checkLabelNewOnly\n\t\t);\n\n\t\t$dateSelectionAndSubmit = Xml::tags( 'td', array( 'colspan' => 2 ),\n\t\t\tXml::dateMenu(\n\t\t\t\t$this->opts['year'] === '' ? MWTimestamp::getInstance()->format( 'Y' ) : $this->opts['year'],\n\t\t\t\t$this->opts['month']\n\t\t\t) . ' ' .\n\t\t\t\tXml::submitButton(\n\t\t\t\t\t$this->msg( 'sp-contributions-submit' )->text(),\n\t\t\t\t\tarray( 'class' => 'mw-submit' )\n\t\t\t\t)\n\t\t);\n\n\t\t$form .= Xml::fieldset( $this->msg( 'sp-contributions-search' )->text() );\n\t\t$form .= Html::rawElement( 'table', array( 'class' => 'mw-contributions-table' ), \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $targetSelection ) . \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $namespaceSelection ) . \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $filterSelection ) . \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $extraOptions ) . \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $dateSelectionAndSubmit ) . \"\\n\"\n\t\t);\n\n\t\t$explain = $this->msg( 'sp-contributions-explain' );\n\t\tif ( !$explain->isBlank() ) {\n\t\t\t$form .= \"<p id='mw-sp-contributions-explain'>{$explain->parse()}</p>\";\n\t\t}\n\n\t\t$form .= Xml::closeElement( 'fieldset' ) . Xml::closeElement( 'form' );\n\n\t\treturn $form;\n\t}", "public function form()\n {\n $this->switch('footer_remove', Support::trans('main.footer_remove'))\n ->default(admin_setting('footer_remove'));\n $defaultColors = [\n 'default' => '墨蓝',\n 'blue' => '蓝',\n 'blue-light' => '亮蓝',\n 'green' => '墨绿',\n ];\n foreach (explode(\",\", ServiceProvider::setting('additional_theme_colors')) as $value) {\n if (!empty($value)) {\n [$k, $v] = explode(\":\", $value);\n $defaultColors[$k] = $v;\n }\n }\n\n $this->radio('theme_color', Support::trans('main.theme_color'))\n ->options($defaultColors)\n ->default(admin_setting('theme_color'));\n $this->radio('sidebar_style', Support::trans('main.sidebar_style'))\n ->options([\n 'default' => '默认',\n 'sidebar-separate' => '菜单分离',\n 'horizontal_menu' => '水平菜单'\n ])\n ->default(admin_setting('sidebar_style'));\n $this->switch('grid_row_actions_right', Support::trans('main.grid_row_actions_right'))\n ->help('启用后表格行操作按钮将永远贴着最右侧。')\n ->default(admin_setting('grid_row_actions_right'));\n }", "protected function form()\n {\n $form = new Form(new StationBannerImage());\n\n $form->select('station_id', __('測站'))->options(Station::all()->pluck('station_name', 'id'))->rules('required');\n $form->image('image', __('輪播圖'))->help('圖片尺寸:2297*1583')->rules('required');\n $form->url('url', __('連結'))->placeholder('例:http://www.cwb.gov.tw');\n $form->text('order', __('排序'));\n $form->datetime('valid_at', __('有效日期'))->default(date('Y-m-d H:i:s'));\n $form->text('mod_user', __('異動人員'))->default(Admin::user()->name)->readonly();\n $form->saving(function (Form $form) {\n $form->mod_user = Admin::user()->name;\n });\n\n return $form;\n }", "public function showForm($iniValues = NULL) {\n\t\t$form [] = '<form action=\"\" class=\"editor\" method=\"post\">';\n\t\t$form [] = \"<div class='box-inside-form'>\";\n\t\t$form [] = '<label for=\"title\">Titel</label>';\n\t\t$form [] = '<input type=\"text\" id=\"title\" name=\"title\" value=\"' . $iniValues ['title'] . '\">';\n\t\t$form [] = '<label for=\"category\">Kategorie</label>';\n\t\t$k = parent::distinct ( \"category\" );\n\t\t$category = '<input list=\"category\" name=\"category\" value=\"' . $iniValues ['category'] . '\">';\n\t\t$category .= '<datalist id=\"category\">';\n\t\twhile ( $k ) {\n\t\t\t$category .= '<option value=\"' . array_shift ( $k ) . '\">';\n\t\t}\n\t\t$form [] = $category . '</datalist>';\n\t\tif ($chapter) {\n\t\t\t$form [] = '<label for=\"chapter\">Kapitel</label>';\n\t\t\tif (empty ( $iniValues ['chapter'] )) {\n\t\t\t\t$chap = 0;\n\t\t\t} else {\n\t\t\t\t$chap = $iniValues ['chapter'];\n\t\t\t}\n\t\t\t$form [] = '<input type=\"number\" id=\"chapter\" name=\"chapter\" size=\"3\" value=\"' . $chap . '\" min=\"0\">';\n\t\t}\n\t\t$form [] = '<label for=\"keywords\">Schlagworte</label> <input type=\"text\"\n\t\t\t\t\t\t\t\tid=\"keywords\" name=\"keywords\" value=\"' . $iniValues ['keywords'] . '\">';\n\t\t$form [] = '<label for=\"status\">Status</label>';\n\t\t$form [] = '<select id=\"status\"\tname=\"status\">\n\t\t\t\t\t\t<option value=\"public\">sichtbar</option>\n\t\t\t\t\t\t<option value=\"draft\">Entwurf</option>\n\t\t\t\t\t\t<option value=\"archive\">Archiv</option>\n\t\t\t\t\t</select>';\n\t\t$form [] = \"</div><div style='clear:both'></div>\";\n\t\t$form [] = '<textarea id=\"editor\" name=\"text\">' . $iniValues ['text'] . '</textarea>';\n\t\tif ($iniValues) {\n\t\t\t$form [] = Registry::makeUpdateButton ();\n\t\t\t$form [] = Registry::makeDeleteButton ();\n\t\t\t$form [] = '<input type=\"hidden\" id=\"id\" name=\"id\" value=\"' . $iniValues ['id'] . '\">';\n\t\t\t$form [] = '<input type=\"hidden\" id=\"page\" name=\"page\" value=\"' . $iniValues ['page'] . '\">';\n\t\t} else {\n\t\t\t$form [] = Registry::makeInsertButton ();\n\t\t}\n\t\t$form [] = '</form>';\n\t\t\n\t\techo implode ( \"\\n\", $form );\n\t}", "protected function initializeForm()\n {\n $this->form = new Form();\n $this->form->add(Element::create(\"FieldSet\",\"Report Format\")->add\n (\n Element::create(\"SelectionList\", \"File Format\", \"report_format\")\n ->addOption(\"Hypertext Markup Language (HTML)\",\"html\")\n ->addOption(\"Portable Document Format (PDF)\",\"pdf\")\n ->addOption(\"Microsoft Excel (XLS)\",\"xls\")\n ->addOption(\"Microsoft Word (DOC)\",\"doc\")\n ->setRequired(true)\n ->setValue(\"pdf\"),\n Element::create(\"SelectionList\", \"Page Orientation\", \"page_orientation\")\n ->addOption(\"Landscape\", \"L\")\n ->addOption(\"Portrait\", \"P\")\n ->setValue(\"L\"),\n Element::create(\"SelectionList\", \"Paper Size\", \"paper_size\")\n ->addOption(\"A4\", \"A4\")\n ->addOption(\"A3\", \"A3\")\n ->setValue(\"A4\")\n )->setId(\"report_formats\")->addAttribute(\"style\",\"width:50%\")\n );\n $this->form->setSubmitValue(\"Generate\");\n $this->form->addAttribute(\"action\",Application::getLink($this->path.\"/generate\"));\n $this->form->addAttribute(\"target\",\"blank\");\n }", "protected function form()\n {\n $form = new Form(new BuSong);\n\n// $form->number('serialid', __('Serialid'));\n $form->text('svrkey', __('svrkey'));\n $form->text('songname', __('歌名'));\n $form->text('singer', __('歌星'));\n $form->select('langtype', __('语种'))->options([0=>'国语',1=>'粤语',2=>'英语',3=>'台语',4=>'日语',5=>'韩语',6=>'不详']);\n $form->text('remarks', __('备注'));\n $form->datetime('createdate', __('创建时间'))->default(date('Y-m-d H:i:s'));\n $form->select('ischeck', __('是否检查'))->options([0=>'否',1=>'是']);\n $form->select('buState', __('状态'))->options([0=>'新增',1=>'处理中',2=>'完成',3=>'歌曲信息出错',4=>'取消无法处理',5=>'已上传',6=>'彻底删除']);\n $form->text('musicdbpk', __('musicdbpk'));\n $form->text('optionRemarks', __('操作日志'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Product());\n\n $form->text('product_core', __('Product core'));\n $form->text('title', __('Title'));\n $form->text('long_title', __('Long title'));\n $form->text('bar_code', __('Bar code'));\n $form->number('category_id', __('Category id'));\n $form->switch('status', __('Status'));\n $form->select('audit_status', '审核状态')->options(\n [0 => '未进行审核', 1 => '审核已通过', 2 => '审核未通过']\n );\n $form->number('shop_id', __('Shop id'));\n $form->number('description_id', __('Description id'));\n $form->decimal('rating', __('Rating'));\n $form->number('sold_count', __('Sold count'));\n $form->number('review_count', __('Review count'));\n $form->decimal('price', __('Price'));\n $form->image('image', __('Image'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Project());\n $form->text('name', '项目名称')->rules('required')->required();\n $form->url('url', '项目地址')->rules('required')->required();\n $form->text('username', '账号');\n $form->text('password', '密码');\n $status = [\n 'on' => ['value' => 1, 'text' => '启用', 'color' => 'success'],\n 'off' => ['value' => 2, 'text' => '禁用', 'color' => 'danger'],\n ];\n $form->switch('status', '状态')->states($status)->default(1);\n $form->tools(function (Form\\Tools $tools) {\n $tools->disableDelete();\n $tools->disableView();\n });\n $form->footer(function ($footer) {\n $footer->disableReset();\n $footer->disableViewCheck();\n $footer->disableEditingCheck();\n $footer->disableCreatingCheck();\n });\n\n return $form;\n }", "function buildForm()\n {\n $this->buildTabs();\n // tab caption\n $this->addElement('header', null, 'Specify file role for specific files');\n\n $fe =& PEAR_PackageFileManager_Frontend::singleton();\n $sess =& $fe->container();\n\n $selection = $this->getSubmitValue('files');\n $selection_count = count($selection);\n $fe->log('debug',\n str_pad($this->getAttribute('id') .'('. __LINE__ .')', 20, '.') .\n ' selection='. serialize($selection)\n );\n\n list($page, $action) = $this->controller->getActionName();\n\n // selection list (false) or edit dialog frame (true)\n if ($action == 'edit' && $selection_count > 0) {\n $editDialog = true;\n }elseif ($action == 'save') {\n $editDialog = true;\n } else {\n $editDialog = false;\n }\n\n if (!$editDialog) {\n\n foreach ($sess['defaults']['_files']['mapping'] as $fn) {\n $pinfo = pathinfo($fn);\n $ext[] = $pinfo['extension'];\n }\n $extensions = array_unique($ext);\n $extensions[] = '-None-';\n sort($extensions, SORT_ASC);\n $extensions = array_combine($extensions, $extensions);\n\n // Role options list: (value => text, with value === text)\n $pageName = $fe->getPageName('page1');\n $releaseType = $fe->exportValue($pageName, 'packageType');\n $roles = PEAR_Installer_Role::getValidRoles($releaseType);\n $roles[] = '-None-';\n sort($roles, SORT_ASC);\n $roles = array_combine($roles, $roles);\n\n $filters = array();\n $filters[] = &HTML_QuickForm::createElement('select', 'extensionFilter', 'Extension', $extensions);\n $filters[] = &HTML_QuickForm::createElement('select', 'roleFilter', 'Role', $roles);\n $filters[] = &HTML_QuickForm::createElement('submit', $this->getButtonName('sort'), 'Apply');\n $this->addGroup($filters, 'filters', 'Filters applied on list :', '', false);\n\n $hdr = array('Path', 'Role');\n $table = new HTML_Table(array('class' => 'tableone'));\n $htmltableDecorator = new PEAR_PackageFileManager_Frontend_Decorator_HTMLTable($fe);\n $htmltableDecorator->setHtmlTable($table);\n $htmltableDecorator->getExceptionList($hdr);\n // We need a simple static html area for maintainers list.\n $this->addElement('static', 'exceptions', '', $htmltableDecorator->toHtml());\n\n $def = array('extensionFilter' => '-None-', 'roleFilter' => '-None-');\n $this->setDefaults($def);\n\n $commands = array('edit', 'remove');\n $nocmd = array('commit', 'reset');\n\n } else {\n\n // we need a multiple-select box for list of file targets\n $rPath =& $this->addElement('select', 'exceptfiles');\n $rPath->setMultiple(true);\n $rPath->setLabel('Path:');\n $rPath->freeze();\n\n // Role options list: (value => text, with value === text)\n $pageName = $fe->getPageName('page1');\n $releaseType = $fe->exportValue($pageName, 'packageType');\n $roles = PEAR_Installer_Role::getValidRoles($releaseType);\n $roles[] = '';\n sort($roles, SORT_ASC);\n $roles = array_combine($roles, $roles);\n $this->addElement('select', 'role', 'Role:', $roles);\n\n if ($selection_count == 0) {\n $key1 = -1;\n $def = array();\n } else {\n $keys = $needle = array_keys($selection);\n $key1 = array_shift($needle);\n\n $files = array();\n foreach($keys as $k) {\n $files[$k] = $sess['files']['mapping'][$k];\n }\n $rPath->load($files, $keys);\n $def = array('exceptfiles' => $keys);\n }\n\n // applies new filters to the element values\n $this->applyFilter('__ALL__', 'trim');\n\n // old values of edit user\n $this->setDefaults($def);\n\n $commands = array('save', 'cancel');\n $nocmd = array('commit','reset');\n }\n\n // Buttons of the wizard to do the job\n $this->buildButtons($nocmd, $commands);\n }", "public function buildForm()\n {\n $this\n ->add(\n 'new_organization_group',\n 'collection',\n [\n 'type' => 'form',\n 'options' => [\n 'class' => 'App\\SuperAdmin\\Forms\\OrganizationGroupInformation',\n 'label' => false,\n ]\n ]\n )\n ->add(\n 'group_admin_information',\n 'collection',\n [\n 'type' => 'form',\n 'options' => [\n 'class' => 'App\\SuperAdmin\\Forms\\GroupAdmin',\n 'label' => false,\n ]\n ]\n )\n ->addSaveButton();\n }", "protected function form()\n {\n $form = new Form(new Terrace());\n\n $form->image('image', __('平台图片'))->rules('required', ['required' => '平台图片不能为空']);\n $form->text('name', __('平台名称'))->rules('required', ['required' => '平台名称不能为空']);\n $form->text('path', __('外链'))->rules('required', ['required' => '平台外链不能为空']);\n $form->text('notice_info', __('提示语'))->rules('required', ['required' => '平台提示语不能为空']);\n $form->radio('status','状态')->options(['1' => '未推荐', '2'=> '已推荐'])->default(1);\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new GithubRepositories());\n\n $form->text('name', __('项目名'));\n $form->text('full_name', __('项目全名'));\n $form->textarea('description', __('简介'));\n $form->textarea('owner', __('作者资料'));\n $form->textarea('html_url', __('网页地址'));\n $form->textarea('original_data', __('原始数据'));\n\n return $form;\n }", "protected function createComponentProjectForm(): Form {\n $form = new Form; \n\n //Get all available project types for select field\n $types = $this->database->table('types');\n $types_arr = array();\n foreach($types as $type) {\n $types_arr[$type->id] = $type->title;\n }\n\n $form->addText('title', \"Project Title:\")\n ->setRequired()\n ->addRule($form::MAX_LENGTH, 'The Project title need to be less than %d character long', 60);\n\n $form->addSelect(\"type_id\", \"Project Type\", $types_arr)\n ->setRequired();\n\n $form->addText('start_date', \"Start Date\")\n ->setHtmlType('date')\n ->setRequired();\n\n $form->addText('end_date', \"End Date\")\n ->setHtmlType('date')\n ->setRequired();\n\n $form->addSubmit('send', \"Publish Project\");\n\n $form->onSuccess[] = [$this, 'projectFormSucceeded'];\n\n return $form;\n }", "public function form( $instance ) {\n\n\t\t\t/* Set up some default widget settings. */\n\t\t\t$defaults \t\t\t= array();\n\t\t\t$instance \t\t\t= wp_parse_args( (array) $instance, $defaults ); \t\t\n\t\t\t$title1\t\t\t\t= isset( $instance['title1'] ) ? strip_tags($instance['title1']) : ''; \n\t\t\t$description \t\t= isset( $instance['description'] ) ? \tstrip_tags($instance['description']) : '';\n\t\t\t$categoryid \t\t= isset( $instance['category'] ) ? $instance['category'] : 0;\n\t\t\t$select_order \t= isset( $instance['select_order'] ) ? strip_tags($instance['select_order']) : 'latest';\n\t\t\t$orderby \t\t= isset( $instance['orderby'] ) ? strip_tags($instance['orderby']) : 'ID';\n\t\t\t$order \t\t= isset( $instance['order'] ) ? strip_tags($instance['order']) : 'ASC';\n\t\t\t$number \t\t= isset( $instance['numberposts'] ) ? intval($instance['numberposts']) : 5;\n\t\t\t$item_row \t\t= isset( $instance['item_row'] ) \t? intval($instance['item_row']) : 1;\n\t\t\t$tab_active \t\t= isset( $instance['tab_active'] ) ? intval($instance['tab_active']) : 1;\n\t\t\t$columns \t\t= isset( $instance['columns'] ) ? intval($instance['columns']) : 1;\n\t\t\t$autoplay \t\t= isset( $instance['autoplay'] ) ? strip_tags($instance['autoplay']) : 'false';\n\t\t\t$interval \t\t= isset( $instance['interval'] ) ? intval($instance['interval']) : 5000;\n\t\t\t$scroll \t\t= isset( $instance['scroll'] ) ? intval($instance['scroll']) : 1;\n\t\t\t$widget_template = isset( $instance['widget_template'] ) ? strip_tags($instance['widget_template']) : 'default';\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t?>\n\n\t\t\t</p> \n\t\t\t <div style=\"background: Blue; color: white; font-weight: bold; text-align:center; padding: 3px\"> * Data Config * </div>\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id('title1'); ?>\"><?php _e('Title', 'sw_woocommerce')?></label>\n\t\t\t\t<br />\n\t\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id('title1'); ?>\" name=\"<?php echo $this->get_field_name('title1'); ?>\"\n\t\t\t\t\ttype=\"text\"\tvalue=\"<?php echo esc_attr($title1); ?>\" />\n\t\t\t</p>\n\t\t\t\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id('description'); ?>\"><?php _e('Description', 'sw_woocommerce')?></label>\n\t\t\t\t<br />\n\t\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id('description'); ?>\" name=\"<?php echo $this->get_field_name('description'); ?>\"\n\t\t\t\t\ttype=\"text\"\tvalue=\"<?php echo esc_attr($description); ?>\" />\n\t\t\t</p>\n\t\t\t\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id('category'); ?>\"><?php _e('Category', 'sw_woocommerce')?></label>\n\t\t\t\t<br />\n\t\t\t\t<?php echo $this->category_select('category', array('allow_select_all' => true), $categoryid); ?>\n\t\t\t</p>\n\t\t\t\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id('select_order'); ?>\"><?php _e('Select Order', 'sw_woocommerce')?></label>\n\t\t\t\t<br />\n\t\t\t\t<?php $allowed_key = array('latest' => 'Latest Products', 'rating' => 'Top Rating Products', 'bestsales' => 'Best Selling Products', 'featured' => 'Featured Products'); ?>\n\t\t\t\t<select class=\"widefat\"\n\t\t\t\t\tid=\"<?php echo $this->get_field_id('select_order'); ?>\"\n\t\t\t\t\tname=\"<?php echo $this->get_field_name('select_order'); ?>\">\n\t\t\t\t\t<?php\n\t\t\t\t\t$option ='';\n\t\t\t\t\tforeach ($allowed_key as $value => $key) :\n\t\t\t\t\t\t$option .= '<option value=\"' . $value . '\" ';\n\t\t\t\t\t\tif ($value == $select_order){\n\t\t\t\t\t\t\t$option .= 'selected=\"selected\"';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$option .= '>'.$key.'</option>';\n\t\t\t\t\tendforeach;\n\t\t\t\t\techo $option;\n\t\t\t\t\t?>\n\t\t\t\t</select>\n\t\t\t</p>\n\t\t\t\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id('orderby'); ?>\"><?php _e('Orderby', 'sw_woocommerce')?></label>\n\t\t\t\t<br />\n\t\t\t\t<?php $allowed_keys = array('name' => 'Name', 'author' => 'Author', 'date' => 'Date', 'title' => 'Title', 'modified' => 'Modified', 'parent' => 'Parent', 'ID' => 'ID', 'rand' =>'Rand', 'comment_count' => 'Comment Count'); ?>\n\t\t\t\t<select class=\"widefat\"\n\t\t\t\t\tid=\"<?php echo $this->get_field_id('orderby'); ?>\"\n\t\t\t\t\tname=\"<?php echo $this->get_field_name('orderby'); ?>\">\n\t\t\t\t\t<?php\n\t\t\t\t\t$option ='';\n\t\t\t\t\tforeach ($allowed_keys as $value => $key) :\n\t\t\t\t\t\t$option .= '<option value=\"' . $value . '\" ';\n\t\t\t\t\t\tif ($value == $orderby){\n\t\t\t\t\t\t\t$option .= 'selected=\"selected\"';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$option .= '>'.$key.'</option>';\n\t\t\t\t\tendforeach;\n\t\t\t\t\techo $option;\n\t\t\t\t\t?>\n\t\t\t\t</select>\n\t\t\t</p>\n\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id('order'); ?>\"><?php _e('Order', 'sw_woocommerce')?></label>\n\t\t\t\t<br />\n\t\t\t\t<select class=\"widefat\"\n\t\t\t\t\tid=\"<?php echo $this->get_field_id('order'); ?>\" name=\"<?php echo $this->get_field_name('order'); ?>\">\n\t\t\t\t\t<option value=\"DESC\" <?php if ($order=='DESC'){?> selected=\"selected\"\n\t\t\t\t\t<?php } ?>>\n\t\t\t\t\t\t<?php _e('Descending', 'sw_woocommerce')?>\n\t\t\t\t\t</option>\n\t\t\t\t\t<option value=\"ASC\" <?php if ($order=='ASC'){?> selected=\"selected\"\t<?php } ?>>\n\t\t\t\t\t\t<?php _e('Ascending', 'sw_woocommerce')?>\n\t\t\t\t\t</option>\n\t\t\t\t</select>\n\t\t\t</p>\n\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id('numberposts'); ?>\"><?php _e('Number of Posts', 'sw_woocommerce')?></label>\n\t\t\t\t<br />\n\t\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id('numberposts'); ?>\" name=\"<?php echo $this->get_field_name('numberposts'); ?>\"\n\t\t\t\t\ttype=\"text\"\tvalue=\"<?php echo esc_attr($number); ?>\" />\n\t\t\t</p>\n\t\t\t\n\t\t\t<?php $row_number = array( '1' => 1, '2' => 2, '3' => 3 ); ?>\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id('item_row'); ?>\"><?php _e('Number row per column: ', 'sw_woocommerce')?></label>\n\t\t\t\t<br />\n\t\t\t\t<select class=\"widefat\"\n\t\t\t\t\tid=\"<?php echo $this->get_field_id('item_row'); ?>\"\n\t\t\t\t\tname=\"<?php echo $this->get_field_name('item_row'); ?>\">\n\t\t\t\t\t<?php\n\t\t\t\t\t$option ='';\n\t\t\t\t\tforeach ($row_number as $key => $value) :\n\t\t\t\t\t\t$option .= '<option value=\"' . $value . '\" ';\n\t\t\t\t\t\tif ($value == $item_row){\n\t\t\t\t\t\t\t$option .= 'selected=\"selected\"';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$option .= '>'.$key.'</option>';\n\t\t\t\t\tendforeach;\n\t\t\t\t\techo $option;\n\t\t\t\t\t?>\n\t\t\t\t</select>\n\t\t\t</p> \n\t\t\t\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id('tab_active'); ?>\"><?php _e('Tab active: ', 'sw_woocommerce')?></label>\n\t\t\t\t<br />\n\t\t\t\t<input class=\"widefat\"\n\t\t\t\t\tid=\"<?php echo $this->get_field_id('tab_active'); ?>\" name=\"<?php echo $this->get_field_name('tab_active'); ?>\" type=\"text\" \n\t\t\t\t\tvalue=\"<?php echo esc_attr($tab_active); ?>\" />\n\t\t\t</p> \n\t\t\t\n\t\t\t<?php $number = array('1' => 1, '2' => 2, '3' => 3, '4' => 4, '5' => 5, '6' => 6); ?>\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id('columns'); ?>\"><?php _e('Number of Columns >1200px: ', 'sw_woocommerce')?></label>\n\t\t\t\t<br />\n\t\t\t\t<select class=\"widefat\"\n\t\t\t\t\tid=\"<?php echo $this->get_field_id('columns'); ?>\"\n\t\t\t\t\tname=\"<?php echo $this->get_field_name('columns'); ?>\">\n\t\t\t\t\t<?php\n\t\t\t\t\t$option ='';\n\t\t\t\t\tforeach ($number as $key => $value) :\n\t\t\t\t\t\t$option .= '<option value=\"' . $value . '\" ';\n\t\t\t\t\t\tif ($value == $columns){\n\t\t\t\t\t\t\t$option .= 'selected=\"selected\"';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$option .= '>'.$key.'</option>';\n\t\t\t\t\tendforeach;\n\t\t\t\t\techo $option;\n\t\t\t\t\t?>\n\t\t\t\t</select>\n\t\t\t</p> \n\t\t\t\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id('autoplay'); ?>\"><?php _e('Auto Play', 'sw_woocommerce')?></label>\n\t\t\t\t<br />\n\t\t\t\t<select class=\"widefat\"\n\t\t\t\t\tid=\"<?php echo $this->get_field_id('autoplay'); ?>\" name=\"<?php echo $this->get_field_name('autoplay'); ?>\">\n\t\t\t\t\t<option value=\"false\" <?php if ($autoplay=='false'){?> selected=\"selected\"\n\t\t\t\t\t<?php } ?>>\n\t\t\t\t\t\t<?php _e('False', 'sw_woocommerce')?>\n\t\t\t\t\t</option>\n\t\t\t\t\t<option value=\"true\" <?php if ($autoplay=='true'){?> selected=\"selected\"\t<?php } ?>>\n\t\t\t\t\t\t<?php _e('True', 'sw_woocommerce')?>\n\t\t\t\t\t</option>\n\t\t\t\t</select>\n\t\t\t</p>\n\t\t\t\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id('interval'); ?>\"><?php _e('Interval', 'sw_woocommerce')?></label>\n\t\t\t\t<br />\n\t\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id('interval'); ?>\" name=\"<?php echo $this->get_field_name('interval'); ?>\"\n\t\t\t\t\ttype=\"text\"\tvalue=\"<?php echo esc_attr($interval); ?>\" />\n\t\t\t</p>\n\t\t\t\n\t\t\t\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id('scroll'); ?>\"><?php _e('Total Items Slided', 'sw_woocommerce')?></label>\n\t\t\t\t<br />\n\t\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id('scroll'); ?>\" name=\"<?php echo $this->get_field_name('scroll'); ?>\"\n\t\t\t\t\ttype=\"text\"\tvalue=\"<?php echo esc_attr($scroll); ?>\" />\n\t\t\t</p>\n\t\t\t\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id('widget_template'); ?>\"><?php _e(\"Template\", 'sw_woocommerce')?></label>\n\t\t\t\t<br/>\n\t\t\t\t\n\t\t\t\t<select class=\"widefat\"\n\t\t\t\t\tid=\"<?php echo $this->get_field_id('widget_template'); ?>\"\tname=\"<?php echo $this->get_field_name('widget_template'); ?>\">\n\t\t\t\t\t<option value=\"default\" <?php if ($widget_template=='default'){?> selected=\"selected\"\n\t\t\t\t\t<?php } ?>>\n\t\t\t\t\t\t<?php _e('Default', 'sw_woocommerce')?>\n\t\t\t\t\t</option>\t\t\t\t\n\t\t\t\t</select>\n\t\t\t</p> \n\t\t<?php\n\t\t}", "function form_content()\r\n {\r\n $table = html_table($this->_width,0,4) ;\r\n $table->set_style(\"border: 0px solid\") ;\r\n\r\n $table->add_row($this->element_label($this->getUploadFileLabel()),\r\n $this->element_form($this->getUploadFileLabel())) ;\r\n\r\n $td = html_td(null, null, $this->element_form('Override Z0 Record Validation')) ;\r\n $td->set_tag_attribute('colspan', 2) ;\r\n $table->add_row($td) ;\r\n\r\n $this->add_form_block(null, $table) ;\r\n }", "protected function form()\n {\n $form = new Form(new video());\n\n $form->text('video_title', __('标题'))->attribute('autocomplete', 'off')->required()->rules('required|max:100');\n\n $form->checkbox('tags','标签')->options(Tag::all()->where('tag_status', Tag::STATUS_TRUE)->pluck('tag_name', 'id'));\n\n $form->textarea('video_describe', __('视频简介'));\n\n $form->image('video_img','封面图')->required()->removable();\n\n $form->chunk_file('video_link', '所属视频')->attribute('accept', 'video/*')->rules('required');\n\n $form->number('video_click', __('点击量'))->rules('required')->default(0);\n\n $form->switch('video_show', __('是否显示'))->states(config('system.show'))->default(1);\n\n $form->switch('video_recommend', __('是否推荐'))->states(config('system.recommend'))->default(1);\n\n $form->number('video_sort', __('admin.sort'))->rules('required')->default(100);\n\n //保存后回调\n $form->saved(function (Form $form) {\n\n });\n return $form;\n }", "protected function form()\n {\n $form = new Form(new UserHealth());\n\n $form->number('height', __('Height'));\n $form->number('weight', __('Weight'));\n $form->text('blood_pressure', __('Blood pressure'));\n $form->text('sugar_level', __('Sugar level'));\n $form->text('blood_type', __('Blood type'));\n $form->decimal('muscle_mass', __('Muscle mass'))->default(0);\n $form->text('metabolism', __('Metabolism'));\n $form->textarea('genetic_history', __('Genetic history'));\n $form->textarea('illness_history', __('Illness history'));\n $form->textarea('allergies', __('Allergies'));\n $form->textarea('prescription', __('Prescription'));\n $form->textarea('operations', __('Operations'));\n $form->number('user_id', __('User id'));\n\n return $form;\n }", "public function stepStart($data, $form)\n {\n if (!$data) return;\n\n if ($data['settings']['progress_indicator'] == 'steps') {\n $nav = \"<ul class='ff-step-titles'><li class='ff_active'><span>\" . implode('</span></li><li><span>', $data['settings']['step_titles']) . \"</span></li></ul>\";\n } elseif ($data['settings']['progress_indicator'] == 'progress-bar') {\n $nav = \"<div class='ff-el-progress-status'></div>\n <div class='ff-el-progress'>\n <div class='ff-el-progress-bar'><span></span></div>\n </div>\n <ul style='display: none' class='ff-el-progress-title'>\n <li>\" . implode('</li><li>', $data['settings']['step_titles']) . \"</li>\n </ul>\";\n } else {\n $nav = '';\n }\n\n $data['attributes']['data-disable_auto_focus'] = ArrayHelper::get($data, 'settings.disable_auto_focus', 'no');\n $data['attributes']['data-enable_auto_slider'] = ArrayHelper::get($data, 'settings.enable_auto_slider', 'no');\n\n $data['attributes']['data-enable_step_data_persistency'] = ArrayHelper::get($data, 'settings.enable_step_data_persistency', 'no');\n $data['attributes']['data-enable_step_page_resume'] = ArrayHelper::get($data, 'settings.enable_step_page_resume', 'no');\n\n $atts = $this->buildAttributes(\n \\FluentForm\\Framework\\Helpers\\ArrayHelper::except($data['attributes'], 'name')\n );\n\n echo \"<div class='ff-step-container' {$atts}>\";\n if ($nav) {\n echo \"<div class='ff-step-header'>{$nav}</div>\";\n }\n\n echo \"<span class='ff_step_start'></span><div class='ff-step-body'>\";\n $data['attributes']['class'] .= ' fluentform-step';\n $data['attributes']['class'] = trim($data['attributes']['class']) . ' active';\n $atts = $this->buildAttributes(\n \\FluentForm\\Framework\\Helpers\\ArrayHelper::except($data['attributes'], 'name')\n );\n echo \"<div {$atts}>\";\n }", "protected function form()\n {\n $form = new Form(new Movie());\n\n $form->text('title', __('名字'));\n $form->number('director', __('导演'));\n $form->text('describe', __('简介'));\n $form->number('rate', __('评价'));\n $form->switch('released', __('是否上映'));\n $form->datetime('release_at', __('发行时间'))->default(date('Y-m-d H:i:s'));\n\n return $form;\n }", "public function form( $instace ){\n echo '<p><strong>Widget ini belum bisa diubag secara Manual!</strong><br> Hubungi developer untuk melakukan perubahan</p>'; \n }", "protected function form()\n\t{\n\t\t$form = new Form(new Card);\n\n\t\t$form->footer(function ($footer) {\n\t\t\t// 去掉重置按钮\n\t\t\t$footer->disableReset();\n\t\t\t// 去掉查看\n\t\t\t$footer->disableViewCheck();\n\t\t\t// 去掉继续编辑按钮\n\t\t\t$footer->disableEditingCheck();\n\t\t\t// 去掉继续创建按钮\n\t\t\t$footer->disableCreatingCheck();\n\t\t});\n\n\t\t$form -> text('card', __('卡号'));\n\t\t$form -> text('password', __('密码'));\n\t\t//$form ->switch('type', __('类型'));\n\t\t$form->select('type', __('类型'))->options([1 => '天卡', 2 => '周卡', 3 => '月卡', 4 => '季卡', 5 => '半年卡', 6 => '年卡']);\n\t\t$states = [\n\t\t\t'on' => ['value' => 1, 'text' => '已充值', 'color' => 'danger'],\n\t\t\t'off' => ['value' => 0, 'text' => '未充值', 'color' => 'success'],\n\t\t];\n\t\t$form ->switch('consume', __('是否已充值'))->states($states);\n\t\t$form -> text('key', __('被充值Key'));\n\t\t$form -> datetime('consumetime', __('充值时间'))->default(date('Y-m-d H:i:s'));\n $states1 = [\n 'on' => ['value' => 0, 'text' => '未封卡', 'color' => 'success'],\n 'off' => ['value' => 1, 'text' => '被封卡', 'color' => 'danger'],\n ];\n $form ->switch('beifeng', __('是否被封'))->states($states1);\n\n\t\treturn $form;\n\t}", "public static function widget() {\n \n\t\t$start = self::get_dashboard_widget_option(self::wid, 'starting_conversion');\n\t\t$remaining_days = self::get_dashboard_widget_option(self::wid, 'starting_conversion');\n\t\t\n\t\t// Display Dashboard widget\n\t\trequire_once( 'red-flag-parking-display.php' );\n }", "public function render() {\n $formContainsRequiredFields = FALSE;\n $htmlElements = array();\n\n foreach($this->elements as $element) {\n if(!$this->getMarkRequiredFields()) {\n $element['object']->markIfRequired(FALSE);\n }\n\n if($element['object']->isRequired()) $formContainsRequiredFields = TRUE;\n $element['object']->render();\n if($element['object']->errorOccured()) $this->setError(TRUE);\n\n $htmlElements[] = $element['object']->fetch();\n $this->javascripts .= $element['object']->getJavaScripts();\n }\n\n $this->html = implode(\"\\n<span class=\\\"element_separator\\\">&nbsp;</span>\", $htmlElements);\n $preForm = (bool)$this->headline ? FORMWIZARD_PRE_FORM_HEADLINE : FORMWIZARD_PRE_FORM;\n\n $html = NULL;\n\n $html .= '<style type=\"text/css\">@import url('.FORMWIZARD_CSS_URL.\");</style>\\n\";\n $html .= str_replace('{headline}', $this->headline, $preForm);\n $html .= \"\\n\".'<form name=\"'.$this->name.'\" method=\"'.$this->method.'\" action=\"'.$this->action.'\" enctype=\"multipart/form-data\">';\n $html .= \"\\n\".'<input type=\"hidden\" name=\"__'.$this->name.'_submitted\" value=\"1\" />';\n $html .= \"\\n\".$this->html;\n $html .= \"\\n\".'</form>';\n $html .= \"\\n\".'<script type=\"text/javascript\">'.$this->javascripts.'</script>';\n\n if($formContainsRequiredFields && $this->markRequiredFields) {\n $html .= \"\\n\".FORMWIZARD_LEGEND_REQUIRED_FIELD;\n }\n\n $this->html = $html.\"\\n\".FORMWIZARD_POST_FORM;\n\n $this->isRendered = TRUE;\n }", "public function renderUI() {\r\n require_once 'classes/Helper.php';\r\n $this->init();\r\n \r\n $form_msg = $this->process_export_import();\r\n $this->prepareHead();\r\n $data = $this->prepareData();\r\n \r\n $helper = new GearHelper($this->context->smarty);\r\n $form_msg .= $helper->postProcess($data);\r\n $content = $helper->createTemplate($data);\r\n \r\n $this->smarty->assign(array(\r\n 'form_action' => Tools::safeOutput($_SERVER['REQUEST_URI']),\r\n 'gear_path' => __DIR__,\r\n 'img_dir' => _THEME_IMG_DIR_,\r\n 'form_msg' => $form_msg\r\n ));\r\n \r\n $ui = $this->display(GEAR_PARENT_FILE, GEAR_NAME.DIRECTORY_SEPARATOR.'views'.DIRECTORY_SEPARATOR.'header.tpl');\r\n $ui .= $content;\r\n $ui .= $this->display(GEAR_PARENT_FILE, GEAR_NAME.DIRECTORY_SEPARATOR.'views'.DIRECTORY_SEPARATOR.'footer.tpl');\r\n \r\n return $ui;\r\n }", "protected function form()\n {\n $form = new Form(new Activity);\n\n $form->text('log_name', 'Log name');\n $form->textarea('description', 'Description');\n $form->number('subject_id', 'Subject id');\n $form->text('subject_type', 'Subject type');\n $form->number('causer_id', 'Causer id');\n $form->text('causer_type', 'Causer type');\n $form->text('properties', 'Properties');\n\n return $form;\n }" ]
[ "0.710235", "0.63623637", "0.62253284", "0.6152803", "0.60618824", "0.5923924", "0.57680374", "0.57551", "0.57166356", "0.56992376", "0.56499654", "0.5645377", "0.5642863", "0.56302464", "0.5626179", "0.5624876", "0.56189144", "0.56085944", "0.56044364", "0.55827785", "0.55659795", "0.55393565", "0.55389726", "0.552323", "0.55104625", "0.55044085", "0.5450927", "0.54422885", "0.5420915", "0.53986126", "0.5394823", "0.53743404", "0.53656185", "0.5360266", "0.53598243", "0.53486186", "0.53483254", "0.5346012", "0.53457665", "0.5342716", "0.5340488", "0.5327866", "0.5325151", "0.52862245", "0.5284809", "0.5281433", "0.5271427", "0.5266736", "0.52580255", "0.52529883", "0.5251146", "0.5242816", "0.52388054", "0.5235927", "0.5230195", "0.52263373", "0.5226176", "0.5214034", "0.5211915", "0.52075094", "0.52038187", "0.51967937", "0.51966995", "0.51905185", "0.5189664", "0.518643", "0.51818305", "0.51812935", "0.5178954", "0.51748", "0.51720005", "0.5167098", "0.51631886", "0.515426", "0.5152771", "0.51504725", "0.51503617", "0.51496136", "0.51483476", "0.51430357", "0.51245594", "0.5124411", "0.5124222", "0.512361", "0.51234704", "0.5122792", "0.5121456", "0.51184756", "0.511657", "0.51110053", "0.5110626", "0.51104194", "0.51067024", "0.5100918", "0.50875306", "0.50853175", "0.5085209", "0.50811386", "0.5080206", "0.5074309" ]
0.76990116
0
Builds the form that allow to save your PHP/CSS code
function buildForm() { $this->buildTabs(); // tab caption $this->addElement('header', null, 'Progress2 Generator - Control Panel: save PHP/CSS code'); $code[] =& $this->createElement('checkbox', 'P', null, 'PHP'); $code[] =& $this->createElement('checkbox', 'C', null, 'CSS'); $this->addGroup($code, 'phpcss', 'PHP and/or StyleSheet source code:'); // Buttons of the wizard to do the job $this->buildButtons(array('next','apply')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function beaver_extender_fe_style_editor_build_form() {\n\t\n?>\n\t\t<form action=\"/\" id=\"beaver-extender-fe-style-editor-form\" name=\"beaver-extender-fe-style-editor-form\">\n\t\t\t\n\t\t\t<input type=\"hidden\" name=\"action\" value=\"beaver_extender_fe_style_editor_save\" />\n\t\t\t<input type=\"hidden\" name=\"security\" value=\"<?php echo wp_create_nonce( 'beaver-extender-fe-style-editor' ); ?>\" />\n\t\t\n\t\t\t<div class=\"beaver-extender-fe-style-editor-nav\">\n\t\t\t\t<input id=\"beaver-extender-fe-style-editor-save-button\" type=\"submit\" value=\"<?php _e( 'Save Changes', 'extender' ); ?>\" name=\"Submit\" alt=\"Save Changes\" />\n\t\t\t\t<img class=\"beaver-extender-ajax-save-spinner\" src=\"<?php echo site_url() . '/wp-admin/images/spinner-2x.gif'; ?>\" />\n\t\t\t\t<span class=\"beaver-extender-saved\"></span>\n\t\n\t\t\t\t<span id=\"beaver-extender-fe-style-editor-contract-icon\" class=\"beaver-extender-fe-style-editor-icons dashicons dashicons-editor-contract\"></span>\n\t\t\t\t<span id=\"beaver-extender-fe-style-editor-css-builder-toggle-icon\" class=\"beaver-extender-fe-style-editor-icons dashicons dashicons-admin-customizer\"></span>\n\t\t\t\t<span id=\"beaver-extender-fe-style-editor-search-icon\" class=\"beaver-extender-fe-style-editor-icons dashicons dashicons-search\"></span>\n\t\t\t</div><!-- END .beaver-extender-fe-style-editor-nav -->\n\t\t\t\n\t\t\t<div id=\"beaver-extender-fe-style-editor-container\">\n\t\t\t\t\n\t\t\t\t<textarea data-editor=\"css\" style=\"display:none;\" wrap=\"off\" id=\"beaver-extender-fe-style-editor-output\" class=\"code-builder-output\" name=\"extender[custom_css]\"><?php echo beaver_extender_get_custom_css( 'custom_css' ); ?></textarea>\t\t\t\t\t\n\t\t\t\n\t\t\t</div><!-- END #beaver-extender-fe-style-editor-container -->\n\t\t\n\t\t</form><!-- END #beaver-extender-fe-style-editor-form -->\n<?php\n\t\n}", "public function saveForm() {\n\n\t\tforeach ( $this->getOptionsList() as $element ) {\n\t\t\t$element->save();\n\t\t}\n\t\t$this->setLastAction( self::ACTION_SAVE );\n\n\t\t$custom_style = new Custom_CSS_Style();\n\t\t$custom_style->reinit();\n\t}", "function buildForm(){\n\t\t# menampilkan form\n\t}", "function creaped() {\n\t\t// Esto debe hacerse por dataform\n\t\t$styles = \"\\n<!-- Estilos -->\\n\";\n\t\t$styles .= style('rapyd.css');\n\t\t$styles .= style('ventanas.css');\n\t\t$styles .= style('themes/proteo/proteo.css');\n\t\t$styles .= style(\"themes/ui.jqgrid.css\");\n\t\t$styles .= style(\"themes/ui.multiselect.css\");\n\t\t$styles .= style('layout1.css');\n\t\t$styles .= '<link rel=\"stylesheet\" href=\"'.base_url().'system/application/rapyd/elements/proteo/css/rapyd_components.css\" type=\"text/css\" />'.\"\\n\";\n\n\n\t\t$styles .= '\n<style type=\"text/css\">\n\tp {font-size:1em; margin: 1ex 0;}\n\tp.buttons {text-align:center;line-height:2.5em;}\n\tbutton {line-height: normal;}\n\t.hidden {display: none;}\n\tul {z-index:100000;margin:1ex 0;padding:0;list-style:none;cursor:pointer;border:1px solid Black;width:15ex;position:\trelative;}\n\tul li {background-color: #EEE;padding: 0.15em 1em 0.3em 5px;}\n\tul ul {display:none;position:absolute;width:100%;left:-1px;bottom:0;margin:0;margin-bottom: 1.55em;}\n\t.ui-layout-north ul ul {bottom:auto;margin:0;margin-top:1.45em;}\n\tul ul li { padding: 3px 1em 3px 5px; }\n\tul ul li:hover { background-color: #FF9; }\n\tul li:hover ul { display:block; background-color: #EEE; }\n\n\t#feedback { font-size: 0.8em; }\n\t#tablas .ui-selecting { background: #FECA40; }\n\t#tablas .ui-selected { background: #F39814; color: white; }\n\t#tablas { list-style-type: none; margin: 0; padding: 0; width: 90%; }\n\t#tablas li { margin: 1px; padding: 0em; font-size: 0.8em; height: 14px; }\n\n\ttable.tc td.header {padding-right: 1px;padding-left: 1px;font-weight: bold;font-size: 8pt;color: navy;background-color: #f4edd5;text-align:center;}\n\ttable.tc td.title{padding-right: 1px;padding-left: 1px;font-weight: bold;font-size: 8pt;color:navy;text-align:center;background-color: #fdffdf;}\n\ttable.tc td.resalte{border-left:solid 1px #daac00;border-top:solid 1px #daac00;text-align:center;font-weight: bold;}\n\ttable.tc td{ border-left:solid 1px #DAAC00;border-TOP:solid 1px #DAAC00;}\n\ttable.tc {border-right: #daac00 1px solid;padding-right: 0px;border-top: medium none;padding-left: 0px;padding-bottom: 0px;border-left: medium none;border-bottom: #daac00 1px solid;font-family: verdana;font-size:8pt;cellspacing: 0px}\n\ttable.tc td.sin_borde{border-left:solid 1px #DAAC00;border-TOP:solid 1px #DAAC00;text-align:center;border-right:solid 5px #f6f6f6;border-bottom:solid 5px #f6f6f6;}\n\n\t.custom-combobox {position: relative;display: inline-block;}\n\t.custom-combobox-toggle {position: absolute;top: 0;bottom: 0;margin-left: -1px;padding: 0;}\n\t.custom-combobox-input {margin: 0;padding: 5px 10px;}\n\n</style>\n';\n\n\t\t$title = \"\n<div id='encabe'>\n<table width='98%'>\n\t<tr>\n\t\t<td>\".heading('Generar Orden de Produccion').\"</td>\n\t\t<td align='right' width='40'>\".image('cerrar.png','Cerrar Ventana',array('onclick'=>'window.close()','height'=>'20')).\"</td>\n\t</tr>\n</table>\n</div>\n\";\n\t\t$script = \"\\n<!-- JQUERY -->\\n\";\n\t\t$script .= script('jquery-min.js');\n\t\t$script .= script('jquery-migrate-min.js');\n\t\t$script .= script('jquery-ui.custom.min.js');\n\n\t\t$script .= script(\"jquery.layout.js\");\n\t\t$script .= script(\"i18n/grid.locale-sp.js\");\n\n\t\t$script .= script(\"ui.multiselect.js\");\n\t\t$script .= script(\"jquery.jqGrid.min.js\");\n\t\t$script .= script(\"jquery.tablednd.js\");\n\t\t$script .= script(\"jquery.contextmenu.js\");\n\n\t\t$script .= script('plugins/jquery.numeric.pack.js');\n\t\t$script .= script('plugins/jquery.floatnumber.js');\n\t\t$script .= script('plugins/jquery.maskedinput.min.js');\n\n\t\t$script .= '\n<script type=\"text/javascript\">\n\t$(function(){\n\t\t$(\".inputnum\").numeric(\".\");\n\t});\n\t$(function() {\n\t\t$( \"input:submit, a, button\", \".botones\",\".otros\" ).button();\n\t});\n';\n\n\t\t$script .= '\n\t// set EVERY state here so will undo ALL layout changes\n\t// used by the Reset State button: myLayout.loadState( stateResetSettings )\n\tvar stateResetSettings = {\n\t\tnorth__size:\t\t\"auto\"\n\t,\tnorth__initClosed:\tfalse\n\t,\tnorth__initHidden:\tfalse\n\t,\tsouth__size:\t\t\"auto\"\n\t,\tsouth__initClosed:\tfalse\n\t,\tsouth__initHidden:\tfalse\n\t,\twest__size:\t\t\t200\n\t,\twest__initClosed:\tfalse\n\t,\twest__initHidden:\tfalse\n\t,\teast__size:\t\t\t100\n\t,\teast__initClosed:\ttrue\n\t,\teast__initHidden:\ttrue\n\n\t};\n\n\tvar myLayout;\n\n\t$(document).ready(function () {\n\n\t\t// this layout could be created with NO OPTIONS - but showing some here just as a sample...\n\t\t// myLayout = $(\"body\").layout(); -- syntax with No Options\n\n\t\tmyLayout = $(\"body\").layout({\n\n\t\t//\treference only - these options are NOT required because \"true\" is the default\n\t\t\tclosable: true,\tresizable:\ttrue, slidable:\ttrue, livePaneResizing:\ttrue\n\t\t//\tsome resizing/toggling settings\n\t\t,\tnorth__slidable: false, north__togglerLength_closed: \"100%\", north__spacing_closed:\t20\n\t\t,\tsouth__resizable:false,\tsouth__spacing_open:0\n\t\t,\tsouth__spacing_closed:20\n\t\t//\tsome pane-size settings\n\t\t,\twest__minSize: 100, east__size: 100, east__minSize: 50, east__maxSize: .5, center__minWidth: 100\n\t\t//\tsome pane animation settings\n\t\t,\twest__animatePaneSizing: false,\twest__fxSpeed_size:\t\"fast\",\twest__fxSpeed_open: 1000\n\t\t,\twest__fxSettings_open:{ easing: \"easeOutBounce\" },\twest__fxName_close:\"none\"\n\t\t//\tenable showOverflow on west-pane so CSS popups will overlap north pane\n\t\t//,\twest__showOverflowOnHover:\ttrue\n\t\t,\tstateManagement__enabled:true, showDebugMessages: true\n\t\t});\n\n\t\t$(function() {\n\t\t\t$(\"button\").button().click(function(event) {event.preventDefault();});\n\t\t\t//$( \"#almacen\" ).combobox();\n\t\t});\n\n\n \t});\n\n\tfunction sumar(j){\n\t\tvar nn = \\'[name=\"codigo_\\'+j+\\'\"]\\';\n\t\tvar k = 0;\n\t\tvar t;\n\t\tvar totalc = 0;\n\t\tvar maximo = 0;\n\n\t\t// Valida el maximo\n\t\t$(\"#resultados\").html(\"Maximo \"+maximo);\n\n\t\t$(nn).each( function() {\n\t\t\tk = $(this).val();\n\t\t\tt = Number($(\"#cana_\"+k).val());\n\t\t\tmaximo = Number($(\"#falta_\"+k).val());\n\t\t\tif ( t > maximo ){\n\t\t\t\tt = maximo;\n\t\t\t\t$(\"#cana_\"+k).val(maximo);\n\t\t\t}\n\t\t\ttotalc += t;\n\t\t});\n\t\t$(\\'#totalc_\\'+j).val(totalc);\n\t}\n\n\tfunction guardar(){\n\t\talert(\"Guardar\");\n\t\t$.post( \"'.base_url().'inventario/prdo/guardaoe\", $(\"#guardar\").serialize(),\n\t\t\tfunction(data) {\n\t\t\t\talert(data);\n\t\t\t\tlocation.reload();\n\t\t\t\twindow.opener.actualiza();\n\t\t\t}\n\t\t);\n\t}\n</script>\n';\n\n// ENCABEZADO\n$tabla = '\n<div class=\"ui-layout-north\" onmouseover=\"myLayout.allowOverflow(\\'north\\')\" onmouseout=\"myLayout.resetOverflow(this)\">\n<table width=\"100%\" bgcolor=\"#2067B5\">\n\t<tr>\n\t\t<td align=\"left\" width=\"80px\"><img src=\"'.base_url().'assets/default/css/templete_01.jpg\" width=\"120\"></td><td align=\"center\"><h1 style=\"font-size: 20px; color: rgb(255, 255, 255);\" onclick=\"history.back()\">ORDEN DE PRODUCCION</h1></td><td align=\"left\" width=\"100px\" nowrap=\"nowrap\"><font style=\"color:#FFFFFF;font-size:12px\">Usuario: '.$this->secu->usuario().'<br/>'.$this->secu->getnombre().'</font></td><td align=\"right\" width=\"28px\"></td>\n\t</tr>\n</table>\n</div>\n';\n\n// IZQUIERDO\n$tabla .= '\n<div class=\"ui-layout-west\">\n<form id=\"guardar\" >\n<center>\n<lable>Almacen</lable> ';\n$tabla .= $this->datasis->llenaopciones(\"SELECT ubica, ubides FROM caub WHERE gasto='N' ORDER BY ubica\", false, $id='almacen' );\n\n$tabla .= '\n\t<br><br>\n\t<lable>Instruciones</lable>\n\t<textarea rows=\"4\" cols=\"25\" id=\"instrucciones\" name=\"instrucciones\"></textarea>\n\t<br><br>\n\t<button type=\"button\" onclick=\"guardar()\">Guardar Orden</button>\n\t<div id=\"resultados\"></div>\n</center>\n</div>';\n\n// INFERIOR\n$tabla .= '\n<div class=\"ui-layout-south\">\n';\n\n$tabla .= $this->datasis->traevalor('TITULO1');\n\n$tabla .= '\n</div>\n';\n\n// DERECHA\n$tabla .= '\n<div class=\"ui-layout-east\">\n</div>\n';\n\n// CENTRO\n$norden = $this->datasis->dameval('SELECT MAX(id) maxi FROM prdo');\nif ($norden == '') $norden = 0;\n\n$tabla .= '\n<div class=\"ui-layout-center\">';\n\n$mSQL = '\nSELECT a.id, b.numero, b.fecha, b.cod_cli, b.nombre, a.codigoa, a.desca, a.cana, COALESCE(sum(e.ordenado),0) producido, a.cana-COALESCE(sum(e.ordenado),0) falta, COALESCE(sum(e.ordenado),0) ordenado, d.ruta, d.descrip\nFROM itpfac a\nJOIN pfac b ON a.numa = b.numero\nLEFT JOIN sclitrut c ON b.cod_cli=c.cliente\nLEFT JOIN sclirut d ON c.ruta=d.ruta\nLEFT JOIN itprdo e ON a.id = e.idpfac\nWHERE b.producir=\"S\" AND ( b.ordprod=\"\" OR b.ordprod IS NULL )\nGROUP BY a.id\nHAVING falta>0\nORDER BY a.codigoa, d.ruta, a.numa\n';\n\n$query = $this->db->query($mSQL);\n$ruta = 'XX0XX';\n$codigo = 'XXZZWWXXWWXXZZZZ';\n$i = 0;\n$c = 0;\nif ($query->num_rows() > 0){\n\tforeach ($query->result() as $row){\n\t\tif ( $codigo != $row->codigoa ){\n\t\t\tif ( $i > 0 ) $tabla .= \"</tbody></table><br>\\n\";\n\t\t\t$tabla .= '<table class=\"tc\" width=\"100%\">';\n\t\t\t$tabla .= \"<tbody>\\n\";\n\n\t\t\tif ( $i > 0 ) $c++;\n\n\t\t\t$tabla .= \"<tr style='background:#2067B5;color:#FFFFFF;'>\\n\";\n\t\t\t$tabla .= \"\t<td colspan='7'>Cod: \".$row->codigoa.\" Desc: \".$row->desca.\"</td>\\n\";\n\t\t\t//$tabla .= \"\t<td>&nbsp;</td>\\n\";\n\t\t\t$tabla .= \"\t<td><input class='inputnum' name='totalc_$c' id='totalc_$c' size='4' type='text' readonly></td>\\n\";\n\t\t\t$tabla .= \"</tr>\\n\";\n\n\t\t\t$tabla .= \"<tr bgcolor='#BEDCFD'>\\n\";\n\t\t\t$tabla .= \"\t<td >Ruta</td>\\n\";\n\t\t\t$tabla .= \"\t<td >Pedido</td>\\n\";\n\t\t\t$tabla .= \"\t<td >Fecha</td>\\n\";\n\t\t\t$tabla .= \"\t<td >Cliente</td>\\n\";\n\t\t\t$tabla .= \"\t<td >Nombre</td>\\n\";\n\t\t\t$tabla .= \"\t<td >Cantidad</td>\\n\";\n\t\t\t$tabla .= \"\t<td >Producido</td>\\n\";\n\t\t\t$tabla .= \"\t<td >Ordenado</td>\\n\";\n\t\t\t$tabla .= \"</tr>\\n\";\n\n\t\t\t$codigo = $row->codigoa;\n\t\t}\n\n\t\t$tabla .= \"<tr>\\n\";\n\t\t$tabla .= \"\t<td><a href='#' title='\".$row->descrip.\"'>\".$row->ruta.\"&nbsp;</a></td>\\n\";\n\t\t$tabla .= \"\t<td>\".$row->numero.\"</td>\\n\";\n\t\t$tabla .= \"\t<td>\".$row->fecha.\"</td>\\n\";\n\t\t$tabla .= \"\t<td>\".$row->cod_cli.\"</td>\\n\";\n\t\t$tabla .= \"\t<td>\".$row->nombre.\"</td>\\n\";\n\t\t$tabla .= \"\t<td align='right'>\".$row->cana.\"</td>\\n\";\n\t\t$tabla .= \"\t<td align='right'>\".$row->producido.\"</td>\\n\";\n\n\t\t$tabla .= \"\t<td>\\n\";\n\t\t$tabla .= \"\t\t<input class='inputnum' name='cana_$i' id='cana_$i' size='4' onkeyUp='sumar($c)' value='0.00' >\\n\";\n\t\t$tabla .= \"\t\t<input name='codigo_$c' id='codigo_$c' type='hidden' value='$i' >\\n\";\n\t\t$tabla .= \"\t\t<input name='idpfac_$i' id='idpfac_$i' type='hidden' value='\".$row->id. \"' >\\n\";\n\t\t$tabla .= \"\t\t<input name='falta_$i' id='falta_$i' type='hidden' value='\".$row->falta.\"' >\\n\";\n\t\t$tabla .= \"\t</td>\\n\";\n\n\t\t$tabla .= \"</tr>\\n\";\n\t\t$i++;\n\t}\n\t$tabla .= \"</table>\\n\";\n}\n\n$tabla .= '\n<input id=\"totalitem\" name=\"totalitem\" type=\"hidden\" value=\"'.$i.'\">\n</form>\n</div>\n';\n\t\t$data['content'] = $tabla;\n\t\t$data['title'] = $title;\n\t\t$data['head'] = $styles;\n\t\t$data['head'] .= $script;\n\t\t$this->load->view('view_ventanas_lite',$data);\n\t}", "private function viewBuilder() {\n $html = '';\n $file = false;\n // Create fields\n foreach ($this->formDatas as $field) {\n $type = $field['type'];\n switch ($type) {\n case 'text' :\n case 'password' :\n case 'hidden' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n <input type=\"' . $type . '\" name=\"' . $field['name'] . '\" id=\"' . $field['name'] . '\" value=\"<?php echo set_value(\"' . $field['name'] . '\", \"' . $field['value'] . '\"); ?>\"/>';\n break;\n // Addon - 2013-07-31\n case 'date' :\n case 'datetime' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n <input type=\"text\" name=\"' . $field['name'] . '\" id=\"' . $field['name'] . '\" value=\"<?php echo set_value(\"' . $field['name'] . '\", \"' . $field['value'] . '\"); ?>\"/>';\n\n\n if ($type == 'datetime') {\n $plugin = $this->addPlugin('widget', false);\n $plugin = $this->addPlugin('date');\n }\n $plugin = $this->addPlugin($type);\n if (!isset($this->js['script'])) {\n $this->js['script'] = '';\n }\n if ($type == 'datetime') {\n $this->js['script'] .= '\n <script type=\"text/javascript\">$(document).ready(function() {$(\"#' . $field['name'] . '\").datetimepicker({ dateFormat: \"yy-mm-dd\", timeFormat : \"HH:mm\"});});</script>';\n } else {\n $this->js['script'] .= '\n <script type=\"text/javascript\">$(document).ready(function() {$(\"#' . $field['name'] . '\").datepicker({ dateFormat: \"yy-mm-dd\"});});</script>';\n }\n break;\n // End Addon\n case 'select' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n <select name=\"' . $field['name'] . '\">';\n // Add options\n foreach ($field['options'] as $option) {\n $html .= '\n <option value=\"' . $option . '\" <?php echo set_select(\"' . $field['name'] . '\", \"' . $option . '\"); ?>>' . $option . '</option>';\n }\n $html .= '\n </select>';\n break;\n case 'checkbox' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n ';\n // Add options\n foreach ($field['checkbox'] as $option) {\n $html .= '\n <input type=\"checkbox\" value=\"' . $option . '\" value=\"<?php echo set_value(\"' . $field['name'] . '\", \"' . $option . '\"); ?>\"><span>' . $option . '</span>';\n }\n break;\n case 'radio' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n ';\n // Add options\n foreach ($field['radio'] as $option) {\n $html .= '\n <input type=\"radio\" value=\"' . $option . '\" value=\"<?php echo set_value(\"' . $field['name'] . '\", \"' . $option . '\"); ?>\"><span>' . $option . '</span>';\n }\n break;\n case 'reset' :\n case 'submit' :\n $html .= '\n <input type=\"' . $type . '\" name=\"' . $field['name'] . '\" id=\"' . $field['name'] . '\" value=\"<?php echo set_value(\"' . $field['name'] . '\", \"' . $field['value'] . '\"); ?>\"/>';\n break;\n case 'textarea' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n <textarea name=\"' . $field['name'] . '\" id=\"' . $field['name'] . '\"><?php echo set_value(\"' . $field['name'] . '\", \"' . $field['value'] . '\"); ?></textarea>';\n break;\n case 'file' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n <input type=\"file\" name=\"' . $field['name'] . '\" id=\"' . $field['name'] . '\" />';\n $file = true;\n break;\n }\n }\n\n $view = '\n <html>\n <head>\n <link type=\"text/css\" rel=\"stylesheet\" href=\"<?php echo base_url() ?>assets/css/generator/' . $this->cssName . '.css\">\n '; // Addon - 2013-07-31\n foreach ($this->css as $css) {\n $view .= $css . '\n ';\n }\n foreach ($this->js as $js) {\n $view .= $js . '\n ';\n }\n // End Addon\n $view .= '\n </head>\n <body>\n <?php\n // Show errors\n if(isset($error)) {\n switch($error) {\n case \"validation\" :\n echo validation_errors();\n break;\n case \"save\" :\n echo \"<p class=\\'error\\'>Save error !</p>\";\n break;\n }\n }\n if(isset($errorfile)) {\n foreach($errorfile as $name => $value) {\n echo \"<p class=\\'error\\'>File \\\"\".$name.\"\\\" upload error : \".$value.\"</p>\";\n }\n }\n ?>\n <form action=\"<?php echo base_url() ?>' . $this->formName . '\" method=\"post\" ' . ($file == true ? 'enctype=\"multipart/form-data\"' : '') . '>\n ' . $html . '\n </form>\n </body>\n </html>';\n return array(str_replace('<', '&lt;', $view), $view);\n }", "function child_themer_style_editor_save() {\n\t\t\n\t\tcheck_ajax_referer( 'child-themer-style-editor', 'security' );\n\n\t\tif ( $_POST['code_state'] == 'Parse Error' ) {\n\t\t\t\n\t\t\techo 'Parse Error, Check Code.';\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\tchild_themer_write_file( $path = get_stylesheet_directory() . '/style.css', $code = $_POST['child-themer-style-editor']['styles'] );\n\t\t\t\n\t\t\techo 'Stylesheet Updated';\n\t\t\t\n\t\t}\n\t\t\n\t\texit();\n\t\t\n\t}", "function mmpm_theme_options_form(){\n\t\t$out = '';\n\t\t$submit_button = mmpm_ntab(7) . '<input type=\"submit\" class=\"button-primary pull-right\" value=\"' . __( 'Save All Changes', MMPM_TEXTDOMAIN_ADMIN ) . '\" />';\n\t\t$theme_meta = mmpm_ntab(7) . '<div>' . mmpm_ntab(8) . '<span class=\"theme_name\">' . __( MMPM_PLUGIN_NAME , MMPM_TEXTDOMAIN_ADMIN ) . '</span>' . ' <small>v' . MMPM_PLUGIN_VERSION . mmpm_ntab(7) . '</small></div>';\n\t\t$out .= mmpm_ntab(1) . '<div class=\"wrap bootstrap\">';\n\t\t$out .= mmpm_ntab(2) . '<div class=\"'. MMPM_PREFIX . '_theme_page\">';\n\t\t$out .= mmpm_ntab(3) . '<form id=\"'. MMPM_PREFIX . '_theme_options_form\" class=\"'. MMPM_PREFIX . '_theme_options_form\" method=\"post\" action=\"options.php\" enctype=\"multipart/form-data\">';\n\t\t$out .= mmpm_ntab(4) . '<div class=\"save_shanges row no_x_margin\">';\n\t\t$out .= mmpm_ntab(5) . '<div class=\"col-xs-12\">';\n\t\t$out .= mmpm_ntab(6) . '<div class=\"float_holder\">';\n\t\t$out .= $submit_button;\n\t\t$out .= $theme_meta;\n\t\t$out .= mmpm_ntab(6) . '</div>';\n\t\t$out .= mmpm_ntab(5) . '</div>';\n\t\t$out .= mmpm_ntab(4) . '</div>';\n//\t\t$out .= mmpm_ntab(4) . '<input type=\"hidden\" name=\"action\" value=\"update\" />';\n\t\t$out .= mmpm_ntab(4) . '<input type=\"hidden\" name=\"' . MMPM_OPTIONS_DB_NAME . '[last_modified]\" value=\"' . ( time() + 60 ) . '\" />';\n\t\tob_start();\n\t\tsettings_fields( 'mmpm_options_group' );\n\t\t$out .= mmpm_ntab(4) . ob_get_contents();\n\t\tob_end_clean();\n\t\t$out .= mmpm_theme_sections_generator();\n\t\t$out .= mmpm_ntab(4) . '<div class=\"save_shanges row no_x_margin\">';\n\t\t$out .= mmpm_ntab(5) . '<div class=\"col-xs-12\">';\n\t\t$out .= mmpm_ntab(6) . '<div class=\"float_holder\">';\n\t\t$out .= $submit_button;\n\t\t$out .= mmpm_ntab(6) . '</div>';\n\t\t$out .= mmpm_ntab(5) . '</div>';\n\t\t$out .= mmpm_ntab(4) . '</div>';\n\t\t$out .= mmpm_ntab(3) . '</form>';\n\t\t$out .= mmpm_ntab(2) . '</div><!-- class=\"'. MMPM_PREFIX . 'theme_page\" -->';\n\t\t$out .= mmpm_ntab(1) . '</div><!-- class=\"wrap\" -->';\n\n\t\techo $out; // general out\n\t}", "public function buildForm() {\n\t\techo \"<!DOCTYPE html>\n\t\t<html>\n\t\t<head>\n\t\t\t<title>$this->title</title>\n\t\t</head>\n\t\t<body>\n\t\t<form method=\\\"$this->method\\\">\";\n\t\tforeach ($this->_inputs as $key => $input) {\n\t\t\t// Check if email validation is required.\n\t\t\tif (isset($input['rule']) && in_array('email', $input['rule'])) {\n\t\t\t\t$input['inputType'] = 'email';\n\t\t\t}\n\n\t\t\techo \"<label>\".$input['label'].\"</label><input type=\\\"\".$input['inputType'].\"\\\" id=\\\"\".$input['name'].\"\\\" name=\\\"\".$input['name'].\"\\\" value=\\\"\".$input['defaultValue'].\"\\\"\";\n\n\t\t\t// Check if field was required.\n\t\t\tif (isset($input['rule']) && in_array('required', $input['rule'])) {\n\t\t\t\techo \" required\";\n\t\t\t}\n\n\t\t\techo \"><br></form>\";\n\t\t}\n\t}", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: border properties');\r\n\r\n $borderpainted[] =& $this->createElement('radio', null, null, 'Yes', true);\r\n $borderpainted[] =& $this->createElement('radio', null, null, 'No', false);\r\n $this->addGroup($borderpainted, 'borderpainted', 'Display the border:');\r\n\r\n $this->addElement('text', 'borderclass', 'CSS class:', array('size' => 32));\r\n\r\n $borderstyle['style'] =& $this->createElement('select',\r\n 'style', 'style',\r\n array('solid' => 'Solid',\r\n 'dashed' => 'Dashed',\r\n 'dotted' => 'Dotted',\r\n 'inset' => 'Inset',\r\n 'outset' => 'Outset'));\r\n $borderstyle['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 2));\r\n $borderstyle['color'] =& $this->createElement('text',\r\n 'color', 'color',\r\n array('size' => 7));\r\n $this->addGroup($borderstyle, 'borderstyle', null, ' ');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('apply','process'));\r\n }", "function ctools_export_form($form, &$form_state, $code, $title = '') {\r\n $lines = substr_count($code, \"\\n\");\r\n $form['code'] = array(\r\n '#type' => 'textarea',\r\n '#title' => $title,\r\n '#default_value' => $code,\r\n '#rows' => $lines,\r\n );\r\n\r\n return $form;\r\n}", "public function getCSS()\n {\n ob_start();\n ?>\n div.webFormHelpBox {\n position: absolute;\n left: 320px;\n top: 330px;\n width: 200px;\n font-family: Arial, Verdana, sans-serif;\n font-size: 8pt;\n line-height: 8pt;\n font-weight: normal;\n background-color: #f7f7f7;\n border: 1px solid #cccccc;\n padding: 8px;\n visibility: hidden;\n }\n div.webFormErrorBox {\n position: absolute;\n left: 320px;\n top: 330px;\n width: 200px;\n font-family: Arial, Verdana, sans-serif;\n font-size: 8pt;\n line-height: 8pt;\n font-weight: normal;\n background-color: #fddbdb;\n border: 1px solid #9a1515;\n padding: 8px;\n visibility: hidden;\n color: #000000;\n }\n td.wfErrorText {\n font-family: Arial, Verdana, sans-serif;\n font-size: 12px;\n font-weight: normal;\n color: #000000;\n line-height: 14px;\n }\n div.webFormCaption {\n font-size: 8pt;\n color: #888888;\n line-height: 10pt;\n font-family: Arial, Verdana, sans-serif;\n text-align: left;\n width: 150px;\n padding: 2px;\n display: none;\n }\n span.webFormVerifyText {\n font-family: Arial, Verdana, sans-serif;\n font-size: 9pt;\n font-weight: normal;\n }\n input.webFormSaveButton {\n font-family: Arial, Verdana, sans-serif;\n font-size: 7pt;\n font-weight: bold;\n }\n div.webFormVerifyFieldContainer {\n padding: 1px;\n background-color: #f0f0f0;\n border: 1px solid #c0c0c0;\n }\n div.webFormVerifyFieldContainerBox {\n padding: 1px;\n background-color: #f0f0f0;\n border: 1px solid #c0c0c0;\n /*height: 63px;*/\n }\n a.webFormVerifyFieldLink {\n font-family: Arial, Verdana, sans-serif;\n font-size: 10pt;\n font-weight: normal;\n text-decoration: none;\n color: #000000;\n }\n input:hover {\n background-color: #f2f2f2;\n }\n textarea:hover {\n background-color: #f2f2f2;\n }\n\n /* Elements <input>-type items */\n <?php if ($this->_verifyForm) { ?>\n .webFormElementText {\n padding: 3px 0px 2px 18px;\n background-color: #ffffff;\n border: 1px solid #c0c0c0;\n }\n .webFormElementTextBox {\n padding: 0px 0px 0px 0px;\n background-color: #ffffff;\n border: 1px solid #c0c0c0;\n }\n .webFormElementSelect {\n\n }\n <?php } else { ?>\n .webFormElementText {\n padding: 3px 0px 2px 3px;\n background-color: #ffffff;\n border: 1px solid #c0c0c0;\n }\n .webFormElementTextBox {\n padding: 0px 0px 0px 0px;\n background-color: #ffffff;\n border: 1px solid #c0c0c0;\n }\n .webFormElementSelect {\n\n }\n <?php } ?>\n\n <?php\n $css = ob_get_contents();\n ob_end_clean();\n\n return $css;\n }", "function buildSettingsForm() {}", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: string properties');\r\n\r\n $stringpainted[] =& $this->createElement('radio', null, null, 'Yes', true);\r\n $stringpainted[] =& $this->createElement('radio', null, null, 'No', false);\r\n $this->addGroup($stringpainted, 'stringpainted', 'Render a custom string:');\r\n\r\n $this->addElement('text', 'stringid', 'Id:', array('size' => 32));\r\n $this->addElement('text', 'stringclass', 'CSS class:', array('size' => 32));\r\n $this->addElement('text', 'stringvalue', 'Content:', array('size' => 32));\r\n\r\n $stringsize['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 4));\r\n $stringsize['height'] =& $this->createElement('text',\r\n 'height', 'height',\r\n array('size' => 4));\r\n $stringsize['left'] =& $this->createElement('text',\r\n 'left', 'left',\r\n array('size' => 4));\r\n $stringsize['top'] =& $this->createElement('text',\r\n 'top', 'top',\r\n array('size' => 4));\r\n $stringsize['bgcolor'] =& $this->createElement('text',\r\n 'bgcolor', 'bgcolor',\r\n array('size' => 7));\r\n $this->addGroup($stringsize, 'stringsize', 'Size, position and color:', ' ');\r\n\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Left', 'left');\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Right', 'right');\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Top', 'top');\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Bottom', 'bottom');\r\n $this->addGroup($stringvalign, 'stringvalign', 'Vertical alignment:');\r\n\r\n $stringalign[] =& $this->createElement('radio', null, null,\r\n 'Left', 'left');\r\n $stringalign[] =& $this->createElement('radio', null, null,\r\n 'Right', 'right');\r\n $stringalign[] =& $this->createElement('radio', null, null,\r\n 'Center', 'center');\r\n $this->addGroup($stringalign, 'stringalign', 'Horizontal alignment:');\r\n\r\n $stringfont['family'] =& $this->createElement('text',\r\n 'family', 'family',\r\n array('size' => 40));\r\n $stringfont['size'] =& $this->createElement('text',\r\n 'size', 'size',\r\n array('size' => 2));\r\n $stringfont['color'] =& $this->createElement('text',\r\n 'color', 'color',\r\n array('size' => 7));\r\n $this->addGroup($stringfont, 'stringfont', 'Font:', ' ');\r\n\r\n $stringweight[] =& $this->createElement('radio', null, null,\r\n 'normal', 'normal');\r\n $stringweight[] =& $this->createElement('radio', null, null,\r\n 'Bold', 'bold');\r\n $this->addGroup($stringweight, 'stringweight', 'Font weight:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('apply','process'));\r\n }", "function do_form(){\n\t\tob_start();\n\t\t\n\t\t$op = ($this->id_base == $this->id)? __('Add', JCF_TEXTDOMAIN) : __('Edit', JCF_TEXTDOMAIN);\n\t\t?>\n\t\t<div class=\"jcf_edit_field\">\n\t\t\t<h3 class=\"header\"><?php echo $op . ' ' . $this->title; ?></h3>\n\t\t\t<div class=\"jcf_inner_content\">\n\t\t\t\t<form action=\"#\" method=\"post\" id=\"jcform_edit_field\">\n\t\t\t\t\t<fieldset>\n\t\t\t\t\t\t<input type=\"hidden\" name=\"field_id\" value=\"<?php echo $this->id; ?>\" />\n\t\t\t\t\t\t<input type=\"hidden\" name=\"field_number\" value=\"<?php echo $this->number; ?>\" />\n\t\t\t\t\t\t<input type=\"hidden\" name=\"field_id_base\" value=\"<?php echo $this->id_base; ?>\" />\n\t\t\t\t\t\t<input type=\"hidden\" name=\"fieldset_id\" value=\"<?php echo $this->fieldset_id; ?>\" />\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$this->form( $this->instance );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// need to add slug field too\n\t\t\t\t\t\t\t$slug = esc_attr($this->slug);\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t<label for=\"<?php echo $this->get_field_id('slug'); ?>\"><?php _e('Slug:', JCF_TEXTDOMAIN); ?></label>\n\t\t\t\t\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id('slug'); ?>\" name=\"<?php echo $this->get_field_name('slug'); ?>\" type=\"text\" value=\"<?php echo $slug; ?>\" />\n\t\t\t\t\t\t\t<br/><small><?php _e('Machine name, will be used for postmeta field name.', JCF_TEXTDOMAIN); ?></small>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t// enabled field\n\t\t\t\t\t\t\tif( $this->is_new ){\n\t\t\t\t\t\t\t\t$this->instance['enabled'] = 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t<label for=\"<?php echo $this->get_field_id('enabled'); ?>\">\n\t\t\t\t\t\t\t\t<input class=\"checkbox\" type=\"checkbox\" \n\t\t\t\t\t\t\t\t\t\tid=\"<?php echo $this->get_field_id('enabled'); ?>\"\n\t\t\t\t\t\t\t\t\t\tname=\"<?php echo $this->get_field_name('enabled'); ?>\"\n\t\t\t\t\t\t\t\t\t\tvalue=\"1\" <?php checked(true, @$this->instance['enabled']); ?> />\n\t\t\t\t\t\t\t\t<?php _e('Enabled', JCF_TEXTDOMAIN); ?></label>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"field-control-actions\">\n\t\t\t\t\t\t\t<div class=\"alignleft\">\n\t\t\t\t\t\t\t\t<?php if( $op != __('Add', JCF_TEXTDOMAIN) ) : ?>\n\t\t\t\t\t\t\t\t<a href=\"#remove\" class=\"field-control-remove\"><?php _e('Delete', JCF_TEXTDOMAIN); ?></a> |\n\t\t\t\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t\t\t\t<a href=\"#close\" class=\"field-control-close\"><?php _e('Close', JCF_TEXTDOMAIN); ?></a>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"alignright\">\n\t\t\t\t\t\t\t\t<?php echo print_loader_img(); ?>\n\t\t\t\t\t\t\t\t<input type=\"submit\" value=\"<?php _e('Save', JCF_TEXTDOMAIN); ?>\" class=\"button-primary\" name=\"savefield\">\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<br class=\"clear\"/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</fieldset>\n\t\t\t\t</form>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\t\t\n\t\t$html = ob_get_clean();\n\t\treturn $html;\n\t}", "function build_basic_form()\r\n {\r\n $this->addElement('select', LanguagePack :: PROPERTY_BRANCH, Translation :: get('Branch'), LanguagePack :: get_branch_options());\r\n \r\n \t$this->addElement('file', 'file', Translation :: get('FileName'));\r\n $allowed_upload_types = array('zip');\r\n $this->addRule('file', Translation :: get('OnlyZIPAllowed'), 'filetype', $allowed_upload_types);\r\n $this->addRule('file', Translation :: get('ThisFieldIsRequired', null, Utilities :: COMMON_LIBRARIES), 'required');\r\n \r\n // Submit button\r\n //$this->addElement('submit', 'user_settings', 'OK');\r\n $buttons[] = $this->createElement('style_submit_button', 'submit', Translation :: get('Import', null, Utilities :: COMMON_LIBRARIES), array('class' => 'positive'));\r\n $buttons[] = $this->createElement('style_reset_button', 'reset', Translation :: get('Reset', null, Utilities :: COMMON_LIBRARIES), array('class' => 'normal empty'));\r\n \r\n $this->addGroup($buttons, 'buttons', null, '&nbsp;', false);\r\n }", "protected function createComponentEditForm() {\r\n\t\t$form = new Form;\r\n\t\t$form->getElementPrototype()->class(\"formWide\");\r\n\t\t$options = array(0 => \"Default\", 1 => \"Odkaz na obsah\", 3 => \"Odkaz na položku menu\");\r\n\t\t// easy way how to create url slug\r\n\t\t$form->addText(\"title\", \"Název:\")\r\n\t\t\t\t->setAttribute('onchange', '\r\n\t\t\t\t\t\t\tvar nodiac = { \"á\": \"a\", \"č\": \"c\", \"ď\": \"d\", \"é\": \"e\", \"ě\": \"e\", \"í\": \"i\", \"ň\": \"n\", \"ó\": \"o\", \"ř\": \"r\", \"š\": \"s\", \"ť\": \"t\", \"ú\": \"u\", \"ů\": \"u\", \"ý\": \"y\", \"ž\": \"z\" };\r\n\t\t\t\t\t\t\ts = $(\"#frmeditForm-title\").val().toLowerCase();\r\n\t\t\t\t\t\t\tvar s2 = \"\";\r\n\t\t\t\t\t\t\tfor (var i=0; i < s.length; i++) {\r\n\t\t\t\t\t\t\t\ts2 += (typeof nodiac[s.charAt(i)] != \"undefined\" ? nodiac[s.charAt(i)] : s.charAt(i));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tresult=s2.replace(/[^a-z0-9_]+/g, \"-\").replace(/^-|-$/g, \"\");\r\n\t\t\t\t\t\t\t$(\"#frmeditForm-url\").val(result);\r\n\t\t\t\t\t\t');\r\n\t\t$form->addText(\"url\", \"url:\")->setAttribute(\"readonly\", \"readonly\");\r\n\t\tif (!$this->onlyTree) {\r\n\t\t\t$form->addSelect(\"target_type\", \"Cíl:\", $options);\r\n\t\t\t$content = $this->prepareContentSelectBox();\r\n\t\t\t$menuContent = $this->prepareMenuContentSelectBox();\r\n\t\t\t$form->addSelect(\"target_id\", \"Odkazovaný obsah:\", $content)->setPrompt(\"Pouze při zvolení výše\");\r\n\t\t\t$form->addSelect(\"target_menu\", \"Odk. položka menu:\", $menuContent)->setPrompt(\"Pouze při zvolení výše\");\r\n\t\t}\r\n\t\t$form->addHidden(\"parent_id\", $this->parent_id);\r\n\t\t$form->addHidden(\"edit_id\", $this->edit_id);\r\n\t\t//filling form\r\n\t\tif ($this->edit_id or $this->edit_id === \"0\") {\r\n\t\t\t$defFromDb = $this->closureModel->getItemById($this->edit_id);\r\n\t\t\t$defaults = new \\Nette\\ArrayHash;\r\n\t\t\tforeach ($defFromDb as $key => $value) {\r\n\t\t\t\t$defaults->$key = $value;\r\n\t\t\t}\r\n\t\t\tif ($this->edit_id === \"0\") {\r\n\t\t\t\t$form[\"title\"]->setDisabled();\r\n\t\t\t}\r\n\t\t\tif (!$this->onlyTree) {\r\n\t\t\t\t$t = $defaults->target;\r\n\t\t\t\tif (!Validators::isNumericInt($t)) {\r\n\t\t\t\t\t$menuItem = $this->checkTargetMenuItemExists($t);\r\n\t\t\t\t\tif ($menuItem) {\r\n\t\t\t\t\t\t$defaults->target_type = 3;\r\n\t\t\t\t\t\t$defaults->target_menu = $menuItem;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$contentId = $this->checkTargetContentExists($t);\r\n\t\t\t\t\t\t$defaults->target_type = 1;\r\n\t\t\t\t\t\t$defaults->target_id = $contentId;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$form[\"target_menu\"]->getControlPrototype()->addClass(\"formFieldInvisible\");\r\n\t\t\t\t} elseif ($t <= 0) {\r\n\t\t\t\t\t$defaults->target_type = 0;\r\n\t\t\t\t\t$form[\"target_menu\"]->getControlPrototype()->addClass(\"formFieldInvisible\");\r\n\t\t\t\t\t$form[\"target_id\"]->getControlPrototype()->addClass(\"formFieldInvisible\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$defaults->target = null;\r\n\t\t\t$form->setDefaults($defaults);\r\n\t\t}\r\n\r\n\t\t$form->addSubmit('save', 'Save')\r\n\t\t\t\t\t\t->setAttribute('onclick', '$(\"#frmeditForm-title\").trigger(\"change\")')\r\n\t\t\t\t->onClick[] = callback($this, 'editFormSubmitted');\r\n\t\t$form->setRenderer(new \\Kdyby\\BootstrapFormRenderer\\BootstrapRenderer());\r\n\t\treturn $form;\r\n\t}", "protected function buildForm()\n\t{\t\n\t\t$mid = $this->Form->newInput( 'hidden' );\n\t\t$mid->set( 'name', 'mid' );\n\t\t$mid->set( 'id', 'mid' );\n\t\t$mid->set( 'value', $this->data['id'] );\n\t\t\n\t\t$submit = $this->Form->newInput( 'submit' );\n\t\t$submit->set( 'name', 'submit' );\n\t\t$submit->set( 'id', 'submit' );\n\t\t$submit->set( 'value', 'Restore' );\n\t}", "public function cs_generate_form() {\n global $post;\n }", "public function buildForm()\n {\n }", "public function makeOutput()\n\t{\n\t\t$formId = $this->name;\n\t\t$enctype = 'application/x-www-form-urlencoded';\n\n\t\t$formHtml = new HtmlObject('form');\n\t\t$formHtml->property('method', $this->form->getMethod())->\n\t\t\t\t\tproperty('id', $formId)->\n\t\t\t\t\tproperty('action', $this->form->getAction());\n\n\t\t$jsStartup = array();\n\n\t\tforeach($this->inputs as $inputs) {\n\t\t\tforeach($inputs as $input) {\n\t\t\t\tif(($input->type == 'checkbox' || $input->type == 'radio') && isset($input->properties['value'])) {\n\t\t\t\t\t$inputId = $formId . '_' . $input->name . '_' . $input->properties['value'];\n\t\t\t\t} else {\n\t\t\t\t\t$inputId = $formId . '_' . $input->name;\n\t\t\t\t}\n\t\t\t\t$input->property('id', $inputId);\n\t\t\t}\n\t\t}\n\n\t\tforeach($this->inputs as $section => $inputs)\n\t\t{\n\t\t\t$sectionHtml = new HtmlObject('fieldset');\n\t\t\t$sectionHtml->property('id', $formId . \"_section_\" . $section);\n\n\t\t\tif(isset($this->sectionClasses[$section])) {\n\t\t\t\tforeach($this->sectionClasses[$section] as $class) {\n\t\t\t\t\t$sectionHtml->addClass($class);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->sectionClasses[$section] = array();\n\t\t\t}\n\n\t\t\tif(!in_array('mf-toggle-hide', $this->sectionClasses[$section]) && \n\t\t\t !in_array('mf-toggle-none', $this->sectionClasses[$section])) {\n\t\t\t\t$sectionHtml->addClass('mf-toggle-show');\n\t\t\t}\n\n\n\t\t\tif(isset($this->sectionLegends[$section]))\n\t\t\t\t$sectionHtml->insertNewHtmlObject('legend')->\n\t\t\t\t\twrapAround($this->sectionLegends[$section]);\n\n\t\t\t$sectionDiv = new HtmlObject('div');\n\t\t\t$sectionDiv->addClass('fieldset_contents')->\n\t\t\t\tproperty('id', $formId . \"_section_\" . $section . '_contents');\n\n\t\t\tif(isset($this->sectionIntro[$section]))\n\t\t\t\t$sectionDiv->insertNewHtmlObject('div')->\n\t\t\t\t\twrapAround($this->sectionIntro[$section])->\n\t\t\t\t\taddClass('fieldset_intro')->\n\t\t\t\t\tproperty('id', $formId . \"_section_\" . $section . '_intro');\n\n\t\t\t$sectionHtml->wrapAround($sectionDiv);\n\n\t\t\t$hasInputs = false;\n\n\t\t\t$controlsDiv = new HtmlObject('div');\n\t\t\t$controlsDiv->addClass('fieldset_controls')->\n\t\t\t\tproperty('id', $formId . \"_section_\" . $section . '_controls');\n\n\t\t\t$sectionDiv->wrapAround($controlsDiv);\n\n\t\t\tforeach($inputs as $input)\n\t\t\t{\n\t\t\t\t$inputId = $input->property('id');\n\n\t\t\t\tif($input->type === 'submit' && !$this->includeSubmit)\n\t\t\t\t\tcontinue;\n\n\t\t\t\tif($input->type === 'richtext') {\n\t\t\t\t\t$input->property($this->form->getMarkup(), 'true');\n\t\t\t\t\t$input->type = 'textarea';\n\t\t\t\t\t$input->addClass('fulltext');\n\t\t\t\t}\n\n\t\t\t\t$plugins = new Hook();\n\t\t\t\t$plugins->enforceInterface('FormToHtmlHook');\n\t\t\t\t$plugins->loadPlugins('Forms', 'HtmlConvert', 'Base');\n\t\t\t\t$plugins->loadPlugins('Forms', 'HtmlConvert', $input->type);\n\t\t\t\t$plugins->setInput($input);\n\n\t\t\t\t$jsStartup = array_merge_recursive($jsStartup,\n\t\t\t\t\t\t\t\tHook::mergeResults($plugins->getCustomJavaScript()));\n\n\t\t\t\tif(in_array(true, Hook::mergeResults($plugins->overrideHtml())))\n\t\t\t\t{\n\t\t\t\t\t$plugins->createOverriddingHtml($sectionHtml);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\n\t\t\t\tif($inputStartupJs = $this->getInputJavascript($input))\n\t\t\t\t\t$jsStartup = array_merge_recursive($jsStartup, $inputStartupJs);\n\n\t\t\t\t$inputHtml = $this->getInputHtmlByType($input);\n\t\t\t\t$plugins->setCustomHtml($inputHtml);\n\n\t\t\t\tif($inputOptions = $this->getInputMetaData($input) ) //count($inputOptions > 0))\n\t\t\t\t{\n\t\t\t\t\t$metaDataClass = json_encode($inputOptions);\n\t\t\t\t\t$inputHtml->addClass($metaDataClass);\n\t\t\t\t}\n\n\t\t\t\tif($input->type == 'file')\n\t\t\t\t\t$enctype = 'multipart/form-data';\n\n\t\t\t\tif($input->type == 'hidden') {\n\t\t\t\t\t$inputHtml->close(false);\n\t\t\t\t\t$formHtml->wrapAround($inputHtml);\n\t\t\t\t} else {\n\t\t\t\t\t$inputHtml->wrapAround($input->property('contents'));\n\n\t\t\t\t\t$labelHtml = new HtmlObject('label');\n\n\t\t\t\t\t$labelHtml->property('for', $inputId)->\n\t\t\t\t\t\tproperty('id', $inputId . '_label');\n\n\t\t\t\t\tif(isset($input->pretext))\n\t\t\t\t\t\t$controlsDiv->wrapAround($input->pretext);\n\n\t\t\t\t\tif(isset($input->label))\n\t\t\t\t\t{\n\t\t\t\t\t\t$labelHtml->wrapAround($input->label);\n\t\t\t\t\t\tif(isset($input->description))\n\t\t\t\t\t\t\t$labelHtml->property('title', $input->description);\n\t\t\t\t\t}\n\n\t\t\t\t\tif($input->type == 'radio' || $input->type == 'checkbox')\n\t\t\t\t\t\t$inputHtml->addClass('small_input');\n\n\t\t\t\t\tif(isset($input->labelAfter) && $input->labelAfter) {\n\t\t\t\t\t\t$labelHtml->addClass('label_after');\n\t\t\t\t\t\t$inputHtml->addClass('input_label_after');\n\n\t\t\t\t\t\t$controlsDiv->wrapAround($inputHtml)->\n\t\t\t\t\t\t\twrapAround($labelHtml);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$labelHtml->addClass('label_before');\n\t\t\t\t\t\t$inputHtml->addClass('input_label_before');\n\n\t\t\t\t\t\t$controlsDiv->wrapAround($labelHtml)->\n\t\t\t\t\t\t\twrapAround($inputHtml);\n\t\t\t\t\t}\n\n\t\t\t\t\tif(isset($this->errors[$input->name])) {\n\t\t\t\t\t\t$errorLabel = new HtmlObject('label');\n\t\t\t\t\t\t$errorLabel->addClass('error')->\n\t\t\t\t\t\t\tproperty('for', $inputId)->\n\t\t\t\t\t\t\tproperty('generated', true);\n\t\t\t\t\t\t$errorVal = '';\n\n\t\t\t\t\t\tforeach($this->errors[$input->name] as $error)\n\t\t\t\t\t\t\t$errorVal .= $error . ' ';\n\n\t\t\t\t\t\t$errorLabel->wrapAround(trim($errorVal));\n\t\t\t\t\t\t$controlsDiv->wrapAround($errorLabel);\n\t\t\t\t\t}\n\n\t\t\t\t\tif(isset($input->posttext))\n\t\t\t\t\t\t$controlsDiv->wrapAround($input->posttext);\n\n\t\t\t\t\tif(!isset($input->noBreak) || $input->noBreak === false)\n\t\t\t\t\t\t$controlsDiv->insertNewHtmlObject('br');\n\n\t\t\t\t\t$hasInputs = true;\n\t\t\t\t}\n\t\t\t}//foreach($this->inputs as $section => $inputs)\n\n\t\t\tif(isset($this->sectionOutro[$section]))\n\t\t\t\t$sectionDiv->insertNewHtmlObject('div')->\n\t\t\t\t\twrapAround($this->sectionOutro[$section])->\n\t\t\t\t\taddClass('fieldset_outro')->\n\t\t\t\t\tproperty('id', $formId . \"_section_\" . $section . '_outro');\n\n\t\t\tif($hasInputs)\n\t\t\t\t$formHtml->wrapAround($sectionHtml);\n\n\t\t\t$formHtml->property('enctype', $enctype);\n\t\t}\n\n\t\tif(!$this->submitButton && $this->includeSubmit)\n\t\t{\n\t\t\t$sectionHtml = new HtmlObject('div');\n\t\t\t$sectionHtml->property('id', $this->name . \"_section_\" . 'control');\n\t\t\t$inputHtml = new HtmlObject('input');\n\t\t\t$inputHtml->name = $input->name;\n\t\t\t$inputHtml->property('name', 'Submit')->property('type', 'Submit')->property('value', 'Submit');\n\n\t\t\t$labelHtml = new HtmlObject('label');\n\t\t\t$sectionHtml->wrapAround($labelHtml)->wrapAround($inputHtml)->wrapAround('<br>');\n\t\t\t$formHtml->wrapAround($sectionHtml);\n\t\t}\n\n\t\t$formHtml = (string) $formHtml;\n\n\t\t$output = $this->fullForm\n\t\t\t? (string) $formHtml\n\t\t\t: (string) $sectionHtml;\n\n\t\t$formJsOptions = array();\n\t\t$formJsOptions['validateOnLoad'] = $this->form->wasSubmitted();\n\t\t$jsStartup[] = '$(\"#' . $this->name . '\").MortarForm(' . json_encode($formJsOptions) . ');';\n\n\t\tif(class_exists('ActivePage', false))\n\t\t{\n\t\t\t$page = ActivePage::getInstance();\n\t\t\t$page->addStartupScript($jsStartup);\n\t\t}\n\t\treturn $output;\n\t}", "public function buildFormTemplate() {\n\t\t$formTemplatepath = \"src/Templates/\".$this->stateName.\"_\".$this->stateType.\".php\";\n\t\t$formTemplate = fopen($formTemplatepath, \"w\") or die (\"Unable to create html template for \\\"\".$this->stateName.\"_\".$this->stateType.\"\\\" state.\");\n\t\t$formHtml = \"<!DOCTYPE html>\n\t\t<html>\n\t\t<head>\n\t\t\t<title>\".$this->title.\"</title>\n\t\t</head>\n\t\t<body>\";\n\t\tif ($this->stateType == \"generation\") {\n\t\t\t$formHtml .= \"<form method=\\\"\".$this->method.\"\\\" action=\\\"../Scripts/generationHandleRequest.php\\\" >\";\n\t\t}\n\t\t\n\t\tforeach ($this->_inputs as $key => $input) {\n\t\t\t// Skip the Database elements.\n\t\t\tif ($input['inputType'] == \"DATABASE\") {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// Check if email validation is required.\n\t\t\tif (isset($input['rule']) && in_array('email', $input['rule'])) {\n\t\t\t\t$input['inputType'] = 'email';\n\t\t\t}\n\n\t\t\t$formHtml .= \"<label>\".$input['label'].\"</label><input type=\\\"\".$input['inputType'].\"\\\" id=\\\"\".$input['name'].\"\\\" name=\\\"\".$input['name'].\"\\\" value=\\\"\".$input['defaultValue'].\"\\\"\";\n\n\t\t\t// Check if field was required.\n\t\t\tif (isset($input['rule']) && in_array('required', $input['rule'])) {\n\t\t\t\t$formHtml .= \" required\";\n\t\t\t}\n\t\t\t// Makes the html page more readable, i.e. appending with a new line.\n\t\t\t$formHtml .= \">\n\t\t\t<br>\";\n\t\t}\n\n\t\t$formHtml .= \"</form>\n\t\t</body>\n\t\t</html>\";\n\n\t\tfwrite($formTemplate, $formHtml);\n\t\tfclose($formTemplate);\n\t}", "public function buildForm() {\n\t\t$form = '';\n\n\t\tforeach ($this->_properties as $row) {\n\t\t\tif (!in_array($row['Field'],$this->_ignore)) {\n\t\t\t\t$elem = $this->buildElement($row);\n\t\t\t\t$row['Comment'] != '' ? $comment = $row['Comment'].\"<br />\": $comment = '';\n\t\t\t\t$this->_properties[$row['Field']]['HTMLElement']=$elem;\n\t\t\t\tif ($row['ElementType']=='hidden')\n\t\t\t\t\t$form .= $elem;\n\t\t\t\telse \n\t\t\t\t\t$form .= sprintf(\"<div class='formElem'>\\n%s<br />\\n%s\\n%s</div>\\n\",ucwords (str_replace (\"_\",\" \",$row['Field'])),$comment,$elem);\n\t\t\t}\n\t\t}\n\t\treturn $form;\n\t}", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: run demo');\r\n\r\n $this->addElement('static', 'progressBar',\r\n 'Your progress meter looks like:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('reset','process'));\r\n }", "protected function getForm()\n {\n $this->document->addStyle('view/javascript/codemirror/lib/codemirror.css');\n $this->document->addStyle('view/javascript/codemirror/theme/monokai.css');\n $this->document->addStyle('view/javascript/summernote/summernote.css');\n\n $this->document->addScript('view/javascript/codemirror/lib/codemirror.js');\n $this->document->addScript('view/javascript/codemirror/lib/xml.js');\n $this->document->addScript('view/javascript/codemirror/lib/formatting.js');\n $this->document->addScript('view/javascript/summernote/summernote.js');\n $this->document->addScript('view/javascript/summernote/summernote-image-attributes.js');\n $this->document->addScript('view/javascript/summernote/opencart.js');\n\n $data['text_form'] = !isset($this->request->get['country_id']) ? $this->language->get('text_add') : $this->language->get('text_edit');\n\n if (isset($this->error['warning'])) {\n $data['error_warning'] = $this->error['warning'];\n } else {\n $data['error_warning'] = '';\n }\n\n if (isset($this->error['domain'])) {\n $data['error_domain'] = $this->error['domain'];\n } else {\n $data['error_domain'] = array();\n }\n\n if (isset($this->error['currency'])) {\n $data['error_currency'] = $this->error['currency'];\n } else {\n $data['error_currency'] = '';\n }\n\n $url = '';\n\n if (isset($this->request->get['sort'])) {\n $url .= '&sort=' . $this->request->get['sort'];\n }\n\n if (isset($this->request->get['order'])) {\n $url .= '&order=' . $this->request->get['order'];\n }\n\n if (isset($this->request->get['page'])) {\n $url .= '&page=' . $this->request->get['page'];\n }\n\n $data['breadcrumbs'] = array();\n\n $data['breadcrumbs'][] = array(\n 'text' => $this->language->get('text_home'),\n 'href' => $this->url->link('common/dashboard', 'user_token=' . $this->session->data['user_token'])\n );\n\n $data['breadcrumbs'][] = array(\n 'text' => $this->language->get('heading_title'),\n 'href' => $this->url->link('domain/domain', 'user_token=' . $this->session->data['user_token'] . $url)\n );\n\n if (!isset($this->request->get['country_id'])) {\n $data['action'] = $this->url->link('domain/domain/add', 'user_token=' . $this->session->data['user_token'] . $url);\n } else {\n $data['action'] = $this->url->link('domain/domain/edit', 'user_token=' . $this->session->data['user_token'] . '&country_id=' . $this->request->get['country_id'] . $url);\n }\n\n $data['cancel'] = $this->url->link('domain/domain', 'user_token=' . $this->session->data['user_token'] . $url);\n\n if (isset($this->request->get['country_id']) && ($this->request->server['REQUEST_METHOD'] != 'POST')) {\n $data['domainLang'] = $this->model_domain_domain->getDomain($this->request->get['country_id']);\n if(isset($data['domainLang'][0] )){\n $domain_info = current($data['domainLang']);\n }else{\n $domain_info = $data['domainLang'];\n }\n\n }\n\n $data['user_token'] = $this->session->data['user_token'];\n\n\n if (isset($this->request->post['domain'])) {\n $data['domain'] = $this->request->post['domain'];\n } elseif (!empty($domain_info)) {\n $data['domain'] = $domain_info['domain'];\n } else {\n $data['domain'] = '';\n }\n\n if (isset($this->request->post['currency_id'])) {\n $data['currency_id'] = $this->request->post['currency_id'];\n } elseif (!empty($domain_info)) {\n $data['currency_id'] = $domain_info['currency_id'];\n } else {\n $data['currency_id'] = '';\n }\n\n if (isset($this->request->post['currency_title'])) {\n $data['currency_title'] = $this->request->post['currency_title'];\n } elseif (!empty($domain_info)) {\n $data['currency_title'] = $domain_info['currency_title'];\n } else {\n $data['currency_title'] = '';\n }\n\n $this->load->model('design/layout');\n\n $data['layouts'] = $this->model_design_layout->getLayouts();\n\n $data['header'] = $this->load->controller('common/header');\n $data['column_left'] = $this->load->controller('common/column_left');\n $data['footer'] = $this->load->controller('common/footer');\n\n $this->response->setOutput($this->load->view('domain/domain_form', $data));\n }", "private function controllerBuilder() {\n // Create rules\n $validationRules = '';\n $filecheck = '';\n $insert = false;\n $insertTab = '';\n // Foreach on form fields added on generator\n foreach ($this->formDatas as $field) {\n $rules = array();\n // Create rules for codeigniter framework\n if (isset($field['rules'])) {\n $rules = json_decode($field['rules'], true);\n }\n if (!empty($field['min_length'])) {\n $rules[] = 'min_length[' . $field['min_length'] . ']';\n }\n if (!empty($field['max_length'])) {\n $rules[] = 'max_length[' . $field['max_length'] . ']';\n }\n if (!empty($field['exact_length'])) {\n $rules[] = 'exact_length[' . $field['exact_length'] . ']';\n }\n if (!empty($field['greater_than'])) {\n $rules[] = 'greater_than[' . $field['greater_than'] . ']';\n }\n if (!empty($field['less_than'])) {\n $rules[] = 'less_than[' . $field['less_than'] . ']';\n }\n\n // Create php line\n if (isset($rules)) {\n $validationRules .= '$this->form_validation->set_rules(\\'' . strtolower($field['name']) . '\\', \\'' . $field['label'] . '\\', \\'' . implode('|', $rules) . '\\');\n ';\n }\n\n\n // File\n if ($field['type'] == 'file') {\n // If file_format selected or maxfilesize indicated\n if (isset($field['file_format']) || isset($field['maxfilesize'])) {\n if (!isset($field['file_format'])) {\n $fileformat = 'false';\n } else {\n $fileformat = str_replace(']', ')', str_replace('[', 'array(', sprintf($field['file_format'])));\n }\n\n // Create check line for checking file options\n $filecheck .= '$errorfile[\"' . $field['name'] . '\"] = $this->fileup->checkErrorUpload($_FILES[\"' . $field['name'] . '\"], ' . $fileformat . ', ' . $field['maxfilesize'] . ');\n ';\n }\n }\n\n // Check if database option is checked for create fields to insert\n if (isset($field['database_fields'])) {\n // Option to active database insert\n $insert = true;\n // Tab to insert\n $insertTab .= '$insertTab[\"' . $field['name'] . '\"] = $_POST[\"' . $field[\"name\"] . '\"];\n ';\n }\n }\n\n // Create com for files check\n if ($filecheck != '') {\n $filecheck = '// Files validation\n ' . $filecheck;\n }\n\n // Create code to insert in database\n if ($insert == true) {\n $database_insert = '\n // If valid\n if($valid == true) {\n ' . $insertTab . '\n // Save to bdd\n if (!$this->' . $this->formName . '_model->save($insertTab) == true) {\n // Save error\n $data[\"error\"] = \"save\";\n }\n }';\n } else {\n $database_insert = '';\n }\n\n // Build the controller\n $controller = '<?php\n class ' . ucfirst($this->formName) . ' extends CI_Controller {\n // Constructor\n function __construct()\n {\n parent::__construct();\n $this->load->library(array(\\'form_validation\\', \\'fileup\\'));\n $this->load->helper(array(\\'form\\'));\n $this->load->model(\\'' . $this->formName . '_model\\');\n }\n\n // Form ' . ucfirst($this->formName) . '\n public function index()\n {\n // Init\n $data = array();\n // If form sended\n if(!empty($_POST)) {\n // Delimitors\n $this->form_validation->set_error_delimiters(\\'<p class=\"error\">\\', \\'</p>\\');\n\n // Validation rules\n ' . $validationRules . '\n\n ' . $filecheck . '\n\n // To block database insertion if we have file errors\n $valid = true;\n\n // Check for file errors\n if(isset($errorfile)) {\n // Create file errors for view\n foreach($errorfile as $name => $errorf) {\n if($errorf != false) {\n $data[\"errorfile\"][$name] = $errorf;\n $valid = false;\n }\n }\n }\n\n if ($this->form_validation->run() == true) {\n // Insert in bdd\n ' . $database_insert . '\n\n // Redirect to success page\n redirect(\\'' . $this->formName . '/success\\');\n }\n else {\n // Validation error\n $data[\"error\"] = \"validation\";\n\n }\n }\n // Load view\n $this->load->view(\\'' . $this->formName . '\\', $data);\n }\n\n // Success\n public function success() {\n // Load view\n $this->load->view(\\'' . $this->formName . '_success\\');\n }\n\n }\n ?>';\n\n return array(str_replace('<', '&lt;', $controller), $controller);\n }", "public function auto_build_form($form_content, $data){\r\n\t\treturn \"<form method='post' enctype='multipart/form-data' action='#' \" . (isset($data['onsubmit']) ? \" onsubmit='\" . $data['onsubmit'] . \"' \" : \"onsubmit=\\\"return validateFields()\\\"\") .\r\n\t\t\t\" >\" .\r\n\t\t\t$form_content .\r\n\t\t\t\"</form>\";\r\n\t}", "public function build_css() {\n\t\t\t\n\t\t}", "function genFormStyle(){\n $res = '<form action=\"preferences.php\" method=\"post\">';\n $res .= '<p>Selctionner un style</p>';\n $res .= '<select name=\"style\" id=\"style\">';\n if(isset($_SESSION['style'])){\n switch($_SESSION['style']){\n case \"blue.css\":\n $res .= '<option value=\"blue.css\" selected>Blue</option>';\n $res .= '<option value=\"italic.css\">Italic</option>';\n $res .= '<option value=\"vertetjaune.css\">V et J</option>';\n break;\n case \"italic.css\":\n $res .= '<option value=\"blue.css\">Blue</option>';\n $res .= '<option value=\"italic.css\" selected>Italic</option>';\n $res .= '<option value=\"vertetjaune.css\">V et J</option>';\n break;\n case \"vertetjaune.css\":\n $res .= '<option value=\"blue.css\">Blue</option>';\n $res .= '<option value=\"italic.css\">Italic</option>';\n $res .= '<option value=\"vertetjaune.css\" selected>V et J</option>';\n break;\n }\n }\n else{\n $res .= '<option value=\"blue.css\">Blue</option>';\n $res .= '<option value=\"italic.css\">Italic</option>';\n $res .= '<option value=\"vertetjaune.css\">V et J</option>';\n }\n $res .= '</select>';\n $res .= '<button value=\"submit\">Go !</button>';\n $res .= '</form>';\n echo $res;\n }", "public function build_menu_page() {\n\n\t\t\t$tabindex = 0;\n\t\t\t$temp = array();\n\t\t\t$hidden = array();\n\t\t\t$this->data = get_option($this->slug.'_fields');\n\t\t\t\n\t\t\t$output = '';\n\t\t\t$output .= '<!-- wrap starts -->'.\"\\n\";\n\t\t\t$output .= \"\\t\".'<div class=\"wrap\">'.\"\\n\";\n\n\t\t\t$output .= '<h1>'.$this->options['title'].'</h1>'.\"\\n\";\n\n\t\t\t$output .= \"\\t\".'<form method=\"post\" action=\"'.$_SERVER['REQUEST_URI'].'\" enctype=\"multipart/form-data\">'.\"\\n\\n\";\n\n\t\t\tforeach ($this->data as $section => $fields) {\n\n\t\t\t\t$output .= \"\\t\".'<h2 class=\"title\" id=\"'.sanitize_title($section).'\">'.$section.'</h2>'.\"\\n\\n\";\n\n\t\t\t\t$output .= \"\\t\".'<table class=\"form-table theme-form-table\">'.\"\\n\";\n\t\t\t\t$output .= \"\\t\".'<tbody>'.\"\\n\";\n\n\t\t\t\tforeach ($fields as $id => $field) {\n\n\t\t\t\t\tif ($field['type'] != 'hidden') {\n\n\t\t\t\t\t\t$tabindex += 1;\n\t\t\t\t\t\t$temp += array($field['label'] => isset($field['value']) ? $field['value'] : '');\n\t\t\t\t\t\t$value = isset($_POST['updating']) ? Save::save_page($this->slug, $field) : Save::set_default_value($this->slug, $temp, $field);\n\n\t\t\t\t\t\t$description = (isset($field['description']) && !empty($field['description'])) ? '<span class=\"description\" id=\"'.Field::get_label_name($field['label']).'-info\">'.$field['description'].'</span>' : '';\n\t\t\t\t\t\t$toggle = (isset($field['description']) && !empty($field['description'])) ? '<a class=\"toggle\" data-toggle=\"form-description\" data-target=\"'.Field::get_label_name($field['label']).'-info\" title=\"'.__('Show info.', 'admin translation').'\">'.__('[+] Info', 'admin translation').'</a>' : '';\n\n\t\t\t\t\t\t$output .= \"\\t\".'<tr valign=\"top\">'.\"\\n\";\n\t\t\t\t\t\t$output .= \"\\t\".'<th class=\"scope-one\" scope=\"row\"><label'.Field::get_label_error($field['label']).' for=\"'.Field::get_label_name($field['label']).'\">'.$field['name'].' <cite></cite></label></th>'.\"\\n\";\n\t\t\t\t\t\t$output .= \"\\t\".'<td class=\"scope-two\">'.Field::get_field($this->slug, $field, $value).'<div class=\"field-info\">'.$description.'</div></td>'.\"\\n\";\n\t\t\t\t\t\t$output .= \"\\t\".'<td class=\"scope-three\">'.$toggle.'</td>'.\"\\n\";\n\t\t\t\t\t\t$output .= \"\\t\".'<td>&nbsp;</td>'.\"\\n\";\n\t\t\t\t\t\t$output .= \"\\t\".'</tr>'.\"\\n\";\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\n\t\t\t\t\t\tarray_push($hidden, $field);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\t$output .= \"\\t\".'</tbody>'.\"\\n\";\n\t\t\t\t$output .= \"\\t\".'</table>'.\"\\n\\n\";\n\t\t\t\t$output .= \"\\t\".'<hr />'.\"\\n\\n\";\n\t\t\t}\n\n\t\t\t$output .= isset($_REQUEST['page']) ? \"\\t\".wp_nonce_field($_REQUEST['page']).\"\\n\" : '';\n\n\t\t\tforeach ($hidden as $id => $field) {\n\n\t\t\t\t$temp += array($field['label'] => isset($field['value']) ? $field['value'] : '');\n\t\t\t\t$value = isset($_POST['updating']) ? Save::save_page($this->slug, $field) : Save::set_default_value($this->slug, $temp, $field);\n\t\t\t\t\n\t\t\t\t$output .= Field::get_field($this->slug, $field, $value);\n\t\t\t}\n\t\t\t\n\t\t\t$output .= \"\\t\".'<input type=\"hidden\" id=\"updating\" name=\"updating\" value=\"1\" />'.\"\\n\";\n\t\t\t$output .= \"\\t\".'<p class=\"submit\"><input type=\"submit\" name=\"submit\" id=\"submit\" class=\"button button-primary\" value=\"'.__('Save Changes', 'admin translation').'\" /></p>'.\"\\n\";\n\t\t\t$output .= \"\\t\".'</form>'.\"\\n\";\n\n\t\t\t$output .= \"\\t\".'</div>'.\"\\n\";\n\t\t\t$output .= '<!-- wrap ends -->'.\"\\n\\n\";\n\n\t\t\t$output .= Field::get_form_feedback();\n\t\t\t\n\t\t\tValidation::reset_error();\n\n\t\t\techo $output;\n\t\t}", "private function _displayForm(){\n\t $moneda = Tools::getValue('moneda', $this->moneda);\n\t $iseuro = ($moneda == '978') ? ' selected=\"selected\" ' : '';\n\t $isdollar = ($moneda == '840') ? ' selected=\"selected\" ' : '';\n \t // Opciones para activar/desactivar SSL\n\t $ssl = Tools::getValue('ssl', $this->ssl);\n\t $ssl_si = ($ssl == 'si') ? ' checked=\"checked\" ' : '';\n\t $ssl_no = ($ssl == 'no') ? ' checked=\"checked\" ' : '';\n\t // Opciones para el comportamiento en error en el pago\n\t $error_pago = Tools::getValue('error_pago', $this->error_pago);\n\t $error_pago_si = ($error_pago == 'si') ? ' checked=\"checked\" ' : '';\n\t $error_pago_no = ($error_pago == 'no') ? ' checked=\"checked\" ' : '';\n\t // Opciones para activar los idiomas\n\t $idiomas_estado = Tools::getValue('idiomas_estado', $this->idiomas_estado);\n\t $idiomas_estado_si = ($idiomas_estado == 'si') ? ' checked=\"checked\" ' : '';\n\t $idiomas_estado_no = ($idiomas_estado == 'no') ? ' checked=\"checked\" ' : '';\n\t \n\t \n\t // Mostar formulario\n\t\t$this->_html .=\n\t\t'<form action=\"'.$_SERVER['REQUEST_URI'].'\" method=\"post\">\n\t\t\t<fieldset>\n\t\t\t<legend><img src=\"../img/admin/contact.gif\" />'.$this->l('Configuraci&oacute;n del TPV').'</legend>\n\t\t\t\t<table border=\"0\" width=\"680\" cellpadding=\"0\" cellspacing=\"0\" id=\"form\">\n\t\t\t\t\t<tr><td colspan=\"2\">'.$this->l('Por favor completa la informaci&oacute;n requerida que te proporcionar&aacute; tu banco Servired.').'.<br /><br /></td></tr>\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('URL de llamada del entorno').'</td><td><input type=\"text\" name=\"urltpv\" value=\"'.Tools::getValue('urltpv', $this->urltpv).'\" style=\"width: 330px;\" /></td></tr>\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('Clave secreta de encriptaci&oacute;n').'</td><td><input type=\"password\" name=\"clave\" value=\"'.Tools::getValue('clave', $this->clave).'\" style=\"width: 200px;\" /></td></tr>\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('Nombre del comercio').'</td><td><input type=\"text\" name=\"nombre\" value=\"'.htmlentities(Tools::getValue('nombre', $this->nombre), ENT_COMPAT, 'UTF-8').'\" style=\"width: 200px;\" /></td></tr>\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('N&uacute;mero de comercio (FUC)').'</td><td><input type=\"text\" name=\"codigo\" value=\"'.Tools::getValue('codigo', $this->codigo).'\" style=\"width: 200px;\" /></td></tr>\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('N&uacute;mero de terminal').'</td><td><input type=\"text\" name=\"terminal\" value=\"'.Tools::getValue('terminal', $this->terminal).'\" style=\"width: 80px;\" /></td></tr>\t\t\t\t\t\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('Tipo de moneda').'</td><td>\n\t\t\t\t\t<select name=\"moneda\" style=\"width: 80px;\"><option value=\"\"></option><option value=\"978\"'.$iseuro.'>EURO</option><option value=\"840\"'.$isdollar.'>DOLLAR</option></select></td></tr>\n\t\t\t\t\t\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('Tipo de transacci&oacute;n').'</td><td><input type=\"text\" name=\"trans\" value=\"'.Tools::getValue('trans', $this->trans).'\" style=\"width: 80px;\" /></td></tr>\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\t</td></tr>\n\t\t\t\t\t\n\t\t\t\t</table>\n\t\t\t</fieldset>\n\t\t\t<br>\n\t\t\t<fieldset>\n\t\t\t<legend><img src=\"../img/t/9.gif\" />'.$this->l('Personalizaci&oacute;n').'</legend>\n\t\t\t<table border=\"0\" width=\"680\" cellpadding=\"0\" cellspacing=\"0\" id=\"form\">\n\t\t<tr>\n\t\t\t<td colspan=\"2\">'.$this->l('Por favor completa los datos adicionales.').'.<br /><br /></td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td width=\"215\" style=\"height: 35px;\">'.$this->l('SSL en URL de validaci&oacute;n').'</td>\n\t\t\t<td>\n\t\t\t<input type=\"radio\" name=\"ssl\" id=\"ssl_1\" value=\"si\" '.$ssl_si.'/>\n\t\t\t<img src=\"../img/admin/enabled.gif\" alt=\"'.$this->l('Activado').'\" title=\"'.$this->l('Activado').'\" />\n\t\t\t<input type=\"radio\" name=\"ssl\" id=\"ssl_0\" value=\"no\" '.$ssl_no.'/>\n\t\t\t<img src=\"../img/admin/disabled.gif\" alt=\"'.$this->l('Desactivado').'\" title=\"'.$this->l('Desactivado').'\" />\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td width=\"215\" style=\"height: 35px;\">'.$this->l('En caso de error, permitir elegir otro medio de pago').'</td>\n\t\t\t<td>\n\t\t\t<input type=\"radio\" name=\"error_pago\" id=\"error_pago_1\" value=\"si\" '.$error_pago_si.'/>\n\t\t\t<img src=\"../img/admin/enabled.gif\" alt=\"'.$this->l('Activado').'\" title=\"'.$this->l('Activado').'\" />\n\t\t\t<input type=\"radio\" name=\"error_pago\" id=\"error_pago_0\" value=\"no\" '.$error_pago_no.'/>\n\t\t\t<img src=\"../img/admin/disabled.gif\" alt=\"'.$this->l('Desactivado').'\" title=\"'.$this->l('Desactivado').'\" />\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td width=\"215\" style=\"height: 35px;\">'.$this->l('Activar los idiomas en el TPV').'</td>\n\t\t\t<td>\n\t\t\t<input type=\"radio\" name=\"idiomas_estado\" id=\"idiomas_estado_si\" value=\"si\" '.$idiomas_estado_si.'/>\n\t\t\t<img src=\"../img/admin/enabled.gif\" alt=\"'.$this->l('Activado').'\" title=\"'.$this->l('Activado').'\" />\n\t\t\t<input type=\"radio\" name=\"idiomas_estado\" id=\"idiomas_estado_no\" value=\"no\" '.$idiomas_estado_no.'/>\n\t\t\t<img src=\"../img/admin/disabled.gif\" alt=\"'.$this->l('Desactivado').'\" title=\"'.$this->l('Desactivado').'\" />\n\t\t\t</td>\n\t\t</tr>\n\t\t</table>\n\t\t\t</fieldset>\t\n\t\t\t<br>\n\t\t<input class=\"button\" name=\"btnSubmit\" value=\"'.$this->l('Guardar configuraci&oacute;n').'\" type=\"submit\" />\n\t\t\t\t\t\n\t\t\t\n\t\t</form>';\n\t}", "private function StartForm(){\r\n\t\t\t$this->formHTML .= \"<form method=\\\"{$this->method}\\\" action=\\\"{$this->action}\\\"\";\r\n\t\t\tif($this->enctype){\r\n\t\t\t\t$this->formHTML .= \" enctype=\\\"{$this->enctype}\\\"\";\r\n\t\t\t}\r\n\t\t\t$this->formHTML .= \" name=\\\"{$this->formName}\\\" class=\\\"c{$this->formName}\\\" id=\\\"i{$this->formName}\\\"\";\r\n\t\t\t$this->formHTML .= \">\";\r\n\t\t}", "abstract function builder_form(): string;", "public function createForm() {\n module_load_include('inc', 'islandora_form_builder', 'FormGenerator');\n $form_values = &$this->formState['values'];\n $file = isset($form_values['ingest-file-location']) ? $form_values['ingest-file-location'] : '';\n $form['#attributes']['enctype'] = 'multipart/form-data';\n $form['indicator']['ingest-file-location'] = array(\n '#type' => 'file',\n '#title' => t('Upload Document'),\n '#size' => 48,\n '#description' => t('Select file to be added the the object.'),\n );\n $form_generator = FormGenerator::CreateFromModel($this->contentModelPid, $this->contentModelDsid);\n $form[FORM_ROOT] = $form_generator->generate($this->formName); // TODO get from user .\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Ingest'),\n '#prefix' => t('Please be patient. Once you click next there may be a number of files created. ' .\n 'Depending on your content model this could take a few minutes to process.<br />')\n );\n return $form;\n }", "function customHead(){?>\n\t\t\t<style type=\"text/css\">\n\t\t\t.half-container:not(.full){\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tvertical-align: top;\n\t\t\t\twidth: 49%;\n\t\t\t\tbox-sizing:border-box;\n\t\t\t\t-moz-box-sizing:border-box;\n\t\t\t\t-webkit-box-sizing:border-box;\n\t\t\t\tpadding: 0 10px 0 0;\n\t\t\t\tmargin: 0 !important;\n\t\t\t}\n\t\t\tdiv.form-container input{\n\t\t\t\tborder: 2px solid #6A6A6A;\n\t\t\t\tfont-family: AurulentSansRegular;\n\t\t\t\tfont-size: 14px;\n\t\t\t\tpadding: 3px;\n\t\t\t}\n\t\t\tdiv.form-container label{\n\t\t\t\tcolor: #6A6A6A;\n\t\t\t\tfont-family: AurulentSansRegular;\n\t\t\t\tfont-size: 15px;\n\t\t\t\tfont-weight: normal;\n\t\t\t}\n\t\t\t</style>\n\t\t\t<style type=\"text/css\">\n\n\t\t\t/* General styles */\n\t\t\t/* body { margin: 0; padding: 0; font: 80%/1.5 Arial,Helvetica,sans-serif; color: #111; background-color: #FFF; } */\n\t\t\th2 { margin: 0px; padding: 10px; font-family: Georgia, \"Times New Roman\", Times, serif; font-size: 200%; font-weight: normal; color: #FFF; background-color: #CCC; border-bottom: #BBB 2px solid; }\n\t\t\tp#copyright { margin: 20px 10px; font-size: 90%; color: #999; }\n\n\t\t\t/* Form styles */\n\t\t\tdiv.form-container { margin: 10px; padding: 5px; background-color: #FFF; /* border: #EEE 1px solid; */ }\n\n\t\t\tp.legend { margin-bottom: 1em; }\n\t\t\tp.legend em { color: #C00; font-style: normal; }\n\n\t\t\tdiv.errors, div.form-container div.errors { margin: 0 0 10px 0; padding: 5px 10px; border: #FC6 2px solid; background-color: #FFC; }\n\t\t\tdiv.errors p { margin: 0; }\n\t\t\tdiv.errors p em { color: #C00; font-style: normal; font-weight: bold; }\n\n\t\t\tdiv.form-container form p { margin: 0; }\n\t\t\tdiv.form-container form p.note { margin-left: 170px; font-size: 90%; color: #333; }\n\t\t\tdiv.form-container form fieldset { margin: 10px 0; padding: 10px; border: #DDD 1px solid; }\n\t\t\tdiv.form-container form legend { font-weight: bold; color: #666; }\n\t\t\tdiv.form-container form fieldset div { padding: 0.25em 0; }\n\t\t\tdiv.form-container label { margin-right: 10px; padding-right: 10px; width: 100px; display: block; float: left; text-align: right; position: relative; }\n\t\t\tdiv.form-container label.error, \n\t\t\tdiv.form-container span.error { color: #C00; }\n\t\t\tdiv.form-container label em { position: absolute; right: 0; font-size: 120%; font-style: normal; color: #C00; }\n\t\t\tdiv.form-container input.error { border-color: #C00; background-color: #FEF; }\n\t\t\tdiv.form-container input:focus,\n\t\t\tdiv.form-container input.error:focus, \n\t\t\tdiv.form-container textarea:focus {\tbackground-color: #FFC; border-color: #FC6; }\n\t\t\tdiv.form-container div.controlset label, \n\t\t\tdiv.form-container div.controlset input { display: inline; float: none; }\n\t\t\tdiv.form-container div.controlset label.controlset { display: block; float: left; }\n\t\t\tdiv.form-container div.controlset div { margin-left: 170px; }\n\t\t\tdiv.form-container div.buttonrow { margin-left: 180px; }\n\t\t\t\n\t\t\tp.note { font-size: 12px; margin: 5px 0 0 170px; }\n\n\t\t</style>\n\t<?php\n\t}", "public function form(){\n \t \tif($this->layoutWidgetInfo){\n \t\t$setting = json_decode($this->layoutWidgetInfo->setting, true);\n \t}\n\n \t//default option(type[text], cols[3-9], rows[1], label[$key], name[$key], value[$setting[$k]])\n \t//add option(class, id, stype, styleRow, required, placeholder, attr, [options, code])\n \t$settingForm = array(\n \t\t'layout_widget_id' \t=> array('type' => 'hidden', 'value' => $this->layoutWidgetInfo->layoutWidgetId),\n \t\t'widget_controller' => array('type' => 'hidden', 'value' => $this->widgetController),\n \t\t'header' \t=> array('type' => 'custom', 'value' => \"<h4 class='widget_header col-md-12'>{$this->widgetController}</h4>\", 'label' => ''),\n\n \t\t'title' => array(),\n \t\t'class'\t=> array(),\n 'bg_color'\t=> array('label' => 'Màu nền', 'class' => 'ColorPickerSliders',\n 'addElement' => '<a href=\"index.php?r=admin/help/view&helpId=4\" target=\"_blank\">Xem thêm</a>'),\n \t\t'category_id'\t=> array('type' => 'select_category', 'label' => 'Category', 'required' => true,\n \t\t\t\t'options' => CategoryExt::getCategoryList()),\n \t\t'style'\t=> array('type' => 'select', 'options' => $this->settingDefault['style']),\n \t\t'order_by' => array('type' => 'select', 'options' => $this->settingDefault['order_by']),\n \t\t'order_direction' => array('type' => 'select', 'options' => $this->settingDefault['order_direction']),\n \t);\n\n \t$settingAll = array(\n \t\t'cols' => '3-9'\n \t);\n\n \t//render setting from\n \tTemplateHelper::renderForm($settingForm, $setting, $settingAll);\n TemplateHelper::getTemplate('layout/_extra/add_setting.php', $setting);\n TemplateHelper::getTemplate('layout/_extra/color_picker.php');\n \t}", "public function build() {\n\t\t$this->add($this->Html->A(array('href' => 'http://cakephp.org', 'target' => '_blank', 'text' => 'CakePHP')));\n\t\t$this->add($this->Html->Abbr(array('text' => __('This is an abrreviation'))));\n\t\t$this->add($this->Html->Address(array('text' => __('This is an address'))));\n\t\t$this->add($this->Html->B(array('text' => __('This is bold text'))));\n\t\t$this->add($this->Html->Bdo(array('name' => 'value')));\n\t\t$this->add($this->Html->Blockquote(array('text' => __('This is a block quote'))));\n\t\t$this->add($this->Html->Br());\n\t\t$this->add($this->Html->Button(array('value' => __('This is a button'))));\n\t\t$this->add($this->Html->Cite(array('text' => __('This is a citation'))));\n\t\t$this->add($this->Html->Code(array('text' => __('This is a code block'))));\n\t\t$this->add($this->Html->Comment(array('text' => __('This is a comment'))));\n\t\t$this->add($this->Html->Del(array('text' => __('This is deleted text'))));\n\t\t$this->add($this->Html->Dfn(array('text' => __('This is a definition'))));\n\t\t$this->add($this->Html->Div(array('text' => __('This is a division'))));\n\t\t$dl = $this->Html->Dl(array('text' => __('This is a defined list')));\n\t\t$dl->add($this->Html->Dt(array('text' => __('This is a definition title'))));\n\t\t$dl->add($this->Html->Dd(array('text' => __('This is a definition data'))));\n\t\t$this->add($dl);\n\t\t$this->add($this->Html->Em(array('text' => __('This is text with emphasis'))));\n\t\t$form = $this->Html->Form(array('name' => 'example'));\n\t\t\t$fieldset = $this->Html->Fieldset();\n\t\t\t$fieldset->add($this->Html->Legend(array('text' => __('This is a legend of a fieldset'))));\n\t\t\t$fieldset->add($this->Html->Label(array('text' => __('This is a label'))));\n\t\t\t$fieldset->add($this->Html->Input(array('name' => 'text', 'type' => 'text', 'value' => __('This is a text input'))));\n\t\t\t$fieldset->add($this->Html->Input(array('name' => 'password', 'type' => 'password', 'value' => __('This is a password input'))));\n\t\t\t$fieldset->add($this->Html->Input(array('name' => 'radio', 'type' => 'radio', 'value' => 'radio')));\n\t\t\t$fieldset->add($this->Html->Input(array('name' => 'checkbox', 'type' => 'checkbox', 'value' => 'checkbox')));\n\t\t\t$fieldset->add($this->Html->Textarea(array('name' => 'textarea', 'text' => __('This is a textarea'))));\n\t\t\t\t$select = $this->Html->Select(array('name' => 'select'));\n\t\t\t\t\t$optgroup = $this->Html->Optgroup(array('label' => __('This is an option group')));\n\t\t\t\t\t$optgroup->add($this->Html->Option(array('value' => 123, 'text' => __('This is an option'))));\n\t\t\t\t$select->add($optgroup);\n\t\t\t$fieldset->add($select);\n\t\t$form->add($fieldset);\n\t\t$this->add($form);\n\t\t$this->add($this->Html->Hr());\n\t\t$this->add($this->Html->I(array('text' => __('This is text in italics'))));\n\t\t$this->add($this->Html->Iframe(array('name' => 'ctk', 'src' => 'https://github.com/jameswatts/cake-toolkit')));\n\t\t$this->add($this->Html->Img(array('src' => 'http://cakephp.org/img/cake-logo.png', 'alt' => 'CakePHP')));\n\t\t$this->add($this->Html->Ins(array('text' => __('This is inserted text'))));\n\t\t$this->add($this->Html->Kbd(array('text' => __('This is keyboard text'))));\n\t\t$map = $this->Html->Map();\n\t\t$map->add($this->Html->Area());\n\t\t$this->add($map);\n\t\t$this->add($this->Html->Noscript(array('text' => __('This is displayed if you do not have JavaScript enabled'))));\n\t\t$object = $this->Html->Object();\n\t\t$object->add($this->Html->Param(array('name' => 'example', 'value' => 123)));\n\t\t$this->add($object);\n\t\t$this->add($this->Html->P(array('text' => __('This is a paragraph of text'))));\n\t\t$this->add($this->Html->Pre(array('text' => __('This is preformatted text'))));\n\t\t$this->add($this->Html->Q(array('text' => __('This is a quotation'))));\n\t\t$this->add($this->Html->S(array('text' => __('This is a strike-through text'))));\n\t\t$this->add($this->Html->Samp(array('text' => __('This is a sample text'))));\n\t\t$this->add($this->Html->Small(array('text' => __('This is small text'))));\n\t\t$this->add($this->Html->Span(array('text' => __('This is a span'))));\n\t\t$this->add($this->Html->Strong(array('text' => __('This is a strong text'))));\n\t\t$this->add($this->Html->Style(array('name' => 'value')));\n\t\t$this->add($this->Html->Sub(array('text' => __('This is a sub-text'))));\n\t\t$this->add($this->Html->Sup(array('text' => __('This is a super-text'))));\n\t\t$table = $this->Html->Table(array('border' => 1));\n\t\t$table->add($this->Html->Caption(array('text' => __('This is a table caption'))));\n\t\t\t$colgroup = $this->Html->Colgroup();\n\t\t\t$colgroup->add($this->Html->Col(array('span' => 1)));\n\t\t\t$colgroup->add($this->Html->Col(array('span' => 1)));\n\t\t\t$tbody = $this->Html->Tbody();\n\t\t\t\t$tr = $this->Html->Tr();\n\t\t\t\t$tr->add($this->Html->Th(array('text' => __('This is a table header'))));\n\t\t\t\t$tr->add($this->Html->Td(array('text' => __('This is a table data'))));\n\t\t\t$tbody->add($tr);\n\t\t$table->add($colgroup);\n\t\t$table->add($tbody);\n\t\t$this->add($table);\n\t\t$ol = $this->Html->Ol();\n\t\t$ol->add($this->Html->Li(array('text' => __('This is an ordered list item'))));\n\t\t$this->add($ol);\n\t\t$ul = $this->Html->Ul();\n\t\t$ul->add($this->Html->Li(array('text' => __('This is an unordered list item'))));\n\t\t$this->add($ul);\n\t\t$this->add($this->Html->Var(array('text' => __('This is a variable'))));\n\t}", "static function newform()\n\t{\n\t\treturn '\n\t\t<h2>Neue Wette eintragen</h2>\n\t\t<small>Eine Wette wird erst gestartet wenn der Wetter (das bist DU wenn du eine Wette einträgst) die offene Wette startet.</small>\n\t\t<form action=\"'.getURL(false,false).'\" method=\"post\">\n\t\t<table class=\"border\">\n\t\t<tr><td>\n\t\t<b>Wett Titel:<b> <br />\n\t\t<input type=\"text\" name=\"titel\" class=\"text\" size=\"40\">\n\t\t</td></tr><tr><td>\n\t\t<b>Wette: </b><br />\n\t\t<textarea name=\"wette\" cols=\"40\" rows=\"5\" class=\"text\"></textarea>\n\t\t</td></tr><tr><td>\n\t\t<b>Wetteinsatz: </b><br />\n\t\t<textarea name=\"einsatz\" cols=\"40\" rows=\"3\" class=\"text\"></textarea>\n\t\t</td></tr><tr><td>\n\t\t<b><small>Gültigkeit (in Tagen ab Wettstart, 0 steht für unbegrenzt):</small></b>\n\t\t<br />\n\t\t<input type=\"text\" name=\"dauer\" class=\"text\" size=\"4\">\n\t\t</td></tr><tr><td>\n\t\t<br />\n\t\t<small>\n\t\tEine Wette ist beendet wenn, <b>beide Parteien</b> <br />\n\t\tsich auf einen <b>Sieg oder eine Niederlage einigen</b> können.<br />\n\t\t</small>\n\t\t<br />\n\t\t<input type=\"submit\" value=\"Wette eintragen\" class=\"button\">\n\t\t</td></tr>\n\t\t</table>\n\t\t</form>';\n\t}", "function newPlatformForm()\n{\n echo '<form action=\"./platform.php?action=add\" method=\"post\" enctype=\"multipart/form-data\" id=\"editForm\">\n <label>Platform Name :</label><input type=\"text\" name=\"name\" /><br />\n <label>Platform Icon :</label><input type=\"file\" value=\"upload\" name=\"icon\" /><br />\n <input type=\"submit\" name=\"submit\" value=\"submit\" />\n </form>';\n}", "public function printForm() {\n\t\t$html = $this->printPre().'<input type=\"file\" id=\"'.$this->name().'\" name=\"'.$this->name().'\" />'.$this->printPost().$this->printDescription();\n\n\t\tif ($this->allowMultiple) {\n\t\t\t$html .= $this->print_js();\n\t\t}\n\t\treturn $html;\n\t}", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: main properties');\r\n\r\n $shape[] =& $this->createElement('radio', null, null, 'Horizontal', '1');\r\n $shape[] =& $this->createElement('radio', null, null, 'Vertical', '2');\r\n $this->addGroup($shape, 'shape', 'Shape:');\r\n\r\n $way[] =& $this->createElement('radio', null, null, 'Natural', 'natural');\r\n $way[] =& $this->createElement('radio', null, null, 'Reverse', 'reverse');\r\n $this->addGroup($way, 'way', 'Direction:');\r\n\r\n $autosize[] =& $this->createElement('radio', null, null, 'Yes', true);\r\n $autosize[] =& $this->createElement('radio', null, null, 'No', false);\r\n $this->addGroup($autosize, 'autosize', 'Best size:');\r\n\r\n $psize['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 4));\r\n $psize['height'] =& $this->createElement('text',\r\n 'height', 'height',\r\n array('size' => 4));\r\n $psize['left'] =& $this->createElement('text',\r\n 'left', 'left',\r\n array('size' => 4));\r\n $psize['top'] =& $this->createElement('text',\r\n 'top', 'top',\r\n array('size' => 4));\r\n $psize['position'] =& $this->createElement('text',\r\n 'position', 'position',\r\n array('disabled' => 'true'));\r\n $psize['bgcolor'] =& $this->createElement('text',\r\n 'bgcolor', 'bgcolor',\r\n array('size' => 7));\r\n $this->addGroup($psize, 'progresssize',\r\n 'Size, position and color:', ' ');\r\n\r\n $this->addElement('text', 'rAnimSpeed',\r\n array('Animation speed :',\r\n '(0-1000 ; 0:fast, 1000:slow)'));\r\n $this->addRule('rAnimSpeed',\r\n 'Should be between 0 and 1000',\r\n 'rangelength', array(0,1000), 'client');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('back','apply','process'));\r\n }", "public function criarHtml()\n {\n ;\n $form = \"\n <div class='row'>\n <div class='col-md-12 col-sm-12 col-xs-12'>\n <div class='x_panel'>\n <div class='x_content'>\n<form id='form' class='form-horizontal form-label-left' data-parsley-validate enctype='multipart/form-data' method='POST' >\n \" . $this->conteudo . \"\n <div class='ln_solid'></div>\n <div class='form-group'>\n <div class='col-md-3 col-sm-3 col-xs-12 col-md-offset-9'>\n <button class='btn btn-primary' type='submit'>Cancel</button>\n <a class='btn btn-success' onclick='$this->action'>Salvar</a>\n </div>\n </div>\n</form>\n</div>\n</div>\n</div>\n</div>\n\";\n return $form;\n }", "function cbstdsys_render_form() {\n\t?>\n\t<div class=\"wrap\">\n\n\t\t<!-- Display Plugin Icon, Header, and Description -->\n\t\t<div class=\"icon32\" id=\"icon-options-general\"><br></div>\n\t\t<h2><span style=\"font-family:Consolas,Monaco,Courier,monospace\">cb-std-sys</span>-<?php _e('Settings'); ?>, Version <?php echo CB_STD_SYS_VERSION; ?></h2>\n\n\t\t<!-- Beginning of the Plugin Options Form -->\n\t\t<form method=\"post\" action=\"options.php\">\n\t\t\t<?php settings_fields('cbstdsys_plugin_options'); ?>\n\n<!--\n <fieldset>\n <legend><?php _e('Content','cb-std-sys'); ?></legend>\n\n \t\t\t<table class=\"form-table\">\n-->\n<?php render_form_fields( get_cbstdsys_options(), 'cbstdsys', 'cbstdsys_options' ); ?>\n<!--\n </table>\n\n </fieldset>\n-->\n\t\t\t<p class=\"submit\">\n\t\t\t<input type=\"submit\" class=\"button-primary\" value=\"<?php _e('Save Changes') ?>\" />\n\t\t\t</p>\n\n\t\t</form>\n\n\t</div>\n\t<?php\n}", "function beaver_extender_fe_style_editor() {\n\t\n?>\n\t<div id=\"beaver-extender-fe-style-editor\" style=\"display:none;\">\n\t\t\n\t\t<h3>\n\t\t\t<span class=\"dashicons dashicons-move\" style=\"padding-top:3px;\"></span>\n\t\t</h3>\n\t\t\n\t\t<?php do_action( 'beaver_extender_fe_style_editor_form' ); ?>\n\t\t\n\t</div><!-- END #beaver-extender-fe-style-editor -->\n<?php\n\n}", "public function build() {\n\n\t\t// Build out the CSS styling for the optin.\n\t\t$theme = '<style type=\"text/css\">';\n\t\t$css = '\n\t\thtml div#om-' . $this->hash . ',\n\t\thtml div#om-' . $this->hash . ' * {\n\t\t\tbackground:none;\n\t\t\tborder:0;\n\t\t\tborder-radius:0;\n\t\t\t-webkit-border-radius:0;\n\t\t\t-moz-border-radius:0;\n\t\t\tfloat:none;\n\t\t\tfont:normal 100%/normal helvetica,arial,sans-serif;\n\t\t\t-webkit-font-smoothing:antialiased;\n\t\t\theight:auto;\n\t\t\tletter-spacing:normal;\n\t\t\toutline:none;\n\t\t\tposition:static;\n\t\t\ttext-decoration:none;\n\t\t\ttext-indent:0;\n\t\t\ttext-shadow:none;\n\t\t\ttext-transform:none;\n\t\t\twidth:auto;\n\t\t\tvisibility:visible;\n\t\t\toverflow:visible;\n\t\t\tmargin:0;\n\t\t\tpadding:0;\n\t\t\tline-height:1;\n\t\t\tbox-sizing:border-box;\n\t\t\t-webkit-box-sizing:border-box;\n\t\t\t-moz-box-sizing:border-box;\n\t\t\t-webkit-box-shadow:none;\n\t\t\t-moz-box-shadow:none;\n\t\t\t-ms-box-shadow:none;\n\t\t\t-o-box-shadow:none;\n\t\t\tbox-shadow:none;\n\t\t\t-webkit-appearance:none;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' {\n\t\t\tbackground: transparent;\n\t\t\t-webkit-font-smoothing: antialiased;\n\t\t\tline-height: 1;\n\t\t\twidth: 300px;\n\t\t\tposition: fixed;\n\t\t\tright: 20px;\n\t\t\tbottom: 0;\n\t\t\tz-index: ' . ( 'customizer' == $this->env ? 1 : 734626274 ) . ';\n\t\t\tmin-height: 20px;\n\t\t\theight: auto;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' strong {\n\t\t\tfont-weight: bold;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' em {\n\t\t\tfont-style: italic;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' u {\n\t\t\ttext-decoration: underline;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' .om-clearfix {\n\t\t\tclear: both;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' .om-clearfix:after {\n\t\t\tclear: both;\n\t\t\tcontent: \".\";\n\t\t\tdisplay: block;\n\t\t\theight: 0;\n\t\t\tline-height: 0;\n\t\t\toverflow: auto;\n\t\t\tvisibility: hidden;\n\t\t\tzoom: 1;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin {\n\t\t\tbackground: #000;\n\t\t\tdisplay: none;\n\t\t\tposition: relative;\n\t\t\tmin-height: 20px;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' .om-slide-open-holder,\n\t\thtml div#om-' . $this->hash . ' .om-slide-close-holder {\n\t\t\tcolor: #fff;\n\t\t\tdisplay: block;\n\t\t\tfont-family: Arial, sans-serif;\n\t\t\tposition relative;\n\t\t\tpadding: 10px;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' .om-slide-close-holder {\n\t\t\tpadding: 10px 0 0;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' .om-slide-open-holder span,\n\t\thtml div#om-' . $this->hash . ' .om-slide-close-holder span {\n\t\t\tcolor: #fff;\n\t\t\tdisplay: inline;\n\t\t\tfloat: right;\n\t\t\tfont-size: 21px;\n\t\t\tline-height: 14px;\n\t\t\tfont-weight: 100;\n\t\t\ttext-decoration: none !important;\n\t\t\tfont-family: Arial, sans-serif !important;\n\t\t\tmargin: 0 0 0 10px;\n\t\t\tvertical-align: middle;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' .om-slide-close-holder span {\n\t\t\tfont-size: 16px;\n\t\t\tfont-weight: bold;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-title-closed,\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-title-open,\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-tagline {\n\t\t\tdisplay: block;\n\t\t\tfont-size: 14px;\n\t\t\tcolor: #fff;\n\t\t\twidth: 100%;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-title-closed span,\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-title-closed strong,\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-title-closed em,\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-title-closed u,\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-title-open span,\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-title-open strong,\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-title-open em,\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-title-open u,\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-tagline span,\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-tagline strong,\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-tagline em,\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-tagline u {\n\t\t\tfont-family: inherit;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-tagline {\n\t\t\tline-height: 1.2;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' .om-slide-open .om-slide-open-holder,\n\t\thtml div#om-' . $this->hash . ' .om-slide-closed #om-slide-' . $this->theme . '-header,\n\t\thtml div#om-' . $this->hash . ' .om-slide-closed #om-slide-' . $this->theme . '-content,\n\t\thtml div#om-' . $this->hash . ' .om-slide-closed #om-slide-' . $this->theme . '-footer {\n\t\t\tdisplay: none;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-header,\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-content,\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-footer {\n\t\t\tpadding: 0 10px 10px;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' input,\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-name,\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-email {\n\t\t\tbackground-color: #fff;\n\t\t\tdisplay: block;\n\t\t\tborder: 1px solid #fff;\n\t\t\tfont-size: 14px;\n\t\t\tline-height: 24px;\n\t\t\tpadding: 4px 6px;\n\t\t\toverflow: hidden;\n\t\t\toutline: none;\n\t\t\tmargin: 0 0 10px;\n\t\t\tvertical-align: middle;\n\t\t\twidth: 280px;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' input[type=submit],\n\t\thtml div#om-' . $this->hash . ' button,\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-submit {\n\t\t\tbackground: #ff370f;\n\t\t\tborder: 1px solid #ff370f;\n\t\t\twidth: 280px;\n\t\t\tcolor: #fff;\n\t\t\tfont-size: 14px;\n\t\t\tpadding: 4px 6px;\n\t\t\tline-height: 24px;\n\t\t\theight: ' . ( isset( $this->meta['email']['provider'] ) && 'custom' == $this->meta['email']['provider'] ? '34px' : '24px' ) . ';\n\t\t\ttext-align: center;\n\t\t\tvertical-align: middle;\n\t\t\tcursor: pointer;\n\t\t\tmargin: 0;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' input[type=checkbox],\n\t\thtml div#om-' . $this->hash . ' input[type=radio] {\n\t\t -webkit-appearance: checkbox;\n\t\t width: auto;\n\t\t outline: invert none medium;\n\t\t padding: 0;\n\t\t margin: 0;\n\t\t}\n\t\t';\n\n\t\t// Minify CSS a bit.\n\t\t$theme .= str_replace( array( \"\\n\", \"\\t\", \"\\r\" ), '', $css );\n\n\t\t// If there is any custom CSS, append it now.\n\t\tif ( ! empty( $this->meta['custom_css'] ) )\n\t\t $theme .= str_replace( array( \"\\n\", \"\\t\", \"\\r\" ), '', $this->meta['custom_css'] );\n\n // Close out the styles.\n $theme .= '</style>';\n\n\t\t// Build out the HTML structure for the optin.\n\t\t$bg = $this->get_field( 'background', 'header' );\n\t\t$theme .= '<div id=\"om-slide-' . $this->theme . '-optin\" class=\"om-slide-' . $this->theme . ' om-clearfix om-slide-closed\">';\n\t\t\t$theme .= '<div id=\"om-slide-' . $this->theme . '-optin-wrap\" class=\"om-clearfix\">';\n\t\t\t\t$theme .= '<a href=\"#\" class=\"om-slide-open-holder\" title=\"Open\" style=\"' . ( ! empty( $bg ) ? 'background-color: ' . $bg : '' ) . '\">';\n\n\t\t\t\t$title = $this->get_field( 'title_closed' );\n\t\t\t $style = '';\n\t\t\t if ( ! empty( $title['color'] ) )\n\t\t\t $style .= 'color:' . $title['color'] . ';';\n\t\t\t if ( ! empty( $title['font'] ) )\n\t\t\t $style .= 'font-family:\\'' . $title['font'] . '\\', sans-serif;';\n\t\t\t if ( ! empty( $title['size'] ) )\n\t\t\t $style .= 'font-size:' . $title['size'] . 'px;';\n\t\t\t if ( ! empty( $title['meta'] ) )\n\t\t\t foreach ( (array) $title['meta'] as $prop => $val )\n\t\t\t $style .= str_replace( '_', '-', $prop ) . ':' . $val . ';';\n\t\t\t\t$theme .= '<h1 id=\"om-slide-' . $this->theme . '-optin-title-closed\" style=\"' . ( ! empty( $style ) ? $style : '' ) . '\">' . ( ! empty( $title['text'] ) ? $title['text'] : '' ) . '<span class=\"om-slide-open-content\">&#43;</span></h1>';\n\t\t\t\t$theme .= '</a>';\n\n\t\t\t\t// Header area.\n\t\t\t\t$theme .= '<div id=\"om-slide-' . $this->theme . '-header\" class=\"om-clearfix\" style=\"' . ( ! empty( $bg ) ? 'background-color: ' . $bg : '' ) . '\">';\n\t\t\t\t\t$theme .= '<a href=\"#\" class=\"om-slide-close-holder\" title=\"Close\">';\n\t\t\t\t $title = $this->get_field( 'title_open' );\n\t\t\t\t $style = '';\n\t\t\t\t if ( ! empty( $title['color'] ) )\n\t\t\t\t $style .= 'color:' . $title['color'] . ';';\n\t\t\t\t if ( ! empty( $title['font'] ) )\n\t\t\t\t $style .= 'font-family:\\'' . $title['font'] . '\\', sans-serif;';\n\t\t\t\t if ( ! empty( $title['size'] ) )\n\t\t\t\t $style .= 'font-size:' . $title['size'] . 'px;';\n\t\t\t\t if ( ! empty( $title['meta'] ) )\n\t\t\t\t foreach ( (array) $title['meta'] as $prop => $val )\n\t\t\t\t $style .= str_replace( '_', '-', $prop ) . ':' . $val . ';';\n\t\t\t\t\t$theme .= '<h2 id=\"om-slide-' . $this->theme . '-optin-title-open\" style=\"' . ( ! empty( $style ) ? $style : '' ) . '\">' . ( ! empty( $title['text'] ) ? $title['text'] : '' ) . '<span class=\"om-slide-close-content\">&#120;</span></h2>';\n\t\t\t\t\t$theme .= '</a>';\n\t\t\t\t$theme .= '</div>';\n\n\t\t\t\t// Content area.\n\t\t\t\t$content_bg = $this->get_field( 'background', 'content' );\n\t\t\t\t$theme .= '<div id=\"om-slide-' . $this->theme . '-content\" class=\"om-clearfix\" style=\"' . ( ! empty( $content_bg ) ? 'background-color: ' . $content_bg . ';' : '' ) . ( ! empty( $bg ) && ! empty( $content_bg ) && ($bg !== $content_bg) ? 'padding-top:10px;' : '' ) . '\">';\n\t\t\t\t\t$theme .= '<div id=\"om-slide-' . $this->theme . '-content-clear\">';\n\t\t\t\t\t\t $tagline = $this->get_field( 'tagline' );\n \t\t\t\t $style = '';\n \t\t\t\t if ( ! empty( $tagline['color'] ) )\n \t\t\t\t $style .= 'color:' . $tagline['color'] . ';';\n \t\t\t\t if ( ! empty( $tagline['font'] ) )\n \t\t\t\t $style .= 'font-family:\\'' . $tagline['font'] . '\\', sans-serif;';\n \t\t\t\t if ( ! empty( $tagline['size'] ) )\n \t\t\t\t $style .= 'font-size:' . $tagline['size'] . 'px;';\n \t\t\t\t if ( ! empty( $tagline['meta'] ) )\n \t\t\t\t foreach ( (array) $tagline['meta'] as $prop => $val )\n \t\t\t\t $style .= str_replace( '_', '-', $prop ) . ':' . $val . ';';\n\t\t\t\t\t\t\t$theme .= '<h2 id=\"om-slide-' . $this->theme . '-optin-tagline\" style=\"' . ( ! empty( $style ) ? $style : '' ) . '\">' . ( ! empty( $tagline['text'] ) ? $tagline['text'] : '' ) . '</h2>';\n\t\t\t\t\t$theme .= '</div>';\n\t\t\t\t$theme .= '</div>';\n\n\t\t\t\t// slide area.\n $class = $this->get_field( 'name', 'show' ) ? ' om-has-name-email' : ' om-has-email';\n\t\t\t\t$theme .= '<div id=\"om-slide-' . $this->theme . '-footer\" class=\"om-clearfix' . $class . '\" style=\"' . ( ! empty( $content_bg ) ? 'background-color: ' . $content_bg : '' ) . '\">';\n\t\t\t\t if ( isset( $this->meta['email']['provider'] ) && 'custom' == $this->meta['email']['provider'] ) :\n $theme .= html_entity_decode( $this->meta['custom_html'] );\n\t\t\t\t else :\n $disabled = 'customizer' == $this->env ? ' disabled=\"disabled\"' : '';\n $show_name = $this->get_field( 'name', 'show' );\n if ( $show_name ) {\n \t\t\t\t\t $name = $this->get_field( 'name' );\n \t\t\t\t $style = '';\n \t\t\t\t if ( ! empty( $name['color'] ) )\n \t\t\t\t $style .= 'color:' . $name['color'] . ';';\n \t\t\t\t if ( ! empty( $name['font'] ) )\n \t\t\t\t $style .= 'font-family:\\'' . $name['font'] . '\\', sans-serif;';\n \t\t\t\t if ( ! empty( $name['size'] ) )\n \t\t\t\t $style .= 'font-size:' . $name['size'] . 'px;';\n \t\t\t\t if ( ! empty( $name['meta'] ) )\n \t\t\t\t foreach ( (array) $name['meta'] as $prop => $val )\n \t\t\t\t $style .= str_replace( '_', '-', $prop ) . ':' . $val . ';';\n \t\t\t\t\t $theme .= '<input' . $disabled . ' id=\"om-slide-' . $this->theme . '-optin-name\" type=\"text\" value=\"\" placeholder=\"' . ( ! empty( $name['placeholder'] ) ? $name['placeholder'] : '' ) . '\" style=\"' . ( ! empty( $style ) ? $style : '' ) . '\" />';\n \t\t\t\t\t}\n\n \t\t\t\t $email = $this->get_field( 'email' );\n \t\t\t\t $style = '';\n \t\t\t\t if ( ! empty( $email['color'] ) )\n \t\t\t\t $style .= 'color:' . $email['color'] . ';';\n \t\t\t\t if ( ! empty( $email['font'] ) )\n \t\t\t\t $style .= 'font-family:\\'' . $email['font'] . '\\', sans-serif;';\n \t\t\t\t if ( ! empty( $email['size'] ) )\n \t\t\t\t $style .= 'font-size:' . $email['size'] . 'px;';\n \t\t\t\t if ( ! empty( $email['meta'] ) )\n \t\t\t\t foreach ( (array) $email['meta'] as $prop => $val )\n \t\t\t\t $style .= str_replace( '_', '-', $prop ) . ':' . $val . ';';\n \t\t\t\t\t$theme .= '<input' . $disabled . ' id=\"om-slide-' . $this->theme . '-optin-email\" type=\"email\" value=\"\" placeholder=\"' . ( ! empty( $email['placeholder'] ) ? $email['placeholder'] : '' ) . '\" style=\"' . ( ! empty( $style ) ? $style : '' ) . '\" />';\n\n $submit = $this->get_field( 'submit' );\n \t\t\t\t $style = '';\n \t\t\t\t if ( ! empty( $submit['field_color'] ) )\n \t\t\t\t $style .= 'color:' . $submit['field_color'] . ';';\n \t\t\t\t if ( ! empty( $submit['bg_color'] ) )\n \t\t\t\t $style .= 'background-color:' . $submit['bg_color'] . ';border-color:' . $submit['bg_color'] . ';';\n \t\t\t\t if ( ! empty( $submit['font'] ) )\n \t\t\t\t $style .= 'font-family:\\'' . $submit['font'] . '\\', sans-serif;';\n \t\t\t\t if ( ! empty( $submit['size'] ) )\n \t\t\t\t $style .= 'font-size:' . $submit['size'] . 'px;';\n \t\t\t\t if ( ! empty( $submit['meta'] ) )\n \t\t\t\t foreach ( (array) $submit['meta'] as $prop => $val )\n \t\t\t\t $style .= str_replace( '_', '-', $prop ) . ':' . $val . ';';\n \t\t\t\t\t$theme .= '<input' . $disabled . ' id=\"om-slide-' . $this->theme . '-optin-submit\" type=\"submit\" value=\"' . ( ! empty( $submit['placeholder'] ) ? $submit['placeholder'] : '' ) . '\" style=\"' . ( ! empty( $style ) ? $style : '' ) . '\" />';\n \t\t\t\tendif;\n\t\t\t\t$theme .= '</div>';\n\t\t\t$theme .= '</div>';\n\t\t$theme .= '</div>';\n\n\t\t// Build out any necessary JS elements.\n\t\t$theme .= '<script type=\"text/javascript\">';\n\t\t\t$theme .= 'function om_js_' . str_replace( '-', '_', $this->hash ) . '(){';\n\t\t\t\t$theme .= 'this.init = function($){this.resize_element($, \"div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin\");},';\n\t\t\t\t$theme .= 'this.resize_element = function($, el){';\n\t\t\t\t\tif ( 'customizer' == $this->env ) :\n\t\t\t\t\t\t$theme .= '$(\"#om-slide-' . $this->theme . '-optin-name, #om-slide-' . $this->theme . '-optin-email\").resize(function(){$(\"#om-slide-' . $this->theme . '-optin-submit\").css({ \"height\": $(this).outerHeight() + \"px\", \"line-height\": ($(this).outerHeight()-10) + \"px\" });});';\n\t\t\t\t\t\t$theme .= '$(\"#om-slide-' . $this->theme . '-optin-title-open\").resize(function(){$(\"#om-slide-' . $this->theme . '-optin .om-slide-close-holder span\").css({ \"line-height\": $(\"#om-slide-' . $this->theme . '-optin-title-open\").outerHeight() + \"px\" });});';\n\t\t\t\t\t\t$theme .= '$(\"#om-slide-' . $this->theme . '-optin-title-closed\").resize(function(){$(\"#om-slide-' . $this->theme . '-optin .om-slide-open-holder span\").css({ \"line-height\": $(\"#om-slide-' . $this->theme . '-optin-title-closed\").outerHeight() + \"px\" });});';\n\t\t\t\t\t\t$theme .= '$(\"div#om-' . $this->hash . ' input[data-om-render=label]\").each(function(){var new_el = $(this).changeElementType(\\'label\\');});';\n\t\t\t\t\t\t$theme .= '$(\"div#om-' . $this->hash . ' label[data-om-render=label]\").each(function(){var new_el = $(this).text($(this).attr(\\'value\\')).removeAttr(\\'type\\');});';\n\t\t\t\t\t\t$theme .= '$(\"div#om-' . $this->hash . '\").find(\"input\").each(function(){$(this).attr(\"disabled\", \"disabled\");});';\n\t\t\t\t\t\t$theme .= '$(\"div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin\").fadeIn(300);';\n\t\t\t\t\t\t$theme .= '$(\"div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin .om-slide-open-holder\").on(\"click\", function(e){e.preventDefault();$(\"div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin\").removeClass(\"om-slide-closed\").addClass(\"om-slide-open\");});';\n\t\t\t\t\t\t$theme .= '$(\"div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin .om-slide-close-holder\").on(\"click\", function(e){e.preventDefault();$(\"div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin\").removeClass(\"om-slide-open\").addClass(\"om-slide-closed\");});';\n\t\t\t\t\telse :\n\t\t\t\t\t\t$theme .= '$(\"#om-slide-' . $this->theme . '-optin .om-slide-open-holder span\").css({ \"line-height\": $(\"#om-slide-' . $this->theme . '-optin-title-closed\").outerHeight() + \"px\" });';\n\t\t\t \tendif;\n\t\t\t\t$theme .= '}';\n\t\t\t$theme .= '}';\n\t\t$theme .= '</script>';\n\n\t\t// Return the theme output and design.\n\t\treturn $theme;\n\n\t}", "function buildForm()\n {\n $this->buildTabs();\n // tab caption\n $this->addElement('header', null, 'Specify file role for specific files');\n\n $fe =& PEAR_PackageFileManager_Frontend::singleton();\n $sess =& $fe->container();\n\n $selection = $this->getSubmitValue('files');\n $selection_count = count($selection);\n $fe->log('debug',\n str_pad($this->getAttribute('id') .'('. __LINE__ .')', 20, '.') .\n ' selection='. serialize($selection)\n );\n\n list($page, $action) = $this->controller->getActionName();\n\n // selection list (false) or edit dialog frame (true)\n if ($action == 'edit' && $selection_count > 0) {\n $editDialog = true;\n }elseif ($action == 'save') {\n $editDialog = true;\n } else {\n $editDialog = false;\n }\n\n if (!$editDialog) {\n\n foreach ($sess['defaults']['_files']['mapping'] as $fn) {\n $pinfo = pathinfo($fn);\n $ext[] = $pinfo['extension'];\n }\n $extensions = array_unique($ext);\n $extensions[] = '-None-';\n sort($extensions, SORT_ASC);\n $extensions = array_combine($extensions, $extensions);\n\n // Role options list: (value => text, with value === text)\n $pageName = $fe->getPageName('page1');\n $releaseType = $fe->exportValue($pageName, 'packageType');\n $roles = PEAR_Installer_Role::getValidRoles($releaseType);\n $roles[] = '-None-';\n sort($roles, SORT_ASC);\n $roles = array_combine($roles, $roles);\n\n $filters = array();\n $filters[] = &HTML_QuickForm::createElement('select', 'extensionFilter', 'Extension', $extensions);\n $filters[] = &HTML_QuickForm::createElement('select', 'roleFilter', 'Role', $roles);\n $filters[] = &HTML_QuickForm::createElement('submit', $this->getButtonName('sort'), 'Apply');\n $this->addGroup($filters, 'filters', 'Filters applied on list :', '', false);\n\n $hdr = array('Path', 'Role');\n $table = new HTML_Table(array('class' => 'tableone'));\n $htmltableDecorator = new PEAR_PackageFileManager_Frontend_Decorator_HTMLTable($fe);\n $htmltableDecorator->setHtmlTable($table);\n $htmltableDecorator->getExceptionList($hdr);\n // We need a simple static html area for maintainers list.\n $this->addElement('static', 'exceptions', '', $htmltableDecorator->toHtml());\n\n $def = array('extensionFilter' => '-None-', 'roleFilter' => '-None-');\n $this->setDefaults($def);\n\n $commands = array('edit', 'remove');\n $nocmd = array('commit', 'reset');\n\n } else {\n\n // we need a multiple-select box for list of file targets\n $rPath =& $this->addElement('select', 'exceptfiles');\n $rPath->setMultiple(true);\n $rPath->setLabel('Path:');\n $rPath->freeze();\n\n // Role options list: (value => text, with value === text)\n $pageName = $fe->getPageName('page1');\n $releaseType = $fe->exportValue($pageName, 'packageType');\n $roles = PEAR_Installer_Role::getValidRoles($releaseType);\n $roles[] = '';\n sort($roles, SORT_ASC);\n $roles = array_combine($roles, $roles);\n $this->addElement('select', 'role', 'Role:', $roles);\n\n if ($selection_count == 0) {\n $key1 = -1;\n $def = array();\n } else {\n $keys = $needle = array_keys($selection);\n $key1 = array_shift($needle);\n\n $files = array();\n foreach($keys as $k) {\n $files[$k] = $sess['files']['mapping'][$k];\n }\n $rPath->load($files, $keys);\n $def = array('exceptfiles' => $keys);\n }\n\n // applies new filters to the element values\n $this->applyFilter('__ALL__', 'trim');\n\n // old values of edit user\n $this->setDefaults($def);\n\n $commands = array('save', 'cancel');\n $nocmd = array('commit','reset');\n }\n\n // Buttons of the wizard to do the job\n $this->buildButtons($nocmd, $commands);\n }", "function renderForm()\t{\n\n\t\t$fields[] = $this->renderField( $GLOBALS['LANG']->getLL('settings'), 'divider', '');\n\t\t$fields[] = $this->renderField( $GLOBALS['LANG']->getLL('spaceTitle'), 'text', 'title');\n\t\n\t\tif(count($this->error) > 0) {\n\t\t\t$form .= \"<span style='display:block;color:red;font-weight:bold;padding:10px;'>\" .\n\t\t\t\t\t\t\t implode(\"<br />\", $this->error) . \n\t\t\t\t\t \"</span>\";\t\n\t\t}\n\n\t\t$form .= \"<form action=\" . t3lib_div::getThisUrl() . \"><table border='0' cellpadding='7'>\";\n\t\t$form .= implode(\"\\n\", $fields);\n\t\t$form .= \"<tr><td colspan='2' align='right'>\" .\n\t\t\t\t \"<input type='hidden' name='formPosted' value='1'>\" . \n\t\t\t\t \"<input type='submit' value='\" . $GLOBALS['LANG']->getLL('createSpace') . \"'></td></tr></table></form>\";\n\n\t\treturn $form;\n\t}", "public function BuildContent( ){\n\t\tif(!isset($_SESSION['steamid'])) {\n\t\t\t$this->NotAuthed();\n\t\t}else{\n\t\t\tinclude ('php/steamauth/userInfo.php');\n\t\t\tif (!isset($_POST[\"submit\"])){\n\t\t\t\t$this->Authed($steamprofile);\n\t\t\t}else{\n\t\t\t\t$this->TackleForm($steamprofile);\n\t\t\t}\n\t\t}\n\t}", "public function showForm($iniValues = NULL) {\n\t\t$form [] = '<form action=\"\" class=\"editor\" method=\"post\">';\n\t\t$form [] = \"<div class='box-inside-form'>\";\n\t\t$form [] = '<label for=\"title\">Titel</label>';\n\t\t$form [] = '<input type=\"text\" id=\"title\" name=\"title\" value=\"' . $iniValues ['title'] . '\">';\n\t\t$form [] = '<label for=\"category\">Kategorie</label>';\n\t\t$k = parent::distinct ( \"category\" );\n\t\t$category = '<input list=\"category\" name=\"category\" value=\"' . $iniValues ['category'] . '\">';\n\t\t$category .= '<datalist id=\"category\">';\n\t\twhile ( $k ) {\n\t\t\t$category .= '<option value=\"' . array_shift ( $k ) . '\">';\n\t\t}\n\t\t$form [] = $category . '</datalist>';\n\t\tif ($chapter) {\n\t\t\t$form [] = '<label for=\"chapter\">Kapitel</label>';\n\t\t\tif (empty ( $iniValues ['chapter'] )) {\n\t\t\t\t$chap = 0;\n\t\t\t} else {\n\t\t\t\t$chap = $iniValues ['chapter'];\n\t\t\t}\n\t\t\t$form [] = '<input type=\"number\" id=\"chapter\" name=\"chapter\" size=\"3\" value=\"' . $chap . '\" min=\"0\">';\n\t\t}\n\t\t$form [] = '<label for=\"keywords\">Schlagworte</label> <input type=\"text\"\n\t\t\t\t\t\t\t\tid=\"keywords\" name=\"keywords\" value=\"' . $iniValues ['keywords'] . '\">';\n\t\t$form [] = '<label for=\"status\">Status</label>';\n\t\t$form [] = '<select id=\"status\"\tname=\"status\">\n\t\t\t\t\t\t<option value=\"public\">sichtbar</option>\n\t\t\t\t\t\t<option value=\"draft\">Entwurf</option>\n\t\t\t\t\t\t<option value=\"archive\">Archiv</option>\n\t\t\t\t\t</select>';\n\t\t$form [] = \"</div><div style='clear:both'></div>\";\n\t\t$form [] = '<textarea id=\"editor\" name=\"text\">' . $iniValues ['text'] . '</textarea>';\n\t\tif ($iniValues) {\n\t\t\t$form [] = Registry::makeUpdateButton ();\n\t\t\t$form [] = Registry::makeDeleteButton ();\n\t\t\t$form [] = '<input type=\"hidden\" id=\"id\" name=\"id\" value=\"' . $iniValues ['id'] . '\">';\n\t\t\t$form [] = '<input type=\"hidden\" id=\"page\" name=\"page\" value=\"' . $iniValues ['page'] . '\">';\n\t\t} else {\n\t\t\t$form [] = Registry::makeInsertButton ();\n\t\t}\n\t\t$form [] = '</form>';\n\t\t\n\t\techo implode ( \"\\n\", $form );\n\t}", "public function form()\n {\n $this->switch('footer_remove', Support::trans('main.footer_remove'))\n ->default(admin_setting('footer_remove'));\n $defaultColors = [\n 'default' => '墨蓝',\n 'blue' => '蓝',\n 'blue-light' => '亮蓝',\n 'green' => '墨绿',\n ];\n foreach (explode(\",\", ServiceProvider::setting('additional_theme_colors')) as $value) {\n if (!empty($value)) {\n [$k, $v] = explode(\":\", $value);\n $defaultColors[$k] = $v;\n }\n }\n\n $this->radio('theme_color', Support::trans('main.theme_color'))\n ->options($defaultColors)\n ->default(admin_setting('theme_color'));\n $this->radio('sidebar_style', Support::trans('main.sidebar_style'))\n ->options([\n 'default' => '默认',\n 'sidebar-separate' => '菜单分离',\n 'horizontal_menu' => '水平菜单'\n ])\n ->default(admin_setting('sidebar_style'));\n $this->switch('grid_row_actions_right', Support::trans('main.grid_row_actions_right'))\n ->help('启用后表格行操作按钮将永远贴着最右侧。')\n ->default(admin_setting('grid_row_actions_right'));\n }", "function fn_adt_css_write($form_url)\n{\n global $wp_filesystem;\n\n check_admin_referer('adt_css_save_nonce');\n\n $csstext = esc_textarea($_POST['txt_adt_css']); //sanitize the input\n $form_fields = array('txt_adt_css'); //fields that should be preserved across screens\n $method = ''; //leave this empty to perform test for 'direct' writing\n\n $context = ADT_PLUGIN_DIR_PATH.'assets/css/'; //target folder\n\n $form_url = wp_nonce_url($form_url, 'adt_css_save_nonce'); //page url with nonce value\n\n if(!fn_adt_filesystem_init($form_url, $method, $context, $form_fields)) {\n return false; //stop further processign when request form is displaying\n }\n\n /*\n * now $wp_filesystem could be used\n * get correct target file first\n **/\n $target_dir = $wp_filesystem->find_folder($context);\n $target_file = trailingslashit($target_dir).'adt_custom_css.css';\n\n\n /* write into file */\n if(!$wp_filesystem->put_contents($target_file, $csstext, FS_CHMOD_FILE))\n\t{\n\t\treturn new WP_Error('writing_error', 'Error when writing file'); //return error object\n\t}\n\telse\n\t{\n\t\t//update css version\n\t\t$css_version=1;\n\t\t$adt_css_version=get_option('adt_css_version');\n\t\tif($adt_css_version==FALSE)\n\t\t{\n\n\t\t\t$deprecated = null;\n\t\t $autoload = 'no';\n\t\t add_option( 'adt_css_version', $css_version, $deprecated, $autoload );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$css_version=$adt_css_version+1;\n\t\t\tupdate_option( 'adt_css_version', $css_version );\n\t\t}\n\t}\n return $csstext;\n}", "public static function easyFormStart()\n {\n echo '<!-- EasyCreator START -->'.NL;\n\n echo '<div id=\"ecr_box\">'.NL;\n\n echo '<form action=\"index.php?option=com_easycreator\" method=\"post\" '\n .'name=\"adminForm\" id=\"adminForm\">'.NL;\n }", "function block_skinChooser(){\n //Show first part\n echo '<form action=\"php/profile/form_skinChooser.php\" method=\"post\" id=\"columnBack\">';\n echo '<h1 class=\"title is-4\">- Custom skin chooser -</h1>';\n showSuccess(2);\n\n block_skinChooser_body();\n \n //Show last part\n echo <<<EOF\n <br>\n <br>\n <input type=\"submit\" value=\"Save all modifications\" class=\"button is-light\"/>\n </form>\nEOF;\n}", "public function definition() {\n\n \t$sphereLib = new setask_sphere();\n \t$compilers = $sphereLib->sphereGetCompilers(); //to be improved (maybe... - probably no need to rewrite here)\n # \tvar_dump($compilers);\n $mform = $this->_form;\n\n list($setask, $data) = $this->_customdata;\n $mform->addElement('select', 'compiler', 'Compilers: ',$compilers\t);\n\t\t\n $setask->add_submission_form_elements($mform, $data);\n\n $this->add_action_buttons(true, get_string('savechanges', 'setask'));\n if ($data) {\n\t\t\t//ugly (but working) way of extracting data from text editor\n \tforeach($data as $tes){\n \t\t$ii =0;\n \t\n \t\tforeach($tes as $tes2)\n \t\t{\n \t\t\tif($ii == 0)\n \t\t\t\t$textToSend = $tes2;//text from online editor - ugly way but it works...\n \t\t\t#\tvar_dump($textToSend);\n \t\t\t\t$ii++;\n \t\t}\n \t\n \t}\n \t\n \t//extracting selected compiler \n \t$selectedItem =& $mform->getElement('compiler')->getSelected();\n #\tvar_dump($selectedItem);\n $this->set_data($data);\n }\n \n }", "public function form_css(){\n\t\twp_register_style( 'lead_gen_plugin', plugin_dir_url( __FILE__ ) . 'css/style.css', false );\n\t\twp_enqueue_style( 'lead_gen_plugin' );\n\t}", "function form_content()\r\n {\r\n $table = html_table($this->_width,0,4) ;\r\n $table->set_style(\"border: 0px solid\") ;\r\n\r\n $table->add_row($this->element_label($this->getUploadFileLabel()),\r\n $this->element_form($this->getUploadFileLabel())) ;\r\n\r\n $td = html_td(null, null, $this->element_form('Override Z0 Record Validation')) ;\r\n $td->set_tag_attribute('colspan', 2) ;\r\n $table->add_row($td) ;\r\n\r\n $this->add_form_block(null, $table) ;\r\n }", "static function get_site_settings_editor()\n {\n global $dbhost, $dbuser, $dbpass, $dbname, $title, $googleTrackingID,\n $copyright;\n \n $result = '\n<p>Complete the following form to edit the site settings.</p>\n <form action=\"javascript:submit();\"><fieldset>\n <h3>MySQL Database Information</h3>\n <ol>\n <li>\n <label for=\"host\">Database Host</label>\n <input type=\"text\" name=\"host\" id=\"host\" value=\"'.$dbhost.'\"\n placeholder=\"e.g., localhost\" required />\n </li>\n <li>\n <label for=\"db\">Database Name</label>\n <input type=\"text\" name=\"db\" id=\"db\" value=\"'.$dbname.'\"\n placeholder=\"e.g., my_remote_lab\" required />\n </li>\n <li>\n <label for=\"dbuser\">Database Username</label>\n <input type=\"text\" name=\"dbuser\" id=\"dbuser\" value=\"'.$dbuser.'\"\n placeholder=\"username\" required />\n </li>\n <li>\n <label for=\"password\">Database Password</label>\n <input type=\"password\" name=\"password\" id=\"password\" value=\"'.\n api::$passwordHolder.'\"\n placeholder=\"Password\" required />\n <label for=\"password-confirm\">Confirm Database Password</label>\n <input type=\"password\" name=\"password-confirm\" \n id=\"password-confirm\" value=\"'.api::$passwordHolder.\n '\" placeholder=\"Confirm Password\" required />\n </li>\n </ol>\n </fieldset>\n <fieldset>\n <br />\n <h3>Site Information</h3>\n <ol>\n <li>\n <label for=\"site-name\">Site Name</label>\n <input type=\"text\" name=\"site-name\" id=\"site-name\" \n value=\"'.$title.'\" placeholder=\"e.g., My Awesome Title\"\n required />\n </li>\n <li>\n <label for=\"google\">Google Analytics (optional)</label>\n <input type=\"text\" name=\"google\" id=\"google\" value=\"'.\n $googleTrackingID.'\" placeholder=\"(optional)\" />\n </li>\n <li><label for=\"copyright\">Copyright Message</label>\n <input type=\"text\" name=\"copyright\" id=\"copyright\" value=\"'.\n substr($copyright, 6).'\" \n placeholder=\"e.g., 2012 My Robot College\" required />\n </li>\n </ol>\n </fieldset>\n <input type=\"submit\" value=\"Submit\" />\n</form>';\n \n return $result;\n }", "function createForm(){\n\t\t$this->createFormBase();\n\t\t$this->addElement('reset','reset','Reset');\t\t\t\n\t\t$tab['seeker_0'] = '0';\n\t\t$this->setDefaults($tab);\n\t\t$this->addElement('submit','bouton_add_pi','Add a contact',array('onclick' => \"document.getElementById('frmvadataset').action += '#a_contact'\"));\n\t\t$this->createVaFormResolution();\n\t\t$this->createFormGeoCoverage();\n\t\t$this->createFormGrid();\t\n\t\t//Required format\n\t\t$dformat = new data_format;\n\t\t$dformat_select = $dformat->chargeFormDestFormat($this,'required_data_format','Required data format','NetCDF');\n\t\t$this->addElement($dformat_select);\n\t\t$this->getElement('organism_0')->setLabel(\"Organism short name\");\n\t\t$this->getElement('project_0')->setLabel(\"Useful in the framework of\");\n\t\t$this->getElement('dats_abstract')->setLabel(\"Abstract \");\n\t\t$this->getElement('dats_purpose')->setLabel(\"Purpose\");\n\t\t$this->getElement('database')->setLabel(\"Data center\");\n\t\t$this->getElement('new_db_url')->setLabel(\"Data center url\");\n\t\t$this->getElement('dats_use_constraints')->setLabel(\"Access and use constraints\");\t\t\t\n\t\t$this->getElement('sensor_resol_tmp')->setLabel('Temporal (hh:mm:ss)');\t\t\t\n\t\t$this->getElement('place_alt_min_0')->setLabel(\"Altitude min\");\n\t\t$this->getElement('place_alt_max_0')->setLabel(\"Altitude max\");\n\t\t$this->getElement('data_format_0')->setLabel(\"Original data format\");\n\t\t$this->addElement('file','upload_doc','Attached document');\n\t\t$this->addElement('submit','upload','Upload');\n\t\t$this->addElement('submit','delete','Delete');\n\t\t\n\t\tfor ($i = 0; $i < $this->dataset->nbVars; $i++){\n\t\t\t$this->getElement('methode_acq_'.$i)->setLabel(\"Parameter processing related information\");\n\t\t}\n\t\t$this->addElement('submit','bouton_add_variable','Add a parameter',array('onclick' => \"document.getElementById('frmvadataset').action += '#a_param'\"));\n\t\t\n\t\t$this->addElement('submit','bouton_add_projet','Add a project',array('onclick' => \"document.getElementById('frmvadataset').action += '#a_general'\"));\n\t\t$option = array();\n\t\t$option['default'] = \"\";\n\t\t$option['model'] = \"Model\";\n\t\t$option['instrument'] = \"Instrument\";\n\t\t$option['satellite'] = \"Satellite\";\n\t\t$this->addElement('select','source_type','source type :',$option,array('onchange' => \"DeactivateButtonAddSource()\",'onclick' => \"DeactivateButtonAddSource();\",'onmouseover' => 'DeactivateButtonAddSource();' ));\n\t\t$this->addElement('submit','bouton_add_source','Add a source',array('disabled' => 'true','onclick' => \"document.getElementById('frmvadataset').action += '#a_source'\",'onmouseout' => 'DeactivateButtonAddSource();'));\n\t\t\n\t\tif (isset ( $this->dataset->dats_sensors ) && ! empty ( $this->dataset->dats_sensors )) {\n\t\t\t$this->dats_sensors = array();\n\t\t\t$this->dats_sensors = $this->dataset->dats_sensors ;\n\t\t}\n\t\tif (isset ( $this->dataset->sites ) && ! empty ( $this->dataset->sites )) {\n\t\t\t$this->sites = array();\n\t\t\t$this->sites = $this->dataset->sites;\n\t\t}\n\t\t\n\t\tif ( isset ( $this->dataset->dats_id ) && $this->dataset->dats_id > 0) {\n\t\t\tif (isset ( $this->dataset->nbModFormSensor )){\n\t\t\t\tif($this->dataset->nbModForm <= $this->dataset->nbModFormSensor ){\n\t\t\t\t\t$this->dataset->nbModForm = $this->dataset->nbModFormSensor;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isset ( $this->dataset->nbSatFormSensor )){\n\t\t\t\t//$this->dataset->nbSatFormSensor = $this->dataset->nbSatFormSensor - 1;\n\t\t\t\tif($this->dataset->nbSatForm <= $this->dataset->nbSatFormSensor){\n\t\t\t\t\t$this->dataset->nbSatForm = $this->dataset->nbSatFormSensor;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isset ( $this->dataset->nbInstruFormSensor )){\n\t\t\t\tif($this->dataset->nbInstruForm <= $this->dataset->nbInstruFormSensor){\n\t\t\t\t\t$this->dataset->nbInstruForm = $this->dataset->nbInstruFormSensor;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif($this->dataset->nbModForm > 0)\n\t\t\t$this->addMod();\n\t\tif($this->dataset->nbInstruForm > 0)\n\t\t\t$this->addInstru();\t\n\t\tif($this->dataset->nbSatForm > 0)\n\t\t\t$this->addSat();\n\t\t\n\t\t$this->dataset->dats_sensors = null ;\n\t\t$this->dataset->sites = null;\n\t}", "private function weblinkContent_form() {\n\n // Textarea Settings\n if (!fusion_get_settings(\"tinymce_enabled\")) {\n $ExtendedSettings = [\n 'required' => ($this->weblinksSettings['links_extended_required'] ? TRUE : FALSE),\n 'preview' => TRUE,\n 'html' => TRUE,\n 'autosize' => TRUE,\n 'placeholder' => $this->locale['WLS_0255'],\n 'error_text' => $this->locale['WLS_0270'],\n 'form_name' => \"weblinkform\",\n \"wordcount\" => TRUE\n ];\n } else {\n $ExtendedSettings = [\n 'required' => ($this->weblinksSettings['links_extended_required'] ? TRUE : FALSE),\n 'type' => \"tinymce\",\n 'tinymce' => \"advanced\",\n 'error_text' => $this->locale['WLS_0270']];\n }\n\n // Start Form\n echo openform('weblinkform', 'post', $this->form_action);\n echo form_hidden('weblink_id', '', $this->weblink_data['weblink_id']);\n ?>\n\n <!-- Display Form -->\n <div class=\"row\">\n\n <!-- Display Left Column -->\n <div class=\"col-xs-12 col-sm-12 col-md-7 col-lg-8\">\n <?php\n\n echo form_text('weblink_name', $this->locale['WLS_0201'], $this->weblink_data['weblink_name'], [\n 'required' => TRUE,\n 'placeholder' => $this->locale['WLS_0201'],\n 'error_text' => $this->locale['WLS_0252']\n ]);\n\n echo form_text('weblink_url', $this->locale['WLS_0253'], $this->weblink_data['weblink_url'], [\n 'required' => TRUE,\n 'type' => 'url',\n 'placeholder' => 'http://'\n ]);\n\n echo form_textarea('weblink_description', $this->locale['WLS_0254'], $this->weblink_data['weblink_description'], $ExtendedSettings);\n ?>\n </div>\n\n <!-- Display Right Column -->\n <div class=\"col-xs-12 col-sm-12 col-md-5 col-lg-4\">\n <?php\n\n openside($this->locale['WLS_0260']);\n\n echo form_select_tree('weblink_cat', $this->locale['WLS_0101'], $this->weblink_data['weblink_cat'], [\n 'required' => TRUE,\n 'no_root' => TRUE,\n 'placeholder' => $this->locale['choose'],\n 'query' => (multilang_table(\"WL\") ? \"WHERE \".in_group('weblink_cat_language', LANGUAGE) : \"\")\n ], DB_WEBLINK_CATS, \"weblink_cat_name\", \"weblink_cat_id\", \"weblink_cat_parent\");\n\n echo form_select('weblink_visibility', $this->locale['WLS_0103'], $this->weblink_data['weblink_visibility'], [\n 'options' => fusion_get_groups(),\n 'placeholder' => $this->locale['choose']\n ]);\n\n if (multilang_table(\"WL\")) {\n echo form_select('weblink_language[]', $this->locale['language'], $this->weblink_data['weblink_language'], [\n 'options' => fusion_get_enabled_languages(),\n 'placeholder' => $this->locale['choose'],\n 'multiple' => TRUE,\n 'delimeter' => '.'\n ]);\n } else {\n echo form_hidden('weblink_language', '', $this->weblink_data['weblink_language']);\n }\n\n echo form_hidden('weblink_status', '', 1);\n echo form_hidden('weblink_datestamp', '', $this->weblink_data['weblink_datestamp']);\n\n if (!empty($_GET['action']) && $_GET['action'] == 'edit') {\n echo form_checkbox('update_datestamp', $this->locale['WLS_0259'], '');\n }\n\n closeside();\n\n ?>\n\n </div>\n </div>\n <?php\n self::display_weblinkButtons('formend', FALSE);\n echo closeform();\n }", "function buildContent($lang) {\n\t// stores the textbox file names to use\n\t// NOTE: the textboxes will be created and ordered in the same order of this array\n\t$file_list = array(\"narrator_box\", \"style_box\", \"script_box\", \"about_box\");\n\n\t// stores the content to be returned\n\t$res = array(\"style\" => \"\", \"script\" => \"\");\n\n\t// loop through the file list and create the textboxes HTML\n\tfor ($i = 0; $i < count($file_list); $i++) {\n\t\t// get this file's content\n\t\t$file_content = getFileContent($file_list[$i], $lang);\n\n\t\t// check if this file has no content\n\t\tif (empty($file_content)) {\n\t\t\t// it doesn't, so skip it\n\t\t\tcontinue;\n\t\t}\n\n\t\t// standardize the line breaks used in the file's content\n\t\t$file_content = preg_replace(\"/(\\n|\\r\\n)/\", \"\\r\", $file_content);\n\n\t\t// run this file's content through the CSS color coding function\n\t\t$content_parts = addStyleTags($file_content);\n\n\t\t// store the raw CSS code (without any color coding tags)\n\t\t$res[\"style\"] .= $content_parts[\"style\"];\n\n\t\t// store the new file content, now with the CSS color coding tags\n\t\t$file_content = $content_parts[\"color_coded\"];\n\n\t\t// run this file's content through the JS color coding function\n\t\t$content_parts = addScriptTags($file_content);\n\n\t\t// store the raw JS code (without any color coding tags)\n\t\t$res[\"script\"] .= $content_parts[\"script\"];\n\n\t\t// store the new file content, now with the JS color coding tags\n\t\t$file_content = $content_parts[\"color_coded\"];\n\n\t\t// store this file's content (with color coding)\n\t\t// making sure to remove any \"goto\" tags and any \"\\r\" after it (avoiding empty lines in the final result)\n\t\t$res[$file_list[$i]] = preg_replace(\"/<goto[^>]*>\\r?/i\", \"\", $file_content);\n\n\t\t// create this file's textbox HTML\n\t\t$res[$file_list[$i]] = \"<div id='\".$file_list[$i].\"' class='content flex_item' style='order:\".$i.\";'>\n\t\t\t<div class='header header_expanded'>\n\t\t\t\t<div class='header_text'>\".strtoupper($file_list[$i]).\"</div>\n\t\t\t\t<div class='header_button hb_expanded'></div>\n\t\t\t</div>\n\t\t\t<div class='text text_expanded'>\".$res[$file_list[$i]].\"</div>\n\t\t</div>\";\n\t}\n\n\t// return the processed data\n\treturn($res);\n}", "function pc_content_init_form( $font=[], $color='', $background='', $border='' ) {\n\n $css = ['', ''];\n\n\tif ( isset($font['font-family']) && $font['font-family'] ) {\n\t\t$is_custom_font = get_aifonts_from_dir( $font['font-family'], true );\n\n\t\tif ( ! is_font_loaded( $font['font-family'] ) ) :\n\t\t\tif ( !$is_custom_font ) {\n\t\t\t\t$css[0] = \"</style><style>@import url('https://fonts.googleapis.com/css?family=\" . $font['font-family'] . \"');\";\n\t\t\t} else {\n\t\t\t\t$css[0] = \"</style>{$is_custom_font}<style>\";\n\t\t\t}\n\t\tendif;\n\n\t \t$css[1] .= \"font-family:'\" . $font['font-family'] . \"';\";\n\t}\n\n\t$css[1] .= isset($font['font-weight'])&&$font['font-weight'] ? \"font-weight:\" . $font['font-weight'] . \";\" : '';\n\t$css[1] .= isset($font['font_size'])&&$font['font_size'] ? \"font-size:\" . $font['font_size'] . \"px;\" : '';\n\t$css[1] .= isset($font['line_height'])&&$font['line_height'] ? \"line-height:\" . $font['line_height'] . \"px;\" : '';\n\t$css[1] .= isset($font['font_style'])&&$font['font_style'] ? \"font-style:\" . $font['font_style'] . \";\" : '';\n\t$css[1] .= isset($font['text_align'])&&$font['text_align'] ? \"text-align:\" . $font['text_align'] . \";\" : '';\n\t$css[1] .= isset($font['letter_spacing'])&&$font['letter_spacing'] ? \"letter-spacing:\" . $font['letter_spacing'] . \"px;\" : '';\n\n\t$css[1] .= $color ? 'color:' . $color . ';' : '';\n\t$css[1] .= $background ? 'background-color:' . $background . ';' : '';\n\t$css[1] .= $border ? 'border-color:' . $border . ';' : '';\n\n\treturn $css;\n}", "function build_form($echo = true) {\n\t\n\t\t$output = '\n\t\t<form method=\"' . $this->form['method'] . '\"';\n\t\t\n\t\tif (!empty($this->form['enctype'])) $output .= ' enctype=\"' . $this->form['enctype'] . '\"';\n\t\t\n\t\tif (!empty($this->form['action'])) $output .= ' action=\"' . $this->form['action'] . '\"';\n\t\t\n\t\tif (!empty($this->form['id'])) $output .= ' id=\"' . $this->form['id'] . '\"';\n\t\t\n\t\tif (count($this->form['class']) > 0) $output .= $this->_output_classes($this->form['class']);\n\t\t\n\t\tif ($this->form['novalidate']) $output .= ' novalidate';\n\t\t\n\t\t$output .= '>';\n\t\t\n\t\tif ($this->form['add_honeypot']) \n\t\t\t$this->add_input('Leave blank to submit', array(\n\t\t\t\t'name' => 'honeypot',\n\t\t\t\t'slug' => 'honeypot',\n\t\t\t\t'id' => 'form_honeypot',\n\t\t\t\t'wrap_tag' => 'div',\n\t\t\t\t'wrap_class' => array('form_field_wrap', 'hidden'),\n\t\t\t\t'wrap_id' => '',\n\t\t\t\t'wrap_style' => 'display: none'\n\t\t\t));\n\t\t\n\t\tif ($this->form['add_nonce'] && function_exists('wp_create_nonce')) \n\t\t\t$this->add_input('WordPress nonce', array(\n\t\t\t\t'value' => wp_create_nonce($this->form['add_nonce']),\n\t\t\t\t'add_label' => false,\n\t\t\t\t'type' => 'hidden'\n\t\t\t));\n\t\t\n\t\tforeach ($this->inputs as $key => $val) :\n\t\t\t\n\t\t\t$min_max_range = $element = $end = $attr = $field = $label_html = '';\n\t\t\t\n\t\t\t// Set the field value to incoming\n\t\t\t$val['value'] = isset($_REQUEST[$val['name']]) && !empty($_REQUEST[$val['name']]) ? \n\t\t\t\t$_REQUEST[$val['name']] : \n\t\t\t\t$val['value'];\n\t\t\t\n\t\t\tswitch ($val['type']) :\n\t\t\t\t\n\t\t\t\tcase 'html':\n\t\t\t\t\t$element = '';\n\t\t\t\t\t$end = $val['label'];\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'title':\n\t\t\t\t\t$element = '';\n\t\t\t\t\t$end = '\n\t\t\t\t\t<h3>' . $val['label'] . '</h3>';\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'textarea':\n\t\t\t\t\t$element = 'textarea';\n\t\t\t\t\t$end = '>' . $val['value'] . '</textarea>';\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase 'select':\n\t\t\t\t\t$element = 'select';\n\t\t\t\t\t$end = '>' . $this->_output_options_select($val['options']) . '\n\t\t\t\t\t</select>';\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'checkbox':\n\t\t\t\t\tif (count($val['options']) > 0) :\n\t\t\t\t\t\t$element = '';\n\t\t\t\t\t\t$end = $this->_output_options_checkbox($val['options'], $val['name']);\n\t\t\t\t\t\t$label_html = '<p class=\"checkbox_header\">' . $val['label'] . '</p>';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tendif;\n\t\t\t\t\n\t\t\t\tcase 'radio':\n\t\t\t\t\tif (count($val['options']) > 0) :\n\t\t\t\t\t\t$element = '';\n\t\t\t\t\t\t$end = $this->_output_options_radios($val['options'], $val['name']);\n\t\t\t\t\t\t$label_html = '<p class=\"checkbox_header\">' . $val['label'] . '</p>';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tendif;\n\t\t\t\t\n\t\t\t\tcase 'range':\n\t\t\t\tcase 'number':\n\t\t\t\t\t$min_max_range .= !empty($val['min']) ? ' min=\"' . $val['min'] . '\"' : '';\n\t\t\t\t\t$min_max_range .= !empty($val['max']) ? ' max=\"' . $val['max'] . '\"' : '';\n\t\t\t\t\t$min_max_range .= !empty($val['step']) ? ' step=\"' . $val['step'] . '\"' : '';\n\t\t\t\t\n\t\t\t\tcase 'submit':\n\t\t\t\t\t$this->has_submit = true;\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tdefault :\n\t\t\t\t\t$element = 'input';\n\t\t\t\t\t$end .= ' type=\"' . $val['type'] . '\" value=\"' . $val['value'] . '\"';\n\t\t\t\t\t$end .= $val['checked'] ? ' selected' : '';\n\t\t\t\t\t$end .= $this->field_close();\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tendswitch;\n\t\t\t\n\t\t\t$id = !empty($val['id']) ? ' id=\"' . $val['id'] . '\"' : '';\n\t\t\t$class = count($val['class']) ? ' class=\"' . $this->_output_classes($val['class']) . '\"' : '';\n\t\t\t$attr = $val['autofocus'] ? ' autofocus' : '';\n\t\t\t$attr = $val['checked'] ? ' checked' : '';\n\t\t\t$attr = $val['required'] ? ' required' : '';\n\t\t\t\n\t\t\t// Build the label\n\t\t\tif (!empty($label_html)) :\n\t\t\t\t$field .= $label_html;\n\t\t\telseif ($val['add_label'] && $val['type'] != 'hidden' && $val['type'] != 'submit' && $val['type'] != 'title' && $val['type'] != 'html') :\n\t\t\t\t$val['label'] .= $val['required'] ? ' <strong>*</strong>' : '';\n\t\t\t\t$field .= '\n\t\t\t\t\t<label for=\"' . $val['id'] . '\">' . $val['label'] . '</label>';\n\t\t\tendif;\n\t\t\t\n\t\t\tif (!empty($element))\n\t\t\t\t$field .= '\n\t\t\t\t\t<' . $element . $id . ' name=\"' . $val['name'] . '\"' . $min_max_range . $attr . $end;\n\t\t\telse \n\t\t\t\t$field .= $end;\n\t\t\t\n\t\t\t// Parse and create wrap, if needed\n\t\t\tif ($val['type'] != 'hidden' && $val['type'] != 'html' && !empty($val['wrap_tag'])) :\n\t\t\t\n\t\t\t\t$wrap_before = '\n\t\t\t\t<' . $val['wrap_tag'];\n\t\t\t\t$wrap_before .= count($val['wrap_class']) > 0 ? $this->_output_classes($val['wrap_class']) : '';\n\t\t\t\t$wrap_before .= !empty($val['wrap_style']) ? ' style=\"' . $val['wrap_style'] . '\"' : '';\n\t\t\t\t$wrap_before .= !empty($val['wrap_id']) ? ' id=\"' . $val['wrap_id'] . '\"' : '';\n\t\t\t\t$wrap_before .= '>';\n\t\t\t\t\n\t\t\t\t$wrap_after = '\n\t\t\t\t</' . $val['wrap_tag'] . '>';\n\t\t\t\t\n\t\t\t\t$output .= $wrap_before . $field . $wrap_after;\n\t\t\telse : \n\t\t\t\t$output .= $field;\n\t\t\tendif;\n\t\t\t\n\t\tendforeach;\t\n\t\t\n\t\tif (! $this->has_submit) $output .= '\n\t\t\t\t<div class=\"form_field_wrap\">\n\t\t\t\t\t<input type=\"submit\" value=\"Submit\" name=\"submit\">\n\t\t\t\t</div>';\n\t\t\n\t\t$output .= '\n\t\t</form>';\n\t\t\n\t\tif ($echo) echo $output;\n\t\telse return $output;\n\t\t\n\t}", "function fn_adt_admin_css_content()\n{\n\t//$adt_css_file_name=ADT_PLUGIN_DIR_PATH.'assets/css/adt_custom_css.css';//ADT_PLUGIN_DIR_PATH\n\t//$adt_css_folder_path=ADT_PLUGIN_DIR_PATH.'assets/css/';//ADT_PLUGIN_DIR_PATH\n\n\t//refrence http://www.webdesignerdepot.com/2012/08/wordpress-filesystem-api-the-right-way-to-operate-with-local-files/\n\n\t$form_url = 'admin.php?page='.PLUGIN_ADMIN_PAGE_SLUG.'&tab=css';\n\t$output = $error = '';\n\n\t/**\n\t * write submitted text into file (if any)\n\t * or read the text from file - if there is no submission\n\t **/\n\tif(isset($_POST['txt_adt_css']))//new submission\n\t{\n\n\t if(false === ($output = fn_adt_css_write($form_url)))\n\t {\n\t return; //we are displaying credentials form - no need for further processing\n\n\t }\n\t elseif(is_wp_error($output))\n\t {\n\t $error = $output->get_error_message();\n\t $output = '';\n\t }\n\n\t} else {//read from file\n\n\t if(false === ($output = fn_adt_css_read($form_url))){\n\t return; //we are displaying credentials form no need for further processing\n\n\t } elseif(is_wp_error($output)) {\n\t $error = $output->get_error_message();\n\t $output = '';\n\t }\n\t}\n\n\t$output = $output; //escaping for printing\n\n\t$str_error='';\n\tif($error)\n\t{\n\t\t$str_error='<div class=\"error below-h2\">'.$error.'</div>';\n\t}\n\n\t$str_return='\n\t\t<div class=\"postbox\">\n\t\t <h3 class=\"hndle\"><span>Custom Adore Datatables CSS (Global)</span></h3>\n\t\t <div class=\"inside\">\n\t\t <p class=\"alternate\">Write your custom CSS here. This CSS will be loaded on every page/post where Adore Datatable instance exists.</p>\n\t\t '.$str_error.'\n\t\t\t\t<form method=\"post\" action=\"\">\n\t\t\t\t\t'.wp_nonce_field('adt_css_save_nonce').'\n\t\t\t\t\t<fieldset class=\"form-table\">\n\t\t\t\t\t <label for=\"txt_adt_css\">Write your custom CSS Below</label><br>\n\t\t\t\t\t <textarea id=\"txt_adt_css\" name=\"txt_adt_css\" rows=\"8\" class=\"large-text\">'.$output.'</textarea>\n\t\t\t\t\t</fieldset>\n\t\t\t\t\t<input type=\"submit\" value=\"Save CSS\" class=\"button button-primary\" id=\"cmd_adt_css_submit\" name=\"cmd_adt_css_submit\">\n\t\t\t\t</form>\n\t\t </div>\n\t\t</div>\n\t';\n\treturn $str_return;\n}", "function genForm($query,$id,$prefix,$target)\n {\n global $values;\n $getCols = query($query);\n //$results = query($query);\n //$values = mysqli_fetch_array($results);\n\n $fields_num = mysqli_num_fields($getCols);\n echo '<textarea>';\n\n\n $formName = $prefix.\"Form\";\t\n echo \"<form action='\".'<?=app(\"url\")?>'.\"/exec/$target' id='$formName' name='$formName'>\\n\";\n\n\n \n for($i=0; $i<$fields_num; $i++)\n {\n $field = mysqli_fetch_field($getCols);\t\n \n if(strstr($id,$field->name)){\n echo \"<input type='hidden' name='frm_$id' id='$id' value='\".'<?=$values[\"'.$field->name.'\"]?>'.\"'>\\n\";\n }else{\n //$colname[$y] = $field->name;\n $label = ucfirst(str_replace($prefix.\"_\",\"\",$field->name));\n\n echo \"<label>\".ucfirst(str_replace('_', ' ',$label)).\"</label>\";\n echo \"<input name='frm_$field->name' id='frm_$field->name' value='\".'<?=$values[\"'.$field->name.'\"]?>'.\"'><br>\\n\";\n }\n }\n echo \"<label>&nbsp;</label><button id='formbutton'>Submit</button>\\n\";\n echo \"</form>\\n\";\n echo \"\\n<script>\\n\";\n echo \"$(document).ready(function(){\\n\";\n echo \" $('#$formName').validate();\\n\";\n echo \"});\\n\";\n echo \"</script>\\n\";\n echo '</textarea>';\n\t}", "public function inline_css() { ?>\n\n\t\t\t<style type=\"text/css\">\n\t\t\t\tbody #wprt-add-widget h3 { text-align: center !important; padding: 15px 7px; font-size: 1.3em; margin-top: 5px; }\n\t\t\t\tbody div#widgets-right .sidebar-wprt-custom .widgets-sortables { padding-bottom: 45px }\n\t\t\t\tbody div#widgets-right .sidebar-wprt-custom.closed .widgets-sortables { padding-bottom: 0 }\n\t\t\t\tbody .wprt-widget-area-footer { display: block; position: absolute; bottom: 0; left: 0; height: 40px; line-height: 40px; width: 100%; border-top: 1px solid #e4e4e4; }\n\t\t\t\tbody .wprt-widget-area-footer > div { padding: 8px 8px 0 }\n\t\t\t\tbody .wprt-widget-area-footer .wprt-widget-area-id { display: block; float: left; max-width: 48%; overflow: hidden; position: relative; top: -6px; }\n\t\t\t\tbody .wprt-widget-area-footer .wprt-widget-area-buttons { float: right }\n\t\t\t\tbody .wprt-widget-area-footer .description { padding: 0 !important; margin: 0 !important; }\n\t\t\t\tbody div#widgets-right .sidebar-wprt-custom.closed .widgets-sortables .wprt-widget-area-footer { display: none }\n\t\t\t\tbody .wprt-widget-area-footer .wprt-widget-area-delete { display: block; float: right; margin: 0; }\n\t\t\t\tbody .wprt-widget-area-footer .wprt-widget-area-delete-confirm { display: none; float: right; margin: 0 5px 0 0; }\n\t\t\t\tbody .wprt-widget-area-footer .wprt-widget-area-delete-cancel { display: none; float: right; margin: 0; }\n\t\t\t\tbody .wprt-widget-area-delete-confirm:hover:before { color: red }\n\t\t\t\tbody .wprt-widget-area-delete-confirm:hover { color: #333 }\n\t\t\t\tbody .wprt-widget-area-delete:hover:before { color: #919191 }\n\t\t\t\tbody .activate_spinner { display: block !important; position: absolute; top: 10px; right: 4px; background-color: #ECECEC; }\n\t\t\t\tbody #wprt-add-widget form { text-align: center }\n\t\t\t\tbody #widget_area-wprt-custom,\n\t\t\t\tbody #widget_area-wprt-custom h3 { position: relative }\n\t\t\t\tbody #wprt-add-widget p { margin-top: 0 }\n\t\t\t\tbody #wprt-add-widget { margin: 10px 0 0; position: relative; }\n\t\t\t\tbody #wprt-add-widget-input { max-width: 95%; padding: 8px; margin-bottom: 14px; margin-top: 3px; text-align: center; }\n\t\t\t</style>\n\n\t\t<?php }", "function sc_shortcode_form() {\r\n\tglobal $sc_url;\r\n\t$fields = get_option('sc_form');\r\n\t$settings = get_option('sc_settings');\r\n\r\n\t$form = '';\r\n\t$form .= '<div id=\"sc_form\">';\r\n\t$form .= '<div class=\"mess\"></div>';\r\n\t$form .= '<form method=\"post\" action=\"\" onsubmit=\"return scCheckForm2()\">';\r\n\t\r\n\tif( $fields!='' ): for($i=0; $i<count($fields); $i++):\r\n\t\t\r\n\t\tif( $fields[$i]['req']==1 ){ $mend = 'mendatory '; $ast = '* '; }\r\n\t\telse { $mend = ''; $ast = ''; }\r\n\t\t\r\n\t\tif( $fields[$i]['mail']==1 ) $mail = 'sc_mail';\r\n\t\telse $mail = '';\r\n\t\t\r\n\t\t$lbl = '<label class=\"'. $mend. $mail .'\" for=\"field_'. $i .'_sc\">'. $ast . $fields[$i]['label'] .'</label>';\r\n\t\t$hid = '<input name=\"field_name[]\" value=\"'. $fields[$i]['label'] .'\" type=\"hidden\" style=\"display:none;\" />';\r\n\t\t\r\n\t\tif( $fields[$i]['type']=='textbox' )\r\n\t\t\t$in = '<input class=\"drwr-txtInp-sc\" name=\"field_val[]\" id=\"field_'. $i .'_sc\" type=\"text\" />';\r\n\t\telse\r\n\t\t\t$in = '<textarea class=\"drwr-txtArea-sc\" rows=\"5\" cols=\"5\" name=\"field_val[]\" id=\"field_'. $i .'_sc\"></textarea>';\r\n\t\t\r\n\t\t$form .= \"\\n\\n<p>\".$hid;\r\n\t\t$form .= \"\\n\".$lbl;\r\n\t\t$form .= \"\\n\".$in.\"</p>\";\r\n\t\r\n\tendfor; endif;\r\n\t\r\n\t\r\n\t//add captcha code starts \r\n\tif( $settings['sc_captcha']==1 ){\r\n\t\t\r\n\t\t$form .= '<p><label>Security Code</label>';\r\n\t\t$form .= '<img src=\"'. $sc_url .'/includes/captcha/securimage_show.php?sid='. md5(uniqid(time())) .'\" alt=\"Security Code\" id=\"sc_image_sc\" style=\"float:left\" />';\r\n\t\t\r\n\t\t$form .= '<a href=\"#\" onclick=\"document.getElementById(\\'sc_image_sc\\').src = \\''. $sc_url .'/includes/captcha/securimage_show.php?sid=\\' + Math.random(); return false\"><img src=\"'. $sc_url .'/includes/captcha/images/refresh.png\" alt=\"Reload Image\" title=\"Reload Image\" style=\"float:left;padding-left:10px;\" /></a></p>';\r\n\t\t\r\n\t\t$form .= '<p><label for=\"sc_code_sc\" class=\"mendatory\">* Verify Code</label>';\r\n\t\t$form .= '<input name=\"sc_code\" id=\"sc_code_sc\" type=\"text\" style=\"text-align:center;\" /></p>';\r\n\t\r\n\t}\r\n\t//add captcha code ends\r\n\t\r\n\t\r\n\t\t$form .= '<p><label>*required fields</label><input value=\"Submit\" type=\"submit\" id=\"sc_submit_sc\" /></p>';\r\n\t$form .= '</form>';\r\n\t$form .= '</div>';\r\n\r\n\t$form .= '<div id=\"sc_thanku_sc\" style=\"display:none\"><div class=\"mess\">'. $settings['sc_thanku'] .'</div></div>';\r\n\t$form .= '<div id=\"sc_error_sc\" style=\"display:none\"><div class=\"mess\">'. $settings['sc_error'] .'</div></div>';\r\n\r\n\treturn $form;\r\n}", "function getForm()\r\n\t{\r\n\t\t$this->action();\r\n\t\t$mainForm\t= $this->getMainForm();\r\n\t\tif($this->isFormRequire)\r\n\t\t{\r\n\t\t\t$cls = ' class=\"formIsRequire\"';\r\n\t\t\tlink_js(_PEA_URL.'includes/formIsRequire.js', false);\r\n\t\t}else{\r\n\t\t\t$cls = '';\r\n\t\t}\r\n\r\n\t\t$i = 0;\r\n\t\t$out = '';\r\n\r\n\t\t$out .= '<form method=\"'.$this->methodForm.'\" action=\"'.$this->actionUrl.'\" name=\"'. $this->formName .'\"'.$cls.' enctype=\"multipart/form-data\" role=\"form\">';\r\n\t\t$out .= $this->getSaveSuccessPage();\r\n\t\t$out .= $this->getDeleteSuccessPage();\r\n\r\n\t\t$hover= $this->isChangeBc ? ' table-hover' : '';\r\n\t\t$out .= '<table class=\"table table-striped table-bordered'.$hover.'\">';\r\n\t\t$out .= '<thead><tr>';\r\n\r\n\t\t// ngambil tr title\r\n\t\t$numColumns = 0;\r\n\r\n\t\tforeach($this->arrInput as $input)\r\n\t\t{\r\n\t\t\tif ($input->isInsideRow && !$input->isInsideMultiInput && !$input->isHeader)\r\n\t\t\t{\r\n\t\t\t\t// buat array data untuk report\r\n\t\t\t\tif ($this->isReportOn && $input->isIncludedInReport)\r\n\t\t\t\t{\r\n\t\t\t\t\t$arrHeader[]\t= $input->title;\r\n\t\t\t\t}\r\n\t\t\t\t// dapatkan text bantuan\r\n\t\t\t\tif (!empty($input->textHelp))\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->help->value[$input->name] = $input->textHelp;\r\n\t\t\t\t}\r\n\t\t\t\tif (!empty($input->textTip))\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->tip->value[$input->name] = $input->textTip;\r\n\t\t\t\t}\r\n\t\t\t\t$label = '';\r\n\t\t\t\tif (@$input->isCheckAll)\r\n\t\t\t\t{\r\n\t\t\t\t\t$label = $this->getCheckAll($input);\r\n\t\t\t\t}\r\n\t\t\t\t$href = $this->getOrderUrl($input, $input->title);\r\n\t\t\t\tif (!empty($this->tip->value[$input->name]))\r\n\t\t\t\t{\r\n\t\t\t\t\t$input->title = tip($input->title, $this->tip->value[$input->name]);\r\n\t\t\t\t}\r\n\t\t\t\t$label .= $href['start'].$input->title.$href['end'];\r\n\t\t\t\t$out .= ' <th>'.$label;\r\n\t\t\t\tif (!empty($this->help->value[$input->name]))\r\n\t\t\t\t{\r\n\t\t\t\t\t$out .= ' <span style=\"font-weight: normal;\">'.help($this->help->value[$input->name],'bottom').'</span>';\r\n\t\t\t\t}\r\n\t\t\t\t$out\t\t.= \"</th>\\n\";\r\n\t\t\t\t$numColumns++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t$out .= '</tr></thead>';\r\n\t\t$this->reportData['header']\t= isset($arrHeader) ? $arrHeader : array();\r\n\t\t// ambil mainFormnya\r\n\t\t$out .= $mainForm;\r\n\r\n\t\t/* Return, Save, Reset, Navigation, Delete */\r\n\t\t$button = '';\r\n\t\tif (!empty($_GET['return']) && empty($_GET['is_ajax']))\r\n\t\t{\r\n\t\t\t$button .= $GLOBALS['sys']->button($_GET['return']);\r\n\t\t}\r\n\t\tif ($this->saveTool)\r\n\t\t{\r\n\t\t\t$button .= '<button type=\"submit\" name=\"'. $this->saveButton->name .'\" value=\"'. $this->saveButton->value\r\n\t\t\t\t\t\t.\t'\" class=\"btn btn-primary btn-sm\"><span class=\"glyphicon glyphicon-'.$this->saveButton->icon.'\"></span>'\r\n\t\t\t\t\t\t. $this->saveButton->label .'</button>';\r\n\t\t}\r\n\t\tif ($this->resetTool)\r\n\t\t{\r\n\t\t\t$button .= '<button type=\"reset\" class=\"btn btn-warning btn-sm\"><span class=\"glyphicon glyphicon-'.$this->resetButton->icon.'\"></span>'.$this->resetButton->label.'</button> ';\r\n\t\t}\r\n\t\t$nav = $this->nav->getNav();\r\n\t\tif (!empty($nav))\r\n\t\t{\r\n\t\t\tif (!empty($button))\r\n\t\t\t{\r\n\t\t\t\t$button = '<table style=\"width: 100%;\"><tr><td style=\"width: 10px;white-space: nowrap;\">'.$button.'</td><td style=\"text-align: center;\">'.$nav.'</td></tr></table>';\r\n\t\t\t}else{\r\n\t\t\t\t$button .= $nav;\r\n\t\t\t}\r\n\t\t}\r\n\t\t$footerTD = array();\r\n\t\t$colspan = $numColumns;\r\n\t\tif ($this->deleteTool)\r\n\t\t{\r\n\t\t\t$colspan -= 1;\r\n\t\t}\r\n\t\t$attr = $colspan > 1 ? ' colspan=\"'.$colspan.'\"' : '';\r\n\t\t$footerTD[] = '<td'.$attr.'>'.$button.'</td>';\r\n\t\tif ($this->deleteTool)\r\n\t\t{\r\n\t\t\t$footerTD[] = '<td>'\r\n\t\t\t\t. '<button type=\"submit\" name=\"'.$this->deleteButton->name.'\" value=\"'. $this->deleteButton->value.'\" class=\"btn btn-danger btn-sm\" '\r\n\t\t\t\t. 'onclick=\"if (confirm(\\'Are you sure want to delete selected row(s) ?\\')) { return true; }else{ return false; }\">'\r\n\t\t\t\t. '<span class=\"glyphicon glyphicon-'.$this->deleteButton->icon.'\"></span>'.$this->deleteButton->label .'</button>'\r\n\t\t\t\t. '</td>';\r\n\t\t}\r\n\t\tif (!empty($footerTD))\r\n\t\t{\r\n\t\t\t$out .= '<tfoot><tr>'.implode('', $footerTD).'</tr></tfoot>';\r\n\t\t}\r\n\t\t$out .= '</table>';\r\n\t\t$out .= '</form>';\r\n\r\n\t\t/* Export Tool, Page Status, Form Navigate */\r\n\t\t$nav = $this->nav->getViewAllLink();\r\n\t\tif (!empty($nav))\r\n\t\t{\r\n\t\t\t$nav = '<span class=\"input-group-addon\">'.$nav.'</span>';\r\n\t\t}\r\n\t\t$nav .= $this->nav->getGoToForm(false);\r\n\t\t$out .= '<form method=\"get\" action=\"\" role=\"form\" style=\"margin-top:-20px;margin-bottom: 20px;\">'\r\n\t\t\t\t.\t'<div class=\"input-group\">'\r\n\t\t\t\t. $this->getReport($this->nav->int_cur_page)\r\n\t\t\t\t. '<span class=\"input-group-addon\">'\r\n\t\t\t\t. $this->nav->getStatus().'</span>'.$nav.'</div></form>';\r\n\r\n\t\t/* Form Panel */\r\n\t\t$formHeader = $this->getHeaderType();\r\n\t\tif (!empty($formHeader))\r\n\t\t{\r\n\t\t\t$out = '\r\n\t\t\t\t<div class=\"panel panel-default\">\r\n\t\t\t\t\t<div class=\"panel-heading\">\r\n\t\t\t\t\t\t<h3 class=\"panel-title\">'.$formHeader.'</h3>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"panel-body\">\r\n\t\t\t\t\t\t'.$out.'\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>';\r\n\t\t}\r\n\t\t$out = $this->getHideFormToolStart().$out.$this->getHideFormToolEnd();\r\n\t\treturn $out;\r\n\t}", "private function generateFormConstantes()\n {\n $inputs = array();\n $inputs[] = array(\n 'type' => 'text',\n 'label' => 'Seuil de Calcul Prime fichier',\n 'name' => 'co_seuil_prime_fichier',\n 'desc' => 'Montant du seuil de calcul de la prime',\n 'class' => 'input fixed-width-md',\n 'suffix' => '€'\n );\n $inputs[] = array(\n 'type' => 'text',\n 'label' => 'Prime fichier',\n 'name' => 'co_prime_fichier',\n 'desc' => 'Montant de la prime fichier',\n 'class' => 'input fixed-width-md',\n 'suffix' => '€'\n );\n $inputs[] = array(\n 'type' => 'text',\n 'label' => 'Prime parrainage',\n 'name' => 'co_prime_parrainage',\n 'desc' => 'Montant de la prime parrainage',\n 'class' => 'input fixed-width-md',\n 'suffix' => '€'\n );\n $inputs[] = array(\n 'type' => 'text',\n 'label' => 'Prospects par jour',\n 'name' => 'co_prospects_jour',\n 'desc' => 'Nombre de prospects affectés par jour travaillé',\n 'class' => 'input fixed-width-md',\n );\n $inputs[] = array(\n 'type' => 'text',\n 'label' => 'Prospects par heure',\n 'name' => 'co_prospects_heure',\n 'desc' => 'Nombre de prospects par heure travaillé',\n 'class' => 'input fixed-width-md',\n );\n $inputs[] = array(\n 'type' => 'text',\n 'label' => 'Ancienneté des prospects',\n 'name' => 'co_prospects_jour_max',\n 'desc' => 'Nombre de jour maximum d\\'ancienneté des prospects pour l\\'atribution',\n 'class' => 'input fixed-width-md',\n 'suffix' => 'jour'\n );\n\n $fields_form = array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Configuration'),\n 'icon' => 'icon-cogs'\n ),\n 'input' => $inputs,\n 'submit' => array(\n 'title' => $this->l('Save'),\n 'class' => 'btn btn-default pull-right',\n 'name' => 'submitConfiguration'\n )\n )\n );\n\n $lang = new Language((int)Configuration::get('PS_LANG_DEFAULT'));\n $helper = new HelperForm();\n $helper->default_form_language = $lang->id;\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false) . '&configure=' . $this->name\n . '&tab_module=' . $this->tab . '&module_name=' . $this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigConfiguration(),\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id\n );\n return $helper->generateForm(array($fields_form));\n\n }", "public static function display_create_form(){\n echo \"<form action='../../Controllers/charity_controller.class.php?action=save' method='post'>\";\n echo \"Name: <input type='text' name='name' /><br />\";\n echo \"Description: <textarea name='description'></textarea><br />\";\n echo \"<input type='submit' value='Save' />\";\n echo \"</form>\";\n }", "public static function outputForm()\n {\n $out = <<<EOD\n <form method=\"post\" action=\"../webroot/rm-movies.php\" onsubmit=\"\">\n <input type=hidden name=search value='simple-search'/>\n <input type='text' name='title-simple' placeholder='Sök Filmtitel' />\n </form>\nEOD;\n return $out;\n }", "public function generate_html_forms()\n\t{\n\t\t$return_str = '<div class=\"bwp-wrap bwp-option-page-wrapper\" style=\"padding-bottom: 20px;\">' . \"\\n\";\n\t\tif (sizeof($this->form_tabs) >= 2)\n\t\t\t$return_str .= apply_filters('bwp_admin_form_icon', '<div class=\"icon32\" id=\"icon-options-general\"><br></div>' . \"\\n\");\n\t\telse\n\t\t\t$return_str .= '<div class=\"icon32\" id=\"icon-options-general\"><br></div>';\t\t\t\n\t\t\n\t\tif (sizeof($this->form_tabs) >= 2)\n\t\t{\n\t\t\t$count = 0;\n\t\t\t$return_str .= '<h2 class=\"bwp-option-page-tabs\">' . \"\\n\";\n\t\t\t$return_str .= apply_filters('bwp_admin_plugin_version', '') . \"\\n\";\n\t\t\tforeach ($this->form_tabs as $title => $link)\n\t\t\t{\n\t\t\t\t$count++;\n\t\t\t\t$active = ($count == $this->current_tab) ? ' nav-tab-active' : '';\n\t\t\t\t$return_str .= '<a class=\"nav-tab' . $active . '\" href=\"' . $link . '\">' . $title . '</a>' . \"\\n\";\n\t\t\t}\n\t\t\t$return_str .= '</h2>' . \"\\n\";\n\t\t}\n\t\telse if (!isset($this->form_tabs[0]))\n\t\t{\n\t\t\t$title = array_keys($this->form_tabs);\n\t\t\t$return_str .= '<h2>' . $title[0] . '</h2>' . \"\\n\";\n\t\t}\n\t\telse\n\t\t\t$return_str .= '<h2>' . $this->form_tabs[0] . '</h2>' . \"\\n\";\n\n\t\t$return_str .= '<div class=\"bwp-option-box clear\">' . \"\\n\";\n\n\t\t// Begin generating each form\n\t\tforeach ($this->forms as $form)\n\t\t{\n\t\t\t// If this form has 'divider' items, we need to split HTML fields appropriately\n\t\t\t$dividers = (isset($form->form['divider']) && is_array($form->form['divider'])) ? array_keys($form->form['divider']) : array();\n\t\t\t$form_style = (!empty($form->style)) ? ' style=\"' . $form->style . '\" ' : '';\n\t\t\t$multi_form_style = (!empty($form->style) && 0 < sizeof($dividers)) ? ' style=\"' . $form->style . '\" ' : '';\n\n\t\t\tif (0 == sizeof($dividers))\n\t\t\t{\n\t\t\t\t$return_str .= '<div class=\"bwp-option-box-inside\"' . $form_style . '>' . \"\\n\";\n\t\t\t\t$return_str .= apply_filters('bwp_opf_before_form_' . $form->form_name, '');\n\t\t\t\techo $return_str;\n\t\t\t\tdo_action('bwp_opa_before_form_' . $form->form_name, $form->form_name);\n\t\t\t}\n\t\t\telse\n\t\t\t\techo $return_str;\n\n\t\t\t$enctype = (!empty($form->form_enctype)) ? ' enctype=\"' . $form->form_enctype . '\" ' : '';\n\t\t\t$return_str = '<form class=\"bwp-option-page\" name=\"' . $form->form_name . '\" method=\"post\" action=\"\"' . $enctype . $multi_form_style . '>' . \"\\n\";\n\n\t\t\t// Nonce\n\t\t\t$return_str .= wp_nonce_field($form->form_name, \"_wpnonce\", false, false) . \"\\n\";\n\t\t\t$return_str .= apply_filters('bwp_opf_referrer_field_' . $form->form_name, wp_referer_field(false)) . \"\\n\";\n\n\t\t\t$return_str .= '<ul>' . \"\\n\";\n\n\t\t\tif (isset($form->form_items) && is_array($form->form_items))\n\t\t\t{\n\t\t\t\t// If this form needs to be divided, so be it\n\t\t\t\tif (0 < sizeof($dividers))\n\t\t\t\t{\n\t\t\t\t\t$return_str .= '<div class=\"bwp-option-box-inside\">' . \"\\n\";\n\t\t\t\t\t$return_str .= apply_filters('bwp_opf_before_form_' . $form->form_name, '');\n\t\t\t\t\techo $return_str;\n\t\t\t\t\tdo_action('bwp_opa_before_form_' . $form->form_name, $form->form_name);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\techo $return_str;\n\t\t\t\t// Reset the result\n\t\t\t\t$return_str = '';\n\t\t\t\t// Generate individual items\n\t\t\t\t$form_count = 0;\n\t\t\t\tforeach ($form->form_items as $key => $type)\n\t\t\t\t{\n\t\t\t\t\tif (!empty($form->form_item_names[$key]) && isset($form->form_item_labels[$key]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$extra_classes = ('heading' == $type) ? ' bwp-li-heading' : ' bwp-li-item';\n\t\t\t\t\t\t// Before the field\n\t\t\t\t\t\techo $return_str;\n\t\t\t\t\t\tdo_action('bwp_opa_before_field_' . $form->form_name . '_' . $form->form_item_names[$key], $form->form_name);\n\t\t\t\t\t\t$return_str = '';\n\t\t\t\t\t\t// The field\n\t\t\t\t\t\t$return_str .= ('hidden' != $form->form_items[$key]) ? '<li class=\"clear' . $extra_classes . '\">' . $form->generate_html_fields($type, $form->form_item_names[$key]) . '</li>' : $form->generate_html_fields($type, $form->form_item_names[$key]) . \"\\n\";\n\t\t\t\t\t\t// After the field\n\t\t\t\t\t\techo $return_str;\n\t\t\t\t\t\tdo_action('bwp_opa_after_field_' . $form->form_name . '_' . $form->form_item_names[$key], $form->form_name);\n\t\t\t\t\t\t$return_str = '';\n\t\t\t\t\t\tif (in_array($form->form_item_names[$key], $dividers))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$form_count++;\n\t\t\t\t\t\t\techo $return_str;\n\t\t\t\t\t\t\tdo_action('bwp_opa_after_divided_form_' . $form->form_name . '_' . $form_count, $form->form_name);\n\t\t\t\t\t\t\t$return_str = '';\n\t\t\t\t\t\t\t$return_str .= apply_filters('bwp_opf_multi_submit_button_' . $form->form_name, '<p class=\"submit\"><input type=\"submit\" class=\"button-primary\" name=\"save_' . $form->form_name . '\" value=\"' . __('Save All Changes', $this->domain) . '\" /> &nbsp;<input type=\"submit\" class=\"button-secondary\" name=\"reset_' . $form->form_name . '\" value=\"' . __('Reset to Defaults', $this->domain) . '\" /></p>', $form_count) . \"\\n\";\n\t\t\t\t\t\t\t$return_str .= '</div>' . \"\\n\";\n\t\t\t\t\t\t\t$return_str .= '<div class=\"bwp-option-box-inside\">' . \"\\n\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// If this form needs to be divided, add the final Save all changes button\n\t\t\t\tif (0 < sizeof($dividers))\n\t\t\t\t\t$return_str .= apply_filters('bwp_opf_multi_submit_button_' . $form->form_name, '<p class=\"submit\"><input type=\"submit\" class=\"button-primary\" name=\"save_' . $form->form_name . '\" value=\"' . __('Save All Changes', $this->domain) . '\" /> &nbsp;<input type=\"submit\" class=\"button-secondary\" name=\"reset_' . $form->form_name . '\" value=\"' . __('Reset to Defaults', $this->domain) . '\" /></p>', 'last') . \"\\n\";\n\t\t\t}\n\n\t\t\t$return_str .= '</ul>' . \"\\n\";\t\t\n\t\t\t$return_str .= apply_filters('bwp_opf_before_submit_button_' . $form->form_name, '');\n\t\t\techo $return_str;\n\t\t\tdo_action('bwp_opa_before_submit_button_' . $form->form_name, $form->form_name);\n\n\t\t\t$submit = apply_filters('bwp_opf_submit_button_' . $form->form_name, '<p class=\"submit\"><input type=\"submit\" class=\"button-primary\" name=\"save_' . $form->form_name . '\" value=\"' . __('Save Changes', $this->domain) . '\" /> &nbsp;<input type=\"submit\" class=\"button-secondary\" name=\"reset_' . $form->form_name . '\" value=\"' . __('Reset to Defaults', $this->domain) . '\" /></p>') . \"\\n\";\n\t\t\t$return_str = apply_filters('bwp_op_submit_button', $submit) . \"\\n\";\n\t\t\t$return_str .= '</form>' . \"\\n\";\n\n\t\t\tif (0 == sizeof($dividers))\n\t\t\t\t$return_str .= '</div>' . \"\\n\";\n\t\t}\n\n\t\t$return_str .= '<div class=\"clear\"><!-- --></div>' . \"\\n\";\n\t\t$return_str .= '</div>' . \"\\n\";\n\t\t$return_str .= '</div>' . \"\\n\";\n\n\t\techo $return_str;\n\t}", "public function buildLightbox(){\n\n\t\t$fields = $this->getFields();\n\n\t\techo '<div class=\"main-content\">';\n\t\t\n\t\t\tforeach( $fields as $field ){\n\n\t\t\t\t$field->render();\n\n\t\t\t\tif( method_exists( $field, 'renderTemplate' ) )\n\t\t\t\t\techo $field->renderTemplate();\n\n\t\t\t}\n\n\t\techo '</div>';\n\t\techo '<div class=\"side-content\">';\n\t\t\t\n\t\t\t$this->saveButton();\n\n\t\techo '</div>';\n\t}", "function sr_write_pagebuilder($pagebuildermeta) {\n\tglobal $sr_prefix, $post; \n\t\n\t/* Bugfix for export/import */\n\t$json = str_replace(\"\\\\\\\\\", \"\\\\\", get_post_meta($post->ID, $sr_prefix.'_pagebuilder_json', true));\n\t\n\t$classActive = ''; if (get_post_meta($post->ID, $sr_prefix.'_pagebuilder_active', true) == 'yes') { $classActive = 'active'; }\n\techo '<div id=\"sr-pagebuilder\" class=\"'.$classActive.'\">';\n\t\n\t// Main Textareas\n\techo '<div class=\"fieldareas\">';\n\techo '<textarea name=\"'.$sr_prefix.'_pagebuilder\" id=\"'.$sr_prefix.'_pagebuilder\">'.get_post_meta($post->ID, $sr_prefix.'_pagebuilder', true).'</textarea>';\n\techo '<textarea name=\"'.$sr_prefix.'_pagebuilder_json\" id=\"'.$sr_prefix.'_pagebuilder_json\">'.$json.'</textarea>';\n\t\n\techo '<textarea name=\"'.$sr_prefix.'_pagebuilder_backup_one\" id=\"'.$sr_prefix.'_pagebuilder_backup_one\">'.get_post_meta($post->ID, $sr_prefix.'_pagebuilder', true).'</textarea>';\n\techo '<textarea name=\"'.$sr_prefix.'_pagebuilder_json_backup_one\" id=\"'.$sr_prefix.'_pagebuilder_json_backup_one\">'.get_post_meta($post->ID, $sr_prefix.'_pagebuilder_json', true).'</textarea>';\n\techo '<textarea name=\"'.$sr_prefix.'_pagebuilder_json_backup_one_tmp\" id=\"'.$sr_prefix.'_pagebuilder_json_backup_one_tmp\">'.get_post_meta($post->ID, $sr_prefix.'_pagebuilder_json_backup_one', true).'</textarea>';\n\techo '</div>';\n\t\n\t\n\t// Activate Pagebuilder\n\techo '<input type=\"hidden\" name=\"'.$sr_prefix.'_pagebuilder_active\" class=\"'.$sr_prefix.'_pagebuilder_active\" id=\"'.$sr_prefix.'_pagebuilder_active\" value=\"'.get_post_meta($post->ID, $sr_prefix.'_pagebuilder_active', true).'\">';\n\techo '<a href=\"#\" class=\"sr-enable-pagebuilder\">Activate Pagebuilder</a>';\n\techo '<a href=\"#\" class=\"sr-disable-pagebuilder\">Deactivate Pagebuilder</a>';\n\t\n\t\n\t\n\t\n\t\n\t// \t\t********\n\t\n\t//\t\tPagebuilder VISUAL\n\t\n\t// \t\t********\t\n\techo '<div id=\"sr-pagebuilder-visual\" class=\"sortable-container\">';\n\t\n\tif (get_post_meta($post->ID, $sr_prefix.'_pagebuilder_json', true) !== '') {\n\t$json = json_decode($json);\n\tif($json) {\n\tforeach($json->section as $section) {\t\n\t\t\n\t\tswitch($section->shortcode) {\n\t\t\t\n\t\n\t\t\t// text\n\t\t\tcase 'text':\n\t\t\t\t$jsonContent = json_encode($section)\t;\n\t\t\t\t$thisContent = false;\n\t\t\t\tforeach ($section->options as $o) {\n\t\t\t\t\tif ($o->oName == 'content') { $thisContent = $o->oVal;}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\techo '<div class=\"visualsection '.$section->shortcode.'\">\n\t\t\t\t\t<div class=\"action-bar\"><a href=\"#sr-pagebuilder-popup-'.$section->shortcode.'\" class=\"edit-section\"></a><a href=\"#\" class=\"delete-section\"></a></div>\n\t\t\t\t\t<textarea class=\"shortcode shortcode-start\">'.$thisContent.'</textarea>\n\t\t\t\t\t<textarea class=\"json json-start\">'.$jsonContent.'</textarea>';\n\t\t\t\techo '<span>Text / Editor</span>\n\t\t\t\t</div>';\n\t\t\tbreak;\n\t\t\t\n\t\t\t// spacer\n\t\t\tcase 'spacer':\n\t\t\t\techo '<div class=\"visualsection '.$section->shortcode.'\">\n\t\t\t\t\t<div class=\"action-bar\"><a href=\"#\" class=\"delete-section\"></a><a href=\"#sr-pagebuilder-popup-'.$section->shortcode.'\" class=\"edit-section\"></a></div>';\n\t\t\t\t\n\t\t\t\t$size = '';\t\n\t\t\t\techo '<textarea class=\"shortcode shortcode-start\">[spacer ';\n\t\t\t\tforeach ($section->options as $o) {\n\t\t\t\t\tif ($o->oName == 'size') { $size = $o->oVal;}\n\t\t\t\t\techo ' '.$o->oName.'=\"'.$o->oVal.'\"'; \n\t\t\t\t}\n\t\t\t\techo ']</textarea>';\n\t\t\t\t$jsonContent = json_encode($section)\t;\n\t\t\t\techo '<textarea class=\"json json-start\">'.$jsonContent.'</textarea>';\n\t\t\t\techo '<span>Spacer ('.$size.')</span>\n\t\t\t\t<a class=\"sr-add-row sr-open-popup\" href=\"#sr-pagebuilder-popup-row\">Add Row</a>\n\t\t\t\t</div>';\n\t\t\tbreak;\n\t\t\t\n\t\t\t\n\t\t\t// teammemeber\n\t\t\tcase 'sr-teammember':\n\t\t\t\t$jsonContent = json_encode($section)\t;\n\t\t\t\t$thisContent = false;\n\t\t\t\tforeach ($section->options as $o) {\n\t\t\t\t\tif ($o->oName == 'content') { $thisContent = $o->oVal;}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\techo '<div class=\"visualsection '.$section->shortcode.'\">\n\t\t\t\t\t<div class=\"action-bar\"><a href=\"#sr-pagebuilder-popup-'.$section->shortcode.'\" class=\"edit-section\"></a><a href=\"#\" class=\"delete-section\"></a></div>';\n\t\t\t\t$thisContent = false;\t\n\t\t\t\techo '<textarea class=\"shortcode shortcode-start\">['.$section->shortcode.' ';\n\t\t\t\tforeach ($section->options as $o) {\n\t\t\t\t\tif ($o->oName == 'content') { $thisContent = $o->oVal; } else {\n\t\t\t\t\techo ' '.$o->oName.'=\"'.$o->oVal.'\"'; }\n\t\t\t\t}\n\t\t\t\techo ']'.$thisContent.'</textarea>';\t\n\t\t\t\techo '\t<textarea class=\"json json-start\">'.$jsonContent.'</textarea>';\n\t\t\t\techo '<span>Team Member</span>';\n\t\t\tbreak;\n\t\t\t\n\t\t\t// /teammember (end team member)\n\t\t\tcase '/sr-teammember':\n\t\t\t\techo '<textarea class=\"shortcode\">['.$section->shortcode.']</textarea><textarea class=\"json\">{\"shortcode\":\"'.$section->shortcode.'\"}</textarea></div>';\n\t\t\tbreak;\n\t\t\t\n\t\t\t\n\t\t\t// googlemap\n\t\t\tcase 'sr-googlemap':\n\t\t\t\t$jsonContent = json_encode($section)\t;\n\t\t\t\t$thisContent = false;\n\t\t\t\tforeach ($section->options as $o) {\n\t\t\t\t\tif ($o->oName == 'content') { $thisContent = $o->oVal;}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\techo '<div class=\"visualsection '.$section->shortcode.'\">\n\t\t\t\t\t<div class=\"action-bar\"><a href=\"#sr-pagebuilder-popup-'.$section->shortcode.'\" class=\"edit-section\"></a><a href=\"#\" class=\"delete-section\"></a></div>';\n\t\t\t\t$thisContent = false;\t\n\t\t\t\techo '<textarea class=\"shortcode shortcode-start\">['.$section->shortcode.' ';\n\t\t\t\tforeach ($section->options as $o) {\n\t\t\t\t\tif ($o->oName == 'content') { $thisContent = $o->oVal; } else {\n\t\t\t\t\techo ' '.$o->oName.'=\"'.$o->oVal.'\"'; }\n\t\t\t\t}\n\t\t\t\techo ']'.$thisContent.'</textarea>';\t\n\t\t\t\techo '\t<textarea class=\"json json-start\">'.$jsonContent.'</textarea>';\n\t\t\t\techo '<span>Google Map</span>';\n\t\t\tbreak;\n\t\t\t\n\t\t\t// /googlemap (end googlemap)\n\t\t\tcase '/sr-googlemap':\n\t\t\t\techo '<textarea class=\"shortcode\">['.$section->shortcode.']</textarea><textarea class=\"json\">{\"shortcode\":\"'.$section->shortcode.'\"}</textarea>\n\t\t\t\t<a class=\"sr-add-row sr-open-popup\" href=\"#sr-pagebuilder-popup-row\">Add Row</a>\n\t\t\t\t</div>';\n\t\t\tbreak;\n\t\t\t\n\t\t\t\n\t\t\t// columns\n\t\t\tcase 'col':\n\t\t\t\t\n\t\t\t\t$size = '';\n\t\t\t\t$shortcode = $section->shortcode;\n\t\t\t\tforeach ($section->options as $o) {\n\t\t\t\t\tif ($o->oName == 'size') { $size = $o->oVal;}\n\t\t\t\t\t$shortcode .= ' '.$o->oName.'=\"'.$o->oVal.'\"'; \n\t\t\t\t}\n\t\t\t\t$jsonContent = json_encode($section)\t;\n\t\t\t\t\n\t\t\t\techo '<div class=\"col '.$size.'\">\n\t\t\t\t\t\t\t\t<textarea class=\"shortcode shortcode-start\">['.$shortcode.']</textarea>\n\t\t\t\t\t\t\t\t<textarea class=\"json json-start\">'.$jsonContent.'</textarea>';\n\t\t\t\techo '<div class=\"element-container col-inner\">';\n\t\t\tbreak;\n\t\t\t\n\t\t\t// /columns (end columns)\n\t\t\tcase '/col':\n\t\t\t\techo '<a class=\"sr-add-element sr-open-popup disable-sortable\" href=\"#sr-pagebuilder-popup-element\">Insert Element</a></div>\n\t\t\t\t<textarea class=\"shortcode\">['.$section->shortcode.']</textarea><textarea class=\"json\">{\"shortcode\":\"'.$section->shortcode.'\"}</textarea>\n\t\t\t\t</div>';\n\t\t\tbreak;\n\t\t\t\n\t\t\t// columnsection\n\t\t\tcase 'columnsection':\n\t\t\t\techo '<div class=\"visualsection '.$section->shortcode.' sr-clearfix\">';\n\t\t\t\t\n\t\t\t\t$wrapperVal = '';\n\t\t\t\techo '<textarea class=\"shortcode shortcode-start\">[columnsection ';\n\t\t\t\tforeach ($section->options as $o) {\n\t\t\t\t\techo ' '.$o->oName.'=\"'.$o->oVal.'\"'; \n\t\t\t\t\tif ($o->oName == 'wrapper') { $wrapperVal = $o->oVal; }\n\t\t\t\t}\n\t\t\t\techo ']</textarea>';\n\t\t\t\t\n\t\t\t\t$jsonContent = json_encode($section)\t;\n\t\t\t\techo '<textarea class=\"json json-start\">'.$jsonContent.'</textarea>';\n\t\t\t\t\n\t\t\t\techo '<div class=\"action-bar\"><a href=\"#\" class=\"delete-section\"></a><a href=\"#sr-pagebuilder-popup-'.$section->shortcode.'\" class=\"edit-section\"></a></div>\n\t\t\t\t\t\t<div class=\"columns '.$wrapperVal.' sr-clearfix\">';\n\t\t\tbreak;\n\t\t\t\n\t\t\t// /columnsection\n\t\t\tcase '/columnsection':\n\t\t\t\techo '</div>\n\t\t\t\t\t\t<a class=\"sr-add-row sr-open-popup\" href=\"#sr-pagebuilder-popup-row\">Add Row</a>\n\t\t\t\t\t\t<textarea class=\"shortcode\">['.$section->shortcode.']</textarea><textarea class=\"json\">{\"shortcode\":\"'.$section->shortcode.'\"}</textarea>\n\t\t\t\t\t</div>';\n\t\t\tbreak;\n\t\t\t\n\t\t\t\n\t\t\t// horizontalsection\n\t\t\tcase 'horizontalsection':\n\t\t\t\techo '<div class=\"visualsection '.$section->shortcode.' sr-clearfix\">';\n\t\t\t\t\n\t\t\t\techo '<textarea class=\"shortcode shortcode-start\">[horizontalsection ';\n\t\t\t\tforeach ($section->options as $o) {\n\t\t\t\t\techo ' '.$o->oName.'=\"'.$o->oVal.'\"'; \n\t\t\t\t}\n\t\t\t\techo ']</textarea>';\n\t\t\t\t\n\t\t\t\t$jsonContent = json_encode($section)\t;\n\t\t\t\techo '<textarea class=\"json json-start\">'.$jsonContent.'</textarea>';\n\t\t\t\t\n\t\t\t\techo '<div class=\"action-bar\"><a href=\"#\" class=\"delete-section\"></a><a href=\"#sr-pagebuilder-popup-'.$section->shortcode.'\" class=\"edit-section\"></a></div>\n\t\t\t\t\t\t<div class=\"horizontal-inner sortable-container-inner\">';\n\t\t\tbreak;\n\t\t\t\n\t\t\t// /horizontalsection\n\t\t\tcase '/horizontalsection':\n\t\t\t\techo '\n\t\t\t\t\t\t\t<a class=\"sr-add-first-row sr-open-popup disable-sortable\" href=\"#sr-pagebuilder-popup-row\">Add Row</a>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<a class=\"sr-add-row sr-open-popup\" href=\"#sr-pagebuilder-popup-row\">Add Row</a>\n\t\t\t\t\t\t<textarea class=\"shortcode\">['.$section->shortcode.']</textarea><textarea class=\"json\">{\"shortcode\":\"'.$section->shortcode.'\"}</textarea>\n\t\t\t\t\t</div>';\n\t\t\tbreak;\n\t\t\t\n\t\t\t\n\t\t\t// wolf\n\t\t\tcase 'wolf':\n\t\t\t\techo '<div class=\"visualsection '.$section->shortcode.' sr-clearfix\">';\n\t\t\t\t\n\t\t\t\t$wrapperVal = '';\n\t\t\t\techo '<textarea class=\"shortcode shortcode-start\">[wolf ';\n\t\t\t\tforeach ($section->options as $o) {\n\t\t\t\t\techo ' '.$o->oName.'=\"'.$o->oVal.'\"';\n\t\t\t\t\tif ($o->oName == 'wrapper') { $wrapperVal = $o->oVal; } \n\t\t\t\t}\n\t\t\t\techo ']</textarea>';\n\t\t\t\t\n\t\t\t\t$jsonContent = json_encode($section)\t;\n\t\t\t\techo '<textarea class=\"json json-start\">'.$jsonContent.'</textarea>';\n\t\t\t\t\n\t\t\t\techo '<div class=\"action-bar\"><a href=\"#\" class=\"delete-section\"></a><a href=\"#sr-pagebuilder-popup-'.$section->shortcode.'\" class=\"edit-section\"></a></div>\n\t\t\t\t\t\t<div class=\"wolf-inner '.$wrapperVal.' sr-clearfix\">';\n\t\t\tbreak;\n\t\t\t\n\t\t\t// /wolf\n\t\t\tcase '/wolf':\n\t\t\t\techo '\n\t\t\t\t\t\t\t<a class=\"sr-add-wolfitem sr-open-popup disable-sortable\" href=\"#sr-pagebuilder-popup-wolfitem\">Insert Wolf Item</a>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<a class=\"sr-add-row sr-open-popup\" href=\"#sr-pagebuilder-popup-row\">Add Row</a>\n\t\t\t\t\t\t<textarea class=\"shortcode\">['.$section->shortcode.']</textarea><textarea class=\"json\">{\"shortcode\":\"'.$section->shortcode.'\"}</textarea>\n\t\t\t\t\t</div>';\n\t\t\tbreak;\n\t\t\t\n\t\t\t\n\t\t\t// wolfitem\n\t\t\tcase 'wolfitem':\n\t\t\t\n\t\t\t\t$thisContent = '';\n\t\t\t\t$size = '';\n\t\t\t\t$shortcode = $section->shortcode;\n\t\t\t\tforeach ($section->options as $o) {\n\t\t\t\t\tif ($o->oName == 'size') { $size = $o->oVal; }\n\t\t\t\t\tif ($o->oName == 'content') { $thisContent = $o->oVal;}\n\t\t\t\t\telse { $shortcode .= ' '.$o->oName.'=\"'.$o->oVal.'\"'; }\n\t\t\t\t}\n\t\t\t\t$jsonContent = json_encode($section)\t;\n\t\t\t\t\n\t\t\t\tif ($size !== \"null\") {\n\t\t\t\t// some users had problems with enpty/null wolf items (maybe a duplicator plugin, see also js)\n\t\t\t\techo '<div class=\"visualsection '.$section->shortcode.' '.$size.' sr-clearfix\">';\n\t\t\t\techo '<textarea class=\"shortcode shortcode-start\">['.$shortcode.']'.$thisContent.'</textarea>';\n\t\t\t\techo '<textarea class=\"json json-start\">'.$jsonContent.'</textarea>';\n\t\t\t\techo '<div class=\"action-bar\"><a href=\"#\" class=\"delete-section\"></a><a href=\"#sr-pagebuilder-popup-'.$section->shortcode.'\" class=\"edit-section\"></a></div>';\n\t\t\t\t} else {\n\t\t\t\techo '<div class=\"empty-wolf\" style=\"display:none;\">';\t\n\t\t\t\t//echo '<textarea class=\"shortcode\">[wolfitem]</textarea>';\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\t// /wolfitem\n\t\t\tcase '/wolfitem':\n\t\t\t\techo '\t<span>Wolf item</span>\n\t\t\t\t\t\t<textarea class=\"shortcode\">['.$section->shortcode.']</textarea><textarea class=\"json\">{\"shortcode\":\"'.$section->shortcode.'\"}</textarea>\n\t\t\t\t\t</div>';\n\t\t\tbreak;\n\t\t\t\n\t\t\t\n\t\t\t// text\n\t\t\tcase 'sr-slider':\n\t\t\t\t$jsonContent = json_encode($section)\t;\n\t\t\t\t$thisContent = false;\n\t\t\t\tforeach ($section->options as $o) {\n\t\t\t\t\tif ($o->oName == 'content') { $thisContent = $o->oVal;}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\techo '<div class=\"visualsection '.$section->shortcode.'\">\n\t\t\t\t\t<div class=\"action-bar\"><a href=\"#sr-pagebuilder-popup-'.$section->shortcode.'\" class=\"edit-section\"></a><a href=\"#\" class=\"delete-section\"></a></div>';\n\t\t\t\techo '<textarea class=\"shortcode shortcode-start\">[sr-slider ';\n\t\t\t\tforeach ($section->options as $o) {\n\t\t\t\t\techo ' '.$o->oName.'=\"'.$o->oVal.'\"'; \n\t\t\t\t}\n\t\t\t\techo ']</textarea>';\n\t\t\t\techo '<textarea class=\"json json-start\">'.$jsonContent.'</textarea>';\n\t\t\t\techo '<span>Slider</span>\n\t\t\t\t</div>';\n\t\t\tbreak;\n\t\t\t\n\t\t\t\n\t\t\t// sr-gallery\n\t\t\tcase 'sr-gallery':\n\t\t\t\t$jsonContent = json_encode($section)\t;\n\t\t\t\t$thisContent = false;\n\t\t\t\tforeach ($section->options as $o) {\n\t\t\t\t\tif ($o->oName == 'content') { $thisContent = $o->oVal;}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\techo '<div class=\"visualsection '.$section->shortcode.'\">\n\t\t\t\t\t<div class=\"action-bar\"><a href=\"#sr-pagebuilder-popup-'.$section->shortcode.'\" class=\"edit-section\"></a><a href=\"#\" class=\"delete-section\"></a></div>';\n\t\t\t\techo '<textarea class=\"shortcode shortcode-start\">[sr-gallery ';\n\t\t\t\tforeach ($section->options as $o) {\n\t\t\t\t\techo ' '.$o->oName.'=\"'.$o->oVal.'\"'; \n\t\t\t\t}\n\t\t\t\techo ']</textarea>';\n\t\t\t\techo '<textarea class=\"json json-start\">'.$jsonContent.'</textarea>';\n\t\t\t\techo '<span>Gallery</span>\n\t\t\t\t<a class=\"sr-add-row sr-open-popup\" href=\"#sr-pagebuilder-popup-row\">Add Row</a>\n\t\t\t\t</div>';\n\t\t\tbreak;\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t} // END switch\n\t\t} // END foreach section\n\t\t\n\t\techo '<a class=\"sr-add-first-row sr-open-popup disable-sortable\" href=\"#sr-pagebuilder-popup-row\">Add Row</a>';\n\t} else {\n\t\t// If json has error\n\t\t$jsonBackup = str_replace(\"\\\\\\\\\", \"\\\\\", get_post_meta($post->ID, $sr_prefix.'_pagebuilder_json_backup_one', true));\t\n\t\t$jsonBackup = json_decode($jsonBackup);\n\t\tif (get_post_meta($post->ID, $sr_prefix.'_pagebuilder_json_backup_one', true) && get_post_meta($post->ID, $sr_prefix.'_pagebuilder_json_backup_one', true) !== '' && $jsonBackup) {\n\t\t\n\t\techo '<div class=\"pagebuilder-message alert-message\">Unfortunately something went wrong.<br>It\\'s recommended to retsore the pagebuilder in order not to loose your previous savings.</div>';\t\n\t\techo '<input type=\"hidden\" name=\"sr-pagebuilder-restore\" id=\"sr-pagebuilder-restore\" value=\"false\">';\n\t\techo '<a href=\"#\" id=\"restore-pagebuilder\">Restore Now</a>';\n\t\t} else {\n\t\t\techo '<div class=\"pagebuilder-message alert-message\">Unfortunately something went wrong and the different pagebuilder elements have errors and can\\'t be shown here, although it might display fine on your frontend.<br><br>You need to recreate the different elements.</div>';\t\n\t\t\techo '<a class=\"sr-add-first-row sr-open-popup disable-sortable\" href=\"#sr-pagebuilder-popup-row\">Add Row</a>';\n\t\t}\n\t}\n\t\n\t} else { \n\t\t// Pagebuilder is empty\n\t\techo '<a class=\"sr-add-first-row sr-open-popup disable-sortable\" href=\"#sr-pagebuilder-popup-row\">Add Row</a>';\n\t}\n\t\t\n\techo '</div>'; // END #sr-pagebuilder-visual\n\t// \t\t********\n\t\n\t//\t\tPagebuilder VISUAL\n\t\n\t// \t\t********\t\n\n\t\t\t\n\t\t\t\n\t\n\t\n\t// \t\t********\n\t\n\t//\t\tPagebuilder POPUP ($sr_meta_pagebuilder)\n\t\n\t// \t\t********\n\techo '<div id=\"sr-pagebuilder-popup-bg\"></div>';\n\t\n\t\n\t/* Popup Add Row */\n\techo '<div id=\"sr-pagebuilder-popup-row\" class=\"sr-pagebuilder-popup\">';\n\techo '<div class=\"popup-title\">Add Row <a class=\"close-popup\" href=\"#\">close</a></div>';\n\techo '<div class=\"popup-inner\">';\n\tforeach ($pagebuildermeta as $row) {\n\t\tif (strpos($row['type'],'row') !== false) echo '<a href=\"#sr-pagebuilder-popup-'.$row['id'].'\" class=\"popup-add-row sr-open-popup '.$row['id'].'\">'.$row['title'].'</a>';\n\t}\n\techo '</div>';\n\techo '</div>';\n\t/* Popup Add Row */\n\t\n\t\n\t\n\t/* Popup Add Element */\n\techo '<div id=\"sr-pagebuilder-popup-element\" class=\"sr-pagebuilder-popup\">';\n\techo '<div class=\"popup-title\">Insert Element <a class=\"close-popup\" href=\"#\">close</a></div>';\n\techo '<div class=\"popup-inner\">';\n\tforeach ($pagebuildermeta as $row) {\n\t\tif (strpos($row['type'],'element') !== false) echo '<a href=\"#sr-pagebuilder-popup-'.$row['id'].'\" class=\"popup-add-element sr-open-popup\">'.$row['title'].'</a>';\n\t}\n\techo '</div>';\n\techo '</div>';\n\t/* Popup Add Element */\n\t\n\t\n\t\n\t/* Popup Rows & Elements */\n\tforeach ($pagebuildermeta as $meta) {\n\t\t\n\t\techo '<div id=\"sr-pagebuilder-popup-'.$meta['id'].'\" class=\"sr-pagebuilder-popup sr-pagebuilder-popup-option\" data-name=\"'.$meta['id'].'\">';\n\t\techo '<div class=\"popup-title\">'.$meta['title'].' <a class=\"close-popup\" href=\"#\">close</a></div>';\n\t\techo '<div class=\"popup-inner\">';\n\t\t\n\t\t\t// create fields\n\t\t\tforeach ($meta['fields'] as $field) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif ($field['type'] == 'info') {\n\t\t\t\t\techo '<div class=\"builder-info\">'.$field['desc'].'</div>';\n\t\t\t\t} else if ($field['type'] == 'title') {\n\t\t\t\t\techo '<div class=\"builder-title\"><h1><strong>'.$field['desc'].'</strong></h1></div>';\n\t\t\t\t} else if ($field['type'] == 'hidinggroupstart') {\n\t\t\t\t\t$relatedArray = explode(' ',$field['hiding']);\n\t\t\t\t\t$hideClass = '';\n\t\t\t\t\tforeach ($relatedArray as $r) { $hideClass .= $field['id'].'_'.$r.' '; }\n\t\t\t\t\techo '<div class=\"hidinggroup hide'.$field['id'].' '.$hideClass.'\">';\n\t\t\t\t} else if ($field['type'] == 'hidinggroupend') {\n\t\t\t\t\techo '</div>';\n\t\t\t\t} else if ($field['type'] == 'dynamicitemliststart') {\n\t\t\t\t\techo '<div class=\"sr-dynamic-item-list\">';\n\t\t\t\t\techo '\t<div class=\"sr-item\">\n\t\t\t\t\t\t\t<div class=\"item-title\">'.$field['label'].'<a href=\"#\" class=\"delete-item\"></a><a href=\"#\" class=\"edit-item\"></a></div>\n\t\t\t\t\t\t\t<div class=\"item-inner\">';\n\t\t\t\t} else if ($field['type'] == 'dynamicitemlistend') {\n\t\t\t\t\techo '</div>';\n\t\t\t\t\techo '</div>';\n\t\t\t\t\techo '<a href=\"\" class=\"sr-add-item\">Add '.$field['label'].'</a>';\n\t\t\t\t\techo '</div>';\n\t\t\t\t} else {\n\t\t\t\t\n\t\t\t\t$default = '';\n\t\t\t\tif (isset($field['default']) && $field['default'] !== '') { $default = $field['default']; }\n\t\t\t\t\n\t\t\t\t$sendVal = ''; $formDisable = ''; if ($field['sendval']) { $sendVal = ' send-val'; } else { $formDisable = 'disable-on-edit'; }\n\t\t\t\t\n\t\t\t\techo '<div class=\"form-row row-'.$field['type'].' '.$formDisable.'\">';\n\t\t\t\t\n\t\t\t\t$formValClass = '';\n\t\t\t\tif ($field['type'] !== 'editor') {\n\t\t\t\techo '<label for=\"'.$field['id'].'\"><b>'.$field['label'].'</b></label>';\n\t\t\t\t} else { $formValClass = 'editor-val'; }\n\t\t\t\t\n\t\t\t\t\n\t\t\t\techo '<div class=\"form-val '.$formValClass.'\">';\n\t\t\t\tswitch($field['type']) {\n\t\t\t\t\t\n\t\t\t\t\t// text\n \t\t\t\tcase 'text':\n\t\t\t\t\t\techo '<input type=\"text\" name=\"builder-'.$meta['id'].''.$field['id'].'\" id=\"'.$meta['id'].'-'.$field['id'].'\" class=\"builder'.$field['id'].' '.$sendVal.'\" value=\"'.$default.'\" size=\"30\" data-default=\"'.$default.'\" />';\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\t// textarea\n \t\t\t\tcase 'textarea':\n\t\t\t\t\t\techo '<textarea name=\"builder-'.$meta['id'].''.$field['id'].'\" id=\"'.$meta['id'].'-'.$field['id'].'\" class=\"builder'.$field['id'].' '.$sendVal.'\">'.$default.'</textarea>';\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\t// editor\n \t\t\t\tcase 'editor':\n\t\t\t\t\t\twp_editor( '', $meta['id'].'-'.$field['id'],array('textarea_rows' => 13,'editor_class' => $sendVal));\n\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t//color\n\t\t\t\t\tcase \"color\":\n\t\t\t\t\t\techo '<input type=\"text\" name=\"builder-'.$meta['id'].''.$field['id'].'\" id=\"'.$meta['id'].'-'.$field['id'].'\" class=\"builder'.$field['id'].' sr-color-field '.$sendVal.'\" />';\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\t// select\n\t\t\t\t\tcase 'select': \n\t\t\t\t\t echo '<div class=\"select\">\n\t\t\t\t\t\t\t\t<select name=\"builder-'.$meta['id'].''.$field['id'].'\" id=\"'.$meta['id'].'-'.$field['id'].'\" class=\"builder'.$field['id'].' '.$sendVal.'\">';\n\t\t\t\t\t\tforeach ($field['option'] as $var) {\n\t\t\t\t\t\t\techo '<option value=\"'.$var['value'].'\"> '.$var['name'].'</option>';\n\t\t\t\t\t\t}\t\t\t \n\t\t\t\t\t\techo '</select></div>'; \n\t\t\t\t\tbreak;\t\n\t\t\t\t\t\n\t\t\t\t\t// select-hiding\n\t\t\t\t\tcase 'select-hiding': \n\t\t\t\t\t echo '<div class=\"select-hiding\">\n\t\t\t\t\t\t\t\t<select name=\"builder-'.$meta['id'].''.$field['id'].'\" id=\"'.$meta['id'].'-'.$field['id'].'\" class=\"builder'.$field['id'].' '.$sendVal.'\">';\n\t\t\t\t\t\tforeach ($field['option'] as $var) {\n\t\t\t\t\t\t\techo '<option value=\"'.$var['value'].'\"> '.$var['name'].'</option>';\n\t\t\t\t\t\t}\t\t\t \n\t\t\t\t\t\techo '</select></div>'; \n\t\t\t\t\tbreak;\t\n\t\t\t\t\t\n\t\t\t\t\t// custom-select\n\t\t\t\t\tcase 'custom-select': \n\t\t\t\t\t echo '<div class=\"custom-select\">\n\t\t\t\t\t\t\t\t<select name=\"builder-'.$meta['id'].''.$field['id'].'\" id=\"'.$meta['id'].'-'.$field['id'].'\" class=\"builder'.$field['id'].' '.$sendVal.'\">';\n\t\t\t\t\t\tforeach ($field['option'] as $var) {\n\t\t\t\t\t\t\techo '<option value=\"'.$var['value'].'\"> '.$var['name'].'</option>';\n\t\t\t\t\t\t}\t\t\t \n\t\t\t\t\t\techo '</select>';\n\t\t\t\t\t\t\n\t\t\t\t\t\techo '<ul class=\"sr-clearfix\">';\n\t\t\t\t\t\tforeach ($field['option'] as $var) {\n\t\t\t\t\t\t\techo '<li data-rel=\"'.$var['value'].'\"><img src=\"'.get_template_directory_uri().'/theme-admin/pagebuilder/img/'.$var['img'].'\" /></li>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\techo '</ul>';\n\t\t\t\t\t\t\n\t\t\t\t\t\techo '</div>'; \n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\t// image \n\t\t\t\t\tcase 'image': \n\t\t\t\t\t\techo '\t<div class=\"single-image\">\n\t\t\t\t\t\t\t\t<input class=\"upload_image builder'.$field['id'].' '.$sendVal.'\" type=\"text\" name=\"builder-'.$meta['id'].''.$field['id'].'\" id=\"'.$meta['id'].'-'.$field['id'].'\" value=\"\" size=\"30\" />\n\t\t\t\t\t\t\t\t<input class=\"add_singleimage sr-button\" type=\"button\" value=\"Add Image\" /><br />\n\t\t\t\t\t\t\t\t<span class=\"preview_image\"><img class=\"'.$field['id'].'\" src=\"\" alt=\"\" /></span>\n\t\t\t\t\t\t</div>';\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t// gallery \n\t\t\t\t\tcase 'gallery': \n\t\t\t\t\t\techo '<div id=\"sortable'.$field['id'].'\" class=\"sortable-medias\">';\n\t\t\t\t\t\techo '\t<input class=\"add_image button\" type=\"button\" value=\"'.__(\"Add Images\", 'sr_avoc_theme').'\" />\n\t\t\t\t\t\t\t\t<textarea name=\"builder-'.$meta['id'].''.$field['id'].'\" id=\"'.$meta['id'].'-'.$field['id'].'\" class=\"media-gallery builder'.$field['id'].' '.$sendVal.'\" style=\"display:none;\"></textarea>';\n\t\t\t\t\t\techo '<ul id=\"sortable\" class=\"media-elements\">';\t\t\n\t\t\t\t\t echo '</ul>';\n\t\t\t\t\t\techo '</div>';\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t} // END switch\n\t\t\t\techo '<br><span class=\"sr_description\">'.$field['desc'].'</span>';\n\t\t\t\techo '</div>'; // End .form-val\n\t\t\t\t\n\t\t\t\techo '<div style=\"clear:both;\"></div></div>'; // END form-row\n\t\t\t\t\n\t\t\t\t} // END else hidinggroup\n\t\t\t\t\n\t\t\t} // END foreach create fields\n\t\t\t\n\t\t\techo '\n\t\t\t\t<div class=\"pagebuilder-insert\">\n\t\t\t\t\t<a href=\"'.$meta['id'].'\" id=\"insertbuilder_'.$meta['id'].'\" class=\"sr-builder-insert\">'.__(\"Add Element\", 'sr_avoc_theme').'</a>\n\t\t\t\t\t<a href=\"'.$meta['id'].'\" id=\"editbuilder_'.$meta['id'].'\" class=\"sr-builder-edit\">'.__(\"Edit Element\", 'sr_avoc_theme').'</a>\n\t\t\t\t</div>'; // END op-content\n\t\t\t\n\t\techo '</div>';\n\t\techo '</div>';\n\t\n\t} // END foreach ($pagebuildermeta as $meta) {\n\t\n\t// \t\t********\n\t\n\t//\t\tPagebuilder POPUP ($sr_meta_pagebuilder)\n\t\n\t// \t\t********\t\n\t\n\t\t\n\t\t\t\n\t\n\techo '</div>'; // END #sr-pagebuilder\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n}", "function makeForm() {\n if($this->table_title != '' ) {\n $db_obj = new db_class();\n $desc_table = $db_obj->tableDescription($this->table_title);\n $db_obj->closeDB();\n \n// showArray($desc_table);\n echo '<form id=\"generic_edit_form\" method=\"POST\" >';\n echo '<input type=\"hidden\" name=\"title_input\" value=\"name\"> '; // THIS MUST BE HERE FOR CLONABLE FORMS!!!\n echo '<input type=\"hidden\" name=\"table\" value=\"vendors\">'; // THE TABLE MUST BE LABELED\n echo '<b>This is a generic input</b> <input type=\"text\" name=\"generic\">' . \"\\n\";\n \n echo '<br><br><input type=\"submit\" >';\n echo '</form>';\n } else {\n echo '<h2>hello, form<h2>';\n }\n }", "public function outputSetupForm() {\n\t\t$this->_directFormHtml( 'webinarjamstudio' );\n\t}", "public function buildForm()\n {\n $this\n ->add(\n 'new_organization_group',\n 'collection',\n [\n 'type' => 'form',\n 'options' => [\n 'class' => 'App\\SuperAdmin\\Forms\\OrganizationGroupInformation',\n 'label' => false,\n ]\n ]\n )\n ->add(\n 'group_admin_information',\n 'collection',\n [\n 'type' => 'form',\n 'options' => [\n 'class' => 'App\\SuperAdmin\\Forms\\GroupAdmin',\n 'label' => false,\n ]\n ]\n )\n ->addSaveButton();\n }", "public function renderForm()\n {\n $lang = $this->context->language;\n\n $inputs[] = [\n 'type' => 'switch',\n 'label' => $this->l(\"Active\"),\n 'name' => 'active',\n 'values' => [\n [\n 'id' => 'active_on',\n 'value' => 1,\n ],\n [\n 'id' => 'active_off',\n 'value' => 0,\n ],\n ]\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Page Name'),\n 'name' => 'name',\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Meta Title'),\n 'name' => 'meta_title_lang',\n 'required' => true,\n 'id' => 'name',\n 'lang' => true,\n 'class' => 'copyMeta2friendlyURL',\n 'hint' => $this->l('Invalid characters:').' &lt;&gt;;=#{}',\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Meta Description'),\n 'name' => 'meta_description_lang',\n 'lang' => true,\n 'hint' => $this->l('Invalid characters:').' &lt;&gt;;=#{}',\n ];\n $inputs[] = [\n 'type' => 'tags',\n 'label' => $this->l('Meta Keywords'),\n 'name' => 'meta_keywords_lang',\n 'lang' => true,\n 'hint' => [\n $this->l('To add \"tags\" click in the field, write something, and then press \"Enter.\"'),\n $this->l('Invalid characters:').' &lt;&gt;;=#{}',\n ],\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Friendly URL'),\n 'name' => 'url',\n 'required' => true,\n 'hint' => $this->l('Only letters and the hyphen (-) character are allowed.'),\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Breadcrumb URL Parameters'),\n 'name' => 'breadcrumb_parameters',\n 'required' => false,\n 'hint' => $this->l('Parameters to be applied when rendering as a breadcrumb'),\n ];\n\n $inputs[] = [\n 'type' => 'code',\n 'mode' => 'css',\n 'label' => $this->l('Style'),\n 'name' => 'style',\n 'lang' => false,\n //'autoload_rte' => true,\n 'id' => 'style',\n 'enableBasicAutocompletion' => true,\n 'enableSnippets' => true,\n 'enableLiveAutocompletion' => true,\n 'maxLines' => 50,\n ];\n $inputs[] = [\n 'type' => 'code',\n 'mode' => 'html',\n 'label' => $this->l('Content'),\n 'name' => 'content_lang',\n 'lang' => true,\n //'autoload_rte' => true,\n 'id' => 'content',\n 'enableBasicAutocompletion' => true,\n 'enableSnippets' => true,\n 'enableLiveAutocompletion' => true,\n 'maxLines' => 70,\n ];\n\n\n $allPages = $this->module->getAllHTMLPages(true);\n array_unshift($allPages, '-');\n\n\n if ($this->display == 'edit') {\n $inputs[] = [\n 'type' => 'hidden',\n 'name' => 'id_page'\n ];\n $title = $this->l('Edit Page');\n $action = 'submitEditCustomHTMLPage';\n\n $pageId = Tools::getValue('id_page');\n\n $this->fields_value = $this->module->getHTMLPage($pageId);\n\n // Remove the current page from the list of pages\n foreach ($allPages as $i => $p) {\n if ($p != '-' && $p['id_page'] == $pageId) {\n unset($allPages[$i]);\n break;\n }\n }\n }\n else {\n\n }\n\n // Parent select\n $inputs[] = [\n 'type' => 'select',\n 'label' => $this->l('Parent'),\n 'name' => 'id_parent',\n 'options' => [\n 'query' => $allPages,\n 'id' => 'id_page',\n 'name' => 'name'\n ]\n ];\n //$this->fields_value['id_relatedTo'] = [];\n\n array_shift($allPages);\n\n // List of Pages this Page is related to\n $inputs[] = [\n 'type' => 'swap',\n 'label' => $this->l('Show On ($page->related[])'),\n 'multiple' => true,\n 'name' => 'id_relatedTo',\n 'options' => [\n 'query' => $allPages,\n 'id' => 'id_page',\n 'name' => 'name'\n ],\n 'hint' => $this->l('Makes this page show up on other pages (not as a child page but as a related page): $page->related[]')\n ];\n\n $inputs[] = [\n 'type' => 'html',\n 'html_content' => '<hr/>',\n 'name' => 'id_page',\n ];\n\n // List of Products\n $products = Product::getProducts($lang->id, 0, 1000, 'id_product', 'ASC');\n $inputs[] = [\n 'type' => 'swap',\n 'label' => $this->l('Products ($product or $products)'),\n 'name' => 'id_products',\n 'multiple' => true,\n 'options' => [\n 'query' => $products,\n 'id' => 'id_product',\n 'name' => 'name'\n ],\n 'hint' => $this->l('This will populate $products. If only one is selected then $product will be populated'),\n ];\n\n // List of Categories\n $categories = Category::getCategories($lang->id, true, false);\n $inputs[] = [\n 'type' => 'swap',\n 'label' => $this->l('Categories ($category or $categories)'),\n 'name' => 'id_categories',\n 'multiple' => true,\n 'options' => [\n 'query' => $categories,\n 'id' => 'id_category',\n 'name' => 'name'\n ],\n 'hint' => $this->l('This will populate $categories. If only one is selected then $category will be populated'),\n ];\n\n $this->fields_form = [\n 'legend' => [\n 'title' => $title,\n 'icon' => 'icon-cogs',\n ],\n 'input' => $inputs,\n 'buttons' => [\n 'save-and-stay' => [\n 'title' => $this->l('Save and Stay'),\n 'class' => 'btn btn-default pull-right',\n 'name' => $action.'AndStay',\n 'icon' => 'process-icon-save',\n 'type' => 'submit'\n ]\n\n ],\n 'submit' => [\n 'title' => $this->l('Save'),\n 'class' => 'btn btn-default pull-right',\n 'name' => $action,\n ],\n\n ];\n\n\n return parent::renderForm();\n }", "function makeForm() {\n?>\n <div id=\"form_wrap\">\n <a class=\"faux_button\" id=\"done_goback_button\" href=\"#\">Go Back</a>\n<?php if(! $this->is_find_form AND ! $this->is_new): ?>\n <button class=\"faux_button\" id=\"clone_this\" <?php if( $this->is_new == 1 ){ echo 'disabled';} ?> >Clone</button>\n <a class=\"faux_button\" href=\"/cancer_types/views_controllers/form_cancer_type.php?new=yes\">New Cancer Type</a>\n <span class=\"right\"><a class=\"faux_button\" id=\"delete\" href=\"#\">Delete</a></span>\n<?php elseif($this->is_find_form) : ?>\n <span style=\"float:right\">\n <button class=\"search_button\" id=\"search_button\" name=\"search_button\" >Search</button>\n <b>Match:</b> <select class=\"semi_faux\" id=\"conjunction\"><option value=\"OR\">Any</option><option value=\"AND\">All</option></select> Fields\n </span>\n <div style=\"clear:both\"></div>\n <p id=\"search_inform\"></p>\n<?php endif ?>\n\n <div class=\"clear\"></div>\n <br> \n <br>\n\n <?php \n // We don't want to go through the whole generic_update during a search \n if(! $this->is_find_form ):\n ?>\n <form method=\"post\" id=\"generic_edit_form\" class=\"generic_update\">\n <?php else: ?>\n <form method=\"post\" id=\"generic_find_form\" >\n <?php endif ?>\n \n<?php if(! $this->is_find_form ): ?>\n <input type=\"hidden\" name=\"id\" value=\"<?php echo $this->id ?>\">\n <span class=\"tag\">ID:</span> <b><?php echo $this->id ?></b><br><br>\n<?php endif ?>\n <input type=\"hidden\" name=\"is_new\" value=\"<?php echo $this->is_new ?>\">\n <input type=\"hidden\" name=\"table\" value=\"cancer_type\">\n <input type=\"hidden\" name=\"table_display\" value=\"<?php echo $this->table_display ?>\">\n <input type=\"hidden\" name=\"title_input\" value=\"cancer_type\"> \n \n \n <span class=\"tag\">Cancer Type:</span> <input class=\"info\" type=\"text\" name=\"cancer_type\" size=\"95\" value=\"<?php echo $this->cancer_type ?>\"> <br>\n <span class=\"tag\">Synopsis</span> <input class=\"info\" type=\"text\" name=\"synopsis\" size=\"95\" value=\"<?php echo $this->synopsis ?>\"> \n \n <span class=\"tag_long\">Primary Anatomical Site</span> <?php $this->buildGenericSelect('primary_anatomical_site', 'primary_anatomical_site', 'table_index', 'descriptor') ?>\n<!-- \n <span class=\"leftForm\"></span><br>\n <span class=\"rightForm\"></span>\n -->\n <br> <br>\n <span class=\"tag\">Overview:</span><textarea class=\"form_text\" name=\"overview\"><?php echo $this->overview; ?></textarea>\n<br><br>\n <button class=\"faux_button\" id=\"undo_generic_update\" >Undo</button>\n </form>\n\n </div>\n<?php\n$this->deleteInfo();\n }", "function main_form($type='edit')\n\t{\n\t\t$this->ipsclass->input['id'] = intval($this->ipsclass->input['id']);\n\t\t\n\t\tif ($type == 'edit')\n\t\t{\n\t\t\tif ( ! $this->ipsclass->input['id'] )\n\t\t\t{\n\t\t\t\t$this->ipsclass->admin->error(\"No custom field id was passed to edit.\");\n\t\t\t}\n\t\t\t\n\t\t\t$form_code = 'doedit';\n\t\t\t$button = 'Complete Edit';\n\t\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$form_code = 'doadd';\n\t\t\t$button = 'Add Field';\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Get field from db\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( $this->ipsclass->input['id'] )\n\t\t{\n\t\t\t$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'downloads_cfields', 'where' => \"cf_id=\".intval($this->ipsclass->input['id']) ) );\n\t\t\t$this->ipsclass->DB->simple_exec();\n\t\t\n\t\t\t$fields = $this->ipsclass->DB->fetch_row();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$fields = array();\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Top 'o 'the mornin'\n\t\t//-----------------------------------------\n\t\t\n\t\tif ($type == 'edit')\n\t\t{\n\t\t\t$this->ipsclass->admin->page_title = \"Editing Custom Field \".$fields['cf_title'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->ipsclass->admin->page_title = 'Adding a new custom field';\n\t\t\t$fields['cf_title'] = '';\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Wise words\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->admin->page_detail = \"Please double check the information before submitting the form.\";\n\t\t\n\t\t//-----------------------------------------\n\t\t// Start form\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , $form_code ),\n\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t 2 => array( 'act' , 'downloads' ),\n\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t 3 => array( 'id' , $this->ipsclass->input['id'] ),\n\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t 4 => array( 'section', $this->ipsclass->section_code ),\n\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t 5 => array( 'req'\t , 'customfields'\t),\n\t\t\t\t\t\t\t\t\t ) );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Format...\n\t\t//-----------------------------------------\n\t\t\t\t\t\t\t\t\t \n\t\t$fields['cf_content'] = $this->func->method_format_content_for_edit($fields['cf_content'] );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Tbl (no ae?)\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->adskin->td_header[] = array( \"&nbsp;\" , \"40%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"&nbsp;\" , \"60%\" );\n\t\t\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->start_table( \"Field Settings\" );\n\t\t\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<b>Field Title</b><div class='graytext'>Max characters: 200</div>\" ,\n\t\t\t\t\t\t\t\t\t\t\t\t $this->ipsclass->adskin->form_input(\"cf_title\", $fields['cf_title'] )\n\t\t\t\t\t\t\t\t\t ) );\n\t\t\t\t\t\t\t\t\t \n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<b>Description</b><div class='graytext'>Max Characters: 250</div>\" ,\n\t\t\t\t\t\t\t\t\t\t\t\t $this->ipsclass->adskin->form_input(\"cf_desc\", $fields['cf_desc'] )\n\t\t\t\t\t\t\t\t\t ) );\n\t\t\t\t\t\t\t\t\t \n\t\t//-----------------------------------------\n\t\t// Apply to categories\n\t\t//-----------------------------------------\n\t\t\n\t\t$sel_menu = \"<select name='cats_apply[]' size='5' multiple='multiple'>\\n\";\n\t\t\n\t\t$cur \t = $this->lib->get_cats_cfield( $fields['cf_id'] );\n\t\t$opts\t = $this->lib->cat_jump_list( 1, 'none', $cur );\n\n\t\tif( is_array($opts) AND count($opts) )\n\t\t{\n\t\t\tforeach( $opts as $cdata )\n\t\t\t{\n\t\t\t\tif( is_array($cur) AND in_array( $cdata[0], $cur ) )\n\t\t\t\t{\n\t\t\t\t\t$cdata[2] = \" selected='selected'\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$sel_menu .= \"<option value='{$cdata[0]}'{$cdata[2]}>{$cdata[1]}</option>\\n\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t$sel_menu .= \"</select>\";\n\t\t\t\n\t\t\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<b>Use in Categories</b><div class='graytext'>Select the categories to use this field in</div>\" ,\n\t\t\t\t\t\t\t\t\t\t\t\t $sel_menu\n\t\t\t\t\t\t\t\t\t ) );\n\t\t\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<b>Field Type</b>\" ,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t $this->ipsclass->adskin->form_dropdown(\"cf_type\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 0 => array( 'text' , 'Text Input' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 1 => array( 'drop' , 'Drop Down Box' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 2 => array( 'area' , 'Text Area' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $fields['cf_type'] )\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t) );\n\t\t\t\t\t\t\t\t\t \n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<b>Maximum Input</b><div class='graytext'>For text input and text areas (in characters)</div>\" ,\n\t\t\t\t\t\t\t\t\t\t\t\t $this->ipsclass->adskin->form_input(\"cf_max_input\", $fields['cf_max_input'] )\n\t\t\t\t\t\t\t\t\t ) );\n\t\t\t\t\t\t\t\t\t \n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<b>Expected Input Format</b><div class='graytext'>Use: <b>a</b> for alpha characters<br />Use: <b>n</b> for numerics.<br />Example, for credit card numbers: nnnn-nnnn-nnnn-nnnn<br />Example, Date of Birth: nn-nn-nnnn<br />Leave blank to accept any input</div>\" ,\n\t\t\t\t\t\t\t\t\t\t\t\t $this->ipsclass->adskin->form_input(\"cf_input_format\", $fields['cf_input_format'] )\n\t\t\t\t\t\t\t\t\t ) );\n\t\t\t\t\t\t\t\t\t \n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<b>Option Content (for drop downs)</b><div class='graytext'>In sets, one set per line<br>Example for 'Software Version' field:<br>10=1.0<br>20=2.0<br>na=Not Applicable<br>Will produce:<br><select name='version'><option value='10'>1.0</option><option value='20'>2.0</option><option value='na'>Not Applicable</option></select><br>10,20, or na stored in database. When showing field on download page, will use value from pair (20=2.0, shows '2.0')</div>\" ,\n\t\t\t\t\t\t\t\t\t\t\t\t $this->ipsclass->adskin->form_textarea(\"cf_content\", $fields['cf_content'] )\n\t\t\t\t\t\t\t\t\t ) );\n\t\t\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<b>Field MUST be completed and not left empty?</b><div class='graytext'>If 'yes', an error will be shown if this field is not completed.</div>\" ,\n\t\t\t\t\t\t\t\t\t\t\t\t $this->ipsclass->adskin->form_yes_no(\"cf_not_null\", $fields['cf_not_null'] )\n\t\t\t\t\t\t\t\t\t ) );\n\t\t\t\t\t\t\t\t\t \n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<b>Include field in auto-generated topics?</b><div class='graytext'>Only applies to categories that automatically generate topics for file submissions</div>\" ,\n\t\t\t\t\t\t\t\t\t\t\t\t $this->ipsclass->adskin->form_yes_no(\"cf_topic\", $fields['cf_topic'] )\n\t\t\t\t\t\t\t\t\t ) );\n\t\t\t\t\t\t\t\t\t \n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<b>Allow users to search in these fields?</b>\" ,\n\t\t\t\t\t\t\t\t\t\t\t\t $this->ipsclass->adskin->form_yes_no(\"cf_search\", $fields['cf_search'] )\n\t\t\t\t\t\t\t\t\t ) );\n\t\t\t\t\t\t\t\t\t \n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->end_form($button);\n\t\t\t\t\t\t\t\t\t\t \n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->end_table();\n\t\t\n\t\t$this->ipsclass->admin->output();\n\t\t\t\n\t}", "function toString()\n\t{\n\t\t// Start main form attributes\n\t\t$formAttributes = array();\n\t\t$formAttributes['method'] = 'POST';\t\n\t\t\n\t\t// Use custom action attribute?\n\t\tif ($this->actionURL) {\n\t\t\t$formAttributes['action'] = $this->actionURL;\n\t\t} else {\n\t\t\t// Current page\n\t\t\t$formAttributes['action'] = str_replace( '%7E', '~', $_SERVER['REQUEST_URI']);\n\t\t}\n\t\t\n\t\t// Add the form name if specified\n\t\t$namestring = \"\";\n\t\tif ($this->formName) {\n\t\t\t$formAttributes['name'] = $this->formName;\t\n\t\t\t$formAttributes['id'] = $this->formName;\n\t\t}\n\t\t\n\t\t// Need extra attribute if there's a upload field\n\t\tif ($this->haveFileUploadField()) {\n\t\t\t$formAttributes['enctype'] = 'multipart/form-data';\n\t\t}\n\t\t\n\t\t// Render form with all attributes\n\t\t$attributeString = false;\n\t\tforeach($formAttributes as $name => $value) {\n\t\t\t$attributeString .= sprintf('%s=\"%s\" ', $name, $value);\n\t\t}\n\t\t\n\t\t// Start form\n\t\t$resultString = \"\\n<form $attributeString>\\n\";\n\t\t\n\t\t// Is first item a break? If so, render it.\n\t\tif (isset($this->breakList[FORM_BUILDER_START_OF_FORM])) {\n\t\t\t$resultString .= $this->createTableHeader(array('id' => $this->breakList[FORM_BUILDER_START_OF_FORM]['sectionid']), $this->breakList[FORM_BUILDER_START_OF_FORM]['prefixHTML']);\n\t\t} else {\n\t\t\t$resultString .= $this->createTableHeader();\n\t\t}\t\t\n\t\t\n\t\t// Now add all form elements\n\t\tforeach ($this->elementList as $element)\n\t\t{\n\t\t\t// Hidden elements are added later\n\t\t\tif ($element->type == 'hidden') {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// Render form element\t\t\t\t\n\t\t\t$resultString .= $element->toString($this->showRequiredLabels);\n\n\t\t\t// Add section breaks if this element is in the break list.\n\t\t\t// Add break after element HTML\n\t\t\tif (in_array($element->name, array_keys($this->breakList)))\n\t\t\t{\n\t\t\t\t$resultString .= $this->createTableFooter();\n\t\t\t\t$resultString .= $this->createTableHeader(array('id' => $this->breakList[$element->name]['sectionid']), $this->breakList[$element->name]['prefixHTML']);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t$resultString .= $this->createTableFooter();\n\t\t\n\t\t// Button area\n\t\t$resultString .= '<p class=\"submit\">'.\"\\n\";\n\t\t\n\t\t// Add submit button\n\t\t$resultString .= \"\\t\".'<input class=\"button-primary\" type=\"submit\" name=\"Submit\" value=\"'.$this->submitlabel.'\" />'.\"\\n\";\n\t\t\n\t\t// Add remaining buttons\n\t\tforeach ($this->buttonList as $buttonName => $buttonLabel) {\n\t\t\t$resultString .= \"\\t<input type=\\\"submit\\\" class=\\\"button-secondary\\\" name=\\\"$buttonName\\\" value=\\\"$buttonLabel\\\" />\\n\";\t\t\n\t\t}\n\t\t\t\t\n\t\t// Hidden field to indicate update is happening\n\t\t$resultString .= sprintf(\"\\t\".'<input type=\"hidden\" name=\"update\" value=\"%s\" />'.\"\\n\", $this->formName);\n\t\t\t\t\n\t\t// Add any extra hidden elements\n\t\tforeach ($this->elementList as $element)\n\t\t{\n\t\t\t// Leave all hidden elements until the end.\n\t\t\tif ($element->type == 'hidden') {\t\n\t\t\t\t$resultString .= \"\\t\".'<input type=\"hidden\" name=\"'.$element->name.'\" value=\"'.$element->value.'\" />'.\"\\n\";\n\t\t\t}\n\t\t}\t\t\n\t\t\n\t\t$resultString .= '</p>'.\"\\n\";\n\t\t\t\t\t\t\t\n\t\t// End form\n\t\t$resultString .= \"\\n</form>\\n\";\n\t\t\n\t\treturn $resultString;\n\t}", "public function buildForm()\n {\n $this->add('organization_identifier_code', 'text', ['label' => trans('elementForm.organisation_identifier_code')])\n ->add('provider_activity_id', 'text', ['label' => trans('elementForm.provider_activity_id')])\n ->addSelect('type', $this->getCodeList('OrganisationType', 'Activity'), trans('elementForm.type'), $this->addHelpText('Activity_ParticipatingOrg-type'))\n ->addNarrative('provider_org_narrative')\n ->addAddMoreButton('add_provider_org_narrative', 'provider_org_narrative');\n }", "private function _saveForm()\r\n\t{\r\n\t\tglobal $action, $whmcs;\r\n\t\t\r\n\t\t$db\t\t= dunloader( 'database', true );\r\n\t\t$input\t= $whmcs->input;\r\n\t\t\r\n\t\tswitch ( $action ) {\r\n\t\t\t// Save the theme settings\r\n\t\t\tcase 'themes' :\r\n\t\t\t\t\r\n\t\t\t\t// Check license and task\r\n\t\t\t\tif (! dunloader( 'license', 'themer' )->isValid() ) return;\r\n\t\t\t\tif (! array_key_exists( 'task', $input ) ) return;\r\n\t\t\t\t\r\n\t\t\t\tif ( array_key_exists( 'tid', $input ) ) $tid = $input['tid'];\r\n\t\t\t\t\r\n\t\t\t\tswitch( $input['task'] ) {\r\n\t\t\t\t\tcase 'addnew' :\r\n\t\t\t\t\t\t$db->setQuery( \"SELECT `params` FROM `mod_themer_themes` WHERE `id` = '1'\" );\r\n\t\t\t\t\t\t$params\t= $db->loadResult();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$db->setQuery( \"INSERT INTO `mod_themer_themes` (`name`, `params` ) VALUES ('\" . $input['name'] . \"', '\" . $params . \"' ); \");\r\n\t\t\t\t\t\t$db->query();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'delete' :\r\n\t\t\t\t\t\t$db->setQuery( \"DELETE FROM `mod_themer_themes` WHERE `id` = '\" . $tid . \"'\" );\r\n\t\t\t\t\t\t$db->query();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'makedefault' :\r\n\t\t\t\t\t\t$db->setQuery( \"UPDATE `mod_themer_settings` SET `value` = '\" . $tid . \"' WHERE `key` = 'usetheme'\" );\r\n\t\t\t\t\t\t$db->query();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'copytheme' :\r\n\t\t\t\t\t\t$db->setQuery( \"SELECT * FROM `mod_themer_themes` WHERE `id` = '\" . $tid . \"'\" );\r\n\t\t\t\t\t\t$theme\t= $db->loadObject();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$db->setQuery( \"INSERT INTO `mod_themer_themes` (`name`, `description`, `params` ) VALUES ('\" . $theme->name . \" (copy)', '\" . $theme->description . \"', '\" . $theme->params . \"' ); \");\r\n\t\t\t\t\t\t$db->query();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tcase 'edittheme' :\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$params\t= array('fullwidth' => null,'contentbg' => null, 'font' => null,'logo' => null,'bodytype' => null,'bodyoptnsolid'\t=> null,'bodyoptnfrom' => null,'bodyoptnto' => null,'bodyoptndir' => null,'bodyoptnpattern' => null,'bodyoptnimage' => null,'alinks'\t=> null,'alinksstd' => null,'alinksvis' => null,'alinkshov' => null,'navbarfrom' => null,'navbarto' => null,'navbartxt' => null,'navbarhov' => null,'navbardropbg' => null,'navbardroptxt' => null,'navbardrophl' => null,'txtelemgffont' => null,'txtelemgfsize' => null,'txtelemgfcolor' => null,'txtelemh1font' => null,'txtelemh1size' => null,'txtelemh1color' => null,'txtelemh2font' => null,'txtelemh2size' => null,'txtelemh2color' => null,'txtelemh3font' => null,'txtelemh3size' => null,'txtelemh3color' => null,'txtelemh4font' => null,'txtelemh4size' => null,'txtelemh4color' => null,'txtelemh5font' => null,'txtelemh5size' => null,'txtelemh5color' => null,'txtelemh6font' => null,'txtelemh6size' => null,'txtelemh6color' => null,);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tforeach( $input as $key => $value ) {\r\n\t\t\t\t\t\t\tif (! array_key_exists( $key, $params ) ) continue;\r\n\t\t\t\t\t\t\t$params[$key] = $value;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$paramstring\t= json_encode( $params );\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$db->setQuery( \"UPDATE `mod_themer_themes` SET `name` = '\" . $input['name'] . \"', `description` = '\" . $input['description'] . \"', `params` = '{$paramstring}' WHERE `id` = '{$tid}'\" );\r\n\t\t\t\t\t\t$db->query();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Check for save and close\r\n\t\t\t\t\t\tif ( array_key_exists( 'saveandclose', $input ) ) {\r\n\t\t\t\t\t\t\t$whmcs->input['task'] = null;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\r\n\t\t\t\t}\t// End Task Switch;\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t// Save our configuration settings\r\n\t\t\tcase 'config' :\r\n\t\t\t\t\r\n\t\t\t\t// Check license\r\n\t\t\t\tif (! dunloader( 'license', 'themer' )->isValid() ) return;\r\n\t\t\t\t\r\n\t\t\t\tif (! array_key_exists( 'restrictuser', $input ) ) $input['restrictuser'] = array();\r\n\t\t\t\t\r\n\t\t\t\t$config\t= array( 'enable', 'restrictip', 'restrictuser', 'fontselect' );\r\n\t\t\t\t\r\n\t\t\t\tforeach ( $config as $item ) {\r\n\t\t\t\t\t$key = $item; $value = $input[$item];\r\n\t\t\t\t\tif ( is_array( $value ) ) $value = implode( '|', $value );\r\n\t\t\t\t\t$db->setQuery( \"UPDATE `mod_themer_settings` SET `value` = \" . $db->Quote( $value ) . \" WHERE `key` = '{$key}'\" );\r\n\t\t\t\t\t$db->query();\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'license' :\r\n\t\t\t\t$save = array( 'license' => $input['license'], 'localkey' => null );\r\n\t\t\t\t\r\n\t\t\t\tforeach ( $save as $key => $value ) {\r\n\t\t\t\t\t$db->setQuery( \"UPDATE `mod_themer_settings` SET `value` = '{$value}' WHERE `key` = '{$key}'\" );\r\n\t\t\t\t\t$db->query();\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}", "public function generate()\n {\n switch ($this->sColumn) {\n case 'description':\n $this->oForm->addElement(\n new Textarea(\n t('Description:'),\n $this->sColumn,\n [\n 'id' => $this->getFieldId('str'),\n 'onblur' => 'CValid(this.value,this.id,20,4000)',\n 'value' => $this->sVal,\n 'validation' => new Str(20, 4000),\n 'required' => 1\n ]\n )\n );\n $this->addCheckErrSpan('str');\n break;\n\n case 'punchline':\n $this->oForm->addElement(\n new Textbox(\n t('Punchline/Headline:'),\n 'punchline',\n [\n 'id' => $this->getFieldId('str'),\n 'onblur' => 'CValid(this.value,this.id,5,150)',\n 'value' => $this->sVal,\n 'validation' => new Str(5, 150)\n ]\n )\n );\n $this->addCheckErrSpan('str');\n break;\n\n case 'country':\n $this->oForm->addElement(\n new Country(\n t('Country:'),\n $this->sColumn,\n [\n 'id' => $this->getFieldId('str'),\n 'value' => $this->sVal,\n 'required' => 1\n ]\n )\n );\n break;\n\n case 'city':\n $this->oForm->addElement(\n new Textbox(\n t('City:'),\n $this->sColumn,\n [\n 'id' => $this->getFieldId('str'),\n 'onblur' => 'CValid(this.value,this.id,2,150)',\n 'value' => $this->sVal,\n 'validation' => new Str(2, 150),\n 'required' => 1\n ]\n )\n );\n $this->addCheckErrSpan('str');\n break;\n\n case 'state':\n $this->oForm->addElement(\n new Textbox(\n t('State/Province:'),\n $this->sColumn,\n [\n 'id' => $this->getFieldId('str'),\n 'onblur' => 'CValid(this.value,this.id,2,150)',\n 'value' => $this->sVal,\n 'validation' => new Str(2, 150)\n ]\n )\n );\n $this->addCheckErrSpan('str');\n break;\n\n case 'zipCode':\n $this->oForm->addElement(\n new Textbox(\n t('Postal Code:'),\n $this->sColumn,\n [\n 'id' => $this->getFieldId('str'),\n 'onblur' => 'CValid(this.value,this.id,2,15)',\n 'value' => $this->sVal,\n 'validation' => new Str(2, 15)\n ]\n )\n );\n $this->addCheckErrSpan('str');\n break;\n\n case 'middleName':\n $this->oForm->addElement(\n new Textbox(\n t('Middle Name:'),\n $this->sColumn,\n [\n 'id' => $this->getFieldId('name'),\n 'onblur' => 'CValid(this.value,this.id)',\n 'value' => $this->sVal,\n 'validation' => new Name\n ]\n )\n );\n $this->addCheckErrSpan('name');\n break;\n\n case 'height':\n $this->oForm->addElement(\n new Height(\n t('Height:'),\n $this->sColumn,\n [\n 'value' => $this->sVal\n ]\n )\n );\n break;\n\n case 'weight':\n $this->oForm->addElement(\n new Weight(\n t('Weight:'),\n $this->sColumn,\n [\n 'value' => $this->sVal\n ]\n )\n );\n break;\n\n case 'website':\n case 'socialNetworkSite':\n $sLabel = $this->sColumn === 'socialNetworkSite' ? t('Social Media Profile:') : t('Website:');\n $sDesc = $this->sColumn === 'socialNetworkSite' ? t('The URL of your social profile, such as Facebook, Instagram, Snapchat, LinkedIn, ...') : t('Your Personal Website/Blog (any promotional/affiliated contents will be removed)');\n $this->oForm->addElement(\n new Url(\n $sLabel,\n $this->sColumn, [\n 'id' => $this->getFieldId('url'),\n 'onblur' => 'CValid(this.value,this.id)',\n 'description' => $sDesc,\n 'value' => $this->sVal\n ]\n )\n );\n $this->addCheckErrSpan('url');\n break;\n\n case 'phone':\n $this->oForm->addElement(\n new Phone(\n t('Phone Number:'),\n $this->sColumn,\n array_merge(\n [\n 'id' => $this->getFieldId('phone'),\n 'onblur' => 'CValid(this.value, this.id)',\n 'value' => $this->sVal,\n ],\n self::setCustomValidity(\n t('Enter full number with area code.')\n ),\n )\n )\n );\n $this->addCheckErrSpan('phone');\n break;\n\n default:\n $sLangKey = strtolower($this->sColumn);\n $sClass = '\\PFBC\\Element\\\\' . $this->getFieldType();\n $this->oForm->addElement(new $sClass(t($sLangKey), $this->sColumn, ['value' => $this->sVal]));\n }\n\n return $this->oForm;\n }", "private function generateFormCodeAction()\n {\n $codesAction = $this->getAllCodesAction();\n $inputs = array();\n foreach ($codesAction as $code => $value) {\n $inputs[] = array(\n 'type' => 'select',\n 'label' => $value['description'] . ' (' . $value['name'] . ')',\n 'name' => 'ca_' . $value['id_code_action'],\n 'options' => array(\n 'query' => $codesAction,\n 'id' => 'id_code_action',\n 'name' => 'name'\n ),\n );\n }\n $fields_form = array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Groupement des codes action.'),\n 'icon' => 'icon-cogs'\n ),\n 'input' => $inputs,\n 'submit' => array(\n 'title' => $this->l('Save'),\n 'class' => 'btn btn-default pull-right',\n 'name' => 'submitUpdateCodeAction'\n )\n )\n );\n\n $lang = new Language((int)Configuration::get('PS_LANG_DEFAULT'));\n $helper = new HelperForm();\n $helper->default_form_language = $lang->id;\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false) . '&configure=' . $this->name\n . '&tab_module=' . $this->tab . '&module_name=' . $this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigCodeAction(),\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id\n );\n return $helper->generateForm(array($fields_form));\n\n }", "private function getFormItBuilderOutput(){\n\t\t$s_submitVar = 'submitVar_'.$this->_id;\n\t\t$b_customSubmitVar=false;\n\t\tif(empty($this->_submitVar)===false){\n\t\t\t$s_submitVar = $this->_submitVar;\n\t\t\t$b_customSubmitVar=true;\n\t\t}\n\t\t$s_recaptchaJS='';\n\t\t$b_posted = false;\n\t\tif(isset($_REQUEST[$s_submitVar])===true){\n\t\t\t$b_posted=true;\n\t\t}\n\t\t$nl=\"\\r\\n\";\n\n\t\t//process and add form rules\n\t\t$a_fieldProps=array();\n\t\t$a_fieldProps_jqValidate=array();\n\t\t$a_fieldProps_jqValidateGroups=array();\n\t\t$a_fieldProps_errstringFormIt=array();\n\t\t$a_fieldProps_errstringJq=array();\n\t\t\n\t\t$a_formProps=array();\n\t\t$a_formProps_custValidate=array();\n\t\t$a_formPropsFormItErrorStrings=array();\n\n\t\tforeach($this->_rules as $rule){\n\t\t\t$o_elFull = $rule->getElement();\n\t\t\tif(is_array($o_elFull)===true){\n\t\t\t\t$o_el = $o_elFull[0];\n\t\t\t}else{\n\t\t\t\t$o_el = $o_elFull;\n\t\t\t}\n\t\t\t$elId = $o_el->getId();\n\t\t\t$elName = $o_el->getName();\n\t\t\tif(isset($a_fieldProps[$elId])===false){\n\t\t\t\t$a_fieldProps[$elId]=array();\n\t\t\t}\n\t\t\tif(isset($a_fieldProps[$elId])===false){\n\t\t\t\t$a_fieldProps[$elId]=array();\n\t\t\t}\n\t\t\tif(isset($a_fieldProps_jqValidate[$elId])===false){\n\t\t\t\t$a_fieldProps_jqValidate[$elId]=array();\n\t\t\t}\n\t\t\tif(isset($a_fieldProps_errstringFormIt[$elId])===false){\n\t\t\t\t$a_fieldProps_errstringFormIt[$elId]=array();\n\t\t\t}\n\t\t\tif(isset($a_fieldProps_errstringJq[$elId])===false){\n\t\t\t\t$a_fieldProps_errstringJq[$elId]=array();\n\t\t\t}\n\t\t\tif(isset($a_formProps_custValidate[$elId])===false){\n\t\t\t\t$a_formProps_custValidate[$elId]=array();\n\t\t\t}\n\t\t\t\n\t\t\t$s_validationMessage=$rule->getValidationMessage();\n\t\t\tswitch($rule->getType()){\n\t\t\t\tcase FormRuleType::email:\n\t\t\t\t\t$a_fieldProps[$elId][] = 'email';\n\t\t\t\t\t$a_fieldProps_errstringFormIt[$elId][] = 'vTextEmailInvalid=`'.$s_validationMessage.'`';\n\t\t\t\t\t$a_fieldProps_jqValidate[$elName][] = 'email:true';\n\t\t\t\t\t$a_fieldProps_errstringJq[$elName][] = 'email:\"'.$s_validationMessage.'\"';\n\t\t\t\t\tbreak;\n\t\t\t\tcase FormRuleType::fieldMatch:\n\t\t\t\t\t$a_fieldProps[$elId][] = 'password_confirm=^'.$o_elFull[1]->getId().'^';\n\t\t\t\t\t$a_fieldProps_errstringFormIt[$elId][] = 'vTextPasswordConfirm=`'.$s_validationMessage.'`';\n\t\t\t\t\t$a_fieldProps_jqValidate[$elName][] = 'equalTo:\"#'.$o_elFull[1]->getId().'\"';\n\t\t\t\t\t$a_fieldProps_errstringJq[$elName][] = 'equalTo:\"'.$s_validationMessage.'\"';\n\t\t\t\t\tbreak;\n\t\t\t\tcase FormRuleType::maximumLength:\n\t\t\t\t\tif(is_a($o_el, 'FormItBuilder_elementCheckboxGroup')){\n\t\t\t\t\t\t$a_formProps_custValidate[$elId][]=array('type'=>'checkboxGroup','maxLength'=>$rule->getValue(),'errorMessage'=>$s_validationMessage);\n\t\t\t\t\t\t$a_fieldProps[$elId][] = 'FormItBuilder_customValidation';\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$a_fieldProps[$elId][] = 'maxLength=^'.$rule->getValue().'^';\n\t\t\t\t\t\t$a_fieldProps_errstringFormIt[$elId][] = 'vTextMaxLength=`'.$s_validationMessage.'`';\n\t\t\t\t\t}\n\t\t\t\t\t$a_fieldProps_jqValidate[$elName][] = 'maxlength:'.$rule->getValue();\n\t\t\t\t\t$a_fieldProps_errstringJq[$elName][] = 'maxlength:\"'.$s_validationMessage.'\"';\n\t\t\t\t\tbreak;\n\t\t\t\tcase FormRuleType::maximumValue:\n\t\t\t\t\t$a_fieldProps[$elId][] = 'maxValue=^'.$rule->getValue().'^';\n\t\t\t\t\t$a_fieldProps_errstringFormIt[$elId][] = 'vTextMaxValue=`'.$s_validationMessage.'`';\n\t\t\t\t\t$a_fieldProps_jqValidate[$elName][] = 'max:'.$rule->getValue();\n\t\t\t\t\t$a_fieldProps_errstringJq[$elName][] = 'max:\"'.$s_validationMessage.'\"';\n\t\t\t\t\tbreak;\n\t\t\t\tcase FormRuleType::minimumLength:\n\t\t\t\t\tif(is_a($o_el, 'FormItBuilder_elementCheckboxGroup')){\n\t\t\t\t\t\t$a_formProps_custValidate[$elId][]=array('type'=>'checkboxGroup','minLength'=>$rule->getValue(),'errorMessage'=>$s_validationMessage);\n\t\t\t\t\t\t$a_fieldProps[$elId][] = 'FormItBuilder_customValidation';\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$a_formProps_custValidate[$elId][]=array('type'=>'textfield','minLength'=>$rule->getValue(),'errorMessage'=>$s_validationMessage);\n\t\t\t\t\t\t$a_fieldProps[$elId][] = 'FormItBuilder_customValidation';\n\t\t\t\t\t}\n\t\t\t\t\t//Made own validation rule cause FormIt doesnt behave with required.\n\t\t\t\t\t//$a_fieldProps_errstringFormIt[$elId][] = 'vTextMinLength=`'.$s_validationMessage.'`';\n\t\t\t\t\t$a_fieldProps_jqValidate[$elName][] = 'minlength:'.$rule->getValue();\n\t\t\t\t\t$a_fieldProps_errstringJq[$elName][] = 'minlength:\"'.$s_validationMessage.'\"';\n\t\t\t\t\tbreak;\n\t\t\t\tcase FormRuleType::minimumValue:\n\t\t\t\t\t$a_fieldProps[$elId][] = 'minValue=^'.$rule->getValue().'^';\n\t\t\t\t\t$a_fieldProps_errstringFormIt[$elId][] = 'vTextMinValue=`'.$s_validationMessage.'`';\n\t\t\t\t\t$a_fieldProps_jqValidate[$elName][] = 'min:'.$rule->getValue();\n\t\t\t\t\t$a_fieldProps_errstringJq[$elName][] = 'min:\"'.$s_validationMessage.'\"';\n\t\t\t\t\tbreak;\n\t\t\t\tcase FormRuleType::numeric:\n\t\t\t\t\t$a_fieldProps[$elId][] = 'isNumber';\n\t\t\t\t\t$a_fieldProps_errstringFormIt[$elId][] = 'vTextIsNumber=`'.$s_validationMessage.'`';\n\t\t\t\t\t$a_fieldProps_jqValidate[$elName][] = 'digits:true';\n\t\t\t\t\t$a_fieldProps_errstringJq[$elName][] = 'digits:\"'.$s_validationMessage.'\"';\n\t\t\t\t\tbreak;\n\t\t\t\tcase FormRuleType::required:\n\t\t\t\t\tif(is_a($o_el, 'FormItBuilder_elementMatrix')){\n\t\t\t\t\t\t$s_type=$o_el->getType();\n\t\t\t\t\t\t$a_formProps_custValidate[$elId][]=array('type'=>'elementMatrix_'.$s_type,'required'=>true,'errorMessage'=>$s_validationMessage);\n\t\t\t\t\t\t$a_fieldProps[$elId][] = 'FormItBuilder_customValidation';\n\t\t\t\t\t\t$a_rows = $o_el->getRows();\n\t\t\t\t\t\t$a_columns = $o_el->getColumns();\n\t\t\t\t\t\t$a_namesForGroup=array();\n\t\t\t\t\t\tswitch($s_type){\n\t\t\t\t\t\t\tcase 'text':\n\t\t\t\t\t\t\t\tfor($row_cnt=0; $row_cnt<count($a_rows);$row_cnt++){\n\t\t\t\t\t\t\t\t\tfor($col_cnt=0; $col_cnt<count($a_columns); $col_cnt++){\n\t\t\t\t\t\t\t\t\t\t$a_namesForGroup[]=$elName.'_'.$row_cnt.'_'.$col_cnt;\n\t\t\t\t\t\t\t\t\t\t$a_fieldProps_jqValidate[$elName.'_'.$row_cnt.'_'.$col_cnt][] = 'required:true';\n\t\t\t\t\t\t\t\t\t\t$a_fieldProps_errstringJq[$elName.'_'.$row_cnt.'_'.$col_cnt][] = 'required:\"'.$s_validationMessage.'\"';\n\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'radio':\n\t\t\t\t\t\t\t\tfor($row_cnt=0; $row_cnt<count($a_rows);$row_cnt++){\n\t\t\t\t\t\t\t\t\t$a_namesForGroup[]=$elName.'_'.$row_cnt;\n\t\t\t\t\t\t\t\t\t$a_fieldProps_jqValidate[$elName.'_'.$row_cnt][] = 'required:true';\n\t\t\t\t\t\t\t\t\t$a_fieldProps_errstringJq[$elName.'_'.$row_cnt][] = 'required:\"'.$s_validationMessage.'\"';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'check':\n\t\t\t\t\t\t\t\tfor($row_cnt=0; $row_cnt<count($a_rows);$row_cnt++){\n\t\t\t\t\t\t\t\t\t$s_fieldName = $elName.'_'.$row_cnt.'[]';\n\t\t\t\t\t\t\t\t\t$a_namesForGroup[]=$s_fieldName;\n\t\t\t\t\t\t\t\t\t$a_fieldProps_jqValidate[$s_fieldName][] = 'required:true';\n\t\t\t\t\t\t\t\t\t$a_fieldProps_errstringJq[$s_fieldName][] = 'required:\"'.$s_validationMessage.'\"';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$a_fieldProps_jqValidateGroups[$elName]=implode(' ',$a_namesForGroup);\n\t\t\t\t\t}else if(is_a($o_el, 'FormItBuilder_elementDate')){\n\t\t\t\t\t\t$a_formProps_custValidate[$elId][]=array('type'=>'elementDate','required'=>true,'errorMessage'=>$s_validationMessage);\n\t\t\t\t\t\t$a_fieldProps[$elId][] = 'FormItBuilder_customValidation';\n\t\t\t\t\t\t$a_fieldProps_jqValidate[$elName.'_0'][] = 'required:true,dateElementRequired:true';\n\t\t\t\t\t\t$a_fieldProps_errstringJq[$elName.'_0'][] = 'required:\"'.$s_validationMessage.'\",dateElementRequired:\"'.$s_validationMessage.'\"';\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$a_formProps_custValidate[$elId][]=array('type'=>'textfield','required'=>true,'errorMessage'=>$s_validationMessage);\n\t\t\t\t\t\t$a_fieldProps[$elId][] = 'FormItBuilder_customValidation';\n\t\t\t\t\t\t$a_fieldProps_jqValidate[$elName][] = 'required:true';\n\t\t\t\t\t\t$a_fieldProps_errstringJq[$elName][] = 'required:\"'.$s_validationMessage.'\"';\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase FormRuleType::date:\n\t\t\t\t\t$s_thisVal = $rule->getValue();\n\t\t\t\t\t$s_thisErrorMsg = str_replace('===dateformat===',$s_thisVal,$s_validationMessage);\n\t\t\t\t\t$a_formProps_custValidate[$elId][]=array('type'=>'date','fieldFormat'=>$s_thisVal,'errorMessage'=>$s_thisErrorMsg);\n\t\t\t\t\t$a_fieldProps[$elId][] = 'FormItBuilder_customValidation';\n\t\t\t\t\t$a_fieldProps_jqValidate[$elName][] = 'dateFormat:\\''.$s_thisVal.'\\'';\n\t\t\t\t\t$a_fieldProps_errstringJq[$elName][] = 'dateFormat:\"'.$s_thisErrorMsg.'\"';\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t//if some custom validation options were found (date etc) then add formItBuilder custom validate snippet to the list\n\t\tif(count($a_formProps_custValidate)>0){\n\t\t\t$GLOBALS['FormItBuilder_customValidation']=$a_formProps_custValidate;\n\t\t\tif(empty($this->_customValidators)===false){\n\t\t\t\t$this->_customValidators.=',';\n\t\t\t}\n\t\t\t$this->_customValidators.='FormItBuilder_customValidation';\n\t\t}\n\t\t\n\t\t//build inner form html\n\t\t$b_attachmentIncluded=false;\n\t\t$s_form='<div>'.$nl\n\t\t.$nl.'<div class=\"process_errors_wrap\"><div class=\"process_errors\">[[!+fi.error_message:notempty=`[[!+fi.error_message]]`]]</div></div>'\n\t\t.$nl.($b_customSubmitVar===false?'<input type=\"hidden\" name=\"'.$s_submitVar.'\" value=\"1\" />':'')\n\t\t.$nl.'<input type=\"hidden\" name=\"fke'.date('Y').'Sp'.date('m').'Blk:blank\" value=\"\" /><!-- additional crude spam block. If this field ends up with data it will fail to submit -->'\n\t\t.$nl;\n\t\tforeach($this->_formElements as $o_el){\n\t\t\t$s_elClass=get_class($o_el);\n\t\t\tif($s_elClass=='FormItBuilder_elementFile'){\n\t\t\t\t$b_attachmentIncluded=true;\n\t\t\t}\n\t\t\tif(is_a($o_el,'FormItBuilder_elementHidden')){\n\t\t\t\t$s_form.=$o_el->outputHTML();\n\t\t\t}else if(is_a($o_el,'FormItBuilder_htmlBlock')){\n\t\t\t\t$s_form.=$o_el->outputHTML();\n\t\t\t}else{\n\t\t\t\t$s_typeClass = substr($s_elClass,14,strlen($s_elClass)-14);\n\t\t\t\t$forId=$o_el->getId();\n\t\t\t\tif(\n\t\t\t\t\tis_a($o_el,'FormItBuilder_elementRadioGroup')===true\n\t\t\t\t\t|| is_a($o_el,'FormItBuilder_elementCheckboxGroup')===true\n\t\t\t\t\t|| is_a($o_el,'FormItBuilder_elementDate')===true\n\t\t\t\t){\n\t\t\t\t\t$forId=$o_el->getId().'_0';\n\t\t\t\t}else if(is_a($o_el,'FormItBuilder_elementMatrix')){\n\t\t\t\t\t$forId=$o_el->getId().'_0_0';\n\t\t\t\t}\n\t\t\t\t$s_forStr = ' for=\"'.htmlspecialchars($forId).'\"';\n\t\t\t\t\n\t\t\t\tif(is_a($o_el,'FormItBuilder_elementReCaptcha')===true){\n\t\t\t\t\t$s_forStr = ''; // dont use for attrib for Recaptcha (as it is an external program outside control of formitbuilder\n\t\t\t\t\t$s_recaptchaJS=$o_el->getJsonConfig();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$s_extraClasses='';\n\t\t\t\t$a_exClasses=$o_el->getExtraClasses();\n\t\t\t\tif(count($a_exClasses)>0){\n\t\t\t\t\t$s_extraClasses = ' '.implode(' ',$o_el->getExtraClasses());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$b_required = $o_el->isRequired();\n\t\t\t\t$s_form.='<div title=\"'.$o_el->getLabel().'\" class=\"formSegWrap formSegWrap_'.htmlspecialchars($o_el->getId()).' '.$s_typeClass.($b_required===true?' required':'').$s_extraClasses.'\">';\n\t\t\t\t\t$s_labelHTML='';\n\t\t\t\t\tif($o_el->showLabel()===true){\n\t\t\t\t\t\t$s_desc=$o_el->getDescription();\n\t\t\t\t\t\tif(empty($s_desc)===false){\n\t\t\t\t\t\t\t$s_desc='<span class=\"description\">'.$s_desc.'</span>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$s_labelHTML='<label class=\"mainElLabel\"'.$s_forStr.'><span class=\"before\"></span><span class=\"mainLabel\">'.$o_el->getLabel().'</span>'.$s_desc.'<span class=\"after\"></span></label>';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$s_element='<div class=\"elWrap\">'.$nl.' <span class=\"before\"></span>'.$o_el->outputHTML().'<span class=\"after\"></span>';\n\t\t\t\t\tif($o_el->showLabel()===true){\n\t\t\t\t\t\t$s_element.='<div class=\"errorContainer\"><label class=\"formiterror\" '.$s_forStr.'>[[+fi.error.'.htmlspecialchars($o_el->getId()).']]</label></div>';\n\t\t\t\t\t}\n\t\t\t\t\t$s_element.='</div>';\n\t\t\t\t\t\n\t\t\t\t\tif($o_el->getLabelAfterElement()===true){\n\t\t\t\t\t\t$s_form.=$s_element.$s_labelHTML;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$s_form.=$s_labelHTML.$s_element;\n\t\t\t\t\t}\n\t\t\t\t$s_form.=$nl.'</div>'.$nl;\n\t\t\t}\n\t\t}\n\t\t$s_form.=$nl.'</div>';\n\n\t\t//wrap form elements in form tags\n\t\t$s_form='<form action=\"'.$this->_formAction.'\" method=\"'.htmlspecialchars($this->_method).'\"'.($b_attachmentIncluded?' enctype=\"multipart/form-data\"':'').' class=\"form\" id=\"'.htmlspecialchars($this->_id).'\">'.$nl\n\t\t.$s_form.$nl\n\t\t.'</form>';\n\t\t\n\t\t//add all formit validation rules together in one array for easy implode\n\t\t$a_formItCmds=array();\n\t\t$a_formItErrorMessage=array();\n\t\tforeach($a_fieldProps as $fieldID=>$a_fieldProp){\n\t\t\tif(count($a_fieldProp)>0){\n\t\t\t\t$a_formItCmds[]=$fieldID.':'.implode(':',$a_fieldProp);\n\t\t\t}\n\t\t}\n\t\t//add formIT error messages\n\t\tforeach($a_fieldProps_errstringFormIt as $fieldID=>$msgArray){\n\t\t\tforeach($msgArray as $msg){\n\t\t\t\t$a_formItErrorMessage[]='&'.$fieldID.'.'.$msg;\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor($i=0; $i<count($a_formProps); $i++){\n\t\t\t$a_formItCmds[]=$a_formProps[$i];\n\t\t\tif(empty($a_formPropsFormItErrorStrings[$i])===false){\n\t\t\t\t$a_formItErrorMessage[]=$a_formPropsFormItErrorStrings[$i];\n\t\t\t}\n\t\t}\n\t\t\n\t\t//if using database table then add call to final hook\n\t\t$b_addFinalHooks=false;\n\t\t$GLOBALS['FormItBuilder_hookCommands']=array('formObj'=>&$this,'commands'=>array());\n\t\tif(empty($this->_databaseTableObjectName)===false){\n\t\t\t$GLOBALS['FormItBuilder_hookCommands']['commands'][]=array('name'=>'dbEntry','value'=>array('tableObj'=>$this->_databaseTableObjectName,'mapping'=>$this->_databaseTableFieldMapping));\n\t\t\t$b_addFinalHooks=true;\n\t\t}\n\t\tif($b_addFinalHooks===true){\n\t\t\t$this->_hooks[]='FormItBuilder_hooks';\n\t\t}\n\t\t\n\t\t//rebuild hooks system\n\t\t$s_hooksStr = '';\n\t\tif(empty($this->_postHookName)===false){\n\t\t $s_hooksStr.=$this->_postHookName;\n\t\t}\n\t\tif(count($this->_hooks)>0){\n\t\t if(empty($this->_postHookName)===false){\n\t\t\t$s_hooksStr.=',';\n\t\t }\n\t\t $s_hooksStr.=implode(',',$this->_hooks);\n\t\t}\n\t\t$s_fullHooksParam='';\n\t\tif(empty($s_hooksStr)===false){\n\t\t $s_fullHooksParam=$nl.'&hooks=`'.$s_hooksStr.'`';\n\t\t}\n\t\t\n\t\t$s_formItCmd='[[!FormIt?'\n\t\t.$s_fullHooksParam\t\t\t\t\n\t\t.(empty($s_recaptchaJS)===false?$nl.'&recaptchaJs=`'.$s_recaptchaJS.'`':'')\n\t\t.(empty($this->_customValidators)===false?$nl.'&customValidators=`'.$this->_customValidators.'`':'')\n\t\t\t\n\t\t.(empty($this->_emailTpl)===false?$nl.'&emailTpl=`'.$this->_emailTpl.'`':'')\n\t\t.(empty($this->_emailToAddress)===false?$nl.'&emailTo=`'.$this->_emailToAddress.'`':'')\n\t\t.(empty($this->_emailToName)===false?$nl.'&emailToName=`'.$this->_emailToName.'`':'')\n\t\t.(empty($this->_emailFromAddress)===false?$nl.'&emailFrom=`'.$this->_emailFromAddress.'`':'')\n\t\t.(empty($this->_emailFromName)===false?$nl.'&emailFromName=`'.$this->_emailFromName.'`':'')\n\t\t.(empty($this->_emailReplyToAddress)===false?$nl.'&emailReplyTo=`'.$this->_emailReplyToAddress.'`':'')\n\t\t.(empty($this->_emailReplyToName)===false?$nl.'&emailReplyToName=`'.$this->_emailReplyToName.'`':'')\n\t\t.(empty($this->_emailCCAddress)===false?$nl.'&emailCC=`'.$this->_emailCCAddress.'`':'')\n\t\t.(empty($this->_emailCCName)===false?$nl.'&emailCCName=`'.$this->_emailCCName.'`':'')\n\t\t.(empty($this->_emailBCCAddress)===false?$nl.'&emailBCC=`'.$this->_emailBCCAddress.'`':'')\n\t\t.(empty($this->_emailBCCName)===false?$nl.'&emailBCCName=`'.$this->_emailBCCName.'`':'')\n\t\t\n\t\t.(empty($this->_autoResponderTpl)===false?$nl.'&fiarTpl=`'.$this->_autoResponderTpl.'`':'')\n\t\t.(empty($this->_autoResponderSubject)===false?$nl.'&fiarSubject=`'.$this->_autoResponderSubject.'`':'')\n\t\t.(empty($this->_autoResponderToAddressField)===false?$nl.'&fiarToField=`'.$this->_autoResponderToAddressField.'`':'')\n\t\t.(empty($this->_autoResponderFromAddress)===false?$nl.'&fiarFrom=`'.$this->_autoResponderFromAddress.'`':'')\n\t\t.(empty($this->_autoResponderFromName)===false?$nl.'&fiarFromName=`'.$this->_autoResponderFromName.'`':'')\n\t\t.(empty($this->_autoResponderReplyTo)===false?$nl.'&fiarReplyTo=`'.$this->_autoResponderReplyTo.'`':'')\n\t\t.(empty($this->_autoResponderReplyToName)===false?$nl.'&fiarReplyToName=`'.$this->_autoResponderReplyToName.'`':'')\n\t\t.(empty($this->_autoResponderCC)===false?$nl.'&fiarCC=`'.$this->_autoResponderCC.'`':'')\n\t\t.(empty($this->_autoResponderCCName)===false?$nl.'&fiarCCName=`'.$this->_autoResponderCCName.'`':'')\n\t\t.(empty($this->_autoResponderBCC)===false?$nl.'&fiarBCC=`'.$this->_autoResponderBCC.'`':'')\n\t\t.(empty($this->_autoResponderBCCName)===false?$nl.'&fiarBCCName=`'.$this->_autoResponderBCCName.'`':'')\n\t\t.$nl.'&fiarHtml=`'.($this->_autoResponderHtml===false?'0':'1').'`'\t\t\t\t\n\t\t\t\t\n\t\t.$nl.'&emailSubject=`'.$this->_emailSubject.'`'\n\t\t.$nl.'&emailUseFieldForSubject=`1`'\n\t\t.$nl.'&redirectTo=`'.$this->_redirectDocument.'`'\n\t\t.(empty($this->_redirectParams)===false?$nl.'&redirectParams=`'.$this->_redirectParams.'`':'')\n\t\t.$nl.'&store=`'.($this->_store===true?'1':'0').'`'\n\t\t.$nl.'&submitVar=`'.$s_submitVar.'`'\n\t\t.$nl.implode($nl,$a_formItErrorMessage)\n\t\t.$nl.'&validate=`'.(isset($this->_validate)?$this->_validate.',':'').implode(','.$nl.' ',$a_formItCmds).','.$nl.'`]]'.$nl;\n\t\t\n\t\tif($this->_jqueryValidation===true){\n\t\t\t$s_js='\t\n$().ready(function() {\n\njQuery.validator.addMethod(\"dateFormat\", function(value, element, format) {\n\tvar b_retStatus=false;\n\tvar s_retValue=\"\";\n\tvar n_retTimestamp=0;\n\tif(value.length==format.length){\n\t\tvar separator_only = format;\n\t\tvar testDate;\n\t\tif(format.toLowerCase()==\"yyyy\"){\n\t\t\t//allow just yyyy\n\t\t\ttestDate = new Date(value, 1, 1);\n\t\t\tif(testDate.getFullYear()==value){\n\t\t\t\tb_retStatus=true;\n\t\t\t}\n\t\t}else{\n\t\t\tseparator_only = separator_only.replace(/m|d|y/g,\"\");\n\t\t\tvar separator = separator_only.charAt(0)\n\n\t\t\tif(separator && separator_only.length==2){\n\t\t\t\tvar dayPos; var day; var monthPos; var month; var yearPos; var year;\n\t\t\t\tvar s_testYear;\n\t\t\t\tvar newStr = format;\n\n\t\t\t\tdayPos = format.indexOf(\"dd\");\n\t\t\t\tday = parseInt(value.substr(dayPos,2),10)+\"\";\n\t\t\t\tif(day.length==1){day=\"0\"+day;}\n\t\t\t\tnewStr=newStr.replace(\"dd\",day);\n\n\t\t\t\tmonthPos = format.indexOf(\"mm\");\n\t\t\t\tmonth = parseInt(value.substr(monthPos,2),10)+\"\";\n\t\t\t\tif(month.length==1){month=\"0\"+month;}\n\t\t\t\tnewStr=newStr.replace(\"mm\",month);\n\n\t\t\t\tyearPos = format.indexOf(\"yyyy\");\n\t\t\t\tyear = parseInt(value.substr(yearPos,4),10);\n\t\t\t\tnewStr=newStr.replace(\"yyyy\",year);\n\n\t\t\t\ttestDate = new Date(year, month-1, day);\n\n\t\t\t\tvar testDateDay=(testDate.getDate())+\"\";\n\t\t\t\tif(testDateDay.length==1){testDateDay=\"0\"+testDateDay;}\n\n\t\t\t\tvar testDateMonth=(testDate.getMonth()+1)+\"\";\n\t\t\t\tif(testDateMonth.length==1){testDateMonth=\"0\"+testDateMonth;}\n\n\t\t\t\tif (testDateDay==day && testDateMonth==month && testDate.getFullYear()==year) {\n\t\t\t\t\tb_retStatus = true;\n\t\t\t\t\t$(element).val(newStr);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn this.optional(element) || b_retStatus;\n}, \"Please enter a valid date.\");\n\njQuery.validator.addMethod(\"dateElementRequired\", function(value, element, format) {\n\tvar el=element;\n\tb_retStatus=true;\n\tvar elBaseId=element.id.substr(0,element.id.length-2);\n\tif($(\"#\"+elBaseId+\"_0\").val()==\"\" || $(\"#\"+elBaseId+\"_1\").val()==\"\" || $(\"#\"+elBaseId+\"_2\").val()==\"\"){\n\t\tb_retStatus=false;\n\t}\n\treturn this.optional(element) || b_retStatus;\n}, \"Date element is required.\");\n\n//Main validate call\nvar thisFormEl=$(\"#'.$this->_id.'\");\nthisFormEl.validate({errorPlacement:function(error, element) {\n\tvar labelEl = element.parents(\".formSegWrap\").find(\".errorContainer\");\n\terror.appendTo( labelEl );\n},success: function(element) {\n\telement.addClass(\"valid\");\n\tvar formSegWrapEl = element.parents(\".formSegWrap\");\n\tformSegWrapEl.children(\".mainElLabel\").removeClass(\"mainLabelError\");\n},highlight: function(el, errorClass, validClass) {\n\tvar element= $(el);\n\telement.addClass(errorClass).removeClass(validClass);\n\telement.parents(\".formSegWrap\").children(\".mainElLabel\").addClass(\"mainLabelError\");\n},invalidHandler: function(form, validator){\n\t//make nice little animation to scroll to the first invalid element instead of an instant jump\n\tvar jumpEl = $(\"#\"+validator.errorList[0].element.id).parents(\".formSegWrap\");\n\t$(\"html,body\").animate({scrollTop: jumpEl.offset().top});\n if(FormItBuilderInvalidCallback){FormItBuilderInvalidCallback();}\n},ignore:\":hidden\",'.\n\t\t\t\t\t\n$this->jqueryValidateJSON(\n\t$a_fieldProps_jqValidate,\n\t$a_fieldProps_errstringJq,\n\t$a_fieldProps_jqValidateGroups\n).'});\n\t\n'.\n//Force validation on load if already posted\n($b_posted===true?'thisFormEl.valid();':'')\n.'\n\t\n});\n';\n\t\t}\n\t\t\n\t\t//Allows output of the javascript into a paceholder so in can be inserted elsewhere in html (head etc)\n\t\tif(empty($this->_placeholderJavascript)===false){\n\t\t\t$this->modx->setPlaceholder($this->_placeholderJavascript,$s_js);\n\t\t\treturn $s_formItCmd.$s_form;\n\t\t}else{\n\t\t\treturn $s_formItCmd.$s_form.\n'<script type=\"text/javascript\">\n// <![CDATA[\n'.$s_js.'\n// ]]>\n</script>';\n\t\t}\n\t}", "static function form() {\n ?>\n\n <?php if ( isset( $_GET['message'] ) ): ?>\n <div id=\"message\" class=\"notice notice-<?php echo self::$MESSAGES[ $_GET['message'] ][0] ; ?> is-dismissible\">\n <p><?php echo self::$MESSAGES[ $_GET['message'] ][1] ?></p>\n </div>\n <?php endif; ?>\n\n <fieldset class=\"options\">\n <h3><?php esc_html_e( \"Export WP Super Cache Settings\", \"wp-super-cache\" ) ?></h3>\n <p><?php esc_html_e( \"Export the WP Super Cache Settings to transfer them to another WordPress site.\", \"wp-super-cache\" ) ?></p>\n\n <form action=\"\" method=\"post\">\n <input type=\"hidden\" name=\"<?php echo self::NAME ?>\" value=\"export\" />\n <?php wp_nonce_field( self::EXPORT_NONCE ); ?>\n <?php submit_button( esc_html__( 'Export settings', 'wp-super-cache' ) ); ?>\n </form>\n\n <hr>\n\n <h3><?php esc_html_e( \"Import WP Super Cache Settings\", \"wp-super-cache\" ) ?></h3>\n <p><?php esc_html_e( \"Import the WP Super Cache Settings to from another WordPress site. This file must be a json format and exported from a WP Super Cache plugin.\", \"wp-super-cache\" ) ?></p>\n\n <form action=\"\" method=\"post\" enctype=\"multipart/form-data\">\n <?php wp_nonce_field( self::IMPORT_NONCE ); ?>\n <input type=\"hidden\" name=\"<?php echo self::NAME ?>\" value=\"import\" />\n <input type=\"file\" name=\"wp_super_cache_import_file\"/>\n <?php submit_button( esc_html__( 'Import settings', 'wp-super-cache' ) ); ?>\n </form>\n\n <?php if ( self::backupFileExists() ) : ?>\n\n <hr>\n\n <p>\n <?php esc_html_e( \"Restore the previous WP Super Cache settings or remove them permanently.\", \"wp-super-cache\" ) ?>\n </p>\n\n <p>\n\n <form action=\"\" method=\"post\">\n <input type=\"hidden\" name=\"<?php echo self::NAME ?>\" value=\"restore\" />\n <?php wp_nonce_field( self::RESTORE_NONCE ); ?>\n <?php submit_button( esc_html__( 'Restore settings', 'wp-super-cache' ), 'secondary', 'submit', false ); ?>\n </form>\n\n <form action=\"\" method=\"post\" style=\"margin-top:10px;\">\n <input type=\"hidden\" name=\"<?php echo self::NAME ?>\" value=\"remove\" />\n <?php wp_nonce_field( self::REMOVE_NONCE ); ?>\n <?php submit_button( esc_html__( 'Remove backup settings', 'wp-super-cache' ), 'delete', 'submit',false ); ?>\n </p>\n\n <?php endif; ?>\n\n </fieldset>\n\n <?php\n }", "function validation_files()\n\t{\n\t\t//Script file\n\t\techo '<script src=\"'.SITEPATH.'/administrator/validation/validationtextfield.js\" type=\"text/javascript\"></script>\n\t\t<script src=\"'.SITEPATH.'/administrator/validation/validationtextarea.js\" type=\"text/javascript\"></script>\n\t\t<script src=\"'.SITEPATH.'/administrator/validation/validationselect.js\" type=\"text/javascript\"></script>';\n\t\t//css file\n\t\techo '<link href=\"'.SITEPATH.'/administrator/validation/validationtextfield.css\" rel=\"stylesheet\" type=\"text/css\" />\n\t\t<link href=\"'.SITEPATH.'/administrator/validation/validationtextarea.css\" rel=\"stylesheet\" type=\"text/css\" />\n\t\t<link href=\"'.SITEPATH.'/administrator/validation/validationselect.css\" rel=\"stylesheet\" type=\"text/css\" />';\n\t}", "function hgr_minimal_form($atts, $content = null ) {\n\t\t\twp_enqueue_script('hgr-vc-modernizr');\n\t\t\twp_enqueue_script('hgr-vc-classie');\n\t\t\twp_enqueue_script('hgr-vc-stepsform');\n\t\t\t\n\t\t\t\n\t\t\t/*\n\t\t\t\tEmpty vars declaration\n\t\t\t*/\n\t\t\t$output = $form_size = $form_style = $form_size_class = $label_text_size = $label_text_color = $input_text_color = $next_icon_color = $confirmation_text = $confirmation_text_size = $confirmation_text_color = $steps_text_color = $form_input_color = $progress_bar_bgcolor = $email_form = $confirmation_text_style = $progress_bar_style = $steps_text_style = $next_icon_style = $label_text_style = $input_text_style = $form_input_style = $hgr_minimal_sendmail = $css = '';\n\t\t\t\n\t\t\t/*\n\t\t\t\tWordPress function to extract shortcodes attributes\n\t\t\t\tRefference: http://codex.wordpress.org/Function_Reference/shortcode_atts\n\t\t\t*/\n\t\t\textract(shortcode_atts(array(\n\t\t\t\t'form_size'\t\t\t\t\t\t=>\t'',\n\t\t\t\t'form_style'\t\t\t\t\t\t=>\t'',\n\t\t\t\t'label_text_size'\t\t\t\t=>\t'',\n\t\t\t\t'label_text_color'\t\t\t\t=>\t'',\n\t\t\t\t'input_text_color'\t\t\t\t=>\t'',\n\t\t\t\t'next_icon_color'\t\t\t\t=>\t'',\n\t\t\t\t'confirmation_text'\t\t\t\t=>\t'',\n\t\t\t\t'confirmation_text_size'\t\t=>\t'',\n\t\t\t\t'confirmation_text_color'\t\t=>\t'',\n\t\t\t\t'steps_text_color'\t\t\t\t=>\t'',\n\t\t\t\t'form_input_color'\t\t\t\t=>\t'',\n\t\t\t\t'progress_bar_bgcolor'\t\t\t=>\t'',\n\t\t\t\t'email_form'\t\t\t\t\t\t=>\t'',\n\t\t\t\t'css'\t\t\t\t\t\t\t=>\t'',\n\t\t\t), $atts));\n\t\t\t\n\t\t\t$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class( $css, ' ' ), $this->settings['base'], $atts );\n\t\t\t\n\t\t\tswitch($form_size){\n\t\t\t\tcase 'large':\n\t\t\t\t\t$form_size_class = 'simform-large';\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'medium':\n\t\t\t\t\t$form_size_class = 'simform-medium';\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'small':\n\t\t\t\t\t$form_size_class = 'simform-small';\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tswitch($form_style){\n\t\t\t\tcase 'standard':\n\t\t\t\t\t$confirmation_text_style = '';\n\t\t\t\t\t$progress_bar_style = '';\n\t\t\t\t\t$steps_text_style = '';\n\t\t\t\t\t$next_icon_style = '';\n\t\t\t\t\t$label_text_style = '';\n\t\t\t\t\t$input_text_style = '';\n\t\t\t\t\t$form_input_style = 'rgba(0,0,0,0.1)';\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'advanced':\t\t\t\t\t\n\t\t\t\t\t$confirmation_text_style = 'style=\"'.($confirmation_text_size !== '' ? 'font-size:'.$confirmation_text_size.'px;' : '').''.($confirmation_text_color !== '' ? 'color:'.$confirmation_text_color.';' : '').'\"';\n\t\t\t\t\t$progress_bar_style = 'style=\"'.($progress_bar_bgcolor !== '' ? 'background:'.$progress_bar_bgcolor : '').'\"';\n\t\t\t\t\t$steps_text_style = 'style=\"'.($steps_text_color !== '' ? 'color:'.$steps_text_color : '').'\"';\n\t\t\t\t\t$next_icon_style = 'style=\"'.($next_icon_color !== '' ? 'color:'.$next_icon_color : '').'\"';\n\t\t\t\t\t$label_text_style = 'style=\"'.($label_text_size !== '' ? 'font-size:'.$label_text_size.'px;' : '').''.($label_text_color !== '' ? 'color:'.$label_text_color.';' : '').'\"';\n\t\t\t\t\t$input_text_style = 'style=\"'.($input_text_color !== '' ? 'color:'.$input_text_color : '').'\"';\n\t\t\t\t\t$form_input_style = ($form_input_color !== '' ? $form_input_color : 'rgba(0,0,0,0.1)');\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$GLOBALS['hgr_label_style'] = $label_text_style;\n\t\t\t$GLOBALS['hgr_input_text_style'] = $input_text_style;\n\t\t\t$GLOBALS['hgr_minimal_sendmail'] = $email_form;\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$output .= '<script>\n\t\t\t\tjQuery( document ).ready(function() {\n\t\t\t\t\t//Add form size class\n\t\t\t\t\tjQuery(\"#theForm\").addClass(\"'.$form_size_class.'\");\n\t\t\t\t\t\n\t\t\t\t\t//Add form background color\n\t\t\t\t\tjQuery(\"head\").append(\"<style>.hgr-minimal-form .simform ol:before{background:'.$form_input_style.';}</style>\");\n\t\t\t\t\t\n\t\t\t\t\tvar theForm = document.getElementById( \"theForm\" );\n\t\t\t\t\tnew stepsForm( theForm, {\n\t\t\t\t\t\tonSubmit : function( form ) {\n\t\t\t\t\t\t\tclassie.addClass( theForm.querySelector( \".simform-inner\" ), \"hide\" );\n\t\t\t\t\t\t\tvar messageEl = theForm.querySelector( \".final-message\" );\n\t\t\t\t\t\t\tmessageEl.innerHTML = \"'.$confirmation_text.'\";\n\t\t\t\t\t\t\tclassie.addClass( messageEl, \"show\" );\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t\t\n\t\t\t\t\t// Submits the form\n\t\t\t\t\tstepsForm.prototype._submit = function() {\n\t\t\t\t\t\t// get all the inputs into an array.\n\t\t\t\t\t\tvar $inputs = jQuery(\"#theForm :input\");\n\n\t\t\t\t\t\tvar values = {};\n\t\t\t\t\t\t$inputs.each(function() {\n\t\t\t\t\t\t\tif( jQuery(this).val() != \"\" ) {\n\t\t\t\t\t\t\t\tvalues[jQuery(this).attr(\"data-question\")] = jQuery(this).val();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\t// send email\n\t\t\t\t\t\tvar data = {\n\t\t\t\t\t\t\taction: \"mail_before_submit\",\n\t\t\t\t\t\t\twhatever: values,\n\t\t\t\t\t\t\t_ajax_nonce: \"'.wp_create_nonce( \"my_email_ajax_nonce\" ).'\"\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tjQuery.post(\"'. get_bloginfo(\"url\").'/wp-admin/admin-ajax.php\", data);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// show confirmation text\n\t\t\t\t\t\tthis.options.onSubmit( this.el );\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t</script>';\n\t\t\t\n\t\t\t\t$output .= '<div class=\"hgr-minimal-form ' . esc_attr( $css_class ) . '\">';\n\t\t\t\t\t$output .= '<form id=\"theForm\" class=\"simform\" autocomplete=\"off\">';\n\t\t\t\t\t\t$output .= '<div class=\"simform-inner\">';\n\t\t\t\t\t\t\t$output .= '<ol class=\"questions\">';\n\t\t\t\t\t\t\t\t$output .= do_shortcode($content);\n\t\t\t\t\t\t\t$output .= '</ol><!-- /questions -->';\n\t\t\t\t\t\t\t$output .= '<button class=\"submit\" type=\"submit\">Send answers</button>';\n\t\t\t\t\t\t\t$output .= '<div class=\"controls\" '.$progress_bar_style.'>';\n\t\t\t\t\t\t\t\t$output .= '<button class=\"hgr-next-button\" '.$next_icon_style.'></button>';\n\t\t\t\t\t\t\t\t$output .= '<div class=\"progress\"></div>';\n\t\t\t\t\t\t\t\t$output .= '<span class=\"number\" '.$steps_text_style.'>';\n\t\t\t\t\t\t\t\t\t$output .= '<span class=\"number-current\"></span>';\n\t\t\t\t\t\t\t\t\t$output .= '<span class=\"number-total\"></span>';\n\t\t\t\t\t\t\t\t$output .= '</span>';\n\t\t\t\t\t\t\t\t$output .= '<span class=\"error-message\"></span>';\n\t\t\t\t\t\t\t$output .= '</div><!-- / controls -->';\n\t\t\t\t\t\t$output .= '</div><!-- /simform-inner -->';\n\t\t\t\t\t\t$output .= '<span class=\"final-message\" '.$confirmation_text_style.'></span>';\n\t\t\t\t\t$output .= '</form><!-- /simform -->';\n\t\t\t\t$output .= '</div>';\n\t\t\t\n\t\t\t/*\n\t\t\t\tReturn the output\n\t\t\t*/\n\t\t\treturn $output;\n\t\t}", "function export_all() {\n echo\"</br>\";\n echo\"<form id='export_all' name='export_all' method='post' action='html2word.php?user_choice=all_notes'>\";\n echo get_string('name', 'local_mynotebook');\n echo\"<input name='filename' type='text' id='filename' size='10' required='required'/></br></br>\n \" . get_string('ext', 'local_mynotebook'). \"\n <select name='tpl' id='tpl'>\n <option value='ms_word.doc'> \" . get_string('msword', 'local_mynotebook'). \"</option>\n </select>\";\n echo \"</br></br>\";\n //Input type before was submit\n echo\"<div style='text-align: center;'>\";\n echo\"<input type='image' title='\" . get_string('dl', 'local_mynotebook'). \"' name='btn_go' id='btn_go' value='export' src='images/dl.png' />\";\n echo\"</div></form>\";\n}", "function ting_admin_boost_form_after_build($form, &$form_state) {\n $path = drupal_get_path('module', 'ting');\n\n drupal_add_css($path .'/css/ting_admin_boost_form.css');\n\n return $form;\n}", "function build_tb_theme_options() {\n\n settings_errors();\n\n ?>\n <form method=\"post\" action=\"options.php\" />\n\n <?php\n settings_fields( \"tb_theme_options\" );\n do_settings_sections( \"tb_theme_options\" );\n submit_button();\n ?>\n </form>\n<?php\n}", "function section_editor($section = array('ID'=>'0','title'=>'','shortname'=>'','handler'=>'','stylesheet'=>'style.css','hidden'=>'','page_order'=>'0','last_updated'=>'')) {\r\n\tglobal $inline;\r\n\tob_start(); ?>\r\n\t\t\t<form name=\"edit-<?php echo $section['ID']; ?>\" action=\"\" method=\"post\" id=\"sectionform\" class=\"editform\">\n\t\t\t\t<div class=\"c-ontent\">\n\t\t\t\t\t<p class=\"label\"><label for=\"title\"><?php _e('Title'); ?></label></p>\r\n\t\t\t\t\t<p><input type=\"text\" name=\"title\" id=\"title\" value=\"<?php echo formatted_for_editing($section['title']); ?>\" class=\"text100\" /></p>\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"column width50\">\r\n\t\t\t\t\t<div class=\"c-ontent\">\n\t\t\t\t\t\t<p class=\"label\"><label for=\"page_order\"><?php _e('Menu Order'); ?></label></p>\r\n\t\t\t\t\t\t<p><input type=\"text\" name=\"page_order\" id=\"page_order\" value=\"<?php echo $section['page_order']; ?>\" class=\"text100\" /></p>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"column width50\">\r\n\t\t\t\t\t<div class=\"c-ontent\">\n\t\t\t\t\t\t<p class=\"label\"><label for=\"hidden\"><?php _e('Hidden?'); ?></label></p>\r\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t<select name=\"hidden\" id=\"hidden\" class=\"width100\">\r\n\t\t\t\t\t\t\t\t<option value=\"no\"<?php bj_selected($section['hidden'],'no'); ?>><?php _e('No'); ?></option>\r\n\t\t\t\t\t\t\t\t<option value=\"yes\"<?php bj_selected($section['hidden'],'yes'); ?>><?php _e('Yes'); ?></option>\r\n\t\t\t\t\t\t\t</select>\r\n\t\t\t\t\t\t</p>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"column width50\">\r\n\t\t\t\t\t<div class=\"c-ontent\">\r\n\t\t\t\t\t\t<p class=\"label\"><label for=\"handler\" title=\"<?php _e('A handler is a special PHP file within the current skin that can be used to parse PHP before the section template file is loaded.'); ?>\" class=\"cowtip\"><?php _e('Handler'); ?></label></p>\n\t\t\t\t\t\t<p>\r\n<?php\r\n\t\t\t\t\t\t$skin_files = FileFolderList(BJTEMPLATE); ?>\r\n\t\t\t\t\t\t\t<select name=\"handler\" id=\"handler\" class=\"width100\">\r\n\t\t\t\t\t\t\t\t<option value=\"\"<?php bj_selected($section['handler'],''); ?>><?php _e('None'); ?></option>\r\n<?php\r\n\t\t\t\t\t\tforeach($skin_files['files'] as $num=>$file) {\r\n\t\t\t\t\t\t\t$data = parse_file_info($file,array('Handler'));\r\n\t\t\t\t\t\t\tif(!empty($data['Handler']) and end(explode('.',$file)) == 'php') { ?>\r\n\t\t\t\t\t\t\t\t<option value=\"<?php echo basename($file); ?>\"<?php bj_selected($section['handler'],basename($file)); ?>><?php echo $data['Handler']; ?></option>\r\n<?php\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} ?>\r\n\t\t\t\t\t\t\t</select>\r\n\t\t\t\t\t\t</p>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"column width50\">\r\n\t\t\t\t\t<div class=\"c-ontent\">\r\n\t\t\t\t\t\t<p class=\"label\"><label for=\"stylesheet\"><?php _e('Stylesheet'); ?></label></p>\n\t\t\t\t\t\t<p>\r\n\t\t\t\t\t\t\t<select name=\"stylesheet\" id=\"stylesheet\" class=\"width100\">\r\n<?php\r\n\t\t\t\t\t\t$css_files = glob(BJTEMPLATE.'/*.css');\r\n\t\t\t\t\t\tif(is_array($css_files)) {\r\n\t\t\t\t\t\t\tforeach($css_files as $num=>$file) { ?>\r\n\t\t\t\t\t\t\t\t<option value=\"<?php echo basename($file); ?>\"<?php bj_selected($section['stylesheet'],basename($file)); ?>><?php echo basename($file); ?></option>\r\n<?php\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} ?>\r\n\t\t\t\t\t\t\t</select>\r\n\t\t\t\t\t\t</p>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"clear\"></div>\r\n<?php\r\n\t\t\t\t\tif($section['ID'] == \"0\") { ?>\r\n\t\t\t\t<input type=\"hidden\" name=\"new-section-send\" value=\"yes\" />\r\n<?php\r\n\t\t\t\t\t} else { ?>\r\n\t\t\t\t<input type=\"hidden\" name=\"edit-section-send\" value=\"yes\" />\r\n\t\t\t\t<input type=\"hidden\" name=\"edit-section-id\" value=\"<?php echo $section['ID']; ?>\" />\r\n<?php\r\n\t\t\t\t\t} ?>\r\n\t\t\t\t<p class=\"submit\">\r\n<?php\r\n\t\t\t\t\tif($section['ID'] != \"0\") { ?>\r\n\t\t\t\t\t<input type=\"submit\" name=\"save-del\" value=\"<?php _e('Delete'); ?>\" class=\"button_deleteme\" />\r\n<?php\r\n\t\t\t\t\t} ?>\r\n\t\t\t\t\t<input type=\"submit\" name=\"save\" value=\"<?php _e('Save'); ?>\" />\r\n\t\t\t\t</p>\r\n\t\t\t</form>\r\n<?php\r\n\tif($inline) { ?>\r\n\t\t\t<script type=\"text/javascript\">\r\n\t\t\t$('sectionform').onsubmit = function(){\r\n\t\t\t\tblackJack.ajaxAdd('sections.php?req=ajaxadd',this,'headings');\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t</script>\r\n<?php\r\n\t}\r\n\t$content = run_actions('section_editor',ob_get_contents());\r\n\tob_end_clean();\r\n\techo $content;\r\n}", "function form_wysiwyg($name, $value, $content_type='', $content_id='', $tempkey='', $height = 300) {\n\n\trequire_once(INC . 'classes/class_DpFCKeditor.php') ;\n\n\t$wysiwyg = new DpFCKeditor($name) ;\n\t$wysiwyg->BasePath = WEB . 'includes/3rdparty/fckeditor/';\n\t$wysiwyg->Value\t= $value;\n\t$wysiwyg->Height = $height;\n\t$wysiwyg->Config['ImageUploadURL'] = '../../../../../tech/home/uploadimage.php?content_type=' . $content_type . '&content_id=' . $content_id . '&tempkey=' . $tempkey;\n\n\treturn $wysiwyg->CreateHtml();\n\n}", "function show_form()\n\t{\n\t\t//-----------------------------------------\n\t\t// INIT\n\t\t//-----------------------------------------\n\n\t\t$raw_post = \"\";\n\t\t\n\t\t//-----------------------------------------\n\t\t// Unconvert the saved post if required\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( ! isset($_POST['Post']) )\n\t\t{\n\t\t\t//-----------------------------------------\n\t\t\t// If we're using RTE, then just clean up html\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\tif ( $this->han_editor->method == 'rte' )\n\t\t\t{\n\t\t\t\t$raw_post = $this->parser->convert_ipb_html_to_html( $this->orig_post['post'] );\n\n\t\t\t\tif( intval($this->orig_post['post_htmlstate']) AND $this->forum['use_html'] AND $this->ipsclass->member['g_dohtml'] )\n\t\t\t\t{\n\t\t\t\t\t# Make EMO_DIR safe so the ^> regex works\n\t\t\t\t\t$raw_post = str_replace( \"<#EMO_DIR#>\", \"&lt;#EMO_DIR&gt;\", $raw_post );\n\t\t\t\t\t\n\t\t\t\t\t# New emo\n\t\t\t\t\t$raw_post = preg_replace( \"#(\\s)?<([^>]+?)emoid=\\\"(.+?)\\\"([^>]*?)\".\">(\\s)?#is\", \"\\\\1\\\\3\\\\5\", $raw_post );\n\t\t\t\t\t\n\t\t\t\t\t# And convert it back again...\n\t\t\t\t\t$raw_post = str_replace( \"&lt;#EMO_DIR&gt;\", \"<#EMO_DIR#>\", $raw_post );\n\n\t\t\t\t\t$raw_post = $this->parser->convert_std_to_rte( $raw_post );\n\t\t\t\t}\n\n\t\t\t\tif( isset($this->orig_post['post_htmlstate']) AND $this->orig_post['post_htmlstate'] == 2 )\n\t\t\t\t{\n\t\t\t\t\t$raw_post = str_replace( '&lt;br&gt;', \"<br />\", $raw_post );\n\t\t\t\t\t$raw_post = str_replace( '&lt;br /&gt;', \"<br />\", $raw_post );\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->orig_post['post_htmlstate'] = isset($this->orig_post['post_htmlstate']) ? $this->orig_post['post_htmlstate'] : 0;\n\t\t\t\t$this->parser->parse_html = intval($this->orig_post['post_htmlstate']) AND $this->forum['use_html'] AND $this->ipsclass->member['g_dohtml'] ? 1 : 0;\n\t\t\t\t$this->parser->parse_nl2br = (isset($this->orig_post['post_htmlstate']) AND $this->orig_post['post_htmlstate'] == 2) ? 1 : 0;\n\t\t\t\t$this->parser->parse_smilies = intval($this->orig_post['use_emo']);\n\t\t\t\t$this->parser->parse_bbcode = $this->forum['use_ibc'];\n\n\t\t\t\tif( $this->parser->parse_html )\n\t\t\t\t{\n\t\t\t\t\t# Make EMO_DIR safe so the ^> regex works\n\t\t\t\t\t$this->orig_post['post'] = str_replace( \"<#EMO_DIR#>\", \"&lt;#EMO_DIR&gt;\", $this->orig_post['post'] );\n\t\t\t\t\t\n\t\t\t\t\t# New emo\n\t\t\t\t\t$this->orig_post['post'] = preg_replace( \"#(\\s)?<([^>]+?)emoid=\\\"(.+?)\\\"([^>]*?)\".\">(\\s)?#is\", \"\\\\1\\\\3\\\\5\", $this->orig_post['post'] );\n\t\t\t\t\t\n\t\t\t\t\t# And convert it back again...\n\t\t\t\t\t$this->orig_post['post'] = str_replace( \"&lt;#EMO_DIR&gt;\", \"<#EMO_DIR#>\", $this->orig_post['post'] );\n\t\t\t\t\n\t\t\t\t\t$this->orig_post['post'] = $this->parser->convert_ipb_html_to_html( $this->orig_post['post'] );\n\t\t\t\t\t\n\t\t\t\t\t$this->orig_post['post'] = htmlspecialchars( $this->orig_post['post'] );\n\t\t\t\t\t\n\t\t\t\t\tif( $this->parser->parse_nl2br )\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->orig_post['post'] = str_replace( '&lt;br&gt;', \"\\n\", $this->orig_post['post'] );\n\t\t\t\t\t\t$this->orig_post['post'] = str_replace( '&lt;br /&gt;', \"\\n\", $this->orig_post['post'] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$raw_post = $this->parser->pre_edit_parse( $this->orig_post['post'] );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ( $this->han_editor->method != 'rte' )\n\t\t\t{\n\t\t\t\t$_POST['Post'] = str_replace( '&', '&amp;', $_POST['Post'] );\n\t\t\t}\n\n\t\t\tif ( $this->ipsclass->input['_from'] == 'quickedit' )\n\t\t\t{\n\t\t\t\t$this->orig_post['post_htmlstatus'] = isset($this->orig_post['post_htmlstatus']) ? $this->orig_post['post_htmlstatus'] : 0;\n\t\t\t\t$this->parser->parse_html = intval($this->orig_post['post_htmlstatus']) AND $this->forum['use_html'] AND $this->ipsclass->member['g_dohtml'] ? 1 : 0;\n\t\t\t\t$this->parser->parse_nl2br = (isset($this->ipsclass->input['post_htmlstatus']) AND $this->ipsclass->input['post_htmlstatus'] == 2) ? 1 : 0;\n\t\t\t\t$this->parser->parse_smilies = intval($this->orig_post['use_emo']);\n\t\t\t\t$this->parser->parse_bbcode = $this->forum['use_ibc'];\n\n\t\t\t\tif ( $this->han_editor->method == 'rte' )\n\t\t\t\t{\n\t\t\t\t\t$raw_post = $this->parser->convert_std_to_rte( $this->ipsclass->txt_stripslashes( $_POST['Post'] ) );\n\t\t\t\t\t\n\t\t\t\t\tforeach( $this->ipsclass->skin['_macros'] as $row )\n\t\t\t \t{\n\t\t\t\t\t\tif ( $row['macro_value'] != \"\" )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$raw_post = str_replace( \"<{\".$row['macro_value'].\"}>\", $row['macro_replace'], $raw_post );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$raw_post = str_replace( \"<#IMG_DIR#>\", $this->ipsclass->skin['_imagedir'], $raw_post );\n\t\t\t\t\t$raw_post = str_replace( \"<#EMO_DIR#>\", $this->ipsclass->skin['_emodir'] , $raw_post );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$raw_post = $this->ipsclass->txt_stripslashes( $_POST['Post'] );\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$raw_post = $this->ipsclass->txt_stripslashes( $_POST['Post'] );\n\t\t\t}\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Is this the first post in the topic?\n\t\t//-----------------------------------------\n\t\t\n\t\t$topic_title = \"\";\n\t\t$topic_desc = \"\";\n\t\t\n\t\tif ( $this->edit_title == 1 )\n\t\t{\n\t\t\t$topic_title = isset($_POST['TopicTitle']) ? $this->ipsclass->input['TopicTitle'] : $this->topic['title'];\n\t\t\t$topic_desc = isset($_POST['TopicDesc']) ? $this->ipsclass->input['TopicDesc'] : $this->topic['description'];\n\t\t\t\n\t\t\t$topic_title = $this->ipsclass->compiled_templates['skin_post']->topictitle_fields( array( 'TITLE' => $topic_title, 'DESC' => $topic_desc ) );\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Do we have any posting errors?\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( isset($this->obj['post_errors']) AND $this->obj['post_errors'] )\n\t\t{\n\t\t\t$this->output .= $this->ipsclass->compiled_templates['skin_post']->errors( $this->ipsclass->lang[ $this->obj['post_errors'] ]);\n\t\t}\n\t\t\n\t\tif ( isset($this->obj['preview_post']) AND $this->obj['preview_post'] )\n\t\t{\n\t\t\t$this->output .= $this->ipsclass->compiled_templates['skin_post']->preview( $this->show_post_preview( $this->post['post'], $this->post_key ) );\n\t\t}\n\t\t\n\t\t$this->output .= $this->html_start_form( array( 1 => array( 'CODE' , '09' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t2 => array( 't' , $this->topic['tid']),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t3 => array( 'p' , $this->ipsclass->input['p'] ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t4 => array( 'st' , $this->ipsclass->input['st'] ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t5 => array( 'attach_post_key', $this->post_key )\n\t\t\t\t\t\t\t\t\t\t\t ) );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t//-----------------------------------------\n\t\t// START TABLE\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->output .= $this->ipsclass->compiled_templates['skin_post']->table_structure();\n\t\t\n\t\t$start_table = $this->ipsclass->compiled_templates['skin_post']->table_top( \"{$this->ipsclass->lang['top_txt_edit']} {$this->topic['title']}\");\n\t\t\n\t\t$name_fields = $this->html_name_field();\n\t\t\n\t\t$post_box = $this->html_post_body( $raw_post );\n\t\t\t\n\t\t$mod_options = $this->edit_title == 1 ? $this->mod_options('edit') : '';\n\t\t\n\t\t$end_form = $this->ipsclass->compiled_templates['skin_post']->EndForm( $this->ipsclass->lang['submit_edit'] );\n\t\t\n\t\t$post_icons = $this->html_post_icons($this->orig_post['icon_id']);\n\t\t\n\t\t$upload_field = $this->can_upload ? $this->html_build_uploads($this->post_key,'edit',$this->orig_post['pid']) : '';\n\t\t\n\t\t//-----------------------------------------\n\t\t// Still here?\n\t\t//-----------------------------------------\n\t\t\n\t\t$poll_box = \"\";\n\t\t\n\t\tif ( $this->can_add_poll )\n\t\t{\n\t\t\t//-----------------------------------------\n\t\t\t// Did someone hit preview / do we have\n\t\t\t// post info?\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$poll_questions = \"\";\n\t\t\t$poll_choices = \"\";\n\t\t\t$poll_votes = \"\";\n\t\t\t$show_open = 0;\n\t\t\t$is_mod = 0;\n\t\t\t$poll_only\t\t= \"\";\n\t\t\t$poll_multi\t\t= \"\";\t\t\t\n\t\t\t\n\t\t\tif ( isset($_POST['question']) AND is_array( $_POST['question'] ) and count( $_POST['question'] ) )\n\t\t\t{\n\t\t\t\tforeach( $_POST['question'] as $id => $question )\n\t\t\t\t{\n\t\t\t\t\t$poll_questions .= \"\\t{$id} : '\".str_replace( \"'\", '&#39;', $question ).\"',\\n\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$poll_question = $this->ipsclass->input['poll_question'];\n\t\t\t\t$show_open = 1;\n\t\t\t\t\n\t\t\t\tif ( is_array( $_POST['choice'] ) and count( $_POST['choice'] ) )\n\t\t\t\t{\n\t\t\t\t\tforeach( $_POST['choice'] as $id => $choice )\n\t\t\t\t\t{\n\t\t\t\t\t\t$poll_choices .= \"\\t'{$id}' : '\".str_replace( \"'\", '&#39;', $choice ).\"',\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( isset($_POST['multi']) AND is_array( $_POST['multi'] ) and count( $_POST['multi'] ) )\n\t\t\t\t{\n\t\t\t\t\tforeach( $_POST['multi'] as $id => $checked )\n\t\t\t\t\t{\n\t\t\t\t\t\t$poll_multi .= \"\\t{$id} : '{$checked}',\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( is_array( $_POST['votes'] ) and count( $_POST['votes'] ) )\n\t\t\t\t{\n\t\t\t\t\tforeach( $_POST['votes'] as $id => $vote )\n\t\t\t\t\t{\n\t\t\t\t\t\t$poll_votes .= \"\\t'{$id}' : '\".$vote.\"',\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$poll_only = 0;\n\t\t\t\t\n\t\t\t\tif( $this->ipsclass->vars['ipb_poll_only'] AND $this->ipsclass->input['poll_only'] == 1 )\n\t\t\t\t{\n\t\t\t\t\t$poll_only = \"checked='checked'\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$poll_questions = preg_replace( \"#,(\\n)?$#\", \"\\\\1\", $poll_questions );\n\t\t\t\t$poll_choices = preg_replace( \"#,(\\n)?$#\", \"\\\\1\", $poll_choices );\n\t\t\t\t$poll_multi \t= preg_replace( \"#,(\\n)?$#\", \"\\\\1\", $poll_multi );\n\t\t\t\t$poll_votes = preg_replace( \"#,(\\n)?$#\", \"\\\\1\", $poll_votes );\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Load the poll from the DB\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\t$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'polls', 'where' => \"tid=\".$this->topic['tid'] ) );\n\t\t\t\t$this->ipsclass->DB->simple_exec();\n\t\t\n\t \t\t$this->poll_data = $this->ipsclass->DB->fetch_row();\n\t \t\t\n\t \t\t$this->poll_answers = $this->poll_data['choices'] ? unserialize(stripslashes($this->poll_data['choices'])) : array();\n\n \t\t//-----------------------------------------\n \t\t// Lezz go\n \t\t//-----------------------------------------\n \t\t\n \t\tforeach( $this->poll_answers as $question_id => $data )\n \t\t{\n \t\t\t$poll_questions .= \"\\t{$question_id} : '\".str_replace( \"'\", '&#39;', $data['question'] ).\"',\\n\";\n \t\t\t\n \t\t\t$data['multi']\t = isset($data['multi']) ? intval($data['multi']) : 0;\n \t\t\t$poll_multi \t.= \"\\t{$question_id} : '\".$data['multi'].\"',\\n\";\n \t\t\t\n \t\t\tforeach( $data['choice'] as $choice_id => $text )\n\t\t\t\t\t{\n\t\t\t\t\t\t$choice = $text;\n\t\t\t\t\t\t$votes = intval($data['votes'][ $choice_id ]);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$poll_choices .= \"\\t'{$question_id}_{$choice_id}' : '\".str_replace( \"'\", '&#39;', $choice ).\"',\\n\";\n\t\t\t\t\t\t$poll_votes .= \"\\t'{$question_id}_{$choice_id}' : '\".$votes.\"',\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$poll_only = 0;\n\t\t\t\t\n\t\t\t\tif ( $this->ipsclass->vars['ipb_poll_only'] AND $this->poll_data['poll_only'] == 1 )\n\t\t\t\t{\n\t\t\t\t\t$poll_only = \"checked='checked'\";\n\t\t\t\t}\t\t\t\t\n\t\t\t\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Trim off trailing commas (Safari hates it)\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\t$poll_questions = preg_replace( \"#,(\\n)?$#\", \"\\\\1\", $poll_questions );\n\t\t\t\t$poll_choices = preg_replace( \"#,(\\n)?$#\", \"\\\\1\", $poll_choices );\n\t\t\t\t$poll_multi \t= preg_replace( \"#,(\\n)?$#\", \"\\\\1\", $poll_multi );\n\t\t\t\t$poll_votes = preg_replace( \"#,(\\n)?$#\", \"\\\\1\", $poll_votes );\n\t\t\t\t\n\t\t\t\t$poll_question = $this->poll_data['poll_question'];\n\t\t\t\t$show_open = $this->poll_data['choices'] ? 1 : 0;\n\t\t\t\t$is_mod = $this->can_add_poll_mod;\n\t\t\t}\n\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// Print poll box\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$poll_box = $this->ipsclass->compiled_templates['skin_post']->poll_box( $this->max_poll_questions, $this->max_poll_choices_per_question, $poll_questions, $poll_choices, $poll_votes, $show_open, $poll_question, $is_mod, $poll_multi, $poll_only );\n\t\t}\n\t\t\n\t\t$edit_option = \"\";\n\t\t\n\t\tif ($this->ipsclass->member['g_append_edit'])\n\t\t{\n\t\t\t$checked = \"\";\n\t\t\t$show_reason = 0;\n\t\t\t\n\t\t\tif ($this->orig_post['append_edit'])\n\t\t\t{\n\t\t\t\t$checked = \"checked\";\n\t\t\t}\n\t\t\t\n\t\t\tif ( $this->moderator['edit_post'] OR $this->ipsclass->member['g_is_supmod'] )\n\t\t\t{\n\t\t\t\t$show_reason = 1;\n\t\t\t}\n\t\t\t\n\t\t\t$edit_option = $this->ipsclass->compiled_templates['skin_post']->add_edit_box( $checked, $show_reason, $this->ipsclass->input['post_edit_reason'] ? $this->ipsclass->input['post_edit_reason'] : $this->orig_post['post_edit_reason'] );\n\t\t}\n\t\t\n\t\t$this->output = str_replace( \"<!--START TABLE-->\" , $start_table , $this->output );\n\t\t$this->output = str_replace( \"<!--NAME FIELDS-->\" , $name_fields , $this->output );\n\t\t$this->output = str_replace( \"<!--POST BOX-->\" , $post_box , $this->output );\n\t\t$this->output = str_replace( \"<!--POLL BOX-->\" , $poll_box , $this->output );\n\t\t$this->output = str_replace( \"<!--POST ICONS-->\" , $post_icons , $this->output );\n\t\t$this->output = str_replace( \"<!--END TABLE-->\" , $end_form , $this->output );\n\t\t$this->output = str_replace( \"<!--UPLOAD FIELD-->\", $upload_field , $this->output );\n\t\t$this->output = str_replace( \"<!--MOD OPTIONS-->\" , $edit_option . $mod_options , $this->output );\n\t\t$this->output = str_replace( \"<!--FORUM RULES-->\" , $this->ipsclass->print_forum_rules($this->forum), $this->output );\n\t\t$this->output = str_replace( \"<!--TOPIC TITLE-->\" , $topic_title , $this->output );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Add in siggy buttons and such\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->input['post_htmlstatus'] = $this->orig_post['post_htmlstate'];\n\t\t$this->ipsclass->input['enablesig']\t\t = $this->orig_post['use_sig'];\n\t\t$this->ipsclass->input['enableemo']\t\t = $this->orig_post['use_emo'];\n\t\t\n\t\t$this->html_checkboxes('edit', $this->topic['tid'], $this->forum['id']);\n\t\t\n\t\t$this->html_topic_summary( $this->topic['tid'] );\n\t\t\n\t\t$this->show_post_navigation();\n\t\t\t\t\t\t \n\t\t$this->title = $this->ipsclass->lang['editing_post'].' '.$this->topic['title'];\n\t\t\n\t\t$this->ipsclass->print->add_output( $this->output );\n\t\t\n $this->ipsclass->print->do_output( array( 'TITLE' => $this->ipsclass->vars['board_name'].\" -> \".$this->title,\n \t\t\t\t\t \t 'JS' => 1,\n \t\t\t\t\t \t 'NAV' => $this->nav,\n \t\t\t\t\t ) );\n\t}", "function makeForm ()\n{\n\trequire('colors/colors.php');\n\t$inRow = false;\n\t$isSubmission = isset($_REQUEST['submission']) && ($_REQUEST['submission'] == 'yes');\n\techo \"<form method=\\\"get\\\">\\n\";\n\techo \"<input type=\\\"hidden\\\" name=\\\"submission\\\" value='no'/>\\n\";\n\techo \"<table>\\n\";\n\n\t\n\tfor ($i = 1; $i <= 4; $i++)\n\t{\n\t\t// If not in row, create new row and toggle $inRow, if in row simply toggle $inRow\n\t\tif(!$inRow)\n\t\t{\n\t\t\techo \"<tr>\\n\";\n\t\t\t$inRow = true;\n\t\t}\n\t\telse\n\t\t\t$inRow = false;\n\t\t\n\t\t// Start this section of data\n\t\techo \"<td>\\n\";\n\t\t\n\t\t// Insert caption box\n\t\t$captionbox = \"captionbox\" . $i;\n\t\t$value = empty($_REQUEST) ? \"\" : $_REQUEST[$captionbox];\n\t\techo \"<p>\\n\";\n\t\techo \"\\t<label for=\\\"$captionbox\\\">Enter Caption:</label>\\n\";\n\t\techo \"\\t<input type=\\\"text\\\" id=\\\"$captionbox\\\" name=\\\"$captionbox\\\" value=\\\"$value\\\"/>\\n\";\n\t\techo \"</p>\\n\";\n\t\tif($isSubmission)\n\t\t\tcaptionError($captionbox);\n\t\t\n\t\t// Insert Color drop down menu\n\t\t$selectBox = \"selectbox\" . $i;\n\t\t$colorMenu = createColors($colorTypes, $selectBox, $defaultColor);\n\t\techo $colorMenu;\n\t\t\n\t\t// Insert radio buttons and thumbs\n\t\t$radioBox = \"radioBox\" . $i;\n\t\t$radioMenu = createRadios($radioBox, $i);\n\t\techo $radioMenu;\n\t\tif($isSubmission)\n\t\t\tradioError($radioBox);\n\t\t\n\t\t// End data entry\n\t\techo \"</td>\\n\";\n\t\t\n\t\t// If no longer in row, end the row\n\t\tif(!$inRow)\n\t\t{\n\t\t\techo \"</tr>\\n\";\n\t\t}\n\t}\n\t\n\techo \"</table>\";\n\techo \"<input type=\\\"submit\\\" id=\\\"submit\\\" onclick=\\\"submission.value='yes'\\\" value=\\\"Make captions\\\"/>\\n\";\n\techo \"</form>\\n\";\n}", "public function generate()\n\t{\n if (is_array($GLOBALS['TL_JAVASCRIPT']))\n\t\t{\n\t\t\tarray_insert($GLOBALS['TL_JAVASCRIPT'], 1, 'bundles/hschottmtextwizard/js/textwizard.min.js');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$GLOBALS['TL_JAVASCRIPT'] = array('bundles/hschottmtextwizard/js/textwizard.min.js');\n\t\t}\n\n\t\t$arrButtons = array('new', 'copy', 'delete', 'drag');\n\t\t// Make sure there is at least an empty array\n\t\tif (empty($this->varValue) || !\\is_array($this->varValue))\n\t\t{\n\t\t\t$this->varValue = array('');\n\t\t}\n\t\t// Initialize the tab index\n\t\tif (!\\Cache::has('tabindex'))\n\t\t{\n\t\t\t\\Cache::set('tabindex', 1);\n\t\t}\n\n $hasTitles = array_key_exists('buttonTitles', $this->arrConfiguration) && is_array($this->arrConfiguration['buttonTitles']);\n\n $return = ($this->wizard) ? '<div class=\"tl_wizard\">' . $this->wizard . '</div>' : '';\n\t\t$return .= '<ul id=\"ctrl_'.$this->strId.'\" class=\"tl_listwizard tl_textwizard\">';\n\t\t// Add input fields\n\t\tfor ($i=0, $c=\\count($this->varValue); $i<$c; $i++)\n\t\t{\n\t\t\t$return .= '\n <li><input type=\"text\" name=\"'.$this->strId.'[]\" class=\"tl_text\" value=\"'.\\StringUtil::specialchars($this->varValue[$i]).'\"' . $this->getAttributes() . '> ';\n\t\t\t// Add buttons\n\t\t\tforeach ($arrButtons as $button)\n\t\t\t{\n\t\t\t\tif ($button == 'drag')\n\t\t\t\t{\n\t\t\t\t\t$return .= ' <button type=\"button\" class=\"drag-handle\" title=\"' . \\StringUtil::specialchars($GLOBALS['TL_LANG']['MSC']['move']) . '\" aria-hidden=\"true\">' . \\Image::getHtml('drag.svg') . '</button>';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n $buttontitle = ($hasTitles && array_key_exists($button, $this->arrConfiguration['buttonTitles'])) ? $this->arrConfiguration['buttonTitles'][$button] : $GLOBALS['TL_LANG']['MSC']['lw_'.$button];\n\t\t\t\t\t$return .= ' <button type=\"button\" data-command=\"' . $button . '\" title=\"' . \\StringUtil::specialchars($buttontitle) . '\">' . \\Image::getHtml($button.'.svg') . '</button>';\n\t\t\t\t}\n\t\t\t}\n\t\t\t$return .= '</li>';\n\t\t}\n\t\treturn $return.'\n </ul>\n <script>TextWizard.textWizard(\"ctrl_'.$this->strId.'\")</script>';\n\t}", "public function generate()\n\t{\n\t\t$GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/coursebuilderwizard/html/coursebuilderwizard.js';\n\t\t$GLOBALS['TL_CSS'][] = 'system/modules/coursebuilderwizard/html/coursebuilderwizard.css';\n\t\n\t\n\t\t$this->import('Database');\n\n\t\t$arrButtons = array('copy', 'up', 'down', 'delete');\n\t\t$strCommand = 'cmd_' . $this->strField;\n\n\t\t// Change the order\n\t\tif ($this->Input->get($strCommand) && is_numeric($this->Input->get('cid')) && $this->Input->get('id') == $this->currentRecord)\n\t\t{\n\t\t\tswitch ($this->Input->get($strCommand))\n\t\t\t{\n\t\t\t\tcase 'copy':\n\t\t\t\t\t$this->varValue = array_duplicate($this->varValue, $this->Input->get('cid'));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'up':\n\t\t\t\t\t$this->varValue = array_move_up($this->varValue, $this->Input->get('cid'));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'down':\n\t\t\t\t\t$this->varValue = array_move_down($this->varValue, $this->Input->get('cid'));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'delete':\n\t\t\t\t\t$this->varValue = array_delete($this->varValue, $this->Input->get('cid'));\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$elements = array();\n\t\t\n\t\t// Get all available options to assemble the courses\n\t\tforeach($GLOBALS['CB_ELEMENT'] as $strClass=>$arrData)\n\t\t{\n\t\t\t$objElements = $this->Database->prepare(\"SELECT id, name FROM {$arrData['table']} ORDER BY name\")->execute();\n\t\t\t\n\t\t\tif ($objElements->numRows)\n\t\t\t{\n\t\t\t\twhile($objElements->next())\n\t\t\t\t{\n\t\t\t\t\t$arrEl = $objElements->row(); \n\t\t\t\t\t$arrEl['type'] = $strClass;\n\t\t\t\t\t$elements[] = $arrEl;\n\t\t\t\t}\n\t\t\t\n\t\t\t}\t\t\t\n\t\t}\n\t\t\n\t\t// Get new value\n\t\tif ($this->Input->post('FORM_SUBMIT') == $this->strTable)\n\t\t{\n\t\t\t$this->varValue = $this->Input->post($this->strId);\n\t\t}\n\n\t\t// Make sure there is at least an empty array\n\t\tif (!is_array($this->varValue) || !$this->varValue[0])\n\t\t{\n\t\t\t$this->varValue = array('');\n\t\t}\n\n\t\t// Save the value\n\t\tif ($this->Input->get($strCommand) || $this->Input->post('FORM_SUBMIT') == $this->strTable)\n\t\t{\n\t\t\t$this->Database->prepare(\"UPDATE \" . $this->strTable . \" SET \" . $this->strField . \"=? WHERE id=?\")\n\t\t\t\t\t\t ->execute(serialize($this->varValue), $this->currentRecord);\n\n\t\t\t// Reload the page\n\t\t\tif (is_numeric($this->Input->get('cid')) && $this->Input->get('id') == $this->currentRecord)\n\t\t\t{\n\t\t\t\t$this->redirect(preg_replace('/&(amp;)?cid=[^&]*/i', '', preg_replace('/&(amp;)?' . preg_quote($strCommand, '/') . '=[^&]*/i', '', $this->Environment->request)));\n\t\t\t}\n\t\t}\n\n\t\t// Add label and return wizard\n\t\t$return .= '<table cellspacing=\"0\" cellpadding=\"0\" id=\"ctrl_'.$this->strId.'\" class=\"tl_courseBuilderWizard\" summary=\"Course wizard\">\n <thead>\n <tr>\n <td>'.$GLOBALS['TL_LANG']['MSC']['cb_course'].'</td>\n <td>&nbsp;</td>\n </tr>\n </thead>\n <tbody>';\n\n\t\t// Load tl_article language file\n\t\t$this->loadLanguageFile('tl_article');\n\n\t\t// Add input fields\n\t\tfor ($i=0; $i<count($this->varValue); $i++)\n\t\t{\n\t\t\t$options = '';\n\n\t\t\t// Add modules\n\t\t\tforeach ($elements as $v)\n\t\t\t{\n\t\t\t\t$options .= '<option value=\"'.specialchars($v['type']).'|'.specialchars($v['id']).'\"'.$this->optionSelected($v['type'].'|'.$v['id'], $this->varValue[$i]).'>'.$v['name'].'</option>';\n\t\t\t}\n\n\t\t\t$return .= '\n <tr>\n <td><select name=\"'.$this->strId.'['.$i.']\" class=\"tl_select\" onfocus=\"Backend.getScrollOffset();\">'.$options.'</select></td>';\n\t\t\t\n\t\t\t$return .= '<td>';\n\n\t\t\tforeach ($arrButtons as $button)\n\t\t\t{\n\t\t\t\t$return .= '<a href=\"'.$this->addToUrl('&amp;'.$strCommand.'='.$button.'&amp;cid='.$i.'&amp;id='.$this->currentRecord).'\" title=\"'.specialchars($GLOBALS['TL_LANG']['MSC']['mw_'.$button]).'\" onclick=\"CourseBuilderWizard.coursebuilderWizard(this, \\''.$button.'\\', \\'ctrl_'.$this->strId.'\\'); return false;\">'.$this->generateImage($button.'.gif', $GLOBALS['TL_LANG']['MSC']['mw_'.$button], 'class=\"tl_listwizard_img\"').'</a> ';\n\t\t\t}\n\n\t\t\t$return .= '</td>\n </tr>';\n\t\t}\n\n\t\treturn $return.'\n </tbody>\n </table>';\n\t}", "function cjpopups_shortcode_form($options){\n\tinclude(sprintf('%s/shortcode_form.php', cjpopups_item_path('includes_dir')));\n\treturn implode(\"\\n\", $display);\n}", "public function cloudviewForm(): string\n {\n $rcmail = rcmail::get_instance();\n\n $boxTitle = html::div(['class' => 'boxtitle'], rcmail::Q($this->gettext('plugin_settings_title')));\n\n $saveButton = (new html_button())->show(\n rcmail::Q($this->gettext('save')),\n [\n 'type' => 'input',\n 'class' => 'btn button submit mainaction',\n 'onclick' => \"return rcmail.command('plugin.cloudview-save', '', this, event)\",\n ]\n );\n\n $objectTable = new html_table(['cols' => 2, 'class' => 'propform']);\n\n // option: enable this plugin or not\n $objectCloudviewEnabled = new html_checkbox([\n 'name' => '_cloudview_enabled',\n 'id' => '_cloudview_enabled',\n 'value' => 1,\n ]);\n $objectTable->add('title', html::label('_cloudview_enabled', rcmail::Q($this->gettext('plugin_enabled'))));\n $objectTable->add('', $objectCloudviewEnabled->show($this->prefs['cloudview_enabled'] ? 1 : 0));\n\n // option: choose cloud viewer\n $objectCloudviewViewer = new html_select(['name' => '_cloudview_viewer', 'id' => '_cloudview_viewer']);\n $objectCloudviewViewer->add(\n [\n rcmail::Q($this->gettext('viewer_microsoft_office_web')),\n rcmail::Q($this->gettext('viewer_google_docs')),\n ],\n [\n self::VIEWER_MICROSOFT_OFFICE_WEB,\n self::VIEWER_GOOGLE_DOCS,\n ]\n );\n $objectTable->add('title', html::label('_cloudview_viewer', rcmail::Q($this->gettext('select_viewer'))));\n $objectTable->add('', $objectCloudviewViewer->show($this->prefs['cloudview_viewer']));\n\n $table = $objectTable->show();\n $form = html::div(['class' => 'boxcontent'], $table . $saveButton);\n\n // responsive layout for the \"elastic\" skin\n if (RoundcubeHelper::getBaseSkinName() === 'elastic') {\n $containerAttrs = ['class' => 'formcontent'];\n } else {\n $containerAttrs = [];\n }\n\n $rcmail->output->add_gui_object('cloudview-form', 'cloudview-form');\n\n return html::div($containerAttrs, $rcmail->output->form_tag(\n [\n 'id' => 'cloudview-form',\n 'name' => 'cloudview-form',\n 'method' => 'post',\n 'class' => 'propform',\n 'action' => './?_task=settings&_action=plugin.cloudview-save',\n ],\n html::div(['class' => 'box'], $boxTitle . $form)\n ));\n }", "public function append_media_upload_form() {\n \n ?>\n <!-- Add from Media Library -->\n <a href=\"#\" class=\"envira-media-library button\" title=\"<?php _e( 'Click Here to Insert from Other Image Sources', 'envira-gallery' ); ?>\" style=\"vertical-align: baseline;\">\n <?php _e( 'Select Files from Other Sources', 'envira-gallery' ); ?>\n </a>\n\n <!-- Progress Bar -->\n <div class=\"envira-progress-bar\">\n <div class=\"envira-progress-bar-inner\"></div>\n <div class=\"envira-progress-bar-status\">\n <span class=\"uploading\">\n <?php _e( 'Uploading Image', 'envira-gallery' ); ?>\n <span class=\"current\">1</span>\n <?php _e( 'of', 'envira-gallery' ); ?>\n <span class=\"total\">3</span>\n </span>\n\n <span class=\"done\"><?php _e( 'All images uploaded.', 'envira-gallery' ); ?></span>\n </div>\n </div>\n <?php\n\n }", "function html_form_code() {\n $form = \"\";\n $form.=\"<form action='\" . esc_url($_SERVER['REQUEST_URI']) . \"' method='post'>\";\n $form.=\"<input type='text' name='ms-name' value='\" . ( isset($_POST[\"ms-name\"]) ? esc_attr($_POST[\"ms-name\"]) : '' ) . \"' placeholder='Ваше Имя'/>\";\n $form.=\"<input type='email' name='ms-email' value='\" . ( isset($_POST[\"ms-email\"]) ? esc_attr($_POST[\"ms-email\"]) : '' ) . \"' placeholder='Ваш E-mail'/>\";\n $form.=\"<input name='ms-submit' type='submit' id='add-share-btn' value='Получить доступ'/>\";\n $form.=\"</form>\";\n echo $form;\n}" ]
[ "0.7886451", "0.68713915", "0.67178565", "0.6539944", "0.6483157", "0.6474773", "0.64229256", "0.6420625", "0.63697195", "0.63479596", "0.6323945", "0.63135266", "0.62959915", "0.6291068", "0.6272934", "0.6272123", "0.62512887", "0.6247538", "0.6239279", "0.6233017", "0.6231236", "0.6229104", "0.62192297", "0.6219041", "0.6171441", "0.6141108", "0.61409783", "0.6130023", "0.609278", "0.60664654", "0.6052796", "0.6041995", "0.60301584", "0.6020875", "0.6009843", "0.5990211", "0.5988356", "0.59855515", "0.5982797", "0.59824693", "0.5974245", "0.59677565", "0.5965452", "0.59546745", "0.59476703", "0.5937455", "0.5909079", "0.58944166", "0.5885427", "0.5882749", "0.58792895", "0.58788574", "0.5873863", "0.5872746", "0.58723533", "0.58646935", "0.58508515", "0.5850608", "0.5838353", "0.58340013", "0.58311534", "0.58307064", "0.58228153", "0.58156615", "0.5795184", "0.57942927", "0.57789075", "0.57780874", "0.5777978", "0.57721734", "0.5770865", "0.5765711", "0.576365", "0.57626444", "0.57579565", "0.574798", "0.5747159", "0.57308674", "0.5727316", "0.57238823", "0.57168347", "0.5713956", "0.57097095", "0.5705178", "0.57046556", "0.5696239", "0.56939095", "0.56895643", "0.568622", "0.567666", "0.56738603", "0.56691253", "0.56661034", "0.5664113", "0.56620044", "0.56579816", "0.56578046", "0.5654757", "0.56539834", "0.5652413" ]
0.7944517
0
Display a listing of the resource.
public function index() { return Container::paginate(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $container = new Container($request->all()); $container->save(); return $this->successResponse($container, '¡Contenedor registrado correctamente!'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72855324", "0.71447515", "0.7132799", "0.6641042", "0.66208744", "0.6566955", "0.65249777", "0.6509032", "0.6447701", "0.63756555", "0.6373163", "0.63650846", "0.63650846", "0.63650846", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676" ]
0.0
-1
Display the specified resource.
public function show(Container $container) { return $this->successResponse($container); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, Container $container) { $container->update($request->all()); return $this->successResponse($container, '¡Contenedor actualizado correctamente!'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy(Container $container) { $container->delete(); return $this->successResponse($container, '¡Contenedor enviado a la papelera correctramente!'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
Override to fix problem on coutry
public function getCountryHtmlSelect($type) { if($type == 'billing') { $address = $this->getQuote()->getBillingAddress(); /* $address = $this->getQuote()->getCustomer()->getPrimaryBillingAddress(); if (!$this->isCustomerLoggedIn() || $address == null) $address = $this->getQuote()->getBillingAddress(); */ } else { $address = $this->getQuote()->getShippingAddress(); /* $address = $this->getQuote()->getCustomer()->getPrimaryShippingAddress(); if (!$this->isCustomerLoggedIn() || $address == null) $address = $this->getQuote()->getShippingAddress(); */ } $countryId = $address->getCountryId(); if (is_null($countryId) || $countryId == '' || $countryId == ' ') { $countryId = Mage::getStoreConfig('general/country/default'); } $select = $this->getLayout()->createBlock('core/html_select') ->setName($type.'[country_id]') ->setId($type.':country_id') ->setTitle(Mage::helper('checkout')->__('Country')) ->setClass('validate-select') ->setValue($countryId) ->setOptions($this->getCountryOptions()); if ($type === 'shipping') { $select->setExtraParams('onchange="shipping.setSameAsBilling(false);"'); } return $select->getHtml(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function output() {}", "function output() {\n \n }", "protected function _output($data) {}", "public function serch()\n {\n }", "protected function _clearAndOutput() {}", "public function output() {\n }", "public function emitirSom()\n {\n }", "public static function output() {}", "public static function pretending()\n {\n }", "protected function fixSelf() {}", "protected function fixSelf() {}", "abstract function printOutput()", "protected function _post_render() {\n\t\n\t\t// Silence is golden\n\t\n\t}", "public function output(): void;", "public function ugly() {\n $this->_pretty = false;\n }", "public function output()\n {\n // TODO: Implement output() method.\n }", "public function fix() {}", "public function fix() {}", "public function InputOutput(){\n\t\t\n\t}", "public function output();", "public function output();", "public function output();", "public function output();", "public function output();", "public function __construct()\n {\n $this->_out = new ConsoleOutput();\n parent::__construct();\n }", "public function output() {\n\t\t_deprecated_function( __METHOD__, '3.2' );\n\t}", "public function oops () {\n }", "function printout() {\n print_a($this);\n }", "protected function _write() {}", "public function __toString(){ return $this->render(); }", "public function get_output()\n {\n }", "abstract public function getOutput();", "function __toString () {\n \n \n \n }", "function finalize()\n {\n if ($this->_numbers) {\n $this->_output = preg_replace_callback('~^~m', array($this, 'replaceCallback'), $this->_output);\n }\n $this->_output .= HL_CONSOLE_DEFCOLOR . \"\\n\";\n }", "protected function _render()\n {\n }", "abstract public function output($return = false);", "public function toString()\n {\n return 'Some Poses don\\'t display correct';\n }", "function main()\r\n {\r\n $this->setOutput();\r\n }", "protected function _asText()\n {\n return (string) parent::__toString();\n }", "public function __toString()\n\t{\n\t\treturn \"This is the function that is called when you try to use print or echo or a variable that holds an instance of this class.\";\n\t}", "protected function renderAsPlain() {}", "public function _strings_for_pot()\n {\n }", "function printableString () {\n \t\t$classname = get_class($this);\n \t\t$string = 'a';\n \t\t\n \t\tif (in_array(strtolower($classname[0]), array('a', 'e', 'i', 'o', 'u')))\n \t\t\t$string .= 'n';\n \t\t\n \t\t$classname[0] = strtoupper($classname[0]);\n \t\t$string .= ' '.$classname;\n \t\t\n \t\treturn $string;\n \t}", "abstract protected function outputInternal(string $transformedData);", "public function __toString()\n {\n\n }", "function __toString(): string\n {\n return $this->lineWidth->toString() . \" w\\n\";\n }", "public function writeTop()\n {\n }", "public function zoomPrint() {\n\t}", "public function out2()\n {\n $this->out2_never_true = TRUE;\n }", "function fix() ;", "public function custom()\n\t{\n\t}", "protected function outputSpecificStep() {}", "public function toString()\n {\n\n }", "public function printPusryciai(){\n return $this->pusryciai;\n echo $pusryciai;\n }", "public function beforeOutputError() {\n }", "abstract protected function write();", "protected function afterPrint()\n {\n //just a shell\n }", "public function getOutput() {}", "function divertUnsecureLine() \n {\n // Abstract Method\n }", "public function prepareOutput(){ return $this->value; }", "public function __toString()\n {\n }", "public function __toString()\n {\n }", "public function __toString()\n {\n }", "public function __toString()\n {\n }", "public function __toString()\n {\n }", "public function __toString()\n {\n }", "public function __toString()\n {\n }", "protected function _updateToUnicodeStream() {}", "public function Latir() { //Irá receber da superclasse,apenas alteramos para o que queremos.\n return ' <b>Não conseguio latir!</b>'; // Retorne o latido\n parent::Latir();\n }", "public function __toString() {\n\t\treturn ($this->state?'X':' ').' '.$this->text.\"\\n\";\n\t}", "protected function render()\n {\n }", "protected function render()\n {\n }", "protected function render()\n {\n }", "protected function render()\n {\n }", "public function nadar()\n {\n }", "protected function beforePrint()\n {\n return true;\n }", "function index_printable() {\n throw new NotImplementedError(__CLASS__ . '::' . __FUNCTION__);\n }", "function __toString(): string\n {\n return $this->wordSpace->toString() . \" Tw\\n\";\n }", "public function out($text = '');", "public function output_filter()\n\t{\n\t\tglobal $output;\n\t\t$this->output = &$output;\n\n\t\t$this->frontend = new Frontend();\n\t\t$this->module = $this->frontend->run();\n\n\t\tif (strstr($this->output, \"#fixemodule\")) {\n\t\t\t$this->output = $this->replace_placeholders($this->output);\n\t\t}\n\t}", "public function __toString()\n\t{\n\t\treturn \"_____\";\n\t}", "function toString() {\n\n\t\t\t}", "public function mostrarInfo()\n {\n // $datos.= \"Cuatrimestre\".$this->cuatrimestre;\n // return parent::mostrarInfo().\" \".$datos;\n }", "protected abstract function output($text);", "public function __toString(){\n\n return \"Square<br>\" . $this -> getString();\n\n }", "public function __toString() {\n //(string)var_export($this);\n }", "protected function render() {}", "protected function render() {}", "protected function render() {}", "public function render() {\r\n\t\t\r\n\t}", "public function print();", "public abstract function writeBack();", "private function __() {\n }", "function _out($s)\n\t\t{\n\t\t\tif($this->state==2)\t$this->pages[$this->page] .= $s.\"\\n\";\n\t\t\telse $this->buffer .= $s.\"\\n\";\n\t\t}", "function write()\n {\n }", "public function write()\n {\n }", "function output_html($data, $query='') {\n // should be overridden\n return;\n }", "public function __toString() {\n\t\treturn self::$before . $this->render() . self::$after;\n\t}", "public function __construct() {\n if (static::$formatter === null) {\n static::$formatter = new Indenter();\n }\n }", "abstract public function __toString() ;", "public function Latir() { //Irá receber da superclasse,apenas alteramos para o que queremos.\n return ' <b>Latiu alto!</b>'; // Retorne o latido\n parent::Latir();\n }" ]
[ "0.60281885", "0.60188675", "0.5942657", "0.5905212", "0.58281714", "0.57719547", "0.57484466", "0.57482123", "0.56876653", "0.56279594", "0.56279594", "0.5618731", "0.5596647", "0.55584323", "0.5539451", "0.5534219", "0.55122787", "0.5512048", "0.55106145", "0.5509389", "0.5509389", "0.5509389", "0.5509389", "0.5509389", "0.5497915", "0.5486917", "0.5476923", "0.5465244", "0.546103", "0.5448203", "0.5397585", "0.53869504", "0.5361344", "0.534675", "0.5344761", "0.5326298", "0.53241307", "0.5311366", "0.52947634", "0.5268775", "0.52687186", "0.52316755", "0.52268475", "0.5225952", "0.5218708", "0.5218164", "0.52138954", "0.52130824", "0.5209628", "0.5207577", "0.52065915", "0.52057517", "0.5194894", "0.5192451", "0.5183034", "0.5172555", "0.5164379", "0.51634973", "0.5157458", "0.5155327", "0.5149936", "0.5149936", "0.514944", "0.514944", "0.514944", "0.514944", "0.514944", "0.5145915", "0.5141472", "0.5133693", "0.5128418", "0.5126114", "0.5125135", "0.5125135", "0.51216763", "0.51073676", "0.5106316", "0.5101611", "0.5084247", "0.50795364", "0.5077806", "0.50739086", "0.5072151", "0.5071321", "0.50712126", "0.50669783", "0.506489", "0.50640976", "0.50640976", "0.5060552", "0.5058094", "0.5056424", "0.5056254", "0.5053977", "0.5050515", "0.50483984", "0.50476605", "0.50419176", "0.5038275", "0.503783", "0.50375175" ]
0.0
-1
Display a listing of the resource.
public function index(Request $request) { // // if($request->has("per_page")) { // // $sort = $request->get("sort"); // $sort_array = explode("|", $sort); // if ($request->sort != "") { // $transactions = Transaction::select("product_name","code","user_name","size","quantity","bought_price","sold_price","created_at")->orderBy($sort_array["0"], $sort_array[1])->paginate(40); // // // }else{ // $transactions = Transaction::select("product_name","code","size","user_name","quantity","bought_price","sold_price","created_at")->paginate(40); // } // // // return response()->json($transactions,200); // } $has_query=false; if($request->has("query")){ $query=$request->get("query"); $has_query=true; $transactions= Transaction::where( 'code', 'LIKE', '%'.$query.'%' ) ->orWhere('product_name', 'LIKE', '%'.$query.'%') ->orWhere('bill_no', 'LIKE', '%'.$query.'%') ->orWhere('user_name', 'LIKE', '%'.$query.'%') ->orderBy("created_at","desc") ->paginate(40); }else{ $transactions=Transaction::orderBy("created_at","desc")->paginate(40); } return view("inventory.transaction.index",compact("transactions","has_query","query")); // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create() { return view("inventory.transaction.create"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $this->validate($request,[ "stock_id"=>"required|exists:stocks,id", "quantity"=>"required", "price"=>"required", "billNo"=>"required" ]); $stock=Stock::findorfail($request->get("stock_id")); if($request->get("quantity")>$stock->quantity) return; $user=User::findorfail($stock->user_id); $transaction=new Transaction(); $transaction->product_name=$stock->product->name; $transaction->code=$stock->product->code; $transaction->quantity=$request->get("quantity"); $transaction->discount=0; $transaction->sold_price=$request->get("price"); $transaction->bought_price=$stock->bought_price; $transaction->bill_no=$request->get("billNo"); $transaction->code=$stock->code; $transaction->size=$stock->size->name; $transaction->user_id=$stock->user_id; $transaction->user_name=$user->name; $transaction->save(); $stock->quantity=$stock->quantity-$request->get("quantity"); $stock->save(); return response()->json([$stock->id,$stock->quantity],200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Return a Map URL.
public function index() { // Loads all terms by vocabulary. $vid = 'sas_normativa'; $output = []; // Gets only father terms. $query = \Drupal::database() ->select('taxonomy_term_data', 'td') ->fields('td', ['tid']); $query->join('taxonomy_term_hierarchy', 'th', 'td.tid = th.tid'); $query->condition('td.vid', $vid) ->condition('th.parent', 0); $parent_tids = $query->execute()->fetchCol(); foreach ($parent_tids as $tid) { /** @var \Drupal\taxonomy\Entity\Term $term */ $term = Term::load($tid); $term_url = current($term->get('field_map_url')->getValue()); $url = filter_var($term_url['uri'], FILTER_VALIDATE_URL) ? $term_url['uri'] : '#'; $output[$term->id()] = [ 'name' => $term->getName(), 'url' => $url, ]; // Check if parent has children. $children = \Drupal::entityTypeManager() ->getStorage('taxonomy_term') ->loadTree($vid, $term->id()); if (!empty($children)) { foreach ($children as $child) { /** @var \Drupal\taxonomy\Entity\Term $term_child */ $term_child = Term::load($child->tid); $term_url = current($term_child->get('field_map_url')->getValue()); $url = filter_var($term_url['uri'], FILTER_VALIDATE_URL) ? $term_url['uri'] : '#'; $output[$term->id()]['children'][] = [ 'name' => $term_child->getName(), 'url' => $url, ]; } } } return [ '#theme' => 'map_url', '#terms' => $output, '#attached' => [ 'library' => ['map_url/map_url'], ], ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function genMapsLink()\n {\n $city = str_replace(' ', '+', $this->getCity()->getCityName());\n $street = str_replace(' ', '+', $this->getStreet());\n $hno = str_replace(' ', '+', $this->getHouseNo());\n\n $url = \"https://maps.google.com?q=\" . $city . '+' . $street . '+' . $hno;\n\n return $url;\n }", "public function getGoogleStaticMapLink(): string\n {\n return $this->googleStaticMapLink . '&amp;key=' . Config::inst()->get(GoogleAddressField::class, 'api_key');\n }", "public function googleMapLink()\n {\n return 'https://maps.google.com/?q=' . urlencode($this->full_address);\n }", "public function map()\n\t{\n\t\t$map = 'http://maps.googleapis.com/maps/api/staticmap?zoom=12&format=png&maptype=roadmap&style=element:geometry|color:0xf5f5f5&style=element:labels.icon|visibility:off&style=element:labels.text.fill|color:0x616161&style=element:labels.text.stroke|color:0xf5f5f5&style=feature:administrative.land_parcel|element:labels.text.fill|color:0xbdbdbd&style=feature:poi|element:geometry|color:0xeeeeee&style=feature:poi|element:labels.text.fill|color:0x757575&style=feature:poi.business|visibility:off&style=feature:poi.park|element:geometry|color:0xe5e5e5&style=feature:poi.park|element:labels.text|visibility:off&style=feature:poi.park|element:labels.text.fill|color:0x9e9e9e&style=feature:road|element:geometry|color:0xffffff&style=feature:road.arterial|element:labels|visibility:off&style=feature:road.arterial|element:labels.text.fill|color:0x757575&style=feature:road.highway|element:geometry|color:0xdadada&style=feature:road.highway|element:labels|visibility:off&style=feature:road.highway|element:labels.text.fill|color:0x616161&style=feature:road.local|visibility:off&style=feature:road.local|element:labels.text.fill|color:0x9e9e9e&style=feature:transit.line|element:geometry|color:0xe5e5e5&style=feature:transit.station|element:geometry|color:0xeeeeee&style=feature:water|element:geometry|color:0xc9c9c9&style=feature:water|element:labels.text.fill|color:0x9e9e9e&size=640x250&scale=4&center='.urlencode(trim(preg_replace('/\\s\\s+/', ' ', $this->cfg->address)));\n\t\t$con = curl_init($map);\n\t\tcurl_setopt($con, CURLOPT_FOLLOWLOCATION, 1);\n\t\tcurl_setopt($con, CURLOPT_HEADER, 0);\n\t\tcurl_setopt($con, CURLOPT_RETURNTRANSFER, 1);\n\t\treturn response(curl_exec($con))->header('Content-Type', 'image/png');\n\t}", "public function getGMapStaticUrl( $width = 300, $height = 200, $zoom = 11 )\n {\n return 'http://maps.google.com/maps/api/staticmap?' .\n 'markers=color:blue|label:|' . urlencode($this->getAddressStringSingleLine()) .\n '&zoom=' . $zoom .\n '&size=' . $width . 'x' . $height .\n '&sensor=false';\n }", "public function getStaticMapUrl($maptype='mobile', $hl='es')\n\t{\n\t\t$params = array(\n\t\t\t'maptype' => $maptype,\n\t\t\t'zoom' => $this->getZoom(),\n\t\t\t'key' => $this->getAPIKey(),\n\t\t\t'center' => $this->getCenterLat() . ',' . $this->getCenterLng(),\n\t\t\t'size' => $this->getWidth() . 'x' . $this->getHeight(),\n\t\t\t'hl' => $hl,\n\t\t\t'markers' => $this->getMarkersStatic()\n\t\t);\n\t\t$pairs = array();\n\n\t\t$params = http_build_query($params);\n\n\t\treturn 'http://maps.google.com/staticmap?' . $params; //implode('&',$pairs);\n\t}", "private function showStaticMap()\n {\n if ($this->location !== '') {\n $mapurl = \"https://maps.googleapis.com/maps/api/staticmap\";\n $mapurl .= \"?center=\" . $this->location->lat . \",\" . $this->location->lng;\n $mapurl .= \"&size=450x400\"; // image size\n $mapurl .= \"&zoom=15\"; // zoom to town level\n // put marker center of the location\n $mapurl .= \"&markers=|\" . $this->location->lat . \",\" . $this->location->lng; \n $mapurl .= \"&key=\" . $GLOBALS['apikey_googlemap'];\n return \"<img src=\" . $mapurl . \" >\";\n } else {\n return \"\";\n }\n }", "public function url($map)\n {\n // El IF es para usar esta función desde el shortcut con Route::add()\n if ($map) {\n $this->type = 'url';\n $this->data = $map;\n }\n return $this;\n }", "public function googleStaticMap($width = 200, $height = 200, $zoom = null)\n {\n\n $url = 'https://maps.googleapis.com/maps/api/staticmap?';\n $url .= 'size=' . $width . 'x' . $height;\n $url .= '&amp;markers=' . urlencode($this->full_address);\n if ($zoom !== null)\n $url .= '&amp;zoom=' . $zoom;\n $url .= '&amp;sensor=false';\n\n return $url;\n }", "public function getRecAreaMapUrl(): ?string {\n\n\t\treturn $this->recAreaMapUrl;\n\t}", "function map_large_link($location,$latitude,$longitude)\n {\n return \"https://maps.google.com/maps?ll={$latitude},{$longitude}&amp;z=16&amp;t=m&amp;hl=en-US&amp;gl=PT&amp;mapclient=embed&amp;\";\n }", "public static function _url() {\n\t\treturn self::pw('pages')->get('pw_template=mpm')->url;\n\t}", "private function showEmbedMap()\n {\n if ($this->location !== '') {\n $mapurl = \"https://www.google.com/maps/embed/v1/view\";\n $mapurl .= \"?center=\" . $this->location->lat . \",\" . $this->location->lng;\n $mapurl .= \"&zoom=15\"; // zoom to town level\n $mapurl .= \"&key=\" . $GLOBALS['apikey_googlemap'];;\n \n // iframe params to embed on the web page\n $map = '<iframe ';\n $map .= 'width=\"450\" ';\n $map .= 'height=\"400\" ';\n $map .= 'frameborder=\"0\" style=\"border:0\" ';\n $map .= 'src=\"' .$mapurl. '\" allowfullscreen> ';\n $map .= '</iframe>';\n return $map;\n } else {\n return \"\";\n }\n }", "public static function getStaticMapUrl(Pronamic_Google_Maps_Info $info)\n {\n $url = 'http://maps.google.com/maps/api/staticmap?';\n\n $width = Pronamic_Google_Maps_Size::parse($info->width);\n $height = Pronamic_Google_Maps_Size::parse($info->height);\n\n $parameters = array();\n $parameters['center'] = $info->latitude . ',' . $info->longitude;\n $parameters['zoom'] = $info->mapOptions->zoom;\n $parameters['size'] = $width->get_pixels(self::$defaultWidth) . 'x' . $height->get_pixels(self::$defaultHeight);\n $parameters['maptype'] = $info->mapOptions->mapTypeId;\n $parameters['sensor'] = 'false';\n\n $markers = '';\n if ($info->color != null) {\n $markers .= 'color:' . $info->color . '|';\n }\n\n if ($info->label != null) {\n $markers .= 'label:' . $info->label . '|';\n }\n\n if (!empty($info->markerOptions->icon)) {\n $markers .= 'icon:' . $info->markerOptions->icon . '|';\n }\n\n $markers .= $info->latitude . ',' . $info->longitude;\n\n $parameters['markers'] = $markers;\n\n $url .= http_build_query($parameters, '', '&amp;');\n\n return $url;\n }", "public function getMapApiUrl(array $configs);", "function submitted_events_process_mapurl($submission) {\n\tif (strlen ( $submission->mapurl ) > 0) {\n\t\tif (submitted_events_starts_with ( $submission->mapurl, \"http\" )) {\n\t\t\treturn '<br><a href=\\\"' . $submission->mapurl . '\\\">Map here</a>.';\n\t\t} else {\n\t\t\treturn '<br>' . $submission->mapurl;\n\t\t}\n\t}\n}", "public function showMap()\n {\n return $this->maptype === 'Embed MAP' ? $this->showEmbedMap() : $this->showStaticMap();\n }", "public function url() {\n return Magic::url();\n }", "function url()\n\t{\n\t\t$id\t\t= $this->attribute('id');\n\t\t$page\t= $this->pyrocache->model('pages_m', 'get', array($id));\n\n\t\treturn site_url($page ? $page->uri : '');\n\t}", "public function url()\n {\n return $this->factory->getUrl($this->handle);\n }", "public function getURL();", "public function getURL();", "public function getUrl() {\n return $this->get(self::URL);\n }", "public function getURL ();", "public function getGMapStaticUrl( $width = 300, $height = 200, $zoom = 11 )\n {\n $locationLatLng = $this->getCompanyLocation()->getLatitude() . ',' . $this->getCompanyLocation()->getLongitude();\n $url = 'http://maps.google.com/maps/api/staticmap?markers=color:blue|label:|' . $locationLatLng;\n\n if( $this->hasDestinationCompanyLocation() )\n {\n $color = '0x' . ProductTracermap::getPolyColor($this->getActivitySlug());\n $destLocationLatLng = $this->getDestinationCompanyLocation()->getLatitude() . ',' . $this->getDestinationCompanyLocation()->getLongitude();\n $url .= '&markers=color:red|label:|' . $destLocationLatLng;\n $url .= '&path=color:'.$color.'|weight:5|' . $locationLatLng . '|' . $destLocationLatLng;\n }\n else\n {\n // only set a zoom if we don't have a path\n $url .= '&zoom=' . $zoom;\n }\n\n $url .=\n '&size=' . $width . 'x' . $height .\n '&sensor=false';\n\n return $url;\n }", "public function get_url();", "public function getPhotoURL(){\r\n\t\t$photo = $this->getPhoto();\r\n\r\n\t\treturn $photo != null ? \"https://maps.googleapis.com/maps/api/place/photo?maxwidth=800&photoreference=\" . $photo . \"&key=\" . GOOGLE_MAPS_API_KEY_PRIVATE : null;\r\n\t}", "public static function url(): string\n\t{\n\t\treturn static::$url;\n\t}", "public function generateMap()\n {\n try\n {\n // Select all published articles and pages.\n // Lessons and other new stuff to be added upon needed.\n $pgs = ORM::factory( 'Page' )\n ->where( 'status', '>', 0 )\n ->find_all()->as_array();\n\n $articles = ORM::factory( 'Article' )\n ->where( 'status', '>', 0 )\n ->find_all()->as_array();\n \n // Place found URLs into the container array.\n $pages = [];\n foreach ( array_merge( $pgs, $articles ) as $value )\n array_push ( $pages, $value->make_full_url () );\n \n // Select whatever is already in the map...\n $urls = [];\n foreach ( $this->map->children() as $node )\n $urls[] = ( string )$node->loc;\n\n // Delete redundant links\n foreach ( array_diff( $urls, $pages ) as $url )\n $this->removeEntry( $url, FALSE, TRUE );\n\n // Add missing links.\n foreach ( array_diff( $pages, $urls ) as $uri )\n $this->addEntry ( $uri, NULL, FALSE, TRUE );\n\n // Save result into the file.\n return $this->save();\n }\n catch ( Exception $e )\n {\n Kohana::$log->add( LOG_ERR, $e->getMessage() );\n return FALSE;\n }\n }", "public function makeDisplayMap($callback)\n {\n $displayMapAction = $callback(new DisplayMapAction);\n\n return (new UrlGenerator($displayMapAction))->generate();\n }", "public function getMapID()\n {\n return sprintf('%s_Map', $this->getHTMLID());\n }", "public function getSource()\n {\n return 'maps';\n }", "protected function getUrl()\n {\n if (!empty($this->info['url'])) {\n return $this->info['url'];\n }\n }", "public function getUrl()\n {\n return $this->createUrl();\n }", "public abstract function getURL();", "public function getURL() {\n return $this->apiURL . $this->endPoint . $this->storeID . $this->jsonFile;\n }", "public function getUrl() {\n if ($this->hasUrl()) {\n return $this->_getData('url');\n }\n $uri = $this->getUrlKey() . $this->getUrlSuffix();\n return $this->_getUrl($uri);\n }", "public function get_url(): string\n {\n return $this->get_url_internal();\n }", "public function getUrl()\n {\n return $this->_urlBuilder->getUrl();\n }", "public function getUrl();", "public function getUrl();", "public function getUrl();", "public function getUrl();", "public function getUrl();", "public function getUrl();", "public function getUrl();", "public function getUrl();", "public function getURL() {\n\t\treturn $this->urlStub() .'/' . $this->publicContainer .'/' . $this->getId();\n\t}", "public function url()\n\t{\n\t\tif( $this->modified === false ) return $this->url;\n\t\telse\n\t\t{\n\t\t\t$url = $this->generateString();\n\t\t\treturn htmlentities( $url );\n\t\t}\n\t}", "public function url() {\n return $this->info['url'];\n }", "public function url(): string\n {\n return $this->url;\n }", "public function url(): string\n {\n return $this->url;\n }", "protected function _getUrl()\n {\n return Router::url([\n '_name' => 'wikiPages',\n 'id' => $this->id,\n 'slug' => Inflector::slug($this->title)\n ]);\n }", "protected function _getUrl(): string\n {\n property_exists_or_fail($this, ['id', 'album']);\n\n return Router::url(['_name' => 'photo', 'slug' => $this->get('album')->get('slug'), 'id' => (string)$this->get('id')], true);\n }", "public function url();", "public function url();", "public function url();", "public function url(): string\n {\n return Uri::current()->setPath($this->name)->setSlash(true)->toString();\n }", "public function get_url () {\r\n\t\treturn $this->url;\r\n\t}", "public function getUrl(): string\n {\n return ($this->prefix ?? '') . $this->uri;\n }", "public function getUrl(): string\n {\n return self::URL;\n }", "public function getUrl()\n {\n if (array_key_exists(\"url\", $this->_propDict)) {\n return $this->_propDict[\"url\"];\n } else {\n return null;\n }\n }", "public function getUrl(){\n return $this->server->getUrl() . \"/\" . $this->name;\n \n }", "public function getUrl() {\n\t\t$this->getRublon()->log(__METHOD__);\n\t\treturn $this->getRublon()->getAPIDomain() .\n\t\t\tself::URL_PATH_CODE .\n\t\t\turlencode($this->getUrlParamsString());\n\t}", "public function fetchMap($lon, $lat)\n {\n if (!empty($lon) && !empty($lat)) {\n $map = \"https://www.openstreetmap.org/#map=13/$lat/$lon\";\n return $map;\n }\n }", "function google_maps_link($lat, $lon){\n return \"<a target=_blank href='https://www.google.com/maps/search/$lat,$lon?hl=es&source=opensearch'>$lat, $lon</a>\";\n }", "public function url(): string;", "public function url()\n\t{\n\t\treturn $this->url;\n\t}", "function map(string $docuri) {\n $map = [\n 'title'=> 'carte '.$this->title,\n 'view'=> ['latlon'=> [47, 3], 'zoom'=> 6],\n ];\n $map['bases'] = [\n 'cartes'=> [\n 'title'=> \"Cartes IGN\",\n 'type'=> 'TileLayer',\n 'url'=> 'https://igngp.geoapi.fr/tile.php/cartes/{z}/{x}/{y}.jpg',\n 'options'=> [ 'minZoom'=> 0, 'maxZoom'=> 18, 'attribution'=> 'ign' ],\n ],\n 'orthos'=> [\n 'title'=> \"Ortho-images\",\n 'type'=> 'TileLayer',\n 'url'=> 'https://igngp.geoapi.fr/tile.php/orthos/{z}/{x}/{y}.jpg',\n 'options'=> [ 'minZoom'=> 0, 'maxZoom'=> 18, 'attribution'=> 'ign' ],\n ],\n 'whiteimg'=> [\n 'title'=> \"Fond blanc\",\n 'type'=> 'TileLayer',\n 'url'=> 'https://visu.gexplor.fr/utilityserver.php/whiteimg/{z}/{x}/{y}.jpg',\n 'options'=> [ 'minZoom'=> 0, 'maxZoom'=> 21 ],\n ],\n ];\n $map['defaultLayers'] = ['whiteimg'];\n \n $request_scheme = isset($_SERVER['REQUEST_SCHEME']) ? $_SERVER['REQUEST_SCHEME']\n : ((isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS']=='on')) ? 'https' : 'http');\n foreach ($this->layers as $lyrid => $layer) {\n $overlay = [\n 'title'=> $layer['title'],\n 'type'=> 'UGeoJSONLayer',\n 'endpoint'=> \"$request_scheme://$_SERVER[SERVER_NAME]$_SERVER[SCRIPT_NAME]/$docuri/$lyrid\",\n ];\n foreach (['pointToLayer','style','minZoom','maxZoom'] as $key)\n if (isset($layer[$key]))\n $overlay[$key] = $layer[$key];\n elseif ($this->$key !== null)\n $overlay[$key] = $this->$key;\n\n $map['overlays'][$lyrid] = $overlay;\n if (isset($layer['displayedByDefault']))\n $map['defaultLayers'][] = $lyrid;\n }\n \n return new Map($map, \"$docuri/map\");\n }", "public function getUrl() {\n\t\treturn $this->rawUrl;\n\t}", "public function get_url() {\n\t\treturn $this->url;\n\t}", "public function get_url() {\n\t\treturn $this->url;\n\t}", "public function getUri()\n {\n return $this->getUrl();\n }", "function getURL()\n {\n if (!empty($this->url)) {\n return $this->url;\n }\n if (!empty($this->canonical)) {\n return $this->canonical;\n }\n if (!$this->getSlug() && ($this->getID())) {\n return \\Idno\\Core\\site()->config()->url . 'moves/' . $this->getID() . '/' . $this->getPrettyURLTitle();\n } else {\n return parent::getURL();\n }\n }", "public function getUrl(): string;", "public function getUrl(): string;", "public function getUrl(): string;", "protected function url()\n\t{\n\t\treturn Phpfox::getLib('url');\t\n\t}", "public function get_url()\n {\n return $this->url;\n }", "public function getUrl()\r\n\t{\r\n\t\treturn $this->url;\r\n\t}", "public function url(){\n $protocol = \"http://\";\n if ( !empty( $_SERVER['HTTPS'] ) ) {\n $protocol = \"https://\";\n }\n $url = $protocol . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];\n return $url;\n }", "public function getUrl()\n {\n return $this->getProperty()->url;\n }", "public function url()\r\n {\r\n return $this->get_base_url() . http_build_query($this->get_query_params());\r\n }", "public function getUrl() : string\n {\n return $this->url;\n }", "public function getUrl() : string\n {\n return $this->url;\n }", "public function getPrintMapObjectIdentifier() {\r\n\t\treturn 'Tx_AdGoogleMaps_MapBuilder_Map' . ($this->identifier !== NULL ? '_Uid_' . $this->identifier : '');\r\n\t}", "public function url()\n {\n return $this->url;\n }", "function sitemap_uri() {\n _deprecated_function( __FUNCTION__, '2.0.0' );\n\n\treturn null;\n}", "public function getUrl(): string\n {\n return $this->url;\n }", "public function getUrl(): string\n {\n return $this->url;\n }", "public function url()\n {\n return $this->routeObject->url['uri'];\n }", "public function url() {\n if (empty($this->parameters)) {\n return $this->url;\n }\n\n return $this->url . '?' . http_build_query($this->parameters);\n }", "public function getUrl(): string {\n\t\treturn $this->_url;\n\t}", "protected function constructURL(array $center, array $size, int $zoom, string $map_type)\r\n {\r\n $url = 'http://maps.googleapis.com/maps/api/staticmap?maptype=' . $map_type . '&scale=2';\r\n $center = $center[0] . ',' . $center[1];\r\n $size = $size[0] . 'x' . $size[1];\r\n $zoom = $zoom;\r\n $language = 'en';\r\n $url .= '&zoom=' . $zoom . '&center=' . $center . '&size=' . $size . '&language=' . $language;\r\n $url .= '&key=' . $this->google_api_key;\r\n return $url;\r\n }", "public function actionMap()\r\n\t{\r\n\t\t$this->render('map');\r\n\t}", "public function getUrl()\n\t{\n\t\treturn $this->url;\n\t}", "public function getUrl()\n\t{\n\t\treturn $this->url;\n\t}", "public function getUrl()\n\t{\n\t\treturn $this->url;\n\t}", "public function getUrl()\n\t{\n\t\treturn $this->url;\n\t}", "public function getUrl()\n\t{\n\t\treturn $this->url;\n\t}", "function buildMainMap()\r\n{\r\n\r\n // Add an image first for debug and change asap\r\n //$final_map = \"\r\n//<img class=\\\"main_map\\\" src=\\\"images/heatmapapi.png\\\" />\" ;\r\n\r\n $final_map = \"\r\n<div id=\\\"map\\\"></div>\" ;\r\n\r\n return $final_map ;\r\n}" ]
[ "0.75371623", "0.7034539", "0.688014", "0.67182136", "0.6485782", "0.6479126", "0.64056385", "0.6398175", "0.6347809", "0.62826335", "0.6201406", "0.6167323", "0.6161241", "0.61537945", "0.61461097", "0.6090766", "0.6051659", "0.60376555", "0.6023853", "0.6010482", "0.6000835", "0.6000835", "0.5999838", "0.5974177", "0.59628767", "0.5955692", "0.59539765", "0.59251153", "0.5924239", "0.5922351", "0.5900119", "0.5899591", "0.5882045", "0.58721447", "0.5852582", "0.5845864", "0.5842855", "0.58409125", "0.58215857", "0.5813566", "0.5813566", "0.5813566", "0.5813566", "0.5813566", "0.5813566", "0.5813566", "0.5813566", "0.58114725", "0.5803155", "0.57932556", "0.57745373", "0.57745373", "0.57718843", "0.57712424", "0.57691073", "0.57691073", "0.57691073", "0.57597816", "0.57568544", "0.57492214", "0.5745392", "0.5733354", "0.57317376", "0.57220435", "0.5718107", "0.5716777", "0.5715826", "0.5708966", "0.57016796", "0.56909376", "0.56856775", "0.56856775", "0.5683788", "0.56817394", "0.56773144", "0.56773144", "0.56773144", "0.5674012", "0.56637686", "0.56520236", "0.5634349", "0.56176996", "0.56137997", "0.56131524", "0.56131524", "0.5612849", "0.56064105", "0.5602725", "0.5600769", "0.5600769", "0.5593797", "0.5593064", "0.5590562", "0.558926", "0.55876094", "0.55868244", "0.55868244", "0.55868244", "0.55868244", "0.55868244", "0.5585451" ]
0.0
-1
Display a listing of the resource.
public function index() { $subscriber=Subscriber::orderBy('id','desc')->get(); return view('backend.subscriber.index',compact('subscriber')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create() { return view('backend.subscriber.create'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $request->validate([ 'email'=>'required|unique:subscribers', ]); try { $category=new Subscriber; $file=$request->file('file'); $category->email=$request->email; if($category->save()){ $notification=array( 'alert-type'=>'success', 'messege'=>'Thankyou for Subscribing our Newsletter', ); return redirect()->back()->with($notification); }else{ $notification=array( 'alert-type'=>'info', 'messege'=>'Something wrong.Try again later', ); return redirect()->back()->with($notification); } } catch (\Throwable $th) { $notification=array( 'alert-type'=>'error', 'messege'=>'Something went wrong. Please try again later.', ); return redirect()->back()->with($notification); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function sendBulkMail(Request $request){ $subcriber=Subscriber::all(); foreach ($subcriber as $value) { Mail::to($value)->send(new newslater($request->all())); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
/ Usage In the following example we generate a select field with three options. mdx:Render Outputs: mdx:Render o httidy Notice: the `options` method also accepts other formats besides an associative array. Take a look at the documentation of the [HtChoice]( class in order to learn more.
function testRender(){ #mdx:Render $select = new HtSelect("id_category"); $select->options([1=>'Category1',2=>'Category2',3=>'Category3']); #/mdx echo $select $this->expectOutputRegex("/select.*?id.*?name.*?option.*?1.*?Category1.*?3.*?Category3.*?select/s"); echo $select; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hundope_select_field_render() { \n\t\n}", "public static function renderSelect();", "public function it_shows_select_input_with_options()\n {\n // configure\n $inputs = [\n [\n 'type' => 'select',\n 'name' => 'country',\n 'options' => ['IN' => 'India']\n ]\n ];\n\n $this->configureInputs($inputs);\n\n // assert\n $this->get('/settings')\n ->assertStatus(200)\n ->assertSee('select')\n ->assertSee('IN');\n }", "function form_select($field, $options) {\n $defaults = array(\n 'wrap' => true,\n 'label' => true,\n 'class' => array('input', 'select'),\n 'options' => array()\n );\n\n $options = array_merge($defaults, $options);\n\n $output = '<select name=\"' . $field . '\" id=\"' . form__field_id($field) . '\">';\n foreach($options['options'] as $value => $text) {\n $output .= '<option value=\"' . $value . '\"';\n if(!empty($_POST[$field]) && $_POST[$field] == $value) {\n $output .= ' selected=\"selected\"';\n }\n $output .= '>' . $text . '</option>';\n }\n $output .= '</select>';\n\n if($options['wrap']) {\n $options['field'] = $field;\n $output = form__wrap($output, $options);\n }\n\n $error = form_error_message($field);\n if(!empty($error)) {\n $output .= $error;\n }\n \n return html__output($output);\n}", "function optionsframework_options() {\n\n\t$options[] = array(\n\t\t'name' => 'Styles Font Menu Example',\n\t\t'type' => 'heading'\n\t);\n\n\t$options[] = array(\n\t\t'name' => 'Font',\n\t\t'desc' => '',\n\t\t'id' => 'example_font_1',\n\t\t'type' => 'styles_font_menu',\n\t\t// Set default to Arial.\n\t\t// Get alternative default values by inspecting the hidden menu's <select> in the browser.\n\t\t'std' => '{\"family\":\"Arial, Helvetica, sans-serif\",\"name\":\"Arial\",\"classname\":\"arial\"}',\n\t);\n\n\treturn $options;\n}", "function testOptionsFunction(){\n\t\t#mdx:OptionsFunction\n\t\t$choice = new SimpleChoice(\"category\");\n\t\t$choice->options(function(){\n\t\t\t// pretend this was fetched from the db\n\t\t\t$rows = [\n\t\t\t\t['id'=>1,'name'=>'Action'],\n\t\t\t\t['id'=>2,'name'=>'Drama'],\n\t\t\t\t['id'=>3,'name'=>'Sci-fi']\n\t\t\t];\n\n\t\t\treturn $rows;\n\n\t\t})->context(['category'=>3]); // selects category 3\n\t\t#/mdx echo $choice\n\t\t$this->assertContains(\"<b>3 - Sci-fi\",\"$choice\");\n\n\t}", "function awm_select_options()\n {\n return array(\n 'options' => array(\n 'label' => __('Options', 'extend-wp'),\n 'case' => 'repeater',\n 'include' => array(\n 'option' => array(\n 'label' => __('Value', 'extend-wp'),\n 'case' => 'input',\n 'type' => 'text',\n ),\n 'label' => array(\n 'label' => __('Label', 'extend-wp'),\n 'case' => 'input',\n 'type' => 'text',\n ),\n ),\n ),\n );\n }", "function testRender(){\n\t\t#mdx:Render\n\t\t$select = new HtCklist(\"select_days\");\n\t\t$select->options([1=>'Mon',2=>'Tue',3=>'Wed',4=>'Thu',5=>'Fri',6=>'Sat']);\n\t\t#/mdx echo $select\n\t\t$this->expectOutputRegex(\"/input.*?select_days.*?1.*?select_days.*?6.*?Sat/s\");\n\t\techo $select;\n\t}", "function form_options($options) {\n }", "function form_element_select( $name, $options, $selected=null )\n{\n\t$out = sprintf( \"<select name=\\\"%s\\\">\\n\", $name );\n\tforeach( $options as $k=>$v )\n\t{\n\t\t$s = ($k==$selected) ? 'selected ' : '';\n\t\t$out .= sprintf( \" <option %svalue=\\\"%s\\\">%s</option>\\n\", $s, $k, $v );\n\t}\n\t$out .= \"</select>\\n\";\n\n\treturn $out;\n}", "function testOptionsTuples(){\n\t\t#mdx:OptionsTuples\n\t\t$choice = new SimpleChoice(\"category\");\n\t\t$choice->options([[1,'Action'],[2,'Drama'],[3,'Sci-fi']]);\n\t\t#/mdx echo $choice\n\t\t$this->assertContains(\"1 - Action\",\"$choice\");\n\n\t}", "function testSelectedOption(){\n\t\t#mdx:SelectedOption\n\t\t$select = new HtSelect('id_category');\n\t\t$select->options([1=>'Category1',2=>'Category2',3=>'Category3']);\n\t\t$select->context(['id_category'=>2]);\n\t\t#/mdx echo $select\n\t\t$this->expectOutputRegex(\"/option.*?2.*selected/\");\n\t\techo $select;\n\t}", "function getSetupForm($options = array()){\n $form = parent::getSetupForm($options);\n $form->setLegend('Category Options');\n \n $set = $form->createElement('select', 'set');\n $set->setLabel('Set: ');\n $set->setRequired('true');\n \n $service = new Content_Model_CategorySet_Service();\n $results = $service->getObjects();\n\n $options = array();\n foreach($results as $value){\n $options[$value->id] = $value->title;\n }\n\n //$template->addMultiOption('None','');\n $set->setMultiOptions($options);\n $form->addElement($set);\n \n return $form;\n }", "function drawDropDownCustom($options)\n\t{\n\t\t$controlName=$options['controlName'];\n\t\t$orgValue=$options['orgValue'];\n\t\t$items=$options['items']; \n\t\t$valueColumnName=$options['valueColumnName'];\n\t\t$titleColumnName=$options['titleColumnName'];\n\t\t$levelColumnName=$options['levelColumnName'];\n\t\t$hasChildColumnName=$options['hasChildColumnName'];\n\t\t$groupNameColumnName=$options['groupNameColumnName'];\n\t\t$groupIdColumnName=$options['groupIdColumnName'];\n\t\t$defaultValue=$options['defaultValue'];\n\t\t$defaultTitle=$options['defaultTitle'];\n\t\t$moreAttributes=$options['attributes'];\n\t\t$useKeyAsKeyAndValueAsValue=$options['useKeyAsKeyAndValueAsValue'];\n\t\t\n\t\tif (is_string($items))\n\t\t\t$items=cmfcMySql::getRowsCustom($items);\n\n\t\t\t\n\t\tif ($options['selectType']=='multiSelect') {\n\t\t\t$moreAttributes['multiple']='multiple';\n\t\t\t$controlName.='[]';\n\t\t}\n\t\t\n\t\t/*\n\t\techo '<pre style=\"direction:ltr\">';\n\t\tprint_r($items);\n\t\techo \"</pre>\";\n\t\t*/\n\t\t$moreAttributesStr=cmfcHtml::attributesToHtml($moreAttributes);\n\t\t\n\t\t$lastGroupName='';\n\t\t$firstRow=true;\n\n\t\t$html=sprintf('<select name=\"%s\" %s >'.\"\\n\", $controlName, $moreAttributesStr);\n\t\tif (!is_null($defaultValue)) {\n\t\t\tif ($options['disabledDefaultValue']==true) {\n\t\t\t\t$disabledHtml='disabled=\"disabled\"';\n\t\t\t} else {\n\t\t\t\t$disabledHtml='';\n\t\t\t}\n\t\t\t$html.=sprintf('<option value=\"%s\" %s>%s</option>'.\"\\n\",$defaultValue,$disabledHtml, $defaultTitle);\n\t\t}\n\t\t//$i = 0; //count the number of selected orgValues\n\t\t\n\t\tif (!is_array($orgValue))\n\t\t\t$orgValues[] = $orgValue;\n\t\telse\n\t\t\t$orgValues = $orgValue;\n\t\t\t\n\t\tif(is_array($items)) // added by babak\n\t\tforeach ($items as $key=>$item) {\n\t\t\tif (is_array($item)) {\n\t\t\t\t$title=$item[$titleColumnName];\n\t\t\t\t$value=$item[$valueColumnName];\n\t\t\t} elseif (is_integer($key) and !$useKeyAsKeyAndValueAsValue) {\n\t\t\t\t$title=$item;\n\t\t\t\t$value=$item;\n\t\t\t} else {\n\t\t\t\t$title=$item;\n\t\t\t\t$value=$key;\n\t\t\t}\n\n\t\t\tif (!empty($groupNameColumnName) && ($options['interface']['group'] or !isset($options['interface']['group']))) {\n\t\t\t\t$groupName=$item[$groupNameColumnName];\n\t\t\t\t$groupId=$item[$groupIdColumnName];\n\t\t\t\t\n\t\t\t\tif ($lastGroupName==$groupName) {$groupChanged=false;} else {$groupChanged=true;}\n\t\t\t\t//echo \"[$lastGroupName:$groupName]\";\n\t\t\t\tif ($groupChanged==true) {\n\t\t\t\t\tif (!$firstRow) { $html.=\"</optgroup>\\n\"; }\n\t\t\t\t\t$html.=sprintf('<optgroup label=\"%s\" title=\"%s\">'.\"\\n\",$groupName, $groupId);\n\t\t\t\t\t$lastGroupName=$groupName;\n\t\t\t\t}\n\t\t\t\t$groupChanged=false;\n\t\t\t}\n\t\t\t$selected='';\n\t\t\tif (in_array($value,$orgValues)) {\n\t\t\t\t$selected='selected=\"selected\"';\n\t\t\t\t//$i++;\n\t\t\t} else {\n\t\t\t\t$selected = '';\n\t\t\t}\n\t\t\t\n\t\t\t$itemAttributes=array();\n\t\t\t#--(Begin)-->indent items to show them as a tree (hierarchical items)\n\t\t\tif (!empty($levelColumnName)) {\n\t\t\t\tif (empty($firstLevelNumber))\n\t\t\t\t\t$firstLevelNumber=$item[$levelColumnName];\n\t\t\t\t\t\n\t\t\t\t$depth=$item[$levelColumnName]-$firstLevelNumber;\n\t\t\t\tif (!isset($options['interface']['itemIndent'])) $options['interface']['itemIndent']=20;\n\t\t\t\t$itemIndent=intval($options['interface']['itemIndent']);\n\t\t\t\tif (!$options['interface']['isIe'])\t {\n\t\t\t\t\t$itemIndent=intval($options['interface']['itemIndent']);\n\t\t\t\t\tif ($options['interface']['direction']=='rightToLeft')\n\t\t\t\t\t\t$itemAttributes['style'].=';padding-right:'.($itemIndent*$depth).'px;';\n\t\t\t\t\telse\n\t\t\t\t\t\t$itemAttributes['style'].=';padding-left:'.($itemIndent*$depth).'px;';\n\t\t\t\t} else {\n\t\t\t\t\t$itemIndent=round($itemIndent/2)*$depth;\n\t\t\t\t\t$title=str_repeat('&nbsp;',$itemIndent).$title;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (isset($options['isParentsSelectable'])) {\n\t\t\t\t\t$item['isParentsSelectable'] = $options['isParentsSelectable'];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ($item[$hasChildColumnName]) {\n\t\t\t\t\t$itemAttributes['style'].=';font-weight:bold';\n\t\t\t\t\tif ($options['isParentsSelectable']!=true)\n\t\t\t\t\t\t$itemAttributes['disabled']=true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t#--(End)-->indent items to show them as a tree (hierarchical items)\n\t\t\t$itemAttributes=cmfcHtml::attributesToHtml($itemAttributes);\n\t\t\t\n\t\t\t$html.=sprintf('<option value=\"%s\" %s %s>%s</option>'.\"\\n\",\n\t\t\t\t\t\t\t$value, $selected, $itemAttributes,$title);\n\t\t\t$firstRow=false;\n\t\t}\n\t\tif (isset($groupName)) $html.=\"</optgroup>\\n\";\n\t\t$html.=\"</select>\\n\";\n\t\treturn $html;\n\t}", "public function render(){\n\t\t$this->clearAttribute(\"value\");\n\t\t$inner = \"\\n\";\n\t\tforeach($this->options as $value => $option){\n\t\t\tif(in_array($value, $this->selected)){\n\t\t\t\t$option->addAttribute(\"selected\", \"selected\");\n\t\t\t}\n\t\t\t$inner .= \"\\t\" . $option->render() . \"\\n\";\n\t\t}\n\t\t$this->setInnerText($inner);\n\t\treturn parent::render();\n\t}", "function testOptionsObjects(){\n\t\n\t\t#mdx:OptionsObjects\n\t\t$choice = new SimpleChoice(\"category\");\n\t\n\t\t$option1 = new StdClass();\n\t\t$option1->id = 1;\n\t\t$option1->name = 'Action';\n\t\n\t\t$option2 = new StdClass();\n\t\t$option2->id = 2;\n\t\t$option2->name = 'Drama';\n\n\t\t$choice->options([$option1, $option2])\n\t\t\t->context(['category'=>2]); // selects category 2\n\t\t\n\t\t#/mdx echo $choice\n\t\t$this->assertContains(\"1 - Action\",\"$choice\");\n\t\t$this->assertContains(\"<b>2 - Drama\",\"$choice\");\n\n\t}", "function optionsframework_options() {\n\n\t$options = array();\n\n\t$options[] = array( \"name\" => \"Variables\",\n\t\t\"type\" => \"heading\" );\n\n\t$options[\"icon\"] = array(\n\t\t\"name\" => \"Fontawesome Icon\",\n\t\t\"id\" => \"icon\",\n\t\t\"std\" => \"fa-cogs\",\n\t\t\"type\" => \"text\");\n\n\t$options[\"claim\"] = array(\n\t\t\"name\" => \"Claim\",\n\t\t\"id\" => \"claim\",\n\t\t\"std\" => \"Sorry, we are down for scheduled maintenance. Come back soon!\",\n\t\t\"type\" => \"text\");\n\n\treturn $options;\n}", "public function form_field_select ( $args ) {\n\t\t$options = $this->get_settings();\n\t\t\n\t\tif ( isset( $args['data']['options'] ) && ( count( (array)$args['data']['options'] ) > 0 ) ) {\n\t\t\t$html = '';\n\t\t\t$html .= '<select id=\"' . esc_attr( $args['key'] ) . '\" name=\"' . esc_attr( $this->token ) . '[' . esc_attr( $args['key'] ) . ']\">' . \"\\n\";\n\t\t\t\tforeach ( $args['data']['options'] as $k => $v ) {\n\t\t\t\t\t$html .= '<option value=\"' . esc_attr( $k ) . '\"' . selected( esc_attr( $options[$args['key']] ), $k, false ) . '>' . $v . '</option>' . \"\\n\";\n\t\t\t\t}\n\t\t\t$html .= '</select>' . \"\\n\";\n\t\t\techo $html;\n\t\t\t\n\t\t\tif ( isset( $args['data']['description'] ) ) {\n\t\t\t\techo '<p><span class=\"description\">' . $args['data']['description'] . '</span></p>' . \"\\n\";\n\t\t\t}\n\t\t}\n\t}", "public function render() {\n $this->checkValue();\n $html = NULL;\n\n $html .= '<select id=\"'.$this->id.'\" name=\"'.$this->name.'\"';\n $html .= (bool)$this->multiple ? ' multiple' : NULL;\n $html .= (bool)$this->size ? ' size=\"'.$this->size.'\"' : NULL;\n $html .= \">\\n\";\n\n foreach($this->options as $option) {\n $html .= '<option value=\"'.$option['optionValue'].'\"';\n\n if($this->form->isSubmitted()) {\n $html .= ($_REQUEST[$this->name] == $option['optionValue']) ? ' selected' : NULL;\n } else {\n $html .= (isset($option['selected']) && (bool)$option['selected']) ? ' selected' : NULL;\n }\n\n $html .= '>'.$option['optionTitle'].\"</option>\\n\";\n }\n\n if($this->required\n && $this->form->isSubmitted()\n && !$this->checkValue()) {\n $this->error = TRUE;\n }\n\n $html .= '</select>';\n $this->html = $this->wrap($html);\n }", "function HTMLSelect ($params, $options) {\n if (!isset($params['name'])) {\n $params['name'] = $params['id'];\n }\n $str = '';\n foreach ($params as $k=>$v) {\n $str .= \" {$k}=\\\"{$v}\\\"\";\n }\n $prm = '';\n if (isset($options['params'])) {\n foreach ($options['params'] as $k=>$v) {\n $prm .= \" {$k}=\\\"{$v}\\\"\";\n }\n }\n $opn = '';\n foreach ($options['list'] as $k=>$v) {\n $selected = '';\n if (isset($options['default'])&&!is_null($options['default'])&&$options['default']!='') {\n if ($k == $options['default']) {\n $selected = \"selected=\\\"selected\\\"\";\n }\n }\n $opn.= \"<option value='{$k}' {$prm} {$selected}>{$v}</option>\";\n }\n return \"<select {$str} >{$opn}</select>\";\n }", "function testOptionsArray(){\n\t\t#mdx:OptionsArray\n\t\t$choice = new SimpleChoice(\"language\",\"Type in the desired language code:\");\n\t\t$choice->options(['en','es','pt','fr']);\n\t\t#/mdx echo $choice\n\t\t$this->assertContains(\"- en\", \"$choice\");\n\t\t$this->assertNotContains(\"0 - en\", \"$choice\");\n\n\t}", "function testSelectedOption(){\n\t\t#mdx:SelectedOption\n\t\t$select = new HtCklist(\"select_days\");\n\t\t$select->options([1=>'Mon',2=>'Tue',3=>'Wed',4=>'Thu',5=>'Fri',6=>'Sat']);\n\t\t$select->context(['select_days'=>[2,5]]); // check Tue and Fri\n\t\t#/mdx echo $select\n\t\t$this->expectOutputRegex(\"/input.*?2.*checked.*?input.*?5.*?checked/s\");\n\t\techo $select;\n\t}", "function dropdown(array $attrib, array $options, $selected = null) {\n /* * * begin the select ** */\n\n $attrib_string = parseAttrib($attrib);\n\n $dropdown = \"<select {$attrib_string} >\" . \"\\n\";\n\n $selected = $selected;\n /* * * loop over the options ** */\n foreach ($options as $key => $option) {\n /* * * assign a selected value ** */\n $select = strtolower($selected) == strtolower($key) ? ' selected' : null;\n\n\n /* * * add each option to the dropdown ** */\n $dropdown .= '<option value=\"' . $key . '\"' . $select . '>' . $option . '</option>' . \"\\n\";\n }\n\n /* * * close the select ** */\n $dropdown .= '</select>' . \"\\n\";\n\n /* * * and return the completed dropdown ** */\n return $dropdown;\n}", "function select_option()\r\n{}", "function options_html($key, $field)\n\t{\n\t\t// vars\n\t\t$options = $field->options;\n\t\t$options['save_format'] = isset($options['save_format']) ? $options['save_format'] : 'url';\n\t\t\n\t\t?>\n\t\t<tr class=\"field_option field_option_file\">\n\t\t\t<td class=\"label\">\n\t\t\t\t<label><?php _e(\"Return Value\",'acf'); ?></label>\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t<?php \n\t\t\t\t\t$temp_field = new stdClass();\t\n\t\t\t\t\t$temp_field->type = 'select';\n\t\t\t\t\t$temp_field->input_name = 'acf[fields]['.$key.'][options][save_format]';\n\t\t\t\t\t$temp_field->input_class = '';\n\t\t\t\t\t$temp_field->value = $options['save_format'];\n\t\t\t\t\t$temp_field->options = array('choices' => array(\n\t\t\t\t\t\t'url'\t=>\t'File URL',\n\t\t\t\t\t\t'id'\t=>\t'Attachment ID'\n\t\t\t\t\t));\n\t\t\t\t\t$this->parent->create_field($temp_field);\n\t\t\t\t?>\n\t\t\t</td>\n\t\t</tr>\n\n\t\t<?php\n\t}", "function testOptionsRows(){\n\t\t#mdx:OptionsRows\n\t\t$choice = new SimpleChoice(\"category\");\n\t\t$choice->options([\n\t\t\t['id'=>1,'name'=>'Action'],\n\t\t\t['id'=>2,'name'=>'Drama'],\n\t\t\t['id'=>3,'name'=>'Sci-fi']\n\t\t])->context(['category'=>2]); // selects category 2\n\t\t\n\t\t#/mdx echo $choice\n\t\t$this->assertContains(\"1 - Action\",\"$choice\");\n\t\t$this->assertContains(\"<b>2 - Drama\",\"$choice\");\n\n\t}", "function select($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\t\t\tif ($args['multiple']) {\r\n\t\t\t\techo \"<select class='optselect chzn-select' multiple='true' style='\" .$this->width($args['width']) . \"' name='\" . $args['formname'] . \"\" . \"[]'>\";\r\n\t\t\t\tforeach ($args['selections'] as $key => $value) {\r\n\t\t\t\t\techo \"<option \" . (array_search($value , $args['value']) === false ? '' : 'selected' ). \" value='\" . $key . \"'>\" . $value . \"</option>\";\t\r\n\t\t\t\t}\t\r\n\t\t\t\techo \"</select>\";\r\n\t\t\t} else {\r\n\t\t\t\techo \"<select class='optselect chzn-select' style='\" .$this->width($args['width']) . \"' name='\" . $args['formname'] . \"'>\";\r\n\t\t\t\tforeach ($args['selections'] as $key => $value) {\r\n\t\t\t\t\techo \"<option \" . ($args['value'] == $key ? 'selected' : '' ). \" value='\" . $key . \"'>\" . $value . \"</option>\";\t\r\n\t\t\t\t}\t\r\n\t\t\t\techo \"</select>\";\r\n\t\t\t}\r\n\t\t\t$this->description($args['description']);\r\n\t\t}", "function osa_field_widget_options_select_form_alter(&$element, &$form_state, $context) {\r\n\r\n // This code, while it works to populate the selection boxes when built, fails on validation\r\n // So we have hard coded the values into the form for now.\r\n /* populate the drop down with the class types\r\n if ($element['#field_name'] == 'field_class_type') {\r\n $element['#options'] = array('_none' => '- Select a value -') + osa_options_class_types();\r\n }\r\n */\r\n \r\n // populate the drop down with the list of events\r\n // only include events of type 'Group Class (Master)'\r\n if ($element['#field_name'] == 'field_event_master') {\r\n civicrm_initialize();\r\n $results = civicrm_api('event', 'get', array('event_type_id' => OSA_EVENT_GROUP_CLASS_MASTER, 'is_active' => TRUE, 'rowCount' => PHP_INT_MAX, 'version' => 3));\r\n $options = array();\r\n foreach ($results['values'] as $class) {\r\n $options[$class['id']] = $class['event_title'];\r\n }\r\n asort($options);\r\n $element['#options'] = array('_none' => '- Select a value -') + $options;\r\n }\r\n}", "function _select ($name, $id, $attribs, $options, $value)\n\t{\n\t\t$xhtml = '<div class=\"select\"><select'\n\t\t. ' name=\"' . $this->view->escape($name) . '\"'\n\t\t. ' id=\"' . $this->view->escape($id) . '\"'\n\t\t. $this->_htmlAttribs($attribs)\n\t\t. \">\";\n\n\t\t// build the list of options\n\t\t$list = array();\n\t\t$translator = $this->getTranslator();\n\t\tforeach ((array) $options as $opt_value => $opt_label) {\n\t\t\tif (is_array($opt_label)) {\n if (null !== $translator) {\n $opt_value = $translator->translate($opt_value);\n }\n \n $list[] = '<optgroup'\n . ' label=\"' . $this->view->escape($opt_value) .'\">';\n foreach ($opt_label as $val => $lab) {\n $list[] = $this->_build($val, $lab, $value, false);\n }\n $list[] = '</optgroup>';\n } else {\n\t\t\t\t$list[] = $this->_build($opt_value, $opt_label, $value, false);\n }\n\t\t}\n\n\t\t// add the options to the xhtml and close the select\n\t\t$xhtml .= implode(\"\", $list) . \"</select> <a href=\\\"#\\\" class=\\\"remove\\\">-</a></div>\";\n\n\t\treturn $xhtml;\n\t}", "function print_select_field($id, $options = array()) {\n\t$id_esc = htmlentities($id);\n\t$classes_html = build_class_attribute($options['required'], $options['class']);\n\t\n\t$options_array = array();\n\tforeach ($options['options'] as $option_value => $option_label) {\n\t\t$options_array[] = convertOptiontoHTML($option_value, $option_label, $options['value'] == $option_value);\n\t}\n\t$options_html = join(\"\\n\", $options_array);\n\t\n\t$element_html = <<<EOD\n<select name=\"$id_esc\" id=\"$id_esc\" $classes_html>\n\t$options_html\n</select>\nEOD;\n\n\tprint_field($id, $element_html, $options);\n}", "function clients_select_displayInput($ctlData,$id) {\n\tglobal $Auth,$gSession;\n\n\t$identifier = strtolower($ctlData['IDENTIFIER']);\n\n\t## prepare the template\n\t$inputFile = \"input.tpl\";\n\t$template = new Template(ENGINE.'modules/clients/attributetypes/select/interface');\n\t$template->set_templatefile(array(\"attribute\" => $inputFile));\n\n\t\n\t## check if we need to setup this attribute type\n\tclients_select_setup($identifier);\n\t\n\t## then we need to get any data that was previously entered\n\t$value = clients_select_getData($ctlData,$id);\n\n\t$options = split(',',$ctlData[\"VALUES\"]);\n\t$labels = split(',',$ctlData[\"LABELS\"]);\n\t$output = '<select name=\"'.$ctlData['IDENTIFIER'].'\" size=\"1\" style=\"width: 178px;\" class=\"default\">';\n\tfor($i=0;$i<count($options); $i++) {\n\t\t## set the option\n\t\tif($options[$i] == $value) {\n\t\t\t$output .= '<option label=\"'.$labels[$i].'\" value=\"'.$options[$i].'\" selected>'.$labels[$i].'</option>';\n\t\t} else {\n\t\t\t$output .= '<option label=\"'.$labels[$i].'\" value=\"'.$options[$i].'\">'.$labels[$i].'</option>';\n\t\t}\t\n\t}\n\t$output .= '</select>';\t\n\n\t$template->set_var(\"title\",$ctlData['NAME']);\n\t$template->set_var(\"attribute\",$output);\n\n\t## finally fill the template and return it\n\treturn $template->fill_block('attribute');\t\n}", "function testOptionsFunction2(){\n\n\t\t#mdx:OptionsFunction2\n\t\t$choice = new SimpleChoice(\"category\");\n\t\t$choice->options(function(){\n\t\t\t// return a function which returns an associative array:\n\t\t\treturn function(){\n\t\t\t\treturn [1=>'Category A',2=>'Category B',3=>'Category C'];\n\t\t\t};\n\t\t});\n\n\t\t$choice->context(['category'=>2]); // selects category 2\n\t\t#/mdx echo $choice\n\t\t$this->assertContains(\"<b>2\",\"$choice\");\n\n\t}", "private function renderSelect($def)\n {\n $def[] = 'options = '.(json_encode($this->options));\n\n $def = implode(' ', $def);\n\n //die($def);\n $tpl = \"<sing-form-select $def/></sing-form-select>\";\n\n return $tpl;\n }", "static public function select($name,$choices,$opts=[]) {\n $tag = '';\n\n if (isset($opts['prefix'])) {\n $prefix = $opts['prefix'];\n unset($opts['prefix']);\n } else {\n $prefix = 'form_';\n }\n\n if (!isset($opts['name'])) $opts['name'] = $name;\n if (!isset($opts['id'])) $opts['id'] = $prefix.$name;\n\n if (isset($opts['value'])) {\n $value = $opts['value'];\n unset($opts['value']);\n } else {\n $f3 = Base::instance();\n if ($f3->exists('POST.'.$name)) {\n $value = $f3->get('POST.'.$name);\n } elseif (isset($opts['default'])) {\n $value = $opts['default'];\n } else {\n foreach ($choices as $k=>$v) {\n\t $value = $k;\n\t break;\n\t}\n }\n }\n if (isset($opts['default'])) unset($opts['default']);\n\n if (isset($opts['label'])) {\n $tag .= '<label for=\"'.$opts['id'].'\">'.$opts['label'].'</label>';\n unset($opts['label']);\n }\n\n $tag .= '<select';\n foreach ($opts as $k=>$v) {\n if (preg_match(self::BOOLEAN_RE,$k)) {\n $tag .= ' '.$v;\n } else {\n $tag .= ' '.$k.'=\"'.$v.'\"';\n }\n }\n $tag .= '>';\n foreach ($choices as $k=>$v) {\n $tag .= '<option value=\"'.$k.'\"';\n if ($k == $value) $tag.= ' selected';\n $tag .= '>'.$v.'</option>';\n }\n $tag .= '</select>';\n return $tag;\n }", "function render_field_select($field)\n {\n }", "function uds_pricing_render_general_options_select($key, $value)\n{\n\tglobal $uds_pricing_general_options;\n\t$field = $uds_pricing_general_options[$key];\n\t$default = $value;\n\t\n\t$options = '';\n\tforeach($field['options'] as $name => $value) {\n\t\t$selected = $name == $default ? 'selected=\"selected\"' : '';\n\t\t$options .= \"<option value='$name' $selected>$value</option>\";\n\t}\n\t\n\t$out = \"\n\t\t<div>\n\t\t\t<label>{$field['label']}</label>\n\t\t\t<select name='uds-pricing-$key'>\n\t\t\t\t$options\n\t\t\t</select>\n\t\t</div>\n\t\";\n\treturn $out;\n}", "function _getTypeSelect($options=\"\") {\r\n\t\t$retval = \"<tr>\\n\";\r\n\t\t$retval .= \"<td>\".__('Video type', $this->textdomain_name).\":</td>\\n\";\r\n\t\t$retval .= \"<td>\";\r\n\t\t$retval .= \"<select name=\\\"lynkvp_type\\\" onchange=\\\"javascript:\";\r\n\t\t$retval .= \"document.getElementById('Thumbnail_title').style.display=(this.value=='flv'?'block':'none');\";\r\n\t\t$retval .= \"document.getElementById('Thumbnail_image').style.display=(this.value=='flv'?'block':'none');\";\r\n\t\t$retval .= \"\\\">\";\r\n\t\t$retval .= \" <option value=\\\"0\\\"\".$this->_setOptionSelected($_POST['lynkvp_type'],'0').\">\".__('Select video type', $this->textdomain_name).\"</option>\";\r\n\t\t$retval .= \" <option value=\\\"asf\\\"\".$this->_setOptionSelected($_POST['lynkvp_type'],'asf').\">.asf</option>\";\r\n\t\t$retval .= \" <option value=\\\"avi\\\"\".$this->_setOptionSelected($_POST['lynkvp_type'],'avi').\">.avi</option>\";\r\n\t\t$retval .= \" <option value=\\\"mp4\\\"\".$this->_setOptionSelected($_POST['lynkvp_type'],'mp4').\">.mp4</option>\";\r\n\t\t$retval .= \" <option value=\\\"mpg\\\"\".$this->_setOptionSelected($_POST['lynkvp_type'],'mpg').\">.mpg</option>\";\r\n\t\t$retval .= \" <option value=\\\"mov\\\"\".$this->_setOptionSelected($_POST['lynkvp_type'],'mov').\">.mov</option>\";\r\n\t\t$retval .= \" <option value=\\\"rm\\\"\" .$this->_setOptionSelected($_POST['lynkvp_type'],'rm'). \">.rm</option>\";\r\n\t\t$retval .= \" <option value=\\\"swf\\\"\".$this->_setOptionSelected($_POST['lynkvp_type'],'swf').\">.swf</option>\";\r\n\t\t$retval .= (file_exists(dirname(__FILE__).'/'.$this->flvplayer) ? \" <option value=\\\"flv\\\"\".$this->_setOptionSelected($_POST['lynkvp_type'],'flv').\">.flv</option>\" : '');\r\n\t\t$retval .= \" <option value=\\\"wmv\\\"\".$this->_setOptionSelected($_POST['lynkvp_type'],'wmv').\">.wmv</option>\";\r\n\t\t$retval .= \" <option value=\\\"3gp\\\"\".$this->_setOptionSelected($_POST['lynkvp_type'],'3gp').\">.3gp</option>\";\r\n\t\t$retval .= \" </select>\";\r\n\t\t$retval .= \"</td>\\n\";\r\n\t\t$retval .= \"</tr>\\n\";\r\n\r\n\t\t$retval .= \"<tr>\\n\";\r\n\t\t$retval .= \"<td><span id=\\\"Thumbnail_title\\\" style=\\\"display:\".($_POST['lynkvp_type']!='flv'?'none':'block').\"\\\">\".__('Thumbnail', $this->textdomain_name).\":</span></td>\";\r\n\t\t$retval .= \"<td><span id=\\\"Thumbnail_image\\\" style=\\\"display:\".($_POST['lynkvp_type']!='flv'?'none':'block').\"\\\"><input type=\\\"file\\\" name=\\\"lynkvp_image_file\\\" />&nbsp;&nbsp;&nbsp;\\n\";\r\n\t\t$retval .= __('<strong>or</strong>', $this->textdomain_name).\" &nbsp;&nbsp;\".__('URL', $this->textdomain_name).\":&nbsp;&nbsp;http://<input type=\\\"text\\\" name=\\\"lynkvp_image_url\\\" style=\\\"width:400px;\\\" value=\\\"\".$_POST['lynkvp_image'].\"\\\" /></span></td>\\n\";\r\n\t\t$retval .= \"</tr>\\n\";\r\n\r\n\t\treturn $retval;\r\n\t}", "function theme_select(&$item) {\n\n\t\t$class = array('form-select');\n\t\t_form_set_class($item, $class);\n\n\t\t$size = $item['#size'] ? ' size=\"' . $item['#size'] . '\"' : '';\n\t\t$multiple = isset($item['#multiple']) && $item['#multiple'];\n\n\t\t$retval .= '<select name=\"'\n\t\t\t. $item['#name'] . ''. ($multiple ? '[]' : '') . '\"' \n\t\t\t. ($multiple ? ' multiple=\"multiple\" ' : '') \n\t\t\t. drupal_attributes($item['#attributes']) \n\t\t\t. ' id=\"' . $item['#id'] . '\" ' . $size . '>' \n\t\t\t. form_select_options($item) . '</select>';\n\t\treturn($retval);\n\n\t}", "public function render_options_page()\n\t{\n\t\treturn include 'src/views/form.php';\n\t}", "function get_meta_select( $args = array(), $value = false ) { \r\r\n extract($args);\r\r\n ?>\r\r\n\t<tr>\r\r\n\t\t<th style=\"width:10%;\"><label for=\"<?php\t \t echo $args['name']; ?>\"><?php\t \t echo $args['title']; ?></label></th>\r\r\n\t\t<td>\r\r\n\t\t\t<select name=\"<?php\t \t echo $args['name']; ?>\" id=\"<?php\t \t echo $args['name']; ?>\">\r\r\n\t\t\t\t<option value=\"\"></option>\r\r\n\t\t\t\t<?php\t \t foreach ( $args['options'] as $option => $val ) : ?>\r\r\n\t\t\t\t\t<option <?php\t \t if ( htmlentities( $value, ENT_QUOTES ) == $val ) echo ' selected=\"selected\"'; ?> value=\"<?php\t \t echo $val; ?>\"><?php\t \t if ( __( 'Template:', 'hybrid') == $args['title'] ) echo $option; else echo $val; ?></option>\r\r\n\t\t\t\t<?php\t \t endforeach; ?>\r\r\n\t\t\t</select>\r\r\n\t\t\t<br /><small><?php\t \t echo $args['description']; ?></small>\r\r\n\t\t</td>\r\r\n\t</tr>\r\r\n\t<?php\t \t\r\r\n}", "public function render_control( $input = null ) {\n\n // Control wrapper\n $control = new CV_HTML( '<select>', array(\n 'name' => $this->handle,\n 'id' => $this->id,\n 'multiple' => 'multiple',\n 'style' => 'height:150px;',\n ) );\n\n // Convert input to array\n $input = $input ? explode( ',', $input ) : array();\n\n // Add the options\n foreach ( $this->config['options'] as $slug => $name ) {\n $control->append('<option value=\"' . $slug . '\" ' . selected( in_array( $slug, $input ), true, 0 ) . '>' . $name . '</option>');\n }\n\n return $control->render();\n }", "function _select($name,$options){\n\t\t$selectAtts = \"name='$name' \";\n\t\t$optionFields = '';\n\t\tif ($options['multiple']) {\n\t\t\t$selectAtts.=\"multiple='multiple' \";\n\t\t}\n\t\tforeach ($options['options'] as $key => $label) {\n\t\t\t$optionAtts = \"value = \\\"$key\\\" \";\n\t\t\tif ($key == $options['value']) {\n\t\t\t\t$optionAtts.= \"selected='selected' \";\n\t\t\t}\n\t\t\t$optionFields.=sprintf($this->inputTags['option'],$label,$optionAtts);\n\t\t}\n\t\t\n\t\treturn sprintf($this->inputTags['select'],$optionFields,$selectAtts);\t\t\n\t}", "public function select($element) {\n $element = $this->_setRender($element);\n\n $element['_render']['element'] = '';\n $element['_render']['element'] .= '<select id=\"' . $element['#id'] . '\" ';\n $element['_render']['element'] .= $element['_attributes_string'];\n $element['_render']['element'] .= sprintf(' data-wpt-type=\"%s\"', __FUNCTION__);\n /**\n * multiple\n */\n if (array_key_exists('#multiple', $element) && $element['#multiple']) {\n $element['_render']['element'] .= ' multiple=\"multiple\"';\n $element['_render']['element'] .= ' name=\"' . $element['#name'] . '[]\"';\n } else {\n $element['_render']['element'] .= ' name=\"' . $element['#name'] . '\"';\n }\n $element['_render']['element'] .= \">\\r\\n\";\n $count = 1;\n foreach ($element['#options'] as $id => $value) {\n if (!is_array($value)) {\n $value = array('#title' => $id, '#value' => $value, '#type' => 'option');\n }\n $value['#type'] = 'option';\n if (!isset($value['#value'])) {\n $value['#value'] = $this->_count['select'] . '-' . $count;\n $count += 1;\n }\n $element['_render']['element'] .= '<option value=\"' . htmlspecialchars($value['#value']) . '\"';\n $element['_render']['element'] .= $this->_setElementAttributes($value);\n if (array_key_exists('#types-value', $value)) {\n $element['_render']['element'] .= sprintf(' data-types-value=\"%s\"', $value['#types-value']);\n }\n /**\n * type and data_id\n */\n $element['_render']['element'] .= ' data-wpt-type=\"option\"';\n $element['_render']['element'] .= $this->_getDataWptId($element);\n /**\n * selected\n */\n if (array_key_exists('#multiple', $element) && $element['#multiple']) {\n if (is_array($element['#default_value']) && in_array($value['#value'], $element['#default_value'])) {\n $element['_render']['element'] .= ' selected=\"selected\"';\n }\n } elseif ($element['#default_value'] == $value['#value']) {\n $element['_render']['element'] .= ' selected=\"selected\"';\n }\n $element['_render']['element'] .= '>';\n $element['_render']['element'] .= isset($value['#title']) ? $value['#title'] : $value['#value'];\n $element['_render']['element'] .= \"</option>\\r\\n\";\n }\n $element['_render']['element'] .= '</select>';\n $element['_render']['element'] .= PHP_EOL;\n\n $pattern = $this->_getStatndardPatern($element);\n $output = $this->_pattern($pattern, $element);\n $output = $this->_wrapElement($element, $output);\n\n return $output;\n }", "function initlab_field_mailman_version_cb($args) {\n // Get the value of the setting we've registered with register_setting()\n $options = get_option('initlab_options', []);\n ?>\n <select id=\"<?php echo esc_attr($args['label_for']); ?>\" name=\"initlab_options[<?php echo esc_attr($args['label_for']); ?>]\">\n <?php\n foreach ($args['options'] as $value => $label) {\n ?>\n <option value=\"<?php echo esc_attr($value)?>\" <?php echo array_key_exists($args['label_for'], $options) ? selected($options[$args['label_for']], $value, false) : ''; ?>>\n <?php esc_html_e($label, 'initlab-addons'); ?>\n </option>\n <?php\n }\n ?>\n </select>\n <?php\n}", "function optionsframework_options() {\n\n\t$options = array();\n\n\t$options[] = array(\n\t\t'name' => __( 'Basic Settings', 'twentyseventyseven-child-2' ),\n\t\t'type' => 'heading'\n\t);\n\n\t$options[] = array(\n\t\t'name' => __( 'Upload Logo', 'twentyseventyseven-child-2' ),\n\t\t'desc' => __( 'This creates a full size uploader that previews the image.', 'twentyseventyseven-child-2' ),\n\t\t'id' => 'upload-logo',\n\t\t'type' => 'upload'\n\t);\n\n\t$options[] = array(\n\t\t'name' => __( 'Limit Post to show on Front Page', 'twentyseventyseven-child-2' ),\n\t\t'desc' => __( 'Limit Post', 'twentyseventyseven-child-2' ),\n\t\t'id' => 'limit-post-frontpage',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox'\n\t);\n\n\t$options[] = array(\n\t\t'name' => __( 'Posts to limit', 'twentyseventyseven-child-2' ),\n\t\t'desc' => __( 'Posts.', 'twentyseventyseven-child-2' ),\n\t\t'id' => 'limit-post-frontpage-value',\n\t\t'std' => '0',\n\t\t'class' => 'mini',\n\t\t'type' => 'text'\n\t);\n\n\t$options[] = array(\n\t\t'name' => __( 'Show Sidebar on Front Page', 'twentyseventyseven-child-2' ),\n\t\t'desc' => __( 'Show Sidebar', 'twentyseventyseven-child-2' ),\n\t\t'id' => 'show-sidebar-frontpage',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox'\n\t);\n\n\treturn $options;\n}", "public function callback_select( $args ) {\n\n $name_id = $args['name_id'];\n if ($args['parent']) {\n $value = $this->get_option( $args['parent']['id'], $args['section'], $args['std'], $args['global'] );\n $value = isset($value[$args['id']]) ? $value[$args['id']] : $args['std'];\n $args['disable'] = (isset( $args['parent']['disable'])) ? $args['parent']['disable'] : false;\n }else {\n $value = $this->get_option( $args['id'], $args['section'], $args['std'], $args['global'] );\n }\n\n $disable = (isset( $args['disable'] ) && $args['disable'] === true) ? 'disabled' : '';\n $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : 'regular';\n $html = sprintf( '<select class=\"%1$s\" name=\"%2$s\" id=\"%2$s\" %3$s>', $size, $name_id, $disable );\n\n foreach ( $args['options'] as $key => $label ) {\n $html .= sprintf( '<option value=\"%s\" %s>%s</option>', $key, selected( $value, $key, false ), $label );\n }\n\n $html .= sprintf( '</select>' );\n $html .= $this->get_field_description( $args );\n\n echo $html;\n }", "function select($name = \"txt\", $alttext = \"\", $selecttype = \"array\", $lookup = \"\", $value = \"\", $event = \"\", $cssid = \"\", $readonly = false, $nochoose = true) {\n\n if (isset($_REQUEST[$name])) {\n if ($value == \"\") {\n $value = $_REQUEST[$name];\n }\n }\n $lookuplist = [];\n if ($selecttype == \"array\" || $selecttype == \"multiarray\") {\n\n if (is_array($lookup)) {\n $lookuplist = $lookup;\n } else {\n $lookuplist = explode(\"|\", $lookup);\n }\n } else if ($selecttype == \"sql\" || $selecttype == \"multisql\") {\n $lookuprow = $this->DEB->getRows($lookup, DEB_ARRAY); //format [0] = NAME\n\n\n foreach ($lookuprow as $irow => $row) {\n $lookuplist[$irow] = $row[0] . \",\" . $row[1]; //make it in the form of array\n }\n }\n //make options for the type of select etc .....\n if ($selecttype == \"multiarray\" || $selecttype == \"multisql\") {\n $options = \"multiple=\\\"multiple\\\"\";\n } else {\n $options = \"\";\n }\n if ($readonly == true) {\n $disabled = \"disabled=\\\"disabled\\\"\";\n } else {\n $disabled = \"\";\n }\n //default text\n if ($alttext == \"\") {\n $alttext = \"Choose\";\n }\n if ($cssid != \"\") {\n $cssid = \"id=\\\"{$cssid}\\\"\";\n } else {\n $cssid = \"\";\n }\n $html = \"<select class=\\\"form-control\\\" $cssid name=\\\"{$name}\\\" $options {$event} $disabled >\";\n\n if (!$nochoose) {\n $html .= \"<option value=\\\"\\\">{$alttext}</option>\";\n }\n\n foreach ($lookuplist as $lid => $option) {\n\n $toption = explode(\",\", $option);\n if (count($toption) != 2) {\n $toption[0] = $lid;\n $toption[1] = $option;\n }\n\n $option = $toption;\n\n if (trim($value) == trim($option[0])) {\n $html .= \"<option selected=\\\"selected\\\" value=\\\"{$option[0]}\\\">{$option[1]}</option>\";\n } else {\n $html .= \"<option value=\\\"{$option[0]}\\\">{$option[1]}</option>\";\n }\n }\n $html .= \"</select>\";\n return $html;\n }", "function create_options($key, $field)\n\t{\n\t\t\n\t}", "function html_selectbox($name, $values, $selected=NULL, $attributes=array())\n{\n $attr_html = '';\n if(is_array($attributes) && !empty($attributes))\n {\n foreach ($attributes as $k=>$v)\n {\n $attr_html .= ' '.$k.'=\"'.$v.'\"';\n }\n }\n $output = '<select name=\"'.$name.'\" id=\"'.$name.'\"'.$attr_html.'>'.\"\\n\";\n if(is_array($values) && !empty($values))\n {\n foreach ($values as $key=>$value)\n {\n if(is_array($value))\n {\n $output .= '<optgroup label=\"'.$key.'\">'.\"\\n\";\n foreach ($value as $k=>$v)\n {\n $sel = $selected == $k ? ' selected=\"selected\"' : '';\n $output .= '<option value=\"'.$k.'\"'.$sel.'>'.$v.'</option>'.\"\\n\";\n }\n $output .= '</optgroup>'.\"\\n\";\n }\n else\n {\n $sel = $selected == $key ? ' selected=\"selected\"' : '';\n $output .= '<option value=\"'.$key.'\"'.$sel.'>'.$value.'</option>'.\"\\n\";\n }\n }\n }\n $output .= \"</select>\\n\";\n\n return $output;\n}", "function testRender(){\n\t\t#mdx:Render\n\t\t$choice = new SimpleChoice('color');\n\t\t$choice->options([\n\t\t\t1 => 'Black',\n\t\t\t2 => 'White',\n\t\t\t3 => 'Gray'\n\t\t]);\n\t\t#/mdx echo $choice\n\t\t$this->assertContains(\"input\",\"$choice\");\n\t\t$this->assertContains(\"1 - Black\",\"$choice\");\n\t\t$this->assertContains(\"3 - Gray\",\"$choice\");\n\t}", "function yaz_set_option($id, $options)\n{\n}", "abstract function fields_options();", "function rkt_options_page() {\n require('tmpl/options.tmpl.php');\n}", "function display_choice($array)\n{\n\tglobal $config;\n\t\n\tswitch ($array['type']) {\n\tcase 'text':\n\t\techo '<input type=\"text\" id=\"' . $array['name'] . '\" name=\"' . $array['name'] . '\" value=\"' . $config[$array['name']] . '\" />';\n\t\tbreak;\n\tcase 'select':\n\t\techo '<select id=\"' . $array['name'] . '\" name=\"' . $array['name'] . '\" onchange=\"' . $array['script'] . '\">';\n\t\tforeach ($array['options'] as $option) {\n\t\t\techo \"<option label='\" . $option . \"' value='\" . $option . \"' \";\n\t\t\tif ($option == $config[$array['name']])\n\t\t\t\techo \"selected='selected'\";\n\t\t\techo \">\" . $option . \"</option>\\n\";\n\t\t}\n\t\techo '</select>';\n\t\tbreak;\n\n\tcase 'array':\n\t\techo '<input type=\"text\" name=\"' . $array['name'] . '\" value=\"' . implode(',',$config[$array['name']]) . '\" id=\"' . $array['name'] . '\" />';\n\t\tbreak;\n\n\tcase 'boolean':\n\t\techo '<select id=\"' . $array['name'] . '\" name=\"' . $array['name'] . '\" onchange=\"' . $array['script'] . '\">';\n\t\techo \"<option label='TRUE' value='TRUE' \";\n\t\tif ($config[$array['name']])\n\t\t\techo \"selected='selected'\";\n\t\techo \">TRUE</option>\\n\";\n\t\techo \"<option label='FALSE' value='FALSE' \";\n\t\tif (!$config[$array['name']])\n\t\t\techo \"selected='selected'\";\n\t\techo \">FALSE</option>\\n\";\t\t\n\t\techo '</select>';\n\t\tbreak;\n\t\t\n\tdefault:\n\t\tbreak;\n\t}\n}", "public function getOptions()\n\t{\n\t\t// Set the options\n\t\t$options = array(\n\t\t\tJHtml::_('select.option', '', JText::_('JNONE')),\n\t\t\tJHtml::_('select.option', 'Arts > Design', 'Arts &gt; Design'),\n\t\t\tJHtml::_('select.option', 'Arts > Fashion & Beauty', 'Arts &gt; Fashion &amp; Beauty'),\n\t\t\tJHtml::_('select.option', 'Arts > Food', 'Arts &gt; Food'),\n\t\t\tJHtml::_('select.option', 'Arts > Literature', 'Arts &gt; Literature'),\n\t\t\tJHtml::_('select.option', 'Arts > Performing Arts', 'Arts &gt; Performing Arts'),\n\t\t\tJHtml::_('select.option', 'Arts > Visual Arts', 'Arts &gt; Visual Arts'),\n\t\t\tJHtml::_('select.option', 'Business', 'Business'),\n\t\t\tJHtml::_('select.option', 'Business > Business News', 'Business &gt; Business News'),\n\t\t\tJHtml::_('select.option', 'Business > Careers', 'Business &gt; Careers'),\n\t\t\tJHtml::_('select.option', 'Business > Investing', 'Business &gt; Investing'),\n\t\t\tJHtml::_('select.option', 'Business > Management & Marketing', 'Business &gt; Management &amp; Marketing'),\n\t\t\tJHtml::_('select.option', 'Business > Shopping', 'Business &gt; Shopping'),\n\t\t\tJHtml::_('select.option', 'Comedy', 'Comedy'),\n\t\t\tJHtml::_('select.option', 'Education', 'Education'),\n\t\t\tJHtml::_('select.option', 'Education > Education Technology', 'Education &gt; Education Technology'),\n\t\t\tJHtml::_('select.option', 'Education > Higher Education', 'Education &gt; Higher Education'),\n\t\t\tJHtml::_('select.option', 'Education > K-12', 'Education &gt; K-12'),\n\t\t\tJHtml::_('select.option', 'Education > Language Courses', 'Education &gt; Language Courses'),\n\t\t\tJHtml::_('select.option', 'Education > Training', 'Education &gt; Training'),\n\t\t\tJHtml::_('select.option', 'Games & Hobbies', 'Games &amp; Hobbies'),\n\t\t\tJHtml::_('select.option', 'Games & Hobbies > Automotive', 'Games &amp; Hobbies &gt; Automotive'),\n\t\t\tJHtml::_('select.option', 'Games & Hobbies > Aviation', 'Games &amp; Hobbies &gt; Aviation'),\n\t\t\tJHtml::_('select.option', 'Games & Hobbies > Hobbies', 'Games &amp; Hobbies &gt; Hobbies'),\n\t\t\tJHtml::_('select.option', 'Games & Hobbies > Other Games', 'Games &amp; Hobbies &gt; Other Games'),\n\t\t\tJHtml::_('select.option', 'Games & Hobbies > Video Games', 'Games &amp; Hobbies &gt; Video Games'),\n\t\t\tJHtml::_('select.option', 'Government & Organizations', 'Government &amp; Organizations'),\n\t\t\tJHtml::_('select.option', 'Government & Organizations > Local', 'Government &amp; Organizations &gt; Local'),\n\t\t\tJHtml::_('select.option', 'Government & Organizations > National', 'Government &amp; Organizations &gt; National'),\n\t\t\tJHtml::_('select.option', 'Government & Organizations > Non-Profit', 'Government &amp; Organizations &gt; Non-Profit'),\n\t\t\tJHtml::_('select.option', 'Government & Organizations > Regional', 'Government &amp; Organizations &gt; Regional'),\n\t\t\tJHtml::_('select.option', 'Health', 'Health'),\n\t\t\tJHtml::_('select.option', 'Health > Alternative Health', 'Health &gt; Alternative Health'),\n\t\t\tJHtml::_('select.option', 'Health > Fitness & Nutrition', 'Health &gt; Fitness &amp; Nutrition'),\n\t\t\tJHtml::_('select.option', 'Health > Self-Help', 'Health &gt; Self-Help'),\n\t\t\tJHtml::_('select.option', 'Health > Sexuality', 'Health &gt; Sexuality'),\n\t\t\tJHtml::_('select.option', 'Kids & Family', 'Kids &amp; Family'),\n\t\t\tJHtml::_('select.option', 'Music', 'Music'),\n\t\t\tJHtml::_('select.option', 'News & Politics', 'News &amp; Politics'),\n\t\t\tJHtml::_('select.option', 'Religion & Spirituality', 'Religion &amp; Spirituality'),\n\t\t\tJHtml::_('select.option', 'Religion & Spirituality > Buddhism', 'Religion &amp; Spirituality &gt; Buddhism'),\n\t\t\tJHtml::_('select.option', 'Religion & Spirituality > Christianity', 'Religion &amp; Spirituality &gt; Christianity'),\n\t\t\tJHtml::_('select.option', 'Religion & Spirituality > Hinduism', 'Religion &amp; Spirituality &gt; Hinduism'),\n\t\t\tJHtml::_('select.option', 'Religion & Spirituality > Islam', 'Religion &amp; Spirituality &gt; Islam'),\n\t\t\tJHtml::_('select.option', 'Religion & Spirituality > Judaism', 'Religion &amp; Spirituality &gt; Judaism'),\n\t\t\tJHtml::_('select.option', 'Religion & Spirituality > Other', 'Religion &amp; Spirituality &gt; Other'),\n\t\t\tJHtml::_('select.option', 'Religion & Spirituality > Spirituality', 'Religion &amp; Spirituality &gt; Spirituality'),\n\t\t\tJHtml::_('select.option', 'Science & Medicine', 'Science &amp; Medicine'),\n\t\t\tJHtml::_('select.option', 'Science & Medicine > Medicine', 'Science &amp; Medicine &gt; Medicine'),\n\t\t\tJHtml::_('select.option', 'Science & Medicine > Natural Sciences', 'Science &amp; Medicine &gt; Natural Sciences'),\n\t\t\tJHtml::_('select.option', 'Science & Medicine > Social Sciences', 'Science &amp; Medicine &gt; Social Sciences'),\n\t\t\tJHtml::_('select.option', 'Society & Culture', 'Society &amp; Culture'),\n\t\t\tJHtml::_('select.option', 'Society & Culture > History', 'Society &amp; Culture &gt; History'),\n\t\t\tJHtml::_('select.option', 'Society & Culture > Personal Journals', 'Society &amp; Culture &gt; Personal Journals'),\n\t\t\tJHtml::_('select.option', 'Society & Culture > Philosophy', 'Society &amp; Culture &gt; Philosophy'),\n\t\t\tJHtml::_('select.option', 'Society & Culture > Places & Travel', 'Society &amp; Culture &gt; Places &amp; Travel'),\n\t\t\tJHtml::_('select.option', 'Sports & Recreation', 'Sports &amp; Recreation'),\n\t\t\tJHtml::_('select.option', 'Sports & Recreation > Amateur', 'Sports &amp; Recreation &gt; Amateur'),\n\t\t\tJHtml::_('select.option', 'Sports & Recreation > College & High School', 'Sports &amp; Recreation &gt; College &amp; High School'),\n\t\t\tJHtml::_('select.option', 'Sports & Recreation > Outdoor', 'Sports &amp; Recreation &gt; Outdoor'),\n\t\t\tJHtml::_('select.option', 'Sports & Recreation > Professional', 'Sports &amp; Recreation &gt; Professional'),\n\t\t\tJHtml::_('select.option', 'Technology', 'Technology'),\n\t\t\tJHtml::_('select.option', 'Technology > Gadgets', 'Technology &gt; Gadgets'),\n\t\t\tJHtml::_('select.option', 'Technology > Tech News', 'Technology &gt; Tech News'),\n\t\t\tJHtml::_('select.option', 'Technology > Podcasting', 'Technology &gt; Podcasting'),\n\t\t\tJHtml::_('select.option', 'Technology > Software How-To', 'Technology &gt; Software How-To'),\n\t\t\tJHtml::_('select.option', 'TV & Film', 'TV &amp; Film')\n\t\t);\n\n\t\treturn $options;\n\t}", "function optionsframework_options() {\n\n\t$options = array();\n\t$options[] = array(\n\t\t'name' => __('Logo Upload', 'options_check'),\n\t\t'desc' => __('Logo Upload', 'options_check'),\n\t\t'id' => 'logo_upload',\n\t\t'type' => 'upload');\n\n\t$options[] = array(\n\t\t'name' => __('Footer Copyright', 'options_check'),\n\t\t'desc' => __('text input field.', 'options_check'),\n\t\t'id' => 'footer_copyright',\n\t\t'std' => 'Text',\n\t\t'class' => 'mini',\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => __('Blog description', 'options_check'),\n\t\t'desc' => __('Blog description.', 'options_check'),\n\t\t'id' => 'blog_description',\n\t\t'std' => 'Default Text',\n\t\t'type' => 'textarea');\n\n\t/**\n\t * For $settings options see:\n\t * http://codex.wordpress.org/Function_Reference/wp_editor\n\t *\n\t * 'media_buttons' are not supported as there is no post to attach items to\n\t * 'textarea_name' is set by the 'id' you choose\n\t */\n\n\n\treturn $options;\n}", "function select( \n\t $name, $title = null, $value = null, \n\t $required = false, \n\t $attributes = null,\n\t $options = array(),\n\t $datatype = Form::DATA_STRING\n\t){\n return $this->input(\n\t $name, \n\t Form::TYPE_SELECT,\n\t $title, \n\t $value, \n\t $required, \n\t $attributes,\n\t $options,\n\t $datatype\n );\n\t}", "static function html_select(array $input,$name,$sled=''){\n\t\t$ret='';\n\t\t\t$ret.='<select name=\"'.$name.'\">';\n\t\tforeach($input as $k=>$v){\n\t\t\t$tmp_def = $sled == $k ? 'selected=\"selected\"':'';\n\t\t\t$ret.='<option value=\"'.$k.'\" '.$tmp_def.'>'.$v.'</option>';\n\n\t\t}\n\t\t$ret.='</select>';\n\t\treturn $ret;\n\t}", "function optionsframework_options() {\n\n\t// Test data\n\t$test_array = array(\n\t\t'one' => __('One', 'options_framework_theme'),\n\t\t'two' => __('Two', 'options_framework_theme'),\n\t\t'three' => __('Three', 'options_framework_theme'),\n\t\t'four' => __('Four', 'options_framework_theme'),\n\t\t'five' => __('Five', 'options_framework_theme')\n\t);\n\n\t// Multicheck Array\n\t$multicheck_array = array(\n\t\t'one' => __('French Toast', 'options_framework_theme'),\n\t\t'two' => __('Pancake', 'options_framework_theme'),\n\t\t'three' => __('Omelette', 'options_framework_theme'),\n\t\t'four' => __('Crepe', 'options_framework_theme'),\n\t\t'five' => __('Waffle', 'options_framework_theme')\n\t);\n\n\t// Multicheck Defaults\n\t$multicheck_defaults = array(\n\t\t'one' => '1',\n\t\t'five' => '1'\n\t);\n\n\n\t$multicheck_nums = array(\n\t\t'1' => '1',\n\t\t'2' => '2',\n\t\t'3' => '3',\n\t\t'4' => '4',\n\t\t'5' => '5'\n\t);\n\n\t// Background Defaults\n\t$background_defaults = array(\n\t\t'color' => '',\n\t\t'image' => '',\n\t\t'repeat' => 'repeat',\n\t\t'position' => 'top center',\n\t\t'attachment'=>'scroll' );\n\n\t// Typography Defaults\n\t$typography_defaults = array(\n\t\t'size' => '15px',\n\t\t'face' => 'georgia',\n\t\t'style' => 'bold',\n\t\t'color' => '#bada55' );\n\n\t// Typography Options\n\t$typography_options = array(\n\t\t'sizes' => array( '6','12','14','16','20' ),\n\t\t'faces' => array( 'Helvetica Neue' => 'Helvetica Neue','Arial' => 'Arial' ),\n\t\t'styles' => array( 'normal' => 'Normal','bold' => 'Bold' ),\n\t\t'color' => false\n\t);\n\n\t// Pull all the categories into an array\n\t$options_categories = array();\n\t$options_categories_obj = get_categories();\n\tforeach ($options_categories_obj as $category) {\n\t\t$options_categories[$category->cat_ID] = $category->cat_name;\n\t}\n\n\t// Pull all tags into an array\n\t$options_tags = array();\n\t$options_tags_obj = get_tags();\n\tforeach ( $options_tags_obj as $tag ) {\n\t\t$options_tags[$tag->term_id] = $tag->name;\n\t}\n\n\n\t// Pull all the pages into an array\n\t$options_pages = array();\n\t$options_pages_obj = get_pages('sort_column=post_parent,menu_order');\n\t// $options_pages[''] = 'Select a page:';\n\tforeach ($options_pages_obj as $page) {\n\t\t$options_pages[$page->ID] = $page->post_title;\n\t}\n\n\t$options_linkcats = array();\n\t$options_linkcats_obj = get_terms('link_category');\n\tforeach ( $options_linkcats_obj as $tag ) {\n\t\t$options_linkcats[$tag->term_id] = $tag->name;\n\t}\n\n\t// If using image radio buttons, define a directory path\n\t$imagepath = get_template_directory_uri() . '/img/';\n\t$qrcode = get_template_directory_uri() . '/img/qrcode.png';\n\t$adsdesc = __('可添加任意广告联盟代码或自定义代码', 'haoui');\n\n\t$options = array();\n\n\t// ======================================================================================================================\n\t$options[] = array(\n\t\t'name' => __('基本', 'haoui'),\n\t\t'type' => 'heading');\n\n\t$options[] = array(\n\t\t'name' => __('Logo', 'haoui'),\n\t\t'id' => 'logo_src',\n\t\t'std' => $imagepath . 'logo.png',\n\t\t'desc' => '建议尺寸200x50',\n\t\t'type' => 'upload');\n\t\n\t$options[] = array(\n\t\t'name' => __('字体logo', 'haoui'),\n\t\t'id' => 'logo_style',\n\t\t'type' => \"checkbox\",\n\t\t'std' => true,\n\t\t'desc' => __('开启', 'haoui').__('(开启后图片logo会失效,字体logo修改教程请查看群文件)', 'haoui'));\n\t\t\n\t$options[] = array(\n\t\t'name' => __('布局', 'haoui'),\n\t\t'id' => 'layout',\n\t\t'std' => \"2\",\n\t\t'type' => \"radio\",\n\t\t'desc' => __(\"2种布局供选择,点击选择你喜欢的布局方式,保存后前端展示会有所改变。\", 'haoui'),\n\t\t'options' => array(\n\t\t\t'2' => __('有侧边栏', 'haoui'),\n\t\t\t'1' => __('无侧边栏', 'haoui')\n\t\t));\n\t$options[] = array(\n\t\t'name' => __('全局小米兰亭字体', 'haoui'),\n\t\t'id' => 'all_fonts',\n\t\t'type' => \"checkbox\",\n\t\t'std' => false,\n\t\t'desc' => __('开启', 'haoui').__('(开启后全局文字将会有一定变化,请查看前台效果)', 'haoui'));\n\t\t\n\t$options[] = array(\n\t\t'name' => __(\"主题风格\", 'haoui'),\n\t\t'desc' => __(\"14种颜色供选择,点击选择你喜欢的颜色,保存后前端展示会有所改变。\", 'haoui'),\n\t\t'id' => \"theme_skin\",\n\t\t'std' => \"45B6F7\",\n\t\t'type' => \"colorradio\",\n\t\t'options' => array(\n\t\t\t'45B6F7' => 100,\n\t\t\t'FF5E52' => 1,\n\t\t\t'2CDB87' => 2,\n\t\t\t'00D6AC' => 3,\n\t\t\t'16C0F8' => 4,\n\t\t\t'EA84FF' => 5,\n\t\t\t'FDAC5F' => 6,\n\t\t\t'FD77B2' => 7,\n\t\t\t'76BDFF' => 8,\n\t\t\t'C38CFF' => 9,\n\t\t\t'FF926F' => 10,\n\t\t\t'8AC78F' => 11,\n\t\t\t'C7C183' => 12,\n\t\t\t'555555' => 13\n\t\t)\n\t);\n\n\t$options[] = array(\n\t\t'id' => 'theme_skin_custom',\n\t\t'std' => \"\",\n\t\t'desc' => __('不喜欢上面提供的颜色,你好可以在这里自定义设置,如果不用自定义颜色清空即可(默认不用自定义)', 'haoui'),\n\t\t'type' => \"color\");\n\n\t\n\n\t$options[] = array(\n\t\t'name' => __('网页最大宽度', 'haoui'),\n\t\t'id' => 'site_width',\n\t\t'std' => 1200,\n\t\t'class' => 'mini',\n\t\t'desc' => __('默认:1200,单位:px(像素)', 'haoui'),\n\t\t'type' => 'text');\n\n\t\t\n\t\n\t\t\n\t\t\n\t\t\n\t$options[] = array(\n\t\t'name' => __('底部友情链接', 'haoui'),\n\t\t'id' => 'flinks_s',\n\t\t'type' => \"checkbox\",\n\t\t'std' => false,\n\t\t'desc' => __('开启', 'haoui').__('(开启后会在页面底部增加一个链接模块)', 'haoui'));\n\n\t$options[] = array(\n\t\t'id' => 'flinks_home_s',\n\t\t'type' => \"checkbox\",\n\t\t'std' => false,\n\t\t'class' => 'op-multicheck',\n\t\t'desc' => __('只在首页开启', 'haoui'));\n\n\t$options[] = array(\n\t\t'id' => 'flinks_m_s',\n\t\t'type' => \"checkbox\",\n\t\t'std' => false,\n\t\t'class' => 'op-multicheck',\n\t\t'desc' => __('在手机端显示,不勾选则不在手机端显示', 'haoui'));\n $options[] = array(\n\t\t'id' => 'gd_links',\n\t\t'std' => '/links',\n\t\t'class' => 'op-multicheck mini',\n\t\t'desc' => __('侧边栏更多友链地址'),\n\t\t'type' => 'text');\n\t$options[] = array(\n\t\t'id' => 'flinks_cat',\n\t\t'options' => $options_linkcats,\n\t\t'class' => 'op-multicheck mini',\n\t\t'desc' => __('选择一个底部友情链接的链接分类', 'haoui'),\n\t\t'type' => 'select');\n\n\n\t$options[] = array(\n\t\t'name' => __('jQuery底部加载', 'haoui'),\n\t\t'id' => 'jquery_bom',\n\t\t'type' => \"checkbox\",\n\t\t'std' => false,\n\t\t'desc' => __('开启', 'haoui').__('(可提高页面内容加载速度,但部分依赖jQuery的插件可能失效)', 'haoui'));\n\n\n\t$options[] = array(\n\t\t'name' => __('Gravatar 头像获取', 'haoui'),\n\t\t'id' => 'gravatar_url',\n\t\t'std' => \"ssl\",\n\t\t'type' => \"radio\",\n\t\t'options' => array(\n\t\t\t'no' => __('原有方式', 'haoui'),\n\t\t\t'ssl' => __('从Gravatar官方ssl获取', 'haoui'),\n\t\t\t'duoshuo' => __('从多说服务器获取', 'haoui')\n\t\t));\n\n\t$options[] = array(\n\t\t'name' => __('JS文件托管(可大幅提速JS加载)', 'haoui'),\n\t\t'id' => 'js_outlink',\n\t\t'std' => \"no\",\n\t\t'type' => \"radio\",\n\t\t'options' => array(\n\t\t\t'no' => __('不托管', 'haoui'),\n\t\t\t'baidu' => __('百度', 'haoui'),\n\t\t\t'360' => __('360(新接口,推荐)', 'haoui'),\n\t\t\t'he' => __('框架来源站点(分别引入jquery和bootstrap官方站点JS文件)', 'haoui')\n\t\t));\n\n\t$options[] = array(\n\t\t'name' => __('网站整体变灰', 'haoui'),\n\t\t'id' => 'site_gray',\n\t\t'type' => \"checkbox\",\n\t\t'std' => false,\n\t\t'desc' => __('开启', 'haoui').__('(支持IE、Chrome,基本上覆盖了大部分用户,不会降低访问速度)', 'haoui'));\n\n\t$options[] = array(\n\t\t'name' => __('分类url去除category字样', 'haoui'),\n\t\t'id' => 'no_categoty',\n\t\t'type' => \"checkbox\",\n\t\t'std' => false,\n\t\t'desc' => __('开启', 'haoui').__('(主题已内置no-category插件功能,请不要安装插件;<b>开启后请去设置-固定连接中点击保存即可)</b>', 'haoui'));\n\n\t$options[] = array(\n\t\t'name' => __('品牌文字', 'haoui'),\n\t\t'id' => 'brand',\n\t\t'std' => \"欢迎光临\\n我们一直在努力\",\n\t\t'desc' => __('显示在Logo旁边的两个短文字,请换行填写两句文字(短文字介绍)', 'haoui'),\n\t\t'settings' => array(\n\t\t\t'rows' => 2\n\t\t),\n\t\t'type' => 'textarea');\n\n\t\n\n\t$options[] = array(\n\t\t'name' => __('网站底部信息', 'haoui'),\n\t\t'id' => 'footer_seo',\n\t\t'std' => '<a href=\"'.site_url('/sitemap.xml').'\">'.__('网站地图', 'haoui').'</a>'.\"\\n\",\n\t\t'desc' => __('备案号可写于此,网站地图可自行使用sitemap插件自动生成', 'haoui'),\n\t\t'type' => 'textarea');\n\n\t$options[] = array(\n\t\t'name' => __('手机端导航', 'haoui'),\n\t\t'id' => 'm_navbar',\n\t\t'type' => \"checkbox\",\n\t\t'std' => true,\n\t\t'desc' => __('开启', 'haoui'));\n\n\t$options[] = array(\n\t\t'name' => __('百度自定义站内搜索', 'haoui'),\n\t\t'id' => 'search_baidu',\n\t\t'type' => \"checkbox\",\n\t\t'std' => false,\n\t\t'desc' => __('开启', 'haoui'));\n\n\t$options[] = array(\n\t\t'id' => 'search_baidu_code',\n\t\t'std' => '',\n\t\t'desc' => __('此处存放百度自定义站内搜索代码,请自行去 http://zn.baidu.com/ 设置并获取', 'haoui'),\n\t\t'settings' => array(\n\t\t\t'rows' => 2\n\t\t),\n\t\t'type' => 'textarea');\n\n\t$options[] = array(\n\t\t'name' => __('PC端滚动时导航固定', 'haoui'),\n\t\t'id' => 'nav_fixed',\n\t\t'type' => \"checkbox\",\n\t\t'std' => false,\n\t\t'desc' => __('开启', 'haoui').__('由于网址导航左侧菜单的固定,故对网址导航页面无效', 'haoui'));\n\n\t$options[] = array(\n\t\t'name' => __('新窗口打开文章', 'haoui'),\n\t\t'id' => 'target_blank',\n\t\t'type' => \"checkbox\",\n\t\t'std' => false,\n\t\t'desc' => __('开启', 'haoui'));\n\n\n\t$options[] = array(\n\t\t'name' => __('首页不显示该分类下文章', 'haoui'),\n\t\t'id' => 'notinhome',\n\t\t'options' => $options_categories,\n\t\t'type' => 'multicheck');\n\n\t$options[] = array(\n\t\t'name' => __('首页不显示以下ID的文章', 'haoui'),\n\t\t'id' => 'notinhome_post',\n\t\t'std' => \"11245\\n12846\",\n\t\t'desc' => __('每行填写一个文章ID', 'haoui'),\n\t\t'settings' => array(\n\t\t\t'rows' => 2\n\t\t),\n\t\t'type' => 'textarea');\n\n\t$options[] = array(\n\t\t'name' => __('分页无限加载页数', 'haoui'),\n\t\t'id' => 'ajaxpager',\n\t\t'std' => 5,\n\t\t'class' => 'mini',\n\t\t'desc' => __('为0时表示不开启该功能', 'haoui'),\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => __('列表模式', 'haoui'),\n\t\t'id' => 'list_type',\n\t\t'std' => \"thumb\",\n\t\t'type' => \"radio\",\n\t\t'options' => array(\n\t\t\t'thumb' => __('图文模式(缩略图尺寸:220*150px,默认已自动裁剪)', 'haoui'),\n\t\t\t'text' => __('文字模式 ', 'haoui'),\n\t\t\t'thumb_if_has' => __('图文模式,无特色图时自动转换为文字模式 ', 'haoui'),\n\t\t));\n\n\t$options[] = array(\n\t\t'name' => '底部QQ咨询',\n\t\t'id' => 'fqq_s',\n\t\t'type' => \"checkbox\",\n\t\t'std' => true,\n\t\t'desc' => '开启'.'(开启后会在网站底部右下角增加一个QQ咨询按钮。QQ通讯组件可以到 shang.qq.com 进行相关设置)');\n\n\t$options[] = array(\n\t\t'id' => 'fqq_id',\n\t\t'desc' => 'QQ号码',\n\t\t'std' => '4700003344',\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'id' => 'fqq_tip',\n\t\t'desc' => '按钮提示文字。默认:QQ咨询',\n\t\t'std' => 'QQ咨询',\n\t\t'type' => 'text');\n\n\n\t$options[] = array(\n\t\t'name' => __('SEO', 'haoui'),\n\t\t'type' => 'heading');\n\n\t$options[] = array(\n\t\t'name' => __('全站连接符', 'haoui'),\n\t\t'id' => 'connector',\n\t\t'desc' => __('一经选择,切勿更改,对SEO不友好,一般为“-”或“_”', 'haoui'),\n\t\t'std' => _hui('connector') ? _hui('connector') : '-',\n\t\t'type' => 'text',\n\t\t'class' => 'mini');\n\n\t$options[] = array(\n\t\t'name' => 'SEO标题(title)',\n\t\t'id' => 'hometitle',\n\t\t'std' => '',\n\t\t'desc' => '完全自定义的首页标题让搜索引擎更喜欢,该设置为空则自动采用后台-设置-常规中的“站点标题+副标题”的形式',\n\t\t'settings' => array(\n\t\t\t'rows' => 2\n\t\t),\n\t\t'type' => 'textarea');\n\n\t$options[] = array(\n\t\t'name' => __('首页关键字(keywords)', 'haoui'),\n\t\t'id' => 'keywords',\n\t\t'std' => '一个网站, 一个牛x的网站',\n\t\t'desc' => __('关键字有利于SEO优化,建议个数在5-10之间,用英文逗号隔开', 'haoui'),\n\t\t'settings' => array(\n\t\t\t'rows' => 2\n\t\t),\n\t\t'type' => 'textarea');\n\n\t$options[] = array(\n\t\t'name' => __('首页描述(description)', 'haoui'),\n\t\t'id' => 'description',\n\t\t'std' => __('源码社 www.nicedowns.com 精品商业资源免费下载', 'haoui'),\n\t\t'desc' => __('描述有利于SEO优化,建议字数在30-70之间', 'haoui'),\n\t\t'settings' => array(\n\t\t\t'rows' => 3\n\t\t),\n\t\t'type' => 'textarea');\n\n\t$options[] = array(\n\t\t'name' => __('文章和页面SEO设置', 'haoui'),\n\t\t'id' => 'post_keywords_description_s',\n\t\t'type' => \"checkbox\",\n\t\t'std' => true,\n\t\t'desc' => __('开启', 'haoui'));\n\t$options[] = array(\n\t\t'name' => __('文章评论内链接添加nofollow跳转', 'haoui'),\n\t\t'id' => 'nofollow_s',\n\t\t'type' => \"checkbox\",\n\t\t'std' => false,\n\t\t'desc' => __('开启', 'haoui'));\n\t$options[] = array(\n\t\t'name' => __('文章内外链go跳转', 'haoui'),\n\t\t'id' => 'go_tiaozhuan_s',\n\t\t'type' => \"checkbox\",\n\t\t'std' => false,\n\t\t'desc' => __('开启【去页面新建页面,选择模板 <b><i>外链跳转</b></i> 固定链接设为 <b>http://你的域名/go</b> 】', 'haoui'));\n\n\t\t// ============首页布局==========================================================================================================\n\t$options[] = array(\n\t\t'name' => __('首页布局', 'haoui'),\n\t\t'type' => 'heading');\n\n\n\t\t $options[] = array(\n\t\t'name' => __( '首页显示模式', 'theme-textdomain' ),\n\t\t'desc' => __( '设置首页显示风格.', 'theme-textdomain' ),\n\t\t'id' => 'index-s',\n\t\t'std' => 'index-blog',\n\t\t'type' => 'radio',\n\t\t'options' => array('index-blog' => __( '博客模式', 'theme-textdomain' ),'index-card' => __( '卡片模式', 'theme-textdomain' ),'index-cms' => __( 'CMS模式', 'theme-textdomain' ),)\n\t);\n\t\n\t$options[] = array(\n\t\t'name' => __('CMS最新文章', 'haoui'),\n\t\t'id' => 'index_cms_new',\n\t\t'type' => \"checkbox\",\n\t\t'std' => false,\n\t\t'desc' => __('开启(开启博客模式和卡片模式请关闭)', 'haoui'));\n\t$options[] = array(\n\t\t'id' => 'index_cms_new_list',\n\t\t'type' => \"text\",\n\t\t'std' => '5',\n\t\t'desc' => __('显示数量', 'haoui').__('(置顶文章不包括其中)', 'haoui'),\n\t\t'class' => 'op-multicheck mini');\n\t$options[] = array(\n\t\t'name' => __( 'CMS首页排除的分类', 'theme-textdomain' ),\n\t\t'desc' => __( '排除的分类ID将不会显示在首页,中间用英文逗号隔开例如:1,2,3', 'theme-textdomain' ),\n\t\t'id' => 'cmsundisplaycats',\n\t\t'std' => '',\n\t\t'class' => 'mini',\n\t\t'type' => 'text'\n\t);\n\t\n\t$options[] = array(\n\t\t'name' => __( 'CMS自定义分类排序', 'theme-textdomain' ),\n\t\t'desc' => __( '自定义首页CMS分类排序,依次填写分类ID,中间用英文逗号隔开例如:1,2,3', 'theme-textdomain' ),\n\t\t'id' => 'example_text',\n\t\t'std' => '',\n\t\t'class' => 'mini',\n\t\t'type' => 'text'\n\t);\n\n if ( $options_categories ) { \n\t\t$options[] = array(\n\t\t\t'name' => __( '首页CMS并列双栏模板', 'theme-textdomain' ),\n\t\t\t'desc' => __( '要使用该模板,请勾选对应分类,该模板为分类并列模板,推荐偶数个分类勾选该模板,并在分类输出排序中使其相邻,同一分类不要勾选多个模板', 'theme-textdomain' ),\n\t\t\t'id' => 'example_checkbox_categories',\n\t\t\t'type' => 'multicheck',\n\t\t\t'options' => $options_categories\n\t\t);\n\t}\n\tif ( $options_categories ) { \n\t\t$options[] = array(\n\t\t\t'name' => __( '首页CMS1,顶部焦点图', 'theme-textdomain' ),\n\t\t\t'desc' => __( '要使用该模板,请勾选对应分类,同一分类不要勾选多个模板', 'theme-textdomain' ),\n\t\t\t'id' => 'example_checkbox_categories_1',\n\t\t\t'type' => 'multicheck',\n\t\t\t'options' => $options_categories\n\t\t);\n\t}\n\tif ( $options_categories ) { \n\t\t$options[] = array(\n\t\t\t'name' => __( '首页CMS2,左侧焦点图', 'theme-textdomain' ),\n\t\t\t'desc' => __( '要使用该模板,请勾选对应分类,同一分类不要勾选多个模板', 'theme-textdomain' ),\n\t\t\t'id' => 'example_checkbox_categories_2',\n\t\t\t'type' => 'multicheck',\n\t\t\t'options' => $options_categories\n\t\t);\n\t\t\t$options[] = array(\n\t\t'desc' => __('CMS2底部广告', 'haoui'),\n\t\t'id' => 'bar_2_asb',\n\t\t'std' => '',\n\t\t'class' => 'op-multicheck',\n\t\t'type' => 'textarea');\n\t}\n\t\n\tif ( $options_categories ) { \n\t\t$options[] = array(\n\t\t\t'name' => __( '首页CMS3,右侧焦点图', 'theme-textdomain' ),\n\t\t\t'desc' => __( '要使用该模板,请勾选对应分类,同一分类不要勾选多个模板', 'theme-textdomain' ),\n\t\t\t'id' => 'example_checkbox_categories_3',\n\t\t\t'type' => 'multicheck',\n\t\t\t'options' => $options_categories\n\t\t);\n\t\t\t$options[] = array(\n\t\t'desc' => __('CMS3底部广告', 'haoui'),\n\t\t'id' => 'bar_3_asb',\n\t\t'std' => '',\n\t\t'class' => 'op-multicheck',\n\t\t'type' => 'textarea');\n\t}\n\n\tif ( $options_categories ) { \n\t\t$options[] = array(\n\t\t\t'name' => __( '首页CMS4,三列三行,首行为焦点图', 'theme-textdomain' ),\n\t\t\t'desc' => __( '要使用该模板,请勾选对应分类,同一分类不要勾选多个模板', 'theme-textdomain' ),\n\t\t\t'id' => 'example_checkbox_categories_4',\n\t\t\t'type' => 'multicheck',\n\t\t\t'options' => $options_categories\n\t\t);\n\t}\n\n\tif ( $options_categories ) { \n\t\t$options[] = array(\n\t\t\t'name' => __( '首页CMS5,图文对称模板', 'theme-textdomain' ),\n\t\t\t'desc' => __( '要使用该模板,请勾选对应分类,同一分类不要勾选多个模板', 'theme-textdomain' ),\n\t\t\t'id' => 'example_checkbox_categories_5',\n\t\t\t'type' => 'multicheck',\n\t\t\t'options' => $options_categories\n\t\t);\n\t}\t\t\n\t$options[] = array(\n\t\t'name' => __('首页最新评论 or 随机文章推荐', 'haoui'),\n\t\t'id' => 'latest_visit_s',\n\t\t'type' => \"checkbox\",\n\t\t'std' => false,\n\t\t'desc' => __('开启', 'haoui').__('(开启后会在banner下增加一个模块,展示最新发表过评论的文章,经典模式下显示随机文章,手机默认不显示', 'haoui'));\n $options[] = array(\n\t\t'name' => __('关闭前台登录', 'haoui'),\n\t\t'id' => 'ligin_off',\n\t\t'type' => \"checkbox\",\n\t\t'std' => false,\n\t\t'desc' => __('关闭'));\n\n\t$options[] = array(\n\t\t'name' => __('首页随机文章/热门文章', 'haoui'),\n\t\t'id' => 'index_page_s',\n\t\t'type' => \"checkbox\",\n\t\t'std' => true,\n\t\t'desc' => __('开启', 'haoui').__('(开启后会在公告下新增一个模块,若是开启“经典模式”则只显示热门文章且手机不显示)', 'haoui'));\n\t$options[] = array(\n\t\t'desc' => __('随机文章⬇⬇⬇⬇⬇'));\n\t$options[] = array(\n\t\t'id' => 'index_suiji_h3',\n\t\t'type' => \"text\",\n\t\t'std' => '随机推荐',\n\t\t'desc' => __('随机推荐标题'),\n\t\t'class' => 'op-multicheck mini');\n\t$options[] = array(\n\t\t'id' => 'index_suiji_item',\n\t\t'type' => \"text\",\n\t\t'std' => '4',\n\t\t'desc' => __('显示数量', 'haoui').__('(此为随机文章数量)', 'haoui'),\n\t\t'class' => 'op-multicheck mini');\n\t$options[] = array(\n\t\t'id' => 'index_suiji_text',\n\t\t'type' => \"text\",\n\t\t'std' => '荐',\n\t\t'desc' => __('随机推荐文字', 'haoui').__('(将显示在每条推荐的前面,建议一个字,支持fonts图标)', 'haoui'),\n\t\t'class' => 'op-multicheck mini');\n\t$options[] = array(\n\t\t'desc' => __('热门文章⬇⬇⬇⬇⬇'));\n\t$options[] = array(\n\t\t'id' => 'index_rem_h3',\n\t\t'type' => \"text\",\n\t\t'std' => '30天热门',\n\t\t'desc' => __('热门推荐标题'),\n\t\t'class' => 'op-multicheck mini');\n\t$options[] = array(\n\t\t'id' => 'index_rem_item',\n\t\t'type' => \"text\",\n\t\t'std' => '4',\n\t\t'desc' => __('显示数量', 'haoui').__('(此为随机文章数量)', 'haoui'),\n\t\t'class' => 'op-multicheck mini');\n\t$options[] = array(\n\t\t'id' => 'index_rem_date',\n\t\t'type' => \"text\",\n\t\t'std' => '30',\n\t\t'desc' => __('时间/单位/天', 'haoui').__('(显示多长时间内评论最多的文章)', 'haoui'),\n\t\t'class' => 'op-multicheck mini');\n\t\t\t$options[] = array(\n\t\t'name' => __('首页工具箱', 'haoui'),\n\t\t'id' => 'index_tool_s',\n\t\t'std' => false,\n\t\t'desc' => __('开启', 'haoui'),\n\t\t'type' => 'checkbox');\n\t$options[] = array(\n\t\t'desc' => __('手机端默认不显示', 'haoui'),\n\t\t'id' => 'index_tool',\n\t\t'class' => 'op-multicheck',\n\t\t'std' => '<article class=\"excerpt-list\">\n <div class=\"col-sm-2 col-xs-4 col-list\">\n <div class=\"indexebox indexebox-l\">\n <i class=\"fa fa-cogs\"></i>\n <h4>常用工具</h4>\n <p>各种建站小工具</p>\n <a class=\"btn btn-primary btn-sm\" href=\"#\">点击进入</a></div>\n </div>\n <div class=\"col-sm-2 col-xs-4 col-list\">\n <div class=\"indexebox indexebox-2\">\n <i class=\"fa fa-music\"></i>\n <h4>FM音乐</h4>\n <p>音乐点播页面</p>\n <a class=\"btn btn-primary btn-sm\" href=\"http://fm.relzz.com\">点击进入</a></div>\n </div>\n <div class=\"col-sm-2 col-xs-4 col-list\">\n <div class=\"indexebox indexebox-3\">\n <i class=\"fa fa-list\"></i>\n <h4>文章归档</h4>\n <p>所有文章都搁着</p>\n <a class=\"btn btn-primary btn-sm\" href=\"#\">点击进入</a></div>\n </div>\n <div class=\"col-sm-2 col-xs-4 col-list\">\n <div class=\"indexebox indexebox-4\">\n <i class=\"fa fa-link\"></i>\n <h4>友情链接</h4>\n <p>网站合作互赢!</p>\n <a class=\"btn btn-primary btn-sm\" href=\"/links\">点击进入</a></div>\n </div>\n <div class=\"col-sm-2 col-xs-4 col-list\">\n <div class=\"indexebox indexebox-5\">\n <i class=\"fa fa-twitch\"></i>\n <h4>留言互动</h4>\n <p>意见反馈提问区</p>\n <a class=\"btn btn-primary btn-sm\" href=\"#\">点击进入</a></div>\n </div>\n <div class=\"col-sm-2 col-xs-4 col-list\">\n <div class=\"indexebox indexebox-6\">\n <i class=\"fa fa-wordpress fa-spin fa-3x fa-fw\"></i>\n <h4>唯爱网络</h4>\n <p>专注资源分享</p>\n <a class=\"btn btn-danger btn-sm\" href=\"http://www.vizyw.com\">点击进入</a></div>\n </div>\n</article>',\n\t\t'type' => 'textarea');\n\n\t$options[] = array(\n\t\t'name' => __('首页最新发布显示置顶文章', 'haoui'),\n\t\t'id' => 'home_sticky_s',\n\t\t'type' => \"checkbox\",\n\t\t'std' => false,\n\t\t'desc' => __('开启', 'haoui'));\n\t\t$options[] = array(\n\t\t'id' => 'home_sticky_n',\n\t\t'options' => $multicheck_nums,\n\t\t'desc' => __('置顶文章显示数目', 'haoui'),\n\t\t'class' => 'op-multicheck mini',\n\t\t'type' => 'select');\n\n\t\t\n\t$options[] = array(\n\t\t'name' => __('后台登录密码保护', 'haoui'),\n\t\t'id' => 'login_security',\n\t\t'type' => 'checkbox',\n\t\t'std' => false,\n\t\t'desc' => __('开启', 'haoui'));\n $options[] = array(\n\t 'desc' => __('示列:修改后你的登录地址为:<b>/wp-login.php?密码域=密码</b> 如我设置的密码域为 vieu 密码为 2018 则后台登录地址为<b>:/wp-login.php?vieu=2018</b> 如非通过此链接访问默认跳转到指定网站'),\n\t\t'class' => 'op-multicheck');\n\t$options[] = array(\n\t\t'id' => 'login_security_title',\n\t\t'std' => '',\n\t\t'desc' => __('密码域'),\n\t\t'class' => 'op-multicheck mini',\n\t\t'type' => 'text');\n\t$options[] = array(\n\t\t'id' => 'login_security_pass',\n\t\t'std' => '',\n\t\t'desc' => __('密码'),\n\t\t'class' => 'op-multicheck mini',\n\t\t'type' => 'text');\n\t$options[] = array(\n\t\t'id' => 'login_security_url',\n\t\t'std' => '',\n\t\t'desc' => __('错误跳转链接'),\n\t\t'class' => 'op-multicheck',\n\t\t'type' => 'text');\n $options[] = array(\n\t\t'name' => __('自动使用文章第一张图作为缩略图', 'haoui'),\n\t\t'id' => 'thumb_postfirstimg_s',\n\t\t'type' => \"checkbox\",\n\t\t'std' => false,\n\t\t'desc' => __('开启', 'haoui').',特别注意:如果文章已经设置特色图像或外链缩略图输入,此功能将无效。');\n\n\t$options[] = array(\n\t\t'id' => 'thumb_postfirstimg_lastname',\n\t\t'std' => '',\n\t\t'desc' => __('自动缩略图后缀将自动加入文章第一张图的地址后缀之前。比如:文章中的第一张图地址是“aaa/bbb.jpg”,此处填写的字符是“-220x150”,那么缩略图的实际地址就变成了“aaa/bbb-220x150.jpg”。默认为空。', 'haoui'),\n\t\t'class' => 'op-multicheck',\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => __('外链缩略图输入', 'haoui'),\n\t\t'id' => 'thumblink_s',\n\t\t'type' => \"checkbox\",\n\t\t'std' => false,\n\t\t'class' => 'op-multicheck',\n\t\t'desc' => __('开启', 'haoui').' 开启后会在后台编辑文章时出现外链缩略图地址输入框,填写一个图片地址即可在文章列表中显示。注意:如果文章添加了特色图像,列表中显示的缩略图优先选择该特色图像。');\n\t\n\t$options[] = array(\n\t\t'name' => __('WOW加载特效', 'haoui'),\n\t\t'id' => 'the_wow_s',\n\t\t'type' => \"checkbox\",\n\t\t'std' => false,\n\t\t'desc' => __('开启', 'haoui'));\n\t$options[] = array(\n\t\t'name' => __('显示页面', 'haoui'),\n\t\t'id' => 'the_wow_comt1',\n\t\t'type' => \"checkbox\",\n\t\t'std' => true,\n\t\t'desc' => __('首页', 'haoui'));\n\t$options[] = array(\n\t\t'id' => 'the_wow_comt2',\n\t\t'type' => \"checkbox\",\n\t\t'std' => true,\n\t\t'class' => 'op-multicheck',\n\t\t'desc' => __('文章页', 'haoui'));\n\t$options[] = array(\n\t\t'id' => 'the_wow_comt3',\n\t\t'type' => \"checkbox\",\n\t\t'std' => true,\n\t\t'class' => 'op-multicheck',\n\t\t'desc' => __('侧边栏', 'haoui'));\n $options[] = array(\n\t\t'id' => 'the_wow_comt4',\n\t\t'type' => \"checkbox\",\n\t\t'std' => false,\n\t\t'class' => 'op-multicheck',\n\t\t'desc' => __('内容抖动', 'haoui'));\t\t\n\t$options[] = array(\n\t'name' => __('样式', 'haoui'),\n\t\t'id' => 'the_wow_style',\n\t\t'std' => \"fadeInUp\",\n\t\t'type' => \"radio\",\n\t\t'options' => array(\n\t\t\t'fadeInUp' => __('默认', 'haoui'),\n\t\t\t'zoomIn' => __('弹出', 'haoui'),\n\t\t\t'pulse' => __('跳动', 'haoui'),\n\t\t\t'swing' => __('晃动', 'haoui'),\n\t\t\t'bounceIn' => __('跳出', 'haoui'),\n\t\t\t'bounceInUp' => __('下拉', 'haoui'),\n\t\t\t'flipInX' => __('上下翻转', 'haoui'),\n\t\t\t'flipInY' => __('左右翻转', 'haoui')\n\t\t));\n\n $options[] = array(\n\t\t'name' => '侧栏关于我们',\n\t\t'id' => 'celan_about_s',\n\t\t'type' => \"checkbox\",\n\t\t'std' => true,\n\t\t'desc' => '开启');\n\t\t\n $options[] = array(\n\t\t'id' => 'celan_date_s',\n\t\t'type' => \"checkbox\",\n\t\t'class' => 'op-multicheck',\n\t\t'std' => true,\n\t\t'desc' => '显示时间');\n\n $options[] = array(\n\t\t'id' => 'celan_statistics_s',\n\t\t'type' => \"checkbox\",\n\t\t'std' => true,\n\t\t'class' => 'op-multicheck',\n\t\t'desc' => '站点统计');\n\t\t\n $options[] = array(\n\t\t'id' => 'celan_last_s',\n\t\t'type' => \"checkbox\",\n\t\t'std' => true,\n\t\t'class' => 'op-multicheck',\n\t\t'desc' => '最后更新');\n\t\t$options[] = array(\n 'desc' => '背景图(建议尺寸360*200)');\n\t\t\n $options[] = array(\n\t\t'id' => 'celan_img_s',\n\t\t'std' => $imagepath . 'about_bg.png',\n\t\t'class' => 'op-multicheck',\n\t\t'type' => 'upload');\n\t\n\t$options[] = array(\n\t\t'id' => 'celan_title_s',\n\t\t'std' => '关于我们',\n\t\t'desc' => __('标题', 'haoui'),\n\t\t'class' => 'op-multicheck',\n\t\t'type' => 'text');\n\t$options[] = array(\n\t\t'id' => 'celan_keyword_s',\n\t\t'std' => '专注于网络资源搜集共享与发布!',\n\t\t'desc' => __('推广语', 'haoui'),\n\t\t'class' => 'op-multicheck',\n\t\t'type' => 'text');\n\t$options[] = array(\n\t\t'id' => 'celan_description_s',\n\t\t'std' => '本站从2014年开始至今始终坚持免费搜集分享各种网络资源,现如今本站已发展形成网站源码、主题模板、WordPress教程、破解软件、电脑软件、操作系统、经验教程、影视资源等各个领域的资源!',\n\t\t'desc' => __('详细介绍(支持html代码)', 'haoui'),\n\t\t'class' => 'op-multicheck',\n\t\t'type' => 'textarea');\n\t\t\n\t\t\n/*\n\t$options[] = array(\n\t\t'name' => __('评论数只显示人为评论数量', 'haoui'),\n\t\t'id' => 'comment_number_remove_trackback',\n\t\t'type' => \"checkbox\",\n\t\t'std' => false,\n\t\t'desc' => __('开启', 'haoui').__('(部分文章有trackback导致评论数的增加,这个可以过滤掉) ', 'haoui'));\n*/\n\n\n\t// =======================自定义背景===============================================================================================\n\t\n\t$options[] = array(\n\t\t'name' => __('自定义背景', 'haoui'),\n\t\t'type' => 'heading');\n$options[]=array(\n'name'=>__('开启自定义网站背景','haoui'),\n'id'=>'bg_checker',\n'desc'=>__('勾选之后请设置下面的值','haoui'),\n'type'=>'checkbox'\n);\n$options[] = array(\n'name'=>__('自定义背景个颜色','haoui'),\n'id' => 'wp_bg_color',\n'std' => \"\",\n'desc' => __('选中文字颜色,请选择一种颜色,自行配合颜色', 'haoui'),\n'type' => \"color\");\n$options[] = array(\n'name'=>__('自定背景图片','haoui'),\n'id' => 'wp_bg_img',\n'std' => \"\",\n'desc' => __('自行上传一张图片作为背景图片,优先级低于上面的,也就是一旦设置了颜色,此选项失效', 'haoui'),\n'type' => \"upload\");\n\t$options[] = array(\n\t\t'name' => __('布局', 'haoui'),\n\t\t'id' => 'wp_bg_style',\n\t\t'std' => \"no-repeat\",\n\t\t'type' => 'select',\n\t\t'options' => array(\n\t\t\t'no-repeat' => __('不重复显示', 'haoui'),\n\t\t\t'repeat' => __('重复显示', 'haoui'),\n\t\t));\n\t\t\t$options[] = array(\n\t\t'name' => __('背景滚动', 'haoui'),\n\t\t'id' => 'wp_bg_gd',\n\t\t'std' => \"fixed\",\n\t\t'type' => 'select',\n\t\t'options' => array(\n\t\t\t'fixed' => __('不滚动', 'haoui'),\n\t\t\t'scroll' => __('滚动', 'haoui'),\n\t\t));\n\t\t\t$options[] = array(\n\t\t'name' => __('是否填满屏幕', 'haoui'),\n\t\t'id' => 'wp_bg_size',\n\t\t'std' => \"\",\n\t\t'type' => 'select',\n\t\t'options' => array(\n\t\t\n\t\t\t'' => __('原始', 'haoui'),\t\n\t\t\t'background-size:100%;' => __('填满', 'haoui'),\n\t\t));\n$options[]=array(\n'name'=>__('===================================================================================','haoui'),\n);\t\t\n$options[]=array(\n'name'=>__('开启自定义登陆页面背景','haoui'),\n'id'=>'login_bg_checker',\n'desc'=>__('勾选之后请设置下面的值','haoui'),\n'type'=>'checkbox'\n);\n$options[] = array(\n'name'=>__('自定义背景个颜色','haoui'),\n'id' => 'login_bg_color',\n'std' => \"\",\n'desc' => __('选中文字颜色,请选择一种颜色,自行配合颜色', 'haoui'),\n'type' => \"color\");\n$options[] = array(\n'name'=>__('自定背景图片','haoui'),\n'id' => 'login_bg_img',\n'std' => \"\",\n'desc' => __('自行上传一张图片作为背景图片,优先级低于上面的,也就是一旦设置了颜色,此选项失效', 'haoui'),\n'type' => \"upload\");\n$options[]=array(\n'name'=>__('开启自定义登陆页logo','haoui'),\n'id'=>'login_logo',\n'desc'=>__('勾选之后请设置下面的值','haoui'),\n'type'=>'checkbox'\n);\n\n$options[] = array(\n'id' => 'login_logo_img',\n'std' => \"\",\n'desc' => __('logo地址,图片尺寸为120*120', 'haoui'),\n'type' => \"upload\");\n\n$options[] = array(\n\t\t'id' => 'login_logo_url',\n\t\t'std' => '',\n\t\t'desc' => __('自定义logo跳转链接,留空为首页', 'haoui'),\n\t\t'type' => 'text');\n\t// ======================================================================================================================\n\t$options[] = array(\n\t\t'name' => __('文章页', 'haoui'),\n\t\t'type' => 'heading');\n\n\t$options[] = array(\n\t\t'name' => __('面包屑导航', 'haoui'),\n\t\t'id' => 'breadcrumbs_single_s',\n\t\t'type' => \"checkbox\",\n\t\t'std' => true,\n\t\t'desc' => __('开启', 'haoui'));\n\n\t$options[] = array(\n\t\t'name' => __('面包屑导航', 'haoui').' / '.__('用“正文”替代标题', 'haoui'),\n\t\t'id' => 'breadcrumbs_single_text',\n\t\t'type' => \"checkbox\",\n\t\t'std' => true,\n\t\t'desc' => __('开启', 'haoui'));\n\n\t$options[] = array(\n\t\t'name' => __('文章摘要', 'haoui'),\n\t\t'id' => 'breadcrumbs_zhaiyao_s',\n\t\t'type' => \"checkbox\",\n\t\t'std' => true,\n\t\t'desc' => __('开启(可以在文章编辑页面上方显示,编辑文章时添加自定义摘要)', 'haoui'));\n\t$options[] = array(\n\t\t'name' => __('图片弹窗预览', 'haoui'),\n\t\t'id' => 'lightbox_s',\n\t\t'type' => \"checkbox\",\n\t\t'std' => true,\n\t\t'desc' => __('开启', 'haoui'));\n\t$options[] = array(\n\t\t'name' => __('弹窗付图片注明', 'haoui'),\n\t\t'id' => 'lightbox_caption_s',\n\t\t'type' => \"checkbox\",\n\t\t'std' => false,\n\t\t'desc' => __('开启', 'haoui'));\n\t$options[] = array(\n\t\t'name' => __('分享功能(手机端不显示)', 'haoui'),\n\t\t'id' => 'share_s',\n\t\t'type' => \"checkbox\",\n\t\t'std' => true,\n\t\t'desc' => __('开启', 'haoui'));\n\n\t$options[] = array(\n\t\t'name' => '点赞',\n\t\t'id' => 'post_like_s',\n\t\t'desc' => '开启',\n\t\t'std' => true,\n\t\t'type' => \"checkbox\");\n\t\t\n\t$options[] = array(\n\t\t'name' => '侧边栏收缩',\n\t\t'id' => 'bianlan_on_s',\n\t\t'desc' => '开启',\n\t\t'std' => true,\n\t\t'type' => \"checkbox\");\n\t$options[] = array(\n\t\t'name' => __('分享海报', 'haoui'),\n\t\t'id' => 'bigger-share_s',\n\t\t'type' => \"checkbox\",\n\t\t'std' => true,\n\t\t'desc' => __('开启(注意二维码api与左边栏的二维码api是一样的,开启前请确认API可用有效)', 'haoui'));\n\t$options[] = array(\n\t\t'id' => 'bigger-share-sub',\n\t\t'desc' => '海报宣传语',\n 'class' => 'op-multicheck',\n\t\t'std' => __('专注于网络资源搜集共享与发布!', 'haoui'),\n\t\t'type' => 'text');\t\n\t$options[] = array(\n\t\t'id' => 'bigger-share-logo',\n\t\t'desc' => '海报logo(尺寸:200*50)',\n\t\t'class' => 'op-multicheck',\n\t\t'std' => $imagepath . 'logo.png',\n\t\t'type' => 'upload');\t\t\t\t\n\n\t\t\n\t$options[] = array(\n\t\t'name' => '打赏',\n\t\t'id' => 'post_rewards_s',\n\t\t'desc' => '开启',\n\t\t'std' => true,\n\t\t'type' => \"checkbox\");\n\n\t$options[] = array(\n\t\t'name' => '打赏:显示文字',\n\t\t'id' => 'post_rewards_text',\n\t\t'std' => '打赏',\n\t\t'class' => 'op-multicheck',\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => '打赏:弹出层标题',\n\t\t'id' => 'post_rewards_title',\n\t\t'class' => 'op-multicheck',\n\t\t'std' => '觉得文章有用就打赏一下文章作者',\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => '打赏:支付宝收款二维码',\n\t\t'id' => 'post_rewards_alipay',\n\t\t'desc' => '',\n\t\t'std' => $qrcode,\n\t\t'class' => 'op-multicheck',\n\t\t'type' => 'upload');\n\n\t$options[] = array(\n\t\t'name' => '打赏:微信收款二维码',\n\t\t'id' => 'post_rewards_wechat',\n\t\t'desc' => '',\n\t\t'class' => 'op-multicheck',\n\t\t'std' => $qrcode,\n\t\t'type' => 'upload');\n\n\t$options[] = array(\n\t\t'name' => __('文章小部件开启', 'haoui'),\n\t\t'id' => 'post_plugin_view',\n\t\t'type' => \"checkbox\",\n\t\t'std' => true,\n\t\t'desc' => __('阅读量(无需安装插件)', 'haoui'));\n\n\t$options[] = array(\n\t\t'id' => 'post_plugin_comm',\n\t\t'type' => \"checkbox\",\n\t\t'std' => true,\n\t\t'class' => 'op-multicheck',\n\t\t'desc' => __('列表评论数', 'haoui'));\n\n\t$options[] = array(\n\t\t'id' => 'post_plugin_like',\n\t\t'type' => \"checkbox\",\n\t\t'std' => true,\n\t\t'class' => 'op-multicheck',\n\t\t'desc' => __('列表点赞', 'haoui'));\n\n\t$options[] = array(\n\t\t'id' => 'post_plugin_date_m',\n\t\t'type' => \"checkbox\",\n\t\t'std' => false,\n\t\t'class' => 'op-multicheck',\n\t\t'desc' => __('手机端列表时间 ', 'haoui'));\n\n\t$options[] = array(\n\t\t'id' => 'post_plugin_author',\n\t\t'type' => \"checkbox\",\n\t\t'std' => true,\n\t\t'class' => 'op-multicheck',\n\t\t'desc' => __('列表作者名', 'haoui'));\n\n\t$options[] = array(\n\t\t'id' => 'post_plugin_cat',\n\t\t'type' => \"checkbox\",\n\t\t'std' => true,\n\t\t'class' => 'op-multicheck',\n\t\t'desc' => __('列表分类链接', 'haoui'));\n\n\t$options[] = array(\n\t\t'id' => 'post_plugin_cat_m',\n\t\t'type' => \"checkbox\",\n\t\t'std' => true,\n\t\t'class' => 'op-multicheck',\n\t\t'desc' => __('手机端列表分类链接', 'haoui'));\n\n\n\t$options[] = array(\n\t\t'name' => __('文章缩略图异步加载', 'haoui'),\n\t\t'id' => 'thumbnail_src',\n\t\t'type' => \"checkbox\",\n\t\t'std' => true,\n\t\t'desc' => __('开启', 'haoui'));\n\n\t$options[] = array(\n\t\t'name' => __('文章上一页下一页', 'haoui'),\n\t\t'id' => 'post_prevnext_s',\n\t\t'type' => \"checkbox\",\n\t\t'std' => true,\n\t\t'desc' => __('开启', 'haoui'));\n\n\n\t$options[] = array(\n\t\t'name' => __('相关文章', 'haoui'),\n\t\t'id' => 'post_related_s',\n\t\t'type' => \"checkbox\",\n\t\t'std' => true,\n\t\t'desc' => __('开启', 'haoui'));\n\t\n\t$options[] = array(\n\t\t'id' => 'related_m',\n\t\t'type' => \"checkbox\",\n\t\t'std' => true,\n\t\t'class' => 'op-multicheck',\n\t\t'desc' => __('手机端不显示', 'haoui'));\n\t\n\t$options[] = array(\n\t\t'id' => 'post_related_style',\n\t\t'std' => \"relates-thumb\",\n\t\t'type' => \"radio\",\n\t\t'class' => 'op-multicheck',\n\t\t'options' => array(\n\t\t\t'relates-thumb' => __('图文模式', 'haoui'),\n\t\t\t'relates-text' => __('文字模式', 'haoui')\n\t\t));\n\t\t\n\t$options[] = array(\n\t\t'desc' => __('相关文章标题', 'haoui'),\n\t\t'id' => 'related_title',\n\t\t'class' => 'op-multicheck mini',\n\t\t'std' => __('相关推荐', 'haoui'),\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'desc' => __('相关文章显示数量', 'haoui'),\n\t\t'id' => 'post_related_n',\n\t\t'std' => 4,\n\t\t'class' => 'op-multicheck mini',\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => __('文章来源', 'haoui'),\n\t\t'id' => 'post_from_s',\n\t\t'type' => \"checkbox\",\n\t\t'std' => true,\n\t\t'desc' => __('开启', 'haoui'));\n\t\n\t$options[] = array(\n\t\t'id' => 'post_from_h1',\n\t\t'std' => __('来源:', 'haoui'),\n\t\t'class' => 'op-multicheck',\n\t\t'desc' => __('来源显示字样', 'haoui'),\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'id' => 'post_from_link_s',\n\t\t'type' => \"checkbox\",\n\t\t'std' => true,\n\t\t'class' => 'op-multicheck',\n\t\t'desc' => __('来源加链接', 'haoui'));\n\n\t$options[] = array(\n\t\t'name' => __('内容段落缩进', 'haoui'),\n\t\t'id' => 'post_p_indent_s',\n\t\t'type' => \"checkbox\",\n\t\t'std' => false,\n\t\t'desc' => __('开启', 'haoui').__(' 开启后只对前台文章展示有效,对后台编辑器中的格式无效', 'haoui'));\n\n\t/*$options[] = array(\n\t\t'name' => __('文章段落缩进', 'haoui'),\n\t\t'id' => 'post_p_s',\n\t\t'type' => \"checkbox\",\n\t\t'std' => false,\n\t\t'desc' => __('开启', 'haoui'));*/\n\n\t$options[] = array(\n\t\t'name' => __('文章页尾版权提示', 'haoui'),\n\t\t'id' => 'post_copyright_s',\n\t\t'type' => \"checkbox\",\n\t\t'std' => true,\n\t\t'desc' => __('开启', 'haoui'));\n\n\t$options[] = array(\n\t\t'name' => __('文章页尾版权提示前缀', 'haoui'),\n\t\t'id' => 'post_copyright',\n\t\t'std' => __('未经允许不得转载:', 'haoui'),\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => __('自动添加关键字和描述', 'haoui'),\n\t\t'id' => 'site_keywords_description_s',\n\t\t'type' => \"checkbox\",\n\t\t'std' => true,\n\t\t'desc' => __('开启', 'haoui').__('(开启后所有页面将自动使用主题配置的关键字和描述,具体规则可以自行查看页面源码得知)', 'haoui'));\n\t\t\n\t\t\n\n\n \n\t// ======================================================================================================================\n\t$options[] = array(\n\t\t'name' => __('独立下载页', 'haoui'),\n\t\t'type' => 'heading' );\n $options[] = array(\n\t 'name' => __('========文章下载页配置========', 'haoui'));\n\t$options[] = array(\n\t\t'name' => '在线演示功能',\n\t\t'desc' => '使用前去页面新建页面,选择模板 <b><i>在线演示</b></i> 固定链接设为 <b>http://你的域名/demo</b> ');\t\n\t$options[] = array(\n\t 'name' => __('新窗口下载', 'haoui'),\n\t\t'id' => 'down_blank_s',\n\t\t'std' => false,\n\t\t'desc' => __('开启(开启后跳转新窗口下载,关闭为弹窗下载。开启前请前往 <b><i>页面-新建页面-选择在线下载模板</b></i> 且固定链接设为 <b><i>http://你的域名/down</b></i> )', 'haoui'),\n\t\t'type' => 'checkbox');\n $options[] = array(\n\t\t'name' => __('背景(建议尺寸800x280)', 'haoui'),\n\t\t'id' => 'down_bg_src',\n\t\t'std' => $imagepath . 'down_bg.png',\n\t\t'type' => 'upload');\t\n\t$options[] = array(\n\t\t'name' => __('自定义下载说明', 'haoui'),\n\t\t'id' => 'down_sm',\n\t\t'std' => '本站大部分下载资源收集于网络,只做学习和交流使用,版权归原作者所有,若为付费资源,请在下载后24小时之内自觉删除,若作商业用途,请到原网站购买,由于未及时购买和付费发生的侵权行为,与本站无关。本站发布的内容若侵犯到您的权益,请联系本站删除,我们将及时处理!',\n\t\t'desc' => __('代码', 'haoui'),\n\t\t'type' => 'textarea');\n\t$options[] = array(\n\t\t'name' => __('自定义广告', 'haoui'),\n\t\t'id' => 'down_asb1',\n\t\t'std' => '',\n\t\t'desc' => __('代码', 'haoui'),\n\t\t'type' => 'textarea');\n\t $options[] = array(\n\t 'name' => __('========下载详情页配置========', 'haoui'));\n\t\t\n $options[] = array(\n\t\t'name' => __('右侧提示图(建议尺寸250x250)', 'haoui'),\n\t\t'id' => 'down_tishi_src',\n\t\t'std' => $imagepath . 'download.png',\n\t\t'type' => 'upload');\t\n\t$options[] = array(\n\t\t'name' => __('详情页广告', 'haoui'),\n\t\t'id' => 'down_asb2',\n\t\t'std' => '',\n\t\t'desc' => __('代码', 'haoui'),\n\t\t'type' => 'textarea');\n\t$options[] = array(\n\t\t'name' => __('详情页下载说明', 'haoui'),\n\t\t'id' => 'down_xqsm',\n\t\t'std' => ' <p>1、本站提供的压缩包若无特别说明,解压密码均为<em>www.vizyw.com</em>。</p>\n <p>2、下载后文件若为压缩包格式,请安装7Z软件或者其它压缩软件进行解压。</p>\n\t\t<p>3、文件比较大的时候,建议使用下载工具进行下载,浏览器下载有时候会自动中断,导致下载错误。</p>\n\t\t<p>4、资源可能会由于内容问题被和谐,导致下载链接不可用,遇到此问题,请到文章页面进行反馈,我们会及时进行更新的。</p>\n\t\t<p>5、其他下载问题请自行搜索教程,这里不一一讲解。</p>',\n\t\t'desc' => __('代码', 'haoui'),\n\t\t'type' => 'textarea');\t\t\n\t// ======================================================================================================================\n\t$options[] = array(\n\t\t'name' => __('文章页左边栏', 'haoui'),\n\t\t'type' => 'heading' );\n \n\t\t\n\t$options[] = array(\n\t 'name' => __('文章左边栏是否开启', 'haoui'),\n\t\t'id' => 'left_sd_s',\n\t\t'std' => true,\n\t\t'desc' => __('开启', 'haoui'),\n\t\t'type' => 'checkbox');\n\n\t$options[] = array(\n\t\t'id' => 'left_post_authordesc_s',\n\t\t'std' => true,\n\t\t'class' => 'op-multicheck',\n\t\t'desc' => __('文章作者介绍', 'haoui'),\n\t\t'type' => 'checkbox');\n\n\t$options[] = array(\n\t\t'id' => 'left_qrcode_s',\n\t\t'std' => true,\n\t\t'class' => 'op-multicheck',\n\t\t'desc' => __('文章二维码', 'haoui'),\n\t\t'type' => 'checkbox');\n\n\t$options[] = array(\n\t\t'id' => 'left_qrcode_url_s',\n\t\t'class' => 'op-multicheck',\n\t\t'std' => 'https://viapi.cn/qrcode/?text=',\n\t\t'desc' => __('二维码接口', 'haoui'),\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => __('文章标签', 'haoui'),\n\t\t'id' => 'left_tags_s',\n\t\t'std' => true,\n\t\t'desc' => __('开启(文章标签目前在文章左侧,手机端文章内容下)', 'haoui'),\n\t\t'type' => 'checkbox');\n\t$options[] = array(\n\t\t'id' => 'left_tags_style',\n\t\t'std' => \"left-tags-gray\",\n\t\t'type' => \"radio\",\n\t\t'class' => 'op-multicheck',\n\t\t'options' => array(\n\t\t\t'left-tags-gray' => __('默认样式', 'haoui'),\n\t\t\t'left-tags' => __('彩色标签', 'haoui')\n\t\t));\n\t$options[] = array(\n\t\t'name' => __('自定义广告', 'haoui'),\n\t\t'id' => 'left_asb_s',\n\t\t'std' => '',\n\t\t'desc' => __('代码', 'haoui'),\n\t\t'type' => 'textarea');\n\t\n\t\n // ======================================================================================================================\n\t$options[] = array(\n\t\t'name' => __('新浪图床', 'haoui'),\n\t\t'type' => 'heading' );\n\t\n\t$options[] = array(\n\t 'name' => __('是否开启新浪图床上传媒体', 'haoui'),\n\t\t'id' => 'sinaimg_s',\n\t\t'std' => false,\n\t\t'desc' => __('开启', 'haoui'),\n\t\t'type' => 'checkbox');\n\t\n\t$options[] = array(\n\t\t'desc' => __('什么是新浪图床?这个功能是把你网站的图片媒体文件上传到新浪然后提取图片直链调用到你自己的文章内使用,有利于提高网站媒体的加载速度,所有图片将存储在你自己的微博账号之下。'));\n\t$options[] = array(\n\t\t'desc' => __('开启前请先打开 <b><i>action/sinaimg.php</i></b> 改成自己的微博账号,然后随便上传什么图片试一下,如果有问题看一下 <b><i>action</i></b> 目录下是否生成了 <b><i>sina_config.php</i></b> 文件,如果没有就说明账号没有获取成功,须将 <b><i>action</i></b> 目录设为可写(生成成功后可关闭可写)。如使用一段时间后出现上传出错或是无法上传等问题,删除 <b><i>sina_config.php</i></b> 重新获取一下即可,实在不行换个号'));\n\n\t// ======================================================================================================================\n\n\n\t// ======================================================================================================================\n\t$options[] = array(\n\t\t'name' => __('会员中心', 'haoui'),\n\t\t'type' => 'heading' );\n\n\t$options[] = array(\n\t\t'id' => 'user_page_s',\n\t\t'std' => true,\n\t\t'desc' => __('开启会员中心', 'haoui'),\n\t\t'type' => 'checkbox');\n\n\t$options[] = array(\n\t\t'name' => __('选择会员中心页面', 'haoui'),\n\t\t'id' => 'user_page',\n\t\t'desc' => '如果没有合适的页面作为会员中心,你需要去新建一个页面再来选择',\n\t\t'options' => $options_pages,\n\t\t'type' => 'select');\n\n\t$options[] = array(\n\t\t'name' => __('选择找回密码页面', 'haoui'),\n\t\t'id' => 'user_rp',\n\t\t'desc' => '如果没有合适的页面作为找回密码页面,你需要去新建一个页面再来选择',\n\t\t'options' => $options_pages,\n\t\t'type' => 'select');\n\n\t$options[] = array(\n\t\t'name' => __('允许用户发布文章', 'haoui'),\n\t\t'id' => 'tougao_s',\n\t\t'std' => true,\n\t\t'desc' => __('开启', 'haoui'),\n\t\t'type' => 'checkbox');\n\n\t$options[] = array(\n\t\t'name' => __('有新投稿邮件通知', 'haoui'),\n\t\t'id' => 'tougao_mail_send',\n\t\t'std' => false,\n\t\t'desc' => __('开启', 'haoui'),\n\t\t'type' => 'checkbox');\n\n\t$options[] = array(\n\t\t'desc' => __('投稿通知接收邮箱', 'haoui'),\n\t\t'id' => 'tougao_mail_to',\n\t\t'type' => 'text');\n\t$options[] = array(\n\t\t'name' => __('禁止昵称关键字', 'haoui'),\n\t\t'desc' => __('一行一个关键字,用户昵称将不能使用或包含这些关键字,对编辑以下职位有效', 'haoui'),\n\t\t'id' => 'user_nickname_out',\n\t\t'std' => \"赌博\\n博彩\\n彩票\\n性爱\\n色情\\n做爱\\n爱爱\\n淫秽\\n傻b\\n妈的\\n妈b\\nadmin\\ntest\",\n\t\t'type' => 'textarea');\n\n\n\n\n\n\n\n\n\t// ======================================================================================================================\n\t$options[] = array(\n\t\t'name' => __('网站公告', 'haoui'),\n\t\t'type' => 'heading' );\n\n\t$options[] = array(\n\t\t'id' => 'minicat_s',\n\t\t'std' => true,\n\t\t'desc' => __('开启', 'haoui'),\n\t\t'type' => 'checkbox');\n\n\t$options[] = array(\n\t\t'id' => 'minicat_home_s',\n\t\t'std' => true,\n\t\t'desc' => __('在首页显示公告分类最新文章', 'haoui'),\n\t\t'type' => 'checkbox');\n\n\t$options[] = array(\n\t\t'name' => __('首页模块前缀', 'haoui'),\n\t\t'id' => 'minicat_home_title',\n\t\t'desc' => '默认为:网站公告',\n\t\t'std' => '网站公告',\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => __('选择分类设置为公告', 'haoui'),\n\t\t'desc' => __('选择一个使用公告展示模版,分类下文章将全文输出到公告类列表', 'haoui'),\n\t\t'id' => 'minicat',\n\t\t'options' => $options_categories,\n\t\t'type' => 'select');\n\n\n\n\n\t// ======================================================================================================================\n\t$options[] = array(\n\t\t'name' => __('首页焦点图', 'haoui'),\n\t\t'type' => 'heading');\n\n\t$options[] = array(\n\t\t'id' => 'focusslide_s',\n\t\t'std' => true,\n\t\t'desc' => __('开启', 'haoui'),\n\t\t'type' => 'checkbox');\n\t$options[] = array(\n\t\t'desc' => __('说明:默认为企业风格,全屏显示幻灯片(建议尺寸1900*500)。经典模式在3.5系列有些更改,一张非全屏banner(建议尺寸900*500)', 'haoui'));\n\t$options[] = array(\n\t\t'name' => __('样式', 'haoui'),\n\t\t'id' => 'banner_style',\n\t\t'std' => \"3\",\n\t\t'type' => \"radio\",\n\t\t'options' => array(\n\t\t '3' => __('展示', 'haoui'),\n\t\t\t'2' => __('企业', 'haoui'),\n\t\t\t'1' => __('经典', 'haoui')\n\t\t));\n\t$options[] = array(\n\t\t'name' => __('排序', 'haoui'),\n\t\t'id' => 'focusslide_sort',\n\t\t'desc' => '默认:1 2 3 4 5',\n\t\t'std' => '1 2 3 4 5',\n\t\t'type' => 'text');\n\n\tfor ($i=1; $i <= 5; $i++) { \n\t\n\t$options[] = array(\n\t\t'desc' => '---------------------------------------');\t\n\t$options[] = array(\n\t\t'name' => __('图', 'haoui').$i,\n\t\t'id' => 'focusslide_src_'.$i,\n\t\t'desc' => __('背景图片,尺寸:', 'haoui').'1900*400或900*500',\n\t\t'std' => $imagepath . 'vieu.jpg',\n\t\t'type' => 'upload');\t\n\t$options[] = array(\n\t 'class' => 'op-multicheck',\n\t\t'id' => 'focusslide_src_zhanshi_'.$i,\n\t\t'desc' => __('展示图片'.$i.'(只在开启展示模式启用),尺寸:500*280 透明背景 .png,.gif', 'haoui'),\n\t\t'std' => $imagepath . 'zhanshi.png',\n\t\t'type' => 'upload');\n\t\t$options[] = array(\n\t\t\n\t\t'desc' => __('展示图位置'));\n\t$options[] = array(\n\t'class' => 'op-multicheck',\n\t\t'id' => 'focusslide_zsstyle_'.$i,\n\t\t'std' => \"1\",\n\t\t'type' => \"radio\",\n\t\t'options' => array(\n\t\t\t'1' => __('右侧', 'haoui'),\n\t\t\t'2' => __('左侧', 'haoui')\n\t\t));\t\n\t$options[] = array(\n\t\t'id' => 'focusslide_title_'.$i,\n\t\t'desc' => '标题',\n\t\t'std' => 'Vieu主题',\n\t\t'type' => 'text');\n\t\t\n\t$options[] = array(\n\t\t'id' => 'focusslide_text_'.$i,\n\t\t'desc' => '内容',\n\t\t'std' => '<h4>由唯爱网络原创开发,本站为Vieu主题唯一官方站</h4><h3>支持百度熊掌号,适用于垂直站点、科技博客、个人站,扁平化设计、简洁白色、超多功能配置、会员中心、直达链接、自动缩略图<br>Vieu主题基于WordPress程序,响应式布局支持电脑、平板和手机的完美展示</h3>',\n\t\t'class' => 'op-multicheck',\n\t\t'type' => 'textarea');\n\t$options[] = array(\n\t\t'id' => 'focusslide_button_'.$i,\n\t\t'desc' => '按钮1',\n\t\t'std' => '了解详情',\n\t\t'class' => 'op-multicheck',\n\t\t'type' => 'text');\t\n $multicheck_nums = array(\n 'primary' => '原始',\n 'default' => '默认',\n 'info' => '淡蓝',\n 'warning' => '橙色',\n 'danger' => '红色',\n\t\t'success' => '绿色'\n );\n $options[] = array(\n 'id' => 'focusslide_color_'.$i,\n\t\t'desc' => '按钮样式',\n\t\t'class' => 'op-multicheck',\n 'options' => $multicheck_nums,\n 'type' => 'select');\n\n\t$options[] = array(\n\t\t// 'name' => __('链接到', 'haoui'),\n\t\t'id' => 'focusslide_href_'.$i,\n\t\t'desc' => __('链接', 'haoui'),\n\t\t'class' => 'op-multicheck',\n\t\t'std' => 'http://www.nicedowns.com',\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'id' => 'focusslide_blank_'.$i,\n\t\t'std' => true,\n\t\t'class' => 'op-multicheck',\n\t\t'desc' => __('新窗口打开', 'haoui'),\n\t\t'type' => 'checkbox');\n\t\n\t$options[] = array(\n\t\t'id' => 'focusslide_button_two_'.$i,\n\t\t'desc' => '按钮2',\n\t\t'std' => '了解详情',\n\t\t'type' => 'text');\t\n $options[] = array(\n 'id' => 'focusslide_color_two_'.$i,\n\t\t'desc' => '按钮样式',\n\t\t'class' => 'op-multicheck',\n 'options' => $multicheck_nums,\n 'type' => 'select');\n\n\t$options[] = array(\n\t\t// 'name' => __('链接到', 'haoui'),\n\t\t'id' => 'focusslide_href_two_'.$i,\n\t\t'desc' => __('链接', 'haoui'),\n\t\t'class' => 'op-multicheck',\n\t\t'std' => 'http://www.nicedowns.com',\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'id' => 'focusslide_blank_two_'.$i,\n\t\t'std' => true,\n\t\t'class' => 'op-multicheck',\n\t\t'desc' => __('新窗口打开', 'haoui'),\n\t\t'type' => 'checkbox');\n\n\t}\n\n\n\t// ======================================================================================================================\n\t$options[] = array(\n\t\t'name' => __('侧栏随动', 'haoui'),\n\t\t'type' => 'heading');\n\n\t$options[] = array(\n\t\t'name' => __('首页', 'haoui'),\n\t\t'id' => 'sideroll_index_s',\n\t\t'std' => true,\n\t\t'desc' => __('开启', 'haoui'),\n\t\t'type' => 'checkbox');\n\n\t$options[] = array(\n\t\t'id' => 'sideroll_index',\n\t\t'std' => '1 2',\n\t\t'class' => 'mini',\n\t\t'desc' => __('设置随动模块,多个模块之间用空格隔开即可!默认:“1 2”,表示第1和第2个模块,建议最多3个模块 ', 'haoui'),\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => __('分类/标签/搜索页', 'haoui'),\n\t\t'id' => 'sideroll_list_s',\n\t\t'std' => true,\n\t\t'desc' => __('开启', 'haoui'),\n\t\t'type' => 'checkbox');\n\n\t$options[] = array(\n\t\t'id' => 'sideroll_list',\n\t\t'std' => '1 2',\n\t\t'class' => 'mini',\n\t\t'desc' => __('设置随动模块,多个模块之间用空格隔开即可!默认:“1 2”,表示第1和第2个模块,建议最多3个模块 ', 'haoui'),\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => __('文章页', 'haoui'),\n\t\t'id' => 'sideroll_post_s',\n\t\t'std' => true,\n\t\t'desc' => __('开启', 'haoui'),\n\t\t'type' => 'checkbox');\n\n\t$options[] = array(\n\t\t'id' => 'sideroll_post',\n\t\t'std' => '1 2',\n\t\t'class' => 'mini',\n\t\t'desc' => __('设置随动模块,多个模块之间用空格隔开即可!默认:“1 2”,表示第1和第2个模块,建议最多3个模块 ', 'haoui'),\n\t\t'type' => 'text');\n\n\n\t// ======================================================================================================================\n\t$options[] = array(\n\t\t'name' => __('独立页面', 'haoui'),\n\t\t'type' => 'heading');\n\n\t$options[] = array(\n\t\t'name' => __('读者墙', 'haoui'),\n\t\t'id' => 'readwall_limit_time',\n\t\t'std' => 200,\n\t\t'class' => 'mini',\n\t\t'desc' => __('限制在多少月内,单位:月', 'haoui'),\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'id' => 'readwall_limit_number',\n\t\t'std' => 200,\n\t\t'class' => 'mini',\n\t\t'desc' => __('显示个数', 'haoui'),\n\t\t'type' => 'text');\n\n\t/*$options[] = array(\n\t\t'name' => __('页面左侧菜单设置', 'haoui'),\n\t\t'id' => 'page_menu',\n\t\t'options' => $options_pages,\n\t\t'type' => 'multicheck');*/\n\n\t$options[] = array(\n\t\t'name' => __('友情链接分类选择', 'haoui'),\n\t\t'id' => 'page_links_cat',\n\t\t'options' => $options_linkcats,\n\t\t'type' => 'multicheck');\n\n\t$options[] = array(\n\t\t'name' => __('网址导航标题下描述', 'haoui'),\n\t\t'id' => 'navpage_desc',\n\t\t'std' => '这里显示的是网址导航的一句话描述...',\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => __('选择链接分类到网址导航', 'haoui'),\n\t\t'id' => 'navpage_cats',\n\t\t'options' => $options_linkcats,\n\t\t'type' => 'multicheck');\n\n\t// ======================================================================================================================\n\t$options[] = array(\n\t\t'name' => __('字符', 'haoui'),\n\t\t'type' => 'heading');\n\n\t$options[] = array(\n\t\t'name' => __('首页最新发布标题', 'haoui'),\n\t\t'id' => 'index_list_title',\n\t\t'std' => __('最新发布', 'haoui'),\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => __('首页最新发布标题右侧', 'haoui'),\n\t\t'id' => 'index_list_title_r',\n\t\t'std' => '<a href=\"链接地址\">显示文字</a><a href=\"链接地址\">显示文字</a><a href=\"链接地址\">显示文字</a><a href=\"链接地址\">显示文字</a>',\n\t\t'type' => 'textarea');\n\t\t\n\t$options[] = array(\n\t\t'name' => __('文章隐藏内容提示', 'haoui'),\n\t\t'id' => 'collapse_title',\n\t\t'std' => __('阅读全文', 'haoui'),\n\t\t'type' => 'text');\n\t\t\n\t$options[] = array(\n\t\t'name' => __('评论标题', 'haoui'),\n\t\t'id' => 'comment_title',\n\t\t'std' => __('评论', 'haoui'),\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => __('评论框默认字符', 'haoui'),\n\t\t'id' => 'comment_text',\n\t\t'std' => __('你的评论可以一针见血', 'haoui'),\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => __('评论提交按钮字符', 'haoui'),\n\t\t'id' => 'comment_submit_text',\n\t\t'std' => __('提交评论', 'haoui'),\n\t\t'type' => 'text');\n\t$options[] = array(\n\t\t'name' => __('文章内全网VIP视频解析', 'haoui'),\n\t\t'id' => 'vieu_video_s',\n\t\t'std' => true,\n\t\t'desc' => '开启(视频解析接口支持全网VIP影视,文章内使用格式 <b><i> [video]视频播放地址[/video] </i></b> 【如腾讯视频的就是腾讯视频的视频播放地址。如https://v.qq.com/x/page/c0376z3bdo6.html】)',\n\t\t'type' => 'checkbox');\n\t$options[] = array(\n\t\t'name' => __('视频解析接口', 'haoui'),\n\t\t'id' => 'videoapi_url',\n\t\t'class' => 'op-multicheck',\n\t\t'std' => 'http://www.viapi.cn/tv/jiexi.php?url=',\n\t\t'type' => 'text');\n\t$options[] = array(\n\t\t'name' => __('公众号加密', 'haoui'),\n\t\t'desc' => '调用格式 <b><i> [gzhhide key=\"密码\"]加密内容[/gzhhide] </i></b> ');\n\t$options[] = array(\n\t\t'id' => 'gzhhide_title',\n\t\t'desc' => '隐藏提示',\n\t\t'class' => 'op-multicheck',\n\t\t'std' => '抱歉!隐藏内容,请输入密码后可见!',\n\t\t'type' => 'text');\n\t$options[] = array(\n\t\t'desc' => __('详细提示内容'),\n\t\t'id' => 'gzhhide_box',\n\t\t'class' => 'op-multicheck',\n\t\t'std' => '请打开微信扫描右边的二维码回复数字2018获取密码,也可以微信直接搜索“唯爱网络”关注微信公众号获取密码。',\n\t\t'type' => 'textarea');\t\n\t$options[] = array(\n\t\t'id' => 'gzhhide_code',\n\t\t'class' => 'op-multicheck',\n\t\t'std' => $imagepath . 'qrcode.png',\n\t\t'desc' => __('微信公众号二维码,建议图片尺寸:', 'haoui').'200x200px',\n\t\t'type' => 'upload');\n\n\t\t\n\t// ======================================================================================================================\n\t$options[] = array(\n\t\t'name' => __('社交', 'haoui'),\n\t\t'type' => 'heading' );\n\n\t$options[] = array(\n\t\t'name' => __('此处填写内容移置文章页左边栏', 'haoui'));\n\n\t$options[] = array(\n\t\t'name' => __('微博', 'haoui'),\n\t\t'id' => 'weibo',\n\t\t'std' => 'http://www.nicedowns.com',\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => __('腾讯QQ', 'haoui'),\n\t\t'id' => 'qq',\n\t\t'std' => '470000334',\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => __('微信帐号', 'haoui'),\n\t\t'id' => 'wechat',\n\t\t'std' => '唯爱网络',\n\t\t'type' => 'text');\n\t$options[] = array(\n\t\t'id' => 'wechat_qr',\n\t\t'std' => $imagepath . 'qrcode.png',\n\t\t'desc' => __('微信二维码,建议图片尺寸:', 'haoui').'200x200px',\n\t\t'type' => 'upload');\n\n\t// ======================================================================================================================\n\t$options[] = array(\n\t\t'name' => __('广告位', 'haoui'),\n\t\t'type' => 'heading' ); \n\t$options[] = array(\n\t\t'name' => __('全局右下角弹窗', 'haoui'),\n\t\t'id' => 'wintip_srollbar_s',\n\t\t'std' => false,\n\t\t'desc' => ' 显示',\n\t\t'type' => 'checkbox');\t\n\t$options[] = array(\n\t\t'id' => 'wintip_m',\n\t\t'std' => false,\n\t\t'desc' => '手机端不显示',\n\t\t'type' => 'checkbox');\t\n\t$options[] = array(\n\t\t'desc' => '时间/单位分钟',\n\t\t'id' => 'wintip_time',\n\t\t'std' => '10',\n\t\t'class' => 'mini',\n\t\t'type' => 'text');\n\t$options[] = array(\n\t\t'desc' => '标题',\n\t\t'id' => 'wintip_title',\n\t\t'std' => 'Vieu3.3主题',\n\t\t'type' => 'text');\t\n\t$options[] = array(\n\t\t'desc' => '按钮文字',\n\t\t'id' => 'wintip_button',\n\t\t'std' => '了解一下',\n\t\t'type' => 'text');\t\n\t$options[] = array(\n\t\t'desc' => '跳转链接',\n\t\t'id' => 'wintip_url',\n\t\t'std' => 'http://www.nicedowns.com',\n\t\t'type' => 'text');\t\n\t$options[] = array(\n\t\t'id' => 'wintip_blank',\n\t\t'std' => false,\n\t\t'desc' => '新窗口打开',\n\t\t'type' => 'checkbox');\t\n\t$options[] = array(\n\t\t'desc' => __('内容'),\n\t\t'id' => 'wintip_asb',\n\t\t'std' => '专业打造轻量级个人企业风格博客主题!专注于前端开发,全站响应式布局自适应模板。',\n\t\t'type' => 'textarea');\t\n\t\t\n\t$options[] = array(\n\t\t'name' => __('文章页正文结尾文字广告', 'haoui'),\n\t\t'id' => 'ads_post_footer_s',\n\t\t'std' => false,\n\t\t'desc' => ' 显示',\n\t\t'type' => 'checkbox');\n\t$options[] = array(\n\t\t'desc' => '前标题',\n\t\t'id' => 'ads_post_footer_pretitle',\n\t\t'std' => '唯爱网络',\n\t\t'type' => 'text');\n\t$options[] = array(\n\t\t'desc' => '标题',\n\t\t'id' => 'ads_post_footer_title',\n\t\t'std' => '',\n\t\t'type' => 'text');\n\t$options[] = array(\n\t\t'desc' => '链接',\n\t\t'id' => 'ads_post_footer_link',\n\t\t'std' => '',\n\t\t'type' => 'text');\n\t$options[] = array(\n\t\t'id' => 'ads_post_footer_link_blank',\n\t\t'type' => \"checkbox\",\n\t\t'std' => true,\n\t\t'desc' => __('开启', 'haoui') .' ('. __('新窗口打开链接', 'haoui').')');\n\n\n\t$options[] = array(\n\t\t'name' => __('首页文章列表上', 'haoui'),\n\t\t'id' => 'ads_index_01_s',\n\t\t'std' => false,\n\t\t'desc' => __('开启', 'haoui'),\n\t\t'type' => 'checkbox');\n\t$options[] = array(\n\t\t'desc' => __('非手机端', 'haoui').' '.$adsdesc,\n\t\t'id' => 'ads_index_01',\n\t\t'std' => '',\n\t\t'type' => 'textarea');\n\t$options[] = array(\n\t\t'id' => 'ads_index_01_m',\n\t\t'std' => '',\n\t\t'desc' => __('手机端', 'haoui').' '.$adsdesc,\n\t\t'type' => 'textarea');\n\n\t$options[] = array(\n\t\t'name' => __('首页分页下', 'haoui'),\n\t\t'id' => 'ads_index_02_s',\n\t\t'std' => false,\n\t\t'desc' => __('开启', 'haoui'),\n\t\t'type' => 'checkbox');\n\t$options[] = array(\n\t\t'desc' => __('非手机端', 'haoui').' '.$adsdesc,\n\t\t'id' => 'ads_index_02',\n\t\t'std' => '',\n\t\t'type' => 'textarea');\n\t$options[] = array(\n\t\t'id' => 'ads_index_02_m',\n\t\t'std' => '',\n\t\t'desc' => __('手机端', 'haoui').' '.$adsdesc,\n\t\t'type' => 'textarea');\n\n\t$options[] = array(\n\t\t'name' => __('文章页正文上', 'haoui'),\n\t\t'id' => 'ads_post_01_s',\n\t\t'std' => false,\n\t\t'desc' => __('开启', 'haoui'),\n\t\t'type' => 'checkbox');\n\t$options[] = array(\n\t\t'desc' => __('非手机端', 'haoui').' '.$adsdesc,\n\t\t'id' => 'ads_post_01',\n\t\t'std' => '',\n\t\t'type' => 'textarea');\n\t$options[] = array(\n\t\t'id' => 'ads_post_01_m',\n\t\t'std' => '',\n\t\t'desc' => __('手机端', 'haoui').' '.$adsdesc,\n\t\t'type' => 'textarea');\n\n\t$options[] = array(\n\t\t'name' => __('文章页正文下', 'haoui'),\n\t\t'id' => 'ads_post_02_s',\n\t\t'std' => false,\n\t\t'desc' => __('开启', 'haoui'),\n\t\t'type' => 'checkbox');\n\t$options[] = array(\n\t\t'desc' => __('非手机端', 'haoui').' '.$adsdesc,\n\t\t'id' => 'ads_post_02',\n\t\t'std' => '',\n\t\t'type' => 'textarea');\n\t$options[] = array(\n\t\t'id' => 'ads_post_02_m',\n\t\t'std' => '',\n\t\t'desc' => __('手机端', 'haoui').' '.$adsdesc,\n\t\t'type' => 'textarea');\n\n\t$options[] = array(\n\t\t'name' => __('文章页评论上', 'haoui'),\n\t\t'id' => 'ads_post_03_s',\n\t\t'std' => false,\n\t\t'desc' => __('开启', 'haoui'),\n\t\t'type' => 'checkbox');\n\t$options[] = array(\n\t\t'desc' => __('非手机端', 'haoui').' '.$adsdesc,\n\t\t'id' => 'ads_post_03',\n\t\t'std' => '',\n\t\t'type' => 'textarea');\n\t$options[] = array(\n\t\t'id' => 'ads_post_03_m',\n\t\t'std' => '',\n\t\t'desc' => __('手机端', 'haoui').' '.$adsdesc,\n\t\t'type' => 'textarea');\n\n\t$options[] = array(\n\t\t'name' => __('分类页列表上', 'haoui'),\n\t\t'id' => 'ads_cat_01_s',\n\t\t'std' => false,\n\t\t'desc' => __('开启', 'haoui'),\n\t\t'type' => 'checkbox');\n\t$options[] = array(\n\t\t'desc' => __('非手机端', 'haoui').' '.$adsdesc,\n\t\t'id' => 'ads_cat_01',\n\t\t'std' => '',\n\t\t'type' => 'textarea');\n\t$options[] = array(\n\t\t'id' => 'ads_cat_01_m',\n\t\t'std' => '',\n\t\t'desc' => __('手机端', 'haoui').' '.$adsdesc,\n\t\t'type' => 'textarea');\n\n\t$options[] = array(\n\t\t'name' => __('标签页列表上', 'haoui'),\n\t\t'id' => 'ads_tag_01_s',\n\t\t'std' => false,\n\t\t'desc' => __('开启', 'haoui'),\n\t\t'type' => 'checkbox');\n\t$options[] = array(\n\t\t'desc' => __('非手机端', 'haoui').' '.$adsdesc,\n\t\t'id' => 'ads_tag_01',\n\t\t'std' => '',\n\t\t'type' => 'textarea');\n\t$options[] = array(\n\t\t'id' => 'ads_tag_01_m',\n\t\t'std' => '',\n\t\t'desc' => __('手机端', 'haoui').' '.$adsdesc,\n\t\t'type' => 'textarea');\n\n\t$options[] = array(\n\t\t'name' => __('搜索页列表上', 'haoui'),\n\t\t'id' => 'ads_search_01_s',\n\t\t'std' => false,\n\t\t'desc' => __('开启', 'haoui'),\n\t\t'type' => 'checkbox');\n\t$options[] = array(\n\t\t'desc' => __('非手机端', 'haoui').' '.$adsdesc,\n\t\t'id' => 'ads_search_01',\n\t\t'std' => '',\n\t\t'type' => 'textarea');\n\t$options[] = array(\n\t\t'id' => 'ads_search_01_m',\n\t\t'std' => '',\n\t\t'desc' => __('手机端', 'haoui').' '.$adsdesc,\n\t\t'type' => 'textarea');\n\n\n\n\t// ======================================================================================================================\n\t$options[] = array(\n\t\t'name' => __('自定义代码', 'haoui'),\n\t\t'type' => 'heading' );\n\n\t$options[] = array(\n\t\t'name' => __('自定义网站底部内容', 'haoui'),\n\t\t'desc' => __('该块显示在网站底部版权上方,可已定义放一些链接或者图片之类的内容。', 'haoui'),\n\t\t'id' => 'fcode',\n\t\t'std' => '',\n\t\t'type' => 'textarea');\n\n\t$options[] = array(\n\t\t'name' => __('自定义CSS样式', 'haoui'),\n\t\t'desc' => __('位于</head>之前,直接写样式代码,不用添加&lt;style&gt;标签', 'haoui'),\n\t\t'id' => 'csscode',\n\t\t'std' => '',\n\t\t'type' => 'textarea');\n\n\t$options[] = array(\n\t\t'name' => __('自定义头部代码', 'haoui'),\n\t\t'desc' => __('位于</head>之前,这部分代码是在主要内容显示之前加载,通常是CSS样式、自定义的<meta>标签、全站头部JS等需要提前加载的代码', 'haoui'),\n\t\t'id' => 'headcode',\n\t\t'std' => '',\n\t\t'type' => 'textarea');\n\n\t$options[] = array(\n\t\t'name' => __('自定义底部代码', 'haoui'),\n\t\t'desc' => __('位于&lt;/body&gt;之前,这部分代码是在主要内容加载完毕加载,通常是JS代码', 'haoui'),\n\t\t'id' => 'footcode',\n\t\t'std' => '',\n\t\t'type' => 'textarea');\n\n\t$options[] = array(\n\t\t'name' => __('网站统计代码', 'haoui'),\n\t\t'desc' => __('位于底部,用于添加第三方流量数据统计代码,如:Google analytics、百度统计、CNZZ、51la,国内站点推荐使用百度统计,国外站点推荐使用Google analytics', 'haoui'),\n\t\t'id' => 'trackcode',\n\t\t'std' => '',\n\t\t'type' => 'textarea');\n\n\n\n\n\n\n\n\t$options[] = array(\n\t\t'name' => __('百度熊掌号', 'haoui'),\n\t\t'type' => 'heading' );\n\n\t$options[] = array(\n\t\t'name' => __('百度熊掌号', 'haoui'),\n\t\t'id' => 'xzh_on',\n\t\t'std' => false,\n\t\t'desc' => ' 开启',\n\t\t'type' => 'checkbox');\n\n\t$options[] = array(\n\t\t'name' => '百度熊掌号 Appid',\n\t\t'id' => 'xzh_appid',\n\t\t'std' => '',\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => '百度熊掌号 推送密钥 token',\n\t\t'id' => 'xzh_post_token',\n\t\t'std' => '',\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => __('粉丝关注', 'haoui'),\n\t\t'id' => 'xzh_render_head',\n\t\t'std' => false,\n\t\t'desc' => ' 吸顶bar',\n\t\t'type' => 'checkbox');\n\n\t$options[] = array(\n\t\t'class' => 'op-multicheck',\n\t\t'id' => 'xzh_render_body',\n\t\t'std' => true,\n\t\t'desc' => ' 文章段落间bar',\n\t\t'type' => 'checkbox');\n\n\t$options[] = array(\n\t\t'class' => 'op-multicheck',\n\t\t'id' => 'xzh_render_tail',\n\t\t'std' => true,\n\t\t'desc' => ' 底部bar',\n\t\t'type' => 'checkbox');\n\n\t$options[] = array(\n\t\t'name' => __('添加JSON_LD数据', 'haoui'),\n\t\t'id' => 'xzh_jsonld_single',\n\t\t'std' => true,\n\t\t'desc' => ' 文章页',\n\t\t'type' => 'checkbox');\n\n\t$options[] = array(\n\t\t'class' => 'op-multicheck',\n\t\t'id' => 'xzh_jsonld_page',\n\t\t'std' => false,\n\t\t'desc' => ' 页面',\n\t\t'type' => 'checkbox');\n\n\t$options[] = array(\n\t\t'name' => __('添加JSON_LD数据 - 不添加图片', 'haoui'),\n\t\t'id' => 'xzh_jsonld_img',\n\t\t'std' => false,\n\t\t'desc' => ' 开启',\n\t\t'type' => 'checkbox');\n\n\t$options[] = array(\n\t\t'name' => __('新增文章实时推送', 'haoui'),\n\t\t'id' => 'xzh_post_on',\n\t\t'std' => false,\n\t\t'desc' => ' 开启 (使用此功能,你还需要开启本页中的 百度熊掌号 和 Appid以及token的设置)',\n\t\t'type' => 'checkbox');\n\n\t\n\t\n\n\n\t/**\n\t * For $settings options see:\n\t * http://codex.wordpress.org/Function_Reference/wp_editor\n\t *\n\t * 'media_buttons' are not supported as there is no post to attach items to\n\t * 'textarea_name' is set by the 'id' you choose\n\t */\n/*\n\t$wp_editor_settings = array(\n\t\t'wpautop' => true, // Default\n\t\t'textarea_rows' => 5,\n\t\t'tinymce' => array( 'plugins' => 'wordpress' )\n\t);\n\n\t$options[] = array(\n\t\t'name' => __('Default Text Editor', 'options_framework_theme'),\n\t\t'desc' => sprintf( __( 'You can also pass settings to the editor. Read more about wp_editor in <a href=\"%1$s\" target=\"_blank\">the WordPress codex</a>', 'options_framework_theme' ), 'http://codex.wordpress.org/Function_Reference/wp_editor' ),\n\t\t'id' => 'example_editor',\n\t\t'type' => 'editor',\n\t\t'settings' => $wp_editor_settings );\n\n*/\n\n\treturn $options;\n}", "function caldol_add_options_members_filter(){\n\techo '<option value=\"TomChoice\">doggie</option>';\n\t\t\n}", "function propanel_siteoptions_machine($options) {\n \n $counter = 0;\n\t$menu = '';\n\t$output = '';\n\tforeach ($options as $value) {\n\t \n\t\t$counter++;\n\t\t$val = '';\n\t\t//Start Heading\n\t\t if ( $value['type'] != \"heading\" )\n\t\t {\n\t\t \t$class = ''; if(isset( $value['class'] )) { $class = $value['class']; }\n\t\t\t//$output .= '<div class=\"section section-'. $value['type'] .'\">'.\"\\n\".'<div class=\"option-inner\">'.\"\\n\";\n\t\t\t$output .= '<div class=\"section section-'.$value['type'].' '. $class .'\">'.\"\\n\";\n\t\t\t$output .= '<h4 class=\"heading\">'. $value['name'] .'</h3>'.\"\\n\";\n\t\t\t$output .= '<div class=\"option\">'.\"\\n\" . '<div class=\"controls\">'.\"\\n\";\n\n\t\t } \n\t\t //End Heading\n\t\t$select_value = ''; \n\t\tswitch ( $value['type'] ) {\n\t\t\n\t\tcase 'text':\n\t\t\t$val = $value['std'];\n\t\t\t$std = get_option($value['id']);\n\t\t\tif ( $std != \"\") { $val = $std; }\n\t\t\t$output .= '<input class=\"of-input\" name=\"'. $value['id'] .'\" id=\"'. $value['id'] .'\" type=\"'. $value['type'] .'\" value=\"'. $val .'\" />';\n\t\tbreak;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tcase 'select':\n\n\t\t\t$output .= '<select class=\"of-input\" name=\"'. $value['id'] .'\" id=\"'. $value['id'] .'\">';\n\t\t\n\t\t\t$select_value = get_option($value['id']);\n\t\t\t \n\t\t\tforeach ($value['options'] as $option) {\n\t\t\t\t\n\t\t\t\t$selected = '';\n\t\t\t\t\n\t\t\t\t if($select_value != '') {\n\t\t\t\t\t if ( $select_value == $option) { $selected = ' selected=\"selected\"';} \n\t\t\t } else {\n\t\t\t\t\t if ( isset($value['std']) )\n\t\t\t\t\t\t if ($value['std'] == $option) { $selected = ' selected=\"selected\"'; }\n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t $output .= '<option'. $selected .'>';\n\t\t\t\t $output .= $option;\n\t\t\t\t $output .= '</option>';\n\t\t\t \n\t\t\t } \n\t\t\t $output .= '</select>';\n\n\t\t\t\n\t\tbreak;\n\t\t\n\t\t\n\t\t\n\t\t//@since 2.0 added by denzel to allow value different from label.\n\t\tcase 'select-advance':\n\n\t\t\t$output .= '<select class=\"of-input\" name=\"'. $value['id'] .'\" id=\"'. $value['id'] .'\">';\n\t\t\n\t\t\t$select_value = get_option($value['id']);\n\t\t\t \n\t\t\tforeach ($value['options'] as $key => $option) {\n\t\t\t\t\n\t\t\t\t$selected = '';\n\t\t\t\t\n\t\t\t\t if($select_value != '') {\n\t\t\t\t\t if ( $select_value == $key) { $selected = ' selected=\"selected\"';} \n\t\t\t } else {\n\t\t\t\t\t if ( isset($value['std']) )\n\t\t\t\t\t\t if ($value['std'] == $key) { $selected = ' selected=\"selected\"'; }\n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t $output .= '<option value=\"'. $key .'\" '. $selected .'>';\n\t\t\t\t $output .= $option;\n\t\t\t\t $output .= '</option>';\n\t\t\t \n\t\t\t } \n\t\t\t $output .= '</select>';\n\n\t\t\t\n\t\tbreak;\t\t\n\t\t\n\t\t\n\t\t\n\t\tcase 'fontsize':\n\t\t\n\t\t/* Font Size */\n\t\t\t$val = $default['size'];\n\t\t\tif ( $typography_stored['size'] != \"\") { $val = $typography_stored['size']; }\n\t\t\t$output .= '<select class=\"of-typography of-typography-size\" name=\"'. $value['id'].'_size\" id=\"'. $value['id'].'_size\">';\n\t\t\t\tfor ($i = 9; $i < 71; $i++){ \n\t\t\t\t\tif($val == $i){ $active = 'selected=\"selected\"'; } else { $active = ''; }\n\t\t\t\t\t$output .= '<option value=\"'. $i .'\" ' . $active . '>'. $i .'px</option>'; }\n\t\t\t$output .= '</select>';\n\t\t\n\t\t\n\t\tbreak;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tcase \"multicheck\":\n\t\t\n\t\t\t$std = $value['std']; \n\t\t\t\n\t\t\tforeach ($value['options'] as $key => $option) {\n\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t$tt_key = $value['id'] . '_' . $key;\n\t\t\t$saved_std = get_option($tt_key);\n\t\t\t\t\t\n\t\t\tif(!empty($saved_std)) \n\t\t\t{ \n\t\t\t\t if($saved_std == 'true'){\n\t\t\t\t\t $checked = 'checked=\"checked\"'; \n\t\t\t\t } \n\t\t\t\t else{\n\t\t\t\t\t $checked = ''; \n\t\t\t\t } \n\t\t\t} \n\t\t\telseif( $std == $key) {\n\t\t\t $checked = 'checked=\"checked\"';\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$checked = ''; }\n\t\t\t$output .= '<input type=\"checkbox\" class=\"checkbox of-input\" name=\"'. $tt_key .'\" id=\"'. $tt_key .'\" value=\"true\" '. $checked .' /><label for=\"'. $tt_key .'\">'. $option .'</label><br />';\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tcase 'textarea':\n\t\t\t\n\t\t\t$cols = '8';\n\t\t\t$ta_value = '';\n\t\t\t\n\t\t\tif(isset($value['std'])) {\n\t\t\t\t\n\t\t\t\t$ta_value = $value['std']; \n\t\t\t\t\n\t\t\t\tif(isset($value['options'])){\n\t\t\t\t\t$ta_options = $value['options'];\n\t\t\t\t\tif(isset($ta_options['cols'])){\n\t\t\t\t\t$cols = $ta_options['cols'];\n\t\t\t\t\t} else { $cols = '8'; }\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\t$std = get_option($value['id']);\n\t\t\t\tif( $std != \"\") { $ta_value = stripslashes( $std ); }\n\t\t\t\t$output .= '<textarea class=\"of-input\" name=\"'. $value['id'] .'\" id=\"'. $value['id'] .'\" cols=\"'. $cols .'\" rows=\"8\">'.$ta_value.'</textarea>';\n\t\t\t\n\t\t\t\n\t\tbreak;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tcase \"radio\":\n\t\t\t\n\t\t\t $select_value = get_option( $value['id']);\n\t\t\t\t \n\t\t\t foreach ($value['options'] as $key => $option) \n\t\t\t { \n\n\t\t\t\t $checked = '';\n\t\t\t\t if($select_value != '') {\n\t\t\t\t\t\tif ( $select_value == $key) { $checked = ' checked'; } \n\t\t\t\t } else {\n\t\t\t\t\tif ($value['std'] == $key) { $checked = ' checked'; }\n\t\t\t\t }\n\t\t\t\t$output .= '<input class=\"of-input of-radio\" type=\"radio\" name=\"'. $value['id'] .'\" value=\"'. $key .'\" '. $checked .' />' . $option .'<br />';\n\t\t\t\n\t\t\t}\n\t\t\t \n\t\tbreak;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tcase \"checkbox\": \n\t\t\n\t\t $std = $value['std']; \n\t\t \n\t\t $saved_std = get_option($value['id']);\n\t\t \n\t\t $checked = '';\n\t\t\t\n\t\t\tif(!empty($saved_std)) {\n\t\t\t\tif($saved_std == 'true') {\n\t\t\t\t$checked = 'checked=\"checked\"';\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t $checked = '';\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif( $std == 'true') {\n\t\t\t $checked = 'checked=\"checked\"';\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$checked = '';\n\t\t\t}\n\t\t\t$output .= '<input type=\"checkbox\" class=\"checkbox of-input\" name=\"'. $value['id'] .'\" id=\"'. $value['id'] .'\" value=\"true\" '. $checked .' />';\n\n\t\tbreak;\n\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tcase \"upload\":\n\t\t\t\n\t\t\t$output .= propanel_siteoptions_uploader_function($value['id'],$value['std'],null);\n\t\t\t\n\t\tbreak;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tcase \"upload_min\":\n\t\t\t\n\t\t\t$output .= propanel_siteoptions_uploader_function($value['id'],$value['std'],'min');\n\t\t\t\n\t\tbreak;\n\t\tcase \"color\":\n\t\t\t$val = $value['std'];\n\t\t\t$stored = get_option( $value['id'] );\n\t\t\tif ( $stored != \"\") { $val = $stored; }\n\t\t\t$output .= '<div id=\"' . $value['id'] . '_picker\" class=\"colorSelector\"><div></div></div>';\n\t\t\t$output .= '<input class=\"of-color\" name=\"'. $value['id'] .'\" id=\"'. $value['id'] .'\" type=\"text\" value=\"'. $val .'\" />';\n\t\tbreak; \n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t \n\t\t\n\t\tcase \"images\":\n\t\t\t$i = 0;\n\t\t\t$select_value = get_option( $value['id']);\n\t\t\t\t \n\t\t\tforeach ($value['options'] as $key => $option) \n\t\t\t { \n\t\t\t $i++;\n\n\t\t\t\t $checked = '';\n\t\t\t\t $selected = '';\n\t\t\t\t if($select_value != '') {\n\t\t\t\t\t\tif ( $select_value == $key) { $checked = ' checked'; $selected = 'of-radio-img-selected'; } \n\t\t\t\t } else {\n\t\t\t\t\t\tif ($value['std'] == $key) { $checked = ' checked'; $selected = 'of-radio-img-selected'; }\n\t\t\t\t\t\telseif ($i == 1 && !isset($select_value)) { $checked = ' checked'; $selected = 'of-radio-img-selected'; }\n\t\t\t\t\t\telseif ($i == 1 && $value['std'] == '') { $checked = ' checked'; $selected = 'of-radio-img-selected'; }\n\t\t\t\t\t\telse { $checked = ''; }\n\t\t\t\t\t}\t\n\t\t\t\t\n\t\t\t\t$output .= '<span>';\n\t\t\t\t$output .= '<input type=\"radio\" id=\"of-radio-img-' . $value['id'] . $i . '\" class=\"checkbox of-radio-img-radio\" value=\"'.$key.'\" name=\"'. $value['id'].'\" '.$checked.' />';\n\t\t\t\t$output .= '<div class=\"of-radio-img-label\">'. $key .'</div>';\n\t\t\t\t$output .= '<img src=\"'.$option.'\" alt=\"\" class=\"of-radio-img-img '. $selected .'\" onClick=\"document.getElementById(\\'of-radio-img-'. $value['id'] . $i.'\\').checked = true;\" />';\n\t\t\t\t$output .= '</span>';\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\tbreak; \n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tcase \"info\":\n\t\t\t$default = $value['std'];\n\t\t\t$output .= $default;\n\t\tbreak;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\n\t \n\t\t\n\t\tcase \"heading\":\n\t\t\t\n\t\t\tif($counter >= 2){\n\t\t\t $output .= '</div>'.\"\\n\";\n\t\t\t}\n\t\t\t$jquery_click_hook = ereg_replace(\"[^A-Za-z0-9]\", \"\", strtolower($value['name']) );\n\t\t\t$jquery_click_hook = \"of-option-\" . $jquery_click_hook;\n\t\t\t$menu .= '<li><a title=\"'. $value['name'] .'\" href=\"#'. $jquery_click_hook .'\">'. $value['name'] .'</a></li>';\n\t\t\t$output .= '<div class=\"group\" id=\"'. $jquery_click_hook .'\"><h2>'.$value['name'].'</h2>'.\"\\n\";\n\t\tbreak; \n\t\t} \n\t\t\n\t\t// if TYPE is an array, formatted into smaller inputs... ie smaller values\n\t\tif ( is_array($value['type'])) {\n\t\t\tforeach($value['type'] as $array){\n\t\t\t\n\t\t\t\t\t$id = $array['id']; \n\t\t\t\t\t$std = $array['std'];\n\t\t\t\t\t$saved_std = get_option($id);\n\t\t\t\t\tif($saved_std != $std){$std = $saved_std;} \n\t\t\t\t\t$meta = $array['meta'];\n\t\t\t\t\t\n\t\t\t\t\tif($array['type'] == 'text') { // Only text at this point\n\t\t\t\t\t\t \n\t\t\t\t\t\t $output .= '<input class=\"input-text-small of-input\" name=\"'. $id .'\" id=\"'. $id .'\" type=\"text\" value=\"'. $std .'\" />'; \n\t\t\t\t\t\t $output .= '<span class=\"meta-two\">'.$meta.'</span>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\t\tif ( $value['type'] != \"heading\" ) { \n\t\t\tif ( $value['type'] != \"checkbox\" ) \n\t\t\t\t{ \n\t\t\t\t$output .= '<br/>';\n\t\t\t\t}\n\t\t\tif(!isset($value['desc'])){ $explain_value = ''; } else{ $explain_value = $value['desc']; } \n\t\t\t$output .= '</div><div class=\"explain\">'. $explain_value .'</div>'.\"\\n\";\n\t\t\t$output .= '<div class=\"clear\"> </div></div></div>'.\"\\n\";\n\t\t\t}\n\t \n\t}\n $output .= '</div>';\n return array($output,$menu);\n\n}", "function options_form() {\n return array(\n );\n }", "function wwm_2015_optionsframework_options() {\r\n\r\n\t$options = array();\r\n\t//Set the Section Tab Title\r\n\t$options[] = array(\r\n\t\t'name' => __('General Options', 'wwm_2015'),\r\n\t\t'type' => 'heading');\r\n\t\t//Logo\r\n\t\t\t$options[] = array(\r\n\t\t\t\t'name' => __('Main Logo', 'wwm_2015'),\r\n\t\t\t\t'desc' => __('Make sure to use a PNG, with a transparent background (the gray that you see above, is coded in...just for visibility purposes).', 'wwm_2015'),\r\n\t\t\t\t'id' => 'main_logo',\r\n\t\t\t\t'type' => 'upload',\r\n\t\t\t\t'class' => 'large-12 medium-12 small-12 columns');\t\t\r\n\t\t//Primary Color\r\n\t\t\t$options[] = array(\r\n\t\t\t\t\t'name' => __('Primary Color?', 'wwm_2015'),\r\n\t\t\t\t\t'desc' => __('The main color in the scheme', 'wwm_2015'),\r\n\t\t\t\t\t'id' => 'primary_color',\r\n\t\t\t\t\t'std' => '#565b7b',\r\n\t\t\t\t\t'default'=>'#565b7b',\r\n\t\t\t\t\t'type' => 'color',\r\n\t\t\t\t\t'class'=>'large-6 medium-12 small-12 columns'\r\n\t\t\t\t);\t\r\n\t\t//Secondary Color\r\n\t\t\t$options[] = array(\r\n\t\t\t\t\t'name' => __('Secondary Color?', 'wwm_2015'),\r\n\t\t\t\t\t'desc' => __('The secondary color in the scheme', 'wwm_2015'),\r\n\t\t\t\t\t'id' => 'secondary_color',\r\n\t\t\t\t\t'std' => '#d3e2f7',\r\n\t\t\t\t\t'default'=>'#d3e2f7',\r\n\t\t\t\t\t'type' => 'color',\r\n\t\t\t\t\t'class'=>'large-6 medium-12 small-12 columns'\r\n\t\t\t\t);\t\t\r\n\treturn $options;\r\n}", "private function renderOptions(): string\n {\n $str = '';\n if ($this->defaultText !== false) {\n $option = new OptionElement();\n $option->text = $this->defaultText;\n $option->value = $this->defaultValue;\n $str .= $option->render();\n }\n foreach ($this->arrOption as $option) {\n $this->setAutoOptionTitle($option);\n $str .= $option->render();\n }\n\n return $str;\n }", "static function createSelect($input, $name) {\n include $_SERVER[\"DOCUMENT_ROOT\"] . \"/mvdv/core/view/templates/general/form/formelements/select.php\";\n }", "function MakeSelectField($name,$values,$valuenames,$selected=\"\",$disableds=array(),$titles=array(),$title=\"\",$maxlen=0,$noincludedisableds=FALSE,$multiple=FALSE,$onchange=NULL,$options=array())\n{\n return\n $this->Htmls_Select\n (\n $name,$values,$valuenames,$selected,\n array\n (\n \"Disableds\" => $disableds,\n \"Titles\" => $titles,\n \"Title\" => $title,\n \"MaxLen\" => $maxlen,\n \"ExcludeDisableds\" => $noincludedisableds,\n \"Multiple\" => $multiple,\n \"OnChange\" => $onchange,\n ),\n $options\n );\n \n /* $selectedok=FALSE; */\n\n /* $options[ \"NAME\" ]=$name; */\n /* if (!empty($onchange)) { $options[ \"ONCHANGE\" ]=$onchange; } */\n /* if (!empty($title)) { $options[ \"TITLE\" ]=$title; } */\n /* if ($multiple) { $options[ \"MULTIPLE\" ]=\"\"; } */\n\n /* $select=\"\"; */\n /* foreach ($values as $n => $value) */\n /* { */\n /* $valuename=$valuenames[$n]; */\n /* $selectopt=array(); */\n /* if ( */\n /* count($values)==1 */\n /* || */\n /* $this->TestIfSelected($value,$values,$n,$selected) */\n /* ) */\n /* { */\n /* $selectopt[ \"SELECTED\" ]=\"\"; */\n /* $selectedok=TRUE; */\n /* } */\n\n /* $class=\"\"; */\n /* $disabled=FALSE; */\n /* if ( */\n /* !empty($disableds[$n]) */\n /* || */\n /* preg_match('/^disabled$/',$values[$n])) */\n /* { */\n /* $selectopt[ \"DISABLED\" ]=\"\"; */\n /* $values[ $n]=\"\"; */\n /* $class=\"disabled\"; */\n /* $disabled=TRUE; */\n /* } */\n\n /* if (isset($titles[ $n ])) { $selectopt[ \"TITLE\" ]=$titles[ $n ]; } */\n\n /* $valuename=html_entity_decode($valuename,ENT_QUOTES,\"UTF-8\"); */\n /* if ($maxlen>0 && strlen($valuename)>$maxlen) */\n /* { */\n /* $valuename=substr($valuename,0,$maxlen); */\n /* } */\n\n /* if (!$noincludedisableds || !$disabled) */\n /* { */\n /* if (!empty($class)) */\n /* { */\n /* $selectopt[ \"CLASS\" ]=$class; */\n /* } */\n\n /* $selectopt[ \"VALUE\" ]=$values[$n]; */\n /* $select.= */\n /* \" \". */\n /* $this->HtmlTags */\n /* ( */\n /* \"OPTION\", */\n /* $valuename, */\n /* $selectopt */\n /* ).\"\\n\"; */\n\n /* if ($this->Debug>=2) */\n /* { */\n /* $select.=\" [\".$values[$n].\"]\\n\"; */\n /* } */\n /* } */\n /* } */\n\n /* $select=$this->HtmlTags(\"SELECT\",\"\\n\".$select,$options).\"\\n\"; */\n\n /* if (!$selectedok && !empty($selected) && !is_array($selected)) */\n /* { */\n /* $this->AddMsg(\"Warning MakeSelectField: $name, Value: '$selected' undefined\"); */\n /* } */\n\n /* return \"\\n\".$select; */\n}", "function PKG_OptionPageRender2($layout, $client, $package)\n{\n\tinclude(\"/m23/inc/i18n/\".$GLOBALS[\"m23_language\"].\"/m23base.php\");\n\n\t//Language code to add to the variables\n\t$langAdd = ($GLOBALS[\"m23_language\"] == \"en\" ? \"\" : $GLOBALS[\"m23_language\"]);\n\n\tforeach (array_keys($layout) as $var)\n\t{\n\t\t//Get the description by language or if there is no translation in the default language.\n\t\tif (isset($layout[$var][\"description$langAdd\"]{1}))\n\t\t\t$description = PKG_decodeDebconfDescription($layout[$var][\"description$langAdd\"],$title);\n\t\telse\n\t\t\t$description = PKG_decodeDebconfDescription($layout[$var][\"description\"],$title);\n\n\n\t\t//Clean the choices from the last run\n\t\t$selection = array();\n\n\n\t\t//Prepare selection array with choices for (multi)selection\n\t\tif (($layout[$var]['type'] == \"select\") || ($layout[$var]['type'] == \"multiselect\"))\n\t\t{\n\t\t\t//Generate a name for the HTML element\n\t\t\t$htmlName = \"SEL_\".urlencode($var);\n\n\t\t\t//Create the choices array\n\t\t\tfor ($i = 1 ; $i <= count($layout[$var]['choices']); $i++)\n\t\t\t{\n\t\t\t\t//Add the choices to the array with the default language answers as keys\n\t\t\t\t$selection[$layout[$var]['choices'][$i]] = \n\t\t\t\t//Check if there is \n\t\t\t\t\tutf8_decode((isset($layout[$var][\"choices$langAdd\"][$i]) ? $layout[$var][\"choices$langAdd\"][$i] : $layout[$var][\"choices\"][$i]));\n\t\t\t}\n\t\t}\n\n\n\t\t//Try to get the default value from the debconf DB\n\t\tif (($default = CLIENT_getDebconfDBValue($client, $package, $var)) === NULL)\n\t\t\t$default = utf8_decode($layout[$var]['default']);\n\n\n\t\t//If the value is for a multiselect template => Create an array with it\n\t\tif ($layout[$var]['type'] == \"multiselect\")\n\t\t\t$default = explode(', ', $default);\n\n\t\t//Store the type of the element: Needed for showing the debconf via CLIENT_getDebconfDB\n\t\t$debconf[$var]['type'] = $layout[$var]['type'];\n\n\t\t//Show the HTML elements by type\n\t\tswitch($layout[$var]['type'])\n\t\t{\n\t\t\tcase \"select\":\n\t\t\t\t{\n\t\t\t\t\t$debconf[$var]['val'] = HTML_selection($htmlName, $selection, SELTYPE_selection, true, $default);\n\t\t\t\t\tHTML_showTableRow($title.\"<br>\".constant($htmlName),\"&nbsp;&nbsp;\",$description);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\tcase \"multiselect\":\n\t\t\t\t{\n\t\t\t\t\techo(\"<tr>\n\t\t\t\t\t\t\t<td>$title<br>\");\n\t\t\t\t\t\t\t$checkedElements = HTML_multiCheckBoxShow($selection, $default);\n\n\t\t\t\t\t\t\t//Only generate the string containing the checked values, if there are values\n\t\t\t\t\t\t\t$debconf[$var]['val'] = (is_array($checkedElements) ? implode(', ',$checkedElements) : \"\");\n\t\t\t\t\techo(\"\t</td>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t&nbsp;&nbsp;\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t$description\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\tcase \"boolean\":\n\t\t\t\t{\n\t\t\t\t\t//Generate a name for the HTML element\n\t\t\t\t\t$htmlName = \"SEL_\".urlencode($var);\n\n\t\t\t\t\t//Generate yes/no selection\n\t\t\t\t\t$selection['true'] = $I18N_yes;\n\t\t\t\t\t$selection['false'] = $I18N_no;\n\t\t\t\t\t$debconf[$var]['val'] = HTML_selection($htmlName, $selection, SELTYPE_selection, true, $default);\n\t\t\t\t\tHTML_showTableRow($title.\"<br>\".constant($htmlName),\"&nbsp;&nbsp;\",$description);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\tcase \"string\":\n\t\t\tcase \"password\":\n\t\t\t\t{\n\t\t\t\t\t//Generate a name for the HTML element\n\t\t\t\t\t$htmlName = \"ED_\".urlencode($var);\n\n\t\t\t\t\t$debconf[$var]['val'] = HTML_input($htmlName, $default, 50);\n\t\t\t\t\tHTML_showTableRow($title.\"<br>\".constant($htmlName),\"&nbsp;&nbsp;\",$description);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\tdefault:\n\t\t\t\t{\n\t\t\t\t\t//Remove entries form not supported type (e.g. \"title\")\n\t\t\t\t\tunset($debconf[$var]);\n\t\t\t\t}\n\t\t}\n\t}\n\n\treturn($debconf);\n}", "public function render()\n {\n $fromList = array();\n $this->getFromList($fromList);\n $value = $this->getValue()!==null?$this->getValue():$this->getDefaultValue();\n $valueArray = explode(',', $value);\n \n $disabledStr = ($this->getEnabled() == \"N\") ? \"DISABLED=\\\"true\\\"\" : \"\";\n $style = $this->getStyle();\n $func = $this->getFunction();\n\n //$sHTML = \"<SELECT NAME=\\\"\" . $this->objectName . \"[]\\\" ID=\\\"\" . $this->objectName .\"\\\" $disabledStr $this->htmlAttr $style $func>\";\n $sHTML = \"<SELECT NAME=\\\"\" . $this->objectName . \"\\\" ID=\\\"\" . $this->objectName .\"\\\" $disabledStr $this->htmlAttr $style $func>\";\n\n if ($this->blankOption) // ADD a blank option\n {\n $entry = explode(\",\",$this->blankOption);\n $text = $entry[0];\n $value = ($entry[1]!= \"\") ? $entry[1] : null;\n $entryList = array(array(\"val\" => $value, \"txt\" => $text ));\n $fromList = array_merge($entryList, $fromList);\n }\n\n $defaultValue = null;\n foreach ($fromList as $option)\n {\n $test = array_search($option['val'], $valueArray);\n if ($test === false)\n {\n $selectedStr = '';\n }\n else\n {\n $selectedStr = \"SELECTED\";\n $defaultValue = $option['val']; \n }\n $sHTML .= \"<OPTION VALUE=\\\"\" . $option['val'] . \"\\\" $selectedStr>\" . $option['txt'] . \"</OPTION>\";\n }\n if($defaultValue == null){\n \t$defaultOpt = array_shift($fromList);\n \t$defaultValue = $defaultOpt['val'];\n \tarray_unshift($fromList,$defaultOpt);\n }\n \n \n $this->setValue($defaultValue);\n $sHTML .= \"</SELECT>\";\n return $sHTML;\n }", "public function render_options_page() {\r\n\r\n\t\tinclude( Views::load_view( TBSC_OPTIONS_PLUGIN_DIR . 'src/views/options-page/options-page.php' ) );\r\n\r\n\t}", "public function render($echo = true)\n {\n //if it is not an array , search the backend for the select options\n if (!is_array($this->_field['options'])) {\n $this->load_select_options($this->_field['options']);\n }\n\n $option = '<select class=\"font-select\">';\n\n if (isset($this->_field['blank'])) {\n $option .= '<option value=\"\">' . $this->_field['blank'] . '</option>';\n }\n\n $option .= $this->create_select_options($this->_field['options'], $this->_value);\n\n $option .= '</select>';\n\n // add hidden option that stores all the field\n $option .= '<input type=\"hidden\"' . $this->create_attributes() . ' />';\n $option .= '<div class=\"oxy-checkbox-list\"></div>';\n $option .= '<div class=\"oxy-checkbox-list\"></div>';\n\n if ($echo) {\n echo $option;\n } else {\n return $option;\n }\n }", "function select_tag($name, $options, array $attributes = array())\r\n{\r\n $attributes['name'] = isset($attributes['multiple']) && $attributes['multiple'] === true ? $name.'[]' : $name;\r\n $attributes['id'] = @$attributes['id'] ?: $name;\r\n\r\n if (isset($attributes['include_blank'])) {\r\n $include_blank = array_take($attributes, 'include_blank');\r\n\r\n if ($include_blank) {\r\n $options = tag('option', array(), '').$options;\r\n }\r\n }\r\n\r\n return tag('select', $attributes, $options);\r\n}", "function create_options( $field )\n\t{\n\t\t// defaults?\n\t\t/*\n\t\t$field = array_merge($this->defaults, $field);\n\t\t*/\n\t\t\n\t\t\n\t\t$field['character_number'] = isset($field['character_number']) ? $field['character_number'] : '';\n\t\t\n\t\t?>\n\t\t<tr class=\"field_option field_option_<?php echo $this->name; ?>\">\n\t\t\t<td class=\"label\">\n\t\t\t\t<label><?php _e(\"Number of characters\",'acf'); ?></label>\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t<?php \n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif($field['character_number'] == \"\"){\n\t\t\t\t\t\n\t\t\t\t\t$field['character_number'] = 150;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t\t\tdo_action('acf/create_field', array(\n\t\t\t\t\t\t\t'type'\t=>\t'text',\n\t\t\t\t\t\t\t'name'\t=>\t'fields['.$field['name'].'][character_number]',\n\t\t\t\t\t\t\t'value'\t=>\t$field['character_number']\n\t\t\t\t));\n\t\t\n\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t?>\n\t\t\t</td>\n\t\t</tr>\n\n<!--\n\t\t<tr class=\"field_option field_option_file\">\n\t\t\t<td class=\"label\">\n\t\t\t\t<label>Choice</label>\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t<ul class=\"radio_list radio horizontal\"><li><label><input id=\"acf-field_5_save_format-object\" type=\"radio\" name=\"fields[field_5][save_format]\" value=\"object\">File Object</label></li><li><label><input id=\"acf-field_5_save_format-url\" type=\"radio\" name=\"fields[field_5][save_format]\" value=\"url\">File URL</label></li><li><label><input id=\"acf-field_5_save_format-id\" type=\"radio\" name=\"fields[field_5][save_format]\" value=\"id\" checked=\"checked\" data-checked=\"checked\">File ID</label></li></ul>\t\t\t</td>\n\t\t</tr>\t\n-->\t\n\t\t\n\t\t<?php\n\t\t\n\t\t\n\n\t\t\n\n\t\t\n\t}", "private function build_select_field($_meta, $_ptype = \"wccpf\", $_class = \"\", $_index, $_show_as_value = \"no\", $_readonly = \"\", $_cloneable = \"\", $_wrapper = true, $_has_pricing_rules = \"no\") {\r\n $html = ''; \r\n $has_field_rules = isset( $_meta[\"field_rules\"] ) && is_array( $_meta[\"field_rules\"] ) && count( $_meta[\"field_rules\"] ) != 0 ? \"yes\" : \"no\";\r\n if ($_show_as_value == \"no\") {\r\n $html = '<select data-has_field_rules=\"'.$has_field_rules.'\" data-has_pricing_rules=\"'.$_has_pricing_rules.'\" data-fkey=\"'. $_meta[\"key\"] .'\" class=\"' . $_ptype . '-field ' . $_class . '\" name=\"' . esc_attr($_meta[\"key\"] . $_index) . '\" data-field-type=\"'. $_meta[\"type\"] .'\" ' . $_ptype . '-pattern=\"mandatory\" ' . $_ptype . '-mandatory=\"' . $_meta[\"required\"] . '\" ' . $_cloneable . ' ' . $_readonly . ' >';\r\n \r\n $choices = explode(\";\", ((isset($_meta[\"choices\"]) && ! empty($_meta[\"choices\"])) ? $_meta[\"choices\"] : \"\"));\r\n $_meta[\"default_value\"] = (isset($_meta[\"default_value\"]) && ! empty($_meta[\"default_value\"])) ? trim($_meta[\"default_value\"]) : \"\";\r\n \r\n /* Placeholder option */\r\n if (isset($_meta[\"placeholder\"]) && !empty($_meta[\"placeholder\"])) {\r\n $html .= '<option value=\"wccpf_none\">' . esc_html($_meta[\"placeholder\"]) . '</option>';\r\n }\r\n $choices = apply_filters( \"wcff_select_option_before_rendering\", $choices, $_meta[\"key\"] );\r\n foreach ($choices as $choice) {\r\n $attr = '';\r\n $key_val = explode(\"|\", $choice);\r\n /* It has to be two items ( Value => Label ), otherwise don't proceed */\r\n if (count($key_val) == 2) {\r\n if ($_ptype != \"wccaf\") {\r\n /* Since version 2.0.0 - Default value will be absolute value, not as key|val pair */\r\n if (strpos($_meta[\"default_value\"], \"|\") !== false) {\r\n /* Compatibility for <= V 1.4.0 */\r\n if ($choice == $_meta[\"default_value\"]) {\r\n $attr = 'selected';\r\n }\r\n } else {\r\n /*\r\n * For product fields from V 2.0.0\r\n * For admin fields, which will be displyed as Product Fields\r\n */\r\n if (trim($key_val[0]) == $_meta[\"default_value\"]) {\r\n $attr = 'selected';\r\n }\r\n }\r\n } else {\r\n if ($key_val[0] == $_meta[\"value\"]) {\r\n $attr = 'selected';\r\n }\r\n }\r\n $html .= '<option value=\"' . esc_attr(trim($key_val[0])) . '\" ' . $attr . '>' . esc_html(trim($key_val[1])) . '</option>';\r\n }\r\n }\r\n $html .= '</select>';\r\n } else {\r\n /*\r\n * Show the raw value instead of as a field\r\n * Used for the Admin Field showing on product page\r\n */\r\n $html = '<p class=\"wcff-wccaf-value-para-tag\">' . $_meta[\"default_value\"] . '</p>';\r\n }\r\n /* Add wrapper around the field, based on the user options */\r\n if ($_wrapper) {\r\n $html = $this->built_field_wrapper($html, $_meta, $_ptype, $_index);\r\n }\r\n return $html;\r\n }", "public function select ($attrs, $array, $opts=[])\n { // Let's build our select structure.\n $select = new \\SimpleXMLElement('<select/>');\n if (is_string($attrs))\n {\n $attrs = ['name'=>$attrs];\n }\n if \n (\n isset($opts['id']) && $opts['id'] \n && !isset($attrs['id']) && isset($attrs['name'])\n )\n {\n $attrs['id'] = $attrs['name'];\n }\n\n // See if we're using bitmasks for the selected values.\n if (isset($opts['mask']))\n $is_mask = $opts['mask'];\n else\n $is_mask = False;\n\n // Check for a selected option.\n if (isset($opts['selected']))\n {\n $selected = $opts['selected'];\n\n if (is_array($selected))\n {\n // Get an identifier we can use.\n if (isset($attrs['id']))\n {\n $identifier = $attrs['id'];\n }\n elseif (isset($attrs['name']))\n {\n $identifier = $attrs['name'];\n }\n else\n {\n $identifier = Null;\n }\n if (isset($identifier) && isset($selected[$identifier]))\n {\n $selected = $selected[$identifier];\n }\n }\n }\n else\n {\n $selected = Null;\n }\n\n // Check for a 'ns' option to override translation prefix.\n if (isset($opts['ns']))\n {\n $prefix = $opts['ns'];\n }\n else\n {\n $prefix = '';\n }\n\n // Check for a 'ttns' option, specifying a tooltip translation prefix.\n if (isset($opts['ttns']))\n {\n $ttns = $opts['ttns'];\n }\n else\n {\n $ttns = null;\n }\n\n // For processing complex entities.\n if (isset($opts['labelkey']))\n {\n $label_key = $opts['labelkey'];\n }\n else\n {\n $label_key = 'text';\n }\n if (isset($opts['valuekey']))\n {\n $value_key = $opts['valuekey'];\n }\n else\n {\n $value_key = 'id';\n }\n\n // Add attributes.\n foreach ($attrs as $aname=>$aval)\n {\n $select->addAttribute($aname, $aval);\n }\n\n if (isset($opts['translate']))\n {\n $translate = $opts['translate'] && isset($this->translate);\n }\n else\n {\n $translate = isset($this->translate);\n }\n\n // Used only if translation service is enabled.\n $tooltips = [];\n\n // Add options, with potential translation processing.\n if ($translate)\n {\n $array = $this->translate->strArray($array, $prefix);\n if (isset($ttns))\n {\n $tooltips = $this->translate->strArray($array, $ttns);\n }\n }\n foreach ($array as $value=>$label)\n {\n if (isset($tooltips[$value]) && $tooltips[$value] != $value)\n {\n $tooltip = $tooltips[$value];\n }\n else\n {\n $tooltip = null;\n }\n\n if (is_array($label))\n { // Process complex entries.\n if (isset($label[$value_key]))\n $value = $label[$value_key];\n if (isset($label[$label_key]))\n $label = $label[$label_key];\n }\n\n $option = $select->addChild('option', $label);\n $option->addAttribute('value', $value);\n if (isset($tooltip))\n {\n $option->addAttribute('title', $tooltip);\n }\n if \n (\n isset($selected)\n &&\n (\n ($is_mask && ($value & $selected))\n ||\n ($value == $selected)\n )\n )\n {\n $option->addAttribute('selected', 'selected');\n }\n }\n $html = $this->return_value($select, $opts);\n if (substr(trim($html), -2) == '/>')\n {\n $html = substr_replace(trim($html), '></select>', -2);\n# error_log(\"Correcting singleton select HTML: $html\");\n }\n return $html;\n }", "function optionsframework_options() {\n\n\t$options = array();\n\t\n\t//GENERAL\t\n\t$options[] = array(\n\t\t\"name\" \t=> __('General', 'wpex'),\n\t\t\"type\" \t=> 'heading',\n\t);\n\t\t\n\t$options[] = array(\n\t\t\"name\" \t=> __('Custom Logo', 'wpex'),\n\t\t\"desc\" \t=> __('Upload your custom logo.', 'wpex'),\n\t\t\"std\" \t=> '',\n\t\t\"id\" \t=> 'custom_logo',\n\t\t\"type\" \t=> 'upload',\n\t);\n\t\n\t$options[] = array(\n\t\t\"name\" \t=> __('Notification Bar', 'att'),\n\t\t\"desc\" \t=> __('Enter your text for the notification bar.', 'att'),\n\t\t\"std\" \t=> 'This is your notification bar...you can <a href=\"#\">add a link here &rarr;</a> if you want.',\n\t\t\"id\" \t=> 'notification',\n\t\t\"type\" \t=> 'textarea',\n\t);\n\t\n\t$options[] = array(\n\t\t\"name\" \t=> __('Custom Excerpt Lenght', 'wpex'),\n\t\t\"desc\" \t=> __('Enter your desired custom excerpt length.', 'wpex'),\n\t\t\"id\" \t=> 'excerpt_length',\n\t\t\"std\" \t=> '17',\n\t\t\"type\" \t=> 'text'\n\t);\n\t\t\n\t$options[] = array(\n\t\t\"name\" \t=> __('AJAX Loading Instead of Pagination?', 'wpex'),\n\t\t\"desc\" \t=> __('Check box to enable the load more button rather then generic 1,2,3 pagination.', 'wpex'),\n\t\t\"id\" \t=> 'ajax_loading',\n\t\t\"std\" \t=> '1',\n\t\t\"type\" \t=> 'checkbox',\n\t);\n\t\t\n\t$options[] = array(\n\t\t\"name\" \t=> __('Custom WP Gallery?', 'wpex'),\n\t\t\"desc\" \t=> __('This theme outputs a custom gallery style for the WordPress shortcode, if you don\\'t like it or are using a plugin for this you can unselect the custom functionality here.', 'wpex'),\n\t\t\"id\" \t=> 'custom_wp_gallery',\n\t\t\"std\" \t=> '1',\n\t\t\"type\" \t=> 'checkbox'\n\t);\n\t\t\n\t$options[] = array(\n\t\t\"name\" \t=> __('Enable Retina Support', 'wpex'),\n\t\t\"desc\"\t=> __('Check this box to enable retina support for featured images. If enabled for every cropped featured image the theme will create a second one that is retina optimized. So keep disabled to save server space.', 'wpex'),\n\t\t\"id\"\t=> 'enable_retina',\n\t\t\"std\"\t=> '0',\n\t\t\"type\"\t=> 'checkbox'\n\t);\n\t\n\t$options[] = array(\n\t\t\"name\" \t=> __('Featured Images For Single Posts', 'wpex'),\n\t\t\"desc\"\t=> __('Check this box to enable the display of featured images in single posts.', 'wpex'),\n\t\t\"id\"\t=> 'single_thumb',\n\t\t\"std\"\t=> '1',\n\t\t\"type\"\t=> 'checkbox'\n\t);\n\t\t\n\t\n\t//HOMEPAGE\t\n\t$options[] = array(\n\t\t\"name\" \t=> __('Home', 'wpex'),\n\t\t\"type\" \t=> 'heading',\n\t);\t\n\t\t\n\t$options[] = array(\n\t\t\"name\" \t=> __('Homepage Content', 'att'),\n\t\t\"desc\" \t=> __('Use this field to add content to your homepage area right below the main slider (or instead of the slider if you aren\\'t using it) and right above the latest posts.', 'att'),\n\t\t\"std\" \t=> '',\n\t\t\"id\" \t=> 'homepage_content',\n\t\t\"type\" \t=> 'editor',\n\t);\n\t\t\t\n\t\t\n\t//Slider\n\t$options[] = array(\n\t\t\"name\" \t=> __('Slides', 'att'),\n\t\t\"type\" \t=> 'heading',\n\t);\n\t\t\t\n\t\tif ( class_exists( 'Symple_Slides_Post_Type' ) ) {\n\t\t\t\t\n\t\t\t$options[] = array(\n\t\t\t\t\"name\" \t\t=> __('Toggle: Slideshow', 'att'),\n\t\t\t\t\"desc\" \t\t=> __('Check this box to enable automatic slideshow for your slides.', 'att'),\n\t\t\t\t\"id\" \t\t=> \"slides_slideshow\",\n\t\t\t\t\"std\" \t\t=> \"true\",\n\t\t\t\t\"type\" \t\t=> \"select\",\n\t\t\t\t\"options\" \t=> array(\n\t\t\t\t\t'true' \t\t=> 'true',\n\t\t\t\t\t'false' \t=> 'false'\n\t\t\t) );\n\t\t\t\t\n\t\t\t$options[] = array(\n\t\t\t\t\"name\" \t\t=> __('Toggle: Randomize', 'att'),\n\t\t\t\t\"desc\" \t\t=> __('Check this box to enable the randomize feature for your slides.', 'att'),\n\t\t\t\t\"id\" \t\t=> \"slides_randomize\",\n\t\t\t\t\"std\" \t\t=> \"false\",\n\t\t\t\t\"type\" \t\t=> \"select\",\n\t\t\t\t\"options\" \t=> array(\n\t\t\t\t\t'true' \t\t=> 'true',\n\t\t\t\t\t'false' \t=> 'false'\n\t\t\t) );\n\t\t\t\t\n\t\t\t$options[] = array(\n\t\t\t\t\"name\" \t\t=> __('Animation', 'att'),\n\t\t\t\t\"desc\" \t\t=> __('Select your animation of choice.', 'att'),\n\t\t\t\t\"id\" \t\t=> \"slides_animation\",\n\t\t\t\t\"std\" \t\t=> \"slide\",\n\t\t\t\t\"type\" \t\t=> \"select\",\n\t\t\t\t\"options\" \t=> array(\n\t\t\t\t\t'fade' \t\t=> 'fade',\n\t\t\t\t\t'slide' \t=> 'slide'\n\t\t\t) );\n\t\t\t\t\n\t\t\t$options[] = array(\n\t\t\t\t\"name\" \t\t=> __('Direction', 'att'),\n\t\t\t\t\"desc\" \t\t=> __('Select the direction for your slides. Slide animation only & if using the <strong>vertical direction</strong> all slides must have the same height.', 'att'),\n\t\t\t\t\"id\" \t\t=> \"slides_direction\",\n\t\t\t\t\"std\" \t\t=> \"horizontal\",\n\t\t\t\t\"type\" \t\t=> \"select\",\n\t\t\t\t\"options\" \t=> array(\n\t\t\t\t\t'horizontal' \t=> 'horizontal',\n\t\t\t\t\t'vertical' \t\t=> 'vertical'\n\t\t\t) );\n\t\t\t\t\n\t\t\t$options[] = array(\n\t\t\t\t\"name\" \t=> __('SlideShow Speed', 'att'),\n\t\t\t\t\"desc\" \t=> __('Enter your preferred slideshow speed in milliseconds.', 'att'),\n\t\t\t\t\"id\" \t=> \"slideshow_speed\",\n\t\t\t\t\"std\" \t=> \"7000\",\n\t\t\t\t\"type\" \t=> \"text\",\n\t\t\t);\n\t\t\t\t\n\t\t\t$options[] = array(\n\t\t\t\t\"name\" \t=> __('Animation Speed', 'att'),\n\t\t\t\t\"desc\" \t=> __('Enter your preferred animation speed in milliseconds.', 'att'),\n\t\t\t\t\"id\" \t=> \"animation_speed\",\n\t\t\t\t\"std\" \t=> \"600\",\n\t\t\t\t\"type\" \t=> \"text\",\n\t\t\t);\n\t\t}\n\t\t\t\n\t\t$options[] = array(\n\t\t\t\"name\" \t=> __('Slider Alternative', 'att'),\n\t\t\t\"desc\" \t=> __('If you prefer to use another slider you can enter the <strong>shortcode</strong> here.', 'att'),\n\t\t\t\"id\" \t=> \"slides_alt\",\n\t\t\t\"std\" \t=> \"\",\n\t\t\t\"type\" \t=> \"textarea\",\n\t\t);\n\n\treturn $options;\n}", "private function renderSelect(): string\n {\n $str = '<select'.($this->id ? ' id=\"'.$this->getId().'\"' : '').($this->name ? ' name=\"'.$this->name.'\"' : '');\n if ($this->multiple) {\n $str .= ' multiple=\"multiple\"';\n }\n if ($this->size > 1) {\n $str .= ' size=\"'.$this->size.'\"';\n }\n if ($this->disabled) {\n $str .= ' disabled=\"disabled\"';\n }\n if ($this->tabIndex) {\n $str .= ' tabindex=\"'.$this->tabIndex.'\"';\n }\n $str .= $this->renderCssClass();\n if ($this->required) {\n $str .= ' required=\"required\"';\n }\n $str .= '>';\n\n return $str;\n }", "public static function options($options)\n {\n $group = Request::post('group')??null;\n if (file_exists('themes/'.$options)) {\n echo '<form id=\"theme_options_form\" class=\"g-form\"><input id=\"theme_id\" value=\"'.$options.'\" type=\"hidden\">';\n $pack = $options;\n if (file_exists('themes/'.$options.'/package.json')) {\n $pac=json_decode(file_get_contents('themes/'.$options.'/package.json'), true);\n $options=$pac['options'];\n } else {\n include 'themes/'.$options.'/package.php';\n }\n if (is_array($options)) {\n Config::loadOptions();\n $optionList = [];\n foreach ($options as $key=>$op) {\n if ($group===null || $op['group']===$group ||\n (is_array($op['group']) && in_array($group, $op['group']))) {\n $values[$key] = Config::get('theme.'.$key);\n $optionList[$key] = $op;\n }\n }\n echo Form::html($optionList, $values, 'option[', ']');\n }// else error alert\n echo \"</form>\";\n exit;\n }\n exit;\n }", "public function createSelectOptions($options){\r\n\t\t$optionText = '';\r\n\t\tif(sizeof($options) >0){\t\r\n\t\t\tforeach($options as $key=>$option){\r\n\t\t\t\t$optionText .= '<option ';\r\n \t\t\t\tforeach($option as $sleKey=>$selOption) \r\n \t\t\t\t\t$optionText .= $sleKey.'=\"'.$selOption.'\" ';\r\n \t\t\t\t$optionText .= '>'.$key.'</option>';\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $optionText;\r\n\t}", "public function renderLanguageSelect() {}", "function cmh_add_options_page() {\r\n\tadd_options_page('Correct My Headings Options Page', 'Correct My Headings', 'manage_options', __FILE__, 'cmh_render_form');\r\n}", "function mgl_instagram_print_select($options, $selectedOption, $fieldId, $fieldName, $emptyOption = false, $withKey = true)\n{\n // Set empty option message if $emptyOption is a string\n $emptyOption = (!$emptyOption) ? 'Select Instagram gallery type' : $emptyOption;\n ?>\n\n <select class=\"widefat mgl_instagram_gallery_widget_type_selector\" id=\"<?php echo $fieldId; ?>\"\n name=\"<?php echo $fieldName; ?>\">\n <option value=\"none\"><?php _e($emptyOption); ?></option>\n <?php\n if ($withKey) {\n // Print dropdown options with key as option value if $withKey is true\n foreach ($options as $key => $option) {\n // Get the option name to be shown on the dropdown option\n $option = (is_array($option)) ? $option['name'] : $option;\n // Check if it is the current selected option\n $selected = ($key == $selectedOption) ? ' selected=\"selected\"' : '';\n // Render the dropdown option\n echo '<option' . $selected . ' value=\"' . $key . '\">' . $option . '</option>';\n }\n } else {\n // Print dropdown option using array value as option value and option name\n foreach ($options as $option) {\n // Check if option is selected\n $selected = ($option == $selectedOption) ? ' selected=\"selected\"' : '';\n // Render dropdown option\n echo '<option' . $selected . ' value=\"' . $option . '\">' . $option . '</option>';\n }\n }\n ?>\n </select>\n <?php\n}", "public function generate_meta_dropdown( $field_key, $first_option, $options ) {\n\n\t\t$html = '';\n\t\t$html .= sprintf( '<select name=\"%s\" id=\"filter-by-%s\">', $field_key, $field_key );\n\t\t$html .= sprintf( '<option value=\"\">%s</option>', $first_option );\n\t\t$get_field_key = filter_input( INPUT_GET, $field_key, FILTER_SANITIZE_STRING );\n\t\tforeach ( $options as $key => $value ) {\n\n\t\t\t$selected = selected( $get_field_key, $key, false );\n\t\t\t$html .= sprintf( '<option value=\"%s\" %s>%s</option>', $key, $selected, $value );\n\t\t}\n\t\t$html .= '</select>';\n\n\t\treturn $html;\n\t}", "function initialize () {\n $this->set_openingtag(\"<OPTION[attributes]>\");\n\t$this->set_closingtag(\"</OPTION>\");\n }", "function creditcard_type_pulldown($selected = '', $fieldname = 'form[type]')\n {\n $html = '<select name=\"' . $fieldname . '\" style=\"font-family: Verdana\">';\n $html .= '<option value=\"visa\"';\n if ($selected == 'visa')\n {\n $html .= ' selected=\"selected\"';\n }\n $html .= '>Visa</option>';\n $html .= '<option value=\"mc\"';\n if ($selected == 'mc')\n {\n $html .= ' selected=\"selected\"';\n }\n $html .= '>Mastercard</option>';\n $html .= '<option value=\"amex\"';\n if ($selected == 'amex')\n {\n $html .= ' selected=\"selected\"';\n }\n $html .= '>American Express</option>';\n $html .= '<option value=\"disc\"';\n if ($selected == 'disc')\n {\n $html .= ' selected=\"selected\"';\n }\n $html .= '>Discover</option>';\n $html .= '</select>';\n return $html;\n }", "public function smtp_secure_select( $args ) {\n $field_id = $args['label_for'];\n $options = $args['options'];\n $value = get_option( $field_id, $args['default'] );\n \n printf( \"<select name='%s' id='%s'>\", $field_id, $field_id );\n\n foreach ( $options as $option ) {\n $selected = '';\n\n if ( $value == $option ) {\n $selected = 'selected';\n }\n\n printf( \"<option value=%s %s>%s</option>\", $option, $selected, $option );\n }\n \n printf( \"</select>\" );\n }", "protected function get_options()\n\t{}", "function cmdCustType($name, $caption) {\n $optcust_type = array\n (\n array(\"\", \"\"),\n array(\"End User\", \"1\"),\n array(\"Dealer / Reseller\", \"2\"),\n array(\"Goverment / BUMN\", \"3\"),\n );\n ?>\n <tr>\n <td><?php getCaption($caption); ?> :</td>\n <td>\n <select class=\"easyui-combobox\"\n id=\"<?php echo $name; ?>\"\n name=\"<?php echo $name; ?>\"\n style=\"width:120px;\"\n data-options=\"panelHeight:100,editable:false,width:200\"\n disabled=true\n >\n <?php\n foreach ($optcust_type as $val) {\n echo '<option value=\"' . $val[1] . '\">' . $val[0] . '</option>';\n }\n ?>\n </select>\n </td>\n </tr>\n <?php\n}", "function getSelect($label, $name, $id, $options) {\r\n $return .= $this->getLabel($label, $id, $true);\r\n $return .= \"<select name='\".$name.\"' id='\".$id.\"'>\";\r\n if($this->getConfigurationValue($name) AND !$value){\r\n $value = $this->getConfigurationValue($name);\r\n }elseif($_POST[$name]){\r\n $data = $this->getFormData(array($name));\r\n $value = $data[$name];\r\n } \r\n foreach($options as $key=>$option){\r\n $selected = \"\";\r\n if($option==$value) $selected=\" selected='selected'\";\r\n $return .= \"<option value='\".$option.\"'\".$selected.\">\".$option.\"</option>\"; \r\n }\r\n $return .= \"</select>\";\r\n return $return;\r\n }", "public function form()\r\n {\r\n $this->switch('field_select_create', Support::trans('main.select_create'))\r\n ->default(admin_setting('field_select_create'));\r\n }", "public function optionsdemo_field_callback( $field ) {\n\t\t\t$option_name = $field['option_name'];\n\t\t\t$option = get_option( $option_name );\n\t\t\t$value = isset( $option[ $field['id'] ] ) ? $option[ $field['id'] ] : '';\n\t\t\t\n\t\t\tswitch ( $field['type'] ) {\n\t\t\t\t\n\t\t\t\tcase 'file':\n\t\t\t\t\t\n\t\t\t\t\techo '<div class=\"optionsdemo-warp\">';\n\t\t\t\t\tprintf( '<input id=\"%1$s-%2$s\" type=\"text\" class=\"optionsdemo-input\" name=\"%1$s[%2$s]\" value=\"%3$s\"/>',\n\t\t\t\t\t\t$option_name,\n\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t$value\n\t\t\t\t\t);\n\t\t\t\t\tprintf( '<input type=\"button\" class=\"button-primary optionsdemo-btn \" value=\"Insert Image\"/>' );\n\t\t\t\t\t\n\t\t\t\t\techo '</div>';\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// Multiple select render\n\t\t\t\tcase 'multiple':\n\t\t\t\t\t\n\t\t\t\t\t$countries = $field['countries'];\n\t\t\t\t\t\n\t\t\t\t\tprintf( '<select id=\"%1$s-%2$s\" name=\"%1$s[%2$s][]\" multiple=\"%3$s\">',\n\t\t\t\t\t\t$option_name,\n\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t$field['type']\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\tforeach ( $countries as $key => $country ) {\n\t\t\t\t\t\t$selected = '';\n\t\t\t\t\t\tif ( is_array( $value ) && in_array( $key, $value ) ) {\n\t\t\t\t\t\t\t$selected = 'selected';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tprintf( '<option value=\"%1$s\" %2$s >%3$s</option>',\n\t\t\t\t\t\t\t$key,\n\t\t\t\t\t\t\t$selected,\n\t\t\t\t\t\t\t$country\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\techo \"</select>\";\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t// Select filed render\n\t\t\t\tcase 'select':\n\t\t\t\t\t\n\t\t\t\t\t$countries = $field['countries'];\n\t\t\t\t\tprintf( '<select id=\"%1$s-%2$s\" name=\"%1$s[%2$s]\">',\n\t\t\t\t\t\t$option_name,\n\t\t\t\t\t\t$field['id']\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\tforeach ( $countries as $country ) {\n\t\t\t\t\t\t$selected = '';\n\t\t\t\t\t\tif ( $value == $country ) {\n\t\t\t\t\t\t\t$selected = 'selected';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tprintf( '<option value=\"%1$s\" %2$s >%3$s</option>',\n\t\t\t\t\t\t\t$country,\n\t\t\t\t\t\t\t$selected,\n\t\t\t\t\t\t\t$country\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t// Radio filed render\n\t\t\t\tcase 'radio':\n\t\t\t\t\t\n\t\t\t\t\t$conditions = $field['conditions'];\n\t\t\t\t\t\n\t\t\t\t\tforeach ( $conditions as $condition ) {\n\t\t\t\t\t\t$selected = '';\n\t\t\t\t\t\tif ( $value == $condition ) {\n\t\t\t\t\t\t\t$selected = 'checked';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tprintf( '<input id=\"%1$s-%2$s\" name=\"%1$s[%2$s]\" type=\"%3$s\" value=\"%4$s\" %5$s />%6$s<br>',\n\t\t\t\t\t\t\t$option_name,\n\t\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t\t$field['type'],\n\t\t\t\t\t\t\t$condition,\n\t\t\t\t\t\t\t$selected,\n\t\t\t\t\t\t\t$condition\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tcase 'checkbox':\n\t\t\t\t\t\n\t\t\t\t\t$countries = $field['countries'];\n\t\t\t\t\t\n\t\t\t\t\tforeach ( $countries as $key => $country ) {\n\t\t\t\t\t\t$checked = '';\n\t\t\t\t\t\tif ( is_array( $value ) && in_array( $key, $value ) ) {\n\t\t\t\t\t\t\t$checked = 'checked';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tprintf( '<input id=\"%1$s-%2$s\" name=\"%1$s[%2$s][%4$s]\" type=\"%3$s\" value=\"%4$s\" %5$s />%6$s<br>',\n\t\t\t\t\t\t\t$option_name,\n\t\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t\t$field['type'],\n\t\t\t\t\t\t\t$key,\n\t\t\t\t\t\t\t$checked,\n\t\t\t\t\t\t\t$country,\n\t\t\t\t\t\t\t$value\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tcase 'textarea':\n\t\t\t\t\t\n\t\t\t\t\tprintf( '<textarea name=\"%1$s[%2$s]\" id=\"%1$s-%2$s\" placeholder=\"%3$s\" rows=\"5\" cols=\"50\">%4$s</textarea>',\n\t\t\t\t\t\t$option_name,\n\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\tisset( $field['placeholder'] ) ? $field['placeholder'] : '',\n\t\t\t\t\t\t$value\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tcase 'url':\n\t\t\t\t\t\n\t\t\t\t\tprintf( '<input name=\"%1$s[%2$s]\" id=\"%1$s-%2$s\" type=\"%3$s\" placeholder=\"%4$s\" value=\"%5$s\"/>',\n\t\t\t\t\t\t$option_name,\n\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t$field['type'],\n\t\t\t\t\t\tisset( $field['placeholder'] ) ? $field['placeholder'] : '',\n\t\t\t\t\t\t$value\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'number':\n\t\t\t\t\t\n\t\t\t\t\tprintf( '<input name=\"%1$s[%2$s]\" id=\"%1$s-%2$s\" type=\"%3$s\" placeholder=\"%4$s\" value=\"%5$s\" min=\"%6$s\" max=\"%7$s\"/>',\n\t\t\t\t\t\t$option_name,\n\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t$field['type'],\n\t\t\t\t\t\tisset( $field['placeholder'] ) ? $field['placeholder'] : '',\n\t\t\t\t\t\t$value,\n\t\t\t\t\t\t$field['min'],\n\t\t\t\t\t\t$field['max']\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'password':\n\t\t\t\t\t\n\t\t\t\t\tprintf( '<input name=\"%1$s[%2$s]\" id=\"%1$s-%2$s\" type=\"%3$s\" placeholder=\"%4$s\" value=\"%5$s\"/>',\n\t\t\t\t\t\t$option_name,\n\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t$field['type'],\n\t\t\t\t\t\tisset( $field['placeholder'] ) ? $field['placeholder'] : '',\n\t\t\t\t\t\t$value\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'email':\n\t\t\t\t\t\n\t\t\t\t\tprintf( '<input name=\"%1$s[%2$s]\" id=\"%1$s-%2$s\" type=\"%3$s\" placeholder=\"%4$s\" value=\"%5$s\"/>',\n\t\t\t\t\t\t$option_name,\n\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t$field['type'],\n\t\t\t\t\t\tisset( $field['placeholder'] ) ? $field['placeholder'] : '',\n\t\t\t\t\t\t$value\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t\t\n\t\t\t\t\tprintf( '<input name=\"%1$s[%2$s]\" id=\"%1$s-%2$s\" type=\"%3$s\" placeholder=\"%4$s\" value=\"%5$s\"/>',\n\t\t\t\t\t\t$option_name,\n\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t$field['type'],\n\t\t\t\t\t\tisset( $field['placeholder'] ) ? $field['placeholder'] : '',\n\t\t\t\t\t\t$value\n\t\t\t\t\t);\n\t\t\t}\n\t\t\t//End Switch case\n\t\t}", "function barnelli_wp_select( $field ) {\n\tglobal $thepostid, $post, $vision;\n\n\t$thepostid \t\t\t\t= empty( $thepostid ) ? $post->ID : $thepostid;\n\t$field['class'] \t\t= isset( $field['class'] ) ? $field['class'] : 'select short';\n\t$field['wrapper_class'] = isset( $field['wrapper_class'] ) ? $field['wrapper_class'] : '';\n\t$field['value'] \t\t= isset( $field['value'] ) ? $field['value'] : get_post_meta( $thepostid, $field['id'], true );\n\n\techo '<p class=\"form-field ' . esc_attr( $field['id'] ) . '_field ' . esc_attr( $field['wrapper_class'] ) . '\"><label for=\"' . esc_attr( $field['id'] ) . '\">' . wp_kses_post( $field['label'] ) . '</label><select id=\"' . esc_attr( $field['id'] ) . '\" name=\"' . esc_attr( $field['id'] ) . '\" class=\"' . esc_attr( $field['class'] ) . '\">';\n\n\tforeach ( $field['options'] as $key => $value ) {\n\n\t\techo '<option value=\"' . esc_attr( $key ) . '\" ' . selected( esc_attr( $field['value'] ), esc_attr( $key ), false ) . '>' . esc_html( $value ) . '</option>';\n\n\t}\n\n\techo '</select> ';\n\n\tif ( ! empty( $field['description'] ) ) {\n\n\t\tif ( isset( $field['desc_tip'] ) ) {\n\t\t\techo '<img class=\"help_tip\" data-tip=\"' . esc_attr( $field['description'] ) . '\" src=\"' . $vision->plugin_url() . '/assets/images/help.png\" height=\"16\" width=\"16\" />';\n\t\t} else {\n\t\t\techo '<span class=\"description\">' . wp_kses_post( $field['description'] ) . '</span>';\n\t\t}\n\n\t}\n\techo '</p>';\n}", "function setfield( $field_name, $options ) {\n\n//if( $this->debug ) {\n//print \"<pre>\";\n//print \"Options:\\n-----------------------------\\n\";\n//print_r( $options );\n//print $options['name'];\n//print $options['value'];\n//print \"\\n--------------------------------------\\n\";\n//print \"</pre>\";\n//}\n\n/*\n Options (to this function, not an HTML menu option) is an associative array, which gives\n you great flexibility in setting any number\n of options you want.\n \n\tarray(\n\t\t'name' => 'email',\n\t\t'value'\t=> '[email protected]',\n\t\t'label' => 'Email Address',\n\t\t'required' => 1\n\t\t);\n */\n \n$this->fields[$field_name]['name'] = ( $options['name'] ) ? $options['name'] : '';\n\n$this->fields[$field_name]['value'] = ( $options['value'] )\t? $options['value'] : '';\n\nif( $this->debug ) {\nprint \"<pre>\";\nprint \"Value (option): \" . $options['value'] . \"\\n\";\nprint \"Value: \" . $this->fields[$field_name]['value'] . \"\\n\";\nprint \"</pre>\";\n}\n\n$this->fields[$field_name]['label'] = ( $options['label'] )\t? $options['label'] : '';\n\n$this->fields[$field_name]['required'] = ( $options['required'] ) ? $options['required'] : '';\n\n/*\nthe short circuit are a little space saving, but not too much, perl is much more elegant\nthis might be clearest\n \tif( $options['name'] ) {\n\t\t$this->fields[$field_name][name] = $options['name'];\n\t}\n\tif( $options['value'] ) {\n\t\t$this->fields[$field_name][value] = $options['name']\n\t}\n \tif( $options['name'] ) {\n\t\t$this->fields[$field_name][label] = $options['name']\n\t}\n\tif( $options['name'] ) {\n\t\t$this->fields[$field_name][is_required] = $options['name']\n\t}\n \tif( $options['name'] ) {\n\t\t$this->fields[$field_name][invalid] = $options['name']\n\t}\n*/\n\t//$this->fields[$field_name][error] ???\n\n}", "function option_dropdown($label, $name, $value, $keys, $comment='') {\r\n\t\techo \"<tr valign='top'><th scope='row'>\" . $label . \"</th>\";\r\n\t\techo \"<td><select name='$name'>\";\r\n\r\n\t\tforeach ((array)$keys as $key => $description) {\r\n\t\t\tif ($key == $value)\r\n\t\t\t\t$selected = \"selected\";\r\n\t\t\telse\r\n\t\t\t\t$selected = \"\";\r\n\r\n\t\t\techo \"<option value='\" . htmlentities($key, ENT_QUOTES, 'UTF-8') . \"' $selected>$description</option>\";\r\n\t\t}\r\n\t\techo \"</select>\";\r\n\t\techo \" $comment</td></tr>\";\r\n\t}", "function template_select($name = 'tmpl', $selected = null) {\n echo '<select name=\"'.$name.'\">';\n foreach (array('default', 'lite') as $tmpl) {\n // Print the option\n echo '<option value=\"'.html_entities($tmpl).'\"';\n if ($selected == $tmpl)\n echo ' SELECTED';\n echo '>'.html_entities(str_replace('_', ' ', $tmpl)).'</option>';\n }\n echo '</select>';\n }", "function populate_options(array $options = array())\n {\n }", "function generate_dd($options=array(), $selected=NULL, $use_default_key=TRUE, $show_default=TRUE){\n $html = \"\";\n\n if($show_default){\n $html .= \"<option value=\\\"\\\">Please select</option>\";\n }\n\n if(count($options) > 0){\n foreach($options as $k => $v){\n $option_text = $v;\n\n if($use_default_key){\n $option_value = $k;\n }else{\n $option_value = $option_text;\n }\n\n if(!is_null($selected) && $selected == $option_value){\n $is_selected = \"selected=\\\"selected\\\"\";\n }else{\n $is_selected = \"\";\n }\n\n $html .= \"<option value=\\\"{$option_value}\\\" {$is_selected}>{$option_text}</option>\";\n }\n }\n\n echo $html;\n }", "function Field() {\n\t\t$size = '';\n\t\t$multiple = '';\n\t\t\n\t\tif($this->size) $size = \"size=\\\"$this->size\\\"\";\n\t\t\n\t\tif($this->multiple) {\n\t\t\t$multiple = \"multiple=\\\"multiple\\\"\";\n\t\t\t$this->name .= '[]';\n\t\t}\n\t\t\n\t\t$options = \"\";\n\t\t\n\t\t// We have an array of values\n\t\tif(is_array($this->value)){\n\t\t\t// Loop through and figure out which values were selected.\n\t\t\t\t\t\n\t\t\tforeach($this->getSource() as $value => $title) {\n\t\t\t\t// Loop through the array of values to find out if this value is selected.\n\t\t\t\t$selected = \"\";\n\t\t\t\tforeach($this->value as $v){\n\t\t\t\t\tif($value == $v) {\n\t\t\t\t\t\t$selected = \" selected=\\\"selected\\\"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$options .= \"<option$selected value=\\\"$value\\\">$title</option>\\n\";\n\t\t\t}\n\t\t}else{\n\t\t\t// Listbox was based a singlular value, so treat it like a dropdown.\n\t\t\tforeach($this->getSource() as $value => $title) {\n\t\t\t\t$selected = $value == $this->value ? \" selected=\\\"selected\\\"\" : \"\"; \n\t\t\t\t$options .= \"<option$selected value=\\\"$value\\\">$title</option>\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t$id = $this->id();\n\t\treturn \"<select $size $multiple name=\\\"$this->name\\\" id=\\\"$id\\\">$options</select>\";\n\t}", "function selectAndPick(sfTestBrowser $t, array $options)\n{\n foreach($options as $check => $value)\n {\n $t->setField($check . \"_check\", 1);\n $t->setField($check, $value);\n }\n\n return $t;\n}", "function cmdMarital($name, $caption) {\n $optmarital = array\n (\n array(\"\", \"\"),\n array(\"Single\", \"1\"),\n array(\"Married\", \"2\"),\n );\n ?>\n <tr>\n <td><?php getCaption($caption); ?> :</td>\n <td>\n <select class=\"easyui-combobox\"\n id=\"<?php echo $name; ?>\"\n name=\"<?php echo $name; ?>\"\n style=\"width:120px;\"\n data-options=\"panelHeight:100,editable:false,width:200\"\n disabled=true\n >\n <?php\n foreach ($optmarital as $val) {\n echo '<option value=\"' . $val[1] . '\">' . $val[0] . '</option>';\n }\n ?>\n </select>\n </td>\n </tr>\n <?php\n}", "function options_form($context) {\n $options = array();\n $themes = list_themes();\n foreach($themes as $name => $theme) {\n if($theme->status == 1) $options[$name] = $name;\n }\n\n $form = array(\n '#tree' => TRUE,\n '#title' => t('Theme'),\n 'theme' => array(\n '#title' => t('Active theme'),\n '#description' => t('Choose a theme to activate when this context is active.'),\n '#type' => 'select',\n '#options' => $options,\n '#default_value' => 0//$this->fetch_from_context($context),\n ),\n );\n return $form;\n\n }" ]
[ "0.6602616", "0.65285176", "0.65074456", "0.64679456", "0.6366054", "0.62528723", "0.6250871", "0.6240499", "0.62020624", "0.6188851", "0.6174806", "0.61741877", "0.614924", "0.6126591", "0.61098266", "0.6106556", "0.6067673", "0.6064495", "0.60634756", "0.6050614", "0.60501325", "0.60438824", "0.60273415", "0.6015714", "0.60044575", "0.60027367", "0.5998087", "0.59877175", "0.5973422", "0.596134", "0.5918423", "0.59154725", "0.5905931", "0.58695596", "0.5860508", "0.5853785", "0.58506286", "0.58459306", "0.58409274", "0.5840906", "0.5796585", "0.57933325", "0.57871866", "0.5784521", "0.57765186", "0.576642", "0.5763337", "0.57582825", "0.5744514", "0.5740621", "0.5735415", "0.5717602", "0.57134736", "0.57101727", "0.5709957", "0.5706862", "0.5702267", "0.5700156", "0.56996787", "0.56986606", "0.56974024", "0.5693205", "0.5692017", "0.5686584", "0.5686181", "0.56857896", "0.56784916", "0.5674537", "0.5670713", "0.5668284", "0.56677866", "0.56619304", "0.565904", "0.5655155", "0.5652301", "0.56519485", "0.56511533", "0.56372094", "0.5631383", "0.5631056", "0.5630025", "0.562493", "0.56092477", "0.56087023", "0.5605458", "0.56016695", "0.5601011", "0.55966276", "0.5591078", "0.55816394", "0.5579761", "0.5570314", "0.55679506", "0.55638176", "0.55610627", "0.5559136", "0.5555751", "0.5552624", "0.55482364", "0.554787" ]
0.6652916
0
/ Selecting an option If you have read the documentation of the `HtField` and the `HtWidget` parent classes you already know that you are supposed to use the `context` method in order to set the value of a field/widget: mdx:SelectedOption Outputs: mdx:SelectedOption o httidy
function testSelectedOption(){ #mdx:SelectedOption $select = new HtSelect('id_category'); $select->options([1=>'Category1',2=>'Category2',3=>'Category3']); $select->context(['id_category'=>2]); #/mdx echo $select $this->expectOutputRegex("/option.*?2.*selected/"); echo $select; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function testSelectedOption(){\n\t\t#mdx:SelectedOption\n\t\t$select = new HtCklist(\"select_days\");\n\t\t$select->options([1=>'Mon',2=>'Tue',3=>'Wed',4=>'Thu',5=>'Fri',6=>'Sat']);\n\t\t$select->context(['select_days'=>[2,5]]); // check Tue and Fri\n\t\t#/mdx echo $select\n\t\t$this->expectOutputRegex(\"/input.*?2.*checked.*?input.*?5.*?checked/s\");\n\t\techo $select;\n\t}", "function select_option()\r\n{}", "protected function getSelectedValue() {}", "function hundope_select_field_render() { \n\t\n}", "function testSelected(){\n\t\t#mdx:Selected\n\t\t$choice = new SimpleChoice('season');\n\t\t$choice->options([\n\t\t\t1 => 'Spring',\n\t\t\t2 => 'Summer',\n\t\t\t3 => 'Fall',\n\t\t\t4 => 'Winter'\n\t\t]);\n\t\t$choice->context(['season'=>3]); // selects season 3 (Fall)\n\t\t#/mdx echo $choice\n\t\t$this->assertContains(\"<b>3 - Fall\",\"$choice\");\n\t}", "public function select_option($id, $value)\n\t{\n\t\t$this->connection()->post(\"element/$id/selected\", array('value' => $value));\n\t}", "public function set_value($value) {\n\n // Is the select multiple?\n $multiple = $this->field->hasAttribute('multiple');\n $singleselect = ($this->field->hasClass('singleselect') || $this->field->hasClass('urlselect'));\n\n // Here we select the option(s).\n if ($multiple) {\n // Split and decode values. Comma separated list of values allowed. With valuable commas escaped with backslash.\n $options = preg_replace('/\\\\\\,/', ',', preg_split('/(?<!\\\\\\),/', trim($value)));\n // This is a multiple select, let's pass the multiple flag after first option.\n $afterfirstoption = false;\n foreach ($options as $option) {\n $this->field->selectOption(trim($option), $afterfirstoption);\n $afterfirstoption = true;\n }\n } else {\n // By default, assume the passed value is a non-multiple option.\n $this->field->selectOption(trim($value));\n }\n\n // Wait for all the possible AJAX requests that have been\n // already triggered by selectOption() to be finished.\n if ($this->running_javascript()) {\n // Trigger change event and click on first skip link, as some OS/browsers (Phantomjs, Mac-FF),\n // don't close select option field and trigger event.\n if (!$singleselect) {\n $dialoguexpath = \"//div[contains(concat(' ', normalize-space(@class), ' '), ' moodle-dialogue-focused ')]\";\n if (!$node = $this->session->getDriver()->find($dialoguexpath)) {\n $script = \"Syn.trigger('change', {}, {{ELEMENT}})\";\n try {\n $driver = $this->session->getDriver();\n if ($driver instanceof \\Moodle\\BehatExtension\\Driver\\MoodleSelenium2Driver) {\n $driver->triggerSynScript($this->field->getXpath(), $script);\n }\n $driver->click('//body//div[@class=\"skiplinks\"]');\n } catch (\\Exception $e) {\n return;\n }\n } else {\n try {\n $this->session->getDriver()->click($dialoguexpath);\n } catch (\\Exception $e) {\n return;\n }\n }\n }\n $this->session->wait(behat_base::get_timeout() * 1000, behat_base::PAGE_READY_JS);\n }\n }", "public function form_field_select ( $args ) {\n\t\t$options = $this->get_settings();\n\t\t\n\t\tif ( isset( $args['data']['options'] ) && ( count( (array)$args['data']['options'] ) > 0 ) ) {\n\t\t\t$html = '';\n\t\t\t$html .= '<select id=\"' . esc_attr( $args['key'] ) . '\" name=\"' . esc_attr( $this->token ) . '[' . esc_attr( $args['key'] ) . ']\">' . \"\\n\";\n\t\t\t\tforeach ( $args['data']['options'] as $k => $v ) {\n\t\t\t\t\t$html .= '<option value=\"' . esc_attr( $k ) . '\"' . selected( esc_attr( $options[$args['key']] ), $k, false ) . '>' . $v . '</option>' . \"\\n\";\n\t\t\t\t}\n\t\t\t$html .= '</select>' . \"\\n\";\n\t\t\techo $html;\n\t\t\t\n\t\t\tif ( isset( $args['data']['description'] ) ) {\n\t\t\t\techo '<p><span class=\"description\">' . $args['data']['description'] . '</span></p>' . \"\\n\";\n\t\t\t}\n\t\t}\n\t}", "function form_select($field, $options) {\n $defaults = array(\n 'wrap' => true,\n 'label' => true,\n 'class' => array('input', 'select'),\n 'options' => array()\n );\n\n $options = array_merge($defaults, $options);\n\n $output = '<select name=\"' . $field . '\" id=\"' . form__field_id($field) . '\">';\n foreach($options['options'] as $value => $text) {\n $output .= '<option value=\"' . $value . '\"';\n if(!empty($_POST[$field]) && $_POST[$field] == $value) {\n $output .= ' selected=\"selected\"';\n }\n $output .= '>' . $text . '</option>';\n }\n $output .= '</select>';\n\n if($options['wrap']) {\n $options['field'] = $field;\n $output = form__wrap($output, $options);\n }\n\n $error = form_error_message($field);\n if(!empty($error)) {\n $output .= $error;\n }\n \n return html__output($output);\n}", "public function select_values_for_form( EntryValueSelect $entry_value_select );", "function render_field_select($field)\n {\n }", "public function callback_select( $args ) {\n\n $name_id = $args['name_id'];\n if ($args['parent']) {\n $value = $this->get_option( $args['parent']['id'], $args['section'], $args['std'], $args['global'] );\n $value = isset($value[$args['id']]) ? $value[$args['id']] : $args['std'];\n $args['disable'] = (isset( $args['parent']['disable'])) ? $args['parent']['disable'] : false;\n }else {\n $value = $this->get_option( $args['id'], $args['section'], $args['std'], $args['global'] );\n }\n\n $disable = (isset( $args['disable'] ) && $args['disable'] === true) ? 'disabled' : '';\n $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : 'regular';\n $html = sprintf( '<select class=\"%1$s\" name=\"%2$s\" id=\"%2$s\" %3$s>', $size, $name_id, $disable );\n\n foreach ( $args['options'] as $key => $label ) {\n $html .= sprintf( '<option value=\"%s\" %s>%s</option>', $key, selected( $value, $key, false ), $label );\n }\n\n $html .= sprintf( '</select>' );\n $html .= $this->get_field_description( $args );\n\n echo $html;\n }", "function barnelli_wp_select( $field ) {\n\tglobal $thepostid, $post, $vision;\n\n\t$thepostid \t\t\t\t= empty( $thepostid ) ? $post->ID : $thepostid;\n\t$field['class'] \t\t= isset( $field['class'] ) ? $field['class'] : 'select short';\n\t$field['wrapper_class'] = isset( $field['wrapper_class'] ) ? $field['wrapper_class'] : '';\n\t$field['value'] \t\t= isset( $field['value'] ) ? $field['value'] : get_post_meta( $thepostid, $field['id'], true );\n\n\techo '<p class=\"form-field ' . esc_attr( $field['id'] ) . '_field ' . esc_attr( $field['wrapper_class'] ) . '\"><label for=\"' . esc_attr( $field['id'] ) . '\">' . wp_kses_post( $field['label'] ) . '</label><select id=\"' . esc_attr( $field['id'] ) . '\" name=\"' . esc_attr( $field['id'] ) . '\" class=\"' . esc_attr( $field['class'] ) . '\">';\n\n\tforeach ( $field['options'] as $key => $value ) {\n\n\t\techo '<option value=\"' . esc_attr( $key ) . '\" ' . selected( esc_attr( $field['value'] ), esc_attr( $key ), false ) . '>' . esc_html( $value ) . '</option>';\n\n\t}\n\n\techo '</select> ';\n\n\tif ( ! empty( $field['description'] ) ) {\n\n\t\tif ( isset( $field['desc_tip'] ) ) {\n\t\t\techo '<img class=\"help_tip\" data-tip=\"' . esc_attr( $field['description'] ) . '\" src=\"' . $vision->plugin_url() . '/assets/images/help.png\" height=\"16\" width=\"16\" />';\n\t\t} else {\n\t\t\techo '<span class=\"description\">' . wp_kses_post( $field['description'] ) . '</span>';\n\t\t}\n\n\t}\n\techo '</p>';\n}", "public function setup_selected() {\n\t}", "function yaz_set_option($id, $name, $value)\n{\n}", "public function Do_select_Example1(){\n\n\t}", "public function select ( \\r8\\Form\\Select $field )\n {\n $this->addField( \"select\", $field );\n }", "public function smtp_secure_select( $args ) {\n $field_id = $args['label_for'];\n $options = $args['options'];\n $value = get_option( $field_id, $args['default'] );\n \n printf( \"<select name='%s' id='%s'>\", $field_id, $field_id );\n\n foreach ( $options as $option ) {\n $selected = '';\n\n if ( $value == $option ) {\n $selected = 'selected';\n }\n\n printf( \"<option value=%s %s>%s</option>\", $option, $selected, $option );\n }\n \n printf( \"</select>\" );\n }", "function selected($field, $value = null) {\n if ( is_string($field) ) {\n if ( $this->setting($field) == $value ) {\n echo 'selected=\"selected\"';\n }\n } else if ( (bool) $field ) {\n echo 'selected=\"selected\"';\n }\n }", "function select( \n\t $name, $title = null, $value = null, \n\t $required = false, \n\t $attributes = null,\n\t $options = array(),\n\t $datatype = Form::DATA_STRING\n\t){\n return $this->input(\n\t $name, \n\t Form::TYPE_SELECT,\n\t $title, \n\t $value, \n\t $required, \n\t $attributes,\n\t $options,\n\t $datatype\n );\n\t}", "public function set( $option, $value );", "function testOptionsFunction(){\n\t\t#mdx:OptionsFunction\n\t\t$choice = new SimpleChoice(\"category\");\n\t\t$choice->options(function(){\n\t\t\t// pretend this was fetched from the db\n\t\t\t$rows = [\n\t\t\t\t['id'=>1,'name'=>'Action'],\n\t\t\t\t['id'=>2,'name'=>'Drama'],\n\t\t\t\t['id'=>3,'name'=>'Sci-fi']\n\t\t\t];\n\n\t\t\treturn $rows;\n\n\t\t})->context(['category'=>3]); // selects category 3\n\t\t#/mdx echo $choice\n\t\t$this->assertContains(\"<b>3 - Sci-fi\",\"$choice\");\n\n\t}", "function osa_field_widget_options_select_form_alter(&$element, &$form_state, $context) {\r\n\r\n // This code, while it works to populate the selection boxes when built, fails on validation\r\n // So we have hard coded the values into the form for now.\r\n /* populate the drop down with the class types\r\n if ($element['#field_name'] == 'field_class_type') {\r\n $element['#options'] = array('_none' => '- Select a value -') + osa_options_class_types();\r\n }\r\n */\r\n \r\n // populate the drop down with the list of events\r\n // only include events of type 'Group Class (Master)'\r\n if ($element['#field_name'] == 'field_event_master') {\r\n civicrm_initialize();\r\n $results = civicrm_api('event', 'get', array('event_type_id' => OSA_EVENT_GROUP_CLASS_MASTER, 'is_active' => TRUE, 'rowCount' => PHP_INT_MAX, 'version' => 3));\r\n $options = array();\r\n foreach ($results['values'] as $class) {\r\n $options[$class['id']] = $class['event_title'];\r\n }\r\n asort($options);\r\n $element['#options'] = array('_none' => '- Select a value -') + $options;\r\n }\r\n}", "function mc_option_selected( $field, $value, $type = 'checkbox' ) {\n\tswitch ( $type ) {\n\t\tcase 'radio':\n\t\tcase 'checkbox':\n\t\t\t$result = ' checked=\"checked\"';\n\t\t\tbreak;\n\t\tcase 'option':\n\t\t\t$result = ' selected=\"selected\"';\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$result = '';\n\t\t\tbreak;\n\t}\n\tif ( $field == $value ) {\n\t\t$output = $result;\n\t} else {\n\t\t$output = '';\n\t}\n\n\treturn $output;\n}", "public static function renderSelect();", "function get_meta_select( $args = array(), $value = false ) { \r\r\n extract($args);\r\r\n ?>\r\r\n\t<tr>\r\r\n\t\t<th style=\"width:10%;\"><label for=\"<?php\t \t echo $args['name']; ?>\"><?php\t \t echo $args['title']; ?></label></th>\r\r\n\t\t<td>\r\r\n\t\t\t<select name=\"<?php\t \t echo $args['name']; ?>\" id=\"<?php\t \t echo $args['name']; ?>\">\r\r\n\t\t\t\t<option value=\"\"></option>\r\r\n\t\t\t\t<?php\t \t foreach ( $args['options'] as $option => $val ) : ?>\r\r\n\t\t\t\t\t<option <?php\t \t if ( htmlentities( $value, ENT_QUOTES ) == $val ) echo ' selected=\"selected\"'; ?> value=\"<?php\t \t echo $val; ?>\"><?php\t \t if ( __( 'Template:', 'hybrid') == $args['title'] ) echo $option; else echo $val; ?></option>\r\r\n\t\t\t\t<?php\t \t endforeach; ?>\r\r\n\t\t\t</select>\r\r\n\t\t\t<br /><small><?php\t \t echo $args['description']; ?></small>\r\r\n\t\t</td>\r\r\n\t</tr>\r\r\n\t<?php\t \t\r\r\n}", "public function setOption($option, $value);", "private function selectCustomField(): string\n {\n $value = $this->getValue($this->index);\n foreach($this->options as &$option) {\n if($option['key'] == $value) {\n $option['selected'] = true;\n break;\n }\n }\n\n return Template::build($this->getTemplatePath('select.html'), [\n 'id' => uniqid(\"{$this->id}-\", true),\n 'name' => $this->id,\n 'label' => $this->label,\n 'options' => $this->options,\n 'index' => isset($this->index) ? $this->index : false\n ]);\n }", "function add_to_context( $context ) {\n\t\t$context['options'] = get_fields('options');\n\t\treturn $context;\n\t}", "function meta_box_select( $args = array(), $value = false ) {\n\t\t\t$name = preg_replace( \"/[^A-Za-z_-]/\", '-', $args['name'] ); ?>\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $name; ?>\"><?php echo $args['title']; ?></label>\n\t\t\t\t<?php if ( !empty( $args['sep'] ) ) echo '<br />'; ?>\n\t\t\t\t<select name=\"<?php echo $name; ?>\" id=\"<?php echo $name; ?>\" style=\"width:60px\">\n\t\t\t\t\t<?php // echo '<option value=\"\"></option>'; ?>\n\t\t\t\t\t<?php $i = 0; foreach ( $args['options'] as $option => $val ) { $i++; ?>\n\t\t\t\t\t\t<option value=\"<?php echo esc_attr( $val ); ?>\" <?php selected( esc_attr( $value ), esc_attr( $val ) ); //if ( $i == 1 ) echo 'selected=\"selected\"'; ?>><?php echo ( !empty( $args['use_key_and_value'] ) ? $option : $val ); ?></option>\n\t\t\t\t\t<?php } ?>\n\t\t\t\t</select>\n\t\t\t\t<?php if ( !empty( $args['description'] ) ) echo '<br /><span class=\"howto\">' . $args['description'] . '</span>'; ?>\n\t\t\t</p>\n\t\t\t<?php\n\t\t}", "public function setSelect($select);", "function _field_select($fval) \n {\n\n // if need be, copy the current vals for safety + reset()\n $postedvals = (is_array($fval))? $fval : array();\n\n $res = sprintf(\"<select size=\\\"1\\\" name=\\\"%s\\\" id=\\\"%s\\\" class=\\\"%s\\\" %s>\",\n $this->fname, \n $this->fname, \n (isset($this->attribs['class']))? $this->attribs['class'] : $this->element_class,\n $this->extra_attribs);\n\n if (empty($fval) and isset($this->attribs['top_value'])) {\n $res .= \"<option value=\\\"\\\">\". $this->attribs['top_value'] .\"</option>\"; \n } \n\n $opts = $this->opts; # $this->_array_stringify($this->opts);\n foreach ($opts as $optkey => $optval) { \n $res .= sprintf(\"<option value=\\\"%s\\\"%s>%s</option>\",\n $this->_htmlentities($optkey),\n ((in_array($optkey, $postedvals) || $optkey == $fval) and !empty($fval))? \" selected\" : \"\",\n $this->_htmlentities($optval));\n }\n $res .= \"</select>\";\n return $res;\n }", "public function Option1()\n {\n $this->CallJqUiMethod(\"option\");\n }", "public function setSelectedValue($value);", "public function setOption($name, $value);", "public function setOption($name, $value);", "public function setOption($name, $value);", "public function setOption($name, $value);", "public function testSetSelected()\n\t{\n\t\t// Remove the following lines when you implement this test.\n\t\t$this->markTestIncomplete(\n\t\t\t'This test has not been implemented yet.'\n\t\t);\n\t}", "public function selectOption($select, $option)\n {\n $args = func_get_args();\n $this->waitForText($option);\n\n return $this->getScenario()->runStep(new \\Codeception\\Step\\Action('selectOption', $args));\n }", "function okrs_related_to_select($value)\n{\n\n $selected = '';\n if($value == 'okrs'){\n $selected = 'selected';\n }\n echo \"<option value='okrs' \".$selected.\">\".\n _l('okrs').\"\n </option>\";\n\n}", "public function setOption($key, $value);", "function initlab_field_mailman_version_cb($args) {\n // Get the value of the setting we've registered with register_setting()\n $options = get_option('initlab_options', []);\n ?>\n <select id=\"<?php echo esc_attr($args['label_for']); ?>\" name=\"initlab_options[<?php echo esc_attr($args['label_for']); ?>]\">\n <?php\n foreach ($args['options'] as $value => $label) {\n ?>\n <option value=\"<?php echo esc_attr($value)?>\" <?php echo array_key_exists($args['label_for'], $options) ? selected($options[$args['label_for']], $value, false) : ''; ?>>\n <?php esc_html_e($label, 'initlab-addons'); ?>\n </option>\n <?php\n }\n ?>\n </select>\n <?php\n}", "public function select($field, $values = null, array $options = array(), array $attrs = array())\n\t{\n\t\tstatic::$helper->add_template($attrs);\n\t\t$out = parent::select($field, $values, $options, $attrs);\n\t\treturn $this->prepend_controls($out);\n\t}", "function select($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\t\t\tif ($args['multiple']) {\r\n\t\t\t\techo \"<select class='optselect chzn-select' multiple='true' style='\" .$this->width($args['width']) . \"' name='\" . $args['formname'] . \"\" . \"[]'>\";\r\n\t\t\t\tforeach ($args['selections'] as $key => $value) {\r\n\t\t\t\t\techo \"<option \" . (array_search($value , $args['value']) === false ? '' : 'selected' ). \" value='\" . $key . \"'>\" . $value . \"</option>\";\t\r\n\t\t\t\t}\t\r\n\t\t\t\techo \"</select>\";\r\n\t\t\t} else {\r\n\t\t\t\techo \"<select class='optselect chzn-select' style='\" .$this->width($args['width']) . \"' name='\" . $args['formname'] . \"'>\";\r\n\t\t\t\tforeach ($args['selections'] as $key => $value) {\r\n\t\t\t\t\techo \"<option \" . ($args['value'] == $key ? 'selected' : '' ). \" value='\" . $key . \"'>\" . $value . \"</option>\";\t\r\n\t\t\t\t}\t\r\n\t\t\t\techo \"</select>\";\r\n\t\t\t}\r\n\t\t\t$this->description($args['description']);\r\n\t\t}", "public function getSelected() {}", "public function getSelected() {}", "function option_helper($post, $value, $label) {\n $selected = $post->post_status == $value ? 'selected' : '';\n return \"<option value='{$value}' {$selected}>{$label}</option>\";\n }", "function ffw_port_select_callback($args) {\n global $ffw_port_settings;\n\n if ( isset( $ffw_port_settings[ $args['id'] ] ) )\n $value = $ffw_port_settings[ $args['id'] ];\n else\n $value = isset( $args['std'] ) ? $args['std'] : '';\n\n $html = '<select id=\"ffw_port_settings_' . $args['section'] . '[' . $args['id'] . ']\" name=\"ffw_port_settings_' . $args['section'] . '[' . $args['id'] . ']\"/>';\n\n foreach ( $args['options'] as $option => $name ) :\n $selected = selected( $option, $value, false );\n $html .= '<option value=\"' . $option . '\" ' . $selected . '>' . $name . '</option>';\n endforeach;\n\n $html .= '</select>';\n $html .= '<label for=\"ffw_port_settings_' . $args['section'] . '[' . $args['id'] . ']\"> ' . $args['desc'] . '</label>';\n\n echo $html;\n}", "public function select($element) {\n $element = $this->_setRender($element);\n\n $element['_render']['element'] = '';\n $element['_render']['element'] .= '<select id=\"' . $element['#id'] . '\" ';\n $element['_render']['element'] .= $element['_attributes_string'];\n $element['_render']['element'] .= sprintf(' data-wpt-type=\"%s\"', __FUNCTION__);\n /**\n * multiple\n */\n if (array_key_exists('#multiple', $element) && $element['#multiple']) {\n $element['_render']['element'] .= ' multiple=\"multiple\"';\n $element['_render']['element'] .= ' name=\"' . $element['#name'] . '[]\"';\n } else {\n $element['_render']['element'] .= ' name=\"' . $element['#name'] . '\"';\n }\n $element['_render']['element'] .= \">\\r\\n\";\n $count = 1;\n foreach ($element['#options'] as $id => $value) {\n if (!is_array($value)) {\n $value = array('#title' => $id, '#value' => $value, '#type' => 'option');\n }\n $value['#type'] = 'option';\n if (!isset($value['#value'])) {\n $value['#value'] = $this->_count['select'] . '-' . $count;\n $count += 1;\n }\n $element['_render']['element'] .= '<option value=\"' . htmlspecialchars($value['#value']) . '\"';\n $element['_render']['element'] .= $this->_setElementAttributes($value);\n if (array_key_exists('#types-value', $value)) {\n $element['_render']['element'] .= sprintf(' data-types-value=\"%s\"', $value['#types-value']);\n }\n /**\n * type and data_id\n */\n $element['_render']['element'] .= ' data-wpt-type=\"option\"';\n $element['_render']['element'] .= $this->_getDataWptId($element);\n /**\n * selected\n */\n if (array_key_exists('#multiple', $element) && $element['#multiple']) {\n if (is_array($element['#default_value']) && in_array($value['#value'], $element['#default_value'])) {\n $element['_render']['element'] .= ' selected=\"selected\"';\n }\n } elseif ($element['#default_value'] == $value['#value']) {\n $element['_render']['element'] .= ' selected=\"selected\"';\n }\n $element['_render']['element'] .= '>';\n $element['_render']['element'] .= isset($value['#title']) ? $value['#title'] : $value['#value'];\n $element['_render']['element'] .= \"</option>\\r\\n\";\n }\n $element['_render']['element'] .= '</select>';\n $element['_render']['element'] .= PHP_EOL;\n\n $pattern = $this->_getStatndardPatern($element);\n $output = $this->_pattern($pattern, $element);\n $output = $this->_wrapElement($element, $output);\n\n return $output;\n }", "function _setOptionSelected($option,$value) {\r\n\t\treturn ($option == $value ? ' selected=\"selected\"' : '');\r\n\t}", "public function form()\r\n {\r\n $this->switch('field_select_create', Support::trans('main.select_create'))\r\n ->default(admin_setting('field_select_create'));\r\n }", "public function setOption(string $name, $value);", "public function setOption(string $name, $value);", "function yaz_set_option($id, $options)\n{\n}", "function options_form($context) {\n $options = array();\n $themes = list_themes();\n foreach($themes as $name => $theme) {\n if($theme->status == 1) $options[$name] = $name;\n }\n\n $form = array(\n '#tree' => TRUE,\n '#title' => t('Theme'),\n 'theme' => array(\n '#title' => t('Active theme'),\n '#description' => t('Choose a theme to activate when this context is active.'),\n '#type' => 'select',\n '#options' => $options,\n '#default_value' => 0//$this->fetch_from_context($context),\n ),\n );\n return $form;\n\n }", "public function selected()\n {\n parent::selected();\n $this->name = '';\n }", "public function it_shows_select_input_with_options()\n {\n // configure\n $inputs = [\n [\n 'type' => 'select',\n 'name' => 'country',\n 'options' => ['IN' => 'India']\n ]\n ];\n\n $this->configureInputs($inputs);\n\n // assert\n $this->get('/settings')\n ->assertStatus(200)\n ->assertSee('select')\n ->assertSee('IN');\n }", "function setSelected($selected) {\r\n if ($this->list) {\n if ($selected) {\n $this->list->selectOption($this);\n } else {\n $this->list->deselectOption($this);\n }\n }\n }", "protected function renderSimulateUserSelectAndLabel() {}", "public function option(string $option);", "public function select($title, $text, $list, $selectedIndex, $handlerObj, $handlerMethod, $carryValue = NULL) {\n if ($this->promptInProgress) {\n throw new SFException( 'PromptService: a prompt is already in progress', ERR_REPORT_APP );\n }\n\n $this->promptInProgress = TRUE;\n $this->handlerObj = $handlerObj;\n $this->handlerMethod = $handlerMethod;\n $this->carryValue = $carryValue;\n $this->callMethod( 'select', array($title, $text, $list, (int) $selectedIndex) );\n }", "function print_select($value){\n\t\techo $this->before_option_title.$value['name'].$this->after_option_title;\n\t\t$input_value = $this->get_field_value($value['id']);\n\t\t\t\n\t\techo '<select class=\"option-select'.((isset($value['conditional']) && $value['conditional'])?' option-conditional':'').'\" name=\"'.$value['id'].'\" id=\"'.$value['id'].'\">';\n\t\t\n\t\tforeach ($value['options'] as $option) {\n\t\t\t$attr='';\t\n\t\t\t if ( get_option( $value['id'] ) == $option['id']) {\n\t\t\t\t$attr = ' selected=\"selected\"';\n\t\t\t }\n\t\t \t if ( $option['id'] == 'disabled') {\n\t\t\t\t$attr.= ' disabled=\"disabled\"';\n\t\t\t }\n\t\t\t if($option['class']){\n\t\t\t\t$attr.=' class=\"'.$option['class'].'\"';\t\t\t \t\n\t\t\t }\n\t\t\techo '<option '.$attr.' value=\"'.$option['id'].'\">'.$option['name'].'</option>'; \n\t\t} \n\t\n\t\techo '</select>';\n\t\t$this->close_option($value);\n\t}", "function __select( $hidden = true ) {\n\t\t$data = '';\n\t\tif( $hidden === true ) {\n\t\t\t// use hyperv-vm.select.class\n\t\t\trequire_once($this->rootdir.'/plugins/hyperv/class/hyperv-vm.select.class.php');\n\t\t\t$controller = new hyperv_vm_select($this->htvcenter, $this->response);\n\t\t\t$controller->actions_name = $this->actions_name;\n\t\t\t$controller->tpldir = $this->tpldir;\n\t\t\t$controller->message_param = $this->message_param;\n\t\t\t$controller->lang = $this->lang['select'];\n\t\t\t$data = $controller->action();\n\t\t}\n\t\t$content['label'] = $this->lang['select']['tab'];\n\t\t$content['value'] = $data;\n\t\t$content['target'] = $this->response->html->thisfile;\n\t\t$content['request'] = $this->response->get_array($this->actions_name, 'select' );\n\t\t$content['onclick'] = false;\n\t\tif($this->action === 'select'){\n\t\t\t$content['active'] = true;\n\t\t}\n\t\treturn $content;\n\t}", "function renderSelected($option) {\n\t\t$conf = array($this->config['selected'], $this->config['selected.']);\n\t\treturn $this->renderOption($option, $conf);\n\t}", "function theme_select(&$item) {\n\n\t\t$class = array('form-select');\n\t\t_form_set_class($item, $class);\n\n\t\t$size = $item['#size'] ? ' size=\"' . $item['#size'] . '\"' : '';\n\t\t$multiple = isset($item['#multiple']) && $item['#multiple'];\n\n\t\t$retval .= '<select name=\"'\n\t\t\t. $item['#name'] . ''. ($multiple ? '[]' : '') . '\"' \n\t\t\t. ($multiple ? ' multiple=\"multiple\" ' : '') \n\t\t\t. drupal_attributes($item['#attributes']) \n\t\t\t. ' id=\"' . $item['#id'] . '\" ' . $size . '>' \n\t\t\t. form_select_options($item) . '</select>';\n\t\treturn($retval);\n\n\t}", "function echoSelected($fieldname){\n\t#echo \"199\".$fieldname.$this->request['option']; exit;\n\t\tif($this->request['option']==$fieldname)\n\t\t\techo \" selected\";\n\t}", "public function set(string $option, $value): self;", "function uds_pricing_render_general_options_select($key, $value)\n{\n\tglobal $uds_pricing_general_options;\n\t$field = $uds_pricing_general_options[$key];\n\t$default = $value;\n\t\n\t$options = '';\n\tforeach($field['options'] as $name => $value) {\n\t\t$selected = $name == $default ? 'selected=\"selected\"' : '';\n\t\t$options .= \"<option value='$name' $selected>$value</option>\";\n\t}\n\t\n\t$out = \"\n\t\t<div>\n\t\t\t<label>{$field['label']}</label>\n\t\t\t<select name='uds-pricing-$key'>\n\t\t\t\t$options\n\t\t\t</select>\n\t\t</div>\n\t\";\n\treturn $out;\n}", "public static function option($texte,$valeur=null,$defaut=null){\n $selected = '';\n \n if(is_null($valeur)){\n $valeur = $texte;\n }\n \n if(!is_null($defaut)){\n if($valeur == $defaut){\n $selected = 'selected';\n }\n }\n \n ?>\n <option value=\"<?php echo $valeur;?>\" <?php echo $selected;?> ><?php echo $texte;?></option>\n <?php \n }", "function testOptionsFunction2(){\n\n\t\t#mdx:OptionsFunction2\n\t\t$choice = new SimpleChoice(\"category\");\n\t\t$choice->options(function(){\n\t\t\t// return a function which returns an associative array:\n\t\t\treturn function(){\n\t\t\t\treturn [1=>'Category A',2=>'Category B',3=>'Category C'];\n\t\t\t};\n\t\t});\n\n\t\t$choice->context(['category'=>2]); // selects category 2\n\t\t#/mdx echo $choice\n\t\t$this->assertContains(\"<b>2\",\"$choice\");\n\n\t}", "function testOptionsObjects(){\n\t\n\t\t#mdx:OptionsObjects\n\t\t$choice = new SimpleChoice(\"category\");\n\t\n\t\t$option1 = new StdClass();\n\t\t$option1->id = 1;\n\t\t$option1->name = 'Action';\n\t\n\t\t$option2 = new StdClass();\n\t\t$option2->id = 2;\n\t\t$option2->name = 'Drama';\n\n\t\t$choice->options([$option1, $option2])\n\t\t\t->context(['category'=>2]); // selects category 2\n\t\t\n\t\t#/mdx echo $choice\n\t\t$this->assertContains(\"1 - Action\",\"$choice\");\n\t\t$this->assertContains(\"<b>2 - Drama\",\"$choice\");\n\n\t}", "function form_option($option)\n {\n }", "function selectAndPick(sfTestBrowser $t, array $options)\n{\n foreach($options as $check => $value)\n {\n $t->setField($check . \"_check\", 1);\n $t->setField($check, $value);\n }\n\n return $t;\n}", "function formulize_inner_custom_box($post) {\n\tglobal $post;\n\t$values = get_post_custom($post->ID);\n\t$selected = isset($values['formulize_select']) ? esc_attr($values['formulize_select']) : ''; \n\t// We'll use this nonce field later on when saving. \n wp_nonce_field( 'my_formulize_nonce', 'formulize_nonce' );\n ?>\n <label for =\"formulize_select\">Choose screen: </label>\n <select name=\"formulize_select\" id=\"formulize_select\">\n <option value=\"test one\" <?php selected($selected, 'test one'); ?>>Test One </option>\n <option value=\"test two\" <?php selected($selected, 'test two'); ?>>Test Two </option>\n </select>\n <?php\n}", "private static function select_option($label, $value, array $selected, $optionclass = '') {\n $attributes = array();\n $value = (string)$value;\n if (in_array($value, $selected, true)) {\n $attributes['selected'] = 'selected';\n }\n $attributes['value'] = $value;\n $attributes['class'] = $optionsclass;\n return html_writer::tag('option', $label, $attributes);\n }", "function _select ($name, $id, $attribs, $options, $value)\n\t{\n\t\t$xhtml = '<div class=\"select\"><select'\n\t\t. ' name=\"' . $this->view->escape($name) . '\"'\n\t\t. ' id=\"' . $this->view->escape($id) . '\"'\n\t\t. $this->_htmlAttribs($attribs)\n\t\t. \">\";\n\n\t\t// build the list of options\n\t\t$list = array();\n\t\t$translator = $this->getTranslator();\n\t\tforeach ((array) $options as $opt_value => $opt_label) {\n\t\t\tif (is_array($opt_label)) {\n if (null !== $translator) {\n $opt_value = $translator->translate($opt_value);\n }\n \n $list[] = '<optgroup'\n . ' label=\"' . $this->view->escape($opt_value) .'\">';\n foreach ($opt_label as $val => $lab) {\n $list[] = $this->_build($val, $lab, $value, false);\n }\n $list[] = '</optgroup>';\n } else {\n\t\t\t\t$list[] = $this->_build($opt_value, $opt_label, $value, false);\n }\n\t\t}\n\n\t\t// add the options to the xhtml and close the select\n\t\t$xhtml .= implode(\"\", $list) . \"</select> <a href=\\\"#\\\" class=\\\"remove\\\">-</a></div>\";\n\n\t\treturn $xhtml;\n\t}", "function select_box($selected, $options, $input_name, $input_id = FALSE, $use_lang = TRUE, $key_is_value = TRUE, $attributes = array())\n\t{\n\t\tglobal $LANG;\n\n\t\t$input_id = ($input_id === FALSE) ? str_replace(array(\"[\", \"]\"), array(\"_\", \"\"), $input_name) : $input_id;\n\n\t\t$attributes = array_merge(array(\n\t\t\t\"name\" => $input_name,\n\t\t\t\"id\" => strtolower($input_id)\n\t\t), $attributes);\n\n\t\t$attributes_str = \"\";\n\t\tforeach ($attributes as $key => $value)\n\t\t{\n\t\t\t$attributes_str .= \" {$key}='{$value}' \";\n\t\t}\n\n\t\t$ret = \"<select{$attributes_str}>\";\n\n\t\tforeach($options as $option_value => $option_label)\n\t\t{\n\t\t\tif (!is_int($option_value))\n\t\t\t\t$option_value = $option_value;\n\t\t\telse\n\t\t\t\t$option_value = ($key_is_value === TRUE) ? $option_value : $option_label;\n\n\t\t\t$option_label = ($use_lang === TRUE) ? $LANG->line($option_label) : $option_label;\n\t\t\t$checked = ($selected == $option_value) ? \" selected='selected' \" : \"\";\n\t\t\t$ret .= \"<option value='{$option_value}'{$checked}>{$option_label}</option>\";\n\t\t}\n\n\t\t$ret .= \"</select>\";\n\t\treturn $ret;\n\t}", "public function testIssue255()\n {\n $session = $this->getSession();\n $session->visit($this->pathTo('/issue255.php'));\n\n $session->getPage()->selectFieldOption('foo_select', 'Option 3');\n\n $session->wait(2000, '$(\"#output_foo_select\").text() != \"\"');\n $this->assertEquals('onChangeSelect', $session->getPage()->find('css', '#output_foo_select')->getText());\n }", "function changeSelectOptionSelected($name,$value,$selected,$html,$pattern='<option value=\"__value__\">') {\n\t\tif (preg_match('/<(select*)\\\\b name=\"'.$name.'\"[^>]*>(.*?)<\\/\\\\1>/sim', $html, $regs)) {\n\t\t\t$selectHtml=$regs[0];\n\t\t\t\n\t\t\t$pattern=str_replace('__value__',$value,$pattern);\n\t\t\tif ($selected==true)\n\t\t\t\t$patternNew=str_replace('>',' selected=\"selected\" >',$pattern);\n\t\t\t\n\t\t\t\n\t\t\t$selectNewHtml=str_replace($pattern,$patternNew,$selectHtml);\n\t\t\t$html=str_replace($selectHtml,$selectNewHtml,$html);\n\t\t\treturn $html;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "function edit(){\n global $wpdb;\n global $DOPBSP;\n \n $id = $_POST['id'];\n $field = $_POST['field'];\n $value = $_POST['value'];\n $language = $_POST['language'];\n \n if ($field == 'label'){\n $value = str_replace(\"\\n\", '<<new-line>>', $value);\n $value = str_replace(\"\\'\", '<<single-quote>>', $value);\n $value = utf8_encode($value);\n \n $field_data = $wpdb->get_row($wpdb->prepare('SELECT * FROM '.$DOPBSP->tables->forms_fields_options.' WHERE id=%d',\n $id));\n \n $translation = json_decode($field_data->translation);\n $translation->$language = $value;\n \n $value = json_encode($translation);\n $field = 'translation';\n }\n \n $select_option = $wpdb->get_row($wpdb->prepare('SELECT * FROM '.$DOPBSP->tables->forms_fields_options.' WHERE id=%d',\n $id));\n $wpdb->update($DOPBSP->tables->forms_fields_options, array($field => $value), \n array('id' => $_POST['id']));\n \n echo $select_option->field_id;\n \n die();\n }", "function getSelect($label, $name, $id, $options) {\r\n $return .= $this->getLabel($label, $id, $true);\r\n $return .= \"<select name='\".$name.\"' id='\".$id.\"'>\";\r\n if($this->getConfigurationValue($name) AND !$value){\r\n $value = $this->getConfigurationValue($name);\r\n }elseif($_POST[$name]){\r\n $data = $this->getFormData(array($name));\r\n $value = $data[$name];\r\n } \r\n foreach($options as $key=>$option){\r\n $selected = \"\";\r\n if($option==$value) $selected=\" selected='selected'\";\r\n $return .= \"<option value='\".$option.\"'\".$selected.\">\".$option.\"</option>\"; \r\n }\r\n $return .= \"</select>\";\r\n return $return;\r\n }", "public function select_option($option, $select) {\n $select = $this->fixStepArgument($select);\n $option = $this->fixStepArgument($option);\n\n // We add the click event to deal with autosubmit drop down menus.\n $selectnode = $this->getSession()->getPage()->findField($select);\n if ($selectnode == null) {\n throw new ElementNotFoundException(\n $this->getSession(), 'form field', 'id|name|label|value', $select\n );\n }\n $selectnode->selectOption($option);\n $selectnode->click();\n }", "public function select( $select_id, $option_text ) {\n $element = $this->getElement( LocatorStrategy::id, $select_id );\n $option = $element->findOptionElementByText( $option_text );\n $option->click();\n }", "public function optionsdemo_field_callback( $field ) {\n\t\t\t$option_name = $field['option_name'];\n\t\t\t$option = get_option( $option_name );\n\t\t\t$value = isset( $option[ $field['id'] ] ) ? $option[ $field['id'] ] : '';\n\t\t\t\n\t\t\tswitch ( $field['type'] ) {\n\t\t\t\t\n\t\t\t\tcase 'file':\n\t\t\t\t\t\n\t\t\t\t\techo '<div class=\"optionsdemo-warp\">';\n\t\t\t\t\tprintf( '<input id=\"%1$s-%2$s\" type=\"text\" class=\"optionsdemo-input\" name=\"%1$s[%2$s]\" value=\"%3$s\"/>',\n\t\t\t\t\t\t$option_name,\n\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t$value\n\t\t\t\t\t);\n\t\t\t\t\tprintf( '<input type=\"button\" class=\"button-primary optionsdemo-btn \" value=\"Insert Image\"/>' );\n\t\t\t\t\t\n\t\t\t\t\techo '</div>';\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// Multiple select render\n\t\t\t\tcase 'multiple':\n\t\t\t\t\t\n\t\t\t\t\t$countries = $field['countries'];\n\t\t\t\t\t\n\t\t\t\t\tprintf( '<select id=\"%1$s-%2$s\" name=\"%1$s[%2$s][]\" multiple=\"%3$s\">',\n\t\t\t\t\t\t$option_name,\n\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t$field['type']\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\tforeach ( $countries as $key => $country ) {\n\t\t\t\t\t\t$selected = '';\n\t\t\t\t\t\tif ( is_array( $value ) && in_array( $key, $value ) ) {\n\t\t\t\t\t\t\t$selected = 'selected';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tprintf( '<option value=\"%1$s\" %2$s >%3$s</option>',\n\t\t\t\t\t\t\t$key,\n\t\t\t\t\t\t\t$selected,\n\t\t\t\t\t\t\t$country\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\techo \"</select>\";\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t// Select filed render\n\t\t\t\tcase 'select':\n\t\t\t\t\t\n\t\t\t\t\t$countries = $field['countries'];\n\t\t\t\t\tprintf( '<select id=\"%1$s-%2$s\" name=\"%1$s[%2$s]\">',\n\t\t\t\t\t\t$option_name,\n\t\t\t\t\t\t$field['id']\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\tforeach ( $countries as $country ) {\n\t\t\t\t\t\t$selected = '';\n\t\t\t\t\t\tif ( $value == $country ) {\n\t\t\t\t\t\t\t$selected = 'selected';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tprintf( '<option value=\"%1$s\" %2$s >%3$s</option>',\n\t\t\t\t\t\t\t$country,\n\t\t\t\t\t\t\t$selected,\n\t\t\t\t\t\t\t$country\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t// Radio filed render\n\t\t\t\tcase 'radio':\n\t\t\t\t\t\n\t\t\t\t\t$conditions = $field['conditions'];\n\t\t\t\t\t\n\t\t\t\t\tforeach ( $conditions as $condition ) {\n\t\t\t\t\t\t$selected = '';\n\t\t\t\t\t\tif ( $value == $condition ) {\n\t\t\t\t\t\t\t$selected = 'checked';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tprintf( '<input id=\"%1$s-%2$s\" name=\"%1$s[%2$s]\" type=\"%3$s\" value=\"%4$s\" %5$s />%6$s<br>',\n\t\t\t\t\t\t\t$option_name,\n\t\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t\t$field['type'],\n\t\t\t\t\t\t\t$condition,\n\t\t\t\t\t\t\t$selected,\n\t\t\t\t\t\t\t$condition\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tcase 'checkbox':\n\t\t\t\t\t\n\t\t\t\t\t$countries = $field['countries'];\n\t\t\t\t\t\n\t\t\t\t\tforeach ( $countries as $key => $country ) {\n\t\t\t\t\t\t$checked = '';\n\t\t\t\t\t\tif ( is_array( $value ) && in_array( $key, $value ) ) {\n\t\t\t\t\t\t\t$checked = 'checked';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tprintf( '<input id=\"%1$s-%2$s\" name=\"%1$s[%2$s][%4$s]\" type=\"%3$s\" value=\"%4$s\" %5$s />%6$s<br>',\n\t\t\t\t\t\t\t$option_name,\n\t\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t\t$field['type'],\n\t\t\t\t\t\t\t$key,\n\t\t\t\t\t\t\t$checked,\n\t\t\t\t\t\t\t$country,\n\t\t\t\t\t\t\t$value\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tcase 'textarea':\n\t\t\t\t\t\n\t\t\t\t\tprintf( '<textarea name=\"%1$s[%2$s]\" id=\"%1$s-%2$s\" placeholder=\"%3$s\" rows=\"5\" cols=\"50\">%4$s</textarea>',\n\t\t\t\t\t\t$option_name,\n\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\tisset( $field['placeholder'] ) ? $field['placeholder'] : '',\n\t\t\t\t\t\t$value\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tcase 'url':\n\t\t\t\t\t\n\t\t\t\t\tprintf( '<input name=\"%1$s[%2$s]\" id=\"%1$s-%2$s\" type=\"%3$s\" placeholder=\"%4$s\" value=\"%5$s\"/>',\n\t\t\t\t\t\t$option_name,\n\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t$field['type'],\n\t\t\t\t\t\tisset( $field['placeholder'] ) ? $field['placeholder'] : '',\n\t\t\t\t\t\t$value\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'number':\n\t\t\t\t\t\n\t\t\t\t\tprintf( '<input name=\"%1$s[%2$s]\" id=\"%1$s-%2$s\" type=\"%3$s\" placeholder=\"%4$s\" value=\"%5$s\" min=\"%6$s\" max=\"%7$s\"/>',\n\t\t\t\t\t\t$option_name,\n\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t$field['type'],\n\t\t\t\t\t\tisset( $field['placeholder'] ) ? $field['placeholder'] : '',\n\t\t\t\t\t\t$value,\n\t\t\t\t\t\t$field['min'],\n\t\t\t\t\t\t$field['max']\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'password':\n\t\t\t\t\t\n\t\t\t\t\tprintf( '<input name=\"%1$s[%2$s]\" id=\"%1$s-%2$s\" type=\"%3$s\" placeholder=\"%4$s\" value=\"%5$s\"/>',\n\t\t\t\t\t\t$option_name,\n\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t$field['type'],\n\t\t\t\t\t\tisset( $field['placeholder'] ) ? $field['placeholder'] : '',\n\t\t\t\t\t\t$value\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'email':\n\t\t\t\t\t\n\t\t\t\t\tprintf( '<input name=\"%1$s[%2$s]\" id=\"%1$s-%2$s\" type=\"%3$s\" placeholder=\"%4$s\" value=\"%5$s\"/>',\n\t\t\t\t\t\t$option_name,\n\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t$field['type'],\n\t\t\t\t\t\tisset( $field['placeholder'] ) ? $field['placeholder'] : '',\n\t\t\t\t\t\t$value\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t\t\n\t\t\t\t\tprintf( '<input name=\"%1$s[%2$s]\" id=\"%1$s-%2$s\" type=\"%3$s\" placeholder=\"%4$s\" value=\"%5$s\"/>',\n\t\t\t\t\t\t$option_name,\n\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t$field['type'],\n\t\t\t\t\t\tisset( $field['placeholder'] ) ? $field['placeholder'] : '',\n\t\t\t\t\t\t$value\n\t\t\t\t\t);\n\t\t\t}\n\t\t\t//End Switch case\n\t\t}", "public function getSelect();", "public function getSelect();", "function get_selected()\n {\n }", "function selMethod($selmethid, $methval) {\n\techo \"<SELECT ID=$selmethid CLASS=selmeth>\\n\";\n\techo \"<OPTION VALUE='PUT'\";\n\tif ($methval == \"PUT\") {\n\t\techo \" SELECTED\";\n\t}\n\techo \">PUT</OPTION>\\n\";\n\techo \"<OPTION VALUE='POST'\";\n\tif ($methval == \"POST\") {\n\t\techo \" SELECTED\";\n\t}\n\techo \">POST</OPTION>\\n\";\n\techo \"<OPTION VALUE='DELETE'\";\n\tif ($methval == \"DELETE\") {\n\t\techo \" SELECTED\";\n\t}\n\techo \">DELETE</OPTION>\\n\";\n\techo \"</SELECT>\\n\";\n\t\n\techo \"<SCRIPT>\\$(\\\"#$selmethid\\\").selectmenu({width : 'auto'});</SCRIPT>\\n\";\n}", "public function selected()\n {\n parent::selected();\n $this->enclosed = null;\n $this->escaped = false;\n $this->collected = '';\n }", "public static function page_select_callback( $val ){\n $id = $val['id'];\n $option_name = $val['option_name'];\n $args = array(\n 'posts_per_page' => -1,\n 'limit' => -1,\n );\n $pages = get_pages($args);\n echo ' <select name=\"'.$option_name .'\">';\n echo '<option value=\"-1\">— Select —</option>';\n\n foreach ($pages as $id => $page) {\n $selected = (esc_attr( get_option($option_name) ) == $page->ID )? 'selected = \"selected\"' : '';\n ?>\n <option <?php echo $selected; ?> value=\"<?php echo $page->ID ?>\"> <?php echo $page->post_title; ?></option>\n <?php\n }\n echo '</select>';\n }", "public static function page_select_callback( $val ){\n $id = $val['id'];\n $option_name = $val['option_name'];\n $args = array(\n 'posts_per_page' => -1,\n 'limit' => -1,\n );\n $pages = get_pages($args);\n echo ' <select name=\"'.$option_name .'\">';\n echo '<option value=\"-1\">— Select —</option>';\n\n foreach ($pages as $id => $page) {\n $selected = (esc_attr( get_option($option_name) ) == $page->ID )? 'selected = \"selected\"' : '';\n ?>\n <option <?php echo $selected; ?> value=\"<?php echo $page->ID ?>\"> <?php echo $page->post_title; ?></option>\n <?php\n }\n echo '</select>';\n }", "public function setSelectedItem($name,$value) {\n $this->addHiddenField('on0',$name);\n $this->addHiddenField('os0',$value);\n }", "function getWidget() {\n // just override the template being used.\n $bHasErrors = false; \n if (count($this->aErrors) != 0) { $bHasErrors = true; }\n\n // at this last moment we pick the template to use \n $total = count($this->aVocab);\n if ($this->bUseSimple === true) {\n $this->sTemplate = 'ktcore/forms/widgets/simple_selection'; \n } else if ($this->bUseSimple === false) {\n $this->sTemplate = 'ktcore/forms/widgets/selection'; \n } else if (is_null($this->bUseSimple) && ($total <= $this->USE_SIMPLE)) {\n $this->sTemplate = 'ktcore/forms/widgets/simple_selection';\n } else {\n $this->sTemplate = 'ktcore/forms/widgets/selection';\n }\n \n $oTemplating =& KTTemplating::getSingleton(); \n $oTemplate = $oTemplating->loadTemplate($this->sTemplate);\n\n // have to do this here, and not in \"configure\" since it breaks \n // entity-select.\n $unselected = KTUtil::arrayGet($this->aOptions, 'unselected_label');\n if (!empty($unselected)) {\n // NBM: we get really, really nasty interactions if we try merge\n // NBM: items with numeric (but important) key values and other\n // NBM: numerically / null keyed items\n $vocab = array();\n $vocab[] = $unselected;\n foreach ($this->aVocab as $k => $v) {\n $vocab[$k] = $v;\n }\n \n $this->aVocab = $vocab;\n\n // make sure its the selected one if there's no value specified.\n if (empty($this->value)) {\n $this->value = 0;\n }\n }\n\n // performance optimisation for large selected sets.\n if ($this->bMulti) {\n $this->_valuesearch = array();\n $value = (array) $this->value;\n foreach ($value as $v) {\n $this->_valuesearch[$v] = true;\n }\n }\n \n $aTemplateData = array(\n \"context\" => $this,\n \"name\" => $this->sName,\n \"has_id\" => ($this->sId !== null),\n \"id\" => $this->sId,\n \"has_value\" => ($this->value !== null),\n \"value\" => $this->value,\n \"options\" => $this->aOptions,\n 'vocab' => $this->aVocab,\n );\n return $oTemplate->render($aTemplateData);\n }", "private function handleOption() : void\n {\n switch ($this->selectedOption) {\n case QAOptionsEnum::ADD:\n $this->addQuestion();\n break;\n\n case QAOptionsEnum::VIEW:\n $this->viewQuestion();\n break;\n\n case QAOptionsEnum::SHOW_ANSWERS:\n $this->showAnswers();\n break;\n\n case QAOptionsEnum::QA_EXIT:\n $this->exit();\n break;\n }\n\n $this->showOptions($this->console);\n }", "public static function select( $var, $label, $values, $option = '' ) {\n\t\tif ( method_exists( 'Yoast_Form', 'select' ) ) {\n\t\t\tif ( $option !== '' ) {\n\t\t\t\tYoast_Form::get_instance()->set_option( $option );\n\t\t\t}\n\n\t\t\tYoast_Form::get_instance()->select( $var, $label, $values );\n\n\t\t\treturn;\n\t\t}\n\n\t\treturn self::admin_pages()->select( $var, $label, $option );\n\t}", "function output_term_select_row( string $label, string $key, $taxonomy_or_terms, $val, string $field = 'slug' ): void {\n\twp_enqueue_style( 'wpinc-meta-field' );\n\t$terms = is_array( $taxonomy_or_terms ) ? $taxonomy_or_terms : get_terms( $taxonomy_or_terms );\n\tif ( ! is_array( $terms ) ) {\n\t\t$terms = array();\n\t}\n\t?>\n\t<div class=\"wpinc-meta-field-single select\">\n\t\t<label>\n\t\t\t<span><?php echo esc_html( $label ); ?></span>\n\t\t\t<select name=\"<?php echo esc_attr( $key ); ?>\">\n\t<?php\n\tforeach ( $terms as $t ) {\n\t\t$name = $t->name;\n\t\t$tf = get_term_field( $field, $t, '', 'raw' );\n\t\techo '<option value=\"' . esc_attr( $val ) . '\"' . selected( $tf, $val, false ) . '>' . esc_html( $name ) . '</option>';\n\t}\n\t?>\n\t\t\t</select>\n\t\t</label>\n\t</div>\n\t<?php\n}", "function testGuessItsSelectIfOptionsAreSet() {\n\t\t$result = $this->helper->__guessInputType('Test.foo', array('options' => array()));\n\t\t$this->assertEqual($result, 'select');\n\t}", "private static function renderSelect($value)\n {\n return $value;\n }", "function awm_select_options()\n {\n return array(\n 'options' => array(\n 'label' => __('Options', 'extend-wp'),\n 'case' => 'repeater',\n 'include' => array(\n 'option' => array(\n 'label' => __('Value', 'extend-wp'),\n 'case' => 'input',\n 'type' => 'text',\n ),\n 'label' => array(\n 'label' => __('Label', 'extend-wp'),\n 'case' => 'input',\n 'type' => 'text',\n ),\n ),\n ),\n );\n }" ]
[ "0.67317617", "0.67007697", "0.61267126", "0.6101564", "0.6092063", "0.6082261", "0.59615076", "0.5959076", "0.59364", "0.5885151", "0.58820623", "0.58743864", "0.58718723", "0.5857547", "0.58489746", "0.5836531", "0.5825224", "0.58173037", "0.58064955", "0.57943064", "0.5789808", "0.57831657", "0.5774297", "0.5736056", "0.56976455", "0.56864786", "0.5682357", "0.5657142", "0.56420416", "0.56407815", "0.563702", "0.5624433", "0.5622002", "0.56214714", "0.5611404", "0.5611404", "0.5611404", "0.5611404", "0.5559547", "0.5545755", "0.55364853", "0.5531455", "0.5526964", "0.5523142", "0.55139095", "0.5512524", "0.5512524", "0.55034435", "0.5497906", "0.54946476", "0.54911953", "0.54857457", "0.5484366", "0.5484366", "0.54808027", "0.54761434", "0.546377", "0.5460877", "0.5460351", "0.54549944", "0.54495454", "0.54477954", "0.54444164", "0.54413843", "0.5439996", "0.54319733", "0.5431062", "0.5424881", "0.54239607", "0.53984636", "0.5385981", "0.53710043", "0.53572077", "0.53522485", "0.53512734", "0.5350876", "0.53471845", "0.53321034", "0.53317946", "0.53101015", "0.5304322", "0.52919704", "0.5273225", "0.52695394", "0.5255015", "0.52405536", "0.52405536", "0.52310675", "0.52268106", "0.52266604", "0.5224339", "0.5224339", "0.5219822", "0.5218884", "0.520835", "0.52073205", "0.5200016", "0.51841766", "0.517896", "0.5176011" ]
0.71186876
0
/ Setting a caption The "caption" is the default text which appears on the select field when no option has been selected yet. This is usally a message indicating that the user should choose something: mdx:Caption Outputs: mdx:Caption o httidy
function testCaption(){ #mdx:Caption $select = new HtSelect('id_category'); $select->options([1=>'Category1',2=>'Category2',3=>'Category3']); $select->caption('CHOOSE A CATEGORY:'); #/mdx echo $select $this->expectOutputRegex("/select.*?CHOOSE A CATEGORY.*?/s"); echo $select; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function testCaptionValue(){\n\t\t#mdx:CaptionValue\n\t\t$select = new HtSelect('id_category');\n\t\t$select->options([1=>'Category1',2=>'Category2',3=>'Category3']);\n\t\t$select->caption('CHOOSE A CATEGORY:', 'none'); # change value to 'none'\n\t\t#/mdx echo $select\n\t\t$this->expectOutputRegex(\"/select.*?option.*?none.*?CHOOSE A CATEGORY.*?/s\");\n\t\techo $select;\n\t}", "public function setCaption($caption) {\n\t\t$this->caption = $caption;\n\t}", "function set_caption($caption)\n\t{\n\t\t$this->caption = $caption;\n\t}", "public function setCaption(?string $caption): void\n\t{\n\t\t$this->caption = $caption;\n\t}", "function getModifyCaption() \r\n \t{\r\n \t\treturn '';\r\n \t}", "public function getCaption() {}", "public function renderCaption() {\n if (!empty($this->caption)) {\n return self::html()->tag('<caption{:options}>{:content}</caption>', array('content' => $this->caption, 'options' => $this->captionOptions), $this->captionOptions);\n } else {\n return false;\n }\n }", "function setCaption($cap) {\n\t\t$this->lobSub->lobCaption = $cap;\n\t}", "public function caption($caption)\n {\n return $this->setProperty('caption', $caption);\n }", "private function _set_photo_caption($value){\n if(!empty($value)){\n $this->_photo_caption = $value;\n }else{\n throw new Exception(\"photo_caption must be a nonempty string\");\n }\n }", "function getCaption() {return $this->readCaption();}", "function XoopsFormTextDateSelect($caption, $name, $size = 15, $value= 0)\n\t{\n\t\t$this->XoopsFormText($caption, $name, $size, 25, $value);\n\t}", "public function getCaption(): string\n {\n return $this->attrs['caption'] ?? '';\n }", "public function getCaption()\n {\n return $this->caption;\n }", "function set_caption($alt, $title, $iptc_caption, $filename)\n {\n $values = array($this->_params->get('caption_type_iptc') => $iptc_caption,\n $this->_params->get('caption_type_filename') => $filename,\n $this->_params->get('caption_type_title') => $title,\n $this->_params->get('caption_type_alt') => $alt);\n\n ksort($values);\n $caption = '';\n foreach ($values as $key => $val) {\n if ($key and $val) {\n $caption = $val;\n break;\n }\n }\n\n\n return $caption;\n }", "function getAddCaption() \r\n \t{\r\n \t\treturn '';\r\n \t}", "public function getCaption() {\n\t\treturn $this->caption;\n\t}", "public function get_caption($key = 0)\n {\n }", "function OptionBox($label, $value, $defaultvalue, $text)\n{\n $result = '';\n\tfor ($i=0; $i<count($label); $i++)\n\t{\n\t\t$result .= '<option label=\"'.$label[$i];\n\t\t$result .= '\" value=\"'.$value[$i].'\" ';\n\t\tif (isset($defaultvalue))\n\t\t{\n\t \tif ($value[$i]==$defaultvalue)\n\t \t\t{\n\t \t\t\t$result .= 'selected=\"selected\" ';\n\t \t\t}\n\t\t}\n\t \t$result .= '>'.$text[$i].'</option>';\n\t}\n\treturn $result;\n}", "public function addCaption($text)\n {\n $this->captionCount++;\n $this->captionStarted = $this->timer->elapsedAsSubripTime();\n $this->captionText = $text;\n }", "public function getCaption()\n {\n return $this->_caption;\n }", "public function renderCaption()\n {\n if (!empty($this->caption)) {\n return Html::tag('caption', $this->caption, $this->captionOptions);\n }\n\n return false;\n }", "public function get_caption() {\n\t\treturn __( 'Automatic Translation', 'wpml-translation-management' );\n\t}", "function meta_box_select( $args = array(), $value = false ) {\n\t\t\t$name = preg_replace( \"/[^A-Za-z_-]/\", '-', $args['name'] ); ?>\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $name; ?>\"><?php echo $args['title']; ?></label>\n\t\t\t\t<?php if ( !empty( $args['sep'] ) ) echo '<br />'; ?>\n\t\t\t\t<select name=\"<?php echo $name; ?>\" id=\"<?php echo $name; ?>\" style=\"width:60px\">\n\t\t\t\t\t<?php // echo '<option value=\"\"></option>'; ?>\n\t\t\t\t\t<?php $i = 0; foreach ( $args['options'] as $option => $val ) { $i++; ?>\n\t\t\t\t\t\t<option value=\"<?php echo esc_attr( $val ); ?>\" <?php selected( esc_attr( $value ), esc_attr( $val ) ); //if ( $i == 1 ) echo 'selected=\"selected\"'; ?>><?php echo ( !empty( $args['use_key_and_value'] ) ? $option : $val ); ?></option>\n\t\t\t\t\t<?php } ?>\n\t\t\t\t</select>\n\t\t\t\t<?php if ( !empty( $args['description'] ) ) echo '<br /><span class=\"howto\">' . $args['description'] . '</span>'; ?>\n\t\t\t</p>\n\t\t\t<?php\n\t\t}", "function captionError($captionBox)\n{\n\t// Check if anything has been entered into the caption box\n\tif(!isset($_REQUEST[$captionBox]))\n\t\techo \"<p style=\\\"color:red;\\\">Please enter a caption.</p>\\n\";\n\telse\n\t{\n\t\t// Trim any whitespace\n\t\t$caption = trim($_REQUEST[$captionBox]);\n\t\t\n\t\t// Check if the entered caption is empty or more than 20 characters\n\t\tif( (strlen($caption) == 0) || (strlen($caption) > 20) )\n\t\t\techo \"<p style=\\\"color:red;\\\">Please enter a caption that is less than 20 characters long.</p>\\n\";\n\t}\n}", "public function getCaption()\n\t{\n\t\tif ($this->caption instanceof Html && $this->caption->title) {\n\t\t\treturn $this->caption->title($this->getDataGrid()\n\t\t\t\t->translate($this->caption->title));\n\t\t} else {\n\t\t\treturn $this->getDataGrid()\n\t\t\t\t->translate($this->caption);\n\t\t}\n\t}", "function image_add_caption($html, $id, $caption, $title, $align, $url, $size, $alt = '')\n {\n }", "function TableCaption() {\n\t\tglobal $ReportLanguage;\n\t\treturn $ReportLanguage->TablePhrase($this->TableVar, \"TblCaption\");\n\t}", "function TableCaption() {\n\t\tglobal $ReportLanguage;\n\t\treturn $ReportLanguage->TablePhrase($this->TableVar, \"TblCaption\");\n\t}", "public function render_content()\n {\n ?>\n <label>\n\t\t\t<select <?php $this->link(); ?>>\n\t\t\t\t<?php\n\t\t\t\tprintf('<option value=\"%s\" %s>%s</option>', 'none', selected($this->value(), 'none', false), 'none');\n\t\t\t\tprintf('<option value=\"%s\" %s>%s</option>', 'capitalize', selected($this->value(), 'capitalize', false), 'capitalize');\n\t\t\t\tprintf('<option value=\"%s\" %s>%s</option>', 'uppercase', selected($this->value(), 'uppercase', false), 'uppercase');\n\t\t\t\tprintf('<option value=\"%s\" %s>%s</option>', 'lowercase', selected($this->value(), 'lowercase', false), 'lowercase');\n\t\t\t\t?>\n </select>\n\t\t\t<p class=\"description\"><?php echo esc_html( $this->label ); ?></p>\n </label>\n <?php\n }", "public function caption($caption)\n {\n $this->caption = $caption;\n return $this;\n }", "private function getCaption()\n\t{\n\t\t$buffer = '';\n\t\t\n\t\tif(!$this->aImg['sFilename'])\n\t\t\treturn $buffer;\n\t\t\n\t\t// button\n\t\t$link = $this->getCaptionButton();\n\t\t\n\t\t// caption\t\t\n\t\t$buffer .= '<textarea class=\"TextareaDisable\" disabled=\"disabled\">';\n\t\t$buffer .= stripslashes($this->aImg['sCaption']);\n\t\t$buffer .= '</textarea>';\n\t\t$buffer .= '<br /><br />';\n\t\t\t\n\t\t$buffer .= $link;\t\t\t\n\t\treturn $buffer;\t\t\n\t}", "function selectCauses($Empty = 0){\n global $db;\n\n $sql = \"SELECT * FROM event_causes\";\n //Basic::EventLog(\"Projects->getProductsInProjects: \".$sql);\n $res =& $db->query($sql);\n $html = '<select id=\"why\" name=\"why\" disabled>\n <option value=\"0\">Select...</option>';\n if($res){\n while ($row=$res->fetchRow()) {\n $html .= '<option value=\"'.$row['motivo'].'\">'.$row['motivo'].'</option>';\n }\n }\n $html .= '</select>';\n //Basic::EventLog(\"Projects->printSelectIdType: \".$html);\n return $html;\n }", "function metaboxTabOutputHeader ()\n\t{\n\t\techo '<strong>' . __( 'Select item', 'avhamazon' ) . '</strong><br />';\n\t}", "protected function caption_style() {\n\t\t$this->start_controls_section(\n\t\t\t'section_style_caption',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Caption', 'boostify' ),\n\t\t\t\t'tab' => Controls_Manager::TAB_STYLE,\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'text_color',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Text Color', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'default' => '',\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .widget-image-caption' => 'color: {{VALUE}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'caption_background_color',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Background Color', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .widget-image-caption' => 'background-color: {{VALUE}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_group_control(\n\t\t\tGroup_Control_Typography::get_type(),\n\t\t\tarray(\n\t\t\t\t'name' => 'caption_typography',\n\t\t\t\t'selector' => '{{WRAPPER}} .widget-image-caption',\n\t\t\t\t'scheme' => Scheme_Typography::TYPOGRAPHY_1,\n\t\t\t)\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'caption_padding',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Padding', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::DIMENSIONS,\n\t\t\t\t'size_units' => array( 'px', 'em', '%' ),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .widget-image-caption' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t\t$this->add_responsive_control(\n\t\t\t'caption_space',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Caption Top Spacing', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'range' => array(\n\t\t\t\t\t'px' => array(\n\t\t\t\t\t\t'min' => 0,\n\t\t\t\t\t\t'max' => 100,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'default' => array(\n\t\t\t\t\t'size' => 0,\n\t\t\t\t\t'unit' => 'px',\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .widget-image-caption' => 'margin-top: {{SIZE}}{{UNIT}}; margin-bottom: 0px;',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->end_controls_section();\n\t}", "private function retrieve_caption() {\n\t\treturn $this->retrieve_excerpt_only();\n\t}", "public function caption(){\n\t\tif( $this->caption ) {\n\t\t\treturn $this->caption;\n\t\t}//end if\n\n\t\t$this->caption = @file_get_contents( $this->base_dir.'/'.$this->dir . 'captions/' . $this->filename . '.txt');\n\t\t\n\t\treturn $this->caption;\n\t}", "public static function defaultSelectionLabel(): string\n {\n return Craft::t('app', 'Select organization');\n }", "function initlab_field_mailman_version_cb($args) {\n // Get the value of the setting we've registered with register_setting()\n $options = get_option('initlab_options', []);\n ?>\n <select id=\"<?php echo esc_attr($args['label_for']); ?>\" name=\"initlab_options[<?php echo esc_attr($args['label_for']); ?>]\">\n <?php\n foreach ($args['options'] as $value => $label) {\n ?>\n <option value=\"<?php echo esc_attr($value)?>\" <?php echo array_key_exists($args['label_for'], $options) ? selected($options[$args['label_for']], $value, false) : ''; ?>>\n <?php esc_html_e($label, 'initlab-addons'); ?>\n </option>\n <?php\n }\n ?>\n </select>\n <?php\n}", "public function setCommandCaption($value)\n {\n if (is_string($value) === false)\n throw new SystemException(SystemException::EX_INVALIDPARAMETER, 'Parameter = value');\n \n $this->commandCaption = $value;\n }", "public function setCaption(string $caption): self\n {\n $this->caption = $caption;\n return $this;\n }", "public function setCaptionPosition($captionPosition) {}", "function msgbox($caption, $message) {\n\treturn \"<fieldset class=\\\"msgbox\\\"><legend>\" .\n\t\t\"<img src=\\\"../images/huh.png\\\" class=\\\"picto\\\" alt=\\\"?\\\" /> \" .\n\t\t$caption . \"</legend>\\n\" .\n\t\t$message .\n\t\t\"</fieldset>\\n\\n\";\n}", "protected function renderSimulateUserSelectAndLabel() {}", "function getFieldTitle($value = null){\n\t\t$form_ret = '';\n\t\t$dataField = get_option('axceleratelink_srms_opt_title');\n\t\t$dataTitle = get_option('axceleratelink_srms_opt_tit_title');\n\t\t$tooltip = setToolTipNotification('title');\t\t\n\t\tif ($dataField == 'true'){\n\t\t\t$form_ret .= \"</br><label>\".$dataTitle.(get_axl_req_fields('title') === 'title' ? '<span class=\"red\">*</span>' : '').$tooltip.\"</label></br><select name='title' id='title'><option value='Mr' \".($value == 'Mr'? 'selected': '').\">Mr</option><option value='Ms' \".($value == 'Ms'? 'selected': '').\">Ms</option><option value='Mrs' \".($value == 'Mrs'? 'selected': '').\">Mrs</option><option value='Others' \".($value == 'Others'? 'selected': '').\">Others</option></select></br>\";\n\t\t}\n\t\treturn $form_ret;\n\t}", "public function getTagName ()\n\t{\n\t\treturn 'caption';\n\t}", "public function setDescription($value) {\n\t\tif($value == \"\") { $value = \"None\"; }\n\t\tself::$_description = $value;\n\t}", "private function addCaption(string $script, PhotoswipeConfig $config): string\n {\n if (false === $config->hasCaption()) {\n // Remove the caption placeholder from the lightbox script\n return str_replace('[[PSWP_CAPTION]]', '', $script);\n }\n\n $captionScript = <<<'CAPTION'\n // Adding new caption element .pswp--caption at the end of the photoswipe container\n [[PSWP_LIGHTBOX]].on('uiRegister', function() {\n [[PSWP_LIGHTBOX]].pswp.ui.registerElement({\n name: 'caption',\n order: 9,\n isButton: false,\n appendTo: 'root',\n html: 'Caption text',\n onInit: (el, pswp) => {\n [[PSWP_LIGHTBOX]].pswp.on('change', () => {\n const currSlideElement = [[PSWP_LIGHTBOX]].pswp.currSlide.data.element;\n let captionHTML = '';\n if (currSlideElement) {\n const caption = currSlideElement.querySelector('figcaption');\n if (caption) {\n captionHTML = caption.innerHTML;\n } else {\n captionHTML = currSlideElement.querySelector('img').getAttribute('alt');\n }\n }\n el.innerHTML = captionHTML || '';\n });\n }\n });\n });\n CAPTION;\n\n return str_replace('[[PSWP_CAPTION]]', $captionScript, $script);\n }", "public function caption(string $caption)\n {\n $this->caption = $caption;\n\n return $this;\n }", "public function caption(string $caption)\n {\n $this->caption = $caption;\n\n return $this;\n }", "protected function initCaptionRenderer()\n {\n $this->captionRenderer = new CaptionRenderer();\n }", "public function customizer_help() {\n\t\techo '\n\t\t<li>\n\t\t\t<p>\n\t\t\t\t' . __( 'Example text:', 'hellish-simplicity' ) . ' <code>' . esc_html( $this->default_header_text ) . '</code>\n\t\t\t</p>\n\t\t</li>';\n\t}", "function meta_box_text( $args = array(), $value = false ) {\n\t\t\t$name = preg_replace( \"/[^A-Za-z_-]/\", '-', $args['name'] ); ?>\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $name; ?>\"><?php echo $args['title']; ?></label>\n\t\t\t\t<br />\n\t\t\t\t<input type=\"text\" name=\"<?php echo $name; ?>\" id=\"<?php echo $name; ?>\" value=\"<?php echo esc_attr( $value ); ?>\" size=\"30\" tabindex=\"30\" style=\"width: <?php echo ( !empty( $args['width'] ) ? $args['width'] : '99%' ); ?>;\" />\n\t\t\t\t<?php if ( !empty( $args['description'] ) ) echo '<br /><span class=\"howto\">' . $args['description'] . '</span>'; ?>\n\t\t\t</p>\n\t\t\t<?php\n\t\t}", "function wp_caption_input_textarea($edit_post)\n {\n }", "public function setDefaultText($value)\n\t{\n\t\t$this->setViewState('DefaultText',$value,'');\n\t}", "public function defaultName() { return \"Enter the category name...\"; }", "public function add_option() {\n\t\tadd_option(\n\t\t\t$this->header_text_option, // The header text option\n\t\t\t$this->default_header_text // The default header text\n\t\t);\n\t}", "function close_option($value){\n\t\tif(!isset($value['desc'])) $value['desc']='';\n\t\tif (isset($value['std']) && $value['std']!='' && in_array($value['type'],array('text','color','upload')))\n\t\t\t$value['desc'] .= ' (default: '.$value['std'].')';\n\t\tif($value['desc'])\n\t\t\techo '<a href=\"\" class=\"help-button\"><div class=\"help-dialog\" title=\"'.$value['name'].'\"><p>'.$value['desc'].'</p></div></a>';\n\t\techo $this->after_option;\n\t}", "public function setCaption($content)\n {\n $this->caption = Element::create('caption')->addContent(\n $content\n );\n\n return $this;\n }", "function wpse_74735_caption_shortcode( $attr, $content = NULL )\n{\n $caption = img_caption_shortcode( $attr, $content );\n $caption = str_replace( '<p class=\"wp-caption\"></p>', '<span class=\"wp-caption-text my_new_class', $caption );\n return $caption;\n}", "public function submit_box() {\n\t\tglobal $post;\n\n\t\tif ( ! is_object( $post ) )\n\t\t\treturn;\n\n\t\tif( 'bbp_notice' != $post->post_type )\n\t\t\treturn;\n\n\t\t$type = get_post_meta( $post->ID, '_bbp_notice_type', true );\n\n\t\techo '<div id=\"bbp_notice_type_wrap\">';\n\t\t\techo '<label for=\"bbp_notice_type\">' . __( 'Type:', 'bbpress-notices' ) . '</label>&nbsp;';\n\t\t\techo '<select name=\"bbp_notice_type\" id=\"bbp_notice_type\">';\n\t\t\t\techo '<option value=\"0\">' . __( 'Default', 'bbpress-notices' ) . '</option>';\n\t\t\t\techo '<option value=\"info\"' . selected( 'info', $type, false ) . '>' . __( 'Info', 'bbpress-notices' ) . '</option>';\n\t\t\t\techo '<option value=\"error\"' . selected( 'error', $type, false ) . '>' . __( 'Error', 'bbpress-notices' ) . '</option>';\n\t\t\techo '</select>';\n\t\techo '</div>';\n\t}", "function AddDefaultOptions() {\n\t\n\t\t\t /* MODIFIED CODE */\n\t\n\t\t\t /* Wrap string in gettext function __() */\n\t\t\t add_option(self::PREFIX . '_cheesy_slogan_text', __('you can\\'t beat his prices!', self::PREFIX));\n\t\n\t\t\t /* END MODIFIED CODE */\n\t\n\t\t\t add_option(self::PREFIX . '_horrible_banner_image', '1');\n\t\n\t\t\t add_option(self::PREFIX . '_disgusting_background_enabled', true);\n\t\n\t\t\t add_option(self::PREFIX . '_annoying_popup_enabled', true);\n\t\t}", "function tb_longwave_header_options_callback() {\n\techo '<p>Settings for things visible in the Head of the theme.</p>';\n}", "private function get_caption( $settings ) {\n\t\t$caption = '';\n\t\tif ( 'custom' === $settings['caption_source'] ) {\n\t\t\t$caption = ! empty( $settings['caption'] ) ? $settings['caption'] : '';\n\t\t}\n\t\treturn $caption;\n\t}", "function _action_box_text($options)\n\t{\n\t\t?>\n\t\t\t<div id=\"action_box\" data-arrowpos=\"center\">\n\t\t\t\t<div class=\"container\">\n\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t<?php \n\t\t\t\t\t\t\t// Title\n\t\t\t\t\t\t\tif ( !empty ( $options['page_ac_title'] ) ) \n\t\t\t\t\t\t\t{ \n\t\t\t\t\t\t\t\techo '<div class=\"span12\">';\n\t\t\t\t\t\t\t\techo '<h4 class=\"text\">'.$options['page_ac_title'].'</h4>';\n\t\t\t\t\t\t\t\techo '</div>';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t?>\n\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div><!-- end action box -->\n\t\t<?php\n\t}", "public function setDescription($value);", "public static function option($texte,$valeur=null,$defaut=null){\n $selected = '';\n \n if(is_null($valeur)){\n $valeur = $texte;\n }\n \n if(!is_null($defaut)){\n if($valeur == $defaut){\n $selected = 'selected';\n }\n }\n \n ?>\n <option value=\"<?php echo $valeur;?>\" <?php echo $selected;?> ><?php echo $texte;?></option>\n <?php \n }", "public function actionUpdateImageCaption() \r\n {\r\n extract($_POST);\r\n $res=0;\r\n \r\n\r\n $fileMaster= FileMaster::model()->findByPk($id);\r\n $fileMaster->Title = $caption;\r\n if($fileMaster->save()) $res=1;\r\n else print_r( $fileMaster->getErrors() );\r\n print CJSON::encode($res);\r\n }", "function captogov_form_alter( &$form, &$form_state, $form_id )\n{\n if ($form_id == 'search_api_page_search_form_default_search') { \n $form['keys_1']['#attributes']['placeholder'] = t( 'Search our website' );\n }\n}", "function setDescription( $value )\r\n {\r\n $this->Description = $value;\r\n }", "function setDescription( $value )\r\n {\r\n $this->Description = $value;\r\n }", "private function showOptions() : void\n {\n $selectedOption = $this->console->choice(__('Please cheoose your option:'), $this->getAllOptions() );\n $this->setSelectedOption($selectedOption);\n $this->handleOption();\n }", "function getCaption() {\n\t\treturn $this->lobSub->lobCaption;\n\t}", "public function setTitle(string $text = \"untitled\");", "public function __construct($name, $caption, $value = '', $isRequired = true, $helpMessage = '')\n {\n parent::__construct($name, $caption, $value, $isRequired, $helpMessage);\n }", "public function __construct($name, $caption, $value = '', $isRequired = true, $helpMessage = '')\n {\n parent::__construct($name, $caption, $value, $isRequired, $helpMessage);\n }", "public function __construct($name, $caption, $value = '', $isRequired = true, $helpMessage = '')\n {\n parent::__construct($name, $caption, $value, $isRequired, $helpMessage);\n }", "public function __construct($name, $caption, $value = '', $isRequired = true, $helpMessage = '')\n {\n parent::__construct($name, $caption, $value, $isRequired, $helpMessage);\n }", "function pqrc_display_select_field()\n {\n global $pqrc_countries;\n $option = get_option('pqrc_select');\n\n printf('<select id=\"%s\" name=\"%s\">', 'pqrc_select', 'pqrc_select');\n foreach ($pqrc_countries as $country) {\n $selected = '';\n if ($option == $country) {\n $selected = 'selected';\n }\n printf('<option value=\"%s\" %s>%s</option>', $country, $selected, $country);\n }\n echo \"</select>\";\n }", "final function getCaption($value) {\n $titles = $this->getTitles(array($value));\n if (isset($titles[$value])) $res = $titles[$value];\n else $res = false;\n return $res;\n }", "public function form_field_select ( $args ) {\n\t\t$options = $this->get_settings();\n\t\t\n\t\tif ( isset( $args['data']['options'] ) && ( count( (array)$args['data']['options'] ) > 0 ) ) {\n\t\t\t$html = '';\n\t\t\t$html .= '<select id=\"' . esc_attr( $args['key'] ) . '\" name=\"' . esc_attr( $this->token ) . '[' . esc_attr( $args['key'] ) . ']\">' . \"\\n\";\n\t\t\t\tforeach ( $args['data']['options'] as $k => $v ) {\n\t\t\t\t\t$html .= '<option value=\"' . esc_attr( $k ) . '\"' . selected( esc_attr( $options[$args['key']] ), $k, false ) . '>' . $v . '</option>' . \"\\n\";\n\t\t\t\t}\n\t\t\t$html .= '</select>' . \"\\n\";\n\t\t\techo $html;\n\t\t\t\n\t\t\tif ( isset( $args['data']['description'] ) ) {\n\t\t\t\techo '<p><span class=\"description\">' . $args['data']['description'] . '</span></p>' . \"\\n\";\n\t\t\t}\n\t\t}\n\t}", "public function __construct(\n public string $name,\n public string $label,\n public array $options,\n public string $selected = '',\n public string $placeholder = 'Выберите один из вариантов',\n )\n {\n //\n }", "function option_dropdown($label, $name, $value, $keys, $comment='') {\r\n\t\techo \"<tr valign='top'><th scope='row'>\" . $label . \"</th>\";\r\n\t\techo \"<td><select name='$name'>\";\r\n\r\n\t\tforeach ((array)$keys as $key => $description) {\r\n\t\t\tif ($key == $value)\r\n\t\t\t\t$selected = \"selected\";\r\n\t\t\telse\r\n\t\t\t\t$selected = \"\";\r\n\r\n\t\t\techo \"<option value='\" . htmlentities($key, ENT_QUOTES, 'UTF-8') . \"' $selected>$description</option>\";\r\n\t\t}\r\n\t\techo \"</select>\";\r\n\t\techo \" $comment</td></tr>\";\r\n\t}", "function select_option()\r\n{}", "function okrs_related_to_select($value)\n{\n\n $selected = '';\n if($value == 'okrs'){\n $selected = 'selected';\n }\n echo \"<option value='okrs' \".$selected.\">\".\n _l('okrs').\"\n </option>\";\n\n}", "public function setCaption($caption)\n {\n $this->vkarg_caption = $caption;\n\n return $this;\n }", "function get_meta_select( $args = array(), $value = false ) { \r\r\n extract($args);\r\r\n ?>\r\r\n\t<tr>\r\r\n\t\t<th style=\"width:10%;\"><label for=\"<?php\t \t echo $args['name']; ?>\"><?php\t \t echo $args['title']; ?></label></th>\r\r\n\t\t<td>\r\r\n\t\t\t<select name=\"<?php\t \t echo $args['name']; ?>\" id=\"<?php\t \t echo $args['name']; ?>\">\r\r\n\t\t\t\t<option value=\"\"></option>\r\r\n\t\t\t\t<?php\t \t foreach ( $args['options'] as $option => $val ) : ?>\r\r\n\t\t\t\t\t<option <?php\t \t if ( htmlentities( $value, ENT_QUOTES ) == $val ) echo ' selected=\"selected\"'; ?> value=\"<?php\t \t echo $val; ?>\"><?php\t \t if ( __( 'Template:', 'hybrid') == $args['title'] ) echo $option; else echo $val; ?></option>\r\r\n\t\t\t\t<?php\t \t endforeach; ?>\r\r\n\t\t\t</select>\r\r\n\t\t\t<br /><small><?php\t \t echo $args['description']; ?></small>\r\r\n\t\t</td>\r\r\n\t</tr>\r\r\n\t<?php\t \t\r\r\n}", "public function updateGalCaption($galImageID)\r\n\t{\r\n\t\t// Get user input\r\n\t\t$caption = $_POST['caption'];\r\n\r\n\t\t// Update DB\r\n\t\t$this->db->update('galImage', array('caption' => $caption), \"`galImageID` = \".$galImageID);\r\n\t\techo json_encode(array('error' => false));\r\n\t}", "public function render_content()\n {\n ?>\n <label>\n\t\t\t<select <?php $this->link(); ?>>\n\t\t\t\t<?php\n\t\t\t\tprintf('<option value=\"%s\" %s>%s</option>', 'normal', selected($this->value(), 'normal', false), 'normal');\n\t\t\t\tprintf('<option value=\"%s\" %s>%s</option>', 'bold', selected($this->value(), 'bold', false), 'bold');\n\t\t\t\tprintf('<option value=\"%s\" %s>%s</option>', '100', selected($this->value(), '100', false), '100');\n\t\t\t\tprintf('<option value=\"%s\" %s>%s</option>', '200', selected($this->value(), '200', false), '200');\n\t\t\t\tprintf('<option value=\"%s\" %s>%s</option>', '300', selected($this->value(), '300', false), '300');\n\t\t\t\tprintf('<option value=\"%s\" %s>%s</option>', '400', selected($this->value(), '400', false), '400');\n\t\t\t\tprintf('<option value=\"%s\" %s>%s</option>', '500', selected($this->value(), '500', false), '500');\n\t\t\t\tprintf('<option value=\"%s\" %s>%s</option>', '600', selected($this->value(), '600', false), '600');\n\t\t\t\tprintf('<option value=\"%s\" %s>%s</option>', '700', selected($this->value(), '700', false), '700');\n\t\t\t\tprintf('<option value=\"%s\" %s>%s</option>', '800', selected($this->value(), '800', false), '800');\n\t\t\t\tprintf('<option value=\"%s\" %s>%s</option>', '900', selected($this->value(), '900', false), '900');\n\t\t\t\t?>\n </select>\n\t\t\t<p class=\"description\"><?php echo esc_html( $this->label ); ?></p>\n </label>\n <?php\n }", "function testOptionsFunction(){\n\t\t#mdx:OptionsFunction\n\t\t$choice = new SimpleChoice(\"category\");\n\t\t$choice->options(function(){\n\t\t\t// pretend this was fetched from the db\n\t\t\t$rows = [\n\t\t\t\t['id'=>1,'name'=>'Action'],\n\t\t\t\t['id'=>2,'name'=>'Drama'],\n\t\t\t\t['id'=>3,'name'=>'Sci-fi']\n\t\t\t];\n\n\t\t\treturn $rows;\n\n\t\t})->context(['category'=>3]); // selects category 3\n\t\t#/mdx echo $choice\n\t\t$this->assertContains(\"<b>3 - Sci-fi\",\"$choice\");\n\n\t}", "function text($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\t\t\techo \"<input type='text' size='57' style='\" . $this->width($args['width']) . \"' \" . $this->placeholder($args['placeholder']) . \" name='\" . $args['formname'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\t\r\n\t\t\t$this->description($args['description']);\r\n\t\t}", "public function displayAddFormOption() {\n $L = $this->getLangStrings();\n\n $LANG = Core::$L;\n $root_url = Core::getRootUrl();\n\n $select = mb_strtoupper($LANG[\"word_select\"]);\n\n echo <<< END\n <table width=\"100%\">\n <tr>\n <td width=\"49%\" valign=\"top\">\n <div class=\"grey_box add_form_select\">\n <span style=\"float:right\">\n <input type=\"button\" name=\"form_builder\" class=\"blue bold\" value=\"$select\"\n onclick=\"window.location='$root_url/modules/form_builder/admin/add_form.php'\" />\n </span>\n <div class=\"bold\">{$L[\"module_name\"]}</div>\n <div class=\"medium_grey\">{$L[\"text_form_builder_add_form_section\"]}</div>\n </div>\n </td>\n <td width=\"2%\"> </td>\n <td width=\"49%\"></td>\n </tr>\n </table>\nEND;\n }", "public function getTitle($caption)\n {\n return \" <title>$caption</title>\\n\";\n }", "function bb_print_mystique_option( $option ) {\r\n\techo bb_get_mystique_option( $option );\r\n}", "function settings_html() {\n $this->render_setting( 'label_any' );\n }", "public function name() {\n\t\treturn __( 'Option Container', 'thrive-cb' );\n\t}", "function kstFilterShortcodeCaptionAndWpCaption($attr, $content = null) {\n $output = apply_filters('kst_wp_caption_shortcode', '', $attr, $content);\n\n if ( $output != '' )\n return $output;\n\n extract(shortcode_atts(array(\n 'id'\t=> '',\n 'align'\t=> '',\n 'width'\t=> '',\n 'caption' => ''\n ), $attr));\n\n if ( $id )\n $id = 'id=\"' . $id . '\" ';\n\n if (!empty($width) )\n\n $width = ( !empty($width) )\n ? ' style=\"width: ' . ((int) $width) . 'px\" '\n : '';\n\n $better = '<div ' . $id . $width . 'class=\"wp_attachment\">';\n $better .= do_shortcode( $content );\n if ( !empty($caption) )\n $better .= '<div class=\"wp_caption\">' . $caption .'</div>';\n $better .= '</div>';\n\n return $better;\n }", "function updateOption($caption,$value,$type,$db) {\r\n//\t$res=mysql_query($sql,$db);\r\n\r\n}", "public function hasCaption()\n {\n return $this->caption !== null;\n }", "function uds_pricing_render_general_options_text($key, $value)\n{\n\tglobal $uds_pricing_general_options;\n\t$field = $uds_pricing_general_options[$key];\n\t$out = \"\n\t\t<div>\n\t\t\t<label>{$field['label']}</label>\n\t\t\t<input type='text' name='uds-pricing-$key' value='$value' class='uds-pricing-$key' />\n\t\t</div>\n\t\";\n\treturn $out;\n}" ]
[ "0.72729474", "0.69511145", "0.6939236", "0.6899094", "0.6625466", "0.651141", "0.64263403", "0.64084697", "0.62733597", "0.6265194", "0.6231165", "0.6140197", "0.6131023", "0.6128065", "0.6066711", "0.6044273", "0.60297805", "0.60256106", "0.6001828", "0.5976827", "0.59663606", "0.59535694", "0.59445995", "0.59387314", "0.5902391", "0.5876506", "0.58437693", "0.57934904", "0.57934904", "0.5736946", "0.572585", "0.5711329", "0.5691864", "0.5672998", "0.56536794", "0.5638933", "0.562236", "0.5619884", "0.5600133", "0.5576742", "0.5569663", "0.5551352", "0.5545514", "0.5522999", "0.54899985", "0.54720545", "0.54418427", "0.5440735", "0.5430463", "0.5430463", "0.5415759", "0.54143107", "0.54029834", "0.5392578", "0.5386655", "0.53866476", "0.53797626", "0.53747624", "0.53689086", "0.536679", "0.53628594", "0.5354574", "0.5354465", "0.53540856", "0.53514934", "0.5332835", "0.5318857", "0.5294244", "0.5293254", "0.5290935", "0.5290935", "0.5284816", "0.5284618", "0.5281804", "0.52803445", "0.52803445", "0.52803445", "0.52803445", "0.5279258", "0.5277502", "0.5271873", "0.52512014", "0.5247534", "0.5245474", "0.5243942", "0.5237417", "0.52345073", "0.5228424", "0.5222715", "0.5221534", "0.52110505", "0.5209801", "0.52045846", "0.5204138", "0.52032727", "0.5199968", "0.51984304", "0.5197125", "0.5196484", "0.51873887" ]
0.7215593
1
/ Notice that by default the value "0" is used for the caption option. This means that when the form gets sent, if no option has been selected, then the "0" value will be sent as the category id, which in most cases would mean "no category". However, you can change that value if you want by using a second paramenter to the `caption` method: mdx:CaptionValue Outputs: mdx:CaptionValue o httidy
function testCaptionValue(){ #mdx:CaptionValue $select = new HtSelect('id_category'); $select->options([1=>'Category1',2=>'Category2',3=>'Category3']); $select->caption('CHOOSE A CATEGORY:', 'none'); # change value to 'none' #/mdx echo $select $this->expectOutputRegex("/select.*?option.*?none.*?CHOOSE A CATEGORY.*?/s"); echo $select; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function testCaption(){\n\t\t#mdx:Caption\n\t\t$select = new HtSelect('id_category');\n\t\t$select->options([1=>'Category1',2=>'Category2',3=>'Category3']);\n\t\t$select->caption('CHOOSE A CATEGORY:');\n\t\t#/mdx echo $select\n\t\t$this->expectOutputRegex(\"/select.*?CHOOSE A CATEGORY.*?/s\");\n\t\techo $select;\n\t}", "public function defaultName() { return \"Enter the category name...\"; }", "private function setCategoryDefaultValues()\n {\n if($this->formMode === 'add')\n {\n $this->data['category_title'] = '';\n }\n else if(empty($_POST['category_submit']))\n {\n // Retrieve data from database if NOT POST request\n $data = $this->post_categories_model->getByID($this->data['category_id']);\n $this->data['category_title'] = $data['Post_Category_Title'];\n }\n }", "function gtags_group_category_form() {\n\tglobal $bp, $show_group_add_form_cats;\t\n\tif ($show_group_add_form_cats) return; // prevents showing form twice\n\t$show_group_add_form_cats = true;\n\n\t// the group category\t\n\t$group_cats = get_option('gtags_category'); \n\tif (empty($group_cats)) return;\n\t\n\t$selected = groups_get_groupmeta( $bp->groups->current_group->id, 'gtags_group_cat' ); \n\t?><label for=\"group-cat\"><?php _e( 'Group Category', 'gtags' ) ?></label>\n\t<select name=\"group-cat\" id=\"group-cat\" />\n\t\t<option value=\"\"><?php _e('--- SELECT ONE ---', 'gtags') ?></option>\n\t<?php foreach ( $group_cats as $tag => $desc ): ?>\n\t\t<?php if ( !$desc ) $desc = $tag; ?>\n\t\t<option value=\"<?php echo $tag; ?>\" <?php if ( $tag == $selected ) echo 'selected=\"selected\"' ?>><?php echo $desc; ?></option>\n\t<?php endforeach; ?>\n\t</select>\n\t<i><?php _e('(the primary group activity)', 'gtags'); ?></i><br><?php \t\n}", "public function categoryForm(){\n $table = \"categories\";\n $cresults = $this->getAllrecords($table);\n foreach($cresults as $category){\n echo('<option value=\"'.$category[\"cat_id\"].'\">'.$category[\"cat_name\"].'</option>');\n }\n\n\n }", "function display_addcategory_form($category_name='', $id='')\r\n{\r\n\tglobal $dropbox_cnf;\r\n\r\n\t$title=get_lang('AddNewCategory');\r\n\r\n\tif (isset($id) AND $id<>'')\r\n\t{\r\n\t\t// retrieve the category we are editing\r\n\t\t$sql=\"SELECT * FROM \".$dropbox_cnf['tbl_category'].\" WHERE cat_id='\".Database::escape_string($id).\"'\";\r\n\t\t$result=api_sql_query($sql);\r\n\t\t$row=mysql_fetch_array($result);\r\n\r\n\t\tif ($category_name=='') // after an edit with an error we do not want to return to the original name but the name we already modified. (happens when createinrecievedfiles AND createinsentfiles are not checked)\r\n\t\t{\r\n\t\t\t$category_name=$row['cat_name'];\r\n\t\t}\r\n\t\tif ($row['received']=='1')\r\n\t\t{\r\n\t\t\t$target='received';\r\n\t\t}\r\n\t\tif ($row['sent']=='1')\r\n\t\t{\r\n\t\t\t$target='sent';\r\n\t\t}\r\n\t\t$title=get_lang('EditCategory');\r\n\r\n\t}\r\n\r\n\tif ($_GET['action']=='addreceivedcategory')\r\n\t{\r\n\t\t$target='received';\r\n\t}\r\n\tif ($_GET['action']=='addsentcategory')\r\n\t{\r\n\t\t$target='sent';\r\n\t}\r\n\r\n\r\n\techo \"<form name=\\\"add_new_category\\\" method=\\\"post\\\" action=\\\"\".api_get_self().\"?view=\".$_GET['view'].\"\\\">\\n\";\r\n\techo '<strong>'.$title.'</strong>';\r\n\tif (isset($id) AND $id<>'')\r\n\t{\r\n\t\techo '<input name=\"edit_id\" type=\"hidden\" value=\"'.$id.'\">';\r\n\t}\r\n\techo '<input name=\"target\" type=\"hidden\" value=\"'.$target.'\">';\r\n\techo \"<table border=\\\"0\\\">\\n\";\r\n\techo \"\\t<tr>\\n\";\r\n\techo \"\\t<td>\\n\";\r\n\techo get_lang('CategoryName').': ';\r\n\techo \"\\t</td>\\n\";\r\n\techo \"\\t<td>\\n\";\r\n\techo \"<input type=\\\"text\\\" name=\\\"category_name\\\" value=\\\"\".$category_name.\"\\\" />\";\r\n\techo \"\\t</td>\\n\";\r\n\techo \"\\t</tr>\\n\";\r\n\techo \"\\t<tr>\\n\";\r\n\techo \"\\t<td valign=\\\"top\\\">\\n\";\r\n\techo \"\\t</td>\\n\";\r\n\techo \"\\t<td>\\n\";\r\n\techo \"<input type=\\\"submit\\\" name=\\\"StoreCategory\\\" value=\\\"\".get_lang('Ok').\"\\\">\";\r\n\techo \"\\t</td>\\n\";\r\n\techo \"\\t</tr>\\n\";\r\n\techo \"</table>\\n\";\r\n\techo \"</form>\";\r\n}", "public function prodCatCaption($catid){\t\t\n\t\t\t\t$cat \t\t\t\t= \t\"\";\n\t\t\t\t$arrayValues2 \t\t=\tarray('caption');\n\t\t\t\t$retArray2 \t\t\t=\tself::retrieveEntry(\"itemcategory\", $arrayValues2, \"\", \"id='$catid' AND status='published'\");\n\t\t\t\tforeach ($retArray2 as $retIndex => $retValue){\n\t\t\t\t\t$$retIndex \t\t=\t$retValue;\n\t\t\t\t\t$mainArr \t\t=\texplode('|', $$retIndex);\n\t\t\t\t\t$cat\t\t \t=\t$mainArr[0];\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t}\t\t\t\t\n\t\t\t\treturn $cat;\n\t}", "public function getName()\n {\n return 'category_form';\n }", "function getModifyCaption() \r\n \t{\r\n \t\treturn '';\r\n \t}", "public static function category_box() {\n\t\t\t\n\t\t\tglobal $post;\n\t\t\tglobal $wpdb;\n\t\n\t\t\t$cat_list = $wpdb->get_results( \"SELECT re_int, re_title FROM \".$wpdb->prefix.self::$table_name);?>\n\t\t\t\n\t\t\t<label for=\"siteurl\">Select the appropriate Menu Category for this current dish.<br /></label>\n\t\t\t<p>\n\t\t\t\n\t\t\t\t<?php\n\t\t\t\t\tif(!empty($cat_list)){\n\t\t\t\t\t\techo \"<select style='width:200px' name='cat_id'>\";\n\t\t\t\t\t\tforeach($cat_list as $list => $val){\n\t\t\t\t\t\t\t$sel = \"\";\n\t\t\t\t\t\t\tif(isset($_GET['menucat']) && ($_GET['menucat'] == $val->re_int )) { \n\t\t\t\t\t\t\t\t$sel = ' selected=\"selected\"'; \n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$menucat = get_post_meta($post->ID, \"meta_menucat\", true);\n\t\t\t\t\t\t\t\tif($menucat == $val->re_int ) { $sel = ' selected=\"selected\"';} \n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\techo \"<option value='\".$val->re_int.\"' \".$sel.\">\".$val->re_title.\"</option>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\techo \"</select>\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\techo \"<a href='edit.php?post_type=menucategory-post&page=menu_listings'>Add Categories First.</a>\";\n\t\t\t\t\t}\n\t\t\t\t?>\n\t\t\t\t\n\t\t\t</p>\n\t\t\n\t\t\t<?php\n\t\t}", "public function getCaption() {}", "public function getFormCategory()\n\t{\n\t\treturn strtolower($this->_removeNonAlphaCharacters($this->category));\n\t}", "function getSetupForm($options = array()){\n $form = parent::getSetupForm($options);\n $form->setLegend('Category Options');\n \n $set = $form->createElement('select', 'set');\n $set->setLabel('Set: ');\n $set->setRequired('true');\n \n $service = new Content_Model_CategorySet_Service();\n $results = $service->getObjects();\n\n $options = array();\n foreach($results as $value){\n $options[$value->id] = $value->title;\n }\n\n //$template->addMultiOption('None','');\n $set->setMultiOptions($options);\n $form->addElement($set);\n \n return $form;\n }", "function sos_chapter_change_cat_object() {\n global $wp_taxonomies;\n $labels = &$wp_taxonomies['product_cat']->labels;\n $labels->name = 'Topic';\n $labels->singular_name = 'Topic';\n $labels->add_new = 'Add Topic';\n $labels->add_new_item = 'Add Topic';\n $labels->edit_item = 'Edit Topic';\n $labels->new_item = 'Topic';\n $labels->view_item = 'View Topic';\n $labels->search_items = 'Search Topics';\n $labels->not_found = 'No Topics found';\n $labels->not_found_in_trash = 'No Topics found in Trash';\n $labels->all_items = 'All Topics';\n $labels->menu_name = 'Topic';\n $labels->name_admin_bar = 'Topic';\n}", "public function category() {\n\t\treturn static::get_thrive_advanced_label();\n\t}", "public function actionUpdateImageCaption() \r\n {\r\n extract($_POST);\r\n $res=0;\r\n \r\n\r\n $fileMaster= FileMaster::model()->findByPk($id);\r\n $fileMaster->Title = $caption;\r\n if($fileMaster->save()) $res=1;\r\n else print_r( $fileMaster->getErrors() );\r\n print CJSON::encode($res);\r\n }", "public function get_caption($key = 0)\n {\n }", "private function categoriesFormInputs()\n {\n // Get the field name of the field with the category icon\n // #47631, dwildt, 1-\n //$arrLabels[ 'catIcon' ] = $this->confMap['configuration.']['categories.']['fields.']['categoryIcon'];\n // #47631, #i0007, dwildt, 10+\n switch ( true )\n {\n case( $this->pObj->typoscriptVersion <= 4005004 ):\n $arrLabels[ 'catIcon' ] = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'fields.' ][ 'categoryIcon' ];\n break;\n case( $this->pObj->typoscriptVersion <= 4005007 ):\n default:\n $arrLabels[ 'catIcon' ] = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'fields.' ][ 'marker.' ][ 'categoryIcon' ];\n break;\n }\n // #47631, #i0007, dwildt, 10+\n // Default space in HTML code\n $tab = ' ';\n\n // FOREACH category label\n//$this->pObj->dev_var_dump( $this->arrCategories );\n // #i0118, dwildt, 1-/+\n //foreach ( $this->arrCategories[ 'labels' ] as $labelKey => $labelValue )\n foreach ( ( array ) $this->arrCategories[ 'labels' ] as $labelKey => $labelValue )\n {\n // Get the draft for an input field\n $cObj_name = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'form_input' ];\n $cObj_conf = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'form_input.' ];\n $input = $this->pObj->cObj->cObjGetSingle( $cObj_name, $cObj_conf );\n // replace the category marker\n $input = str_replace( '###CAT###', $labelValue, $input );\n // 4.1.17, 120927, dwildt\n // replace the category marker\n //$labelValueWoSpc = str_replace( ' ', null, $labelValue );\n $labelValueWoSpc = $this->zz_properFormLabel( $labelValue );\n $input = str_replace( '###CAT_WO_SPC###', $labelValueWoSpc, $input );\n // 4.1.17, 120927, dwildt\n // #54548, 131221, dwildt, 6+\n $class = $this->arrCategories[ 'cssClass' ][ $labelKey ];\n if ( !empty( $class ) )\n {\n $class = ' class=\"' . $class . '\"';\n }\n $input = str_replace( '###CLASS###', $class, $input );\n\n // IF draft for an input field contains ###IMG###, render an image\n $pos = strpos( $input, '###IMG###' );\n if ( !( $pos === false ) )\n {\n // SWITCH : Render the image\n switch ( true )\n {\n // #i0062\n case( $labelKey == $this->arrWoCategories[ 'iconKey' ] ):\n $name = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'colours.' ][ 'legend.' ][ $labelKey ];\n $conf = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'colours.' ][ 'legend.' ][ $labelKey . '.' ];\n $img = $this->pObj->cObj->cObjGetSingle( $name, $conf );\n break;\n case( is_array( $this->arrCategories[ 'icons' ] ) ):\n // 4.1.7, dwildt, +\n $this->cObjDataAddArray( array( $arrLabels[ 'catIcon' ] => $this->arrCategories[ 'icons' ][ $labelKey ] ) );\n $img = $this->renderMapMarkerVariablesSystemItem( 'categoryIconLegend' );\n $this->cObjDataRemoveArray( array( $arrLabels[ 'catIcon' ] => $this->arrCategories[ 'icons' ][ $labelKey ] ) );\n // 4.1.7, dwildt, +\n break;\n default:\n // Render the image\n $name = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'colours.' ][ 'legend.' ][ $labelKey ];\n $conf = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'colours.' ][ 'legend.' ][ $labelKey . '.' ];\n $img = $this->pObj->cObj->cObjGetSingle( $name, $conf );\n break;\n }\n // SWITCH : Render the image\n\n $input = str_replace( '###IMG###', $img, $input );\n }\n // IF draft for an input field contains ###IMG###, render an image\n\n $arrInputs[] = $tab . $input;\n }\n // FOREACH category label\n // Move array of input fields to a string\n // #i0118, dwildt, 1-/+\n //$inputs = implode( PHP_EOL, $arrInputs );\n $inputs = implode( PHP_EOL, ( array ) $arrInputs );\n $inputs = trim( $inputs );\n\n // RETURN input fields\n return $inputs;\n }", "function getName() { return 'TestPostAddCategory'; }", "function _arc_meta_category_meta($event, $step, $data, $rs)\n{\n // category types).\n if ($rs['type']!='article') {\n return $data;\n }\n\n // Get the existing meta data for this category.\n $meta = _arc_meta('category', $rs['name'], true);\n\n $form = hInput('arc_meta_id', $meta['id']);\n $form .= '<div class=\"txp-form-field edit-category-arc_meta_title\">';\n $form .= '<div class=\"txp-form-field-label\">' . tag(gtxt('arc_meta_title'), 'label', ' for=\"arc_meta_title\"') . '</div>';\n $form .= '<div class=\"txp-form-field-value\">' . fInput('text', 'arc_meta_title', $meta['title'], '', '', '', '32', '', 'arc_meta_title') . '</div>';\n $form .= '</div>';\n $form .= '<div class=\"txp-form-field edit-category-arc_meta_image\">';\n $form .= '<div class=\"txp-form-field-label\">' . tag(gtxt('arc_meta_image'), 'label', ' for=\"arc_meta_image\"') . '</div>';\n $form .= '<div class=\"txp-form-field-value\">' . fInput('number', 'arc_meta_image', $meta['image'], '', '', '', '32', '', 'arc_meta_image') . '</div>';\n $form .= '</div>';\n $form .= '<div class=\"txp-form-field edit-category-arc_meta_robots\">';\n $form .= '<div class=\"txp-form-field-label\">' . tag(gtxt('arc_meta_robots'), 'label', ' for=\"arc_meta_description\"') . '</div>';\n $form .= '<div class=\"txp-form-field-value\">' . selectInput('arc_meta_robots', _arc_meta_robots(), $meta['robots'], 'arc_meta_robots') . '</div>';\n $form .= '</div>';\n\n return $data . $form;\n}", "function product_category_edit(){\n\t\tglobal $tpl, $config, $meta, $_r, $_l, $_u, $fs;\n\t\t\n\t\t$data = $_r['data'];\n\t\t$data['id'] = $_r['id'];\n\t\t\n\t\tif($data['save'] || $data['apply']){\n\t\t\tif(!$data['title']) $error['title'] = true;\n\t\t\tif(count($error)==0){\n\t\t\t\t$set = array();\n\t\t\t\t$set[] = \"title = '\".add_slash($data['title']).\"'\";\n\t\t\t\t$set[] = \"language_id = '1'\";\n\t\t\t\t$set[] = \"category_id = '0'\";\n\t\t\t\t\n\t\t\t\t$set = implode(', ', $set);\n\t\t\t\tif($data['id']){\n\t\t\t\t\tmysql_q(\"UPDATE product_category SET $set WHERE id = '\".add_slash($data['id']).\"'\");\n\t\t\t\t} else {\n\t\t\t\t\t$data['id'] = mysql_q(\"INSERT INTO product_category SET $set\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($data['save']){\n\t\t\t\t\tredirect(\"product_category.htm\", \"\");\n\t\t\t\t} else{\n\t\t\t\t\tredirect(\"product_category-edit-\".$data['id'].\".htm\", \"\");\n\t\t\t\t}\n\t\t\t}\n\t\t} else if($data['cancel']) {\n\t\t\tredirect(\"product_category.htm\", \"\");\n\t\t}\n\n\t\t$fields = \"\n\t\t[hidden name='id']\n\t\t[input name='title' label='Category Title' error='Please Enter Category Title']\n\t\t[sac class='']\n\t\t\";\n\t\t\n\t\tif(!$data['save'] && $data['id']){\n\t\t\t$data = mysql_q(\"SELECT * FROM product_category WHERE id='\".add_slash($data['id']).\"'\", \"single\");\n\t\t}\n\n\t\t$tpl->assign(\"data\", $data);\n\t\t\n\t\t$form = new form();\n\t\t$form->add($fields);\n\t\t$tpl->assign(\"form1\", $form->build());\n\t\t\n\t\t$main['content'] = $tpl->fetch(\"admin_product_category_edit.tpl\");\n\t\tdisplay($main);\n\t}", "function CategoryForm() {\r\n\r\n\t\t$member = Member::currentUser();\r\n\r\n\t\t// Need to sort out how going to handle multiple instances of category\r\n\t\t// front end grid field : https://github.com/webbuilders-group/silverstripe-frontendgridfield\r\n\t\t// grid field extension : https://github.com/silverstripe-australia/silverstripe-gridfieldextensions\r\n\t\t$category = Category::get()->first();\r\n\t\t$fields = $category->FormFields();\r\n\r\n $actions = FieldList::create(\r\n FormAction::create(\"doCategoryForm\")->setTitle(\"Submit\")->addExtraClass('productive'),\r\n FormAction::create(\"cancel\")->setTitle(\"Cancel\")\r\n );\r\n\r\n $form = Form::create($this, 'CategoryForm', $fields, $actions);\r\n\r\n return $form;\r\n\r\n\t}", "function extra_category_fields( $tag ) { //check for existing featured ID\n $t_id = $tag->term_id;\n $cat_meta = get_option( \"category_$t_id\");\n\t?>\n\t<tr class=\"form-field\">\n\t\t<th scope=\"row\" valign=\"top\"><label for=\"cat_Image_url\"><?php _e('Category Url'); ?></label></th>\n\t\t<td><input type=\"text\" name=\"Cat_meta[cat_url]\" id=\"Cat_meta[img]\" size=\"3\" style=\"width:60%;\" value=\"<?php echo $cat_meta['cat_url'] ? $cat_meta['cat_url'] : ''; ?>\"><br />\n\t <span class=\"description\"><?php _e('Url for category'); ?></span>\n\t\t</td>\n\t</tr>\n\t<?php\n}", "public function category(){\n\t\t$_error = \"Select Category\";\n\t\treturn $_error;\n\t}", "function form($instance)\n {\n $instance = wp_parse_args((array)$instance, $defaults); ?>\n <!-- Category -->\n <p>\n <label for=\"<?php echo $this->get_field_id('categories'); ?>\">Select Category:</label>\n <select id=\"<?php echo $this->get_field_id('categories'); ?>\"\n name=\"<?php echo $this->get_field_name('categories'); ?>\" style=\"width:100%;\">\n <?php $categories = get_categories('hide_empty=0&depth=1&type=post'); ?>\n <?php foreach ($categories as $category) { ?>\n <option value='<?php echo $category->term_id; ?>' <?php if ($category->term_id == $instance['categories']) echo 'selected=\"selected\"'; ?>><?php echo $category->cat_name; ?></option>\n <?php } ?>\n </select>\n </p>\n <?php\n }", "function kulam_acf_prepare_acf_form_post_category_field( $field ) {\n\n\t/**\n\t * Variables\n\t */\n\t$field_label = get_field( 'acf-form_form_category_title' );\n\n\tif ( $field_label ) {\n\n\t\t$field[ 'label' ] = $field_label;\n\n\t}\n\n\t// return\n\treturn $field;\n\n}", "function build_category_html($selected)\n\t{\n\t\tglobal $template, $db;\n\n\t $html = '<select name=\"category_id\" class=\"forminput\">';\n\t\n\t $sql = \"SELECT * FROM \" . GARAGE_CATEGORIES_TABLE . \" ORDER BY title ASC\";\n\t\n\t \tif ( !($result = $db->sql_query($sql)) )\n\t \t{\n\t \tmessage_die(GENERAL_ERROR, 'Could not category of mods for vehicle', '', __LINE__, __FILE__, $sql);\n\t \t}\n\t\n\t while ( $row = $db->sql_fetchrow($result) ) \n\t\t{\n\t\t\t$select = ( $selected == $row['id'] ) ? ' selected=\"selected\"' : '';\n\t\t\t$html .= '<option value=\"' . $row['id'] . '\"' . $select . '>' . $row['title'] . '</option>';\n\t }\n\t\n\t $html .= '</select>';\n\t\n\t\t$template->assign_vars(array(\n\t\t\t'CATEGORY_LIST' => $html)\n\t\t);\n\t\n\t\treturn ;\n\t}", "function getAddCaption() \r\n \t{\r\n \t\treturn '';\r\n \t}", "function the_category_ID($display = \\true)\n {\n }", "function form($instance)\n {\n $defaults = array('category' => '');\n $instance = wp_parse_args(( array )$instance, $defaults);\n $category = $instance['category'];\n ?>\n <p>\n <label for=\"recent_posts_title\"><?php _e('Chọn các category được hiển thị'); ?></label>\n </p>\n\n <p>\n <label for=\"products_category\"><?php _e('Chuyên mục'); ?>:</label>\n <?php\n wp_dropdown_categories(array(\n 'orderby' => 'title',\n 'hide_empty' => false,\n 'name' => $this->get_field_name('category'),\n 'id' => 'products_category',\n 'class' => 'widefat',\n 'selected' => $category\n ));\n ?>\n </p>\n <?php\n\n }", "public function setID($cid) { if($cid == faq_build_clean_input($cid,\"id\")) $this->category_id = $cid; }", "function getCaption() {return $this->readCaption();}", "function getCategoryFields() {\n\t\t\n\t\t$model = $this->getModel();\n\t\t$category_id = JRequest::getVar('id');\n\t\t$form = $model->getFieldForm($category_id, 'category');\n\t\t\n\t\tif (!$form) {\n\t\t\techo \"There was an error creating the form\";\n\t\t\texit();\n\t\t}\n\t\t\n\t\techo '<div class=\"fltlft\" style=\"width:250px;\">';\n\t\techo '<fieldset class=\"adminform\" >';\n\t\techo '<legend>New Category</legend>';\n\t\techo '<div class=\"adminformlist\">';\n\t\tforeach ($form->getFieldset() as $field) {\n\t\t\tJHtml::_('wbty.renderField', $field);\n\t\t}\n\t\techo \"</div></fieldset></div>\";\n\t\t\n\t\texit();\n\t}", "function fill_parent_combo( $form_name, $category_id )\n\t{\n\t\t$q = \"SELECT * FROM title_dev_categories where status = 1\";\n\t\t$r = $this -> db -> getMultipleRecords( $q );\n\t\t$combo = '<select class=\"validate[required] txarea2\" name=\"category_id\" id=\"category_id\" onchange=\"document.uploadAdvert.submit()\" >\n\t\t\t\t\t<option value=\"\">---Please Select Category---</option>';\n\t\tif( $r != false )\n\t\t{\n\t\t\tfor( $i = 0; $i < count( $r ); $i++ )\n\t\t\t{\n\t\t\t\t$selected = $category_id== $r[$i]['category_id'] ? \"selected\" : \"\";\n\t\t\t\t$combo .= '<option '.$selected.' value=\"'.$r[$i]['category_id'].'\">'.$r[$i]['category_title'].'</option>';\n\t\t\t}\t//\tEnd of for Looooooop\n\t\t}\t//\tEnd of if( $r != false )\n\t\t$combo .= '</select>';\n\t\t\n\t\treturn $combo;\n\t}", "public function render_content() {\n\n $categories = get_categories();\n ?>\n <span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n <select <?php $this->link(); ?>>\n <option value=\"0\"><?php esc_html_e( 'All', '__Text_Domain__' );?></option>\n <?php\n foreach ( $categories as $cat ) {\n if ( $cat->count > 0 ) {\n echo '<option value=\"' . esc_attr( $cat->term_id ) . '\" ' . selected( $this->value(), $cat->term_id ) . '>' . esc_attr( $cat->cat_name ) . '</option>';\n }\n }\n ?>\n </select>\n <?php\n }", "public function sanphamdanhmucDoc($category_id){\n\t\t\t$data = $this->getProductInHomeModel($category_id);\n\t\t\t//sử dungj chung 1 form View product\n\t\t\t$this->renderHTML(\"views/frontend/formProductView3.php\",array(\"data\"=>$data));\n\t\t}", "public function getOptionCategoryTitle()\n {\n return $this->optionCategoryTitle;\n }", "public function setCaption($caption) {\n\t\t$this->caption = $caption;\n\t}", "function sensible_category() {\n wp_update_term(1, 'category', array(\n 'name' => 'News',\n 'slug' => 'news', \n 'description' => 'News'\n ));\n }", "function colorpicker_field_add_new_category( $taxonomy ) { ?> \r\n\t<div class=\"form-field term-colorpicker-wrap\"> \r\n\t<label for=\"term-colorpicker\">Category Color</label> \r\n\t<input name=\"_category_color\" value=\"#ffffff\" class=\"colorpicker\" id=\"term-colorpicker\" /> \r\n\t<p>This is the field description where you can tell the user how the color is used in the theme.</p> \r\n\t</div> <?php }", "function question_category_form($course, $current, $recurse=1, $showhidden=false, $showquestiontext=false) {\n global $CFG;\n\n/// Make sure the default category exists for this course\n get_default_question_category($course->id);\n\n/// Get all the existing categories now\n $catmenu = question_category_options($course->id, true);\n\n $strcategory = get_string(\"category\", \"quiz\");\n $strshow = get_string(\"show\", \"quiz\");\n $streditcats = get_string(\"editcategories\", \"quiz\");\n\n echo \"<table><tr><td style=\\\"white-space:nowrap;\\\">\";\n echo \"<strong>$strcategory:</strong>&nbsp;\";\n echo \"</td><td>\";\n popup_form (\"edit.php?courseid=$course->id&amp;cat=\", $catmenu, \"catmenu\", $current, \"\", \"\", \"\", false, \"self\");\n echo \"</td><td align=\\\"right\\\">\";\n echo \"<form method=\\\"get\\\" action=\\\"$CFG->wwwroot/question/category.php\\\">\";\n echo \"<div>\";\n echo \"<input type=\\\"hidden\\\" name=\\\"id\\\" value=\\\"$course->id\\\" />\";\n echo \"<input type=\\\"submit\\\" value=\\\"$streditcats\\\" />\";\n echo '</div>';\n echo \"</form>\";\n echo '</td></tr></table>';\n\n echo '<form method=\"get\" action=\"edit.php\" id=\"displayoptions\">';\n echo \"<fieldset class='invisiblefieldset'>\";\n echo \"<input type=\\\"hidden\\\" name=\\\"courseid\\\" value=\\\"{$course->id}\\\" />\\n\";\n question_category_form_checkbox('recurse', $recurse);\n question_category_form_checkbox('showhidden', $showhidden);\n question_category_form_checkbox('showquestiontext', $showquestiontext);\n echo '<noscript><div class=\"centerpara\"><input type=\"submit\" value=\"'. get_string('go') .'\" />';\n echo '</div></noscript></fieldset></form>';\n}", "public function renderCaption() {\n if (!empty($this->caption)) {\n return self::html()->tag('<caption{:options}>{:content}</caption>', array('content' => $this->caption, 'options' => $this->captionOptions), $this->captionOptions);\n } else {\n return false;\n }\n }", "function setSyncCategoryText()\n {\n }", "public static function category($cat_id, $view)\n\t{\n $html = '<div class=\"control-group\">';\n $html .= '<div class=\"control-label\">';\n $html .= '<label id=\"jform_catid-lbl\" for=\"jform_catid\" class=\"hasPopover required\" title=\"\">';\n $html .= Text::_('JCATEGORY');\n $html .= '</label>';\n $html .= '</div>';\n\n $html .= '<div class=\"controls\">';\n $html .= '<select id=\"jform_catid\" name=\"cat_id\" class=\"required chzn-custom-value\" required=\"required\" aria-required=\"true\" onchange=\"categoryHasChanged(this);\" style=\"display: none;\">';\n\n $categories = Category::getCategories();\n\n $selected = Category::selectedHelper($categories, $cat_id, $view);\n\n foreach($categories as $category)\n {\n $select = $selected == $category->id ? 'selected' : NULL;\n $html .= '<option value=\"' . $category->id . '\" ' . $select . '>';\n $html .= Category::getIndentedCategoryTitle($category);\n $html .= '</option>';\n }\n\n $html .= '</select>';\n $html .= '</div>';\n $html .= '</div>';\n\n\t\treturn $html;\n }", "public function formModify() {\n $categories=$this->model->listCategories();\n $this->view->display(\"view/form/ProductFormModify.php\", NULL, $categories); \n }", "public function modifyCategory(){\n $cookies = new CookieModel();\n $cookie_id = $cookies -> read();\n if (! $cookie_id) $this->redirect('/');\n\n\t\t$id = $_REQUEST['id'];\t\t\n\t\t$name = $_REQUEST['name'];\n\t $remark = $_REQUEST['remark'];\n $father = $_REQUEST['father'];\n\t\t$form = M('categoryinfo');\n \t//$key = 2;\n \t$condition['id'] = $id;\n \t$data = $form->where($condition)->find();\n \t//var_dump($data); \n $data['id'] = $id;\n \t$data['name'] = $name;\n\t\t$data['remark'] = $remark;\n $data['father'] = $father;\n \t//echo $data;\n\t\t$result = $form->save($data);\n\t\t$this->redirect('/index.php/Admin/dish');\n\t\t\t\t\t\t//\telse {$this->error('修改失败');}\n\t\t}", "public function categoryPicker($h)\n {\n $output = '';\n \n //$sql = \"SELECT category_name, category_safe_name FROM \" . TABLE_CATEGORIES . \" WHERE category_id = %d\";\n //$result = $h->db->get_row($h->db->prepare($sql, $h->vars['submit_category']));\n \n if($h->vars['submit_category']) { \n $category = $h->categoriesById[$h->vars['submit_category']];\n $category_safe_name = stripslashes(htmlentities(urldecode($category->category_safe_name), ENT_QUOTES,'UTF-8'));\n \n if ($category_safe_name == 'all') { \n $output .= \"<option value='1' selected>\" . $h->lang['submit_category_select'] . \"</option>\\n\";\n } else {\n $output .= \"<option value=\" . $h->vars['submit_category'] . \" selected>\" . urldecode($category->category_name) . \"</option>\\n\";\n }\n } else {\n $output .= \"<option value='1' selected>\" . $h->lang['submit_category_select'] . \"</option>\\n\";\n }\n \n $sql = \"SELECT category_id, category_parent, category_name FROM \" . TABLE_CATEGORIES . \" ORDER BY category_order ASC\";\n $cats = $h->db->get_results($h->db->prepare($sql));\n \n if ($cats) {\n foreach ($cats as $cat) {\n if ($cat->category_id != 1) { \n $cat_name = stripslashes(htmlentities(urldecode($cat->category_name), ENT_QUOTES,'UTF-8'));\n $indent = ($cat->category_parent != 1) ? '--- ' : ''; \n $output .= \"<option value=\" . $cat->category_id . \">\" . $indent . $cat_name . \"</option>\\n\";\n }\n }\n }\n \n return $output;\n }", "private function getCategoryID() {\n return 0;\n }", "public function servicecat(){\n\t\t$modelservices = new Application_Model_Services();\n\t\t\n\t\t$servicelist = $modelservices->servicesdata();\n\t\t//prd($servicelist);\n\t\t\t\t\t\n \t\t$this->addElement('text', 'service_name', array (\n\t\t\t\"required\" => TRUE,\n\t\t\t'class' => 'form-control required',\n\t\t\t\"label\" => \"Service Category Title \" ,\n\t\t\t\"filters\" => array(\"StringTrim\",\"StripTags\"),\n\t\t\t\"validators\" => array(\n\t\t\t\t\t\t\t\tarray(\"NotEmpty\",true,array(\"messages\"=>\" Expertise Title is required \")),\n \t\t\t\t\t\t\t),\n \t\t));\n\t\t\n\t\t$this->addElement('select', 'service_parent_id', array (\n\t\t\t\t'class' => 'form-control required' ,\n\t\t\t\t\"required\"=>true,\n\t\t\t\t\"multioptions\"=>$servicelist,\n\t\t\t\t\"filters\" => array(\"StringTrim\",\"StripTags\",\"HtmlEntities\"),\n\t\t\t\t\n\t\t));\n \t\t$this->submitButton();\n \t}", "public function getCaption(): string\n {\n return $this->attrs['caption'] ?? '';\n }", "public function get_category()\n {\n return 'Graphical';\n }", "public function get_category()\n {\n return 'Graphical';\n }", "public function getCaption()\n {\n return $this->caption;\n }", "public function getComboKindCategory()\n {\n $querystr = <<<EOQUERY\n SELECT * FROM askme_kind_category a\n ORDER BY a.`desc` LIMIT 0,10\nEOQUERY;\n\n $results = $this->c->query($querystr);\n if ($results === FALSE)\n return \"\";\n\n $ret = '<select class=\"gradient_combo\" id=\"id_kind_category\" '.\n 'style=\"margin-right: 10px; width: '.$this->width.'px;\">';\n $ret .= \"<option value='0'>\";\n $ret .= $this->first_element;\n $ret .= \"</option>\";\n\n while (($row = $results->fetch_assoc()) !== NULL)\n {\n $ret .= \"<option value='{$row['id_kind_category']}'>\";\n $ret .= $row['desc'];\n $ret .= \"</option>\";\n }\n\n $ret .= \"</select>\";\n\n $results->close();\n\n return $ret;\n\n }", "function showCategory()\r\n {\r\n }", "function askQuestion($currentCategory) {\n\t}", "function displayCategory()\r\n\t {\r\n\t \t$productId = JRequest::getVar('product_id');\r\n\t \t\r\n\t \t$model = $this->getModel('qrcode');\r\n\t \t$productList = $model->getProductByCategory();//Store product details based on category.\r\n\t \tob_clean();\r\n\t \t\r\n\t \techo \"<b>\".JText::_('COM_QRCODE_VIEW_DEFAULT_PRODUCT_LIST').\"</b>\";\r\n \r\n\t \t\t\t$options = array();\r\n $default = \"\";\r\n if($productId)\r\n {\r\n \t$default = $productId;\r\n }\r\n $options[] = JHTML::_('select.option', \"0\", JText::_('COM_QRCODE_VIEW_DEFAULT_DISPLAY_ALL'));\r\n foreach ($productList as $key=>$val) {\r\n $options[] = JHTML::_('select.option', $val['product_id'], $val['product_name']);\r\n }\r\n echo JHTML::_('select.genericlist', $options, 'qrcode', 'onchange=getProductId(this.value)','value', 'text', $default); \r\n exit();\r\n\t }", "function set_caption($caption)\n\t{\n\t\t$this->caption = $caption;\n\t}", "public function getCategory()\n {\n return \"Injection Flaws\"; //See category.php for list of all the categories\n }", "public function get_category()\n {\n return 'Information Display';\n }", "public function getCaption() {\n\t\treturn $this->caption;\n\t}", "private function getCategory() {\n return '';\n }", "public function getCategoryDescription() {\n //as part of a search in a gridview, that is why we are returning it\n //only if not empty\n if (!empty($this->idCategoria)) {\n return $this->idCategoria;\n }\n return $this->_categoryDescription;\n }", "public function categoryAction()\n\t{\n\t\t$id = (int) $this->getRequest()->getParam('id');\n\t\t$this->view->category = $this->_blogService->findCategory($id);\n\t}", "public function get_category()\n {\n return 'Fun and Games';\n }", "public function get_category()\n {\n return 'Fun and Games';\n }", "public function get_category()\n {\n return 'Fun and Games';\n }", "public function categoryField($value) {\n return $this->setProperty('categoryField', $value);\n }", "public function categoryField($value) {\n return $this->setProperty('categoryField', $value);\n }", "function category_edit($id)\n\t{\n\t\tglobal $db;\n\t\t$ccnoprice = $_POST['ccnoprice'];\n\t\t$sSQL = \"UPDATE \".PREFIX.\"categories SET ccnoprice='\".$ccnoprice.\"', ccTemplate='\".mysql_real_escape_string($_POST['ccTemplate']).\"' WHERE id=\".$id;\n\t\t$db->query($sSQL);\n\t}", "function build_data_table_label_hidden($caption, $key)\n{\n\t$value = $this->get_data_value($key);\n\t$ele = $value.' ';\n\t$ele .= $this->build_html_input_hidden($key, $value);\n\t$text = $this->build_form_table_line($caption, $ele);\n\treturn $text;\n}", "public function setCaption(?string $caption): void\n\t{\n\t\t$this->caption = $caption;\n\t}", "private function getCategoryPostData()\n {\n // Get data from form fields\n $this->data['category_title'] = $this->input->post('category_title');\n }", "public function getCaption()\n {\n return $this->_caption;\n }", "public function lblClassifiedCategoryId_Create($strControlId = null) {\n\t\t\t$this->lblClassifiedCategoryId = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblClassifiedCategoryId->Name = QApplication::Translate('Classified Category');\n\t\t\t$this->lblClassifiedCategoryId->Text = ($this->objClassifiedPost->ClassifiedCategory) ? $this->objClassifiedPost->ClassifiedCategory->__toString() : null;\n\t\t\t$this->lblClassifiedCategoryId->Required = true;\n\t\t\treturn $this->lblClassifiedCategoryId;\n\t\t}", "function changeTextCategory($textid, $textcategoryid){\n\tMTextChangeTextCategory($textid, $textcategoryid);\n\teditMText($textid, $textcategoryid);\n\t\n}", "public function caption($caption)\n {\n return $this->setProperty('caption', $caption);\n }", "public function getIdCategory(){\n return $this->idCategory;\n }", "function display_category_form($category = ''){\n\t// This form can be used for inserting or editing categries\n\t// To insert, don't pass any parameters\n\t// To update, pass an array containing a category\n\t$edit = is_array($category);\n?>\n<form method='post'\n action='<?php echo $edit?'edit_category.php':'insert_category.php'; ?>'>\n<table border='0'>\n <tr>\n <td>Category Name:</td>\n\t<td><input type='text' name='catname' size='40' maxlength='40'\n\t value='<?php echo $edit?$category['catname']:''; ?>' /></td>\n </tr>\n <tr>\n <td <?php if (!$edit) echo \"colspan='2'\"; ?> align='center'>\n<?php\nif ($edit)\n\techo \"<input type='hidden' name='catid' value='\" . $category['catid']\n\t\t. \"' />\";\n?>\n\t <input type='submit'\n\t value=\"<?php echo $edit?'Rename':'Add'; ?> Category\" /></td>\n\t </form>\n<?php\n\tif ($edit)\n\t\techo '<form method=\"post\" action=\"/myPHP/ShoppingCart/model/admin/delete_category.php\">\n\t\t\t\t<td align=\"center\">\n\t\t\t\t<input type=\"hidden\" name=\"catid\" value=\"' . $category['catid'] .'\" />\n\t\t\t\t<input type=\"submit\" value=\"Delete Category\" />\n\t\t\t \t</td>\n\t\t\t</form>';\n?>\n\n\n<?php\n}", "function category_description_widget() {\n\t\tparent::__construct( false, 'Category Description' );\n\t}", "public function add_category() {\n\t $this->use_layout=false;\n\t\t$this->model = new $this->model_class(WaxUrl::get(\"id\"));\n\t\t$category = new CmsCategory(substr($_POST[\"id\"], 4));\n\t\t$this->model->categories = $category;\n\t\tif(!$this->attached_categories = $this->model->categories) $this->attached_categories= array();\n\t\t$cat = new CmsCategory;\n\t\tif(!$this->all_categories = $cat->all() ) $this->all_categories=array();\t\t\n\t\t$this->cat_partial = $this->render_partial(\"list_categories\");\n\t}", "function extra_category_fields( $tag ) { //check for existing featured ID\n $t_id = $tag->term_id;\n $cat_meta = get_option( \"category_$t_id\");\n\n require_once ('includes/admin-category-extra-fields.php');\n}", "private function getCaptionButton()\n\t{\t\t\n\t\t\n\t\t$link = '<input type=\"button\" onclick=\"editCaption(';\n\t\t$link .= $this->aImg['albumId'].', '.$this->aImg['id'].');\" value=\"%s\"/>';\n\t\t\n\t\tif($this->aImg['sCaption'])\n\t\t{\n\t\t\t$link = sprintf(\n\t\t\t\t$link,\t\t\t\t\n\t\t\t\t$this->TXT_LINK_EDIT\n\t\t\t);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$link = sprintf(\n\t\t\t\t$link,\t\t\t\t\n\t\t\t\t$this->TXT_LINK_ADD\n\t\t\t);\n\t\t}\n\t\t\n\t\treturn $link;\n\t}", "function addExtraCategoryFields_editForm($tag) {\n\t\t$this->addExtraCategoryFields($tag, true);\n\t}", "function colorpicker_field_edit_category( $term ) { \r\n\t$color = get_term_meta( $term->term_id, '_category_color', true ); \r\n\t$color = ( ! empty( $color ) ) ? \"#{$color}\" : '#ffffff'; ?> \r\n\t<tr class=\"form-field term-colorpicker-wrap\"> \r\n\t<th scope=\"row\">\r\n\t<label for=\"term-colorpicker\">Select Color</label>\r\n\t</th> \r\n\t<td> \r\n\t<input name=\"_category_color\" value=\"<?php echo $color; ?>\" class=\"colorpicker\" id=\"term-colorpicker\" /> \r\n\t<p class=\"description\">This is the field description where you can tell the user how the color is used in the theme.</p> \r\n\t</td> \r\n\t</tr> <?php }", "function form($instance) {\n\n // Check values\n if( $instance) {\n $fg_category = esc_attr($instance['fg_category']);\n $fg_category_num = esc_attr($instance['fg_category_num']);\n } else {\n $fg_category = '';\n $fg_category_num = '';\n }\n\n\n ?>\n\n <p>\n \t<label>Select Category</label>\n \t<?php \n \t\t wp_dropdown_categories( array(\n\t\t 'hide_empty' => 0,\n\t\t 'name' => $this->get_field_name('fg_category'),\n\t\t 'orderby' => 'name',\n\t\t 'hierarchical' => true,\n\t\t 'selected' => $fg_category,\n\t\t 'show_option_none' => __('None'),\n\t\t 'id' => $this->get_field_id('fg_category')\n\t\t ) );\n \t?>\n </p>\n \n <p>\n \t\t<label>Number of Featured</label> \n \t\t<select id=\"<?php echo $this->get_field_id('fg_category_num'); ?>\" name=\"<?php echo $this->get_field_name('fg_category_num') ?>\">\n \t\t\t<?php\n \t\t\t\tfor($x=2;$x<8;$x++){\n \t\t\t\t\t$num_sel = ($fg_category_num == $x) ? \"selected='selected'\" : \"\";\n \t\t\t\t\techo \"<option $num_sel value='$x'>$x</option>\";\n \t\t\t\t}\n \t\t\t?>\n \t\t</select>\n </p>\n <?php }", "public function save_category_form( $term_id ) {\n\t\tif( $this->save_count < 1 ) :\n\n\t\t\t$id = $this->args['id'];\n\t\t\t$data = Database::get_row( $this->args['table'], 'cat_id', $term_id );\n\n\t\t\tforeach( $this->args['table']['structure'] as $name => $args ) {\n\t\t\t\t$data[$name] = isset( $_POST[$name] ) ? $_POST[$name] : $data[$name];\n\t\t\t}\n\n\t\t\tif( empty( $data['cat_id'] ) ) {\n\t\t\t\t$data['cat_id'] = $term_id;\n\t\t\t\tDatabase::insert_row( $this->args['table'], $data );\n\t\t\t} else {\n\t\t\t\tDatabase::update_row( $this->args['table'], 'cat_id', $term_id, $data );\n\t\t\t}\n\n\t\t\t$this->save_count++;\n\n\t\tendif;\n\n\t}", "function print_dataset_definitions_category($form) {\n global $CFG, $DB;\n $datasetdefs = array();\n $lnamemax = 22;\n $namestr =get_string('name', 'quiz');\n $minstr=get_string('min', 'quiz');\n $maxstr=get_string('max', 'quiz');\n $rangeofvaluestr=get_string('minmax','qtype_datasetdependent');\n $questionusingstr = get_string('usedinquestion','qtype_calculated');\n $itemscountstr = get_string('itemscount','qtype_datasetdependent');\n $text ='';\n if (!empty($form->category)) {\n list($category) = explode(',', $form->category);\n $sql = \"SELECT i.*,d.*\n FROM {question_datasets} d,\n {question_dataset_definitions} i\n WHERE i.id = d.datasetdefinition\n AND i.category = ?;\n \" ;\n if ($records = $DB->get_records_sql($sql, array($category))) {\n foreach ($records as $r) {\n $sql1 = \"SELECT q.*\n FROM {question} q\n WHERE q.id = ?\n \";\n if ( !isset ($datasetdefs[\"$r->type-$r->category-$r->name\"])){\n $datasetdefs[\"$r->type-$r->category-$r->name\"]= $r;\n }\n if ($questionb = $DB->get_records_sql($sql1, array($r->question))) {\n $datasetdefs[\"$r->type-$r->category-$r->name\"]->questions[$r->question]->name =$questionb[$r->question]->name ;\n }\n }\n }\n }\n if (!empty ($datasetdefs)){\n\n $text =\"<table width=\\\"100%\\\" border=\\\"1\\\"><tr><th style=\\\"white-space:nowrap;\\\" class=\\\"header\\\" scope=\\\"col\\\" >$namestr</th><th style=\\\"white-space:nowrap;\\\" class=\\\"header\\\" scope=\\\"col\\\">$rangeofvaluestr</th><th style=\\\"white-space:nowrap;\\\" class=\\\"header\\\" scope=\\\"col\\\">$itemscountstr</th><th style=\\\"white-space:nowrap;\\\" class=\\\"header\\\" scope=\\\"col\\\">$questionusingstr</th></tr>\";\n foreach ($datasetdefs as $datasetdef){\n list($distribution, $min, $max,$dec) = explode(':', $datasetdef->options, 4);\n $text .=\"<tr><td valign=\\\"top\\\" align=\\\"center\\\"> $datasetdef->name </td><td align=\\\"center\\\" valign=\\\"top\\\"> $min <strong>-</strong> $max </td><td align=\\\"right\\\" valign=\\\"top\\\">$datasetdef->itemcount&nbsp;&nbsp;</td><td align=\\\"left\\\">\";\n foreach ($datasetdef->questions as $qu) {\n //limit the name length displayed\n if (!empty($qu->name)) {\n $qu->name = (strlen($qu->name) > $lnamemax) ?\n substr($qu->name, 0, $lnamemax).'...' : $qu->name;\n } else {\n $qu->name = '';\n }\n $text .=\" &nbsp;&nbsp; $qu->name <br/>\";\n }\n $text .=\"</td></tr>\";\n }\n $text .=\"</table>\";\n }else{\n $text .=get_string('nosharedwildcard', 'qtype_calculated');\n }\n return $text ;\n }", "public function categorie()\n {\n $data[\"categories\"]=$this->categories->list();\n $this->template_admin->displayad('categories' , $data);\n }", "abstract public function getFormDesc();", "function getForumCategoryFormCfg() {\n return array(\n 'infoNotification' => __('NOTIFY_FORUM_IMAGE_SIZE'),\n 'items' => array(\n 'htmlForumCategoryImage' => '',\n 'nom' => array(\n 'label' => __('NAME'),\n 'type' => 'text',\n 'size' => 30,\n 'dataType' => 'text',\n 'required' => true\n ),\n 'image' => array(\n 'label' => __('IMAGE'),\n 'type' => 'text',\n 'size' => 42,\n 'uploadField' => 'uploadImage'\n ),\n 'uploadImage' => array(\n 'label' => __('UPLOAD_IMAGE'),\n 'type' => 'file',\n 'allowedExtension' => array('jpg', 'jpeg', 'png', 'gif'),\n 'uploadDir' => 'upload/Forum/cat'\n ),\n 'niveau' => array(\n 'label' => __('LEVEL'),\n 'type' => 'select',\n 'options' => array(\n 0 => 0,\n 1 => 1,\n 2 => 2,\n 3 => 3,\n 4 => 4,\n 5 => 5,\n 6 => 6,\n 7 => 7,\n 8 => 8,\n 9 => 9\n )\n ),\n 'ordre' => array(\n 'label' => __('ORDER'),\n 'type' => 'text',\n 'value' => '0',\n 'size' => 2,\n 'dataType' => 'integer',\n 'required' => true\n )\n ),\n 'itemsFooter' => array(\n 'submit' => array(\n 'type' => 'submit',\n 'value' => array('CREATE_CATEGORY', 'MODIFY_THIS_CATEGORY'),\n 'inputClass' => array('button')\n )\n )\n );\n}", "function lm_save_category() {\n\t@copy(LM_CDATA, LM_CBACKUP);\n\t$id = isset($_POST['category-id']) ? intval($_POST['category-id']) : null;\n\t$cid = isset($_POST['category-cid']) ? intval($_POST['category-cid']) : time();\n\t$arr = array('cid'=>$cid, 'name'=>safe_slash_html($_POST['category-name']));\n\tif (function_exists('return_i18n_languages')) {\n\t\tforeach(return_i18n_languages() as $lang) {\n\t\t\tif ($lang != return_i18n_default_language()) {\n\t\t\t\t$arr['name_'.$lang] = safe_slash_html($_POST['category-name_'.$lang]);\n\t\t\t}\n\t\t}\n\t}\n\t$categories = lm_get_categories();\n\tif (isset($id))\n\t\t$categories[$id] = $arr;\n\telse\n\t\t$categories[] = $arr;\n\tif (lm_c_to_xml($categories))\n\t\tlm_display_message(i18n_r(LM_PLUGIN.'/SUCCESS_SAVE'), true, false, true);\n\telse\n\t\tlm_display_message(i18n_r(LM_PLUGIN.'/ERROR_SAVE'), false);\n}", "public function setDescription($value);", "final function getCaption($value) {\n $titles = $this->getTitles(array($value));\n if (isset($titles[$value])) $res = $titles[$value];\n else $res = false;\n return $res;\n }", "public function get_category()\n {\n return 'New Features';\n }", "public function get_category()\n {\n return 'New Features';\n }", "public function postController_beforeFormInputs_handler($sender, $args) {\n $sender->ShowCategorySelector = false;\n $categories = CategoryModel::getByPermission();\n\n $categories = array_column($categories, 'Name', 'CategoryID');\n\n echo '<div class=\"P\">';\n echo '<div class=\"Category\">';\n echo $sender->Form->label('Category', 'CategoryID');\n foreach ($categories as $categoryID => $categoryName) {\n $id = 'CategoryID'.$categoryID;\n echo $sender->Form->radio(\n 'CategoryID',\n '',\n [\n 'value' => $categoryID,\n 'class' => 'Hidden',\n 'id' => $id\n ]\n );\n echo $sender->Form->label(\n $categoryName,\n '',\n [\n 'class' => 'CategoryButton',\n 'for' => $id\n ]\n );\n }\n echo '</div></div>';\n }", "public function category() {\n\t\treturn static::get_thrive_basic_label();\n\t}", "public function getCatId()\n {\n return $this->getParamCatId();\n }", "public function updateForm()\n{\n\n $listeCatgories = $this->model->getCategories();\n $new = $this->model->getNew();\n $this->view->updateForm($new,$listeCatgories);\n}" ]
[ "0.6484493", "0.6234255", "0.6195198", "0.6007746", "0.5943674", "0.5917132", "0.5907298", "0.5901107", "0.5729295", "0.5701957", "0.56089604", "0.5607314", "0.55738", "0.55517393", "0.55383116", "0.5505386", "0.55046487", "0.5491411", "0.5473566", "0.5465717", "0.5463196", "0.54539376", "0.54368985", "0.54110974", "0.5396795", "0.53665286", "0.53662574", "0.53449225", "0.5318533", "0.53165424", "0.53086233", "0.5308142", "0.52963877", "0.5284376", "0.5273232", "0.52677405", "0.5253198", "0.52529705", "0.5251706", "0.5236154", "0.5235879", "0.52298105", "0.52258706", "0.52107495", "0.52023435", "0.51919484", "0.5190245", "0.51871884", "0.5175334", "0.5170949", "0.5170167", "0.5170167", "0.5166534", "0.51664305", "0.5157299", "0.51561725", "0.5154632", "0.5148803", "0.51442444", "0.5141805", "0.5141563", "0.51401585", "0.51357514", "0.5132679", "0.51068467", "0.51068467", "0.51068467", "0.51049817", "0.51049817", "0.5100134", "0.50995755", "0.50985694", "0.50974864", "0.50907916", "0.50821143", "0.50692034", "0.5062686", "0.50625354", "0.5057621", "0.5053817", "0.50536174", "0.50486535", "0.50467956", "0.5045486", "0.5037299", "0.5033192", "0.503315", "0.5032349", "0.5029143", "0.5028794", "0.50277925", "0.5027545", "0.50225127", "0.50156915", "0.5012086", "0.5012086", "0.5008708", "0.5005723", "0.50046754", "0.5002326" ]
0.67867893
0
check to see if the master display setting is on
public function browsing_before_listings_column($params, Smarty_Internal_Template $smarty) { $reg = geoAddon::getRegistry($this->name); if (!$reg->browsing_filters_enabled) { return ''; } return $this->display_browsing_filters($params, $smarty); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function is_master() {\n\t\treturn $this->_config->is_master();\n\t}", "private function has_master(){\n\t\tif($this->master==\"None\"){\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public function hasShowDisplay()\n {\n return $this->show_display !== null;\n }", "public function isMaster();", "private function is_show() {\n\n\t\tif ( 'avada-fusion-patcher' === $this->current_screen || ( ( 'avada-registration' === $this->current_screen || 'avada-plugins' === $this->current_screen || 'avada-demos' === $this->current_screen ) && class_exists( 'Avada' ) && Avada()->registration->is_registered() ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "private function hasMaster(){\n $hosts = $this->mongo->getHosts();\n foreach ($hosts as $host)\n if ($host['state'] == 1) return true;\n return false;\n }", "function checkPanelMode()\n\t{\n\t\tswitch ($this->display_mode)\n\t\t{\n\t\t\tcase \"view\":\n\t\t\t\t$this->displayStatusPanel();\n\t\t\t\tbreak;\n\n\t\t\tcase \"setup\":\n\t\t\t\t$this->displayProcessPanel();\n\t\t\t\tbreak;\n\t\t}\n\t}", "function is_podlove_settings_screen()\n{\n $screen = get_current_screen();\n\n return stripos($screen->id, 'podlove') !== false && $screen->id != 'settings_page_podlove-web-player-settings';\n}", "public function canShow(){\n\t\tif (Mage::getStoreConfig('logicbroker_edi_section/logicbroker_edi_group1/notificationstatus') == 0) {\n\t\t\t$this->setConfigValue(array(\n\t\t\t\t'scope' => 'default',\n\t\t\t\t'scope_id' => '0',\n\t\t\t\t'path' => 'logicbroker_edi_section/logicbroker_edi_group1/notificationstatus',\n\t\t\t\t'value' => '1',\n\t\t\n\t\t\t\t));\n\t\t\treturn true;\n }else{\n \treturn false;\n }\n\t}", "function checkIfMaster(){\n\t\tglobal $x7s, $x7c;\n\t\t\n\t\t$value = $x7c->permissions['admin_panic'];\n\t\t\n\t\treturn $value;\n\t}", "public function setting_show_on_dashboard() {\n\t\t$show_on_dashboard = get_option( 'simple_history_show_on_dashboard', 1 );\n\t\t$show_on_dashboard = apply_filters( 'simple_history_show_on_dashboard', $show_on_dashboard );\n\t\treturn (bool) $show_on_dashboard;\n\t}", "public function isCatalogBackendManageStockVisible()\n {\n return Mage::getStoreConfigFlag(self::XML_PATH_CATALOG_DISPLAY_BACKEND_MANAGE_STOCK);\n }", "public function isSingleMode()\n {\n return ($this->getMode() == 'single') ? true : false;\n }", "private function comprueba_pantalla () {\r\r\n\r\r\n\t\t\t$pantalla = get_current_screen();\r\r\n\r\r\n\t\t\treturn ('plugins' == $pantalla->base) ? true : false;\r\r\n\t\t\t}", "public function checkGlobalActive() {\r\n\t\tif (Mage::getStoreConfig('b2bprofessional/generalsettings/active') == 1) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "public function is_screen() {\n\t\treturn ! empty( $this->ID ) && Tribe__Admin__Helpers::instance()->is_screen( $this->ID );\n\t}", "function euphony_is_hero_content_active( $control ) {\n\t\t$enable = $control->manager->get_setting( 'euphony_hero_content_visibility' )->value();\n\n\t\treturn euphony_check_section( $enable );\n\t}", "public function should_display_sandwitch_menu() {\n if ($this->page->pagelayout == 'frontpage' || !isloggedin() || isguestuser()) {\n return false;\n }\n return true;\n }", "function is_desktop()\n {\n return dev::isDesktop();\n }", "function simple_history_setting_show_on_dashboard() {\n\t$show_on_dashboard = get_option(\"simple_history_show_on_dashboard\", 0);\n\t$show_on_dashboard = apply_filters(\"simple_history_show_on_dashboard\", $show_on_dashboard);\n\treturn (bool) $show_on_dashboard;\n}", "function is_settings() {\n\t\t\t\tglobal $pagenow;\n\t\t\t\treturn is_admin() && $pagenow == $this->settings_parent && $_GET['page'] == $this->slug;\n\t\t\t}", "public function isInformationVisible()\n {\n return Mage::getStoreConfigFlag(self::XML_PATH_OPTIONS_DISPLAY_INFORMATION);\n }", "function check_plugin_mainscreen_name()\r\r\n{\r\r\n $screen = get_current_screen();\r\r\n if (is_object($screen) && $screen->id == 'toplevel_page_oneclick-google-map') {\r\r\n return true;\r\r\n }\r\r\n else {\r\r\n return false;\r\r\n }\r\r\n}", "public function IsInMaintenanceMode(){\n\n\t\t// Obtain maintenance_mode index from config file\n $config_maintenance = $this->instance->config->item(\"maintenance_mode\");\n\n // validate if it's true\n if( $config_maintenance ){\n\n \t// load view and terminate output\n echo $this->instance->load->view('system/maintenance_mode', false, true);\n die();\n }\n }", "function is_primary() {\n\n\t\tif ( !empty( $this->get_post_types() ) ) {\n\n\t\t\tforeach ( TPL_FW()->registered_settings_pages as $key => $settings_page ) {\n\n\t\t\t\tif ( $settings_page->get_post_type() && $this->has_post_type( $settings_page->get_post_type() ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn false;\n\n\t}", "function checkDisplayMode($a_title = \"\")\n\t{\n\t\tswitch ($this->display_mode)\n\t\t{\n\t\t\tcase \"view\":\n\t\t\t\t$this->tpl->addBlockFile(\"CONTENT\",\"content\",\"tpl.clientview.html\", \"setup\");\n\t\t\t\t// display tabs\n\t\t\t\tinclude \"./setup/include/inc.client_tabs.php\";\n\t\t\t\t$client_name = ($this->setup->getClient()->getName()) ? $this->setup->getClient()->getName() : $this->lng->txt(\"no_client_name\");\n\t\t\t\t$this->tpl->setVariable(\"TXT_HEADER\",$client_name.\" (\".$this->lng->txt(\"client_id\").\": \".$this->setup->getClient()->getId().\")\");\n\t\t\t\tbreak;\n\n\t\t\tcase \"setup\":\n\t\t\t\t$this->tpl->addBlockFile(\"CONTENT\",\"content\",\"tpl.clientsetup.html\", \"setup\");\n\t\t\t\t$this->tpl->setVariable(\"TXT_HEADER\",$this->lng->txt($a_title));\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t$this->displayError($this->lng->txt(\"unknown_display_mode\"));\n\t\t\t\texit();\n\t\t\t\tbreak;\n\t\t}\n\t}", "static function hasCurrent() {\n\t\treturn is_object(self::$_ctrl);\n\t}", "public function isVisible(): bool\n {\n return $this->scopeConfig->getValue('helloworld/general/enable');\n }", "function acf_settings_show_admin( $setting ) {\n\t\t\n\t\t// 5.0.0 - removed ACF_LITE\n\t\treturn ( defined('ACF_LITE') && ACF_LITE ) ? false : $setting;\n\t\t\n\t}", "public function isSelected()\n {\n /* @var $session Dhl_Intraship_Model_Session */\n $session = Mage::getSingleton('intraship/session');\n return (\n true === $session->hasData('is_gogreen') &&\n 1 === (int) $session->getData('is_gogreen')\n );\n }", "function is_smartphone()\n {\n return dev::isSmartphone();\n }", "protected function isSetup(){\n \treturn isset($GLOBALS['setup']);\n }", "public function is_primary_sidebar_active(): bool\n\t{\n\t\t$this->get_option = get_option('qreate-options');\n\n\n\t\tif (class_exists('ReduxFramework') && $this->get_option != '') {\n\t\t\tif (is_search()) {\n\t\t\t\t$option = $this->get_option['search_page'];\n\t\t\t} else {\n\t\t\t\t$option = is_single() ? $this->get_option['blog_single_page_setting'] : $this->get_option['blog_setting'];\n\t\t\t}\n\t\t\tif (in_array($option, [4, 5])) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn (bool)is_active_sidebar(static::PRIMARY_SIDEBAR_SLUG);\n\t}", "function isMasterAdmin($player) {\n\n\t\t// check for masteradmin list entry\n\t\tif (isset($player->login) && $player->login != '' && isset($this->masteradmin_list['TMLOGIN']))\n\t\t\tif (($i = array_search($player->login, $this->masteradmin_list['TMLOGIN'])) !== false)\n\t\t\t\t// check for matching IP if set\n\t\t\t\tif ($this->masteradmin_list['IPADDRESS'][$i] != '')\n\t\t\t\t\tif (!$this->ip_match($player->ip, $this->masteradmin_list['IPADDRESS'][$i])) {\n\t\t\t\t\t\ttrigger_error(\"Attempt to use MasterAdmin login '\" . $player->login . \"' from IP \" . $player->ip . \" !\", E_USER_WARNING);\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} else\n\t\t\t\t\t\treturn true;\n\t\t\t\telse\n\t\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\telse\n\t\t\treturn false;\n\t}", "public function getIsNeedToDisplaySideBar()\n {\n return (bool) Mage::app()->getStore()->getConfig('checkout/sidebar/display');\n }", "private function showAdminHint(): bool\n {\n return $this->getWordpressConfig()->atAdminPanel() === false\n && $this->getMainConfig()->blogAdminHint() === true;\n }", "function userSettingVisible($setting)\n\t{\n\t\t$result = TRUE;\n\t\tif (isset($this->settings[\"usr_settings_hide_\".$setting]) &&\n\t\t\t$this->settings[\"usr_settings_hide_\".$setting] == 1)\n\t\t{\n\t\t\t$result = FALSE;\n\t\t}\n\t\treturn $result;\n\t}", "function ts_check_if_control_panel()\r\n{\r\n\t$control_panel = ot_get_option('control_panel');\r\n\t\r\n\tif ($control_panel == 'enabled_admin' && current_user_can('manage_options') || $control_panel == 'enabled_all')\r\n\t{\r\n\t\treturn true;\r\n\t}\r\n\treturn false;\r\n}", "public function hasScreen(){\n return $this->_has(12);\n }", "public function getRequireMaster()\n {\n $value = $this->get(self::REQUIRE_MASTER);\n\n return $value === null ? (bool) $value : $value;\n }", "protected function is_current_screen_page() {\n\n\t\tif ( Settings::PAGE_ID !== Framework\\SV_WC_Helper::get_requested_value( 'page' ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// assume we are on the Connection tab by default because the link under Marketing doesn't include the tab query arg\n\t\t$tab = Framework\\SV_WC_Helper::get_requested_value( 'tab', 'connection' );\n\n\t\treturn ! empty( $tab ) && $tab === $this->get_id();\n\t}", "public function isPrimary()\n {\n return static::MODE_PRIMARY === $this->mode;\n }", "function isMasterAdminL($login) {\n\n\t\tif ($login != '' && isset($this->masteradmin_list['TMLOGIN'])) {\n\t\t\treturn in_array($login, $this->masteradmin_list['TMLOGIN']);\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "protected function isInFullScreenMode() {}", "protected function shouldStartMaximized()\n {\n return isset($_SERVER['DUSK_START_MAXIMIZED']) ||\n isset($_ENV['DUSK_START_MAXIMIZED']);\n }", "public function isCooperativeModeAllowed()\n {\n $data = $this->_coreRegistry->registry('magictoolbox');\n return is_null($data) ? false : $data['cooperative-mode'];\n }", "function is_tablet()\n {\n return dev::isTablet();\n }", "private function _isEnvisSet(){\n\t\t/* Variable initialization */\n\t\t$blnIsSet\t= true;\n\t\t\n\t\t/* if setup configuration is not done then then do needful */\n\t\tif($this->getEnvSetupConfigured() == 0){\n\t\t\t/* value overriding */\n\t\t\t$blnIsSet\t= false;\n\t\t}\n\t\t\n\t\t/* Redirect to set-up module */\n\t\tif((!$blnIsSet) && ($this->uri->segment(1) != 'settings' && $this->uri->segment(1) != 'mod' && $this->uri->segment(1) != 'manage_widgets' && $this->uri->segment(1) != 'manage-widgets' && $this->uri->segment(1) != 'social_wall' && $this->uri->segment(1) != 'social-wall')){\n\t\t\t/* redirecting to login */\n\t\t\tredirect(SITE_URL.'settings/setup');\n\t\t}\n\t}", "public function is_on_dashboard() {\n return ($this->page->pagelayout == 'mydashboard');\n }", "public function isMain() {\n\t\treturn $this->_page == null;\n\t}", "private function _isMine(): bool {\n\t\treturn $this->isMyServer() && $this->isMyPID();\n\t}", "function isVisible() {\n\t\t$worker = CerberusApplication::getActiveWorker();\n\t\t\n\t\tif(empty($worker)) {\n\t\t\treturn false;\n\t\t} elseif($worker->is_superuser) {\n\t\t\treturn true;\n\t\t}\n\t}", "function jetpack_is_atomic_site() {\n\t$at_options = get_option( 'at_options', array() );\n\treturn ! empty( $at_options ) || defined( 'WPCOMSH__PLUGIN_FILE' );\n}", "public function canDisplayUseDefault()\r\n {\r\n if ($attribute = $this->getAttribute()) {\r\n if (!$attribute->isScopeGlobal()\r\n && $this->getDataObject()\r\n && $this->getDataObject()->getId()\r\n && $this->getDataObject()->getStoreId()) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "private function _isMaster($nick)\n {\n return in_array($nick, $this->_botMaster);\n }", "function the_champ_horizontal_sharing_enabled(){\r\n\tglobal $theChampSharingOptions;\r\n\tif(isset($theChampSharingOptions['hor_enable']) && $theChampSharingOptions['hor_enable'] == 1){\r\n\t\treturn true;\r\n\t}else{\r\n\t\treturn false;\r\n\t}\r\n}", "public function useSetting()\n\t{\n\t\treturn count($this->settingConfig()) ? true : false;\n\t}", "function has_global_setting($key)\n{\n global $globalSettings;\n return (isset($globalSettings[$key]) && !empty($globalSettings[$key]));\n}", "public static function setMaster (){\n self::$master = 1;\n }", "function displayMasterSetup($a_omit_init = false)\n\t{\n\t\t$this->tpl->addBlockFile(\"CONTENT\",\"content\",\"tpl.std_layout.html\", \"setup\");\n\t\t$this->tpl->setVariable(\"TXT_HEADER\", $this->lng->txt(\"basic_settings\"));\n\t\t$this->tpl->setVariable(\"TXT_INFO\",\n\t\t\t$this->lng->txt(\"info_text_first_install\").\"<br/>\".$this->lng->txt(\"info_text_pathes\"));\n\n\t\t$this->setButtonPrev(\"preliminaries\");\n\n\t\tif ($this->setup->isInstalled())\n\t\t{\n\t\t\t$this->setButtonNext(\"list\");\n\t\t}\n\n\t\tif (!$a_omit_init)\n\t\t{\n\t\t\t$this->initBasicSettingsForm(true);\n\t\t}\n\t\t$this->tpl->setVariable(\"SETUP_CONTENT\", \"<br>\".$this->form->getHTML().\"<br>\");\n\t}", "public function in_edit_display_mode($mode = null) {\n if (!$submission = $this->submission_settings) {\n return false;\n }\n if (empty($submission['display'])) {\n return false;\n }\n if (!$mode) {\n return true;\n }\n return ($submission['display'] == $mode);\n }", "function visible () {\n\t\treturn isadmin();\n\t}", "private function is_display_on( $path ) {\n\t\t$config = file( $path );\n\t\t$pattern = \"/^define\\(\\s*('|\\\")WP_DEBUG_DISPLAY('|\\\"),\\s*.*\\s*\\)/\";\n\t\tforeach ( $config as $key => $line ) {\n\t\t\t$line = trim( $line );\n\t\t\tif ( preg_match( $pattern, $line ) ) {\n\t\t\t\t//find a line having defined wp debug display, chekc if it is on\n\t\t\t\tif ( preg_match( \"/^define\\(\\s*('|\\\")WP_DEBUG_DISPLAY('|\\\"),\\s*true\\s*\\)/\", $line ) ) {\n\t\t\t\t\treturn $key;\n\t\t\t\t} else {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn - 1;\n\t}", "protected function get_displayinmenublock() {\n return false;\n }", "public function hasOverviewMapControl()\n {\n return $this->overviewMapControl !== null;\n }", "public function hasDisplay(){\n return $this->_has(26);\n }", "public function theSizeIsDesktop()\n {\n $this->getSession()->resizeWindow(1400, 900, 'current');\n }", "public function isCurrent() {\n\n return !empty($this->environment);\n }", "public function isShow_title() {\n\t\t$this->getShow_title();\n\t}", "private function is_ate_console_tab() {\n\t\t$sm = filter_input( INPUT_GET, 'sm', FILTER_SANITIZE_STRING );\n\t\t$page = filter_input( INPUT_GET, 'page', FILTER_SANITIZE_STRING );\n\n\t\treturn $sm && $page && self::SLUG === $sm && WPML_TM_FOLDER . '/menu/main.php' === $page;\n\t}", "function isAdmin()\n\t{\n\t // if we've already worked this out, return it.\n\t\tif (isset($this->systemadmin)) {\n\t\t\treturn $this->systemadmin;\n\t\t}\n\t\t\n\t\t$admin = false;\n\t\t\n\t\tif ($this->group->systemadmin == 1) {\n\t\t $admin = true;\n\t\t}\n\t\t\n\t\t$this->systemadmin = $admin;\n\t\t\n\t\treturn $this->systemadmin;\n\t}", "protected function isInAdministration()\n\t{\n\t\treturn (bool) $GLOBALS['tree']->isGrandChild(SYSTEM_FOLDER_ID,$this->getCurrentObject()->getRefId());\n\t}", "function store_show_sidebar_options($control) {\n\t \n\t $option = $control->manager->get_setting('store_disable_sidebar');\n\t return $option->value() == false ;\n\t \n\t}", "public function forceMaster()\n {\n return true;\n }", "public function forceMaster()\n {\n return true;\n }", "public function canLikesettings() {\n $viewer = Engine_Api::_()->user()->getViewer();\n if (!$viewer || !$viewer->getIdentity()) {\n return false;\n }\n\t\t$like_profile_show = Engine_Api::_()->getApi( 'settings' , 'core' )->getSetting( 'like.profile.show' ) ;\n $like_setting_show = Engine_Api::_()->getApi( 'settings' , 'core' )->getSetting( 'like.setting.show' ) ;\n\t\tif ( empty( $like_profile_show ) || empty( $like_setting_show ) ) {\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n }", "function siteorigin_panels_is_preview(){\n\tglobal $siteorigin_panels_is_preview;\n\treturn (bool) $siteorigin_panels_is_preview;\n}", "protected function isVisible()\n {\n $result = parent::isVisible()\n && static::getWidgetTarget() != \\XLite\\Core\\Request::getInstance()->target\n && 0 < $this->getData(new \\XLite\\Core\\CommonCell, true);\n\n if ($result) {\n\n if (!\\XLite\\Core\\CMSConnector::isCMSStarted()) {\n\n if (self::WIDGET_TYPE_SIDEBAR == $this->getParam(self::PARAM_WIDGET_TYPE)) {\n $result = in_array($this->viewListName, array('sidebar.second', 'sidebar.single'));\n\n } elseif (self::WIDGET_TYPE_CENTER == $this->getParam(self::PARAM_WIDGET_TYPE)) {\n $result = ('center.bottom' == $this->viewListName);\n }\n }\n }\n\n return $result;\n }", "public function set_client_tablet(){\n\n self::$oCRNRSTN_ENV->oSESSION_MGR->set_session_param('isTablet', true);\n\n return true;\n }", "public static function isMultiSiteEnabled()\n {\n return sfConfig::get('app_rt_enable_multi_site', false);\n }", "public function isOriginVisible()\n {\n return (\n $this->isInformationVisible() && \n Mage::getStoreConfigFlag(self::XML_PATH_OPTIONS_DISPLAY_ORIGIN)\n ) ? true : false;\n }", "function has_setting($name)\n {\n }", "public function hasGlobalColorTable()\n {\n $byte = substr($this->logicalScreenDescriptor, 4, 1);\n \n if (strlen($byte) == 1) {\n $byte = unpack('C', $byte)[1];\n $bit = $byte & bindec('10000000');\n }\n\n return isset($bit) ? (bool) $bit : false;\n }", "function is_visible_container( $container_key, $setting_name = 'access_login_containers' )\n\t{\n\t\t$access = $this->get_setting( $setting_name );\n\n\t\treturn ( ! empty( $access ) && ! empty( $access[ $container_key ] ) );\n\t}", "function isDispGrid()\n\t{\n\t\treturn true;\n\t}", "function wrmp_is_installed()\n{\n\treturn wrmp_get_settingsgroup();\n}", "public function alwaysShown()\n {\n \treturn $this->alwaysShown;\n }", "public function isFullScreen() {\n return (bool) $this->getValue('fullscreen');\n }", "public function isMain()\n {\n if (!$this->getUser()->getMain()) {\n return false;\n }\n return $this->getUser()->getMain()->getId() == $this->getId();\n }", "public function isShowActivator() {\n\t\t$cache = WP_Helper::getCache();\n\t\tif ( $cache->get( 'wdf_isActivated', false ) == 1 ) {\n\t\t\treturn 0;\n\t\t}\n\t\tif ( get_site_transient( 'wp_defender_free_is_activated' ) == 1 ) {\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\tif ( get_site_option( 'wp_defender_free_is_activated' ) == 1 ) {\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\t$keys = [\n\t\t\t'wp_defender',\n\t\t\t'wd_scan_settings',\n\t\t\t'wd_hardener_settings',\n\t\t\t'wd_audit_settings',\n\t\t\t'wd_2auth_settings',\n\t\t\t'wd_masking_login_settings'\n\t\t];\n\t\tforeach ( $keys as $key ) {\n\t\t\t$option = get_site_option( $key );\n\t\t\tif ( is_array( $option ) ) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn 1;\n\t}", "protected function isSingleStoreMode()\n {\n return Mage::app()->isSingleStoreMode();\n }", "function suitbuilder_ft_widget_margin_desktop_active( ){\n global $suitbuilder_customizer_all_values;\n $ft_margin_desktop_device = $suitbuilder_customizer_all_values['suitbuilder-ft-widget-margin-icon'];\n \n if( 'ft-margin-desktop' == $ft_margin_desktop_device ){\n return true;\n }else{\n return false;\n } \n }", "public function isDefDomain(){\n return (boolean) $this->isActive() && ($this->getDomainName() == Yii::$app->params['domain_name']) && ($this->getDomainTopName() == 'ru');\n }", "function audioman_is_featured_content_active( $control ) {\n\t\t$enable = $control->manager->get_setting( 'audioman_featured_content_option' )->value();\n\n\t\treturn ( audioman_check_section( $enable ) );\n\t}", "public function canShowTab()\n {\n return $this->_getCurrentTheme()->isVirtual() && $this->_getCurrentTheme()->getId();\n }", "public function acf_wpi_ui() {\n\t\tif ( ! get_field( 'acf_wpi_ui_enable', 'option' ) ) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "public function isDisplayed()\n {\n if (!$this->scopeConfig->getValue('magentomobileshop/secure/key')) {\n return true;\n }\n }", "public function showInMenu()\n {\n $ctrs = PageCom::ctrs();\n return $ctrs && (count($ctrs) > 1);\n }", "function jetpackme_is_mobile() {\r\n \r\n // Are Jetpack Mobile functions available?\r\n if ( ! function_exists( 'jetpack_is_mobile' ) )\r\n return false;\r\n \r\n // Is Mobile theme showing?\r\n if ( isset( $_COOKIE['akm_mobile'] ) && $_COOKIE['akm_mobile'] == 'false' )\r\n return false;\r\n \r\n return jetpack_is_mobile();\r\n}", "public function showOnLoginForm(): bool {\n\t\treturn $this->show_on_login_form !== 0;\n\t}", "static function has_edit_screen(): bool { return true; }" ]
[ "0.7242355", "0.71827495", "0.68063414", "0.6568732", "0.6526326", "0.6501586", "0.63494587", "0.6265772", "0.62612176", "0.62404495", "0.6102821", "0.609206", "0.608015", "0.60614306", "0.6058337", "0.59887844", "0.5975927", "0.59679526", "0.5964528", "0.5959535", "0.59550345", "0.5936411", "0.59161013", "0.59149975", "0.5908887", "0.59081334", "0.58817166", "0.5855571", "0.5814869", "0.5808603", "0.5799129", "0.57842815", "0.57667726", "0.5765149", "0.5758862", "0.57574964", "0.57566506", "0.57559323", "0.5755692", "0.5749932", "0.5746589", "0.5724102", "0.5715618", "0.56978756", "0.56977814", "0.56967986", "0.56912076", "0.56879795", "0.56834644", "0.5671103", "0.5670146", "0.56595236", "0.5655897", "0.5646956", "0.5643247", "0.5633971", "0.56140924", "0.56113416", "0.5611279", "0.5609064", "0.56025034", "0.55939823", "0.5588786", "0.5584055", "0.558229", "0.55800366", "0.55797946", "0.5570646", "0.5569065", "0.5568757", "0.55609846", "0.55608535", "0.555757", "0.555428", "0.555428", "0.5553616", "0.55449855", "0.5540989", "0.55383724", "0.5533842", "0.5532317", "0.5532199", "0.553172", "0.55302054", "0.5529276", "0.55272055", "0.5524131", "0.55224466", "0.5517457", "0.5512578", "0.55118626", "0.5499147", "0.54971117", "0.5494436", "0.54933417", "0.5483287", "0.54827845", "0.5482034", "0.54690945", "0.5463402", "0.5458979" ]
0.0
-1
Run the database seeds.
public function run() { DB::table('news')->truncate(); $news = array( ['title' => 'news 0', 'imageUrl' => '3d.png', 'content' => 'Odit, itaque, deserunt corporis vero ipsum nisi eius odio natus ullam provident.'], ['title' => 'news 1', 'imageUrl' => 'compass.png', 'content' => 'Excepturi, obcaecati, quisquam id molestias eaque asperiores voluptatibus cupiditate error assumenda delectus odit similique earum .'] ); // Loop through each user above and create the record for them in the database foreach ($news as $s_news) { News::create($s_news); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }", "public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => '[email protected]', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"[email protected]\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }", "public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }", "public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }", "public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }", "public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }", "public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => '[email protected]',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }", "public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> '[email protected]',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }", "public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }", "public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }", "public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }", "public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }", "public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }", "public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }", "public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }", "public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n }", "public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}", "public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }", "public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}", "public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }", "public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }", "public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }", "public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }", "public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }", "public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }", "public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}", "public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }", "public function run()\n {\n //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }", "public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }", "public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }", "public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => '[email protected]']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }", "public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'[email protected]',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','[email protected]')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => '[email protected]']);\n\n factory(Category::class, 5)->create();\n }", "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }", "public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }", "public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }", "public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }", "public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }", "public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => '[email protected]',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Paul'\n ]);\n }", "public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }", "public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }", "public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}", "public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }", "public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }", "public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }", "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }", "public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }", "public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'sab',\n\n ]\n );\n }", "public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }", "public function run()\n {\n //Acá se define lo que el seeder va a hacer.\n //insert() para insertar datos.\n //Array asociativo. La llave es el nombre de la columna.\n// DB::table('users')->insert([\n// //Para un solo usuario.\n// 'name' => 'Pedrito Perez',\n// 'email' => '[email protected]',\n// 'password' => bcrypt('123456')\n// ]);//Se indica el nombre de la tabla.\n\n //Crea 50 usuarios (sin probar)\n// factory(App\\User::class, 50)->create()->each(function($u) {\n// $u->posts()->save(factory(App\\Post::class)->make());\n// });\n\n factory(App\\User::class, 10)->create(); //Así se ejecuta el model factory creado en ModelFactory.php\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'[email protected]', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'[email protected]', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }", "public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }" ]
[ "0.8013876", "0.79804534", "0.7976992", "0.79542726", "0.79511505", "0.7949612", "0.794459", "0.7942486", "0.7938189", "0.79368967", "0.79337025", "0.78924936", "0.78811055", "0.78790957", "0.78787595", "0.787547", "0.7871811", "0.78701615", "0.7851422", "0.7850352", "0.7841468", "0.7834583", "0.7827792", "0.7819104", "0.78088796", "0.7802872", "0.7802348", "0.78006834", "0.77989215", "0.7795819", "0.77903426", "0.77884805", "0.77862066", "0.7778816", "0.7777486", "0.7765202", "0.7762492", "0.77623445", "0.77621746", "0.7761383", "0.77606887", "0.77596676", "0.7757001", "0.7753607", "0.7749522", "0.7749292", "0.77466977", "0.7729947", "0.77289546", "0.772796", "0.77167094", "0.7714503", "0.77140456", "0.77132195", "0.771243", "0.77122366", "0.7711113", "0.77109736", "0.7710777", "0.7710086", "0.7705484", "0.770464", "0.7704354", "0.7704061", "0.77027386", "0.77020216", "0.77008796", "0.7698617", "0.76985973", "0.76973504", "0.7696405", "0.7694293", "0.7692694", "0.7691264", "0.7690576", "0.76882726", "0.7687433", "0.7686844", "0.7686498", "0.7685065", "0.7683827", "0.7679184", "0.7678287", "0.76776296", "0.76767945", "0.76726556", "0.76708084", "0.76690495", "0.766872", "0.76686716", "0.7666299", "0.76625943", "0.7662227", "0.76613766", "0.7659881", "0.7656644", "0.76539344", "0.76535016", "0.7652375", "0.7652313", "0.7652022" ]
0.0
-1
this up() migration is autogenerated, please modify it to your needs
public function up(Schema $schema): void { $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); $this->addSql('CREATE TABLE genre (id INT AUTO_INCREMENT NOT NULL, name LONGTEXT NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB'); $this->addSql('CREATE TABLE user (id INT AUTO_INCREMENT NOT NULL, first_name VARCHAR(255) NOT NULL, last_name VARCHAR(255) NOT NULL, email VARCHAR(180) NOT NULL, UNIQUE INDEX UNIQ_8D93D649E7927C74 (email), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB'); $this->addSql('CREATE TABLE employee (id INT AUTO_INCREMENT NOT NULL, first_name LONGTEXT NOT NULL, last_name LONGTEXT NOT NULL, email VARCHAR(180) NOT NULL, password VARCHAR(255) NOT NULL, roles JSON NOT NULL, UNIQUE INDEX UNIQ_5D9F75A1E7927C74 (email), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB'); $this->addSql('CREATE TABLE book (id INT AUTO_INCREMENT NOT NULL, employee_id INT DEFAULT NULL, genre_id INT DEFAULT NULL, name LONGTEXT NOT NULL, author LONGTEXT NOT NULL, INDEX IDX_CBE5A3318C03F15C (employee_id), INDEX IDX_CBE5A3314296D31F (genre_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB'); $this->addSql('CREATE TABLE borrowed (id INT AUTO_INCREMENT NOT NULL, user_id INT DEFAULT NULL, borrow_date DATETIME NOT NULL, return_date DATETIME NOT NULL, INDEX IDX_2F44F8E5A76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB'); $this->addSql('CREATE TABLE books_borrowed (borrowed_id INT NOT NULL, book_id INT NOT NULL, INDEX IDX_464B489D64BC3968 (borrowed_id), INDEX IDX_464B489D16A2B381 (book_id), PRIMARY KEY(borrowed_id, book_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB'); $this->addSql('ALTER TABLE book ADD CONSTRAINT FK_CBE5A3318C03F15C FOREIGN KEY (employee_id) REFERENCES employee (id)'); $this->addSql('ALTER TABLE book ADD CONSTRAINT FK_CBE5A3314296D31F FOREIGN KEY (genre_id) REFERENCES genre (id)'); $this->addSql('ALTER TABLE borrowed ADD CONSTRAINT FK_2F44F8E5A76ED395 FOREIGN KEY (user_id) REFERENCES user (id)'); $this->addSql('ALTER TABLE books_borrowed ADD CONSTRAINT FK_464B489D64BC3968 FOREIGN KEY (borrowed_id) REFERENCES borrowed (id) ON DELETE CASCADE'); $this->addSql('ALTER TABLE books_borrowed ADD CONSTRAINT FK_464B489D16A2B381 FOREIGN KEY (book_id) REFERENCES book (id) ON DELETE CASCADE'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function up();", "abstract public function up();", "abstract public function up();", "abstract public function up();", "public function up()\n {\n $this->execute(\"\n ALTER TABLE `tcmn_communication` \n CHANGE `tcmn_pprs_id` `tcmn_pprs_id` SMALLINT(5) UNSIGNED NULL COMMENT 'person',\n CHANGE `tcmn_tmed_id` `tcmn_tmed_id` TINYINT(4) UNSIGNED NULL COMMENT 'medijs';\n \");\n }", "public function up()\n {\n // This migration was removed, but fails when uninstalling plugin\n }", "public function up()\n {\n $this->execute(\"\n\n ALTER TABLE `cucp_user_company_position` \n ADD COLUMN `cucp_role` CHAR(20) NULL AFTER `cucp_name`;\n\n \");\n }", "public function up()\n\t{\n\t\t$this->dbforge->add_column($this->table, $this->field);\n\t}", "public function migrateUp()\n {\n //$this->migrate('up');\n $this->artisan('migrate');\n }", "public function up()\n {\n dbexec('ALTER TABLE #__subscriptions_coupons\n ADD `created_on` datetime DEFAULT NULL AFTER `usage`,\n ADD `created_by` bigint(11) unsigned DEFAULT NULL AFTER `created_on`,\n ADD INDEX `created_by` (`created_by`),\n ADD `modified_on` datetime DEFAULT NULL AFTER `created_by`,\n ADD `modified_by` bigint(11) unsigned DEFAULT NULL AFTER `modified_on`,\n ADD INDEX `modified_by` (`modified_by`) \n ');\n \n dbexec('ALTER TABLE #__subscriptions_vats\n ADD `created_on` datetime DEFAULT NULL AFTER `data`,\n ADD `created_by` bigint(11) unsigned DEFAULT NULL AFTER `created_on`,\n ADD INDEX `created_by` (`created_by`),\n ADD `modified_on` datetime DEFAULT NULL AFTER `created_by`,\n ADD `modified_by` bigint(11) unsigned DEFAULT NULL AFTER `modified_on`,\n ADD INDEX `modified_by` (`modified_by`) \n ');\n }", "public function up()\n\t{\n\t\t$this->dbforge->modify_column($this->table, $this->field);\n\t}", "public function safeUp()\n {\n $this->createTable(\n $this->tableName,\n [\n 'id' => $this->primaryKey(),\n 'user_id' => $this->integer(). ' UNSIGNED NOT NULL' ,\n 'source' => $this->string()->notNull(),\n 'source_id' => $this->string()->notNull(),\n ],\n 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'\n );\n\n $this->addForeignKey('fk_social_auth_user_id_to_user_id', $this->tableName, 'user_id', '{{%user}}', 'id', 'CASCADE', 'CASCADE');\n }", "public function up()\n {\n }", "public function up()\n {\n $user = $this->table('products', ['collation' => 'utf8mb4_persian_ci', 'engine' => 'InnoDB']);\n $user\n ->addColumn('name', STRING, [LIMIT => 20])\n ->addColumn('count', STRING, [LIMIT => 75])\n ->addColumn('code', STRING, [LIMIT => 100])\n ->addColumn('buy_price', STRING, [LIMIT => 30])\n ->addColumn('sell_price', STRING, [LIMIT => 30])\n ->addColumn('aed_price', STRING, [LIMIT => 50])\n ->addTimestamps()\n ->save();\n }", "public function up()\n {\n // Drop table 'table_name' if it exists\n $this->dbforge->drop_table('lecturer', true);\n\n // Table structure for table 'table_name'\n $this->dbforge->add_field(array(\n 'nip' => array(\n \t'type' => 'VARCHAR(16)',\n\t\t\t\t'null' => true,\n\t\t\t\t'unique' => true\n\t\t\t),\n 'nik' => array(\n \t'type' => 'VARCHAR(16)',\n\t\t\t\t'null' => false,\n\t\t\t\t'unique' => true\n\t\t\t),\n 'name' => array(\n 'type' => 'VARCHAR(24)',\n 'null' => false,\n ),\n\t\t\t'id_study_program' => array(\n\t\t\t\t'type' => 'VARCHAR(24)',\n\t\t\t\t'null' => false,\n\t\t\t)\n\n ));\n $this->dbforge->add_key('nik', true);\n $this->dbforge->create_table('lecturer');\n }", "public function up()\n\t{\n\t\t// are not setting the foreign key constraint, to allow the examination module to work without the intravitreal\n\t\t// injection module being installed\n\t\t$this->addColumn('et_ophciexamination_injectionmanagementcomplex', 'left_treatment_id', 'int(10) unsigned');\n\t\t$this->addColumn('et_ophciexamination_injectionmanagementcomplex', 'right_treatment_id', 'int(10) unsigned');\n\t}", "public function safeUp()\n {\n $this->createTable('tbl_hand_made_item',\n [\n \"id\" => \"int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY\",\n \"price\" => \"integer\",\n \"discount\" => \"integer\",\n \"preview_id\" => \"integer\",\n \"name\" => \"string\",\n \"description\" => \"text\",\n \"short_description\" => \"text\",\n \"slug\" => \"string\",\n ]\n );\n }", "public function preUp()\n {\n }", "public function up()\n\t{\n\t\t// create the purchase_order_details table\n\t\tSchema::create('purchase_order_details', function($table) {\n\t\t\t$table->engine = 'InnoDB';\n\t\t $table->increments('id');\t\t \n\t\t $table->integer('purchase_order_id')->unsigned();//->foreign()->references('id')->on('orders');\n\t\t $table->integer('product_id')->unsigned();//->foreign()->references('id')->on('products');\n\t\t $table->integer('quantity');\t\t \t \n\t\t $table->integer('created_by')->unsigned();//->foreign()->references('id')->on('users');\t\t \n\t\t $table->integer('updated_by')->unsigned();\n\t\t $table->timestamps();\t\t \n\t\t});\t\n\t}", "public function up()\n {\n if (!$this->isEdu()) {\n return;\n }\n \n $this->edu_up();\n }", "public function up()\n\t{\t\t\n\t\tDB::table('professor')->insert(array(\n\t\t\t'user_id'=>'2',\t\t\t\n\t\t\t'created_at'=>date('Y-m-d H:m:s'),\n\t\t\t'updated_at'=>date('Y-m-d H:m:s')\n\t\t));\t\t\n\n\t\tDB::table('professor')->insert(array(\n\t\t\t'user_id'=>'3',\t\t\t\n\t\t\t'created_at'=>date('Y-m-d H:m:s'),\n\t\t\t'updated_at'=>date('Y-m-d H:m:s')\n\t\t));\n\t\t//\n\t}", "public function up()\n {\n $table = $this->table('qobo_translations_translations');\n $table->renameColumn('object_foreign_key', 'foreign_key');\n $table->renameColumn('object_model', 'model');\n $table->renameColumn('object_field', 'field');\n $table->renameColumn('translation', 'content');\n\n if (!$table->hasColumn('locale')) {\n $table->addColumn('locale', 'char', [\n 'default' => null,\n 'limit' => 6,\n ]);\n }\n $table->update();\n\n $table = TableRegistry::getTableLocator()->get(\"Translations.Translations\");\n $entities = $table->find()->all();\n foreach($entities as $entity) {\n $entity->setDirty('locale', true);\n $table->save($entity);\n }\n }", "public function up()\n {\n $this->addForeignKey('tours_fk', 'tours', 'id', 'tour_to_hotel', 'tour_id');\n\n $this->addForeignKey('t2h_fkh', 'tour_to_hotel', 'hotel_id', 'hotels', 'id');\n $this->addForeignKey('t2h_fkt', 'tour_to_hotel', 'tour_id', 'tours', 'id');\n }", "public function safeUp()\r\n {\r\n $this->createTable('tbl_job_application', array(\r\n 'id' => 'pk',\r\n 'job_id' => 'integer NOT NULL',\r\n 'user_id' => 'integer NULL',\r\n 'name' => 'string NOT NULL',\r\n 'email' => 'text NOT NULL',\r\n 'phone' => 'text NOT NULL',\r\n 'resume_details' => 'text NOT NULL',\r\n 'create_date' => 'datetime NOT NULL',\r\n 'update_date' => 'datetime NULL',\r\n ));\r\n }", "public function up()\n {\n $fields = array(\n 'first_login' => array('type' => 'char', 'constraint' => '1', 'default' => '1'),\n );\n $this->dbforge->add_column('user', $fields);\n }", "public function safeUp() {\n\n $this->createTable('word', [\n 'word_id' => Schema::TYPE_PK,\n 'word_lang_id' => $this->integer(),\n 'word_name' => $this->string(500) . ' NOT NULL',\n 'word_detais' => $this->string(1000),\n ]);\n\n // Add foreign key\n $this->addForeignKey('fk_language_word_1', 'word',\n 'word_lang_id', 'language', 'lang_id', 'CASCADE', 'NO ACTION');\n \n // Create index of foreign key\n $this->createIndex('word_lang_id_idx', 'word', 'word_lang_id');\n }", "public function safeUp()\n {\n $this->alterColumn('item_keuangan', 'created_at', \"TIMESTAMP NOT NULL DEFAULT '2000-01-01 00:00:00'\");\n\n /* Tambah Field */\n $this->addColumn('item_keuangan', 'status', \"TINYINT(1) NOT NULL DEFAULT '1' COMMENT '0=tidak aktif; 1=aktif;' AFTER `jenis`\");\n }", "public function up()\n {\n $this->addForeignKey(\n 'fk_category_product_from_category',\n 'category_product',\n 'category_id',\n 'category',\n 'id',\n 'NO ACTION',\n 'NO ACTION'\n );\n\n $this->addForeignKey(\n 'fk_category_product_from_product',\n 'category_product',\n 'product_id',\n 'product',\n 'id',\n 'NO ACTION',\n 'NO ACTION'\n );\n }", "public function up()\n\t{\n\t\t$this->dropColumn('korzet','utca'); \n\t\t$this->addColumn('korzet','utca','string NOT NULL');\n\t}", "public function up()\n {\n Schema::table($this->table, function (Blueprint $table) {\n // $table->bigInteger('user_id')->default(0)->after('id'); // Example\n $table->dropColumn([\n // 'user_id', // Example\n ]);\n });\n }", "public function up()\n {\n // $this->fields()->create([]);\n // $this->streams()->create([]);\n // $this->assignments()->create([]);\n }", "public function up()\n {\n $table = $this->table('admins');\n $table->addColumn('name', 'string')\n ->addColumn('role', 'string')\n ->addColumn('username', 'string')\n ->addColumn('password', 'string')\n ->addColumn('created', 'datetime')\n ->addColumn('modified', 'datetime', ['null' => true])\n ->create();\n\n\n $data = [ \n [\n 'name' => 'Pedro Santos', \n 'username' => '[email protected]',\n 'password' => '101010',\n 'role' => 'Suporte',\n 'modified' => false\n ],\n ];\n\n $adminTable = TableRegistry::get('Admins');\n foreach ($data as $value) {\n $adminTable->save($adminTable->newEntity($value));\n }\n }", "public function up(): void\n {\n try {\n // SM: We NEVER delete this table.\n if ($this->db->tableExists('prom2_pages')) {\n return;\n }\n $this->db->ForeignKeyChecks(false);\n $statement=$this->db->prepare(\"CREATE TABLE `prom2_pages` (\n `cntPageID` int(10) unsigned NOT NULL AUTO_INCREMENT,\n `txtRelativeURL` varchar(255) NOT NULL COMMENT 'Relative URL',\n `txtTitle` varchar(70) NOT NULL COMMENT 'Title',\n `txtContent` text NOT NULL COMMENT 'Content',\n `blnRobots_DoNotAllow` bit(1) NOT NULL DEFAULT b'1',\n PRIMARY KEY (`cntPageID`),\n UNIQUE KEY `txtRelativeURL` (`txtRelativeURL`),\n KEY `txtTitle` (`txtTitle`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\");\n $statement->execute();\n $statement->close();\n $this->db->ForeignKeyChecks(true);\n } catch (\\mysqli_sql_exception $exception) {\n throw $exception;\n }\n }", "public function up()\n\t{\n\t\t// Add data to committee-members\n\t\tDB::table('committee_members')->insert(array(\n\t\t\t'name' => 'Brian O\\'Sullivan',\n\t\t\t'role' => 'Chairman',\n\t\t\t'telephone' => '087-1234567',\n\t\t\t'email' => '[email protected]'\n\t\t));\n\t\tDB::table('committee_members')->insert(array(\n\t\t\t'name' => 'Anthony Barker',\n\t\t\t'role' => 'PRO',\n\t\t\t'telephone' => '087-1234567',\n\t\t\t'email' => '[email protected]'\n\t\t));\t\t\n\t}", "public function up()\n {\n $this->query(\"UPDATE `subscription_types` SET `user_label` = `name` WHERE `user_label` = '' OR `user_label` IS NULL;\");\n\n $this->table('subscription_types')\n ->changeColumn('user_label', 'string', ['null' => false])\n ->update();\n }", "public function safeUp()\n\t{\n $sql = <<<SQL\n alter table r add R8 inte;\nSQL;\n\t\t//$this->execute($sql);\n $sql = <<<SQL\n ALTER TABLE r ADD constraint FK_r8_elgz1 FOREIGN KEY (r8) REFERENCES elgz (elgz1) ON DELETE SET DEFAULT ON UPDATE CASCADE;\nSQL;\n //$this->execute($sql);\n\t}", "public function up()\n\t{\n\t\techo $this->migration('up');\n\n\t\tci('o_role_model')->migration_add('Cookie Admin', 'Cookie Designer and Eater', $this->hash());\n\t\t\n\t\treturn true;\n\t}", "public function up()\n {\n\t\t$this->addColumn('{{%user}}', 'is_super', Schema::TYPE_SMALLINT . \"(1) NULL DEFAULT '0' AFTER `status`\");\n\t\t\n\t\t//Add new column for Option Group table\n\t\t$this->addColumn('{{%option_group}}', 'option_type', Schema::TYPE_STRING . \"(25) NULL DEFAULT 'text' AFTER `title`\");\n\t\t\n\t\t//Add new column for Order table\n\t\t$this->addColumn('{{%order}}', 'is_readed', Schema::TYPE_SMALLINT . \"(1) NULL DEFAULT '0' AFTER `shipment_method`\");\n }", "public function up()\n {\n $this->addColumn(\\backend\\models\\VodProfile::tableName(), 'language', \"char(5) not null default 'en-US'\");\n }", "public function up()\n {\n if (!Schema::hasTable($this->table))\n Schema::create($this->table, function (Blueprint $table)\n {\n $table->integer('parent_id')->unsigned()->index();\n $table->foreign('parent_id')->references('id')->on('organisations')->onDelete('restrict');\n\n $table->integer('child_id')->unsigned()->index();\n $table->foreign('child_id')->references('id')->on('organisations')->onDelete('restrict');\n\n $table->primary(['parent_id','child_id'],'organisation_relations_primary');\n\n $table->timestamps();\n $table->softDeletes();\n\n $table->engine = 'InnoDB';\n });\n }", "public function up(){\n $table = $this->table('users', array('id'=>false, 'primary_key'=>'id'));\n $table->addColumn('id', 'integer', array('identity'=>true, 'signed'=>false));\n $table->addColumn('email', 'string', array('limit'=>100));\n $table->save();\n }", "public function up() { return $this->run('up'); }", "public function safeUp()\n\t{\n\t\t$this->createTable(\n\t\t\t$this->tableName,\n\t\t\tarray(\n\t\t\t\t'l_id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\t\t\t\t'model_id' => 'INT UNSIGNED NOT NULL',\n\t\t\t\t'lang_id' => 'VARCHAR(5) NULL DEFAULT NULL',\n\n\t\t\t\t// examples:\n\t\t\t\t'l_label' => 'VARCHAR(200) NULL DEFAULT NULL',\n\t\t\t\t'l_announce' => 'TEXT NULL DEFAULT NULL',\n\t\t\t\t//'l_content' => 'TEXT NULL DEFAULT NULL',\n\n\t\t\t\t'INDEX key_model_id_lang_id (model_id, lang_id)',\n\t\t\t\t'INDEX key_model_id (model_id)',\n\t\t\t\t'INDEX key_lang_id (lang_id)',\n\n\t\t\t\t'CONSTRAINT fk_principles_lang_model_id_to_main_model_id FOREIGN KEY (model_id) REFERENCES ' . $this->relatedTableName . ' (id) ON DELETE CASCADE ON UPDATE CASCADE',\n\t\t\t\t'CONSTRAINT fk_principles_lang_lang_id_to_language_id FOREIGN KEY (lang_id) REFERENCES {{language}} (code) ON DELETE RESTRICT ON UPDATE CASCADE',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\t}", "public function up()\n\t{\n\t\t// create the purchase_orders table\n\t\tSchema::create('purchase_orders', function($table) {\n\t\t\t$table->engine = 'InnoDB';\n\t\t $table->increments('id');\n\t\t $table->string('order_number', 128);\n\t\t $table->string('approved',50);\n\t\t $table->date('purchase_date');\t\t \t \t\t \t \n\t\t $table->integer('created_by')->unsigned();//->foreign()->references('id')->on('users');\t\t \t\t \n\t\t $table->integer('updated_by')->unsigned();\t\t \n\t\t $table->timestamps();\t\t \n\t\t});\t\n\t}", "public function safeUp()\n\t{\n\t\t$this->createTable(\n\t\t\t$this->tableName,\n\t\t\tarray(\n\t\t\t\t'id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\n\t\t\t\t'label' => 'VARCHAR(20) NULL DEFAULT NULL COMMENT \"language label\"',\n\t\t\t\t'code' => 'VARCHAR(5) NOT NULL COMMENT \"language code\"',\n\t\t\t\t'locale' => 'VARCHAR (5) NULL DEFAULT NULL',\n\n\t\t\t\t'visible' => 'TINYINT(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT \"0 - not visible; 1 - visible\"',\n\t\t\t\t'published' => 'TINYINT(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT \"0 - not published; 1 - published\"',\n\t\t\t\t'position' => 'INT UNSIGNED NOT NULL DEFAULT 0 COMMENT \"order by position DESC\"',\n\t\t\t\t'created' => 'INT UNSIGNED NOT NULL COMMENT \"unix timestamp - creation time\"',\n\t\t\t\t'modified' => 'INT UNSIGNED NOT NULL COMMENT \"unix timestamp - last entity modified time\"',\n\n\t\t\t\t'UNIQUE key_unique_code (code)',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\n\t\t$this->insert('{{language}}', array(\n\t\t\t'label' => 'рус',\n\t\t\t'code' => 'ru',\n\t\t\t'locale' => 'ru',\n\t\t));\n\t}", "public function up()\n {\n $this->execute('Update goods SET price_rub = price WHERE currency_id = 1');\n }", "public function up()\n\t{\n $this->dropColumn('calculo','fecha');\n\n //add column fecha in producto\n $this->addColumn('producto','fecha','date');\n\t}", "public function up(){\n Schema::table('entries', function (Blueprint $table) {\n $table->renameColumn('value', 'entry_value');\n });\n }", "public function safeUp() {\n\t$this->createTable('post', array(\n 'id' =>\"int(11) NOT NULL AUTO_INCREMENT\",\n 'created_on' =>\"int(11) NOT NULL\",\n 'title' =>\"varchar(255) NOT NULL\",\n 'context' =>\"text NOT NULL\",\n \"PRIMARY KEY (`id`)\"\n\t),'ENGINE=InnoDB DEFAULT CHARSET=utf8');\n }", "public function getUpSQL()\n {\n return array (\n 'default' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nALTER TABLE `department_summary`\n\n CHANGE `twitter_account` `positive_twitter_account` TEXT NOT NULL,\n\n ADD `negative_twitter_account` TEXT NOT NULL AFTER `positive_twitter_account`;\n\nALTER TABLE `tweets`\n\n CHANGE `positive_twitter_account` `twitter_account` TEXT NOT NULL,\n\n DROP `negative_twitter_account`;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }", "public function up()\n {\n $this->db->createCommand($this->DROP_SQL)->execute();\n $this->db->createCommand($this->CREATE_SQL)->execute();\n }", "public function up()\n {\n $this->db->createCommand($this->DROP_SQL)->execute();\n $this->db->createCommand($this->CREATE_SQL)->execute();\n }", "public function safeUp()\n {\n $this->addColumn('{{%organization}}', 'legal_entity', $this->string()->null());\n $this->addColumn('{{%organization}}', 'contact_name', $this->string()->null());\n $this->addColumn('{{%organization}}', 'about', $this->text()->null());\n $this->addColumn('{{%organization}}', 'picture', $this->string()->null());\n }", "public function up()\n {\n $this->table('agent_order_consignee_address')\n ->addColumn(Column::string('order_number')->setUnique()->setComment('订单编号'))\n \t\t->addColumn(Column::integer('agent_id')->setComment('代理商ID'))\n\t ->addColumn(Column::integer('create_time')->setDefault(1)->setComment('创建时间'))\n\t \n\t ->addColumn(Column::string('consignee_name')->setComment('收货人姓名'))\n\t ->addColumn(Column::string('consignee_phone')->setComment('收货人电话'))\n\t ->addColumn(Column::string('province')->setComment('省份'))\n\t ->addColumn(Column::string('city')->setComment('城市'))\n\t ->addColumn(Column::string('area')->setComment('地区'))\n\t ->addColumn(Column::string('address')->setComment('收货人详细地址'))\n ->create(); \n }", "public function up()\n\t{\n\t\t$this->createTable(\n\t\t\t$this->tableName,\n\t\t\tarray(\n\t\t\t\t'l_id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\t\t\t\t'model_id' => 'INT UNSIGNED NOT NULL',\n\t\t\t\t'lang_id' => 'VARCHAR(5) NULL DEFAULT NULL',\n\n\t\t\t\t'l_value' => 'TEXT NULL DEFAULT NULL',\n\n\t\t\t\t'INDEX key_model_id_lang_id (model_id, lang_id)',\n\t\t\t\t'INDEX key_model_id (model_id)',\n\t\t\t\t'INDEX key_lang_id (lang_id)',\n\n\t\t\t\t'CONSTRAINT fk_configuration_lang_model_id_to_main_model_id FOREIGN KEY (model_id) REFERENCES ' . $this->relatedTableName . ' (id) ON DELETE CASCADE ON UPDATE CASCADE',\n\t\t\t\t'CONSTRAINT fk_configuration_lang_lang_id_to_language_id FOREIGN KEY (lang_id) REFERENCES {{language}} (code) ON DELETE RESTRICT ON UPDATE CASCADE',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\t}", "public function safeUp()\r\n {\r\n $this->up();\r\n }", "public function up(){\n // $table->table('kelas')\n // ->addColumn('Id', 'int', \"11\", false, null, true, true)\n // ->addColumn('NamaKelas', 'varchar', \"100\")\n // ->create();\n }", "public function safeUp()\n\t{\n\t\t$this->createTable('pesquisa', array(\n\t\t\t'id' => 'serial NOT NULL primary key',\n\t\t\t'nome' => 'varchar',\n\t\t));\n\t}", "public function safeUp()\n\t{\n\t\t$this->up();\n\t}", "public function safeUp()\n {\n $this->up();\n }", "public function safeUp()\n {\n $this->up();\n }", "public function up(){\n // $table->table('kelassiswa')\n // ->addColumn('Id', 'int', \"11\", false, null, true, true)\n // ->addColumn('Kelas_Id', 'int', \"11\")\n // ->addColumn('Peserta_Id', 'int', \"11\")\n // ->addForeignKey('Peserta_Id', 'peserta', \"Id\", \"CASCADE\")\n // ->addForeignKey('Kelas_Id', 'kelas', \"Id\")\n // ->create();\n\n }", "public function up()\n\t{\n\t\tSchema::table('project_sections', function($t){\n\t\t\t$t->integer('created_by_project_id')->nullable()->unsigned();\n\t\t\t$t->boolean('public')->default(0);\n\n $t->foreign('created_by_project_id')->references('id')->on('projects')->on_delete('SET NULL');\n\t\t});\n\t}", "public function up(){\n\t\tglobal $wpdb;\n\n\t\t$wpdb->query('ALTER TABLE `btm_tasks` ADD COLUMN `last_run` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP AFTER `date_created`;');\n\t}", "public function up()\n {\n Schema::table('user_permissions', function ($table) {\n $table->dropColumn('solder_create');\n });\n\n Schema::table('user_permissions', function ($table) {\n $table->dropColumn('solder_mods');\n });\n\n Schema::table('user_permissions', function ($table) {\n $table->dropColumn('solder_modpacks');\n });\n\n Schema::table('user_permissions', function ($table) {\n $table->boolean('solder_keys')->default(0);\n $table->boolean('solder_clients')->default(0);\n $table->boolean('modpacks_create')->default(0);\n $table->boolean('modpacks_manage')->default(0);\n $table->boolean('modpacks_delete')->default(0);\n });\n }", "public function up()\n {\n Schema::dropIfExists('db_question_new.t_answer_type');\n Schema::create('db_question_new.t_answer_type', function (Blueprint $table){\n $table->increments('id');\n t_field($table->integer('answer_type_no'),\"答案序号\");\n t_field($table->string('name'),\"步骤名字\");\n t_field($table->integer('subject'),\"科目id\");\n t_field($table->integer('open_flag')->default(1),\"开启与否\");\n }); \n }", "public function up()\n\t{\n\t\t$sql = \"create table tbl_rights\n\t\t\t\t(\n\t\t\t\t\titemname varchar(64) not null,\n\t\t\t\t\ttype integer not null,\n\t\t\t\t\tweight integer not null,\n\t\t\t\t\tprimary key (itemname),\n\t\t\t\t\tforeign key (itemname) references tbl_auth_item (name) on delete cascade on update cascade\n\t\t\t\t)\";\n\t\t $this->execute($sql);\n\t\t \n\t}", "public function safeUp()\n\t{\n\t\t$this->createTable( 'tbl_auth_item', array(\n\t\t \"name\" => \"varchar(64) not null\",\n\t\t \"type\" => \"integer not null\",\n\t\t \"description\" => \"text\",\n\t\t \"bizrule\" => \"text\",\n\t\t \"data\" => \"text\",\n\t\t \"primary key (name)\",\n\t\t));\n\n\t\t$this->createTable(\"tbl_auth_item_child\", array(\n \t\t\"parent\" => \" varchar(64) not null\",\n\t\t\"child\" => \" varchar(64) not null\",\n \t\t\"primary key (parent,child)\",\n\t\t));\n\n\t\t$this->createTable(\"tbl_auth_assignment\",array(\n \t\t\"itemname\" => \"varchar(64) not null\",\n \t\t\"userid\" => \"varchar(64) not null\",\n \t\t\"bizrule\" => \"text\",\n \t\t\"data\"\t => \"text\",\n \t\t\"primary key (itemname,userid)\",\n\t\t));\n\n\t\t$this->addForeignKey('fk_auth_item_child_parent','tbl_auth_item_child','parent','tbl_auth_item','name','CASCADE','CASCADE');\n\t\t$this->addForeignKey('fk_auth_assignment_itemname','tbl_auth_assignment','itemname','tbl_auth_item','name');\n\t\t$this->addForeignKey('fk_auth_assignment_userid','tbl_auth_assignment','userid','tbl_user','id');\n\t}", "public function up()\n {\n // add foreign key for table `articles`\n $this->addForeignKey(\n 'fk-comments-article_id',\n 'comments',\n 'article_id',\n 'article',\n 'id'\n );\n }", "public function safeUp()\r\n\t{\r\n\t\t$this->up();\r\n\t}", "public function up()\n {\n\n $tableOptions = null;\n if ($this->db->driverName === 'mysql') {\n $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';\n }\n\n $this->createTable($this->createTableName, [\n 'id' => $this->primaryKey(),\n 'name' => $this->string()->notNull(),\n 'type' => $this->integer(1)->notNull(),\n 'location' => $this->text()->defaultValue(null),\n 'description' => $this->text()->defaultValue(null),\n 'created_by' => $this->integer()->notNull(),\n 'start_at' => $this->integer()->defaultValue(null),\n 'active' => $this->boolean()->defaultValue(true),\n\n ],$tableOptions);\n\n\n $this->addColumn($this->updateTableNameHoliday, $this->addColumnOne, $this->integer()->notNull()->after('name'));\n $this->addColumn($this->updateTableNameHoliday, $this->addColumnTwo, $this->integer()->notNull()->after($this->addColumnOne));\n $this->addColumn($this->updateTableNameHolidayConfig, $this->addColumnOne, $this->integer()->notNull()->after('name'));\n $this->addColumn($this->updateTableNameHolidayConfig, $this->addColumnTwo, $this->integer()->notNull()->after($this->addColumnOne));\n\n $moduleInvite = Module::findOne(['name' => 'Actioncalendar', 'slug' => 'actioncalendar']);\n if(empty($moduleInvite)) {\n $this->batchInsert('{{%module}}', ['parent_id', 'name', 'slug', 'visible', 'sorting'], [\n [null, 'Actioncalendar', 'actioncalendar', 1, 22],\n ]);\n }\n\n }", "public function up()\n\t{\n\t\tSchema::table('user_hasil', function($table)\n\t\t{\n\t\t\t$table->create();\n\t\t\t$table->integer('user_id');\n\t\t\t$table->string('grade', 2);\n\t\t\t$table->decimal('hasil', 5, 2);\n\t\t\t$table->year('tahun');\n\t\t\t$table->timestamps();\n\n\t\t\t$table->foreign('user_id')->references('id')->on('users')->on_update('cascade');\n\t\t});\n\t}", "public function safeUp()\r\n {\r\n $tableOptions = null;\r\n if ($this->db->driverName === 'mysql') {\r\n $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB';\r\n }\r\n\r\n $this->createTable('{{%contact_msg}}', [\r\n 'id' => Schema::TYPE_PK,\r\n 'from_email' => Schema::TYPE_STRING . \"(320) NOT NULL\",\r\n 'to_email' => Schema::TYPE_STRING . \"(320) NULL\",\r\n 'subject' => Schema::TYPE_STRING . \"(300) NOT NULL\",\r\n 'text' => Schema::TYPE_TEXT,\r\n 'viewed' => Schema::TYPE_BOOLEAN . \"(1) NOT NULL DEFAULT '0'\",\r\n 'created_at' => Schema::TYPE_TIMESTAMP . \" NULL\",\r\n 'updated_at' => Schema::TYPE_TIMESTAMP . \" NULL\",\r\n ], $tableOptions);\r\n }", "public function up()\n {\n $this->alterColumn('{{%hystorical_data}}', 'project_id', $this->integer());\n\n $this->dropForeignKey('fk-hystorical_data-project_id',\n '{{%hystorical_data}}');\n\n $this->addForeignKey(\n 'fk-hystorical_data-project_id',\n '{{%hystorical_data}}',\n 'project_id',\n '{{%projects}}',\n 'id',\n 'SET NULL'\n );\n }", "public function up()\n\t{\n\t\tSchema::create('flows_steps', function($table) {\n\n\t\t\t$table->engine = 'InnoDB';\n\n\t\t $table->increments('stepid');\n\t\t $table->integer('flowid');\n\t\t $table->string('step', 100);\n\t\t $table->integer('roleid');\n\t\t $table->integer('parentid');\n\t\t $table->integer('state');\n\t\t $table->integer('page');\n\t\t $table->integer('condition2');\n\t\t $table->timestamps();\n\n\t\t});\n\t}", "public function safeUp()\n {\n $this->createTable('site_phrase', array(\n 'site_id' => self::MYSQL_TYPE_UINT,\n 'phrase' => 'string NOT NULL',\n 'hash' => 'varchar(32)',\n 'price' => 'decimal(10,2) NOT NULL',\n 'active' => self::MYSQL_TYPE_BOOLEAN,\n ));\n\n $this->addForeignKey('site_phrase_site_id', 'site_phrase', 'site_id', 'site', 'id', 'CASCADE', 'RESTRICT');\n }", "public function up()\n\t{\n\t\tSchema::table('devices', function($table)\n\t\t{\n\t\t\t$table->string('uuid')->unique;\n\t\t\t$table->drop_column('uid');\n\t\t});\n\t}", "public function up()\n\t{\n\t\t$this->execute(\"\n INSERT INTO `authitem` VALUES('D2finv.FiitInvoiceItem.*', 0, 'Edit invoice items', NULL, 'N;');\n INSERT INTO `authitem` VALUES('D2finv.FiitInvoiceItem.View', 0, 'View invoice items', NULL, 'N;');\n INSERT INTO `authitem` VALUES('D2finv.FinvInvoice.*', 0, 'Edit invoice records', NULL, 'N;');\n INSERT INTO `authitem` VALUES('D2finv.FinvInvoice.View', 0, 'View invoice records', NULL, 'N;');\n \n INSERT INTO `authitem` VALUES('InvoiceEdit', 2, 'Edit invoice records', NULL, 'N;');\n INSERT INTO `authitem` VALUES('InvoiceView', 2, 'View invoice records', NULL, 'N;');\n \n INSERT INTO `authitemchild` VALUES('InvoiceEdit', 'D2finv.FiitInvoiceItem.*');\n INSERT INTO `authitemchild` VALUES('InvoiceView', 'D2finv.FiitInvoiceItem.View');\n INSERT INTO `authitemchild` VALUES('InvoiceEdit', 'D2finv.FinvInvoice.*');\n INSERT INTO `authitemchild` VALUES('InvoiceView', 'D2finv.FinvInvoice.View');\n \");\n\t}", "public function up()\n {\n $this->createTable('post',[\n 'id' => $this->primaryKey(),\n 'author_id' => $this->integer(),\n 'title' => $this->string(255)->notNull()->unique(),\n 'content' => $this->text(),\n 'published_at' => $this->dateTime()->defaultExpression('CURRENT_TIMESTAMP'),\n 'updated_at' => $this->dateTime()->defaultExpression('CURRENT_TIMESTAMP'),\n 'status' => \"ENUM('draft','published')\",\n 'image' => $this->string(255)\n ]); \n\n $this->addForeignKey(\n 'fk_post_author_id',\n 'post',\n 'author_id',\n 'user',\n 'id',\n 'CASCADE',\n 'NO ACTION'\n );\n }", "public function up()\n\t{\n// $import->import();\n\t}", "public function up()\n\t{\n\t\tif(Yii::app()->db->getSchema()->getTable(\"{{rights}}\")){\n\t\t\t$this->dropTable(\"authItem\");\n\t\t}\n\n\t\t$this->createTable(\"{{rights}}\", array(\n\t\t\t\"itemname\" => \"varchar(64) CHARACTER SET UTF8 NOT NULL\",\n\t\t\t\"type\"\t => \"int not null\",\n\t\t\t\"weight\" => \"int not null\",\n\t\t\t\"PRIMARY KEY (itemname)\"\n\t\t\t));\n\t}", "public function up() {\r\n\t\t// UP\r\n\t\t$column = parent::Column();\r\n\t\t$column->setName('id')\r\n\t\t\t\t->setType('biginteger')\r\n\t\t\t\t->setIdentity(true);\r\n\t\tif (!$this->hasTable('propertystorage')) {\r\n\t\t\t$this->table('propertystorage', [\r\n\t\t\t\t\t\t'id' => false,\r\n\t\t\t\t\t\t'primary_key' => 'id'\r\n\t\t\t\t\t])->addColumn($column)\r\n\t\t\t\t\t->addColumn('path', 'text', ['limit' => 1024])\r\n\t\t\t\t\t->addColumn('name', 'text', ['limit' => 100])\r\n\t\t\t\t\t->addColumn('valuetype', 'integer',[])\r\n\t\t\t\t\t->addColumn('value', 'text', [])\r\n\t\t\t\t\t->create();\r\n\t\t}\r\n\t}", "public function up()\n {\n $perfis = [\n [\n 'id' => 1,\n 'perfil' => 'Genérico',\n 'ativo' => 1\n ]\n ];\n\n $this->insert('singular_perfil', $perfis);\n\n $usuarios = [\n [\n 'id' => 1,\n 'nome' => 'Singular Framework',\n 'login' => 'singular',\n 'senha' => 'singular',\n 'perfil_id' => 1\n ]\n ];\n\n $this->insert('singular_usuario', $usuarios);\n }", "public function safeUp()\n {\n $this->createTable('user', array(\n 'name' => 'string',\n 'username' => 'string NOT NULL',\n 'password' => 'VARCHAR(32) NOT NULL',\n 'salt' => 'VARCHAR(32) NOT NULL',\n 'role' => \"ENUM('partner', 'admin')\"\n ));\n }", "public function up()\n\t{\n\t\t$demoUser = new User();\n\t\t$demoUser->username = \"demo\";\n\t\t$demoUser->email = '[email protected]';\n\t\t$demoUser->password = 'password';\n\t\t$demoUser->create_time = new CDbExpression('NOW()');\n\t\t$demoUser->update_time = new CDbExpression('NOW()');\n\n\t\t$demoUser->save();\n\n\t\t$adminUser = new User();\n\t\t$adminUser->username = \"admin\";\n\t\t$adminUser->email = '[email protected]';\n\t\t$adminUser->password = 'password';\n\t\t$adminUser->create_time = new CDbExpression('NOW()');\n\t\t$adminUser->update_time = new CDbExpression('NOW()');\n\n\t\t$adminUser->save();\n\n\t}", "public function safeUp()\n {\n $tables = Yii::$app->db->schema->getTableNames();\n $dbType = $this->db->driverName;\n $tableOptions_mysql = \"CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB\";\n\n /* MYSQL */\n if (!in_array('question_tag', $tables)) {\n if ($dbType == \"mysql\") {\n $this->createTable('{{%question_tag}}', [\n 'question_id' => 'INT(11) NOT NULL',\n 'tag_id' => 'INT(11) NOT NULL',\n ], $tableOptions_mysql);\n }\n }\n }", "public function safeUp()\n\t{\n\t\t$this->createTable(\n\t\t\t'like',\n\t\t\tarray(\n\t\t\t\t'id'=>'int(11) UNSIGNED NOT NULL AUTO_INCREMENT',\n\t\t\t\t'user_id' => 'int(11) UNSIGNED NOT NULL',\n\t\t\t\t'post_id' => 'int (11) NOT NULL',\n\t\t\t\t'status' => 'TINYINT(1)',\n\t\t\t\t'created_at' => 'int(11)',\n\t\t\t\t'updated_at' => 'int(11)',\n\t\t\t\t'PRIMARY KEY (id)',\n\t\t\t\t),\n\t\t\t'ENGINE=InnoDB'\n\n\t\t\t);\n\t}", "public function up()\n\t{\n\t\tSchema::table('entries', function($table) {\n $table->create();\n $table->increments('id');\n $table->string('title', 128);\n $table->string('body');\n $table->integer('users_id')->unsigned();\n $table->index('users_id');\n $table->integer('last_edited_by');\n $table->foreign('users_id')->references('id')->on('users')->on_delete('no action');\n $table->timestamps();\n });\n\t}", "public function up()\n {\n $this->alterColumn(\\app\\models\\EmailImportLead::tableName(), 'password', $this->string()->null());\n $this->alterColumn(\\app\\models\\EmailImportLead::tableName(), 'status', $this->integer()->null());\n }", "public function up()\n {\n\t\t$tableOptions = null;\n if ($this->db->driverName === 'mysql') {\n $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';\n }\n\t\t\n\t\t$TABLE_NAME = 'HaberDeneme12';\n $this->createTable($TABLE_NAME, [\n 'HaberID' => $this->integer(10)->notNull(),\n 'Kategori' => $this->string(12)->notNull(),\n 'Baslik' => $this->string(128)->notNull(),\n 'Ozet' => $this->text()->notNull(),\n 'Detay' => $this->text()->notNull(),\n 'Resim' => $this->text()->notNull(),\n 'EklenmeTarihi' => $this->date(),\n 'GuncellenmeTarihi' => $this->date()\n ], $tableOptions);\n\t\t\n\t\t\n\t\t$TABLE_NAME = 'HaberKategoriDeneme12';\n\t\t $this->createTable($TABLE_NAME, [\n 'KategoriID' => $this->integer(10)->notNull(),\n 'Kategori' => $this->string(20)->notNull()\n ], $tableOptions);\n\t\t\n }", "public function up()\n\t{\n\t\t$fields = array(\n \"`piezas` DECIMAL(3,2) DEFAULT NULL\",\n\n\t\t);\n\t\t$this->dbforge->add_column('rel_monto_servicios', $fields);\n\n\t}", "public function up()\n {\n $this->insert('key_value', [\n 'key' => 'day_feed_count_dnr',\n 'value' => '15',\n ]);\n }", "public function up()\n {\n // 创建操作记录表\n $tables = $this->table('history');\n // 用户动作\n $tables->addColumn('action', 'string', ['limit' => 20])\n ->addColumn('ip', 'string', ['limit' => 129])\n // 建立用户\n ->addColumn('user_id', 'integer')\n // 登录时间\n ->addColumn('operation_time', 'datetime')\n // 操作详情\n ->addColumn('desc', 'string',['limit'=>500,'null' => true])\n ->create();\n }", "public function up()\n {\n $table = $this->table('vehicle_model_suggestions');\n\n if (!$table->exists()) {\n $table\n ->addPrimaryKey('id')\n ->addColumn('vehicle_id', 'integer', ['null' => false])\n ->addColumn('vehicle_model_id', 'integer', ['null' => false])\n ->addColumn('suggestion', 'text')\n ->addTimestamps()\n ->addColumn('deleted_at', 'datetime')\n ->create();\n }\n }", "public function safeUp()\n {\n $this->insert('category',['name'=>'Uncategorized', 'slug'=>'uncategorized', 'description'=>'Default Category', 'created_at'=> new Expression('NOW()'),\n 'updated_at'=> new Expression('NOW()')]);\n $this->insert('user',['username'=>'Administrator', 'password_hash'=>'$2y$13$6yoLjvVORp/7EO1u8phYTuWYzhMSM4LVVsebZgcqEKj/EQLvo5nJK',\n 'email'=>'[email protected]',\n 'created_at'=> new Expression('NOW()'),\n 'updated_at'=> new Expression('NOW()'),\n 'status'=>1\n ]\n );\n }", "public function safeUp()\n {\n $this->createTable($this->tableName, [\n 'post_id' => $this->bigInteger()->notNull(),\n 'category_id' => $this->bigInteger()->notNull(),\n ]);\n\n $this->addForeignKey('post_category_post_id_fk', $this->tableName, 'post_id', '{{%post}}', 'id', 'CASCADE', 'CASCADE');\n $this->addForeignKey('post_category_category_id_fk', $this->tableName, 'category_id', '{{%category}}', 'id', 'CASCADE', 'CASCADE');\n }", "public function up()\n {\n Schema::table('categories', function(Blueprint $table)\n {\n $table->integer('parent_id', false, true)->nullable()->after('cat_order');\n });\n }", "public function safeUp()\n\t{\n\t\t$this->createTable(\n\t\t\t$this->tableName,\n\t\t\tarray(\n\t\t\t\t'id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\n\t\t\t\t'application_id' => 'VARCHAR(32) NOT NULL DEFAULT \"\" COMMENT \"Ид приложения\"',\n\n\t\t\t\t'message' => 'TEXT NOT NULL DEFAULT \"\" COMMENT \"Оригинал\"',\n\t\t\t\t'category' => 'VARCHAR(32) NOT NULL DEFAULT \"\" COMMENT \"Категория\"',\n\t\t\t\t'language' => 'VARCHAR(5) NOT NULL DEFAULT \"\" COMMENT \"Язык\"',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\t}", "public function up()\n\t{\n\t\t//\n\t\tSchema::create('options',function($table){\n\t\t\t$table->increments('id');\n\t\t\t$table->boolean('activate_pn');\n\t\t\t$table->string('basic_name');\n\t\t\t$table->string('basic_pass');\n\t\t\t$table->timestamps();\n\t\t});\n\n\t\t$o = new Option;\n\t\t$o->activate_pn = 0;\n\t\t$o->save();\n\t}", "public function up() {\n\t\t$this->dbforge->add_field(array(\n\t\t\t'id' => array(\n\t\t\t\t'type' => 'INT',\n\t\t\t\t'constraint' => '10',\n\t\t\t\t'unsigned' => TRUE,\n\t\t\t\t'auto_increment' => TRUE\n\t\t\t),\n\t\t\t'name' => array(\n\t\t\t\t'type' => 'VARCHAR',\n\t\t\t\t'constraint' => '100',\n\t\t\t),\n\t\t\t'path' => array(\n\t\t\t\t'type' => 'VARCHAR',\n\t\t\t\t'constraint' => '100',\n\t\t\t)\n\t\t));\n\t\t$this->dbforge->add_key('id', TRUE);\n\t\t$this->dbforge->add_key('path');\n\t\t$this->dbforge->create_table('categories');\n\n\t\t// Table structure for table 'event_categories'\n\t\t$this->dbforge->add_field(array(\n\t\t\t'event_id' => array(\n\t\t\t\t'type' => 'INT',\n\t\t\t\t'constraint' => '10',\n\t\t\t),\n\t\t\t'category_id' => array(\n\t\t\t\t'type' => 'INT',\n\t\t\t\t'constraint' => '10',\n\t\t\t\t'unsigned' => TRUE,\n\t\t\t),\n\t\t));\n\t\t$this->dbforge->add_key('event_id', TRUE);\n\t\t$this->dbforge->add_key('category_id', TRUE);\n\t\t$this->dbforge->create_table('event_categories');\n\t}", "public function up()\n\t{\n Laravel\\Database\\Schema::create(\"orbs\", function($table){\n $table->increments(\"id\");\n $table->string(\"name\");\n $table->string(\"description\");\n $table->integer(\"coins\");\n $table->integer(\"points\");\n $table->integer(\"min_level\");\n $table->integer(\"max_level\");\n $table->integer(\"owner_character\");\n $table->integer(\"acquisition_time\");\n $table->integer(\"last_attacker\");\n $table->integer(\"last_attack_time\");\n $table->string(\"image\");\n });\n\t}" ]
[ "0.80062366", "0.79145443", "0.79145443", "0.79145443", "0.7572342", "0.756089", "0.75283176", "0.7498379", "0.7493237", "0.7453656", "0.74463314", "0.7433381", "0.74307704", "0.7427088", "0.741794", "0.73779047", "0.7374933", "0.7370453", "0.73637444", "0.73505706", "0.7329024", "0.7313519", "0.7298817", "0.72950184", "0.72917736", "0.7291469", "0.72913444", "0.72849613", "0.72839737", "0.7272078", "0.7271878", "0.72659117", "0.7262893", "0.7261672", "0.7256839", "0.72505474", "0.7249633", "0.72441125", "0.724062", "0.72376186", "0.7218244", "0.72177947", "0.72046006", "0.7203395", "0.7196059", "0.7191219", "0.7189963", "0.7177052", "0.71761394", "0.7167738", "0.7164105", "0.7164105", "0.7159096", "0.7147647", "0.7136521", "0.7129768", "0.7124664", "0.7123368", "0.71168584", "0.7104628", "0.7104628", "0.7104618", "0.7097006", "0.70931643", "0.70886755", "0.7087018", "0.7086326", "0.70830804", "0.70829463", "0.70780045", "0.70702124", "0.70690626", "0.7066111", "0.7062268", "0.7058938", "0.705882", "0.70556235", "0.70549136", "0.7054758", "0.70498437", "0.70483595", "0.7047308", "0.7045881", "0.70445794", "0.7043173", "0.703882", "0.7038126", "0.703674", "0.7033728", "0.7032356", "0.7031423", "0.70257956", "0.70142514", "0.70101255", "0.7006208", "0.6988486", "0.6984963", "0.69629973", "0.69612974", "0.69587934", "0.6957519" ]
0.0
-1
this down() migration is autogenerated, please modify it to your needs
public function down(Schema $schema): void { $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); $this->addSql('ALTER TABLE book DROP FOREIGN KEY FK_CBE5A3314296D31F'); $this->addSql('ALTER TABLE borrowed DROP FOREIGN KEY FK_2F44F8E5A76ED395'); $this->addSql('ALTER TABLE book DROP FOREIGN KEY FK_CBE5A3318C03F15C'); $this->addSql('ALTER TABLE books_borrowed DROP FOREIGN KEY FK_464B489D16A2B381'); $this->addSql('ALTER TABLE books_borrowed DROP FOREIGN KEY FK_464B489D64BC3968'); $this->addSql('DROP TABLE genre'); $this->addSql('DROP TABLE user'); $this->addSql('DROP TABLE employee'); $this->addSql('DROP TABLE book'); $this->addSql('DROP TABLE borrowed'); $this->addSql('DROP TABLE books_borrowed'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function down()\n {\n //add your migration here \n }", "public function down()\n {\n //add your migration here\n }", "public function down()\n\t{\n $this->dropColumn('producto','fecha');\n\n //add column fecha in producto\n $this->addColumn('calculo','fecha','date');\n\t}", "public function down()\n {\n \t\n \t$this->createTable('os', [\n \t\t\t'id' => Schema::TYPE_PK,\n \t\t\t'name' => Schema::TYPE_STRING . ' NOT NULL',\n \t\t\t]);\n \t$this->insert('os', ['id' => 1, 'name' => 'Any']);\n \t$this->insert('os', ['id' => 2, 'name' => 'CentOS']);\n \t$this->insert('os', ['id' => 3, 'name' => 'RHEL']);\n \t$this->insert('os', ['id' => 4, 'name' => 'Fedora']);\n \t \n \t$this->createTable('os_bit', [\n \t\t\t'id' => Schema::TYPE_PK,\n \t\t\t'name' => Schema::TYPE_STRING . ' NOT NULL',\n \t\t\t]);\n\n return false;\n }", "public function down()\n {\n //Schema::dropIfExists('c');//回滚时执行\n\n }", "public function down()\n {\n $this->dbforge->drop_column('user', 'created_at');\n }", "public function down()\n {\n $this->dropForeignKey(\n 'fk-video-blog_id',\n 'video'\n );\n\n\n echo \"m160820_150846_video_create reverted.\\n\";\n\n }", "public function down()\n\t{\nDB::query(\n\"drop table haal;\");\nDB::query(\n\"drop table kandidaat;\");\nDB::query(\n\"drop table haaletaja;\");\nDB::query(\n\"drop table partei;\");\nDB::query(\n\"drop table valimisringkond;\");\n\t}", "public function down()\n\t{\n\t\t// Remove data from committee_members\n\t\tDB::table('committee_members')->where('id', '<', 3)->delete();\t\n\t}", "public function down(){\n $this->dropTable('users');\n }", "public function getDownSQL()\n {\n return array (\n 'default' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nALTER TABLE `department_summary`\n\n CHANGE `positive_twitter_account` `twitter_account` TEXT NOT NULL,\n\n DROP `negative_twitter_account`;\n\nALTER TABLE `tweets`\n\n CHANGE `twitter_account` `positive_twitter_account` TEXT NOT NULL,\n\n ADD `negative_twitter_account` INTEGER NOT NULL AFTER `quality_tweet`;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }", "public function down()\n {\n Schema::table('attachments', function(Blueprint $table) {\n\n $table->dropColumn('viewable_id');\n $table->dropColumn('viewable_type');\n\n\n });\n }", "public function down()\n\t{\n\t\t//Schema::drop('purchase_order_details');\n\t}", "public function getDownSQL()\r\n {\r\n return array (\n 'propel' => '\r\n# This is a fix for InnoDB in MySQL >= 4.1.x\r\n# It \"suspends judgement\" for fkey relationships until are tables are set.\r\nSET FOREIGN_KEY_CHECKS = 0;\r\n\r\nDROP TABLE IF EXISTS `movimiento`;\r\n\r\n# This restores the fkey checks, after having unset them earlier\r\nSET FOREIGN_KEY_CHECKS = 1;\r\n',\n);\r\n }", "public function down()\n\t{\n//\t\t$this->dbforge->drop_table('blog');\n\n//\t\t// Dropping a Column From a Table\n\t\t$this->dbforge->drop_column('categories', 'icon');\n\t}", "public function down()\n\t{\n\t\t// nothing to do here.\n\t}", "public function down(){\r\n $this->dbforge->drop_table('users'); //eliminacion de la tabla users\r\n }", "public function down()\n\t{\n\t\tSchema::drop('student');\n\t\t//\n\t}", "public function down()\n{\n\nSchema::drop('event_user');\nSchema::drop('events');\nSchema::drop('file');\nSchema::drop('file_ref');\nSchema::drop('groups');\nSchema::drop('project_user');\nSchema::drop('projects');\nSchema::drop('quicknote');\nSchema::drop('subtasks');\nSchema::drop('task_user');\nSchema::drop('tasks');\nSchema::drop('throttle');\nSchema::drop('timesheet');\nSchema::drop('todos');\nSchema::drop('user_profile');\nSchema::drop('users');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\n\n}", "public function down() \n {\n \n }", "public function down()\n\t{\n\t}", "public function down()\n\t{\n\t}", "public function down()\n\t{\n\t\t//\n\t}", "public function down()\n\t{\n\t\t//\n\t}", "public function down()\n\t{\n\t\t//\n\t}", "public function down()\n {\n $this->table('contents')->drop()->save();\n }", "public function down()\n\t{\n\t\tSchema::drop('education');\n\t}", "public function down()\n\t{\n\t\tSchema::drop('l_wardrobe_table');\n\t}", "public function down()\n\t{\n\t\techo $this->migration('down');\n\n\t\tci('o_role_model')->migration_remove($this->hash());\n\t\t\n\t\treturn true;\n\t}", "public function safeDown()\n\t{\n $sql=\" ALTER TABLE `tbl_venta` DROP `punto_venta_id` ;\";\n $this->execute($sql);\n //quitando la columna pto_venta de tbl_empleado\n $sql=\" ALTER TABLE `tbl_empleado` DROP `punto_venta_id` ;\";\n $this->execute($sql);\n\t}", "public function down()\n {\n\tSchema::drop('quizzes');\n }", "public function down()\n {\n $this->output->writeln('Down migration is not available.');\n }", "public function down()\n {\n $this->executeSQL('SET FOREIGN_KEY_CHECKS=0');\n\n $this->executeSQL('DROP TABLE link');\n $this->executeSQL('DROP TABLE link_category');\n\n $this->executeSQL('SET FOREIGN_KEY_CHECKS=1');\n }", "public function down ()\n {\n }", "abstract public function down();", "abstract public function down();", "abstract public function down();", "public function down()\n {\n // This migration was removed, but fails when uninstalling plugin\n }", "public function down()\r\n {\r\n $this->dbforge->drop_table('users');\r\n }", "public function down() {\n\n\t}", "public function down()\n {\n $this->dbforge->drop_table('lecturer', true);\n }", "public function down()\n\t{\n\t\tSchema::drop('flows_steps');\n\t}", "public function down(Schema $schema) : void\n {\n $this->addSql('CREATE TABLE galaxiee (id INT AUTO_INCREMENT NOT NULL, idu_id INT NOT NULL, nom VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, INDEX IDX_8576D2AF376A6230 (idu_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE trou_noir (id INT AUTO_INCREMENT NOT NULL, id_g_id INT DEFAULT NULL, nom VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, INDEX IDX_AB27242D95951086 (id_g_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('ALTER TABLE galaxiee ADD CONSTRAINT FK_8576D2AF376A6230 FOREIGN KEY (idu_id) REFERENCES univers (id)');\n $this->addSql('ALTER TABLE trou_noir ADD CONSTRAINT FK_AB27242D95951086 FOREIGN KEY (id_g_id) REFERENCES galaxie (id)');\n $this->addSql('DROP TABLE trounoir');\n $this->addSql('ALTER TABLE galaxie DROP FOREIGN KEY FK_1C880711376A6230');\n $this->addSql('DROP INDEX IDX_1C880711376A6230 ON galaxie');\n $this->addSql('ALTER TABLE galaxie CHANGE idu_id id_u_id INT NOT NULL');\n $this->addSql('ALTER TABLE galaxie ADD CONSTRAINT FK_1C8807116F858F92 FOREIGN KEY (id_u_id) REFERENCES univers (id)');\n $this->addSql('CREATE INDEX IDX_1C8807116F858F92 ON galaxie (id_u_id)');\n $this->addSql('ALTER TABLE planete DROP FOREIGN KEY FK_490E3E5712013DEC');\n $this->addSql('DROP INDEX IDX_490E3E5712013DEC ON planete');\n $this->addSql('ALTER TABLE planete ADD id_s_id INT NOT NULL, ADD nb_sattelite INT NOT NULL, DROP ids_id, DROP nb_satelite');\n $this->addSql('ALTER TABLE planete ADD CONSTRAINT FK_490E3E574AEED04E FOREIGN KEY (id_s_id) REFERENCES systeme (id)');\n $this->addSql('CREATE INDEX IDX_490E3E574AEED04E ON planete (id_s_id)');\n $this->addSql('ALTER TABLE systeme DROP FOREIGN KEY FK_95796DE3CD7AFD24');\n $this->addSql('DROP INDEX IDX_95796DE3CD7AFD24 ON systeme');\n $this->addSql('ALTER TABLE systeme CHANGE idg_id id_g_id INT NOT NULL');\n $this->addSql('ALTER TABLE systeme ADD CONSTRAINT FK_95796DE395951086 FOREIGN KEY (id_g_id) REFERENCES galaxie (id)');\n $this->addSql('CREATE INDEX IDX_95796DE395951086 ON systeme (id_g_id)');\n }", "public function down() {\n $this->dbforge->drop_column('timesheets_items', 'orgID', TRUE);\n $this->dbforge->drop_column('timesheets_items', 'brandID', TRUE);\n $this->dbforge->drop_column('timesheets_items', 'reason_desc', TRUE);\n $this->dbforge->drop_column('timesheets_expenses', 'orgID', TRUE);\n $this->dbforge->drop_column('timesheets_expenses', 'brandID', TRUE);\n $this->dbforge->drop_column('timesheets_expenses', 'reason_desc', TRUE);\n\n // change reason to note\n $fields = array(\n 'reason' => array(\n 'name' => 'note',\n 'type' => \"VARCHAR\",\n 'constraint' => 200,\n 'null' => TRUE\n )\n );\n $this->dbforge->modify_column('timesheets_items', $fields);\n $this->dbforge->modify_column('timesheets_expenses', $fields);\n }", "public function down(): void\n {\n // Remove your data\n }", "public function down()\n\t{\n\t\t//Schema::drop('purchase_orders');\n\t\t//Schema::drop('purchase_order_details');\n\t}", "public function down()\n {\n\tSchema::drop('activities');\n }", "public function down(){\n $this->dbforge->drop_table('subcategories_news'); //eliminacion de la tabla subcategories_news\n }", "public function down()\n {\n //return false;\n\t\t\n\t\t$TABLE_NAME = 'Haber';\n $this->dropTable($TABLE_NAME);\n\t\t\n\t\t$TABLE_NAME = 'HaberKategori';\n $this->dropTable($TABLE_NAME);\n }", "public function down()\n {\n }", "public function down()\n {\n }", "public function down()\n\t{\n\t\tDB::table('professor')->where('professor_id', '=', 1)->delete();\n\t\tDB::table('professor')->where('professor_id', '=', 2)->delete();\n\t\tDB::query('ALTER TABLE professor AUTO_INCREMENT = 1');\n\n\t\t//\n\t}", "public function down(): bool {\n\t\t// Remove & add logic to revert the migration here.\n\t\techo \"M230123030315BaseTables cannot be rolled back.\\n\";\n\t\treturn false;\n\t}", "public function getDownSQL()\r\n {\r\n return array (\n 'propel' => '\r\n# This is a fix for InnoDB in MySQL >= 4.1.x\r\n# It \"suspends judgement\" for fkey relationships until are tables are set.\r\nSET FOREIGN_KEY_CHECKS = 0;\r\n\r\nALTER TABLE `promocion` CHANGE `fecha_inicio` `fecha_inicio` DATE NOT NULL;\r\n\r\nALTER TABLE `promocion` CHANGE `fecha_fin` `fecha_fin` DATE NOT NULL;\r\n\r\nALTER TABLE `promocion` CHANGE `descuento` `descuento` DECIMAL;\r\n\r\nALTER TABLE `promocion`\r\n ADD `descripcion` VARCHAR(70) AFTER `id`,\r\n ADD `estado` VARCHAR(11) AFTER `fecha_fin`,\r\n ADD `promocion_global` TINYINT(1) NOT NULL AFTER `descuento`;\r\n\r\nALTER TABLE `promocion` DROP `activo`;\r\n\r\n# This restores the fkey checks, after having unset them earlier\r\nSET FOREIGN_KEY_CHECKS = 1;\r\n',\n);\r\n }", "public function down()\n\t{\n\t\t//return false;\n\t}", "public function down(): void\n {\n try {\n $this->db->ForeignKeyChecks(false);\n $statement=$this->db->prepare(\"DROP TABLE IF EXISTS prom2_pages\");\n $statement->execute();\n $statement->close();\n $this->db->ForeignKeyChecks(true);\n } catch (\\mysqli_sql_exception $exception) {\n throw $exception;\n }\n }", "public function down()\n\t{\n\t\t//\n\t\tSchema::drop('options');\n\t}", "public function change()\n {\n $this->schema->table('recurring_expenses',function($table){\n $table->date('end_repeat')->nullable();\n $table->boolean('ended')->default(false);\n $table->enum('repeat',['0','1','7','14','30','365'])->nullable();\n });\n\n $this->schema->table('expenses',function($table){\n $table->dropColumn('end_repeat');\n $table->dropColumn('repeat');\n $table->integer('parent_id')->nullable();\n $table->foreign('parent_id')->references('id')->on('expenses')->onDelete('cascade');\n });\n }", "public function down()\n {\n Schema::table('users', function (Blueprint $table) {\n $table->dropForeign('users_id_turma_foreign');\n });\n\n Schema::table('contato', function (Blueprint $table) {\n $table->dropForeign('contato_id_usuario_foreign');\n });\n\n Schema::table('monitores', function (Blueprint $table) {\n $table->dropForeign('monitores_id_turma_foreign');\n $table->dropForeign('monitores_id_usuario_foreign');\n });\n\n Schema::table('galeria_portifolio', function (Blueprint $table) {\n $table->dropForeign('galeria_portifolio_id_portifolio_foreign');\n });\n\n Schema::table('portifolio_alunos', function (Blueprint $table) {\n $table->dropForeign('portifolio_alunos_id_portifolio_foreign');\n $table->dropForeign('portifolio_alunos_id_usuario_foreign');\n });\n\n Schema::table('cobranca', function (Blueprint $table) {\n $table->dropForeign('cobranca_id_aluno_foreign');\n });\n\n Schema::table('lista_de_presenca', function (Blueprint $table) {\n $table->dropForeign('lista_de_presenca_id_usuario_foreign');\n });\n\n Schema::table('forum_da_turma', function (Blueprint $table) {\n $table->dropForeign('forum_da_turma_id_usuario_foreign');\n });\n\n Schema::table('posts_do_site', function (Blueprint $table) {\n $table->dropForeign('posts_do_site_id_usuario_foreign');\n });\n\n Schema::table('posts_do_forum', function (Blueprint $table) {\n $table->dropForeign('posts_do_forum_id_topico_foreign');\n $table->dropForeign('posts_do_forum_id_usuario_foreign');\n });\n }", "public function down()\n\t{\n\t\t$this->dropForeignKey('FK_task_creator','tbl_task');\n\n\t\t$this->dropTable('tbl_task');\n\t}", "public function down()\n {\n $this->table('articles')->drop()->save();\n $this->table('categories')->drop()->save();\n $this->table('football_ragistrations')->drop()->save();\n $this->table('friends')->drop()->save();\n $this->table('menus')->drop()->save();\n $this->table('picnic_ragistrations')->drop()->save();\n $this->table('products')->drop()->save();\n $this->table('profiles')->drop()->save();\n $this->table('skills')->drop()->save();\n $this->table('spouses')->drop()->save();\n $this->table('students')->drop()->save();\n $this->table('submenus')->drop()->save();\n $this->table('users')->drop()->save();\n }", "public function down(){\n\t\tSchema::dropIfExists('cargo');\n\t}", "public function down()\n {\n $this->table('users')\n ->dropForeignKey(\n 'role_id'\n )->save();\n\n $this->table('users')\n ->removeIndexByName('FK_users_roles')\n ->update();\n\n $this->table('users')\n ->addColumn('can_edit', 'boolean', [\n 'after' => 'enabled',\n 'default' => '0',\n 'length' => null,\n 'null' => false,\n ])\n ->removeColumn('role_id')\n ->update();\n\n $this->table('stundenplan')\n ->changeColumn('note', 'string', [\n 'default' => null,\n 'length' => 255,\n 'null' => true,\n ])\n ->removeColumn('loggedInNote')\n ->update();\n\n $this->table('roles')->drop()->save();\n }", "public function down()\n\t{\n\t\t//\n\t\tDB::query('TRUNCATE TABLE app_user_apps_publishes CASCADE');\n\t\tDB::query('TRUNCATE TABLE app_apps_fbapps CASCADE');\n\t\tDB::query('TRUNCATE TABLE app_apps_applications CASCADE');\n\t}", "public function down()\n\t{\n\t\t// Drop Table\n\t\tSchema::drop('activities_types');\n\t}", "protected abstract function do_down();", "public function down(Schema $schema) : void\n {\n $this->addSql('CREATE TABLE encherir_acheteur (encherir_id INT NOT NULL, acheteur_id INT NOT NULL, INDEX IDX_41ABAAFBB0BA17BB (encherir_id), INDEX IDX_41ABAAFB96A7BB5F (acheteur_id), PRIMARY KEY(encherir_id, acheteur_id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE encherir_lot (encherir_id INT NOT NULL, lot_id INT NOT NULL, INDEX IDX_3C56919BB0BA17BB (encherir_id), INDEX IDX_3C56919BA8CBA5F7 (lot_id), PRIMARY KEY(encherir_id, lot_id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('ALTER TABLE encherir_acheteur ADD CONSTRAINT FK_41ABAAFB96A7BB5F FOREIGN KEY (acheteur_id) REFERENCES acheteur (id) ON DELETE CASCADE');\n $this->addSql('ALTER TABLE encherir_acheteur ADD CONSTRAINT FK_41ABAAFBB0BA17BB FOREIGN KEY (encherir_id) REFERENCES encherir (id) ON DELETE CASCADE');\n $this->addSql('ALTER TABLE encherir_lot ADD CONSTRAINT FK_3C56919BA8CBA5F7 FOREIGN KEY (lot_id) REFERENCES lot (id) ON DELETE CASCADE');\n $this->addSql('ALTER TABLE encherir_lot ADD CONSTRAINT FK_3C56919BB0BA17BB FOREIGN KEY (encherir_id) REFERENCES encherir (id) ON DELETE CASCADE');\n $this->addSql('ALTER TABLE encherir DROP FOREIGN KEY FK_503B7C878EB576A8');\n $this->addSql('ALTER TABLE encherir DROP FOREIGN KEY FK_503B7C878EFC101A');\n $this->addSql('DROP INDEX IDX_503B7C878EB576A8 ON encherir');\n $this->addSql('DROP INDEX IDX_503B7C878EFC101A ON encherir');\n $this->addSql('ALTER TABLE encherir DROP id_acheteur_id, DROP id_lot_id');\n }", "public function down()\n {\n $this->table('accounting_entries')\n ->dropForeignKey(\n 'accounting_entry_type_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('associations_events')\n ->dropForeignKey(\n 'event_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('events')\n ->dropForeignKey(\n 'event_type_id'\n )->save();\n\n $this->table('members')\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('statistics')\n ->dropForeignKey(\n 'statistics_type_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('statistics_event')\n ->dropForeignKey(\n 'statistics_id'\n )\n ->dropForeignKey(\n 'event_id'\n )->save();\n\n $this->table('users')\n ->dropForeignKey(\n 'role_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('accounting_entries')->drop()->save();\n $this->table('accounting_entry_type')->drop()->save();\n $this->table('associations')->drop()->save();\n $this->table('associations_events')->drop()->save();\n $this->table('event_type')->drop()->save();\n $this->table('events')->drop()->save();\n $this->table('members')->drop()->save();\n $this->table('roles')->drop()->save();\n $this->table('statistics')->drop()->save();\n $this->table('statistics_event')->drop()->save();\n $this->table('statistics_type')->drop()->save();\n $this->table('users')->drop()->save();\n }", "public function down()\n\t{\n\t\tif(Yii::app()->db->getSchema()->getTable(\"{{user_block}}\")){\n\t\t\t$this->dropTable(\"{{user_block}}\");\n\t\t}\n\n\t}", "public function getDownSQL()\n {\n return array (\n 'default' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nDROP TABLE IF EXISTS `user_login`;\n\nALTER TABLE `user` DROP `user_mname`;\n\nALTER TABLE `user` DROP `user_user`;\n\nALTER TABLE `user` DROP `user_password`;\n\nALTER TABLE `user` DROP `user_date_lastlogin`;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }", "public function down()\n\t{\n\t\tSchema::table('officers', function($t){\n\t\t\t$t->drop_column('role');\n\t\t});\n\t}", "public function safeDown()\n {\n $this->down();\n }", "public function safeDown()\n {\n $this->down();\n }", "public function down()\n\t{\n\t\tSchema::drop('refs');\n\t}", "public function down () {\n\t\treturn $this->rename_column ('headline', 'title', 'string', array ('limit' => 72));\n\t}", "public function down()\n\t{\n\t\tSchema::drop('appeals');\n\t}", "public function safeDown()\r\n {\r\n $this->down();\r\n }", "public function getDownSQL()\n {\n return array (\n 'default' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nDROP TABLE IF EXISTS `user`;\n\nDROP TABLE IF EXISTS `question`;\n\nDROP TABLE IF EXISTS `answer`;\n\nDROP TABLE IF EXISTS `image`;\n\nDROP TABLE IF EXISTS `vote`;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }", "public function down(Schema $schema) : void\n {\n $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \\'mysql\\'.');\n\n<<<<<<< HEAD\n $this->addSql('ALTER TABLE affaire_liste_affaire DROP FOREIGN KEY FK_80DBABFCF082E755');\n $this->addSql('ALTER TABLE affaire DROP FOREIGN KEY FK_9C3F18EFED813170');\n=======\n<<<<<<< HEAD:src/Migrations/Version20200418121015.php\n $this->addSql('ALTER TABLE affaire_liste_affaire DROP FOREIGN KEY FK_80DBABFCF082E755');\n $this->addSql('ALTER TABLE affaire DROP FOREIGN KEY FK_9C3F18EFED813170');\n=======\n $this->addSql('ALTER TABLE liste_affaire_affaire DROP FOREIGN KEY FK_CA81ADF3F082E755');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA2463CD7C3');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA25D493FF4');\n $this->addSql('ALTER TABLE correspondant_administratif DROP FOREIGN KEY FK_E1E7152EBF396750');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA246135043');\n>>>>>>> e1e13eb645b79ada7517f9d2be860dc1655c42db:src/Migrations/Version20200318150734.php\n>>>>>>> 0c1c04bb7c2bbee076bc5fdb1e2456d1af817866\n $this->addSql('ALTER TABLE enfant_sejour DROP FOREIGN KEY FK_159E7E65450D2529');\n $this->addSql('ALTER TABLE enfant_sejour DROP FOREIGN KEY FK_159E7E6584CF0CF');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA2463CD7C3');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA25D493FF4');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA2FF631228');\n $this->addSql('ALTER TABLE affaire_liste_affaire DROP FOREIGN KEY FK_80DBABFCE2687AC3');\n $this->addSql('ALTER TABLE sejour DROP FOREIGN KEY FK_96F52028E2687AC3');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA246135043');\n $this->addSql('ALTER TABLE correspondant_administratif DROP FOREIGN KEY FK_E1E7152E46135043');\n $this->addSql('DROP TABLE affaire');\n<<<<<<< HEAD\n $this->addSql('DROP TABLE affaire_liste_affaire');\n $this->addSql('DROP TABLE type_affaire');\n=======\n<<<<<<< HEAD:src/Migrations/Version20200418121015.php\n $this->addSql('DROP TABLE affaire_liste_affaire');\n $this->addSql('DROP TABLE type_affaire');\n=======\n $this->addSql('DROP TABLE centre');\n $this->addSql('DROP TABLE correspondant_administratif');\n $this->addSql('DROP TABLE responsable_legal');\n>>>>>>> e1e13eb645b79ada7517f9d2be860dc1655c42db:src/Migrations/Version20200318150734.php\n>>>>>>> 0c1c04bb7c2bbee076bc5fdb1e2456d1af817866\n $this->addSql('DROP TABLE enfant');\n $this->addSql('DROP TABLE enfant_sejour');\n $this->addSql('DROP TABLE sejour');\n $this->addSql('DROP TABLE centre');\n $this->addSql('DROP TABLE correspondant_administratif');\n $this->addSql('DROP TABLE etablissement');\n $this->addSql('DROP TABLE liste_affaire');\n $this->addSql('DROP TABLE responsable_legal');\n $this->addSql('DROP TABLE user');\n }", "public function safeDown()\n\t{\n\t\t$this->dropTable($this->tableName);\n\t}", "public function safeDown()\n\t{\n\t\t$this->dropTable($this->tableName);\n\t}", "public function safeDown()\n\t{\n\t\t$this->dropTable($this->tableName);\n\t}", "public function down()\n {\n $this->table('mail_contents')->drop()->save();\n }", "public function down() {\n\t}", "public function down() {\n\t}", "public function down() {\n\t}", "public function down()\n {\n Schema::dropIfExists('reunion');\n }", "public function down(): void\n {\n $this->table('services')\n ->dropForeignKey(\n ['currency_id','billing_period_id']\n )->save();\n $this->execute('DELETE FROM currencies');\n $this->execute('DELETE FROM billing_periods');\n $this->table('services')->drop()->save();\n $this->table('currencies')->drop()->save();\n $this->table('billing_periods')->drop()->save();\n }", "public function down()\n\t{\n\t\tSchema::drop('article_category');\n\t}", "public function down()\n {\n Schema::table('users', function (Blueprint $table) {\n $table->renameColumn('first_name', 'name');\n $table->dropIndex('users_first_name_index');\n $table->dropIndex('users_created_at_index');\n $table->dropIndex('users_updated_at_index');\n $table->dropColumn(\"last_name\");\n $table->dropColumn(\"username\");\n $table->dropColumn(\"provider\");\n $table->dropColumn(\"provider_id\");\n $table->dropColumn(\"api_token\");\n $table->dropColumn(\"code\");\n $table->dropColumn(\"remember_token\");\n $table->dropColumn(\"role_id\");\n $table->dropColumn(\"last_login\");\n $table->dropColumn(\"status\");\n $table->dropColumn(\"root\");\n $table->dropColumn('backend');\n $table->dropColumn(\"photo_id\");\n $table->dropColumn(\"lang\");\n $table->dropColumn(\"color\");\n $table->dropColumn(\"about\");\n $table->dropColumn(\"facebook\");\n $table->dropColumn(\"twitter\");\n $table->dropColumn(\"linked_in\");\n $table->dropColumn(\"google_plus\");\n });\n }", "public function down()\n\t{\n\t\tSchema::drop('entries');\n\t}", "public function down()\n\t{\n\t\tSchema::table('precios_aterrizajes_despegues', function(Blueprint $table)\n\t\t{\n\t\t\t//\n\t\t});\n\t}", "public function down()\n{\nSchema::drop('statustype');\nSchema::drop('area');\nSchema::drop('region');\nSchema::drop('territory');\nSchema::drop('trackedevent');\nSchema::drop('zip_territory');\nSchema::drop('messagetype');\nSchema::drop('optintype');\nSchema::drop('representative');\nSchema::drop('pediatrician');\nSchema::drop('application_messagestatus');\nSchema::drop('application_optin');\nSchema::drop('application_trackedevent');\nSchema::drop('application');\n}", "public function down()\n\t{\n\t\tSchema::drop(Config::get('sentry::sentry.table.users_metadata'));\n\t}", "public function down()\n\t{\n\t\tSchema::drop('stor_mem');\n\t}", "protected function tearDown(): void {\n $migration = include __DIR__.'/../database/migrations/create_all_visitors_tables.php.stub';\n $migration->down();\n\n $migrationTest = include __DIR__.'/Support/migrations/2023_01_12_000000_create_test_models_table.php';\n $migrationTest->down();\n }", "public function down(Schema $schema) : void\n {\n $this->addSql('ALTER TABLE classe_personne DROP FOREIGN KEY FK_350001418F5EA509');\n $this->addSql('ALTER TABLE matiere_classe DROP FOREIGN KEY FK_AF649A8B8F5EA509');\n $this->addSql('ALTER TABLE note DROP FOREIGN KEY FK_CFBDFA148F5EA509');\n $this->addSql('ALTER TABLE seance DROP FOREIGN KEY FK_DF7DFD0E8F5EA509');\n $this->addSql('ALTER TABLE cours DROP FOREIGN KEY FK_FDCA8C9CF46CD258');\n $this->addSql('ALTER TABLE matiere_classe DROP FOREIGN KEY FK_AF649A8BF46CD258');\n $this->addSql('ALTER TABLE note DROP FOREIGN KEY FK_CFBDFA14F46CD258');\n $this->addSql('ALTER TABLE personne_matiere DROP FOREIGN KEY FK_4E9BB3B7F46CD258');\n $this->addSql('ALTER TABLE absence DROP FOREIGN KEY FK_765AE0C9A21BD112');\n $this->addSql('ALTER TABLE classe_personne DROP FOREIGN KEY FK_35000141A21BD112');\n $this->addSql('ALTER TABLE contacte DROP FOREIGN KEY FK_C794A022A21BD112');\n $this->addSql('ALTER TABLE demande DROP FOREIGN KEY FK_2694D7A5A21BD112');\n $this->addSql('ALTER TABLE note DROP FOREIGN KEY FK_CFBDFA14A6CC7B2');\n $this->addSql('ALTER TABLE personne_matiere DROP FOREIGN KEY FK_4E9BB3B7A21BD112');\n $this->addSql('ALTER TABLE seance DROP FOREIGN KEY FK_DF7DFD0EE455FCC0');\n $this->addSql('ALTER TABLE seance DROP FOREIGN KEY FK_DF7DFD0EBDDFA3C9');\n $this->addSql('ALTER TABLE seance DROP FOREIGN KEY FK_DF7DFD0EDC304035');\n $this->addSql('ALTER TABLE absence DROP FOREIGN KEY FK_765AE0C9E3797A94');\n $this->addSql('ALTER TABLE personne DROP FOREIGN KEY FK_FCEC9EFA76ED395');\n $this->addSql('ALTER TABLE reset_password_request DROP FOREIGN KEY FK_7CE748AA76ED395');\n $this->addSql('DROP TABLE absence');\n $this->addSql('DROP TABLE classe');\n $this->addSql('DROP TABLE classe_personne');\n $this->addSql('DROP TABLE contacte');\n $this->addSql('DROP TABLE cours');\n $this->addSql('DROP TABLE demande');\n $this->addSql('DROP TABLE matiere');\n $this->addSql('DROP TABLE matiere_classe');\n $this->addSql('DROP TABLE news');\n $this->addSql('DROP TABLE note');\n $this->addSql('DROP TABLE personne');\n $this->addSql('DROP TABLE personne_matiere');\n $this->addSql('DROP TABLE reset_password_request');\n $this->addSql('DROP TABLE salle');\n $this->addSql('DROP TABLE seance');\n $this->addSql('DROP TABLE user');\n }", "public function down(Schema $schema) : void\n {\n $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \\'mysql\\'.');\n\n $this->addSql('ALTER TABLE booking DROP FOREIGN KEY FK_E00CEDDEA76ED395');\n $this->addSql('ALTER TABLE booking DROP FOREIGN KEY FK_E00CEDDE19FCD424');\n $this->addSql('DROP TABLE booking');\n $this->addSql('DROP TABLE product_image');\n $this->addSql('DROP TABLE family_page_container');\n $this->addSql('DROP TABLE user');\n $this->addSql('DROP TABLE time_line');\n $this->addSql('ALTER TABLE family DROP FOREIGN KEY FK_A5E6215B727ACA70');\n $this->addSql('DROP INDEX IDX_A5E6215B727ACA70 ON family');\n $this->addSql('ALTER TABLE family ADD page_content_id INT NOT NULL, DROP parent_id, DROP has_uniques_prices, DROP has_seasonal_products');\n $this->addSql('ALTER TABLE family ADD CONSTRAINT FK_A5E6215B8F409273 FOREIGN KEY (page_content_id) REFERENCES page_content (id)');\n $this->addSql('CREATE INDEX IDX_A5E6215B8F409273 ON family (page_content_id)');\n $this->addSql('ALTER TABLE link ADD page_container_id INT DEFAULT NULL, DROP url');\n $this->addSql('ALTER TABLE link ADD CONSTRAINT FK_36AC99F123D5B0C FOREIGN KEY (page_container_id) REFERENCES page_container (id)');\n $this->addSql('CREATE INDEX IDX_36AC99F123D5B0C ON link (page_container_id)');\n $this->addSql('ALTER TABLE product DROP content, DROP order_by, DROP is_generic, DROP type, CHANGE title label VARCHAR(50) NOT NULL COLLATE utf8mb4_unicode_ci');\n $this->addSql('ALTER TABLE unit DROP duration');\n }", "public function down(Schema $schema) : void\n {\n $this->addSql('ALTER TABLE `order` DROP FOREIGN KEY FK_F5299398F5B7AF75');\n $this->addSql('ALTER TABLE suppliers DROP FOREIGN KEY FK_AC28B95C8486F9AC');\n $this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D6498486F9AC');\n $this->addSql('ALTER TABLE stock DROP FOREIGN KEY FK_4B365660D629F605');\n $this->addSql('ALTER TABLE stock DROP FOREIGN KEY FK_4B365660E308AC6F');\n $this->addSql('ALTER TABLE order_detail DROP FOREIGN KEY FK_ED896F46CFFE9AD6');\n $this->addSql('ALTER TABLE product DROP FOREIGN KEY FK_D34A04ADEE45BDBF');\n $this->addSql('ALTER TABLE suppliers DROP FOREIGN KEY FK_AC28B95CEE45BDBF');\n $this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D649EE45BDBF');\n $this->addSql('ALTER TABLE order_detail DROP FOREIGN KEY FK_ED896F464584665A');\n $this->addSql('ALTER TABLE product_theme DROP FOREIGN KEY FK_36299C544584665A');\n $this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D649D60322AC');\n $this->addSql('ALTER TABLE order_detail DROP FOREIGN KEY FK_ED896F46DCD6110');\n $this->addSql('ALTER TABLE order_detail DROP FOREIGN KEY FK_ED896F462ADD6D8C');\n $this->addSql('ALTER TABLE product_theme DROP FOREIGN KEY FK_36299C5459027487');\n $this->addSql('ALTER TABLE `order` DROP FOREIGN KEY FK_F5299398A76ED395');\n $this->addSql('DROP TABLE address');\n $this->addSql('DROP TABLE format');\n $this->addSql('DROP TABLE material');\n $this->addSql('DROP TABLE `order`');\n $this->addSql('DROP TABLE order_detail');\n $this->addSql('DROP TABLE picture');\n $this->addSql('DROP TABLE product');\n $this->addSql('DROP TABLE product_theme');\n $this->addSql('DROP TABLE role');\n $this->addSql('DROP TABLE stock');\n $this->addSql('DROP TABLE suppliers');\n $this->addSql('DROP TABLE theme');\n $this->addSql('DROP TABLE user');\n }", "public function down()\n {\n Schema::dropIfExists('data');\n }", "public function down()\n\t{\n\t\tSchema::create('jobs',function($table){$table->increments('id');});\n\t\tSchema::create('job_location',function($table){$table->increments('id');});\n\t\tSchema::create('job_skill',function($table){$table->increments('id');});\n\t\tSchema::create('locations',function($table){$table->increments('id');});\n\t\tSchema::create('location_program',function($table){$table->increments('id');});\n\t\tSchema::create('location_scholarship',function($table){$table->increments('id');});\n\t\tSchema::create('positions',function($table){$table->increments('id');});\n\t\tSchema::create('programs',function($table){$table->increments('id');});\n\t\tSchema::create('program_subject',function($table){$table->increments('id');});\n\t\tSchema::create('scholarships',function($table){$table->increments('id');});\n\t\tSchema::create('scholarship_subject',function($table){$table->increments('id');});\n\t\tSchema::create('skills',function($table){$table->increments('id');});\n\t\tSchema::create('subjects',function($table){$table->increments('id');});\n\t}" ]
[ "0.79502094", "0.7863702", "0.7606416", "0.7492738", "0.73199725", "0.7245919", "0.7187675", "0.7153845", "0.71537775", "0.71420383", "0.71353674", "0.71216005", "0.7115856", "0.7105365", "0.70985687", "0.7080349", "0.70783705", "0.7072629", "0.7068311", "0.7065529", "0.7053633", "0.7053633", "0.70424956", "0.70424956", "0.70424956", "0.7041426", "0.703968", "0.7029248", "0.70252407", "0.7021071", "0.69888437", "0.6985933", "0.69781303", "0.69711983", "0.69435465", "0.69435465", "0.69435465", "0.69422066", "0.6941167", "0.69392043", "0.693508", "0.6934209", "0.69273883", "0.69249666", "0.6924165", "0.69139355", "0.6903021", "0.6897935", "0.6897865", "0.6897159", "0.6897159", "0.6887517", "0.68814087", "0.68738264", "0.6869671", "0.68627596", "0.6858359", "0.685274", "0.68442315", "0.68434376", "0.6836587", "0.6836147", "0.68347293", "0.68302953", "0.6829403", "0.6828893", "0.6825529", "0.6823726", "0.6818256", "0.68105906", "0.68082154", "0.6805308", "0.6805308", "0.6789928", "0.6775214", "0.6774431", "0.67646605", "0.67588997", "0.675822", "0.67556226", "0.67556226", "0.67556226", "0.6753787", "0.6753203", "0.6753203", "0.6753203", "0.67524594", "0.6745875", "0.67441654", "0.6738876", "0.67343754", "0.6733525", "0.67314184", "0.67311025", "0.67271084", "0.67268074", "0.6725997", "0.67252296", "0.6716472", "0.6713497", "0.6713106" ]
0.0
-1
Schreibt eine XMLDatei mit allen im Fileadmin befindlichen Dateien, ohne Pfadangabe zum Fileadmin
public function writeXmlResourceList() { // Neues XMLWriter-Objekt $this->xmlwriter = new \XMLWriter(); // Dokumenteneigenschaften $this->xmlwriter->openMemory(); $this->xmlwriter->setIndent(TRUE); $this->xmlwriter->startDocument('1.0'); // Document Type Definition (DTD) $this->xmlwriter->startDtd('resourcelist'); $this->xmlwriter->writeDtdElement('resourcelist', '(file)'); $this->xmlwriter->writeDtdElement('file', '(uid,pid,tstamp,crdate,type,storage,identifier,extension,mime_type,name,title,sha1,size,creation_date,modification_date,width,height,uuid)'); $this->xmlwriter->writeDtdElement('uid', '(#PCDATA)'); $this->xmlwriter->writeDtdElement('pid', '(#PCDATA)'); $this->xmlwriter->writeDtdElement('tstamp', '(#PCDATA)'); $this->xmlwriter->writeDtdElement('crdate', '(#PCDATA)'); $this->xmlwriter->writeDtdElement('type', '(#PCDATA)'); $this->xmlwriter->writeDtdElement('storage', '(#PCDATA)'); $this->xmlwriter->writeDtdElement('identifier', '(#PCDATA)'); $this->xmlwriter->writeDtdElement('extension', '(#PCDATA)'); $this->xmlwriter->writeDtdElement('mime_type', '(#PCDATA)'); $this->xmlwriter->writeDtdElement('name', '(#PCDATA)'); $this->xmlwriter->writeDtdElement('title', '(#PCDATA)'); $this->xmlwriter->writeDtdElement('sha1', '(#PCDATA)'); $this->xmlwriter->writeDtdElement('size', '(#PCDATA)'); $this->xmlwriter->writeDtdElement('creation_date', '(#PCDATA)'); $this->xmlwriter->writeDtdElement('modification_date', '(#PCDATA)'); $this->xmlwriter->writeDtdElement('width', '(#PCDATA)'); $this->xmlwriter->writeDtdElement('height', '(#PCDATA)'); $this->xmlwriter->writeDtdElement('uuid', '(#PCDATA)'); $this->xmlwriter->endDtd(); // Daten schreiben $this->xmlwriter->startElement('resourcelist'); foreach ($this->fileList as $file) { $this->xmlwriter->startElement('file'); $this->xmlwriter->writeElement('uid', $file->getUid()); $this->xmlwriter->writeElement('pid', $file->getPid()); $this->xmlwriter->writeElement('tstamp', $file->getTstamp()); $this->xmlwriter->writeElement('crdate', $file->getCrdate()); $this->xmlwriter->writeElement('type', $file->getType()); $this->xmlwriter->writeElement('storage', $file->getStorage()); $this->xmlwriter->writeElement('identifier', $file->getIdentifier()); $this->xmlwriter->writeElement('extension', $file->getExtension()); $this->xmlwriter->writeElement('mime_type', $file->getMimeType()); $this->xmlwriter->writeElement('name', $file->getName()); $this->xmlwriter->writeElement('title', $file->getTitle()); $this->xmlwriter->writeElement('sha1', $file->getSha1()); $this->xmlwriter->writeElement('size', $file->getSize()); $this->xmlwriter->writeElement('creation_date', $file->getCreationDate()); $this->xmlwriter->writeElement('modification_date', $file->getModificationDate()); $this->xmlwriter->writeElement('width', $file->getWidth()); $this->xmlwriter->writeElement('height', $file->getHeight()); $this->xmlwriter->writeElement('uuid', $this->getUuid($file->getUid(), 'sys_file')); $this->xmlwriter->endElement(); } $this->xmlwriter->endElement(); $this->xmlwriter->endElement(); $this->xmlwriter->endDocument(); $writeString = $this->xmlwriter->outputMemory(); $file = GeneralUtility::tempnam('resource_'); GeneralUtility::writeFile($file, $writeString); $folder = GeneralUtility::getIndpEnv('TYPO3_DOCUMENT_ROOT') . GeneralUtility::getIndpEnv('TYPO3_SITE_PATH') . 'fileadmin/deployment/media/' . date('Y_m_d', time()); GeneralUtility::mkdir($folder); GeneralUtility::upload_copy_move($file, $folder . '/' . date('H-i-s', time()) . '_resource.xml'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getActualFile(){\n\t\treturn $this->xmldir;\n\t}", "public function SaveXMLFile();", "public function upload_xml()\n {\n $this->upload_xml_file();\n }", "protected function parseXmlFile() {}", "public function _xml_fields()\n {\n require_code('files');\n $full_path = get_custom_file_base() . '/data_custom/xml_config/fields.xml';\n $xml = post_param_string('xml');\n cms_file_put_contents_safe($full_path, $xml, FILE_WRITE_FIX_PERMISSIONS | FILE_WRITE_SYNC_FILE);\n\n log_it('FIELD_FILTERS');\n\n return inform_screen($this->title, do_lang_tempcode('SUCCESS'));\n }", "public function giveEventoPathFilexml($idev, $idowner){\r\n $idev = self::$conn->real_escape_string($idev);\r\n $idowner = self::$conn->real_escape_string($idowner);\r\n $query = \"SELECT filexml FROM \".$this->tables['eventoTable'].\r\n \" WHERE creator='$idowner' AND id = '$idev'\";\r\n\t\t$result = self::$conn->query($query);\r\n if(!$result || $result->num_rows != 1)\r\n return ''; \r\n $row = $result->fetch_array(MYSQLI_NUM);\r\n return $this->folderFilexmlUser .\"$idowner/\".$row[0];\r\n }", "final function getDirectory () { return $this->xml_dir->path; }", "public function getXmlFile()\n\t{\n\t\treturn $this->xml_file;\n\t}", "protected function get_xml_filename() {\n return null;\n }", "function getXML() {\n $this->layout->addMenu(sprintf('<menu>%s</menu>'.LF, $this->menubar->getXML()));\n if (isset($this->params['cmd'])) {\n switch ($this->params['cmd']) {\n case 'edit_file':\n case 'file_tags':\n case 'file_versions':\n case 'file_derivations':\n case 'restore_version':\n case 'delete_version':\n case 'papaya_tag':\n $this->layout->addRight($this->getFilesToolbar());\n break;\n }\n }\n $this->addDialogXML();\n }", "function procMenuAdminMakeXmlFile()\n\t{\n\t\t// Check input value\n\t\t$menu_srl = Context::get('menu_srl');\n\t\t// Get information of the menu\n\t\t$oMenuAdminModel = getAdminModel('menu');\n\t\t$menu_info = $oMenuAdminModel->getMenu($menu_srl);\n\t\t$menu_title = $menu_info->title;\n\t\t// Re-generate the xml file\n\t\t$xml_file = $this->makeXmlFile($menu_srl);\n\t\t// Set return value\n\t\t$this->add('menu_title',$menu_title);\n\t\t$this->add('xml_file',$xml_file);\n\t}", "function readFolderXML(){\n\t\t\t// confirm it exists first!\n\t\t\tif (file_exists($_SERVER['DOCUMENT_ROOT'].\"/\".$this -> rootFolder.\"/folderList.xml\")){\n\t\t\t\t\n\t\t\t\t$xml = simplexml_load_file(\t$_SERVER['DOCUMENT_ROOT'].\"/\".$this -> rootFolder.\"/folderList.xml\");\n\t\t\t\tforeach($xml->children() as $child){\n\t\t\t\t\t\n\t\t\t\t\t$this -> folderMap[ (string) $child['id']] = (string) $child['name'];\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function exportXmlFile($prefs,$tables,$package=FALSE,$debug=FALSE)\n{\n\t$xml = e107::getXml();\n\t$tp = e107::getParser();\n\t$mes = e107::getMessage();\n\n\tif(vartrue($package))\n\t{\n\n\t\t$xml->convertFilePaths = TRUE;\n\t\t$xml->modifiedPrefsOnly = true;\n\t\t$xml->filePathDestination = EXPORT_PATH;\n\t\t$xml->filePathPrepend = array(\n\t\t\t'news_thumbnail'\t=> \"{e_IMAGE}newspost_images/\"\n\t\t);\n\n\n\t\t$desinationFolder = $tp->replaceConstants($xml->filePathDestination);\n\n\t\tif(!is_writable($desinationFolder))\n\t\t{\n\t\t\t$message = str_replace('[folder]', $desinationFolder, DBLAN_107);\n\t\t\t$mes->add($message, E_MESSAGE_ERROR);\n\t\t\treturn ;\n\t\t}\n\t}\n\n\n\tif($xml->e107Export($prefs,$tables,$debug))\n\t{\n\t\t$mes->add(DBLAN_108.\" \".$desinationFolder.\"install.xml\", E_MESSAGE_SUCCESS);\n\t\tif(varset($xml->fileConvertLog))\n\t\t{\n\t\t\tforeach($xml->fileConvertLog as $oldfile)\n\t\t\t{\n\t\t\t\t$file = basename($oldfile);\n\t\t\t\t$newfile = $desinationFolder.$file;\n\t\t\t\tif($oldfile == $newfile || (copy($oldfile,$newfile)))\n\t\t\t\t{\n\t\t\t\t\t$mes->add(DBLAN_109.\" \".$newfile, E_MESSAGE_SUCCESS);\n\t\t\t\t}\n\t\t\t\telseif(!file_exists($newfile))\n\t\t\t\t{\n\t\t\t\t\t$mes->add(DBLAN_110.\" \".$newfile, E_MESSAGE_ERROR);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n}", "private static function GetPath(){\r\n\t return System:::IO:::Path::Combine(\r\n\t self::GetFolder(),\"settings.xml\");\r\n\t }", "function the_date_xml()\n {\n }", "public static function getLocalXmlFile()\n {\n if (self::$_localXmlFile === null) {\n self::$_localXmlFile = self::getEtcDir() . DS . 'local.xml';\n }\n return self::$_localXmlFile;\n }", "public function _setXmlFileUrlPath($piLevel)\n {\n switch ($piLevel) {\n //Duong dan toi thu muc chua cac file XML tinh tu thu muc goc\n case 0;\n return \"xml/\";\n break;\n //Duong dan toi thu muc chua file XML tu thu muc hien tai. Thu muc hien tai la thu muc cap 1\n case 1;\n return \"./xml/\";\n break;\n //Duong dan toi thu muc chua file XML tu thu muc hien tai. Thu muc hien tai la thu muc cap 2\n case 2;\n return \"../../xml/\";\n break;\n //Duong dan toi thu muc chua file XML tu thu muc hien tai. Thu muc hien tai la thu muc cap 3\n case 3;\n return \"../../../xml/\";\n break;\n default:\n return \"\";\n break;\n }\n }", "public static function initFileTree()\n {\n //-- Add css\n ecrStylesheet('php_file_tree');\n\n //-- Add javascript\n ecrScript('php_file_tree');\n }", "function llxmlFileInfoBox($xmlArray,$relFileRef)\t{\n\n\t\tGLOBAL $LANG;\n\n\t\t\t// Get editing language:\n\t\t$editLang = $this->MOD_SETTINGS['editLang'];\n\n\t\t\t// Automatic external file message:\n\t\t$msg_autoFilename = '';\n\t\t$externalFile = t3lib_div::llXmlAutoFileName(PATH_site.$relFileRef, $editLang);\n\t\tif ($editLang=='default') {\n\t\t\t$msg_autoFilename = $LANG->getLL('msg_default_language');\n\t\t} elseif ($externalFile) {\n\t\t\t$msg_autoFilename = $externalFile;\n\n\t\t\tif (@file_exists(PATH_site . $externalFile)) {\n\t\t\t\t// Here is translated file exists but original file still keeps entries.\n\t\t\t\t// Happens when translating core and core language files are read-only\n\t\t\t\t$msg_autoFilename .= '<br/><span class=\"typo3-green\"><b>'.sprintf($LANG->getLL('msg_translation_external_file'),$externalFile).'</b></span>';\n\t\t\t}\n\t\t\telseif (isset($xmlArray['meta']['_ORIG_LANGUAGE_DATA']) && !is_array($xmlArray['meta']['_ORIG_LANGUAGE_DATA'])) {\n\t\t\t\t// Here is locallang.xml references external file like this:\n\t\t\t\t// <languageKey index=\"dk\">EXT:irfaq/lang/dk.locallang.xml</languageKey>\n\t\t\t\t$msg_autoFilename = $xmlArray['meta']['_ORIG_LANGUAGE_DATA'];\n\t\t\t\t$msg_autoFilename .= '<br /><span class=\"typo3-green\"><b>'.sprintf($LANG->getLL('msg_translation_external_file'),$xmlArray['meta']['_ORIG_LANGUAGE_DATA']).'</b></span>';\n\t\t\t}\n\t\t\telseif (is_array($xmlArray['meta']['_ORIG_LANGUAGE_DATA']))\t{\n\t\t\t\t// Here if translations are inside main file\n\t\t\t\t$msg_autoFilename.='<br/><span class=\"typo3-red\"><b>'.sprintf($LANG->getLL('msg_translation_main_file'),count($xmlArray['meta']['_ORIG_LANGUAGE_DATA']),'<input type=\"checkbox\" name=\"_moveToExternalFile\" value=\"1\" checked=\"checked\" /> ').'</b></span>';\n\t\t\t} else {\n\t\t\t\t// Here if no translation in main file, no references and no external file\n\t\t\t\t$msg_autoFilename.='<br/><span class=\"typo3-red\"><b>'.$LANG->getLL('msg_does_not_exist').'</b></span>';\n\t\t\t}\n\t\t} else {\n\t\t\t$msg_autoFilename = '<span class=\"typo3-red\"><b>'.$LANG->getLL('msg_file_not_in_extension').'</b></span>';\n\t\t}\n\n\t\t\t// Type:\n\t\tswitch($xmlArray['meta']['type'])\t{\n\t\t\tcase 'module':\n\t\t\tcase 'database':\n\t\t\tcase 'CSH':\n\t\t\t\t$theType = $xmlArray['meta']['type'];\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$theType = '<span class=\"typo3-red\"><b>'.$xmlArray['meta']['type'].'</b></span>';\n\t\t\tbreak;\n\t\t}\n\n\t\t$output = '\n\t\t\t<!-- Info about file: -->\n\t\t\t<table border=\"0\" cellpadding=\"1\" cellspacing=\"1\" style=\"border: 1px solid black;\">\n\t\t\t\t<tr class=\"bgColor4\">\n\t\t\t\t\t<td><b>'.$LANG->getLL('description').'</b></td>\n\t\t\t\t\t<td>'.htmlspecialchars($xmlArray['meta']['description']).'</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr class=\"bgColor4\">\n\t\t\t\t\t<td><b>'.$LANG->getLL('type').'</b></td>\n\t\t\t\t\t<td>'.$theType.'</td>\n\t\t\t\t</tr>\n\t\t\t\t'.($xmlArray['meta']['type']=='CSH' ? '\n\t\t\t\t<tr class=\"bgColor4\">\n\t\t\t\t\t<td><b>'.$LANG->getLL('csh_table').'</b></td>\n\t\t\t\t\t<td><a href=\"#\" onclick=\"'.htmlspecialchars($this->openCSH($xmlArray['meta']['csh_table'])).'\">'.htmlspecialchars($xmlArray['meta']['csh_table']).'</a></td>\n\t\t\t\t</tr>' : '').'\n\t\t\t\t<tr class=\"bgColor4\">\n\t\t\t\t\t<td><b>'.$LANG->getLL('external_filename').'</b></td>\n\t\t\t\t\t<td>'.$msg_autoFilename.'</td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t';\n\n\t\treturn $output;\n\t}", "abstract public function getDataprotXML();", "function xml_form_by_file($xml_file) {\r\n\t\t$xml = new my_xml_parser ( $xml_file );\r\n\t\t$this->xml_form_by_obj ( $xml );\r\n\t\t\r\n//\t\tif($this->config_service['multilang']==\"1\"){\r\n//\t\t\t$xml_and = simplexml_load_file($xml_file) or die(\"feed not loading\");\r\n//\t\t\tforeach($xml_and->field as $key => $val){\r\n//\t\t\t\tforeach( $val->txt_value as $k => $v ){\r\n//\t\t\t\t\techo $k ;print_R($v); echo \"--<br>\";\r\n//\t\t\t\t\t\r\n//\t\t\t\t}\r\n//\t\t\t}\r\n//\t\t}\r\n\t}", "private function set_files()\n\t\t{\n\t\t\t$this->files = Filesystem::ls(PATH_POSTS, '*', 'xml', false, false, true);\n\t\t\t$this->files_count = count( $this->files );\n\t\t}", "public static function getFileadminPath() {\n\t\treturn 'fileadmin/';\n\t}", "function cc_elabora_file_xml($offerte){\n\t\n\tglobal $wpdb; // oggetto interazione DB di WordPress\n\t\n\t// path dove si trova file xml sorgente, config.xml e file di log\n\t$path = ABSPATH . \"import/\";\n\t\n\t$results = $deleted = array(); \n\t\n\t// apro file config (xml) da cui prendere data ultima elaborazione ed in cui memorizzare i risultati di elaborazione\n\t$config = @simplexml_load_file($path.\"configs.xml\");\n\tif(!$config){\n\t\t// file config non trovato notifico e esco \n\t\tcc_import_error(\"File config non trovato!\");\t\t\t\n\t}\n\t\t\n\t// recupero tutti gli id cometa già presenti in tabella postmeta. _id_cometa è un postmeta mio\n\t$record_presenti = cc_get_unique_post_meta_values(\"_id_cometa\"); // restituisce array con chiave post_id\n\t\n\t// recupero da file config data ultimo aggiornamento - NON PIU' UTILIZZATO, uso data all'interno del file xml\n\t//$last_update = new DateTime( (string) $config->lastUpdate );\n\t\n\t// contatore record\n\t$line = 0;\n\t\n\t// loop offerte da xml sorgente\n\tforeach($offerte as $offerta){\n\t\t\n\t\t$line++;\n\t\tcc_import_immobili_error_log($line); // aggiorno log elaborazione con numero progressivo record \n\t\t\n\t\t$idunique = (int) $offerta->Idimmobile; // campo univoco Cometa\n\t\t$rif = (string) $offerta->Riferimento; // Rif / codice immoible\n\t\t$contratto = (string) $offerta->Contratto; // il tipo di contratto (Vendita o Affitto)\n\t\t$hasfoto = (empty((string) $offerta->FOTO1)) ? false : true;\n\t\t\n\t\tcc_import_immobili_error_log($rif); // aggiorno log elaborazione con il rif immobile\n\t\t\n\t\t// non importo gli immobili in affitto e quelli senza foto\n\t\tif($contratto == \"Affitto\" or !$hasfoto){\n\t\t\t\n\t\t\t// aggiorno contatori in file config.xml. L'ultimo param in cc_update_configs indica di incrementare il valore già presente\n\t\t\tif($contratto == \"Affitto\") cc_update_configs(\"affitto\", 1, true); // aggiorno contatore affitti\n\t\t\tif(!$hasfoto) cc_update_configs(\"nofoto\", 1, true); // aggiorno contatore affitti\n\t\t\t\n\t\t\t// registro motivo perché salto importazione in file di log\n\t\t\t$whyskipped = \"Saltato perche contratto \".$contratto;\n\t\t\tif(!$hasfoto) $whyskipped .= \" e non ha foto\";\n\t\t\tcc_import_immobili_error_log($whyskipped);\n\t\t\tcontinue; // passo al prossimo record immobile\n\t\t} \n\t\t\n\t\t// Recupero ultima data modifica dell'immobile su Cometa\n\t\t$DataAggiornamento = (string) $offerta->DataAggiornamento;\n\t\t$DataAggiornamento = substr($DataAggiornamento, 0, -6); // elimino +1:00 da valore data se no non è allineato con tempo server\t\t\n\t\t$data_ultima_modifica_record = new DateTime( $DataAggiornamento );\t// creo oggetto DateTime\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t// controllo se l'id del record è già presente in DB e decido dunque se richiamare funzione di insert o update\n\t\tif(in_array($idunique, $record_presenti)){\n\t\t\t\t\t\t\n\t\t\t// è già presente in db - richiamo funzione che aggiorna record passando id tabella posts e oggetto xml dell'offerta\n\t\t\t$post = array_search($idunique, $record_presenti); // recupero chiave array che è post_id\n\t\t\t\n\t\t\t// recupero data ultimo aggiornamento record in tabella posts\n\t\t\t$md = get_the_modified_time( \"Y-m-d H:i:s\", $post );\n\t\t\t$post_last_modified = new DateTime( $md );\n\t\t\t\n\t\t\t// se la data dell'ultimo aggiornamento record in posts è maggiore della data di modifica in Cometa \n\t\t\t// aumento contatore skipped, tolgo id da elenco record da cancellare e passo al record successivo\n\t\t\tif($post_last_modified >= $data_ultima_modifica_record){\n\t\t\t\t\n\t\t\t\t// rimuovo immobile da elenco già presenti - a fine lavoro quelli rimasti verranno eliminati da DB\n\t\t\t\tunset($record_presenti[$post]); \n\t\t\t\t\n\t\t\t\t// aggiorno log e contatore in config.xml\n\t\t\t\t$msg_skipped = \"Record \".$post.\" DATA RECORD XML: \".$data_ultima_modifica_record->format(\"Y-m-d H:i:s\");\n\t\t\t\t$msg_skipped .= \" DATA RECORD IN POSTS: \".$post_last_modified->format(\"Y-m-d H:i:s\");\n\t\t\t\tcc_import_immobili_error_log(\"skipped\");\n\t\t\t\tcc_update_configs(\"skipped\", 1, true);// incremento valore di skipped di uno\n\t\t\t\tcontinue; // il record non è stato modificato, passo al prossimo record\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t/**\n\t\t\t * Richiamo funzione cc_update_record che aggiorna record in DB\n\t\t\t * \n\t\t\t * @param $post: post_id in tabella postmeta\n\t\t\t * @param $offerta: oggetto xml del singolo immobile\n\t\t\t * @return string con valore \"updated\" o errore rilevato\n\t\t\t */\n\t\t\t$results[$rif] = cc_update_record($post, $offerta); \n\t\t\t\n\t\t\t// elimino da record_presenti questo record. quelli che alla fine rimangono verranno cancellati\n\t\t\tunset($record_presenti[$post]); \n\t\t\t\n\t\t}else{\n\t\t\t/**\n\t\t\t * Record nuovo. Richiamo funzione cc_insert_record che inserisce un nuovo record in DB\n\t\t\t * \n\t\t\t * @param $offerta: oggetto xml del singolo immobile\n\t\t\t * @return string con valore \"inserted\" o errore rilevato\n\t\t\t */\n\t\t\t$results[$rif] = cc_insert_record($offerta);\n\t\t\t// aggiungo dicitura inserted in file log per indicare che il record è stato inserito con successo\n\t\t\tcc_import_immobili_error_log(\"inserted\"); \n\n\t\t}\n\t\t\n\t} // end foreach $offerte - finito elabroazione di tutti i record presenti nel file xml\n\t\n\t/* Procedura di cancellazione immobili non più presenti\n\t * Se l'array record_presenti non è vuoto vuol dire che uno o più immobili attualmente in db non sono più\n\t * presenti su Cometa esportazione ergo sono da cancellare da db\n\t *\n\t * @param $id2delete: id record in wp_posts\n\t * @param $id_cometa: id univoco Cometa, non utilizzato in questo frangente\n\t */\t\n\tif(!empty($record_presenti)){\n\t\t// loop record\n\t\tforeach($record_presenti as $id2delete => $id_cometa){\n\t\t\t// uso funzione di WP per cancellare record da posts\n\t\t\t$deleted = wp_delete_post( $id2delete, false ); // 2° param indica se il record dev'essere spostato in cestino (false) o se dev'essere cancellato (true)\n\t\t\tcc_update_configs(\"deleted\", 1, true); // incremento contatore deleted di 1 in config.xml\n\t\t}\n\t\t// aggiorno log con elenco degli immobili cencellati\n\t\t$msg = implode(\", \", $record_presenti);\n\t\tcc_import_immobili_error_log(\"Deleted: \".$msg);\n\t}\n\t\n\t/* Restituisci a cc_import_xml_file() array con chiave Rif e come valore \"inserted\", \"updated\" \n\t * o errore rilevato (risultato di cc_insert_record() o cc_update_record() )\n\t*/\n\treturn $results; \n\t\n}", "function fillFileDateFromXML($row, $xmltags){\n $database = &JFactory::getDBO(); \n $lic_id = '';\n if ($xmltags['license']){\n $database->setQuery(\"SELECT id FROM #__jdownloads_license WHERE license_title LIKE '%\".$xmltags['license'].\"%' OR license_url LIKE '%\".$xmltags['license'].\"%'\");\n $lic_id = $database->loadResult(); \n }\n $row->file_title = $xmltags['name'];\n //alias\n $row->file_alias = JFilterOutput::stringURLSafe($row->file_title);\n\n if(trim(str_replace('-','',$row->file_alias)) == '') {\n $datenow =& JFactory::getDate();\n $row->file_alias = $datenow->toFormat(\"%Y-%m-%d-%H-%M-%S\");\n }\n $row->release = $xmltags['version']; \n $row->description = $xmltags['description'];\n $row->description_long = $row->description;\n if (!$lic_id){ \n $row->license = '';\n } else {\n $row->license = (int)$lic_id;\n } \n if ($date = strtotime($xmltags['creationDate'])){\n $row->file_date = JHTML::_('date', $xmltags['creationDate'],'Y-m-d H:i:s');\n } else {\n $row->file_date = '0000-00-00 00:00:00';\n } \n $row->url_home = $xmltags['authorUrl'];\n $row->author = $xmltags['author'];\n $row->url_author = $xmltags['authorMail'];\n return $row;\n}", "function addxmltablefield($databasename, $tablename, $field, $path = \".\", $force = true)\n{\n\n if ( !isset($field['name']) )\n return null;\n\n $values = $field;\n $pvalue = $field['name'];\n $pkey = \"name\";\n $old = \"$path/$databasename/$tablename.php\";\n if ( !file_exists($old) )\n return null;\n\n $readok = false;\n for ( $i = 0;$i < _MAXTENTATIVIDIACCESSO;$i++ )\n {\n $oldfilestring = file_get_contents($old);\n if ( strpos($oldfilestring,\"</tables>\") !== false )\n {\n $readok = true;\n break;\n }\n }\n if ( !$readok )\n {\n die(\"error update\");\n }\n $oldfilestring = removexmlcomments($oldfilestring);\n $oldvalues = $newvalues = getxmltablefield($databasename,$tablename,$field['name'],$path);\n foreach ( $values as $key=>$value )\n {\n $newvalues[$key] = $value;\n }\n //compongo il nuovo xml per il record da aggiornare\n $strnew = \"<field>\";\n foreach ( $newvalues as $key=>$value )\n {\n $strnew .= \"\\n\\t\\t<$key>\" . xmlenc($value) . \"</$key>\";\n }\n $strnew .= \"\\n\\t</field>\";\n\n if ( $oldvalues )\n {\n $pvalue = xmlenc($pvalue);\n $pvalue = encode_preg($pvalue);\n $strnew = str_replace('$','\\\\$',$strnew);\n $newfilestring = preg_replace('/<field>([^(field)]*)<' . $pkey . '>' . $pvalue . '<\\/' . $pkey . '>(.*?)<\\/field>/s',$strnew,$oldfilestring);\n if ( !is_writable($old) )\n {\n echo (\"$old is readonly,I can't update\");\n return (\"$old is readonly,I can't update\");\n }\n ///\t\tdprint_xml($oldfilestring);\n ///\t\tdprint_xml($newfilestring);\n ///\t\tdie();\n if ( $oldfilestring != $newfilestring && $force )\n {\n $handle = fopen($old,\"w\");\n fwrite($handle,$newfilestring);\n readDatabase($old,'field',false,false); //aggiorna la cache\n }\n return $newvalues;\n }\n else\n // new field\n {\n for ( $i = 0;$i < _MAXTENTATIVIDIACCESSO;$i++ )\n {\n $oldfilestring = file_get_contents(\"$path/$databasename/$tablename.php\");\n if ( strpos($oldfilestring,\"</tables>\") !== false )\n {\n $readok = true;\n break;\n }\n }\n if ( !$readok )\n {\n return \"error insert field\";\n }\n\n $strnew = encode_preg_replace2nd($strnew);\n $newfilestring = preg_replace('/<\\/tables>$/s',encode_preg_replace2nd($strnew) . \"\\n</tables>\",trim($oldfilestring)) . \"\\n\";\n\n $handle = fopen(\"$path/$databasename/$tablename.php\",\"w\");\n fwrite($handle,$newfilestring);\n fclose($handle);\n readDatabase($old,'field',false,false); //aggiorna la cache\n return $newvalues;\n }\n}", "function xml_start_functions($file, $k, &$xml, $prepinace, $inputFile){\n \n $newline = \"\";\n if($prepinace[\"pretty\"]){\n $newline = \"\\n\"; \n }\n if(is_file($file)){\n $file = \"\";\n }\n elseif(is_dir($file) && $prepinace[\"input\"]){\n $file = $inputFile;\n if (!(preg_match('/(\\/)$/', $file))){ //pokial na konci nie je / v nazve adresara - doplnime\n $file .= \"/\";\n }\n }\n // else{\n // $file = \"./\";\n // } \n \n $xml .= \"<functions dir=\\\"$file\\\">\".$newline;\n \n}", "public function filePath()\n {\n return '/data/monster/monsters.xml';\n }", "function build_xml_actualites($file_path)\r\n\t{\r\n\t\tglobal $config;\r\n\r\n\t\t// On récupère les actualités\r\n\t\tmysql_query('SET lc_time_names = \"en_US\"');\r\n\t\t$db_items = Sql::get_objects_from_query(\"SELECT *, DATE_FORMAT(`date`, '%a, %d %b %Y') AS rfc_date FROM \" . TABLES__ACTUALITES . \" ORDER BY date DESC\", 'Actualite');\r\n\r\n\t\t// On créé le fichier XML\r\n\t\t$this->create_dir(ROOT_PATH . 'xml');\r\n\t\t$fp = fopen ($file_path, \"w+\");\r\n\t\tfputs($fp, \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\" . \"\\n\");\r\n\t\tfputs($fp, \"<rss version=\\\"2.0\\\" xmlns:atom=\\\"http://www.w3.org/2005/Atom\\\">\" . \"\\n\");\r\n\t\tfputs($fp, \"\\t\" . \"<channel>\" . \"\\n\");\r\n\t\tfputs($fp, \"\\t\\t\" . \"<title>\" . stripslashes($config->site_title) . \"</title>\" . \"\\n\");\r\n\t\tfputs($fp, \"\\t\\t\" . \"<link>\" . $config->site_url . \"</link>\" . \"\\n\");\r\n\t\tfputs($fp, \"\\t\\t\" . \"<description>\" . stripslashes($config->site_description) . \"</description>\" . \"\\n\");\r\n\t\tfputs($fp, \"\\t\\t\" . \"<atom:link rel=\\\"self\\\" type=\\\"application/rss+xml\\\" href=\\\"\" . $config->site_url . \"/xml/actualites.xml\\\" />\" . \"\\n\");\r\n\r\n\t\tforeach($db_items as $db_item)\r\n\t\t{\r\n\t\t\tfputs($fp, \"\\t\\t\" . '<item>' . \"\\n\");\r\n\t\t\tfputs($fp, \"\\t\\t\\t\" . '<title>' . stripslashes($db_item->titre) . '</title>' . \"\\n\");\r\n\t\t\tfputs($fp, \"\\t\\t\\t\" . '<link>' . $config->site_url . '/actualite.php?id=' . $db_item->id . '</link>' . \"\\n\");\r\n\t\t\tfputs($fp, \"\\t\\t\\t\" . '<guid isPermaLink=\"false\">' . $config->site_url . '/actualite.php?id=' . $db_item->id . '</guid>' . \"\\n\");\r\n\t\t\tfputs($fp, \"\\t\\t\\t\" . '<description>' .htmlentities('<img src=\"' . $config->site_url . '/uploads/medias/actualites/images/thumbs/' . $db_item->image() . '\" alt=\"\" height=\"80\" align=\"left\" />' . stripslashes($db_item->contenu)) . '</description>' . \"\\n\");\r\n\t\t\tfputs($fp, \"\\t\\t\\t\" . '<pubDate>' . $db_item->rfc_date . ' 00:00:00 GMT</pubDate>' . \"\\n\");\r\n\t\t\tfputs($fp, \"\\t\\t\" . '</item>' . \"\\n\");\r\n\t\t}\r\n\r\n\t\tfputs($fp, \"\\t\" . \"</channel>\" . \"\\n\");\r\n\t\tfputs($fp, \"</rss>\" . \"\\n\");\r\n\t\tfclose($fp);\r\n\t}", "function _publicautocomplete_civix_civicrm_xmlMenu(&$files) {\n foreach (glob(__DIR__ . '/xml/Menu/*.xml') as $file) {\n $files[] = $file;\n }\n}", "public function save(){ \r\n return $this->xmlfile->save($this->absolutepath);\r\n }", "public function generateXmlFiles()\n\t{\n\t\t// Sitemaps\n\t\t$this->generateSitemap();\n\n\t\t// HOOK: add custom jobs\n\t\tif (isset($GLOBALS['TL_HOOKS']['generateXmlFiles']) && is_array($GLOBALS['TL_HOOKS']['generateXmlFiles']))\n\t\t{\n\t\t\tforeach ($GLOBALS['TL_HOOKS']['generateXmlFiles'] as $callback)\n\t\t\t{\n\t\t\t\t$this->import($callback[0]);\n\t\t\t\t$this->{$callback[0]}->{$callback[1]}();\n\t\t\t}\n\t\t}\n\n\t\t// Also empty the page cache so there are no links to deleted files\n\t\t$this->purgePageCache();\n\n\t\t// Add a log entry\n\t\t$this->log('Regenerated the XML files', __METHOD__, TL_CRON);\n\t}", "public function adminViewFileEdits()\r\n\t{\r\n\t\treturn false;\r\n\t}", "function createFileInterface($filePath)\n{\n //$sxe=simplexml_load_file( $filePath );//Default file type\n if (file_exists($filePath)) \n {\n $xml = simplexml_load_file($filePath);\n createSaveForm($filePath);\n dispFile( $xml);\n }\n else \n {\n exit('Failed to open' . $filePath);\n }\n}", "function getFileDerivationsListXML() {\n $result = '';\n $this->derivations = $this->getFileDerivations($this->params['file_id']);\n $headFileId = $this->getDerivationHeadId($this->params['file_id']);\n foreach ($this->derivations as $parentId => $childIds) {\n $fileIds[$parentId] = 1;\n foreach ($childIds as $childId => $null) {\n $fileIds[$childId] = 1;\n }\n }\n if (isset($fileIds) && is_array($fileIds)) {\n $this->derivationFiles = $this->getFilesById(array_keys($fileIds));\n }\n\n $result .= sprintf('<listview title=\"%s\">'.LF, $this->_gt('Derivations'));\n $result .= sprintf(\n '<cols><col>%s</col><col>%s</col><col>%s</col><col>%s</col><col></col></cols>'.LF,\n papaya_strings::escapeHTMLChars($this->_gt('File')),\n papaya_strings::escapeHTMLChars($this->_gt('Size')),\n papaya_strings::escapeHTMLChars($this->_gt('Date')),\n papaya_strings::escapeHTMLChars($this->_gt('Type'))\n );\n $result .= '<items>'.LF;\n $result .= $this->getDerivationsEntry($headFileId, 0);\n $result .= '</items>'.LF;\n $result .= '</listview>';\n return $result;\n }", "function domain_add_xmlfile($key,$file){\n if(is_object($this->tool)) $file = $this->tool->det_file($file,0,'abs');\n if(!file_exists($file) or !is_readable($file)) return 20;\n $xml = new opc_sxml($file);\n if(!is_null($xml->error_msg)) return 21;\n return $this->domain_add_xml($key,$xml);\n }", "private function getXmlFile() {\n if (!$this->xmlFileCreated) {\n $this->createXmlDataFile();\n }\n return DOKU_INC . $this->command->getConf(\"processingXmlFile\");\n }", "public function getFilepath() {\n\t\treturn RuntimeDirectoryManager::getDocumentRoot().$this->filename;\n\t}", "public function readFilesInFileadmin() {\n $fileArr = $newArr = array();\n\n // direktes auslesen des Ordners, da evtl. nicht alle Dateien in Tabellen indexiert sind\n $path = GeneralUtility::getIndpEnv('TYPO3_DOCUMENT_ROOT') . GeneralUtility::getIndpEnv('TYPO3_SITE_PATH') . 'fileadmin/';\n $fileList = GeneralUtility::getAllFilesAndFoldersInPath($fileArr, $path);\n\n $pathCount = strlen($path);\n // deployment-Ordner exkludieren\n foreach ($fileList as $filekey => $filevalue) {\n if (strstr($filevalue, '/fileadmin/deployment') == FALSE) {\n $newArr[$filekey] = substr($filevalue, $pathCount);\n }\n }\n\n return $newArr;\n }", "function get_nombre_archivo_xml()\n\t{\n\t\treturn $this->xml_proyecto;\n\t}", "public function loadXml($filename,$map_path){\r\n \r\n $this->rootPath = $this->_preparePath($map_path);\r\n \r\n if(!File::exists( $this->rootPath .DS. $filename ))\r\n App::critical_error ('XML document not found: '.$this->rootPath .DS. $filename);\r\n \r\n $xmlDoc = $this->_initDocument($this->rootPath .DS. $filename);\r\n \r\n //get the project elements\r\n $elements = $xmlDoc->getElementsByTagName('element');\r\n \r\n foreach($elements as $element){\r\n \r\n if(count($this->elements) == 0 ){\r\n $this->elements = $this->_loadElement($element);\r\n }\r\n else{\r\n $this->elements = array_merge($this->elements,$this->_loadElement($element));\r\n }\r\n }\r\n \r\n //isolate the template key\r\n if(!is_null($this->_templatekey) && !is_null($this->elements[$this->_templatekey]))\r\n $this->elements['templates'] = $this->elements[$this->_templatekey];\r\n \r\n //clean the element values\r\n //array_walk_recursive($this->element, array($this, '_clean'));\r\n \r\n return File::put(APP_PROJECT .DS. 'elements.php' ,serialize($this->elements)); \r\n }", "public function giveUtenteNewsFilexml($idu){\r\n $idu = self::$conn->real_escape_string($idu);\r\n $query = \"SELECT nickname FROM \".$this->tables['utentetable'].\r\n \" WHERE nickname = '$idu' AND isAdmin=FALSE\";\r\n\t\t$result = self::$conn->query($query);\r\n if(!$result || $result->num_rows != 1)\r\n return ''; \r\n return $this->folderFilexmlUser .\"$idu/lastnews.xml\";\r\n }", "function _getFileXML($file) {\n\n if (empty($file))\n $this->fatalErrorPage(\"XML file to parse was not set\");\n\n if (!($fp = fopen($file, \"r\", 1))) {\n $this->fatalErrorPage(\"could not open XML input from file $file\");\n }\n \n $this->contentBuffer = NULL;\n while ($data = fread($fp, 4096)) {\n $this->contentBuffer .= $data;\n }\n\n fclose($fp);\n\n }", "public function get_xml_filename() {\n return \"activities/{$this->pluginname}_{$this->moduleid}/module.xml\";\n }", "function getFileVersionsListXML() {\n $result = '';\n $this->fileVersions = $this->getFileVersions($this->params['file_id']);\n $result .= sprintf('<listview title=\"%s\">'.LF, $this->_gt('Versions'));\n if (isset($this->currentFile['version_id'])) {\n $file = $this->getFile($this->params['file_id']);\n } else {\n $file = $this->currentFile;\n }\n\n if (is_array($this->fileVersions) && count($this->fileVersions) > 0) {\n $result .= sprintf(\n '<cols><col>%s (%s)</col><col>%s</col><col>%s</col><col /><col /><col /></cols>'.LF,\n papaya_strings::escapeHTMLChars($this->_gt('Date')),\n papaya_strings::escapeHTMLChars($this->_gt('Version')),\n papaya_strings::escapeHTMLChars($this->_gt('Filename')),\n papaya_strings::escapeHTMLChars($this->_gt('Filesize'))\n );\n $result .= '<items>'.LF;\n\n $mimeTypeIcon = ($file['mimetype_icon'] != '')\n ? $file['mimetype_icon'] : $this->defaultTypeIcon;\n $selected = (isset($this->params['version_id']) && $this->params['version_id'] == '')\n ? ' selected=\"selected\"' : '';\n\n $currentLink = $this->getLink(\n array('cmd' => 'file_versions', 'file_id' => $this->params['file_id'])\n );\n $result .= sprintf(\n '<listitem href=\"%s\" image=\"%s\" title=\"%s (#%d, %s)\" %s>'.LF,\n papaya_strings::escapeHTMLChars($currentLink),\n papaya_strings::escapeHTMLChars(\n $this->mimeObj->getMimeTypeIcon($mimeTypeIcon)\n ),\n papaya_strings::escapeHTMLChars(date('Y-m-d H:i:s', $file['file_date'])),\n papaya_strings::escapeHTMLChars($file['current_version_id']),\n papaya_strings::escapeHTMLChars($this->_gt('current')),\n $selected\n );\n $result .= sprintf(\n '<subitem><a href=\"%s\">%s</a></subitem>'.LF,\n papaya_strings::escapeHTMLChars($currentLink),\n papaya_strings::escapeHTMLChars($file['file_name'])\n );\n $result .= sprintf(\n '<subitem>%s</subitem>'.LF,\n papaya_strings::escapeHTMLChars($this->formatFileSize($file['file_size']))\n );\n $result .= sprintf(\n '<subitem align=\"center\"><a href=\"%s\"><glyph src=\"%s\" /></a></subitem>'.LF,\n papaya_strings::escapeHTMLChars($currentLink),\n papaya_strings::escapeHTMLChars($this->images['categories-preview'])\n );\n $result .= '<subitem /><subitem />'.LF;\n $result .= '</listitem>'.LF;\n foreach ($this->fileVersions as $versionId => $version) {\n $mimeTypeIcon = ($version['mimetype_icon'] != '')\n ? $version['mimetype_icon'] : $this->defaultTypeIcon;\n if (isset($this->params['version_id']) &&\n (int)$this->params['version_id'] == $versionId) {\n $selected = ' selected=\"selected\"';\n } else {\n $selected = '';\n }\n $link = $this->getLink(\n array(\n 'cmd' => 'file_versions',\n 'version_id' => $versionId,\n 'file_id' => $this->params['file_id'],\n )\n );\n $result .= sprintf(\n '<listitem href=\"%s\" image=\"%s\" title=\"%s (#%d)\" align=\"center\" %s>'.LF,\n papaya_strings::escapeHTMLChars($link),\n papaya_strings::escapeHTMLChars(\n $this->mimeObj->getMimeTypeIcon($mimeTypeIcon)\n ),\n date('Y-m-d H:i:s', $version['file_date']),\n papaya_strings::escapeHTMLChars($versionId),\n $selected\n );\n $result .= sprintf(\n '<subitem><a href=\"%s\">%s</a></subitem>'.LF,\n papaya_strings::escapeHTMLChars($link),\n papaya_strings::escapeHTMLChars($version['file_name'])\n );\n $result .= sprintf(\n '<subitem>%s</subitem>'.LF,\n papaya_strings::escapeHTMLChars($this->formatFileSize($version['file_size']))\n );\n $result .= sprintf(\n '<subitem align=\"center\"><a href=\"%s\" title=\"%s\"><glyph src=\"%s\" /></a></subitem>'.LF,\n papaya_strings::escapeHTMLChars(\n $this->getLink(\n array(\n 'cmd' => 'file_versions',\n 'file_id' => $this->params['file_id'],\n 'version_id' => $versionId\n )\n )\n ),\n papaya_strings::escapeHTMLChars($this->_gt('View')),\n papaya_strings::escapeHTMLChars($this->images['categories-preview'])\n );\n $result .= sprintf(\n '<subitem align=\"center\"><a href=\"%s\" title=\"%s\"><glyph src=\"%s\" /></a></subitem>'.LF,\n papaya_strings::escapeHTMLChars(\n $this->getLink(\n array(\n 'cmd' => 'restore_version',\n 'file_id' => $this->params['file_id'],\n 'version_id' => $versionId\n )\n )\n ),\n papaya_strings::escapeHTMLChars($this->_gt('Restore')),\n papaya_strings::escapeHTMLChars($this->images['actions-recycle'])\n );\n $result .= sprintf(\n '<subitem align=\"center\"><a href=\"%s\" title=\"%s\"><glyph src=\"%s\" /></a></subitem>'.LF,\n papaya_strings::escapeHTMLChars(\n $this->getLink(\n array(\n 'cmd' => 'delete_version',\n 'file_id' => $this->params['file_id'],\n 'version_id' => $versionId\n )\n )\n ),\n papaya_strings::escapeHTMLChars($this->_gt('Delete')),\n papaya_strings::escapeHTMLChars($this->images['places-trash'])\n );\n $result .= '</listitem>'.LF;\n }\n $result .= '</items>'.LF;\n } else {\n $result .= '<items>'.LF;\n $result .= sprintf(\n '<listitem title=\"%s\"><subitem cols=\"6\"/></listitem>',\n papaya_strings::escapeHTMLChars($this->_gt('No versions found.'))\n );\n $result .= '</items>'.LF;\n }\n $result .= '</listview>'.LF;\n return $result;\n }", "function export_file_extension() {\r\n // override default type so extension is .xml\r\n return \".xml\";\r\n }", "public function uploadXmlAction()\n {\n $form = $this->createFormBuilder()\n ->add('file', FileType::class, array('label' => $this->get('translator')->trans('Load XML file'),\n \"attr\" => array(\"accept\" => \".xml\",)))\n ->getForm();\n\n return $this->render('GrtResBundle:User:upload.html.twig', array(\n 'form' => $form->createView()\n ));\n }", "private function _getAdministrativeFeeXMLVersion()\n {\n $db = JFactory::getDBO();\n $query = $db->getQuery(true);\n\n // Parametro de configuracion del componente de tarifa administrativa\n $params = JComponentHelper::getParams('com_fees');\n $valIva = $params->get('valIvaTaPortal', 16);\n\t\t\n // Documento XML para agregar la informacion de la tarifa\n $doc = new DOMDocument('1.0');\n $root = $doc->appendChild($doc->createElement('AdministrativeFee'));\n $airlines = $root->appendChild($doc->createElement('AirLines'));\n \n $query->select('ta.valuetype AS Type, ta.airline AS Code, ta.published, vta.minfare AS FromValue, vta.maxfare AS ToValue, \n\t\t\t\t\t\tvta.charge_adult AS ValueAdult, vta.charge_senior AS ValueSenior, vta.charge_child AS ValueChild, vta.charge_infant ValueInfant , vta.trip AS FlightType, IF(vta.minfare = 0 AND vta.maxfare = 0, 1, 2) AS isRange ');\n $query->from('#__fee_adminfare AS ta');\n \n $query->join('INNER', '#__qs_airlines AS a ON ta.airline = a.codigo');\n $query->join('INNER', '#__fee_values AS vta ON ta.id = vta.fare_id');\n \n $query->where('ta.published = 1');\n \n if($this->_flightType() == 1){ $flightType = 'ON'; }\n \tif($this->_flightType() == 2){ $flightType = 'RN'; }\n \tif($this->_flightType() == 3){ $flightType = 'OI'; }\n \tif($this->_flightType() == 4){ $flightType = 'RI'; }\n \n $query->where(\"vta.trip = '$flightType'\");\n \n // Se ordenan los resultados por los valores (para que el proceso coincida con los rangos)\n $query->order('vta.id ASC');\n\t\t\n \n $db->setQuery($query);\n $rows = $db->loadObjectList();\n //print_R($rows); Die();\n \n $airCode = 'XXX';\n foreach($rows as $row)\n {\n if($airCode != $row->Code)\n {\n $airline = $doc->createElement('AirLine');\n if($row->Code == '--' ){\n \t$airline->setAttributeNode(new DOMAttr('Code', ''));\n }\n else{\n \t$airline->setAttributeNode(new DOMAttr('Code', $row->Code));\n }\n\t\t\t\t$airline->setAttributeNode(new DOMAttr('Type', $row->Type));\n $airlines->appendChild($airline);\n $airCode = $row->Code;\n \n }\n\n if($row->isRange == 1)\n {\n $valueAdult = $doc->createElement('ValueAdult', $row->ValueAdult);\n $valueSenior= $doc->createElement('ValueSenior', $row->ValueSenior);\n $valueChild= $doc->createElement('ValueChild', $row->ValueChild);\n $valueInfant= $doc->createElement('ValueInfant', $row->ValueInfant);\n $airline->appendChild($valueAdult);\n $airline->appendChild($valueSenior);\n $airline->appendChild($valueChild);\n $airline->appendChild($valueInfant);\n }\n elseif($row->isRange == 2)\n {\n $range = $doc->createElement('Range');\n $range->setAttributeNode(new DOMAttr('From', $row->FromValue));\n $range->setAttributeNode(new DOMAttr('To', $row->ToValue));\n\n $valueAdult = $doc->createElement('ValueAdult', $row->ValueAdult);\n $valueSenior= $doc->createElement('ValueSenior', $row->ValueSenior);\n $valueChild= $doc->createElement('ValueChild', $row->ValueChild);\n $valueInfant= $doc->createElement('ValueInfant', $row->ValueInfant);\n $range->appendChild($valueAdult);\n $range->appendChild($valueSenior);\n $range->appendChild($valueChild);\n $range->appendChild($valueInfant);\n $airline->appendChild($range);\n }\n }\n\n // Agregando el IVA\n $iva = $doc->createElement('Iva');\n $iva->setAttributeNode(new DOMAttr('Porcent', $valIva));\n $root->appendChild($iva);\n\t\t\n \n // Obteneido el valor del descuento\n $groups = array(0);\n $user = JFactory::getUser();\n if($user->get('id') != 0)\n $groups = $user->get('groups');\n\t\t\n \n $query = $db->getQuery(true);\n $query->select('gr.discount AS Discount');\n $query->from('#__fee_groups AS gr');\n $query->where('gr.usergroupid = '. current($groups));\n\t\t\n $db->setQuery($query);\n $valDiscount = $db->loadObject();\n \n if($valDiscount)\n $valDiscount = $valDiscount->Discount;\n else\n $valDiscount = 0;\n\n $discount = $doc->createElement('Discount');\n $discount->setAttributeNode(new DOMAttr('Porcent', $valDiscount));\n $root->appendChild($discount);\n\t\t\n //$doc->formatOutput = true;\n //echo $doc->saveXML();\n //die();\n \n return substr($doc->saveXML(), 22);\n }", "public function export_addFilesFromRelations() {}", "private function fileContent($path)\n\t{\n\t\tif ( !file_exists($path))\n\t\t{\n\t\t\tUtils_Configuration_XMLLoaderOpenFileException(\n\t\t\t\t'Nie ma pliku ' . $path);\n\t\t}\n\n\t\t$this->sXML = file_get_contents($path);\n\n\t\tif (false === $this->sXML)\n\t\t{\n\t\t\tUtils_Configuration_XMLLoaderOpenFileException(\n\t\t\t\t'Nie udalo sie odczytac zawartosci pliku ' . $path);\n\t\t}\n\t}", "function compiler_xml_oasis($fichier, $contexte) {\n\n\t// separer nom, extension...\n\t$infos = pathinfo($fichier);\n\t$dir = $infos['dirname'] . '/';\n\t$ext = $infos['extension'];\n\t$nom = substr($infos['basename'], 0, -(strlen($ext)+1));\n\n\t// lire le content\n\tlire_fichier($fichier, $texte);\n\n\t// retablir les boucles\n\t$texte = preg_replace(\",&lt;([/]?B(.*))&gt;,U\",\"<\\\\1>\", $texte);\n\t\n\t// retablir les includes\n\t$texte = preg_replace(\",&lt;([/]?INCLU[RD]E(.*))&gt;,U\",\"<\\\\1>\", $texte);\n\t\n\t// falsifier l'en tete xml\n\t$texte = preg_replace(\",^<\".\"[?]xml,\",\"<@XML\", $texte);\n\n\t// ajouter les directives de cache/charset et mime-type\n\t$texte = \"#\".\"CACHE{0}\n\t#\".\"HTTP_HEADER{Content-type: text/xml; charset=UTF-8}\n\t$texte\";\n\n\n\t// ecrire le squelette et le fichier fonctions associe\n\tecrire_fichier(_DIR_TMP . $nom . \".html\", $texte);\n\tlire_fichier(_DIR_PLUGIN_SPIPODF . $nom . \"_fonctions.php\", $fonctions);\n\tecrire_fichier(_DIR_TMP . $nom . \"_fonctions.php\", $fonctions);\n\n\t// calculer le fond\n\tinclude_spip('inc/assembler');\n\t$texte = recuperer_fond(_DIR_TMP . $nom, $contexte);\n\t\n\t// nettoyer\n\t@unlink(_DIR_TMP.\"content_fonctions.php\");\n\t@unlink(_DIR_TMP.\"content.html\");\n\n\t$texte = preg_replace(\",^<@XML,\",\"<\".\"?xml\", $texte);\n\n\t// convertir les balises html ajoutees par propre en tags xml\n\t$texte = spip2odt_convertir($texte, $dir);\n\n\tecrire_fichier($fichier, $texte);\n\n}", "static function uploadingXml(){\n echo '<body style=\\'background-color:#3b5998;\\'></body>';\n\n session_start();\n $username = $_SESSION['username'];\n $targetLocation = DeckModel::deckFolder() . $username . '/';\n\n $target_path = $targetLocation . basename( $_FILES['xml-file']['name']);\n\n if(move_uploaded_file($_FILES['xml-file']['tmp_name'], $target_path)) {\n //echo \"The file \". basename( $_FILES['xml-file']['name']).\n // \" has been uploaded.\";\n } else {\n echo \"There was an error uploading the file!\";\n }\n echo \"<script>window.location='../user-controller/show-decks';</script>\";\n\n\n }", "function saveFolderXML(){\n\t\t\t$folders = new SimpleXMLElement(\"<folders></folders>\");\n\t\t\tforeach ($this -> folderMap as $id => $fname){\n\t\t\t\t\n\t\t\t\t$folder = $folders->addChild('folder');\n\t\t\t\t$folder->addAttribute('id', $id);\n\t\t\t\t$folder->addAttribute('name', $fname);\n\t\t\t}\n\t\t\t$fh = fopen($_SERVER['DOCUMENT_ROOT'].\"/\".$this -> rootFolder.\"/folderList.xml\", 'w');\n\t\t\tfwrite($fh, $folders -> asXML());\n\t\t\tfclose($fh);\n\t\t}", "protected function _getSchemaDir()\n\t{\n\t\treturn __DIR__ . DS . '../Xsd/File/';\n\t}", "function __construct($xml_dir = '.') {\r\n\t\t\r\n\t\t$this->xml_dir = dir($xml_dir);\r\n\t}", "function Save($xml_root, $file_path) \n\t{\n\t\t$this->__xml = fopen($file_path, \"w\");\n\t\tfwrite($this->__xml, \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"yes\\\"?>\\r\\n\");\n\t\t$this->__SaveChild($xml_root, 0);\n\t\tfclose($this->__xml);\n\t}", "private function create_xml_file(){\r\n global $CFG;\r\n \r\n $tmpfileid = time().rand(1,99999);\r\n $tmpfile = 'export_xml_'.$tmpfileid.'.pdf';\r\n $this->attachfile = $CFG->tempdir.'/'.$tmpfile;\r\n \r\n $dom = new DOMDocument('1.0', 'utf-8');\r\n $dom->preserveWhiteSpace = false;\r\n $dom->formatOutput = true;\r\n $dom->loadXML($this->xml_structure);\r\n $dom->save($this->attachfile);\r\n }", "public function loadXMLFile($filename,$map_path, $formatting = FALSE){\r\n \r\n $path = $this->_preparePath($map_path);\r\n $this->xmlfile = $this->_initDocument($path .DS. $filename, $formatting);\r\n \r\n $this->absolutepath = rtrim($path,'/') .DS. $filename;\r\n \r\n return $this->xmlfile;\r\n }", "function cc_import_xml_file($file){\n\t\n\t// apro file ed elaboro xml\t\n\t$xml = @simplexml_load_file($file);\t\n\n\tif($xml){\t\t\n\t\t// ok struttura xml valida, recupero tag root Offerte\n\t\t$offerte = $xml->Offerte;\n\n\t\tif($offerte){\t\n\t\t\t// tutto ok procedo con elavorazione\n\t\t\t\n\t\t\t$nofferte = count($offerte); // numeri di record all'interno del file\n\t\t\tcc_update_configs(\"source\", $nofferte); // aggiorno file di config con il numerod i record nel file xml\n\t\t\t\n\t\t\t/***\n\t\t\t * Elabora oggetto xml\n\t\t\t * Restituisce array con chiave Rif e valore \"updated\", \"inserted\" o false\n\t\t\t*/\n\t\t\treturn cc_elabora_file_xml($offerte); // restriuisci array a cc_controllo_nuovi_immobili()\t\t \n\t\t\t\n\t\t}else{\n\t\t\t\n\t\t\t// E' un file xml ma con struttura errata (manca tag apertura Offerte) - invio email di notifica \n\t\t\tcc_import_error(\"Nessuna offerta trovata nel file XML \".$file);\n\t\t\treturn false; // ritorno a cc_controllo_nuovi_immobili()\n\t\t\t\n\t\t}\n\t\t\n\t}else{\n\t\t\t\t\n\t\t// Non è un file xml valido - invio email di notifica \n\t\tcc_import_error($file.\" non è un file XML valido!\");\n\t\treturn false; // ritorno a cc_controllo_nuovi_immobili()\n\t\t\n\t} // end if xml\t\t\n\t\n}", "function createBasepathXML() {\n\t\n $file_modified_time = date('Y-m-d',mktime());\n\t\n\t$xml = \"<url>\";\n $xml .= \" <loc>\".SITE_PATH.\"</loc>\";\n $xml .= \" <lastmod>$file_modified_time</lastmod>\";\n $xml .= \" <changefreq>monthly</changefreq>\";\n $xml .= \" <priority>1.0</priority>\";\n\t$xml .= \"</url>\";\n\t\n\treturn $xml;\n\t\n }", "function getXMLdata($fileRef)\t{\n\t\tGLOBAL $LANG;\n\t\t\t// Getting MAIN ll-XML file content:\n\t\t$dataArray = t3lib_div::xml2array(t3lib_div::getUrl(PATH_site.$fileRef));\n\t\t$editLang = $this->MOD_SETTINGS['editLang'];\n\n\t\tif (is_array($dataArray))\t{\n\n\t\t\t$dataArray['meta']['_ORIG_LANGUAGE_DATA'] = $dataArray['data'][$editLang];\n\n\t\t\t\t// If no entry is found for the language key, then force a value depending on meta-data setting. By default an automated filename will be used:\n\t\t\t$autoFileName = '';\n\t\t\tif ($editLang != 'default') {\n\t\t\t\t$autoFileName = t3lib_div::llXmlAutoFileName(PATH_site.$fileRef, $editLang);\n\t\t\t\tif ($autoFileName && @file_exists(PATH_site . $autoFileName))\t{\n\t\t\t\t\t$dataArray['data'][$editLang] = $autoFileName;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t\t// Looking for external values for a certain edit-language:\n\t\t\tif ($editLang!='default' && is_string($dataArray['data'][$editLang]) && strlen($dataArray['data'][$editLang]))\t{\n\t\t\t\t$file = t3lib_div::getFileAbsFileName($dataArray['data'][$editLang]);\n\t\t\t\tif ($file && @is_file($file))\t{\n\t\t\t\t\t$extArray = t3lib_div::xml2array(t3lib_div::getUrl($file));\n\t\t\t\t} elseif ($autoFileName) {\n\t\t\t\t\t$extArray = array();\n\t\t\t\t} else {\n\t\t\t\t\tif (class_exists('t3lib_utility_Debug')) {\n\t\t\t\t\t\techo t3lib_utility_Debug::viewArray(\n\t\t\t\t\t\t\tarray($LANG->getLL('error_not_find_reference'), $dataArray['data'][$editLang])\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\techo t3lib_div::view_array(array($LANG->getLL('error_not_find_reference'), $dataArray['data'][$editLang]));\n\t\t\t\t\t}\n\t\t\t\t\t$extArray = array();\n\t\t\t\t}\n\n\t\t\t\t$dataArray['data'][$editLang] = is_array($extArray['data'][$editLang]) ? $extArray['data'][$editLang] : array();\n\t\t\t\t$dataArray['orig_hash'][$editLang] = is_array($extArray['orig_hash'][$editLang]) ? $extArray['orig_hash'][$editLang] : array();\n\t\t\t\t$dataArray['orig_text'][$editLang] = is_array($extArray['orig_text'][$editLang]) ? $extArray['orig_text'][$editLang] : array();\n\t\t\t}\n\t\t} else {\n\t\t\techo sprintf($LANG->getLL('error_file_not_contain_xml_array_output'),$fileRef);\n\t\t\techo '<hr/>'.$dataArray.'<hr/>';\n\t\t}\n\n\t\treturn $dataArray;\n\t}", "function archivate_referal_day_stat() {\r\n //$users = $this->CI->pm->get_project_users();\r\n //foreach ($users as $u)\r\n $this->backup_partner_xml();\r\n }", "function ctlparser($wft_file) {\n\t\t\t## the xml-file musst be specified on constuction\n\t\t\t## used to include form different locations\n\t\t\t$this->xml_file = $wft_file;\n }", "function XMLDocNew($dircomplet){\n\t\t$this->xmldir=$dircomplet;\n\t\treturn 0;\n\t}", "function admin_generate(){\n\t\t$fp = fopen('files/sitemap.xml', 'w+');\n\n\t$start_string = '<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">\n\t<url>\n \t\t<loc>http://www.' . CUST_ROOT . '/</loc>\n \t\t<changefreq>daily</changefreq>\n \t\t<priority>1</priority>\n\t</url>';\n\n\t\tfwrite($fp, $start_string);\n\n\t\t// projdu vsechny produkty\n\t\tApp::import('Model', 'Product');\n\t\t$this->Sitemap->Product = new Product;\n\t\t\n\t\t$this->Sitemap->Product->recursive = -1;\n\t\t$products = $this->Sitemap->Product->find('all', array('fields' => array('Product.url', 'Product.modified')));\n\n\t\tforeach ( $products as $product ){\n\t\t\t// pripnout k sitemape\n\t\t\t$mod = explode(' ', $product['Product']['modified']);\n\t\t\t$mod = $mod[0];\n\t\t\t$string = '\n\t<url>\n \t\t<loc>http://www.' . CUST_ROOT . '/' . $product['Product']['url'] . '</loc>\n \t\t<lastmod>' . $mod . '</lastmod>\n \t\t<changefreq>weekly</changefreq>\n \t\t<priority>0.9</priority>\n\t</url>'; \n\n\t\t\tfwrite($fp, $string);\n\t\t}\n\t\t\n\t\t// projdu vsechny kategorie\n\t\tApp::import('Model', 'Category');\n\t\t$this->Sitemap->Category = new Category;\n\t\t\n\t\t$this->Sitemap->Category->recursive = -1;\n\t\t$categories = $this->Sitemap->Category->find('all', array('fields' => array('Category.id', 'Category.url')));\n\n\t\t$skip = array(0 => '5', '25', '26', '53');\n\t\tforeach ( $categories as $category ){\n\t\t\tif ( in_array($category['Category']['id'], $skip) ){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$mod = date('Y-m-d');\n\n\t\t\t// pripnout k sitemape\n\t\t\t$string = '\n\t<url>\n \t\t<loc>http://www.' . CUST_ROOT . '/' . $category['Category']['url'] . '</loc>\n \t\t<changefreq>weekly</changefreq>\n \t\t<priority>0.8</priority>\n\t</url>'; \n\n\t\t\tfwrite($fp, $string);\n\t\t\t\n\t\t}\n\t\t\n\t\t// projdu vsechny vyrobce\n\t\tApp::import('Model', 'Manufacturer');\n\t\t$this->Sitemap->Manufacturer = new Manufacturer;\n\t\t\n\t\t$this->Sitemap->Manufacturer->recursive = -1;\n\t\t$manufacturers = $this->Sitemap->Manufacturer->find('all', array('fields' => array('Manufacturer.id', 'Manufacturer.name')));\n\t\t\n\t\tforeach ( $manufacturers as $manufacturer ){\n\t\t\t// pripnout k sitemape\n\t\t\t// vytvorim si url z name a id\n\t\t\t$string = '\n\t<url>\n \t\t<loc>http://www.' . CUST_ROOT . '/' . strip_diacritic($manufacturer['Manufacturer']['name']) . '-v' . $manufacturer['Manufacturer']['id'] . '</loc>\n \t\t<changefreq>weekly</changefreq>\n \t\t<priority>0.8</priority>\n\t</url>';\n\t\t\tfwrite($fp, $string);\n\t\t}\n\t\t\n\t\t// projdu vsechny obsahove stranky\n\t\tApp::import('Model', 'Content');\n\t\t$this->Sitemap->Content = new Content;\n\t\t\n\t\t$this->Sitemap->Content->recursive = -1;\n\t\t$contents = $this->Sitemap->Content->find('all', array('fields' => array('Content.path')));\n\t\t\n\t\tforeach ( $contents as $content ){\n\t\t\t// pripnout k sitemape\n\t\t\tif ( $content['Content']['path'] == 'index' ){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$string = '\n\t<url>\n \t\t<loc>http://www.' . CUST_ROOT . '/' . $content['Content']['path'] . '</loc>\n \t\t<changefreq>weekly</changefreq>\n \t\t<priority>0.7</priority>\n\t</url>';\n\t\t\tfwrite($fp, $string);\n\t\t}\n\t\t\n\t\t$end_string = '\n</urlset>';\n\t\tfwrite($fp, $end_string);\n\t\tfclose($fp);\n\t\t// uzavrit soubor\n\t\tdie('here');\n\t}", "public function getUrlDTD(){\n\t\treturn $this->module->id.'/dtdM/Admin';\n\t}", "function get_manejador_vista_xml()\n\t{\n\t\treturn $this->xml;\n\t}", "function XMLFile($version = \"1.0\", $encoding = \"UTF-8\")\n \n {\n\t\t$this->version = $version;\n\t\t$this->encoding = $encoding;\t\n $this->init();\n }", "function tdc_find_filenode($database, $file_name){\n $file = $database->xpath('//file[@name=\"'.$file_name.'\"]');\n if($file != False){\n return $file[0];\n }\n}", "public function on_cap_xsl_get_xmlfiles ()\n {\n return $this->xmlfiles;\n }", "private function getExtensionSystemXml() \n\t{\n\n\t\t// path to the extensions config.xml\n\t\t$extension_system_xml_path = parent::$extension_base_dir . '/etc/system.xml';\n\n\t\tif (!file_exists($extension_system_xml_path)) {\n\t\t\t$this->displayError('Cant find path to extension system xml.');\n\t\t}\n\n\t\t$extension_system_xml = simplexml_load_file($extension_system_xml_path);\n\n\t\tparent::$extension_system_xml = $extension_system_xml;\n\n\t}", "function wp_make_plugin_file_tree($plugin_editable_files)\n {\n }", "public function getFileAToView()\n {\n // when displaying uploaded doc/image in the view.\n return '/../'.$this->getUploadDir().'/'.$this->pathA;\n }", "public function getXml() {}", "protected function processChangedAndNewFiles() {}", "public static function jqueryFileTree_get_list() {\r\n\t\tcheck_admin_referer('plugin-name-action_wpidenonce'); \r\n\t\tif ( !is_super_admin() )\r\n\t\t\twp_die('<p>'.__('You do not have sufficient permissions to edit templates for this site. SORRY').'</p>');\r\n\t\t\r\n\t\t//setup wp_filesystem api\r\n\t\tglobal $wp_filesystem;\r\n $url = wp_nonce_url('admin.php?page=wpide','plugin-name-action_wpidenonce');\r\n $form_fields = null; // for now, but at some point the login info should be passed in here\r\n if (false === ($creds = request_filesystem_credentials($url, FS_METHOD, false, false, $form_fields) ) ) {\r\n // no credentials yet, just produced a form for the user to fill in\r\n return true; // stop the normal page form from displaying\r\n }\r\n \r\n\t\tif ( ! WP_Filesystem($creds) ) \r\n\t\t return false;\r\n \r\n\t\t$_POST['dir'] = urldecode($_POST['dir']);\r\n $root = apply_filters( 'wpide_filesystem_root', WP_CONTENT_DIR ); \r\n\t\t\r\n\t\tif( $wp_filesystem->exists($root . $_POST['dir']) ) {\r\n\t\t\t//$files = scandir($root . $_POST['dir']);\r\n\t\t\t//print_r($files);\r\n\t\t\t$files = $wp_filesystem->dirlist($root . $_POST['dir']);\r\n\t\t\t//print_r($files);\r\n \r\n\t\t\techo \"<ul class=\\\"jqueryFileTree\\\" style=\\\"display: none;\\\">\";\r\n\t\t\tif( count($files) > 0 ) { \r\n\t\t\t\t\r\n\t\t\t\t// All dirs\r\n\t\t\t\tasort($files); // Sort Files and folders by php case-sensitive Alpha\r\n\t\t\t\tforeach( $files as $file => $file_info ) {\r\n\t\t\t\t\tif( $file != '.' && $file != '..' && $file_info['type']=='d' ) {\r\n\t\t\t\t\t\techo \"<li class=\\\"directory collapsed\\\"><a href=\\\"#\\\" rel=\\\"\" . htmlentities($_POST['dir'] . $file) . \"/\\\">\" . htmlentities($file) . \"</a></li>\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// All files\r\n\t\t\t\tforeach( $files as $file => $file_info ) {\r\n\t\t\t\t\tif( $file != '.' && $file != '..' && $file_info['type']!='d') {\r\n\t\t\t\t\t\t$ext = preg_replace('/^.*\\./', '', $file);\r\n\t\t\t\t\t\techo \"<li class=\\\"file ext_$ext\\\"><a href=\\\"#\\\" rel=\\\"\" . htmlentities($_POST['dir'] . $file) . \"\\\">\" . htmlentities($file) . \"</a></li>\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//output toolbar for creating new file, folder etc\r\n\t\t\techo \"<li class=\\\"create_new\\\"><a class='new_directory' title='Create a new directory here.' href=\\\"#\\\" rel=\\\"{type: 'directory', path: '\" . htmlentities($_POST['dir']) . \"'}\\\"></a> <a class='new_file' title='Create a new file here.' href=\\\"#\\\" rel=\\\"{type: 'file', path: '\" . htmlentities($_POST['dir']) . \"'}\\\"></a><br style='clear:both;' /></li>\";\r\n\t\t\techo \"</ul>\";\t\r\n\t\t}\r\n\t\r\n\t\tdie(); // this is required to return a proper result\r\n\t}", "function wp_start_scraping_edited_file_errors()\n {\n }", "private function set_files_by_published()\n\t\t{\n\t\t\t$this->files = Filesystem::ls(PATH_POSTS, '*.*.*.*.NULL.*.*.*.*.*.*', 'xml', false, false, true);\n\t\t\t$this->files_count = count( $this->files );\n\t\t}", "private function getExtensionConfigXml() \n\t{\n\n\t\t// path to the extensions config.xml\n\t\t$extension_config_xml_path = parent::$extension_base_dir . '/etc/config.xml';\n\n\t\tif (!file_exists($extension_config_xml_path)) {\n\t\t\t$this->displayError('Cant find path to extension config xml.');\n\t\t}\n\n\t\t$extension_config_xml = simplexml_load_file($extension_config_xml_path);\n\n\t\tparent::$extension_config_xml = $extension_config_xml;\n\n\t}", "public function giveUtenteSocialFilexml($idu){\r\n $idu = self::$conn->real_escape_string($idu);\r\n $query = \"SELECT nickname FROM \".$this->tables['utentetable'].\r\n \" WHERE nickname = '$idu' AND isAdmin=FALSE\";\r\n\t\t$result = self::$conn->query($query);\r\n if(!$result || $result->num_rows != 1)\r\n return ''; \r\n return $this->folderFilexmlUser .\"$idu/social.xml\";\r\n }", "public function xml_fields()\n {\n $post_url = build_url(array('page' => '_SELF', 'type' => '_xml_fields'), '_SELF');\n\n return do_template('XML_CONFIG_SCREEN', array(\n '_GUID' => 'cc21f921ecbdbdf83e1e28d2b3f75a3a',\n 'TITLE' => $this->title,\n 'POST_URL' => $post_url,\n 'XML' => file_exists(get_custom_file_base() . '/data_custom/xml_config/fields.xml') ? cms_file_get_contents_safe(get_custom_file_base() . '/data_custom/xml_config/fields.xml') : cms_file_get_contents_safe(get_file_base() . '/data/xml_config/fields.xml'),\n ));\n }", "function xml($fichier, $meteocode, $date, $code)\n{\n $lines = file($fichier);\n $id = $meteocode;\n // Affiche toutes les lignes du tableau comme code HTML, avec les numéros de ligne\n foreach($lines as $line_num => $line)\n {\n\n $chaine = strpbrk(htmlspecialchars($line), 'T'); //commencer à partir de 'T'\n\n if(strstr($chaine, $id . '.' . $date['mm'] . '.' . $date['jj']))\n { // si la chaine contient le id.mm.jj\n $x = strpos($chaine, 'x', 0);\n $rest = substr($chaine, 0, $x + 3); // retourne \"abcde\"\n }\n }\n return($rest);\n}", "private function set_files_by_draft()\n\t\t{\n\t\t\t$this->files = Filesystem::ls(PATH_POSTS, '*.*.*.*.draft.*.*.*.*.*.*', 'xml', false, false, true);\n\t\t\t$this->files_count = count( $this->files );\n\t\t}", "private function loadModuleXml() \n\t{\n\n\t\t// load in config.xml to simplexml parser\n\t\tparent::$base_xml = simplexml_load_file(parent::$app_etc_module_path);\n\n\t}", "protected function getFileName() {\n return $this->_dateTime->format('YmdHis') . '.xml';\n }", "public function getEcrXmlFileName()\n {\n return $this->getFileName().'.xml';\n }", "private function add_file()\n {\n \t$helperPluginManager = $this->getServiceLocator();\n \t$serviceManager = $helperPluginManager->getServiceLocator();\n \t\n \t$file = $serviceManager->get('PM/Model/Files');\n \t\n \t$result = $file->getFileById($this->pk);\n \tif($result)\n \t{\n \t\tif($result['company_name'] != '' && $result['company_id'] && $result['company_id'] > 0)\n \t\t{\n \t\t\t$company_url = $this->view->url('companies/view', array('company_id' => $result['company_id']));\n \t\t\t$this->add_breadcrumb($company_url, $result['company_name']);\n \t\t}\n \t\t\n \t\tif($result['project_name'] != '' && $result['project_id'] && $result['project_id'] > 0)\n \t\t{ \t\t\n \t\t\t$project_url = $this->view->url('projects/view', array('project_id' => $result['project_id']));\n \t\t\t$this->add_breadcrumb($project_url, $result['project_name']);\n \t\t}\n \t\t\n \t\tif($result['task_name'] != '' && $result['task_id'] && $result['task_id'] > 0)\n \t\t{\n \t\t\t$task_url = $this->view->url('tasks/view', array('task_id' => $result['task_id']));\n \t\t\t$this->add_breadcrumb($task_url, $result['task_name']);\n \t\t}\n \t\t\n \t\t$file_url = $this->view->url('pm', array('module' => 'pm','controller' => 'files','action'=>'view', 'id' => $result['file_id']), null, TRUE);\n \t\t$this->add_breadcrumb($file_url, 'File: '.$result['name'], TRUE); \t\t\n \t}\n }", "function _processWordPressXML( $fileName, $authorId )\n\t{\n\t $jSession \t= JFactory::getSession();\n\n\t $fixedLocation = JPATH_ROOT . DIRECTORY_SEPARATOR . 'administrator' . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_easyblog' . DIRECTORY_SEPARATOR . 'xmlfiles';\n\t\t$file \t\t\t= $fixedLocation . DIRECTORY_SEPARATOR . $fileName;\n\n\t\tif( JFile::exists( $file ) )\n\t\t{\n\t\t\t/* use for debugging - dun remove */\n\t\t\t/*\n\t\t\tlibxml_use_internal_errors(true);\n\t\t\tvar_dump( simplexml_load_file( $file ) );\n\t\t $errors = libxml_get_errors();\n\t\t\tvar_dump($errors);\n\t\t foreach ($errors as $error) {\n\t\t\t\tvar_dump($error);\n\t\t }\n\t\t libxml_clear_errors();\n\t\t\texit;\n\t\t\t*/\n\n \t\t\t$parser = simplexml_load_file( $file );\n\n\t\t\tif( $parser )\n\t\t\t{\n\n\t\t\t\t$baseUrl = $parser->xpath('/rss/channel/wp:base_site_url');\n\t\t\t\t$baseUrl = (string) trim( $baseUrl[0] );\n\n\t\t\t\t$namespaces = $parser->getDocNamespaces();\n\n\t\t\t\tif ( ! isset( $namespaces['wp'] ) )\n\t\t\t\t{\n\t\t\t\t\t$namespaces['wp'] = 'http://wordpress.org/export/1.1/';\n\t\t\t\t}\n\n\t\t\t\tif ( ! isset( $namespaces['excerpt'] ) )\n\t\t\t\t{\n\t\t\t\t\t$namespaces['excerpt'] = 'http://wordpress.org/export/1.1/excerpt/';\n\t\t\t\t}\n\n\t\t\t\t$posts \t\t= array();\n\t\t\t\t$attachments = array();\n\n\t\t\t\t// process each items\n\t\t\t\tforeach ( $parser->channel->item as $item )\n\t\t\t\t{\n\t\t\t\t\t$post = array(\n\t\t\t\t\t\t'post_title' => (string) $item->title,\n\t\t\t\t\t\t'guid' => (string) $item->guid,\n\t\t\t\t\t\t'link' => (string) $item->link,\n\t\t\t\t\t);\n\n\t\t\t\t\t$dc = $item->children( 'http://purl.org/dc/elements/1.1/' );\n\t\t\t\t\t$post['post_author'] = (string) $dc->creator;\n\n\t\t\t\t\t$content = $item->children( 'http://purl.org/rss/1.0/modules/content/' );\n\t\t\t\t\t$excerpt = $item->children( $namespaces['excerpt'] );\n\n\t\t\t\t\t$post['post_content'] = (string) $content->encoded;\n\t\t\t\t\t$post['post_excerpt'] = (string) $excerpt->encoded;\n\n\t\t\t\t\t$wp = $item->children( $namespaces['wp'] );\n\n\t\t\t\t\t$post['post_id'] \t\t= (int) $wp->post_id;\n\t\t\t\t\t$post['post_date_gmt'] \t= (string) $wp->post_date_gmt;\n\n\t\t\t\t\t$post['comment_status'] = (string) $wp->comment_status;\n\n\t\t\t\t\t$post['post_name'] \t\t= (string) $wp->post_name;\n\t\t\t\t\t$post['status'] \t\t= (string) $wp->status; // publish , draft\n\n\t\t\t\t\t$post['post_type'] \t\t= (string) $wp->post_type;\n\t\t\t\t\t$post['post_parent']\t= (string) $wp->post_parent;\n\t\t\t\t\t$post['post_password'] \t= (string) $wp->post_password;\n\t\t\t\t\t$post['attachment_url'] = (string) $wp->attachment_url;\n\n\n\t\t\t\t\tif( ($post['post_type'] != 'post') && ($post['post_type'] != 'attachment') )\n\t\t\t\t\t continue;\n\n\t\t\t\t\tif( $post['status'] == 'draft' )\n\t\t\t\t\t continue;\n\n\n\t\t\t\t\tforeach ( $item->category as $terms )\n\t\t\t\t\t{\n\t\t\t\t\t\t$att = $terms->attributes();\n\t\t\t\t\t\tif ( isset( $att['nicename'] ) )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$post['terms'][] = array(\n\t\t\t\t\t\t\t\t'name' => (string) $terms,\n\t\t\t\t\t\t\t\t'slug' => (string) $att['nicename'],\n\t\t\t\t\t\t\t\t'domain' => (string) $att['domain']\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tforeach ( $wp->postmeta as $meta )\n\t\t\t\t\t{\n\t\t\t\t\t\t$post['postmeta'][] = array(\n\t\t\t\t\t\t\t'key' => (string) $meta->meta_key,\n\t\t\t\t\t\t\t'value' => (string) $meta->meta_value\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\t$postComments = array();\n\t\t\t\t\tforeach ( $wp->comment as $comment )\n\t\t\t\t\t{\n\t\t\t\t\t\tif( empty( $comment->comment_content ) )\n\t\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\t\t$postComments[] = array(\n\t\t\t\t\t\t\t'comment_id' => (int) $comment->comment_id,\n\t\t\t\t\t\t\t'comment_author' => (string) $comment->comment_author,\n\t\t\t\t\t\t\t'comment_author_email' => (string) $comment->comment_author_email,\n\t\t\t\t\t\t\t'comment_author_IP' => (string) $comment->comment_author_IP,\n\t\t\t\t\t\t\t'comment_author_url' => (string) $comment->comment_author_url,\n\t\t\t\t\t\t\t'comment_date' => (string) $comment->comment_date,\n\t\t\t\t\t\t\t'comment_date_gmt' => (string) $comment->comment_date_gmt,\n\t\t\t\t\t\t\t'comment_content' => (string) $comment->comment_content,\n\t\t\t\t\t\t\t'comment_approved' => (string) $comment->comment_approved,\n\t\t\t\t\t\t\t'comment_type' => (string) $comment->comment_type,\n\t\t\t\t\t\t\t'comment_parent' => (string) $comment->comment_parent,\n\t\t\t\t\t\t\t'comment_user_id' => (int) $comment->comment_user_id\n\t\t\t\t\t\t);\n\t\t\t\t\t}//end foreach\n\n\t\t\t\t\tif( $post['post_type'] == 'attachment' )\n\t\t\t\t\t{\n\t\t\t\t\t $post_parant = $post['post_parent'];\n\t\t\t\t\t $this->logXMLData( $fileName, $post_parant, 'attachment', $post );\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t $post_id = $post['post_id'];\n\n\t\t\t\t\t\tif( count($postComments) > 150 )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$postComments = array_slice($postComments, 0, 150);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t $this->logXMLData( $fileName, $post_id, 'post', $post, $postComments );\n\t\t\t\t\t}\n\n\t\t\t\t} //end foreach\n\n\t\t\t\t$this->_migrateWPXML( $fileName, $authorId );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t $ejax\t\t= new EJax();\n\t\t\t $ejax->append('progress-status6', JText::_('COM_EASYBLOG_MIGRATOR_XML_PARSE_ERROR'));\n\t\t\t\t$ejax->script(\"$( '#migrator-submit6' ).attr('disabled' , '');\");\n\t\t\t\t$ejax->script(\"$( '#icon-wait6' ).css( 'display' , 'none' );\");\n\t\t\t\t$ejax->send();\n\t\t\t}// if parser\n\t\t}\n\t\telse\n\t\t{\n\t\t $ejax\t\t= new EJax();\n\t\t $ejax->append('progress-status6', JText::_('COM_EASYBLOG_MIGRATOR_XML_PARSE_ERROR'));\n\t\t\t$ejax->script(\"$( '#migrator-submit6' ).attr('disabled' , '');\");\n\t\t\t$ejax->script(\"$( '#icon-wait6' ).css( 'display' , 'none' );\");\n\t\t\t$ejax->send();\n\t\t}\n\t}", "public function getFilepath();", "public function __construct() {\n $this -> fichier = new Fichier(\"../contributeurs\", false);\n }", "public function load_xml_file(string $file ): self\n { \n $pathinfo = pathinfo($file);\n $this->filename = $pathinfo['basename']; \n $this->path = $pathinfo['dirname'];\n $xml = file_get_contents($file); \n $this->load_xml_string($xml); \n // print_r($this->bandelements);\n return $this;\n }", "function getLocalFolderXML() {\n $result = '';\n if (is_dir(PAPAYA_PATH_MEDIADB_IMPORT)) {\n $result .= sprintf(\n '<listview title=\"%s\">'.LF,\n papaya_strings::escapeHTMLChars($this->_gt('Folder list'))\n );\n $baseFolder = basename(PAPAYA_PATH_MEDIADB_IMPORT);\n $result .= '<items>'.LF;\n if (empty($this->params['folder']) || $this->params['folder'] == '/') {\n $selected = ' selected=\"selected\"';\n } else {\n $selected = '';\n }\n $result .= sprintf(\n '<listitem node=\"open\" image=\"%s\" href=\"%s\" title=\"%s\" %s/>'.LF,\n papaya_strings::escapeHTMLChars($this->images['items-folder']),\n papaya_strings::escapeHTMLChars(\n $this->getLink(array('cmd' => 'import_folder', 'folder' => '/'))\n ),\n papaya_strings::escapeHTMLChars($baseFolder),\n $selected\n );\n $list = $this->getLocalSubFolders(PAPAYA_PATH_MEDIADB_IMPORT);\n if (is_array($list) && count($list) > 0) {\n $result .= $this->getLocalFolderItemsXML($list, 1, '');\n }\n $result .= '</items>'.LF;\n $result .= '</listview>'.LF;\n }\n return $result;\n }", "public static function getXmlFileWithPath($objectName)\n {\n if (isset(self::$_xmlFileList[$objectName])) {\n return self::$_xmlFileList[$objectName];\n }\n // replace \".\" with \"/\"\n $xmlFile = str_replace(\".\", \"/\", $objectName);\n $xmlFile .= \".xml\";\n $xmlFile = \"/\" . $xmlFile;\n\n // search in modules directory first\n $xmlFileList[] = Openbizx::$app->getModulePath() . $xmlFile;\n $xmlFileList[] = OPENBIZ_APP_PATH . $xmlFile;\n $xmlFileList[] = OPENBIZ_META . $xmlFile;\n\n foreach ($xmlFileList as $xmlFileItem) {\n if (file_exists($xmlFileItem)) {\n self::$_xmlFileList[$objectName] = $xmlFileItem;\n return $xmlFileItem;\n }\n }\n self::$_xmlFileList[$objectName] = null;\n return null;\n }", "public function main_days_file_callback()\n {\n printf(\n \t'<input id=\"main_days_file\" type=\"text\" size=\"36\" name=\"program_manager_option[main_days_file]\" value=\"%s\" /> \n \t\t<input id=\"main_upload_file_button\" class=\"button\" type=\"button\" value=\"Upload/Select MAIN File\" />',\n \n isset( $this->options['main_days_file'] ) ? esc_attr( $this->options['main_days_file']) : ''\n );\n }", "public function getInputXmlFile(): ?string {\n\t\treturn $this->inputXmlFile;\n\t}", "public function files();", "public function files();", "public function files();", "public static function wdtFileUploadLocation()\n {\n return '/public/excels/wdt/';\n }", "public function getLocalExtListFile() {}", "public function userfileAction() {\r\n\t\tif ((int)$this->_getParam('_parent') < 0) {\r\n \t\t$this->_detailedView('user_file');\r\n\t\t} else {\r\n\t\t\t$this->_component = $this->_components['user_file'];\r\n\t\t\t$this->detailedAction();\r\n\t\t}\r\n\t}" ]
[ "0.61117387", "0.6020937", "0.5980788", "0.5951313", "0.59273994", "0.58811504", "0.58527964", "0.5803609", "0.58006555", "0.579879", "0.5788797", "0.5671248", "0.5567873", "0.5563062", "0.55348915", "0.5524854", "0.5495945", "0.5452236", "0.5432296", "0.5420363", "0.54015565", "0.5393382", "0.5387609", "0.5383591", "0.53830016", "0.5365109", "0.5360943", "0.5319005", "0.53038204", "0.5302118", "0.52984154", "0.52924836", "0.5290265", "0.5268324", "0.52673954", "0.5256661", "0.5245533", "0.5230739", "0.52032447", "0.5198571", "0.519252", "0.5190383", "0.51854026", "0.51746964", "0.5167821", "0.51120263", "0.5102534", "0.50970936", "0.5094368", "0.5091604", "0.5088042", "0.5078995", "0.5071964", "0.50619066", "0.5057338", "0.50562906", "0.505277", "0.50469154", "0.5042174", "0.5040289", "0.5039796", "0.50391996", "0.5030339", "0.5028001", "0.5016045", "0.5014308", "0.500715", "0.5004484", "0.49951515", "0.49902844", "0.49895993", "0.49838167", "0.49736845", "0.49672177", "0.4967064", "0.4963685", "0.4961784", "0.4951542", "0.49355194", "0.49334627", "0.49199134", "0.49150982", "0.49085972", "0.49077895", "0.48988315", "0.48964998", "0.48958114", "0.48779255", "0.4875588", "0.48754713", "0.48737866", "0.4872576", "0.4871789", "0.48709083", "0.48691928", "0.48686478", "0.48686478", "0.48686478", "0.4854937", "0.4854892", "0.48537272" ]
0.0
-1
Schreibt eine Dateiliste des Fileadmins, ohne Deploymentdateien
public function readFilesInFileadmin() { $fileArr = $newArr = array(); // direktes auslesen des Ordners, da evtl. nicht alle Dateien in Tabellen indexiert sind $path = GeneralUtility::getIndpEnv('TYPO3_DOCUMENT_ROOT') . GeneralUtility::getIndpEnv('TYPO3_SITE_PATH') . 'fileadmin/'; $fileList = GeneralUtility::getAllFilesAndFoldersInPath($fileArr, $path); $pathCount = strlen($path); // deployment-Ordner exkludieren foreach ($fileList as $filekey => $filevalue) { if (strstr($filevalue, '/fileadmin/deployment') == FALSE) { $newArr[$filekey] = substr($filevalue, $pathCount); } } return $newArr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function writeLists() {\n\n\t\t// get lists file name\n\t\t$adminops_file = $this->settings['adminops_file'];\n\n\t\t// compile lists file contents\n\t\t$lists = \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\" ?>\" . CRLF\n\t\t . \"<lists>\" . CRLF\n\t\t . \"\\t<titles>\" . CRLF;\n\t\tforeach ($this->titles as $title => $value) {\n\t\t\t$lists .= \"\\t\\t<\" . strtolower($title) . \">\" .\n\t\t\t $value[0]\n\t\t\t . \"</\" . strtolower($title) . \">\" . CRLF;\n\t\t}\n\t\t$lists .= \"\\t</titles>\" . CRLF\n\t\t . CRLF\n\t\t . \"\\t<admins>\" . CRLF;\n\t\t$empty = true;\n\t\tif (isset($this->admin_list['TMLOGIN'])) {\n\t\t\tfor ($i = 0; $i < count($this->admin_list['TMLOGIN']); $i++) {\n\t\t\t\tif ($this->admin_list['TMLOGIN'][$i] != '') {\n\t\t\t\t\t$lists .= \"\\t\\t<tmlogin>\" . $this->admin_list['TMLOGIN'][$i] . \"</tmlogin>\"\n\t\t\t\t\t . \" <ipaddress>\" . $this->admin_list['IPADDRESS'][$i] . \"</ipaddress>\" . CRLF;\n\t\t\t\t\t$empty = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif ($empty) {\n\t\t\t$lists .= \"<!-- format:\" . CRLF\n\t\t\t . \"\\t\\t<tmlogin>YOUR_ADMIN_LOGIN</tmlogin> <ipaddress></ipaddress>\" . CRLF\n\t\t\t . \"-->\" . CRLF;\n\t\t}\n\t\t$lists .= \"\\t</admins>\" . CRLF\n\t\t . CRLF\n\t\t . \"\\t<operators>\" . CRLF;\n\t\t$empty = true;\n\t\tif (isset($this->operator_list['TMLOGIN'])) {\n\t\t\tfor ($i = 0; $i < count($this->operator_list['TMLOGIN']); $i++) {\n\t\t\t\tif ($this->operator_list['TMLOGIN'][$i] != '') {\n\t\t\t\t\t$lists .= \"\\t\\t<tmlogin>\" . $this->operator_list['TMLOGIN'][$i] . \"</tmlogin>\"\n\t\t\t\t\t . \" <ipaddress>\" . $this->operator_list['IPADDRESS'][$i] . \"</ipaddress>\" . CRLF;\n\t\t\t\t\t$empty = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif ($empty) {\n\t\t\t$lists .= \"<!-- format:\" . CRLF\n\t\t\t . \"\\t\\t<tmlogin>YOUR_OPERATOR_LOGIN</tmlogin> <ipaddress></ipaddress>\" . CRLF\n\t\t\t . \"-->\" . CRLF;\n\t\t}\n\t\t$lists .= \"\\t</operators>\" . CRLF\n\t\t . CRLF\n\t\t . \"\\t<admin_abilities>\" . CRLF;\n\t\tforeach ($this->adm_abilities as $ability => $value) {\n\t\t\t$lists .= \"\\t\\t<\" . strtolower($ability) . \">\" .\n\t\t\t ($value[0] ? \"true\" : \"false\")\n\t\t\t . \"</\" . strtolower($ability) . \">\" . CRLF;\n\t\t}\n\t\t$lists .= \"\\t</admin_abilities>\" . CRLF\n\t\t . CRLF\n\t\t . \"\\t<operator_abilities>\" . CRLF;\n\t\tforeach ($this->op_abilities as $ability => $value) {\n\t\t\t$lists .= \"\\t\\t<\" . strtolower($ability) . \">\" .\n\t\t\t ($value[0] ? \"true\" : \"false\")\n\t\t\t . \"</\" . strtolower($ability) . \">\" . CRLF;\n\t\t}\n\t\t$lists .= \"\\t</operator_abilities>\" . CRLF\n\t\t . \"</lists>\" . CRLF;\n\n\t\t// write out the lists file\n\t\tif (!@file_put_contents($adminops_file, $lists)) {\n\t\t\ttrigger_error('Could not write adminops file ' . $adminops_file . ' !', E_USER_WARNING);\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "public function mainAction() {\n return array(\n 'admins' => $this->get('snowcap_admin')->getAdmins(),\n );\n }", "function ft_hook_dirlist() {}", "public function collectEzLegacyFiles()\r\n {\r\n $folder = array($this->app_root.'/../ezpublish_legacy/settings/', $this->app_root.'/../ezpublish_legacy/settings/override');\r\n $files_found = $this->findFiles($folder, array(\"ini\", \"php\"));\r\n\r\n if($files_found)\r\n $this->file_list = array_merge($this->file_list, $files_found);\r\n $this->filterZipfileList();\r\n\r\n }", "public function export_addFilesFromSysFilesRecords() {}", "function logCheckOnWorkDate()\n\t{\n\t\t// Soll durchgefuehrt werden?\n\t\tif (!$this->m_enable || !$this->m_eraseFilesEnable)\n\t\t{\t\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\t// Suche nach Dateien in Verzeichnis\n\t\t$dir = sprintf(\"%s%s\", $this->m_base, $this->m_sub);\n\t\tif (($resource = opendir($dir)) != false)\n\t\t{\t\n\t\t\twhile(($file = readdir($resource)) != false)\n\t\t\t{\n\t\t\t\tif ($file == \".\" || $file == \"..\") continue;\n\t\t\t\t\n\t\t\t\t// Passt Dateiname zu Format der Logdateinamen\n\t\t\t\tif (eregi($this->m_fileNameTemplateMatch, $file))\n\t\t\t\t{\n\t\t\t\t\t// In Liste aufnehmen\n\t\t\t\t\t$fileList[$fileCount++] = $file;\n\t\t\t\t}\n\t\t\t}\n\t\t\tclosedir($resource);\n\t\n\t\t\t// Wurden Dateien gefunden.\n\t\t\tif ($fileCount)\n\t\t\t{\t\n\t\t\t\t$fileCount = 0;\n\t\t\t\t// Array der gefundenen Dateien sortieren.\n\t\t\t\trsort($fileList);\n\t\t\t\t\n\t\t\t\tfor (; count($fileList);)\n\t\t\t\t{\t\n\t\t\t\t\t// Ist Datei von selbigem Datum?\n\t\t\t\t\tif (strncmp($tmp, $fileList[0], 10) == false)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Datei mit gleichem Datums-Zeichenfolgenbeginn\n\t\t\t\t\t\t// Kann sein, da fuer verschiedene Kanaele gelogt werden kann.\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// Datums-Zeichenfolge des Dateinamen aufnehmen.\n\t\t\t\t\t\t$tmp = $fileList[0];\n\t\t\t\t\t\t$fileCount++; // Zu erhaltende Datei\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Datumsbereich der zu erhaltenden Dateien ueberschritten?\n\t\t\t\t\tif ($fileCount > $this->m_eraseFilesCount)\n\t\t\t\t\t{\n\t\t\t\t\t\t$file = $this->m_base . $this->m_sub . $fileList[0];\n\t\t\t\t\t\tif (unlink($file) == false)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Konnte nicht geloescht werden!\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t//echo \"Erase file: \" . $fileList[0] . \"\\n\";\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\t\n\t\t\t\t\t\t//echo \"Hold file: \" . $fileList[0] . \"\\n\";\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Datei aus Array entfernen\n\t\t\t\t\tarray_shift($fileList);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn 1;\n\t}", "public static function getAdminsList()\n {\n $data_to_load = [];\n if(DatabaseManager::fetchInto(\"main\", $data_to_load, \"SELECT * FROM `admin_users`\") === false)\n Status::message(Status::ERROR, \"Couldn't retrieve `admin_users` from DB\");\n \n Status::message(Status::SUCCESS, $data_to_load);\n }", "function arquivos() {\n\t\t$this->validate();\n\t\t$this->setupTemplate(true);\n\t\t$templateMgr =& TemplateManager::getManager();\n\n\t\t//carregar lista de arquivos:\n\t\t$templateMgr->assign('files', $this->listar());\n\t\t$templateMgr->display('files/files.tpl');\n\t}", "public function collectLogFiles()\r\n {\r\n $folder = array($this->app_root.'/logs');\r\n $files_found = $this->findFiles($folder, array(\"log\"));\r\n\r\n if($files_found)\r\n $this->file_list = array_merge($this->file_list, $files_found);\r\n }", "function ajaxlistfiles(){\n\n\t\t//Glob all files in uploaddir\n\t\t$files = array();\n\t\tforeach(glob($this->uploaddir.'*') as $file){\n\n\t\t\t//Strip path\n\t\t\t$filename = str_replace($this->uploaddir,'',$file);\n\n\t\t\t$files[$filename]['filename']=$filename;\n\t\t\t$files[$filename]['filesize']=filesize($file) / 1024 / 1024; //Mb\n\t\t\t$files[$filename]['modified']=filemtime($file); //Mb\n\n\t\t\t//Check torrent\n\t\t\tif( file_exists( $this->torrentdir.$filename.'.torrent' )){\n\n\t\t\t\t//Add torrent file\n\t\t\t\t$files[$filename]['torrent']=$filename.'.torrent';\n\n\t\t\t\t//Check database table phptracker_peers for torrent peers:\n\t\t\t\tif($torrent = $this->Torrent->findByName($filename)){\n\t\t\t\t\tif($peers = $this->Peer->findAllByInfoHash($torrent['Torrent']['info_hash'])){\n\t\t\t\t\t\t$files[$filename]['peers']=$peers;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$this->set('files',$files);\n\n\t\t$this->layout = 'ajax';\n\t}", "function managementAdminAll(){\n $Admins = new \\Project\\Models\\ManagementAdminManager();\n $allAdmin = $Admins->allManagementAdmin();\n\n require 'app/views/back/managementAdmin.php';\n }", "function getAdminLinks()\n {\n }", "function get_super_admins()\n {\n }", "function _generateFilesList() {\n return array();\n }", "public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/jestr.php',\n 'sources_custom/forum/cns.php',\n 'lang_custom/EN/jestr.ini',\n 'themes/default/templates_custom/EMOTICON_IMG_CODE_THEMED.tpl',\n 'forum/pages/modules_custom/topicview.php',\n 'sources_custom/hooks/systems/config/jestr_avatar_switch_shown_for.php',\n 'sources_custom/hooks/systems/config/jestr_emoticon_magnet_shown_for.php',\n 'sources_custom/hooks/systems/config/jestr_leet_shown_for.php',\n 'sources_custom/hooks/systems/config/jestr_name_changes.php',\n 'sources_custom/hooks/systems/config/jestr_name_changes_shown_for.php',\n 'sources_custom/hooks/systems/config/jestr_piglatin_shown_for.php',\n 'sources_custom/hooks/systems/config/jestr_string_changes.php',\n 'sources_custom/hooks/systems/config/jestr_string_changes_shown_for.php',\n );\n }", "function list_files () {\n\t\t$root = $this->get_root();\n\t\t\n\t\treturn $this->_list_files($root);\n\t}", "public function admin_logs_manage() {\n $app = $this->app;\n if ($this->isUserAdmin()) {\n $srv = $this->srv;\n $logs = $srv->retrieve_all_logs();\n $app->render('Logbook/admin_manage_logs.html.twig', ['globals' => $this->getGlobals(), 'logs' => $logs]);\n } else {\n $app->flash('error', 'Ongeldige bewerking.');\n $app->redirect($app->urlFor('main_page'));\n }\n }", "public function addAdminMenuEntries(): void {\n foreach ($this->adminPages as $page) {\n (new $page($this->container));\n }\n }", "public function page_default_administration()\n\t{\n\t\tFsb::$tpl->set_file('adm_index.html');\n\n\t\t// Les 5 derniers logs administratifs\n\t\t$logs = Log::read(Log::ADMIN, 5);\n\t\tforeach ($logs['rows'] AS $log)\n\t\t{\n\t\t\tFsb::$tpl->set_blocks('log', array(\n\t\t\t\t'STR' =>\t$log['errstr'],\n\t\t\t\t'INFO' =>\tsprintf(Fsb::$session->lang('adm_list_log_info'), htmlspecialchars($log['u_nickname']), Fsb::$session->print_date($log['log_time'])),\n\t\t\t));\n\t\t}\n\n\t\t// On affiche tous les comptes ?\n\t\t$show_all = (Http::request('show_all')) ? true : false;\n\n\t\t// Liste des comptes en attente de validation\n\t\t$sql = 'SELECT u_id, u_nickname, u_joined, u_register_ip\n\t\t\t\tFROM ' . SQL_PREFIX . 'users\n\t\t\t\tWHERE u_activated = 0\n\t\t\t\t\tAND u_confirm_hash = \\'.\\'\n\t\t\t\t\tAND u_id <> ' . VISITOR_ID . '\n\t\t\t\tORDER BY u_joined DESC\n\t\t\t\t' . (($show_all) ? '' : 'LIMIT 5');\n\t\t$result = Fsb::$db->query($sql);\n\t\twhile ($row = Fsb::$db->row($result))\n\t\t{\n\t\t\tFsb::$tpl->set_blocks('wait', array(\n\t\t\t\t'NICKNAME' =>\t\thtmlspecialchars($row['u_nickname']),\n\t\t\t\t'JOINED_IP' =>\t\tsprintf(Fsb::$session->lang('adm_joined_ip'), Fsb::$session->print_date($row['u_joined']), $row['u_register_ip']),\n\n\t\t\t\t'U_EDIT' =>\t\t\tsid(ROOT . 'index.' . PHPEXT . '?p=modo&amp;module=user&amp;id=' . $row['u_id']),\n\t\t\t\t'U_VALIDATE' =>\t\tsid('index.' . PHPEXT . '?mode=validate&amp;id=' . $row['u_id']),\n\t\t\t));\n\t\t}\n\t\tFsb::$db->free($result);\n\n\t\t// Liste des membres en ligne\n\t\t$sql = 'SELECT s.s_id, s.s_ip, s.s_page, s.s_user_agent, u.u_nickname, u.u_color, u.u_activate_hidden, b.bot_id, b.bot_name\n\t\t\tFROM ' . SQL_PREFIX . 'sessions s\n\t\t\tLEFT JOIN ' . SQL_PREFIX . 'users u\n\t\t\t\tON u.u_id = s.s_id\n\t\t\tLEFT JOIN ' . SQL_PREFIX . 'bots b\n\t\t\t\tON s.s_bot = b.bot_id\n\t\t\tWHERE s.s_time > ' . intval(CURRENT_TIME - 300) . '\n\t\t\tORDER BY u.u_auth DESC, u.u_nickname, s.s_id';\n\t\t$result = Fsb::$db->query($sql);\n\t\t$id_array = array();\n\t\t$ip_array = array();\n\t\t$f_idx = $t_idx = $p_idx = array();\n\t\t$logged = array('users' => array(), 'visitors' => array());\n\t\twhile ($row = Fsb::$db->row($result))\n\t\t{\n\t\t\tif (!is_null($row['bot_id']) || $row['s_id'] == VISITOR_ID)\n\t\t\t{\n\t\t\t\tif (in_array($row['s_ip'], $ip_array))\n\t\t\t\t{\n\t\t\t\t\tcontinue ;\n\t\t\t\t}\n\t\t\t\t$ip_array[] = $row['s_ip'];\n\t\t\t\t$type = 'visitors';\n\n\t\t\t\t// Les bots ont leur propre couleur\n\t\t\t\tif (!is_null($row['bot_id']))\n\t\t\t\t{\n\t\t\t\t\t$row['u_color'] = 'class=\"bot\"';\n\t\t\t\t\t$row['u_nickname'] = $row['bot_name'];\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (in_array($row['s_id'], $id_array))\n\t\t\t\t{\n\t\t\t\t\tcontinue ;\n\t\t\t\t}\n\t\t\t\t$id_array[] = $row['s_id'];\n\t\t\t\t$type = 'users';\n\t\t\t}\n\n\t\t\t// Position du membre sur le forum\n\t\t\t$id = null;\n\t\t\t$method = 'forums';\n\t\t\tif (strpos($row['s_page'], 'admin/') !== false)\n\t\t\t{\n\t\t\t\t$location = Fsb::$session->lang('adm_location_adm');\n\t\t\t\t$url = 'admin/index.' . PHPEXT;\n\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$page = basename($row['s_page']);\n\t\t\t\t$url = '';\n\t\t\t\t$location = '';\n\t\t\t\tif (preg_match('#^index\\.' . PHPEXT . '\\?p=([a-z0-9_]+)(&.*?)*$#', $page, $match) || preg_match('#^(forum|topic|sujet)-([0-9]+)-([0-9]+)\\.html$#i', $page, $match))\n\t\t\t\t{\n\t\t\t\t\t$url = $match[0];\n\t\t\t\t\tswitch ($match[1])\n\t\t\t\t\t{\n\t\t\t\t\t\tcase 'forum' :\n\t\t\t\t\t\t\t$location = Fsb::$session->lang('adm_location_forum');\n\t\t\t\t\t\t\tif (count($match) == 4)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$id = $match[2];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tpreg_match('#f_id=([0-9]+)#', $page, $match);\n\t\t\t\t\t\t\t\t$id = (isset($match[1])) ? $match[1] : null;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ($id) $f_idx[] = $id;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'topic' :\n\t\t\t\t\t\tcase 'sujet' :\n\t\t\t\t\t\t\t$location = Fsb::$session->lang('adm_location_topic');\n\t\t\t\t\t\t\tif (count($match) == 4)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$method = 'topics';\n\t\t\t\t\t\t\t\t$id = $match[2];\n\t\t\t\t\t\t\t\t$t_idx[] = $id;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (preg_match('#t_id=([0-9]+)#', $page, $match))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$method = 'topics';\n\t\t\t\t\t\t\t\t$id = (isset($match[1])) ? $match[1] : null;\n\t\t\t\t\t\t\t\tif ($id) $t_idx[] = $id;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$method = 'posts';\n\t\t\t\t\t\t\t\tpreg_match('#p_id=([0-9]+)#', $page, $match);\n\t\t\t\t\t\t\t\t$id = (isset($match[1])) ? $match[1] : null;\n\t\t\t\t\t\t\t\tif ($id) $p_idx[] = $id;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'post' :\n\t\t\t\t\t\t\tpreg_match('#mode=([a-z_]+)#', $page, $mode);\n\t\t\t\t\t\t\tpreg_match('#id=([0-9]+)#', $page, $match);\n\t\t\t\t\t\t\t$id = (isset($match[1])) ? $match[1] : null;\n\t\t\t\t\t\t\tswitch ($mode[1])\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcase 'topic' :\n\t\t\t\t\t\t\t\t\t$location = Fsb::$session->lang('adm_location_post_new');\n\t\t\t\t\t\t\t\t\tif ($id) $f_idx[] = $id;\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tcase 'reply' :\n\t\t\t\t\t\t\t\t\t$location = Fsb::$session->lang('adm_location_post_reply');\n\t\t\t\t\t\t\t\t\tif ($id) $t_idx[] = $id;\n\t\t\t\t\t\t\t\t\t$method = 'topics';\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tcase 'edit' :\n\t\t\t\t\t\t\t\t\t$location = Fsb::$session->lang('adm_location_post_edit');\n\t\t\t\t\t\t\t\t\tif ($id) $p_idx[] = $id;\n\t\t\t\t\t\t\t\t\t$method = 'posts';\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tcase 'mp' :\n\t\t\t\t\t\t\t\t\t$location = Fsb::$session->lang('adm_location_mp_write');\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tcase 'calendar_add' :\n\t\t\t\t\t\t\t\t\t$location = Fsb::$session->lang('adm_location_calendar_event');\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tcase 'calendar_edit' :\n\t\t\t\t\t\t\t\t\t$location = Fsb::$session->lang('adm_location_calendar_event_edit');\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault :\n\t\t\t\t\t\t\tif (Fsb::$session->lang('adm_location_' . $match[1]))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$location = Fsb::$session->lang('adm_location_' . $match[1]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (!$location)\n\t\t\t\t{\n\t\t\t\t\t$location = Fsb::$session->lang('adm_location_index');\n\t\t\t\t\t$url = 'index.' . PHPEXT;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$logged[$type][] = array(\n\t\t\t\t'nickname' =>\t\tHtml::nickname($row['u_nickname'], $row['s_id'], $row['u_color']),\n\t\t\t\t'agent' =>\t\t\t$row['s_user_agent'],\n\t\t\t\t'ip' =>\t\t\t\t$row['s_ip'],\n\t\t\t\t'location' =>\t\t$location,\n\t\t\t\t'url' =>\t\t\tsid(ROOT . $url),\n\t\t\t\t'method' =>\t\t\t$method,\n\t\t\t\t'id' =>\t\t\t\t$id,\n\t\t\t);\n\n\n\t\t}\n\t\tFsb::$db->free($result);\n\n\t\t// On recupere une liste des forums pour connaitre la position du membre sur le forum\n\t\t$forums = array();\n\t\tif ($f_idx)\n\t\t{\n\t\t\t$sql = 'SELECT f.f_id, f.f_name, cat.f_id AS cat_id, cat.f_name AS cat_name\n\t\t\t\t\tFROM ' . SQL_PREFIX . 'forums f\n\t\t\t\t\tLEFT JOIN ' . SQL_PREFIX . 'forums cat\n\t\t\t\t\t\tON f.f_cat_id = cat.f_id\n\t\t\t\t\tWHERE f.f_id IN (' . implode(', ', $f_idx) . ')';\n\t\t\t$result = Fsb::$db->query($sql, 'forums_');\n\t\t\t$forums = Fsb::$db->rows($result, 'assoc', 'f_id');\n\t\t}\n\n\t\t// On recupere une liste des sujets pour connaitre la position du membre sur le forum\n\t\t$topics = array();\n\t\tif ($t_idx)\n\t\t{\n\t\t\t$sql = 'SELECT f.f_id, f.f_name, cat.f_id AS cat_id, cat.f_name AS cat_name, t.t_id, t.t_title\n\t\t\t\t\tFROM ' . SQL_PREFIX . 'topics t\n\t\t\t\t\tLEFT JOIN ' . SQL_PREFIX . 'forums f\n\t\t\t\t\t\tON f.f_id = t.f_id\n\t\t\t\t\tLEFT JOIN ' . SQL_PREFIX . 'forums cat\n\t\t\t\t\t\tON f.f_cat_id = cat.f_id\n\t\t\t\t\tWHERE t.t_id IN (' . implode(', ', $t_idx) . ')';\n\t\t\t$result = Fsb::$db->query($sql, 'forums_');\n\t\t\t$topics = Fsb::$db->rows($result, 'assoc', 't_id');\n\t\t}\n\n\t\t// On recupere une liste des messages pour connaitre la position du membre sur le forum\n\t\t$posts = array();\n\t\tif ($p_idx)\n\t\t{\n\t\t\t$sql = 'SELECT f.f_id, f.f_name, cat.f_id AS cat_id, cat.f_name AS cat_name, p.p_id, t.t_id, t.t_title\n\t\t\t\t\tFROM ' . SQL_PREFIX . 'posts p\n\t\t\t\t\tLEFT JOIN ' . SQL_PREFIX . 'topics t\n\t\t\t\t\t\tON p.t_id = t.t_id\n\t\t\t\t\tLEFT JOIN ' . SQL_PREFIX . 'forums f\n\t\t\t\t\t\tON f.f_id = p.f_id\n\t\t\t\t\tLEFT JOIN ' . SQL_PREFIX . 'forums cat\n\t\t\t\t\t\tON f.f_cat_id = cat.f_id\n\t\t\t\t\tWHERE p.p_id IN (' . implode(', ', $p_idx) . ')';\n\t\t\t$result = Fsb::$db->query($sql, 'forums_');\n\t\t\t$posts = Fsb::$db->rows($result, 'assoc', 'p_id');\n\t\t}\n\n\t\t// On affiche les membres en ligne\n\t\tforeach ($logged AS $type => $list)\n\t\t{\n\t\t\tif ($list)\n\t\t\t{\n\t\t\t\tFsb::$tpl->set_blocks('logged', array(\n\t\t\t\t\t'TITLE' =>\t\tFsb::$session->lang('adm_list_logged_' . $type),\n\t\t\t\t));\n\n\t\t\t\tforeach ($list AS $u)\n\t\t\t\t{\n\t\t\t\t\t// On definit si on cherche la liste des forums dans $forums ou $topics\n\t\t\t\t\t$m = $u['method'];\n\t\t\t\t\t$data_exists = ($u['id'] && isset(${$m}[$u['id']])) ? true : false;\n\t\t\t\t\t$topic_exists = ($data_exists && isset(${$m}[$u['id']]['t_title'])) ? true : false;\n\n\t\t\t\t\tFsb::$tpl->set_blocks('logged.u', array(\n\t\t\t\t\t\t'NICKNAME' =>\t\t$u['nickname'],\n\t\t\t\t\t\t'AGENT' =>\t\t\t$u['agent'],\n\t\t\t\t\t\t'IP' =>\t\t\t\t$u['ip'],\n\t\t\t\t\t\t'LOCATION' =>\t\t$u['location'],\n\t\t\t\t\t\t'URL' =>\t\t\t$u['url'],\n\t\t\t\t\t\t'CAT_NAME' =>\t\t($data_exists) ? ${$m}[$u['id']]['cat_name'] : null,\n\t\t\t\t\t\t'FORUM_NAME' =>\t\t($data_exists) ? ${$m}[$u['id']]['f_name'] : null,\n\t\t\t\t\t\t'TOPIC_NAME' =>\t\t($topic_exists) ? Parser::title(${$m}[$u['id']]['t_title']) : '',\n\t\t\t\t\t\t'U_CAT' =>\t\t\t($data_exists) ? sid(ROOT . 'index.' . PHPEXT . '?p=index&amp;cat=' . ${$m}[$u['id']]['cat_id']) : null,\n\t\t\t\t\t\t'U_FORUM' =>\t\t($data_exists) ? sid(ROOT . 'index.' . PHPEXT . '?p=forum&amp;f_id=' . ${$m}[$u['id']]['f_id']) : null,\n\t\t\t\t\t\t'U_TOPIC' =>\t\t($topic_exists) ? sid(ROOT . 'index.' . PHPEXT . '?p=topic&amp;t_id=' . ${$m}[$u['id']]['t_id']) : null,\n\t\t\t\t\t\t'U_IP' =>\t\t\tsid(ROOT . 'index.' . PHPEXT . '?p=modo&amp;module=ip&amp;ip=' . $u['ip']),\n\t\t\t\t\t));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// On verifie si le SDK n'a pas ete desactive\n\t\tif(intval(Fsb::$cfg->get('disable_sdk')))\n\t\t{\n\t\t\tFsb::$tpl->set_switch('sdk_disabled');\n\t\t}\n\n\t\tFsb::$tpl->set_vars(array(\n\t\t\t'FSB_SUPPORT' =>\t\t'http://www.fire-soft-board.com',\n\t\t\t'FSB_LANG_SUPPORT' =>\tFsb::$session->lang('fsb_lang_support'),\n\t\t\t'NEW_VERSION' =>\t\t(!is_last_version(Fsb::$cfg->get('fsb_version'), Fsb::$cfg->get('fsb_last_version'))) ? sprintf(Fsb::$session->lang('adm_fsb_new_version'), Fsb::$cfg->get('fsb_version'), Fsb::$cfg->get('fsb_last_version')) : null,\n\t\t\t'SHOW_ALL' =>\t\t\t$show_all,\n\t\t\t'ROOT_SUPPORT' => \t\tsprintf(Fsb::$session->lang('adm_root_support_active_explain'), 'index.' . PHPEXT . '?p=mods_manager'),\n\n\t\t\t'U_SHOW_ALL' =>\t\t\tsid('index.' . PHPEXT . '?show_all=true'),\n\t\t\t'U_CHECK_VERSION' =>\tsid('index.' . PHPEXT . '?mode=version'),\n\t\t));\n\t}", "public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/idolisr.php',\n 'sources_custom/hooks/modules/members/idolisr.php',\n 'sources_custom/miniblocks/main_stars.php',\n 'sources_custom/miniblocks/side_recent_points.php',\n 'themes/default/templates_custom/POINTS_GIVE.tpl',\n 'themes/default/templates_custom/BLOCK_MAIN_STARS.tpl',\n 'themes/default/templates_custom/BLOCK_SIDE_RECENT_POINTS.tpl',\n );\n }", "function ciniki_lapt_fileList($ciniki) {\n //\n // Find all the required and optional arguments\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'tnid'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Tenant'),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $args = $rc['args'];\n\n //\n // Check access to tnid as owner, or sys admin.\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'lapt', 'private', 'checkAccess');\n $rc = ciniki_lapt_checkAccess($ciniki, $args['tnid'], 'ciniki.lapt.fileList');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Get the list of files\n //\n $strsql = \"SELECT ciniki_lapt_files.id, \"\n . \"ciniki_lapt_files.document_id, \"\n . \"ciniki_lapt_files.name, \"\n . \"ciniki_lapt_files.permalink, \"\n . \"ciniki_lapt_files.flags, \"\n . \"ciniki_lapt_files.org_filename, \"\n . \"ciniki_lapt_files.extension \"\n . \"FROM ciniki_lapt_files \"\n . \"WHERE ciniki_lapt_files.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"\";\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQueryArrayTree');\n $rc = ciniki_core_dbHashQueryArrayTree($ciniki, $strsql, 'ciniki.lapt', array(\n array('container'=>'files', 'fname'=>'id', \n 'fields'=>array('id', 'document_id', 'name', 'permalink', 'flags', 'org_filename', 'extension')),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( isset($rc['files']) ) {\n $files = $rc['files'];\n $file_ids = array();\n foreach($files as $iid => $file) {\n $file_ids[] = $file['id'];\n }\n } else {\n $files = array();\n $file_ids = array();\n }\n\n return array('stat'=>'ok', 'files'=>$files, 'nplist'=>$file_ids);\n}", "public function listActions() {\n return [\n new Action('Export', 'fa-download', URL::route('admin-'.$this->name().'-export'))\n ];\n }", "public function indexAction()\n {\n \n $this->authService = new AuthenticationService();\n if( ! $this->authService->hasIdentity() ){\n $this->redirectAdminIndex();\n }\n $layout = $this->layout();\n $layout->setTemplate('admin/dashboard/layout');\n $themefileManager = $this->getServiceLocator()->get('themefileServices');\n $themeManager = $this->getServiceLocator()->get('templateMapService');\n $publicfilestructureManager = $this->getServiceLocator()->get('publicfilestructureManager');\n \n // This will create theme file structure\n //$themefileManager->setThemeFileStructure();\n \n //$themeManager->processTemplateMapping();\n $publicfilestructureManager->readModules();\n $publicfilestructureManager->movePublicToThemes();\n return array('output' => $themefileManager->output);\n }", "function procMenuAdminAllActList()\n\t{\n\t\t$oModuleModel = getModel('module');\n\t\t$installed_module_list = $oModuleModel->getModulesXmlInfo();\n\t\tif(is_array($installed_module_list))\n\t\t{\n\t\t\t$currentLang = Context::getLangType();\n\t\t\t$menuList = array();\n\t\t\tforeach($installed_module_list AS $key=>$value)\n\t\t\t{\n\t\t\t\t$info = $oModuleModel->getModuleActionXml($value->module);\n\t\t\t\tif($info->menu) $menuList[$value->module] = $info->menu;\n\t\t\t\tunset($info->menu);\n\t\t\t}\n\t\t}\n\t\t$this->add('menuList', $menuList);\n\t}", "function index_superusuarios() {\n\t\t$conditions = array('Administrativo.perfil' => '0'); \n\t\t$order = array('Administrativo.nombre' => 'ASC');\n\t\t$administrativos=$this->Administrativo->find('all', array ('conditions' => $conditions, 'order' => $order));\t\t\n\t\t$perfil=$this->Perfil->find('all');\n\t\tforeach ($perfil as $p){\n\t\t\t$perfiles[$p['Perfil']['id']]=$p['Perfil']['perfil'];\n\t\t}\n\t\t$perfiles[0]='SuperAdministrador';\n\t\t$this->set('perfiles', $perfiles);\n\t\t$this->set('administrativos', $administrativos);\n\t}", "function showAdmins() {\n // permissions...\n if(!Current_User::isDeity()) {\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Error.php');\n $error = 'Uh Uh Uh! You didn\\'t say the magic word!';\n Sysinventory_Error::error($error);\n return;\n }\n\n // set up some stuff for the page template\n $tpl = array();\n $tpl['PAGE_TITLE'] = 'Edit Administrators';\n $tpl['HOME_LINK'] = PHPWS_Text::moduleLink('Back to menu','sysinventory');\n\n // create the list of admins\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Admin.php');\n $adminList = Sysinventory_Admin::generateAdminList();\n // get the list of departments\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Department.php');\n $depts = Sysinventory_Department::getDepartmentsByUsername();\n\n // build the array for the department drop-down box\n $deptIdSelect = array();\n foreach($depts as $dept) {\n $deptIdSelect[$dept['id']] = $dept['description'];\n }\n\n // make the form for adding a new admin\n $form = new PHPWS_Form('add_admin');\n $form->addSelect('department_id',$deptIdSelect);\n $form->setLabel('department_id','Department');\n $form->addText('username');\n $form->setLabel('username','Username');\n $form->addSubmit('submit','Create Admin');\n $form->setAction('index.php?module=sysinventory&action=edit_admins');\n $form->addHidden('newadmin','add');\n\n $tpl['PAGER'] = $adminList;\n\n $form->mergeTemplate($tpl);\n\n $template = PHPWS_Template::process($form->getTemplate(),'sysinventory','edit_admin.tpl');\n\n Layout::addStyle('sysinventory','style.css');\n Layout::add($template);\n\n }", "public function collectInfoFiles()\r\n {\r\n $files_found = $this->findFiles($this->destination_dir, array('md', '1st', 'txt'));\r\n\r\n if($files_found)\r\n $this->file_list = array_merge($this->file_list, $files_found);\r\n }", "public static function get_admins();", "public function run()\n {\n $list = \n \t[\n \t\t[\n\t 'name' => 'admin-users',\n\t 'display_name' => 'Administrar Usuarios',\n\t 'description' => 'Puede crear, listar, ver, editar y eliminar usuarios'\n \t],\n \t[\n\t 'name' => 'admin-enterprise',\n\t 'display_name' => 'Administrar Empresa',\n\t 'description' => 'Puede ver y editar la información de la empresa'\n \t],\n \t[\n\t 'name' => 'admin-stores',\n\t 'display_name' => 'Administrar Almacenes',\n\t 'description' => 'Puede crear, listar, ver, editar y eliminar Almacenes'\n \t],\n \t[\n\t 'name' => 'admin-providers',\n\t 'display_name' => 'Administrar Proveedores',\n\t 'description' => 'Puede crear, listar, ver, editar y eliminar Almacenes'\n \t],\n \t[\n\t 'name' => 'admin-clients',\n\t 'display_name' => 'Administrar Clientes',\n\t 'description' => 'Puede manipular el modulo de clientes'\n \t],\n \t[\n\t 'name' => 'admin-products',\n\t 'display_name' => 'Administrar Productos',\n\t 'description' => 'Puede manipular el modulo de productos'\n \t],\n \t[\n\t 'name' => 'admin-inventory',\n\t 'display_name' => 'Administrar Inventario',\n\t 'description' => 'Puede manipular el modulo de inventario'\n \t],\n \t[\n\t 'name' => 'admin-sales',\n\t 'display_name' => 'Administrar Ventas',\n\t 'description' => 'Puede manipular el modulo de ventas'\n \t],\n \t[\n\t 'name' => 'admin-deliveries',\n\t 'display_name' => 'Administrar Despachos',\n\t 'description' => 'Puede manipular el modulo de despachos'\n \t],\n \t[\n\t 'name' => 'admin-credits',\n\t 'display_name' => 'Administrar Creditos',\n\t 'description' => 'Puede manipular el modulo de creditos'\n \t],\n \t[\n\t 'name' => 'admin-roles',\n\t 'display_name' => 'Administrar Permisologia',\n\t 'description' => 'Puede manipular el modulo de permisologia'\n \t],\n \t[\n\t 'name' => 'administrator',\n\t 'display_name' => 'Administrador',\n\t 'description' => 'Puede administrar todo el sistema'\n \t],\n \t];\n\n \tforeach ($list as $key => $value) {\n \t\tDB::table('permissions')->insert($value);\t\n \t}\n }", "public static function jqueryFileTree_get_list() {\r\n\t\tcheck_admin_referer('plugin-name-action_wpidenonce'); \r\n\t\tif ( !is_super_admin() )\r\n\t\t\twp_die('<p>'.__('You do not have sufficient permissions to edit templates for this site. SORRY').'</p>');\r\n\t\t\r\n\t\t//setup wp_filesystem api\r\n\t\tglobal $wp_filesystem;\r\n $url = wp_nonce_url('admin.php?page=wpide','plugin-name-action_wpidenonce');\r\n $form_fields = null; // for now, but at some point the login info should be passed in here\r\n if (false === ($creds = request_filesystem_credentials($url, FS_METHOD, false, false, $form_fields) ) ) {\r\n // no credentials yet, just produced a form for the user to fill in\r\n return true; // stop the normal page form from displaying\r\n }\r\n \r\n\t\tif ( ! WP_Filesystem($creds) ) \r\n\t\t return false;\r\n \r\n\t\t$_POST['dir'] = urldecode($_POST['dir']);\r\n $root = apply_filters( 'wpide_filesystem_root', WP_CONTENT_DIR ); \r\n\t\t\r\n\t\tif( $wp_filesystem->exists($root . $_POST['dir']) ) {\r\n\t\t\t//$files = scandir($root . $_POST['dir']);\r\n\t\t\t//print_r($files);\r\n\t\t\t$files = $wp_filesystem->dirlist($root . $_POST['dir']);\r\n\t\t\t//print_r($files);\r\n \r\n\t\t\techo \"<ul class=\\\"jqueryFileTree\\\" style=\\\"display: none;\\\">\";\r\n\t\t\tif( count($files) > 0 ) { \r\n\t\t\t\t\r\n\t\t\t\t// All dirs\r\n\t\t\t\tasort($files); // Sort Files and folders by php case-sensitive Alpha\r\n\t\t\t\tforeach( $files as $file => $file_info ) {\r\n\t\t\t\t\tif( $file != '.' && $file != '..' && $file_info['type']=='d' ) {\r\n\t\t\t\t\t\techo \"<li class=\\\"directory collapsed\\\"><a href=\\\"#\\\" rel=\\\"\" . htmlentities($_POST['dir'] . $file) . \"/\\\">\" . htmlentities($file) . \"</a></li>\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// All files\r\n\t\t\t\tforeach( $files as $file => $file_info ) {\r\n\t\t\t\t\tif( $file != '.' && $file != '..' && $file_info['type']!='d') {\r\n\t\t\t\t\t\t$ext = preg_replace('/^.*\\./', '', $file);\r\n\t\t\t\t\t\techo \"<li class=\\\"file ext_$ext\\\"><a href=\\\"#\\\" rel=\\\"\" . htmlentities($_POST['dir'] . $file) . \"\\\">\" . htmlentities($file) . \"</a></li>\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//output toolbar for creating new file, folder etc\r\n\t\t\techo \"<li class=\\\"create_new\\\"><a class='new_directory' title='Create a new directory here.' href=\\\"#\\\" rel=\\\"{type: 'directory', path: '\" . htmlentities($_POST['dir']) . \"'}\\\"></a> <a class='new_file' title='Create a new file here.' href=\\\"#\\\" rel=\\\"{type: 'file', path: '\" . htmlentities($_POST['dir']) . \"'}\\\"></a><br style='clear:both;' /></li>\";\r\n\t\t\techo \"</ul>\";\t\r\n\t\t}\r\n\t\r\n\t\tdie(); // this is required to return a proper result\r\n\t}", "public function admin_index() {\n\t\t$this->layout=\"admindefault\";\n\t\t$this->adminsessionchecked();\n\t\t$this->User->recursive = 0;\n\t\t$this->Paginator->settings=array(\n\t\t\t'conditions'=>array(\n\t\t\t\t'User.is_deleted'=>'0'\n\t\t\t)\n\t\t);\n\t\t$this->set('users', $this->Paginator->paginate());\n\t\t//$this->set('allowedimage',$this->allowedimageType);\n\t}", "function index_usuarios() {\n\t\t$conditions = array('Administrativo.perfil >' => '0'); \n\t\t$order = array('Administrativo.nombre' => 'ASC');\n\t\t$administrativos=$this->Administrativo->find('all', array ('conditions' => $conditions, 'order' => $order));\t\t\n\t\t$perfil=$this->Perfil->find('all');\n\t\tforeach ($perfil as $p){\n\t\t\t$perfiles[$p['Perfil']['id']]=$p['Perfil']['perfil'];\n\t\t}\n\t\t$perfiles[0]='SuperAdministrador';\n\t\t$this->set('perfiles', $perfiles);\n\t\t$this->set('administrativos', $administrativos);\n\t}", "public function listCommand() {\n\t\t$iterator = new DirectoryIterator(UploadManager::UPLOAD_FOLDER);\n\n\t\t$counter = 0;\n\t\tforeach ($iterator as $file) {\n\t\t\tif ($file->isFile()) {\n\t\t\t\t$counter++;\n\t\t\t\t$this->outputLine($file->getFilename());\n\t\t\t}\n\t\t}\n\n\t\t$this->outputLine();\n\t\t$this->outputLine(sprintf('%s temporary file(s).', $counter));\n\t}", "public function getFileList(): array\n {\n return [\n app_path('User.php'),\n app_path('Http/Controllers/Auth/RegisterController.php'),\n config_path('auth.php'),\n config_path('services.php'),\n base_path('database/factories/UserFactory.php'),\n ];\n }", "public function actionIndexFiles()\n {\n $manager = new Manager(['module' => $this->module]);\n $manager->indexAll();\n }", "public function existingAdminList()\n {\n $groceries = $this->getList();\n return $this->renderExistingAdminList($groceries);\n }", "public function formatTemplateFiles()\n {\n $name = str_replace(\":\", \".\", $this->getName());\n $list = parent::formatTemplateFiles();\n array_unshift(\n $list,\n $this->context->parameters[\"appDir\"] . \"/templates/$name.$this->view.latte\"\n );\n return $list;\n }", "function showAllServiciosMVCadmin()\n {\n if ($this->admin) {\n $servicios = $this->serviciosModel->getServicios();\n $this->viewservices->showAllServicesPrintAdmin($servicios);\n } else {\n header(\"Location: \" . BASE_URL);\n }\n }", "function structureAdmin_permanentFile($files) {\n $status = FALSE;\n\n try {\n foreach ($admin['files'] as $file) {\n $fid = variable_get($file, '');\n if (isset($fid) && !empty($fid)) {\n $file = file_load($fid);\n if ($file->status == 0) {\n $file->status = FILE_STATUS_PERMANENT;\n file_save($file);\n file_usage_add($file, $admin['module'], $admin['module'], 1);\n }//end if\n }//end if\n }//end foreach\n $status = TRUE;\n } catch ( Exception $e){\n $error = $e->getMessage;\n watchdog('Admin Permanent Files ', 'Error message :%message', array('%message' => $error) );\n }//end try\n\n return $status;\n}", "public function files() {\n\t\t$files = $this->ApiFile->fileList($this->path);\n\t\t$this->set('files', $files);\n\t}", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('AppAdminBundle:FileManager')->findAll();\n if(empty($entities)) {\n if(!$this->container->getParameter('filemanager_path')) {\n $this->indexation($this->$this->get('kernel')->getRootDir() . '/../web');\n } else {\n $this->indexation($this->container->getParameter('filemanager_path'));\n }\n\n }\n\n $htmlTree = $em->getRepository('AppAdminBundle:FileManager')->childrenHierarchy(\n null, /* starting from root nodes */\n false, /* true: load all children, false: only direct */\n array(\n 'decorate' => true,\n 'representationField' => 'title',\n 'html' => true,\n 'rootOpen' => '<ul>',\n 'rootClose' => '</ul>',\n 'childOpen' => function($child) {\n return '<li id=\"'.$child['id'].'\">';\n },\n 'childClose' => '</li>'\n )\n );\n return array(\n 'htmlTree' => $htmlTree,\n );\n }", "public function admin_index(){\n\n\n\t\t\t// On liste toutes les utilisateurs\n\t\t\t$users = $this->User->find('all');\n\n\t\t\tif(!empty($users)){\n\t\t\t\t// Si on a des bacs, on liste les bacs\n\t\t\t\t$this->set(compact('users'));\n\t\t\t\t\n\t\t\t}\n\n\t\t}", "public function filterZipfileList()\r\n {\r\n $this->zipfile_destination = [];\r\n foreach ($this->file_list as $file) {\r\n if (is_file($file) && $file !== $this->destination_dir.'/'.$this->zip_filename ) {\r\n $destinationDir = basename($file);\r\n if(preg_match(\"/config|logs|ezpublish\\_legacy/\", $file)) {\r\n $destinationDir = str_replace($this->app_root.\"/\", \"\", $file);\r\n if(preg_match(\"/ezpublish\\_legacy/\", $file)) {\r\n $destinationDir = str_replace($this->site_root.\"/\", \"\", $file);\r\n }\r\n }\r\n $this->zipfile_destination[] = array(\"orig\" => $file, \"dest\" => $destinationDir);\r\n }\r\n }\r\n }", "public function action_index()\n\t{\n\t\tglobal $context, $modSettings;\n\n\t\t// Make sure the administrator has a valid session...\n\t\tvalidateSession();\n\n\t\t// Load the language and templates....\n\t\tTxt::load('Admin');\n\t\ttheme()->getTemplates()->load('Admin');\n\t\tloadCSSFile('admin.css');\n\t\tloadJavascriptFile('admin.js', array(), 'admin_script');\n\n\t\t// The Admin functions require Jquery UI ....\n\t\t$modSettings['jquery_include_ui'] = true;\n\n\t\t// No indexing evil stuff.\n\t\t$context['robot_no_index'] = true;\n\n\t\t// Need these to do much\n\t\trequire_once(SUBSDIR . '/Admin.subs.php');\n\n\t\t// Actually create the menu!\n\t\t$admin_include_data = $this->loadMenu();\n\t\t$this->buildLinktree($admin_include_data);\n\n\t\tcallMenu($admin_include_data);\n\t}", "public function listAdminAction() {\n $dons = $this->getDoctrine()->getManager()->getRepository('EasyDonBundle:Don')->findAll();\n\n return $this->render('EasyDonBundle:Don:listAdmin.html.twig', array('dons' => $dons));\n }", "function printLogList($currentFile)\r\n{\r\n\t// Grab the filenames from the\r\n\t// log directory\r\n\t$recentLogs = array();\r\n\r\n\t$handle = opendir(LACE_LOGDIR);\r\n\twhile ($file = readdir($handle))\r\n\t{\r\n\t\tif($file == '.' || $file == '..' || $file == 'index.php')\r\n\t\t\tcontinue;\r\n\t\t$recentLogs[] = $file;\r\n\t}\r\n\tclosedir($handle);\r\n\r\n\t// Date preparations\r\n\t$today = date('d');\r\n\t$filemtime = filemtime(LACE_LOGFILE);\r\n\t$filedate = date('d', $filemtime);\r\n\r\n\tif ($today == $filedate)\r\n\t\t$day = 'Today';\r\n\telse if (date('d', time()-3600*24) == $filedate)\r\n\t\t$day = 'Yesterday';\r\n\telse\r\n\t\t$day = date('d F', $filemtime);\r\n\r\n\t// Print the list\r\n\t$output = \"<h4>View Logs</h4>\\n\";\r\n\t$output .= '<ul>'.\"\\n\";\r\n\r\n\tif (count($recentLogs) > 0)\r\n\t{\r\n\t\t$class = ($currentFile == LACE_LOGFILE) ? ' class=\"this\"' : '';\r\n\t\t$output .= '<li'.$class.'><a href=\"'.LACE_URL_REL.'logs/\"\r\n\t\t\ttitle=\"View '.$day.'\\'s Log\">'.$day.'</a></li>'.\"\\n\";\r\n\r\n\t\t// We just want the 'date' part of the filenames\r\n\t\t// so we can parse it, and also use it to\r\n\t\t// make pretty URLs\r\n\t\t$currentFile = str_replace('.dat', '', basename($currentFile));\r\n\r\n\t\t// Sort logs most recent first\r\n\t\tsort($recentLogs);\r\n\t\t$recentLogs = array_reverse($recentLogs);\r\n\r\n\t\tforeach($recentLogs as $log)\r\n\t\t{\r\n\t\t\t$log = str_replace('.dat', '', $log);\r\n\r\n\t\t\t// Pick out the date from the filename\r\n\t\t\t$m = substr($log, 0, 2);\r\n\t\t\t$d = substr($log, 2, 2);\r\n\t\t\t$y = substr($log, 4, 4);\r\n\t\t\t$date = date('d F', strtotime(\"$m/$d/$y\"));\r\n\r\n\t\t\t$title = (date('j') - 1 == (int)$d) ? 'Yesterday' : $date;\r\n\t\t\t$class = ($log == $currentFile) ?' class=\"this\"' : '';\r\n\r\n\t\t\t$output .= '<li'.$class.'><a href=\"'.LACE_URL_REL.'logs/';\r\n\t\t\t$output .= LACE_LOGS_DIRIFIED ? $log.'/' : '?date='.$log;\r\n\t\t\t$output .= '\" title=\"View log for '.$title.'\">'.$title.'</a></li>'.\"\\n\";\r\n\t\t}\r\n\t}\r\n\telse\r\n\t\t$output .= '<li>No logs.</li>';\r\n\r\n\t$output .= \"</ul>\\n\";\r\n\r\n\techo $output;\r\n}", "function fileList(){\n\t\tchdir('./../cloud/books/'); //Move to template directory\n\t\t\n\t\tif ($handle = opendir(getcwd())) { //Open dir\n\t\t echo '<ul class=\"list-group\">';\n\t\t while (false !== ($entry = readdir($handle))) { //While directory not end - return files list\n\t\t \tif ($entry != \".\" && $entry != \".DS_Store\" && $entry != \"..\") { //Filter trash\n\t\t \t\tif(is_dir($entry)){ //IF dir then return button with folder icon \n\t\t \t\t\techo '<a href=\"#\" class=\"list-group-item cat\"><i class=\"fa fa-folder-o\" aria-hidden=\"true\"></i> '.$entry.'</a>';\n\t\t \t\t}else{ //else return file button\n\t\t \t\t\t$FileInfo = new SplFileInfo($entry); //Get file info\n\t\t \t\t\t$ext = $FileInfo->getExtension(); //Get file extension\n\t\t \t\t\tif($ext == \"png\" or $ext == \"jpg\" or $ext == \"bmp\") //IF file is image then return button with image icon\n\t\t \t\t\t\techo '<a href=\"/files/cloud/books/'.$entry.'\" class=\"list-group-item file\"><i class=\"fa fa-file-image-o\" aria-hidden=\"true\"></i> '.$entry.'</a>';\n\t\t \t\t\telse //Else return button with file-code icon\n\t\t \t\t\t\techo '<a href=\"/files/cloud/books/'.$entry.'\" class=\"list-group-item file\"><i class=\"fa fa-file-o\" aria-hidden=\"true\"></i> '.$entry.'</a>';\n\t\t \t\t}\n\t\t \t}\n\t\t }\n\t\t echo '</ul>';\n\t\t closedir($handle); //Close dir\n\t\t}\n\t}", "function calendar_files()\n\t{\t\t\n\t\techo '\n\t\t\t\t<link type=\"text/css\" href=\"'.SITEPATH.'/administrator/calendar/themes/base/jquery.ui.all.css\" rel=\"stylesheet\" />\n\t\t\t\t<script type=\"text/javascript\" src=\"'.SITEPATH.'/administrator/calendar/jquery-1.4.2.js\"></script>\n\t\t\t\t<script type=\"text/javascript\" src=\"'.SITEPATH.'/administrator/calendar/ui/jquery.ui.core.js\"></script>\n\t\t\t\t<script type=\"text/javascript\" src=\"'.SITEPATH.'/administrator/calendar/ui/jquery.ui.widget.js\"></script>\n\t\t\t\t<script type=\"text/javascript\" src=\"'.SITEPATH.'/administrator/calendar/ui/jquery.ui.datepicker.js\"></script>\n\t\t\t\t<link type=\"text/css\" href=\"'.SITEPATH.'/administrator/calendar/demos.css\" rel=\"stylesheet\" />\n\t\t';\n\t}", "public function getLocalExtListFile() {}", "private function load_admin_scripts() {\n\n\t}", "public function adminViewFileEdits()\r\n\t{\r\n\t\treturn false;\r\n\t}", "public function addAdminAssets() {}", "function list_dir($chdir) {\r\n\t/* some globals, some cleaning */\r\n\tglobal $root, $prefix, $PHP_SELF, $SERVER_NAME, $showsize, $display, $excludedir, $excludefile;\r\n\tunset($sdirs);\r\n\tunset($sfiles);\r\n\tchdir($chdir);\r\n\t$self = basename($PHP_SELF);\r\n\r\n\t/* open current directory */\r\n\t$handle = opendir('.');\r\n\t/* read directory. If the item is a directory, place it in $sdirs, if it's a filetype we want\r\n\t * and not this file, put it in $sfiles */\r\n\twhile ($file = readdir($handle))\r\n\t{\r\n\t\tif(is_dir($file) && $file != \".\" && $file != \"..\" && !in_array($file, $excludedir))\r\n\t\t{ $sdirs[] = $file; }\r\n\t\telseif(is_file($file) && $file != \"$self\" && array_key_exists(get_extension($file), $display)\r\n\t\t\t&& !in_array($file, $excludefile))\r\n\t\t{ $sfiles[] = $file; }\r\n\t}\r\n\r\n\t/* count the slashes to determine how deep we're in the directory tree and how many\r\n\t * nice bars we need to add */\r\n\t$dir = getcwd();\r\n\t$dir1 = str_replace($root, \"\", $dir.\"/\");\r\n\t$count = substr_count($dir1, \"/\") + substr_count($dir1, \"\\\\\") - (substr_count($root, \"/\")-1);\r\n\r\n\t/* display directory names and recursively list all of them */\r\n\tif(isset($sdirs) && is_array($sdirs)) {\r\n\t\tsort($sdirs);\r\n\t\treset($sdirs);\r\n\r\n\t\tfor($y=0; $y<sizeof($sdirs); $y++) {\r\n\t\t\techo \"<tr><td>\";\r\n\t\t\tfor($z=1; $z<=$count; $z++)\r\n\t\t \t{ echo \"<img align=absmiddle src=comu/sitemap/vertical.gif>&nbsp;&nbsp;&nbsp;\"; }\r\n\t\t\tif((isset($sfiles) && is_array($sfiles)) || $y<sizeof($sdirs)-1)\r\n\t\t\t{ echo \"<img align=absmiddle src=comu/sitemap/verhor.gif>\"; }\r\n\t\t\telse\r\n\t\t\t{ echo \"<img align=absmiddle src=comu/sitemap/verhor1.gif>\"; }\r\n\t\t\techo \"<img align=absmiddle src=comu/sitemap/folder.gif> <a href=\\\"http://$SERVER_NAME$prefix/$dir1$sdirs[$y]\\\" target=\\\"_blank\\\" class=\\\"blau10b\\\">$sdirs[$y]</a>\";\r\n\t\t\tlist_dir($dir.\"/\".$sdirs[$y]);\r\n\t\t}\r\n\t}\r\n\r\n\tchdir($chdir);\r\n\r\n\t/* iterate through the array of files and display them */\r\n\tif(isset($sfiles) && is_array($sfiles)) {\r\n\t\tsort($sfiles);\r\n\t\treset($sfiles);\r\n\r\n\t\t$sizeof = sizeof($sfiles);\r\n\r\n\t\t/* what file types shall be displayed? */\r\n\t\tfor($y=0; $y<$sizeof; $y++) {\r\n\t\t\techo \"<tr><td>\";\r\n\t\t\tfor($z=1; $z<=$count; $z++)\r\n\t\t\t{ echo \"<img align=absmiddle src=comu/sitemap/vertical.gif>&nbsp;&nbsp;&nbsp;\"; }\r\n\t\t\tif($y == ($sizeof -1))\r\n\t\t\t{ echo \"<img align=absmiddle src=comu/sitemap/verhor1.gif>\"; }\r\n\t\t\telse\r\n\t\t\t{ echo \"<img align=absmiddle src=comu/sitemap/verhor.gif>\"; }\r\n\t\t\techo \"<img align=absmiddle src=comu/sitemap/\";\r\n\t\t\techo $display[get_extension($sfiles[$y])];\r\n\t\t\techo \"> \";\r\n\r\n\r\n\t\t\t\t$valorlink=\"$prefix/$dir1$sfiles[$y]\";\r\n\t\t\t\t//echo \"<a href=\\\"$valorlink\\\" class=\\\"blau10\\\" target=\\\"_blank\\\">$sfiles[$y]</a>\";\r\n\t\t\t\techo '<a href=\"#\" class=\"blau10\" onclick=\"OpenFile(\\''.$valorlink.'\\');return false;\">'.$sfiles[$y].'</a>';\r\n\r\n\t\t\t/*if (!isset($_GET['nocopy'])) {\r\n\t\t\t\t//per copiar link\r\n\t\t\t\techo \"<input type=hidden name=\\\"$dir1$sfiles[$y]\\\" id=\\\"$dir1$sfiles[$y]\\\" value=\\\"$valorlink\\\">\";\r\n\t\t\t\techo \"&nbsp;&nbsp;&nbsp;<a href=\\\"javascript:CopyClipboard('$dir1$sfiles[$y]')\\\" title=\\\"copiar el vincle al portapapers\\\">copiar vincle</a>\";\r\n\t\t\t\t//fi\r\n\t\t\t}*/\r\n\r\n\t\t\tif($showsize) {\r\n\t\t\t\t$fsize = @filesize($sfiles[$y])/1024;\r\n\t\t\t\tprintf(\" (%.2f kB)\", $fsize);\r\n\t\t\t}\r\n\t\t\techo \"</td></tr>\";\r\n\r\n\r\n\r\n\t\t}\r\n\t\techo \"<tr><td>\";\r\n\t\tfor($z=1; $z<=$count; $z++)\r\n\t\t{ echo \"<img align=absmiddle src=comu/sitemap/vertical.gif>&nbsp;&nbsp;&nbsp;\"; }\r\n\t\techo \"</td></tr>\\n\";\r\n\t}\r\n}", "public function index()\n {\n $number_of_items = $this->calculate->getTotalOfItemsAdmin();\n if (null != $this->request->ifParameter(\"id\")) {\n $items_current_page = $this->request->getParameter(\"id\");\n } else {\n $items_current_page = 1;\n }\n $items = $this->item->getItemsForAdmin($items_current_page);\n $page_previous_items = $items_current_page - 1;\n $page_next_items = $items_current_page + 1;\n $number_of_items_pages = $this->calculate->getNumberOfPagesOfExtAdmin();\n $this->generateadminView(array(\n 'items' => $items,\n 'number_of_items' => $number_of_items,\n 'items_current_page' => $items_current_page,\n 'page_previous_items' => $page_previous_items,\n 'page_next_items' => $page_next_items,\n 'number_of_items_pages' => $number_of_items_pages\n ));\n }", "public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/wiki_sync.php',\n '_tests/tests/unit_tests/wiki_sync.php',\n 'lang_custom/EN/wiki_sync.ini',\n 'sources_custom/wiki_sync.php',\n 'sources_custom/hooks/systems/config/wiki_alt_changes_link_stub.php',\n 'sources_custom/hooks/systems/config/wiki_enable_git_sync.php',\n 'sources_custom/hooks/systems/config/wiki_enable_wysiwyg.php',\n 'sources_custom/hooks/systems/config/wiki_sync_media_directory.php',\n 'sources_custom/hooks/systems/config/wiki_sync_page_directory.php',\n 'sources_custom/hooks/systems/cron/wiki_sync_git.php',\n 'sources_custom/hooks/systems/notifications/wiki_failed_git_pull.php',\n 'sources_custom/wiki.php',\n 'site/pages/modules_custom/wiki.php',\n 'cms/pages/modules_custom/cms_wiki.php',\n );\n }", "public function generate_filelist_preview() : void {\n CrawlQueue::truncate();\n DeployQueue::truncate();\n\n $initial_file_list_count =\n FilesHelper::buildInitialFileList(\n true,\n SiteInfo::getPath( 'uploads' ),\n $this->settings\n );\n\n if ( $initial_file_list_count < 1 ) {\n $err = 'Initial file list unable to be generated';\n http_response_code( 500 );\n echo $err;\n WsLog::l( $err );\n throw new WP2StaticException( $err );\n }\n\n $via_ui = filter_input( INPUT_POST, 'ajax_action' );\n\n if ( is_string( $via_ui ) ) {\n echo $initial_file_list_count;\n }\n }", "public function getProjectAdminList() {\n\t\treturn $this->getProjectDao()->getProjectAdminList();\n\t}", "public function files();", "public function files();", "public function files();", "public function listApplicationFiles() {\r\n\t\t$preload = array(\r\n\t\t\t\"config/main.js\"\r\n\t\t);\r\n\t\t\r\n\t\t$return = array();\r\n\t\t$fullPath = $this->applicationPath;\r\n\t\r\n\t\tforeach($preload as $file) {\r\n\t\t\t$return[] = $fullPath.\"/\".$file;\r\n\t\t}\r\n\t\t\r\n\t\t$options = array(\r\n\t\t\t\"fileTypes\" => array(\"js\"),\r\n\t\t\t\"exclude\" => array_merge($preload, array(\r\n\t\t\t\t\"data\", \"messages\", \"compiled.js\"\r\n\t\t\t))\r\n\t\t);\r\n\t\t\r\n\t\t$return = array_merge($return, CFileHelper::findFiles($fullPath,$options));\r\n\t\t\r\n\t\t\r\n\t\treturn $return;\r\n\t}", "public static function getAdminList()\n {\n \t$type = \"text/html\";\n \t$terms = array(\n \t\t\t'isapproved' => 1\n \t);\n \t$data = self::getListByFilter($terms);\n \n \treturn response()->view('adminlist', [ 'data' => $data, 'isadmin' => self::isAdmin()])->header('Content-Type', $type);\n }", "public function all()\n {\n if (!$this->isLogged())\n {\n header('Location: ' . ROOT_URL);\n exit; \n }\n else{\n\n $this->oUtil->oAdd_Admins = $this->oModel->getAll();\n\n $this->oUtil->getView('admin');\n }\n }", "public function allAdminList(){\n $result = $this->adminModel->getAllAdmin();\n foreach ($result as $row){\n $data[] = array('AdminID'=>$row->adminID,'Email'=>$row->email,'role'=>$row->type,\n );\n }\n $this->view('admins/allAdminList',$data);\n\n }", "function listBackupFiles( ){\n global $lang, $config;\n\n if( !is_dir( 'files/backup/' ) )\n return null;\n\n foreach( new DirectoryIterator( 'files/backup/' ) as $oFileDir ) {\n if( $oFileDir->isFile( ) && strstr( $oFileDir->getFilename( ), '.zip' ) ){\n $aFiles[] = $oFileDir->getFilename( );\n }\n } // end foreach\n\n $content = null;\n if( isset( $aFiles ) ){\n rsort( $aFiles );\n $iCount = count( $aFiles );\n for( $i = 0; $i < $iCount; $i++ ){\n $content .= '<tr class=\"l'.( ( $i % 2 ) ? 0: 1 ).'\"><th class=\"name\">'.$aFiles[$i].'</th><td class=\"date\">'.substr( $aFiles[$i], 7, 10 ).' '.str_replace( '-', ':', substr( $aFiles[$i], 18, 5 ) ).'</td><td class=\"size\">'.sprintf( '%01.2f', ( ( filesize( 'files/backup/'.$aFiles[$i] ) / 1024 ) ) ).' KB</td><td class=\"options\">'.( !isset( $config['disable_backup_restore'] ) ? '<a href=\"?p=backup&amp;sOption=restore&amp;sFile='.$aFiles[$i].'\" class=\"restore\" onclick=\"return confirm( aQuick.sConfirmShure );\">'.$lang['Backup_restore'].'</a> ' : null ).'<a href=\"?p=backup&amp;sItemDelete='.$aFiles[$i].'\" class=\"delete\" onclick=\"return del( this )\">'.$lang['Delete'].'</a></td></tr>';\n } // end for\n }\n\n if( isset( $content ) )\n return $content;\n}", "public function adminMenu() {\n add_submenu_page(\n 'tools.php',\n self::NAME,\n self::NAME,\n 'import',\n __CLASS__ . '_opt_menu',\n array(&$this, 'showBackupPage')\n );\n }", "public function actions() {\r\n\t\treturn array(\r\n\t\t\t\"browseFiles\" => array(\r\n\t\t\t\t\"class\" => \"packages.fileManager.actions.ABrowseDirectoryAction\",\r\n\t\t\t\t\"basePath\" => array(\r\n\t\t\t\t\t\tYii::getPathOfAlias(\"application\"),\r\n\t\t\t\t\t\tYii::getPathOfAlias(\"webroot\"),\r\n\t\t\t\t\t)\r\n\t\t\t)\r\n\t\t);\r\n\t}", "function listDir() {\n\t\t$header = $this->getHeader($this->_pageId);\n\t\t$output = \"\n\t\t\t<h1>$header</h1>\n\t\t\";\n\t\t$lp = $this->listPages();\n\t\tif ($lp == \"empty\") {\n\t\t\t$output .= \"<p><i>Denne mappen er tom eller den inneholder bare bilder.</i></p>\";\n\t\t} else if ($lp == \"hidden\") {\n\t\t\tif ($this->isLoggedIn()) {\n\t\t\t\t$output .= \"<p><i>Beklager, denne mappen inneholder kun skjulte elementer.</i></p>\";\n\t\t\t} else {\n\t\t\t\t$output = innlogging::printNoAccessNotLoggedInDlg();\n\t\t\t}\n\t\t} else {\n\t\t\t$output .= $lp;\n\t\t}\n\t\t/*\n\t\t$li = $this->listImages();\n\t\t$li = \"empty\";\n\t\tif (($lp == \"empty\") && ($li == \"empty\")){\n\t\t\tprint \"<p><i>Mappen er tom</i></p>\";\n\t\t}\n\t\t*/\n\t\t//$this->notSoFatalError(\"Denne mappen har ingen index-side.\");\n\t\treturn $output;\n\t}", "public function listViewName() { return ContentServiceProvider::NAME.\"::admin.list\"; }", "function readLists() {\n\n\t\t// get lists file name\n\t\t$adminops_file = $this->settings['adminops_file'];\n\n\t\tif ($lists = $this->xml_parser->parseXml($adminops_file, true, true)) {\n\t\t\t// read the XML structure into arrays\n\t\t\t$this->titles = $lists['LISTS']['TITLES'][0];\n\n\t\t\tif (is_array($lists['LISTS']['ADMINS'][0])) {\n\t\t\t\t$this->admin_list = $lists['LISTS']['ADMINS'][0];\n\t\t\t\t// check admin list consistency\n\t\t\t\tif (empty($this->admin_list['IPADDRESS'])) {\n\t\t\t\t\t// fill <ipaddress> list to same length as <tmlogin> list\n\t\t\t\t\tif (($cnt = count($this->admin_list['TMLOGIN'])) > 0)\n\t\t\t\t\t\t$this->admin_list['IPADDRESS'] = array_fill(0, $cnt, '');\n\t\t\t\t} else {\n\t\t\t\t\tif (count($this->admin_list['TMLOGIN']) != count($this->admin_list['IPADDRESS']))\n\t\t\t\t\t\ttrigger_error(\"Admin mismatch between <tmlogin>'s and <ipaddress>'s!\", E_USER_WARNING);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (is_array($lists['LISTS']['OPERATORS'][0])) {\n\t\t\t\t$this->operator_list = $lists['LISTS']['OPERATORS'][0];\n\t\t\t\t// check operator list consistency\n\t\t\t\tif (empty($this->operator_list['IPADDRESS'])) {\n\t\t\t\t\t// fill <ipaddress> list to same length as <tmlogin> list\n\t\t\t\t\tif (($cnt = count($this->operator_list['TMLOGIN'])) > 0)\n\t\t\t\t\t\t$this->operator_list['IPADDRESS'] = array_fill(0, $cnt, '');\n\t\t\t\t} else {\n\t\t\t\t\tif (count($this->operator_list['TMLOGIN']) != count($this->operator_list['IPADDRESS']))\n\t\t\t\t\t\ttrigger_error(\"Operators mismatch between <tmlogin>'s and <ipaddress>'s!\", E_USER_WARNING);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->adm_abilities = $lists['LISTS']['ADMIN_ABILITIES'][0];\n\t\t\t$this->op_abilities = $lists['LISTS']['OPERATOR_ABILITIES'][0];\n\n\t\t\t// convert strings to booleans\n\t\t\tforeach ($this->adm_abilities as $ability => $value) {\n\t\t\t\tif (strtoupper($value[0]) == 'TRUE') {\n\t\t\t\t\t$this->adm_abilities[$ability][0] = true;\n\t\t\t\t} else {\n\t\t\t\t\t$this->adm_abilities[$ability][0] = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tforeach ($this->op_abilities as $ability => $value) {\n\t\t\t\tif (strtoupper($value[0]) == 'TRUE') {\n\t\t\t\t\t$this->op_abilities[$ability][0] = true;\n\t\t\t\t} else {\n\t\t\t\t\t$this->op_abilities[$ability][0] = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\t// could not parse XML file\n\t\t\ttrigger_error('Could not read/parse adminops file ' . $adminops_file . ' !', E_USER_WARNING);\n\t\t\treturn false;\n\t\t}\n\t}", "function adminUsers()\n {\n $userLogged = Auth::check(['administrateur']);\n \n $userManager = new UserManager();\n $listUsers = $userManager->getListUsers();\n require'../app/Views/backViews/user/backAdminUsersView.php';\n }", "protected function processChangedAndNewFiles() {}", "private function set_files()\n\t\t{\n\t\t\t$this->files = Filesystem::ls(PATH_POSTS, '*', 'xml', false, false, true);\n\t\t\t$this->files_count = count( $this->files );\n\t\t}", "public function publishModulesMigrationsFiles()\n {\n foreach (ModulesConfig::getModulesNames() as $moduleName) {\n $this->publishModuleMigrationsFiles($moduleName);\n }\n }", "public function listAllActions() {\n\t\t$controleurs = [];\n\t\t// on liste les controleurs disponibles\n\t\t$path = './Controleur';\n\t\t$files = scandir($path);\n\t\t$files = array_diff(scandir($path), array('.', '..'));\n\t\tforeach ($files as $file){\n\t\t\tif(is_file('./Controleur/'.$file)){\n\t\t\t\tinclude_once './Controleur/'.$file;\n\t\t\t\t$class_name=str_replace(\".php\",\"\",$file);\n\t\t\t\t$array_tmp = array_diff(get_class_methods($class_name),array('__construct','clean','setRequete','executerAction' ));\n\t\t\t\t$array_tmp = array_combine($array_tmp, $array_tmp);\n\t\t\t\tforeach ($array_tmp as $value =>$key):\n\t\t\t\t\t$array_tmp[$value] = [];\n\t\t\t\t\t$array_tmp[$value]['name'] = $key;\n\t\t\t\t\t$array_tmp[$value]['isActive'] = 0;\n\t\t\t\t\t$array_tmp[$value]['id'] = 0;\n\t\t\t\tendforeach;\n\t\t\t\t$controleurs[$class_name]=$array_tmp;\t\t\t\n\t\t\t}\n\t\t}\n\t\t$allControleurs = $this->checkActionInDb($controleurs);\n\t\treturn $allControleurs;\n }", "public function indexAdmin ()\n {\n $listOfUsers = $this->userRequest->usersIndexForAdmin();\n return $listOfUsers;\n }", "public function getList() {\n\t\treturn Cgn_Module_Manager_File::getListStatic();\n\t}", "public function getDataFilesList(){\r\n $data_dir = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Data';\r\n $files = scandir($data_dir);\r\n\r\n $files_list = array();\r\n $index = 0;\r\n foreach ($files as $file) {\r\n if($file != '.' && $file != '..'){\r\n $files_list[$index]['name'] = $file;\r\n $files_list[$index]['update_time'] = filemtime($data_dir . DIRECTORY_SEPARATOR . $file);\r\n $files_list[$index]['type'] = $this->getFileType($file);\r\n $index++;\r\n }\r\n }\r\n\r\n $update_times = array();\r\n foreach($files_list as $data){\r\n $update_times[] = $data['update_time'];\r\n }\r\n array_multisort($update_times, SORT_DESC, $files_list);\r\n return $files_list;\r\n }", "public function listInscriptionFiles(){\n $req = $this->db->query('SELECT file_url, title_file FROM admin_files');\n $req->setFetchMode(\\PDO::FETCH_CLASS | \\PDO::FETCH_PROPS_LATE, \n 'taekwondo\\model\\FileAdmin');\n return $req;\n }", "public function afficherListeDossier() \n {\n //sécurité\n $action = 'listAllFolder';\n $error = AccessControll::checkRight($action);\n if ( empty($error) ){ //ok\n $dossier = DossierManager::getAll();\n $prez = DossierHtml::toHtml($dossier);\n } else{ //pas ok\n $prez = HomeHtml::toHtml($error);\n }\n $this->response->setPart('contenu', $prez);\n }", "public function publishFiles()\n {\n\n $dir = __DIR__;\n\n // config\n $this->publishes([\n $dir . '/../config/permissions.php' => config_path('permissions.php'),\n ], 'config-role');\n\n /**\n * Database\n */\n $migration_path = database_path('migrations/');\n $seeds_path = database_path('seeds/');\n\n // migrations\n $this->publishes([\n $dir . '/../database/migrations/create_roles_table.php.stub' => $migration_path . date('Y_m_d_His', time()) . '_create_roles_table.php',\n $dir . '/../database/migrations/create_role_user_table.php.stub' => $migration_path . date('Y_m_d_His', time()) . '_create_role_user_table.php',\n ], 'migrations-role');\n\n // seeds\n $this->publishes([\n $dir . '/../database/seeds/RoleTableSeeder.php.stub' => $seeds_path . 'RoleTableSeeder.php',\n ], 'seeder-role');\n }", "private static function defaultFiles($dir){\n\n //gerando o model\n $model = \"<?php\\nnamespace modules\\\\\".strtolower(self::$pathName).\"\\\\model;\\n\\nclass \".self::$pathName.\"s implements \\\\libs\\\\database\\\\model\\n{\\n\\tpublic function create()\\n\\t{\\n\\t\\treturn array(\\n\\n);\\t\\n}\\n}\\n\";\n \\libs\\kernel\\File::newFile($dir.\"/model/\".self::$pathName.\"s.php\", $model);\n \n \n //gerando o controller\n $controller = \"<?php\\nnamespace modules\\\\\".strtolower(self::$pathName).\"\\\\controller;\\nuse \\\\libs\\\\kernel\\\\ControllerBase as CB;\\n\\nclass Controller\".self::$pathName.\" extends CB{\\n\\n\\tpublic function index(\\$app, \\$response){\\n // resposta que vem do servidor => \\$response. \\n // url onde esta o arquivo que vai ser renderizado. \\n // argumento a serem passados para a pagina. => \\$args \\n\\n return \\$app->view->render(\\$response, \\\"/\".ucfirst(self::$pathName).\"/index.php\\\");\\n\\t}\\n}\";\n \\libs\\kernel\\File::newFile($dir.\"/controller/Controller\".self::$pathName.\".php\", $controller);\n\n //gerando o manifest json\n $manifestJson = \"{\\n\\\"dad\\\": \\\"this\\\",\\n\\\"dadsName\\\": \\\"master\\\",\\n\\\"acessLevel\\\": \\\"0\\\",\\n\\\"title\\\": \\\"\".self::$pathName.\"\\\",\\n\\\"url\\\": \".strtolower(self::$pathName).\"\\\",\\n\\\"submenu\\\": []\\n}\";\n \\libs\\kernel\\File::newFile($dir.\"/manifest.json\", $manifestJson);\n \n \n //gerando o index\n \\libs\\kernel\\File::newFile($dir.\"/index.php\", \"\");\n }", "function ms_deprecated_blogs_file() {}", "public function adminIndexList()\n {\n return view('admin.list.index');\n }", "protected function getFileList()\n\t\t{\n\t\t\t$dirname=opendir($this->ruta);\n\t\t\t$files=scandir($this->ruta);\n\t\t\tclosedir ($dirname);\t\n\t\t\t\n\t\t\treturn $files;\t\t\n\t\t}", "function findAllAdministrators() {\r\n\r\n\t\treturn ($this->query('SELECT * FROM admins;'));\r\n\r\n\t}", "function listFiles ($dir)\n{\n global $filetype1, $PHP_SELF;\n if ($dir)\n { \n $file_extension = '.php';\n $d = dir($dir);\n while ($file = $d->read()){ \n $file_array[$file]=$file;\n foreach ( $file_array as $file){\n while (false !== ($entry = $d->read())) {\n // echo $entry.\"<br> \\n\";\n // echo substr($entry, strrpos($entry, '.'));\n if (substr($entry, strrpos($entry, '.')) == $file_extension){\n echo '<tr><td class=\"smallText\">' . ' <a href=\"' . tep_href_link(FILENAME_EDIT_TEXT, '&action=edit&filename=' . $entry) . '\" title=\"' . $entry . '\">' . ($entry) . '</a></td></tr>' . \"\\n\";\n }\n }\n } \n }\n $d->close();\n }\n}", "public function action_index()\n\t{\n\t\tif ( ! Auth::instance()->logged_in('admin'))\n\t\t\tthrow new HTTP_Exception_403();\n\t\t\n\t\t// show admin page\n\t\t$companies = ORM::factory('company')->find_all();\n\t\t$this->template->content = View::factory('admin/admin')->bind('companies', $companies);\n\t\t\n\t}", "public function updateExtList() {}", "public function refreshLanguageFileListAction() {\n\t\t$this->clearSelectOptionsCache('extensionAndLangFileOptions');\n\t\t$this->redirect('manageBackups');\n\t}", "private function set_files_by_published()\n\t\t{\n\t\t\t$this->files = Filesystem::ls(PATH_POSTS, '*.*.*.*.NULL.*.*.*.*.*.*', 'xml', false, false, true);\n\t\t\t$this->files_count = count( $this->files );\n\t\t}", "function deployment_admin_init() {\n\n\t// What is the current version of this plugin?\n\t$deployment_version = 3;\n\n\t// What is the current version in the db\n\t$db_version = get_option( 'deployment_version', 0 );\n\n\t// Is the db out of date?\n\tif ( $db_version < $deployment_version ) {\n\n\t\t// If so, loop over all subsequent version numbers and attempt to run corresponding deployment_update_N functions\n\t\tfor ( $version = $db_version + 1; $version <= $deployment_version; $version ++ ) {\n\t\t\tif ( function_exists( 'deployment_update_' . $version ) ) {\n\t\t\t\t$success = call_user_func( 'deployment_update_' . $version );\n\n\t\t\t\t// If the function returns a boolean false, log an error and bail out. Subsequent updates may rely on this update\n\t\t\t\t// so we shouldn't proceed any further.\n\t\t\t\tif ( $success === FALSE ) {\n\t\t\t\t\t// @TODO: log error here\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If we've reached this far without error, update the db version\n\t\t\tupdate_option( 'deployment_version', $version );\n\t\t}\n\n\t\t// @TODO: output update summary on success\n\t}\n}", "public function index()\n\t{\n\t\t$module = Module::get('Uploads');\n\t\t\n\t\tif(Module::hasAccess($module->id)) {\n\t\t\treturn View('la.uploads.index', [\n\t\t\t\t'show_actions' => $this->show_action,\n\t\t\t\t'listing_cols' => $this->listing_cols,\n\t\t\t\t'module' => $module\n\t\t\t]);\n\t\t} else {\n return redirect(config('laraadmin.adminRoute').\"/\");\n }\n\t}", "public function index()\n\t{\n\t\t$module = Module::get('Uploads');\n\t\t\n\t\tif(Module::hasAccess($module->id)) {\n\t\t\treturn View('la.uploads.index', [\n\t\t\t\t'show_actions' => $this->show_action,\n\t\t\t\t'listing_cols' => $this->listing_cols,\n\t\t\t\t'module' => $module\n\t\t\t]);\n\t\t} else {\n return redirect(config('laraadmin.adminRoute').\"/\");\n }\n\t}", "public function file_backups()\n {\n \n $backup = $this->services['backups'];\n $backups = $backup->setBackupPath($this->settings['working_directory'])->getAllBackups($this->settings['storage_details']);\n $backup_meta = $backup->getBackupMeta($backups);\n \n $variables = array(\n 'settings' => $this->settings,\n 'backup_meta' => $backup_meta,\n 'backups' => $backups,\n 'errors' => $this->errors,\n 'menu_data' => ee()->backup_pro->get_dashboard_view_menu(),\n 'method' => $this->platform->getPost('method')\n );\n\n ee()->jquery->tablesorter('#file_backups table', '{headers: {8: {sorter: false}, 0: {sorter: false}, 1: {sorter: false}, 2: {sorter: false}, 3: {sorter: false}}, widgets: [\"zebra\"], sortList: [[4,1]]}');\n ee()->javascript->compile();\n \n return array(\n 'body' => ee()->load->view('file_backups', $variables, true),\n 'heading' => $this->services['lang']->__('file_backups'),\n 'breadcrumb' => array(\n ee('CP/URL', 'addons/settings/backup_pro')->compile() => lang('backup_pro_module_name'),\n ee('CP/URL', 'addons/settings/backup_pro/index')->compile() => lang('home_bp_dashboard_menu')\n )\n );\n }", "protected function FetchExporterList()\n\t{\n\t\t$exporterRoot = APP_ROOT.\"/includes/converter/exporters/\";\n\t\t$files = scandir($exporterRoot);\n\n\t\tforeach($files as $file) {\n\t\t\tif(!is_file($exporterRoot.$file) || isc_substr($file, -3) != \"php\") {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\trequire_once $exporterRoot.$file;\n\t\t\t$file = isc_substr($file, 0, isc_strlen($file)-4);\n\t\t\t$className = \"ISC_ADMIN_EXPORTER_\".isc_strtoupper($file);\n\t\t\tif(!class_exists($className)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$exporter = new $className;\n\t\t\t$exporters[$file] = array(\n\t\t\t\t\"title\" => $exporter->title,\n\t\t\t\t\"configuration\" => \"\"\n\t\t\t);\n\t\t\tif(method_exists($exporter, \"Configure\")) {\n\t\t\t\t$exporters[$file]['configuration'] = $exporter->Configure();\n\t\t\t}\n\t\t}\n\t\treturn $exporters;\n\t}", "public function getBundlesArchiveableByAdmins() {\n return [\n 'basic_landing_page',\n 'centralized_content',\n 'documentation_page',\n 'event_listing',\n 'health_care_local_facility',\n 'health_care_region_page',\n 'health_services_listing',\n 'landing_page',\n 'leadership_listing',\n 'locations_listing',\n 'nca_facility',\n 'office',\n 'page',\n 'press_releases_listing',\n 'publication_listing',\n 'story_listing',\n 'support_service',\n 'va_form',\n 'vamc_operating_status_and_alerts',\n 'vamc_system_policies_page',\n 'vamc_system_register_for_care',\n 'vamc_system_medical_records_offi',\n 'vamc_system_billing_insurance',\n 'vba_facility',\n 'vet_center',\n 'vet_center_locations_list',\n ];\n }", "protected function makeBackupsList() {\n\t\t$backups = array();\n\t\t$metaArray = $this->backupService->getBackupObj()->getMetaInfos(2);\n\t\tif (is_array($metaArray)) {\n\t\t\t$keys = array_keys($metaArray);\n\t\t\tforeach ($keys as $langFile) {\n\t\t\t\tforeach ($metaArray[$langFile] as $fileName => $informations) {\n\t\t\t\t\t$backup = array();\n\n\t\t\t\t\t// get path to filename\n\t\t\t\t\t$backupPath = $informations['pathBackup'];\n\t\t\t\t\t$file = Typo3Lib::fixFilePath(PATH_site . '/' . $backupPath . '/' . $fileName);\n\t\t\t\t\t$origFile = Typo3Lib::fixFilePath(\n\t\t\t\t\t\t$this->session->getDataByKey('extensionSelection') . '/' . $langFile\n\t\t\t\t\t);\n\n\t\t\t\t\t// check state\n\t\t\t\t\tif (!is_file($file)) {\n\t\t\t\t\t\t$backup['state'] = 'function.backupMgr.missing';\n\t\t\t\t\t} elseif (!is_file($origFile)) {\n\t\t\t\t\t\t$backup['state'] = 'lang.file.missing';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$backup['state'] = 'function.backupMgr.ok';\n\t\t\t\t\t}\n\n\t\t\t\t\t$backup['date'] = date('Y-m-d H:i:s', $informations['createdAt']);\n\t\t\t\t\t$backup['langFile'] = $langFile;\n\t\t\t\t\t$backup['fileName'] = $fileName;\n\t\t\t\t\t$backups[] = $backup;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $backups;\n\t}", "public function admin_init() {}", "function archivate_referal_day_stat() {\r\n //$users = $this->CI->pm->get_project_users();\r\n //foreach ($users as $u)\r\n $this->backup_partner_xml();\r\n }" ]
[ "0.6159149", "0.60997367", "0.604208", "0.578313", "0.57729435", "0.57020223", "0.56754524", "0.5642211", "0.5625906", "0.56167734", "0.55953205", "0.5579391", "0.5572567", "0.5568225", "0.5556994", "0.5549812", "0.55435014", "0.5527608", "0.5522776", "0.55180866", "0.54975766", "0.5479753", "0.5478031", "0.5475803", "0.5470296", "0.54687387", "0.5454926", "0.54493695", "0.5441213", "0.5434868", "0.54336435", "0.5422787", "0.54152644", "0.5412413", "0.54102635", "0.53897095", "0.5371927", "0.5369881", "0.5362554", "0.5329098", "0.53231364", "0.5315198", "0.53151923", "0.5312774", "0.5305957", "0.5304797", "0.52974284", "0.5293202", "0.52921444", "0.5275541", "0.5267307", "0.5266698", "0.5263393", "0.5259509", "0.52514005", "0.5246494", "0.52360153", "0.52344525", "0.52344525", "0.52344525", "0.52316195", "0.52246076", "0.5223145", "0.52228856", "0.52215743", "0.5220068", "0.52116275", "0.521137", "0.5210004", "0.52057254", "0.5204064", "0.5198713", "0.51949227", "0.51904714", "0.5186668", "0.5186104", "0.51842755", "0.51833797", "0.51830256", "0.5179157", "0.5169257", "0.51605725", "0.5160502", "0.5156814", "0.51558644", "0.51530737", "0.51509833", "0.5149799", "0.51465887", "0.5142013", "0.514045", "0.51368004", "0.51288354", "0.51288354", "0.5128311", "0.51263034", "0.5125567", "0.5122056", "0.5120852", "0.5115615" ]
0.6809908
0