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


PHP SocialTable::store方法代码示例

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


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

示例1: store

 public function store($updateNulls = false)
 {
     if (!$this->created) {
         $this->created = FD::get('Date', 'now', false)->toMySQL();
     }
     return parent::store();
 }
开发者ID:ppantilla,项目名称:bbninja,代码行数:7,代码来源:conversationattachment.php

示例2: store

 public function store($updateNulls = false)
 {
     if (empty($this->ordering)) {
         $this->ordering = $this->getNextOrder('type = ' . FD::db()->quote($this->type) . ' AND parent_uid = ' . FD::db()->quote($this->parent_uid));
     }
     parent::store($updateNulls);
 }
开发者ID:ppantilla,项目名称:bbninja,代码行数:7,代码来源:region.php

示例3: store

 public function store($updateNulls = false)
 {
     // @TODO: Automatically set the alias
     if (!$this->alias) {
     }
     $state = parent::store();
     return $state;
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:8,代码来源:note.php

示例4: store

 public function store($updateNulls = false)
 {
     if (empty($this->value) && !empty($this->title)) {
         $this->value = JString::strtolower(JString::str_ireplace(' ', '', $this->title));
     }
     if (empty($this->title) && !empty($this->value)) {
         $this->title = JString::ucfirst($this->value);
     }
     return parent::store($updateNulls);
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:10,代码来源:fieldoptions.php

示例5: store

 public function store($updateNulls = false)
 {
     if (empty($this->ordering)) {
         $this->ordering = $this->getNextOrder('type = ' . FD::db()->quote($this->type) . ' AND parent_uid = ' . FD::db()->quote($this->parent_uid));
     }
     if (empty($this->uid)) {
         $db = FD::db();
         $sql = $db->sql();
         $sql->raw("SELECT MAX(`uid`) FROM `#__social_regions` WHERE `type` = " . $db->q($this->type));
         $db->setQuery($sql);
         $result = (int) $db->loadResult();
         $this->uid = $result + 1;
     }
     parent::store($updateNulls);
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:15,代码来源:region.php

示例6: store

 public function store($updateNulls = false)
 {
     $now = FD::date();
     // Set created to now by default
     if (empty($this->created)) {
         $this->created = $now->toSql();
     }
     // Set expired to 1 day later by default
     if (empty($this->expired)) {
         $this->expired = FD::date($now->toUnix() + 24 * 60 * 60)->toSql();
     }
     if (is_array($this->value) || is_object($this->value)) {
         $this->value = FD::json()->encode($this->value);
     }
     return parent::store($updateNulls);
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:16,代码来源:tmp.php

示例7: store

 /**
  * Override's parent's store behavior
  *
  * @since	1.0
  * @access	public
  * @param	string
  * @return	bool		True on success false otherwise
  */
 public function store($updateNulls = false)
 {
     // Determines if this is a new conversation object.
     $isNew = $this->id ? false : true;
     $state = parent::store();
     if ($isNew) {
         // @badge: conversation.create
         $badge = FD::badges();
         $badge->log('com_easysocial', 'conversation.create', $this->created_by, JText::_('COM_EASYSOCIAL_CONVERSATIONS_BADGE_STARTED_NEW_CONVERSATION'));
         // @points: conversation.create
         // Assign points when user starts new conversation
         $type = $this->type == SOCIAL_CONVERSATION_SINGLE ? '' : '.group';
         $points = FD::points();
         $points->assign('conversation.create' . $type, 'com_easysocial', $this->created_by);
     }
     return $state;
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:25,代码来源:conversation.php

示例8: store

 public function store($updateNulls = false)
 {
     if (!$this->params instanceof SocialRegistry) {
         $this->params = FD::registry($this->params);
     }
     $this->params = $this->params->toString();
     $isNew = false;
     if (empty($this->id)) {
         $isNew = true;
     }
     // Get the necessary group
     $namespace = explode('.', $this->element);
     $group = isset($namespace[1]) ? $namespace[1] : SOCIAL_APPS_GROUP_USER;
     FD::apps()->load($group);
     if ($isNew && $this->_trigger) {
         if (!empty($this->parent)) {
             $parent = $this->getParent();
             if ($parent) {
                 $this->depth = $parent->depth + 1;
                 $parent->addChildCount();
             }
         }
         $this->setBoundary();
         // Get the dispatcher object
         $dispatcher = FD::dispatcher();
         $args = array(&$this);
         // @trigger: onBeforeCommentSave
         $dispatcher->trigger($group, 'onBeforeCommentSave', $args);
     }
     $state = parent::store();
     if (!$state) {
         FD::logError(__FILE__, __LINE__, $this->getError());
         return false;
     }
     if ($isNew && $this->_trigger) {
         // @trigger: onAfterCommentSave
         $dispatcher->trigger($group, 'onAfterCommentSave', $args);
     }
     return $state;
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:40,代码来源:comments.php

示例9: store

 /**
  * Override's parent's behavior of store.
  *
  * @since	1.0
  * @access	public
  * @param	string
  * @return
  */
 public function store($updateNulls = false)
 {
     $state = parent::store();
     return $state;
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:13,代码来源:streamitem.php

示例10: lock

 /**
  * Allows caller to lock a discussion
  *
  * @since	1.2
  * @access	public
  * @return	bool	True if success false otherwise
  */
 public function lock()
 {
     $this->lock = true;
     $state = parent::store();
     return $state;
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:13,代码来源:discussion.php

示例11: store

 /**
  * Override parent's store method so that we can
  * run our own maintenance here.
  */
 public function store($updateNulls = false)
 {
     $state = parent::store($updateNulls);
     if ($state) {
         // Add a new location item if address, latitude , longitude is provided.
         $latitude = JRequest::getVar('latitude');
         $longitude = JRequest::getVar('longitude');
         $address = JRequest::getVar('address');
         // Let's add the location now.
         if (!empty($latitude) && !empty($longitude) && !empty($address)) {
             $location = FD::table('Location');
             $location->latitude = $latitude;
             $location->longitude = $longitude;
             $location->address = $address;
             $location->uid = $this->id;
             $location->type = SOCIAL_TYPE_CONVERSATIONS;
             $location->user_id = $this->created_by;
             $location->store();
         }
     }
     return $state;
 }
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:26,代码来源:conversationmessage.php

示例12: createBlank

 public function createBlank()
 {
     // If created date is not provided, we generate it automatically.
     if (is_null($this->created)) {
         $this->created = FD::date()->toMySQL();
     }
     // Update the modified date.
     $this->modified = FD::date()->toMySQL();
     // Update ordering column.
     $this->ordering = $this->getNextOrder();
     // Store the item now so that we can get the incremented profile id.
     $state = parent::store();
     return $state;
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:14,代码来源:profile.php

示例13: store

 /**
  * Override's parent store method as we need to get the sequence if it's not being set.
  *
  * Example:
  * <code>
  * <?php
  * $table 	= FD::table( 'Workflow' );
  * $table->load( JRequest::getInt( 'id' ) );
  * $table->store();
  * ?>
  * </code>
  *
  * @since	1.0
  * @access	public
  * @param	bool	True to update fields even if they are null.
  * @return	bool	True on success, false otherwise.
  *
  * @author	Mark Lee <mark@stackideas.com>
  */
 public function store($updateNulls = false)
 {
     // Get next sequence
     if (!$this->sequence) {
         $lastSequence = $this->getLastSequence();
         $this->sequence = $lastSequence + 1;
     }
     return parent::store($updateNulls);
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:28,代码来源:fieldstep.php

示例14: store

 public function store($updateNulls = false)
 {
     $isNew = true;
     if ($this->id) {
         $isNew = false;
     }
     if (empty($this->created)) {
         $this->created = FD::date()->toMySQL();
     }
     $state = parent::store($updateNulls);
     if ($state) {
         // TODO: do any triggering here.
     }
     return $state;
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:15,代码来源:share.php

示例15: move

 /**
  * Some desc
  *
  * @since   1.0
  * @access  public
  * @param   string
  * @return
  */
 public function move($newAlbumId, $where = '')
 {
     jimport('joomla.filesystem.folder');
     // If the current photo is the cover of the photo we need to update the cover
     // since the photo is already moved away
     if ($this->isCover()) {
         $this->setNewAlbumCover();
     }
     // Get the old album id as we need to move the old photo folder over
     $oldAlbumId = $this->album_id;
     // Get the path to the photos folder.
     $oldFolder = $this->getFolder();
     // Set the new album id.
     $this->album_id = $newAlbumId;
     // Get the new photo folder
     $newAlbumFolder = $this->getFolder(false);
     $newFolder = $this->getFolder();
     if (!JFolder::exists($newAlbumFolder)) {
         JFolder::create($newAlbumFolder);
     }
     // Save the photo with the new album
     $state = parent::store();
     if (!$state) {
         return $state;
     }
     JFolder::move($oldFolder, $newFolder);
     // Once the folder is moved, we also need to update all the metas.
     $model = FD::model('Photos');
     $metas = $model->getMeta($this->id, SOCIAL_PHOTOS_META_PATH);
     foreach ($metas as $meta) {
         $table = FD::table('PhotoMeta');
         $table->bind($meta);
         $fileName = basename($table->value);
         // Rebuild the new path
         $table->value = $newFolder . '/' . $fileName;
         $table->store();
     }
     // now we need to remove this photo from stream table.
     $model = FD::model('Photos');
     $model->delPhotoStream($this->id, $this->user_id, $oldAlbumId);
     return $state;
 }
开发者ID:ppantilla,项目名称:bbninja,代码行数:50,代码来源:photo.php


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