本文整理汇总了PHP中mw函数的典型用法代码示例。如果您正苦于以下问题:PHP mw函数的具体用法?PHP mw怎么用?PHP mw使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了mw函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: fire
public function fire()
{
$input = array('option_key' => $this->argument('option_key'), 'option_value' => $this->argument('option_value'), 'option_group' => $this->argument('option_group'));
$this->info('Setting option...');
$result = mw()->option_manager->save($input);
$this->info($result);
}
开发者ID:microweber,项目名称:microweber,代码行数:7,代码来源:OptionCommand.php
示例2: __construct
function __construct($app = null)
{
if (!is_object($app)) {
$this->app = mw();
} else {
$this->app = $app;
}
}
开发者ID:hyrmedia,项目名称:microweber,代码行数:8,代码来源:Parser.php
示例3: get_custom_fields
function get_custom_fields($table, $id = 0, $return_full = false, $field_for = false, $debug = false, $field_type = false, $for_session = false)
{
if (isset($table) and intval($table) > 0) {
$id = intval(intval($table));
$table = 'content';
}
return mw()->fields_manager->get($table, $id, $return_full, $field_for, $debug, $field_type, $for_session);
}
开发者ID:Git-Host,项目名称:microweber,代码行数:8,代码来源:custom_fields.php
示例4: run
public function run()
{
Cache::flush();
$this->createSchema();
$this->seed();
Cache::flush();
mw()->modules->install();
}
开发者ID:kamilmiesiac,项目名称:microweber,代码行数:8,代码来源:DbInstaller.php
示例5: mw_print_admin_menu_settings_btn
function mw_print_admin_menu_settings_btn()
{
$active = mw()->url_manager->param('view');
$cls = '';
if ($active == 'settings') {
$cls = ' class="active" ';
}
print '<li' . $cls . '><a href="' . admin_url() . 'view:settings" title="' . _e("Settings", true) . '"><i class="ico inavsettings"></i><span>' . _e("Settings", true) . '</span></a></li>';
}
开发者ID:hyrmedia,项目名称:microweber,代码行数:9,代码来源:functions.php
示例6: __construct
public function __construct($app = null)
{
if (is_object($app)) {
$this->app = $app;
} else {
$this->app = mw();
}
$this->set_table_names();
}
开发者ID:microweber,项目名称:microweber,代码行数:9,代码来源:ContentManagerCrud.php
示例7: hasNoAdmin
private function hasNoAdmin()
{
if (!$this->checkServiceConfig()) {
$this->registerMwClient();
}
if (mw()->url_manager->param('mw_install_create_user')) {
$this->execCreateAdmin();
}
}
开发者ID:newaltcoin,项目名称:microweber,代码行数:9,代码来源:AdminController.php
示例8: __construct
function __construct($app = null)
{
$this->set_table_names();
if (is_object($app)) {
$this->app = $app;
} else {
$this->app = mw();
}
$this->socialite = new SocialiteManager($this->app);
}
开发者ID:kamilmiesiac,项目名称:microweber,代码行数:10,代码来源:UserManager.php
示例9: __construct
public function __construct($app)
{
if (!is_object($this->app)) {
if (is_object($app)) {
$this->app = $app;
} else {
$this->app = mw();
}
}
$this->app->database_manager->build_table($this->table, $this->fields);
}
开发者ID:hyrmedia,项目名称:microweber,代码行数:11,代码来源:Model.php
示例10: __construct
function __construct($app = null)
{
if (!is_object($this->app)) {
if (is_object($app)) {
$this->app = $app;
} else {
$this->app = mw();
}
}
$this->adapter_current = $this->adapter_default = new MicroweberTemplate($app);
}
开发者ID:kamilmiesiac,项目名称:microweber,代码行数:11,代码来源:Template.php
示例11: __construct
function __construct($app = null)
{
if (!is_object($this->app)) {
if (is_object($app)) {
$this->app = $app;
} else {
$this->app = mw();
}
}
$this->adapter = new LaravelCache($app);
}
开发者ID:hyrmedia,项目名称:microweber,代码行数:11,代码来源:CacheManager.php
示例12: testSave
public function testSave()
{
mw()->database_manager->extended_save_set_permission(true);
$has_permission = mw()->database_manager->extended_save_has_permission();
$params = array('title' => 'My post with data fields', 'content_type' => 'post', 'data_hi_there' => 'hello world', 'is_active' => 1);
//saving
$id = save_content($params);
$data_fields = content_data($id);
$this->assertEquals(intval($id) > 0, true);
$this->assertEquals($data_fields['hi_there'], "hello world");
$this->assertEquals(true, $has_permission);
}
开发者ID:hyrmedia,项目名称:microweber,代码行数:12,代码来源:DataFieldsTest.php
示例13: testSaveDataFields
public function testSaveDataFields()
{
mw()->database_manager->extended_save_set_permission(true);
$val = 'hello there custom 1-' . rand();
$val2 = 'hello there custom 2-' . rand();
$params = array('title' => 'My post with data attributes 1', 'content_type' => 'post', 'data_fields_something_custom' => $val, 'data_fields_something_else_custom' => $val2, 'is_active' => 1);
$id = save_content($params);
$attributes = content_data($id);
$this->assertEquals(intval($id) > 0, true);
$this->assertEquals($attributes['something_custom'], $val);
$this->assertEquals($attributes['something_else_custom'], $val2);
}
开发者ID:microweber,项目名称:microweber,代码行数:12,代码来源:DataFieldsTest.php
示例14: delete
function delete($data)
{
$adm = is_admin();
if ($adm == false) {
error('Error: not logged in as admin.' . __FILE__ . __LINE__);
}
if (isset($data['id'])) {
$c_id = intval($data['id']);
mw()->database_manager->delete_by_id($this->table, $c_id);
//d($c_id);
}
}
开发者ID:newaltcoin,项目名称:microweber,代码行数:12,代码来源:shipping_api.php
示例15: __construct
function __construct($app = null)
{
if (!is_object($this->app)) {
if (is_object($app)) {
$this->app = $app;
} else {
$this->app = mw();
}
}
if (!is_object($this->adapter)) {
$this->adapter = new Adapters\Http\Guzzle($app);
}
}
开发者ID:hyrmedia,项目名称:microweber,代码行数:13,代码来源:Http.php
示例16: __construct
function __construct($app = null)
{
if (is_object($app)) {
$this->app = $app;
} else {
$this->app = mw();
}
$tables['cart'] = 'cart';
$tables['cart_orders'] = 'cart_orders';
$tables['cart_shipping'] = 'cart_shipping';
$tables['cart_taxes'] = 'cart_taxes';
$this->tables = $tables;
}
开发者ID:biggtfish,项目名称:microweber,代码行数:13,代码来源:CheckoutManager.php
示例17: __construct
function __construct($app = null)
{
if (defined("INI_SYSTEM_CHECK_DISABLED") == false) {
define("INI_SYSTEM_CHECK_DISABLED", ini_get('disable_functions'));
}
if (!is_object($this->app)) {
if (is_object($app)) {
$this->app = $app;
} else {
$this->app = mw();
}
}
}
开发者ID:Git-Host,项目名称:microweber,代码行数:13,代码来源:NotificationsManager.php
示例18: __construct
function __construct($app = null)
{
if (!is_object($this->app)) {
if (is_object($app)) {
$this->app = $app;
} else {
$this->app = mw();
}
}
$this->views_dir = dirname(__DIR__) . DS . 'views' . DS;
$this->provider = $this->app->content_manager;
$this->category_provider = $this->app->category_manager;
$is_admin = $this->app->user_manager->admin_access();
}
开发者ID:newaltcoin,项目名称:microweber,代码行数:14,代码来源:Edit.php
示例19: make_white_label
function make_white_label()
{
$settings = get_white_label_config();
if (isset($settings['logo_admin']) and trim($settings['logo_admin']) != '') {
$logo_admin = $settings['logo_admin'];
mw()->ui->admin_logo = $logo_admin;
}
if (isset($settings['logo_live_edit']) and trim($settings['logo_live_edit']) != '') {
$logo_live_edit = $settings['logo_live_edit'];
mw()->ui->logo_live_edit = $logo_live_edit;
}
if (isset($settings['logo_login']) and trim($settings['logo_login']) != '') {
$logo_login = $settings['logo_login'];
mw()->ui->admin_logo_login = $logo_login;
}
if (isset($settings['admin_logo_login_link']) and trim($settings['admin_logo_login_link']) != '') {
$logo_login = $settings['admin_logo_login_link'];
mw()->ui->admin_logo_login_link = $logo_login;
}
if (isset($settings['powered_by']) and $settings['powered_by'] != false) {
$powered_by = $settings['powered_by'];
mw()->ui->powered_by = $powered_by;
}
if (isset($settings['powered_by_link']) and $settings['powered_by_link'] != false) {
$powered_by_link = $settings['powered_by_link'];
mw()->ui->powered_by_link = $powered_by_link;
}
if (isset($settings['brand_name']) and $settings['brand_name'] != false) {
$brand_name = $settings['brand_name'];
mw()->ui->brand_name = $brand_name;
}
if (isset($settings['enable_service_links'])) {
mw()->ui->enable_service_links = $settings['enable_service_links'];
}
if (isset($settings['disable_marketplace'])) {
mw()->ui->disable_marketplace = $settings['disable_marketplace'];
}
if (isset($settings['disable_powered_by_link']) and intval($settings['disable_powered_by_link']) != 0) {
mw()->ui->disable_powered_by_link = true;
}
if (isset($settings['marketplace_provider_id']) and trim($settings['marketplace_provider_id']) != false) {
mw()->ui->marketplace_provider_id = trim($settings['marketplace_provider_id']);
}
if (isset($settings['marketplace_access_code']) and trim($settings['marketplace_access_code']) != false) {
mw()->ui->marketplace_access_code = trim($settings['marketplace_access_code']);
}
if (isset($settings['custom_support_url']) and trim($settings['custom_support_url']) != '') {
mw()->ui->custom_support_url = $settings['custom_support_url'];
}
}
开发者ID:microweber,项目名称:microweber,代码行数:50,代码来源:functions.php
示例20: __construct
function __construct($app = null)
{
if (!is_object($this->app)) {
if (is_object($app)) {
$this->app = $app;
} else {
$this->app = mw();
}
}
$get_default_limit_from_options = $this->app->option_manager->get_items_per_page();
if ($get_default_limit_from_options != false) {
$this->default_limit = intval($get_default_limit_from_options);
}
}
开发者ID:newaltcoin,项目名称:microweber,代码行数:14,代码来源:Database.php
注:本文中的mw函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论