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


PHP KDatabaseTableDefault类代码示例

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


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


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