• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP KDatabaseTableDefault类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: _initialize

    public function  _initialize(KConfig $config)
    {
        $config->identity_column = 'id';
        
        $config->append(array(
            'name' => 'content',
            'behaviors' => array(
            	'creatable', 'modifiable', 'lockable', 'orderable', 'sluggable', 'revisable'  
            ),
            'column_map' => array(
                'locked_on'        => 'checked_out_time',
                'locked_by'        => 'checked_out',
                'slug'       	   => 'alias',
                'section_id'       => 'sectionid',
                'category_id'	   => 'catid',
                'created_on' 	   => 'created',
                'modified_on'      => 'modified',
                'description'      => 'metadesc',
                'params'		   => 'attribs'
            ),
            'filters' => array(
                'introtext'   => array('html', 'tidy'),
                'fulltext'    => array('html', 'tidy'),
                'attribs'	  => 'ini'
		    )
        ));

        parent::_initialize($config);
    }
开发者ID:raeldc,项目名称:com_learn,代码行数:29,代码来源:articles.php


示例2: _initialize

 public function _initialize(KConfig $config)
 {
     $config->identity_column = 'id';
     $orderable = $this->getBehavior('com://admin/categories.database.behavior.orderable', array('parent_column' => 'section_id'));
     $config->append(array('name' => 'categories', 'behaviors' => array('lockable', $orderable, 'sluggable', 'cascadable'), 'column_map' => array('enabled' => 'published', 'locked_on' => 'checked_out_time', 'locked_by' => 'checked_out', 'slug' => 'alias', 'section_id' => 'section')));
     parent::_initialize($config);
 }
开发者ID:raeldc,项目名称:nooku-server,代码行数:7,代码来源:categories.php


示例3: _initialize

 public function _initialize(KConfig $config)
 {
     $config->identity_column = 'id';
     $orderable = $this->getBehavior('com://admin/categories.database.behavior.orderable', array('parent_column' => 'catid'));
     $config->append(array('name' => 'weblinks', 'base' => 'weblinks', 'behaviors' => array('lockable', $orderable, 'sluggable'), 'column_map' => array('enabled' => 'published', 'locked_on' => 'checked_out_time', 'locked_by' => 'checked_out', 'slug' => 'alias'), 'filters' => array('description' => array('html', 'tidy'), 'url' => array('url'), 'params' => array('ini'))));
     parent::_initialize($config);
 }
开发者ID:JSWebdesign,项目名称:intranet-platform,代码行数:7,代码来源:weblinks.php


示例4: _initialize

 public function _initialize(KConfig $config)
 {
     $sluggable = $this->getBehavior('sluggable', array('columns' => array('name')));
     $orderable = $this->getBehavior('com://admin/categories.database.behavior.orderable', array('parent_column' => 'catid'));
     $config->append(array('identity_column' => 'bid', 'base' => 'banner', 'name' => 'banner', 'behaviors' => array('creatable', 'lockable', $sluggable, $orderable, 'hittable'), 'column_map' => array('enabled' => 'showBanner', 'created_on' => 'date', 'locked_on' => 'checked_out_time', 'locked_by' => 'checked_out', 'slug' => 'alias', 'hits' => 'clicks'), 'filters' => array('custombannercode' => array('html', 'tidy'), 'params' => 'ini')));
     parent::_initialize($config);
 }
开发者ID:raeldc,项目名称:nooku-server,代码行数:7,代码来源:banners.php


示例5: _initialize

 public function _initialize(KConfig $config)
 {
     $sluggable = $this->getBehavior('sluggable', array('columns' => array('name')));
     $orderable = $this->getBehavior('com://admin/categories.database.behavior.orderable', array('parent_column' => 'catid'));
     $config->append(array('identity_column' => 'id', 'base' => 'newsfeeds', 'name' => 'newsfeeds', 'behaviors' => array('lockable', $orderable, $sluggable), 'column_map' => array('enabled' => 'published', 'locked_on' => 'checked_out_time', 'locked_by' => 'checked_out', 'slug' => 'alias'), 'filters' => array('slug' => 'slug', 'link' => 'url')));
     parent::_initialize($config);
 }
开发者ID:JSWebdesign,项目名称:intranet-platform,代码行数:7,代码来源:newsfeeds.php


示例6: _initialize

	protected function _initialize(KConfig $config)
    {
        $config->identity_column = 'id';
        
        $config->append(array(
            'name'		 => 'menu',
			'behaviors'  => array('lockable', 'sluggable', 'nestable'),
			'column_map' => array(
				'title'			  => 'name',
				'enabled'		  => 'published',
				'locked_by'		  => 'checked_out',
				'locked_on'		  => 'checked_out_time',
				'slug'			  => 'alias',
				'group_id'		  => 'access',
				'level'			  => 'sublevel',
				'component_id'	  => 'componentid',
				'pages_menu_name' => 'menutype',
				'parent_id'		  => 'parent'
			),
			'filters' => array(
                'params' => 'ini'
		    )
		));

		parent::_initialize($config);
    }
开发者ID:raeldc,项目名称:com_learn,代码行数:26,代码来源:pages.php


示例7: _initialize

 public function _initialize(KConfig $config)
 {
     $config->identity_column = 'id';
     $sluggable = $this->getBehavior('sluggable', array('columns' => array('name')));
     $config->append(array('name' => 'contact_details', 'behaviors' => array('orderable', 'lockable', $sluggable), 'column_map' => array('enabled' => 'published', 'locked_on' => 'checked_out_time', 'locked_by' => 'checked_out', 'slug' => 'alias', 'category' => 'catid'), 'filters' => array('params' => 'ini')));
     parent::_initialize($config);
 }
开发者ID:raeldc,项目名称:nooku-server,代码行数:7,代码来源:contacts.php


示例8: _initialize

 public function  _initialize(KConfig $config) 
 {
     $config->append(array(
         'name'  => 'modules_menu',
     ));
  
     parent::_initialize($config);
 }
开发者ID:raeldc,项目名称:com_learn,代码行数:8,代码来源:menus.php


示例9: _initialize

 protected function _initialize(KConfig $config)
 {
     $config->append(array(
         'name' => 'core_acl_aro'
     ));
     
     parent::_initialize($config);
 }
开发者ID:raeldc,项目名称:com_learn,代码行数:8,代码来源:aros.php


示例10: _deleteRevisions

 /**
  * Delete one or all revisions for a row
  *
  * @param  string   The row status to look for
  * @return	boolean
  */
 protected function _deleteRevisions($status = null)
 {
     $query = array('table' => $this->getTable()->getName(), 'row' => $this->id);
     if ($status) {
         $query['status'] = $status;
     }
     return $this->_table->select($query)->delete();
 }
开发者ID:raeldc,项目名称:nooku-server,代码行数:14,代码来源:revisable.php


示例11: getDefaults

 /**
  * Get default values for all columns
  *
  * This method is specialized in order to set the default module position 
  * and published state
  * 
  * @return  array
  */
 public function getDefaults()
 {
     $defaults = parent::getDefaults();
     $defaults['position'] = 'left';
     $defaults['enabled'] = 1;
     $defaults['description'] = '';
     $defaults['module'] = 'mod_custom';
     return $defaults;
 }
开发者ID:raeldc,项目名称:nooku-server,代码行数:17,代码来源:modules.php


示例12: _initialize

    protected function _initialize(KConfig $config)
    {
        $config->append(array(
            'name'            => 'session',
            'base'            => 'session'
        ));

        parent::_initialize($config);
    }
开发者ID:raeldc,项目名称:com_learn,代码行数:9,代码来源:sessions.php


示例13: insert

 /**
  * Insert a new row into the table
  * 
  * Takes care of automatically incrementing the revision number
  *
  * @param KDatabaseRowInterface $row
  */
 public function insert(KDatabaseRowInterface $row)
 {
     $query = $this->getDatabase()->getQuery()->where('table', '=', $row->table)->where('row', '=', $row->row)->order('revision', 'desc')->limit(1);
     $latest = $this->select($query, KDatabase::FETCH_ROW);
     if (!$latest->isNew()) {
         $row->revision = $latest->revision + 1;
     }
     return parent::insert($row);
 }
开发者ID:raeldc,项目名称:nooku-server,代码行数:16,代码来源:revisions.php


示例14: _initialize

    public function  _initialize(KConfig $config) 
    {
        $config->identity_column = 'id';

        $config->append(array(
            'name'    => 'components',
            'filters' => array('params' => 'ini')
        ));
        
        parent::_initialize($config);
    }
开发者ID:raeldc,项目名称:com_learn,代码行数:11,代码来源:components.php


示例15: insert

 /**
  * Table insert method
  *
  * @param  object	A KDatabaseRow object
  * @return boolean  TRUE if successfull, otherwise false
  */
 public function insert(KDatabaseRowAbstract $row)
 {
     $query = $this->_database->getQuery();
     $query->where('tbl.name', '=', $row->name, 'or');
     if ($this->count($query)) {
         $asset = $this->select($query, KDatabase::FETCH_ROW);
         $data = array_merge($asset->getData(), array_filter($row->getData()));
         return parent::update($asset->setData($data));
     }
     return parent::insert($row);
 }
开发者ID:ravenlife,项目名称:Ninjaboard,代码行数:17,代码来源:assets.php


示例16: _initialize

    public function  _initialize(KConfig $config)
    {
        $config->identity_column = 'content_id';
        
        $config->append(array(
            'name'       => 'content_frontpage',
            'behaviors'  => array('orderable')
        ));

        parent::_initialize($config);
    }
开发者ID:raeldc,项目名称:com_learn,代码行数:11,代码来源:featured.php


示例17: insert

 /**
  * Table insert method
  *
  * @param  object	A KDatabaseRow object
  * @return boolean  TRUE if successfull, otherwise false
  */
 public function insert(KDatabaseRowAbstract $row)
 {
     $query = $this->_database->getQuery();
     $query->where('tbl.joomla_gid', '=', $row->id);
     if ($this->count($query)) {
         $asset = $this->select($query, KDatabase::FETCH_ROW);
         $this->delete($asset);
         //			$asset->ninjaboard_gid = $row->ninjaboard_gid;
         return parent::insert($row);
     }
     return parent::insert($row);
 }
开发者ID:ravenlife,项目名称:Ninjaboard,代码行数:18,代码来源:joomlausergroupmaps.php


示例18: _initialize

	protected function _initialize(KConfig $config)
	{
		$config->append(array(
			'filters' => array(
				'identifier' => 'identifier',
				'path'       => 'com.files.filter.path',
				'parameters' => 'json'
			)
		));

		parent::_initialize($config);
	}
开发者ID:raeldc,项目名称:com_learn,代码行数:12,代码来源:paths.php


示例19: _initialize

	protected function _initialize(KConfig $config)
    {
        $config->identity_column = 'id';    	
        
        $config->append(array(
			'name'			=> 'menu_types',
			'column_map'	=> array(
				'name'	=> 'menutype'
			)
		));

		parent::_initialize($config);
    }
开发者ID:raeldc,项目名称:com_learn,代码行数:13,代码来源:menus.php


示例20: _initialize

    protected function _initialize(KConfig $config)
	{
		$config->append(array(
			'name'				=> 'users',
			'base' 				=> 'users',
			'column_map'		=> array(
				'users_user_id'		=> 'id',
				'group_name'		=> 'usertype',
				'enabled'			=> 'block',
				'send_email'		=> 'sendEmail',
				'users_group_id'	=> 'gid',
				'registered_on'		=> 'registerDate',
				'last_visited_on'	=> 'lastvisitDate'
			)
		));

		parent::_initialize($config);
	}
开发者ID:raeldc,项目名称:com_learn,代码行数:18,代码来源:users.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP KExternalErrors类代码示例发布时间:2022-05-23
下一篇:
PHP KConfig类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap