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


PHP unknown_type::getId方法代码示例

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


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

示例1: core_dimensions_after_update

/**
 * @author Ignacio Vazquez - elpepe.uy at gmail.com
 * @param unknown_type $object
 * @param unknown_type $ignored
 */
function core_dimensions_after_update($object, &$ignored)
{
    static $objectsProcessed = array();
    if ($object instanceof Contact && !array_var($objectsProcessed, $object->getId())) {
        $person_dim = Dimensions::findOne(array("conditions" => "`code` = 'feng_persons'"));
        $person_ot = ObjectTypes::findOne(array("conditions" => "`name` = 'person'"));
        $company_ot = ObjectTypes::findOne(array("conditions" => "`name` = 'company'"));
        $members = Members::findByObjectId($object->getId(), $person_dim->getId());
        if (count($members) == 1) {
            /* @var $member Member */
            $member = $members[0];
            $member->setName($object->getObjectName());
            $parent_member_id = $member->getParentMemberId();
            $depth = $member->getDepth();
            if ($object->getCompanyId() > 0) {
                $pmember = Members::findOne(array('conditions' => '`object_id` = ' . $object->getCompanyId() . ' AND `object_type_id` = ' . $company_ot->getId() . ' AND `dimension_id` = ' . $person_dim->getId()));
                $member->setParentMemberId($pmember->getId());
                $member->setDepth($pmember->getDepth() + 1);
            } else {
                //Is first level
                $member->setDepth(1);
                $member->setParentMemberId(0);
            }
            $object->modifyMemberValidations($member);
            $member->save();
            // reload only if not disabling or enabling user
            if (!(array_var($_REQUEST, 'c') == 'account' && (array_var($_REQUEST, 'a') == 'disable' || array_var($_REQUEST, 'a') == 'restore_user'))) {
                evt_add("reload dimension tree", $member->getDimensionId());
            }
            $objectsProcessed[$object->getId()] = true;
        }
    }
}
开发者ID:rorteg,项目名称:fengoffice,代码行数:38,代码来源:core_dimensions_hooks.php

示例2: createPlanning

 /**
  * Helper to create planning for an order
  *
  * @param unknown_type $order
  */
 public function createPlanning($order)
 {
     //delete planning if exists (as we create it :))
     $planning = mage::getModel('Purchase/SalesOrderPlanning')->load($order->getId(), 'psop_order_id');
     if ($planning->getId()) {
         $planning->delete();
     }
     //create & init information
     $planning = mage::getModel('Purchase/SalesOrderPlanning');
     $planning->setpsop_order_id($order->getId());
     $planning->setConsiderationInformation($order);
     $planning->setFullStockInformation($order);
     $planning->setShippingInformation($order);
     $planning->setDeliveryInformation($order);
     return $planning;
 }
开发者ID:TrygveSkogsholm,项目名称:Magento-Patch,代码行数:21,代码来源:Planning.php

示例3: EventUnsubscribe

 /**
  * Отписка от блога или пользователя
  *
  */
 protected function EventUnsubscribe()
 {
     $this->Viewer_SetResponseAjax('json');
     if (!getRequest('id')) {
         $this->Message_AddError($this->Lang_Get('system_error'), $this->Lang_Get('error'));
         return;
     }
     $sType = getRequest('type');
     $iType = null;
     /**
      * Определяем от чего отписываемся
      */
     switch ($sType) {
         case 'blogs':
             $iType = ModuleUserfeed::SUBSCRIBE_TYPE_BLOG;
             break;
         case 'users':
             $iType = ModuleUserfeed::SUBSCRIBE_TYPE_USER;
             break;
         default:
             $this->Message_AddError($this->Lang_Get('system_error'), $this->Lang_Get('error'));
             return;
     }
     /**
      * Отписываем пользователя
      */
     $this->Userfeed_unsubscribeUser($this->oUserCurrent->getId(), $iType, getRequest('id'));
     $this->Message_AddNotice($this->Lang_Get('userfeed_subscribes_updated'), $this->Lang_Get('attention'));
 }
开发者ID:lifecom,项目名称:Huddlebuddle,代码行数:33,代码来源:ActionUserfeed.class.php

示例4: createFacebookLikePoints

 /**
  * Creates customer points transfers
  *
  * @param unknown_type $customer
  * @param unknown_type $like_id
  * @param unknown_type $rule
  * @return unknown
  */
 public function createFacebookLikePoints($customer, $like_id, $rule)
 {
     $num_points = $rule->getPointsAmount();
     $currency_id = $rule->getPointsCurrencyId();
     $rule_id = $rule->getId();
     $transfer = $this->initTransfer($num_points, $currency_id, $rule_id);
     $store = $customer->getStore();
     if (!$transfer) {
         return false;
     }
     //get On-Hold initial status override
     if ($rule->getOnholdDuration() > 0) {
         $transfer->setEffectiveStart(date('Y-m-d H:i:s', strtotime("+{$rule->getOnholdDuration()} days")))->setStatus(null, TBT_Rewards_Model_Transfer_Status::STATUS_PENDING_TIME);
     } else {
         //get the default starting status
         $initial_status = Mage::getStoreConfig('rewards/InitialTransferStatus/AfterFacebookLike', $store);
         if (!$transfer->setStatus(null, $initial_status)) {
             return false;
         }
     }
     // Translate the message through the core translation engine (nto the store view system) in case people want to use that instead
     // This is not normal, but we found that a lot of people preferred to use the standard translation system insteaed of the
     // store view system so this lets them use both.
     $initial_transfer_msg = Mage::getStoreConfig('rewards/transferComments/facebookLike', $store);
     $comments = Mage::helper('rewards')->__($initial_transfer_msg);
     $this->setFacebookLikeId($like_id)->setComments($comments)->setCustomerId($customer->getId())->save();
     return true;
 }
开发者ID:rajarshc,项目名称:Rooja,代码行数:36,代码来源:Transfer.php

示例5: render

 /**
  * Helper function for rendering a resource inside this container
  * 
  * @param unknown_type $resource
  * @access protected
  */
 protected function render($resource)
 {
     $html = "<{$this->htmlElement}";
     foreach ($this->attributes as $k => $v) {
         $html .= " {$k}=\"{$v}\"";
     }
     $html .= " puny=\"{$resource->getId()}\">" . "{$resource->parse()->getContent()}" . "</{$this->htmlElement}>";
     return $html;
 }
开发者ID:fornava,项目名称:oodt,代码行数:15,代码来源:Puny_Container.class.php

示例6: addRuleToFilter

 /**
  * Add rule to filter
  *
  *
  * @param unknown_type $rule
  */
 public function addRuleToFilter($rule)
 {
     if ($rule instanceof Mage_SalesRule_Model_Rule) {
         $ruleId = $rule->getId();
     } else {
         $ruleId = (int) $rule;
     }
     $this->addFieldToFilter('rule_id', $ruleId);
 }
开发者ID:hirentricore,项目名称:devmagento,代码行数:15,代码来源:Collection.php

示例7: EventUnsubscribe

 /**
  * Отписка от пользователя
  *
  */
 protected function EventUnsubscribe()
 {
     $this->Viewer_SetResponseAjax('json');
     if (!$this->User_getUserById(getRequest('id'))) {
         $this->Message_AddError($this->Lang_Get('system_error'), $this->Lang_Get('error'));
     }
     /**
      * Отписываем
      */
     $this->Stream_unsubscribeUser($this->oUserCurrent->getId(), getRequest('id'));
     $this->Message_AddNotice($this->Lang_Get('stream_subscribes_updated'), $this->Lang_Get('attention'));
 }
开发者ID:lifecom,项目名称:Huddlebuddle,代码行数:16,代码来源:ActionStream.class.php

示例8: SendNotifyTopicNew

 /**
  * Отправляем уведомление всем кому имеет смысл знать
  *  1. Подписчикам сообщества, если включили опцию и хватает прав доступа.
  *  2. Друзьям(подписчикам автора), если они включили данную опцию и хватает прав доступа.
  *  3. Владельцу блога
  *
  * @param unknown_type $oBlog
  * @param unknown_type $oTopic
  * @param unknown_type $oUserTopic
  */
 public function SendNotifyTopicNew($oBlog, $oTopic, $oUserTopic)
 {
     $aExceptUserId = array($oTopic->getUserId(), $oBlog->getOwnerId());
     $aBlogSubscriberId = $this->Notify_SendNotificationsToBlogSubscribers($oTopic, $oBlog, $aExceptUserId);
     if (is_array($aBlogSubscriberId)) {
         $aExceptUserId = array_merge($aExceptUserId, $aBlogSubscriberId);
     }
     $this->Notify_SendNotificationsToAuthorFriends($oTopic, $oBlog, $aExceptUserId);
     //отправляем создателю блога
     if ($oBlog->getOwnerId() != $oUserTopic->getId()) {
         $this->Notify_SendTopicNewToSubscribeBlog($oBlog->getOwner(), $oTopic, $oBlog, $oUserTopic);
     }
 }
开发者ID:lifecom,项目名称:test,代码行数:23,代码来源:Topic.class.php

示例9: EventShutdown

 /**
  * Выполняется при завершении работы экшена
  *
  */
 public function EventShutdown()
 {
     if (!$this->oUserProfile) {
         return;
     }
     /**
      * Загружаем в шаблон необходимые переменные
      */
     $iCountTopicUser = $this->Topic_GetCountTopicsPersonalByUser($this->oUserProfile->getId(), 1);
     $iCountCommentUser = $this->Comment_GetCountCommentsByUserId($this->oUserProfile->getId(), 'topic');
     $this->Viewer_Assign('oUserProfile', $this->oUserProfile);
     $this->Viewer_Assign('iCountTopicUser', $iCountTopicUser);
     $this->Viewer_Assign('iCountCommentUser', $iCountCommentUser);
 }
开发者ID:lifecom,项目名称:Huddlebuddle,代码行数:18,代码来源:ActionMy.class.php

示例10: EventShutdown

 public function EventShutdown()
 {
     if (!$this->oUserCurrent) {
         return;
     }
     $iCountTalkFavourite = $this->Talk_GetCountTalksFavouriteByUserId($this->oUserCurrent->getId());
     $this->Viewer_Assign('iCountTalkFavourite', $iCountTalkFavourite);
     /**
      * Передаем во вьевер константы состояний участников разговора
      */
     $this->Viewer_Assign('TALK_USER_ACTIVE', ModuleTalk::TALK_USER_ACTIVE);
     $this->Viewer_Assign('TALK_USER_DELETE_BY_SELF', ModuleTalk::TALK_USER_DELETE_BY_SELF);
     $this->Viewer_Assign('TALK_USER_DELETE_BY_AUTHOR', ModuleTalk::TALK_USER_DELETE_BY_AUTHOR);
 }
开发者ID:lifecom,项目名称:test,代码行数:14,代码来源:ActionTalk.class.php

示例11: loadPrimaryByRule

 /**
  * Load primary coupon (is_primary = 1) for specified rule
  *
  *
  * @param Mage_SalesRule_Model_Coupon $object
  * @param unknown_type $rule
  * @return unknown
  */
 public function loadPrimaryByRule(Mage_SalesRule_Model_Coupon $object, $rule)
 {
     $read = $this->_getReadAdapter();
     if ($rule instanceof Mage_SalesRule_Model_Rule) {
         $ruleId = $rule->getId();
     } else {
         $ruleId = (int) $rule;
     }
     $select = $read->select()->from($this->getMainTable())->where('rule_id = :rule_id')->where('is_primary = :is_primary');
     $data = $read->fetchRow($select, array(':rule_id' => $ruleId, ':is_primary' => 1));
     if (!$data) {
         return false;
     }
     $object->setData($data);
     $this->_afterLoad($object);
     return true;
 }
开发者ID:relue,项目名称:magento2,代码行数:25,代码来源:Coupon.php

示例12: EventShutdown

 /**
  * Выполняется при завершении работы экшена
  */
 public function EventShutdown()
 {
     if (!$this->oUserProfile) {
         return;
     }
     /**
      * Загружаем в шаблон необходимые переменные
      */
     $iCountTopicFavourite = $this->Topic_GetCountTopicsFavouriteByUserId($this->oUserProfile->getId());
     $iCountTopicUser = $this->Topic_GetCountTopicsPersonalByUser($this->oUserProfile->getId(), 1);
     $iCountCommentUser = $this->Comment_GetCountCommentsByUserId($this->oUserProfile->getId(), 'topic');
     $iCountCommentFavourite = $this->Comment_GetCountCommentsFavouriteByUserId($this->oUserProfile->getId());
     $this->Viewer_Assign('oUserProfile', $this->oUserProfile);
     $this->Viewer_Assign('iCountTopicUser', $iCountTopicUser);
     $this->Viewer_Assign('iCountCommentUser', $iCountCommentUser);
     $this->Viewer_Assign('iCountTopicFavourite', $iCountTopicFavourite);
     $this->Viewer_Assign('iCountCommentFavourite', $iCountCommentFavourite);
     $this->Viewer_Assign('USER_FRIEND_NULL', ModuleUser::USER_FRIEND_NULL);
     $this->Viewer_Assign('USER_FRIEND_OFFER', ModuleUser::USER_FRIEND_OFFER);
     $this->Viewer_Assign('USER_FRIEND_ACCEPT', ModuleUser::USER_FRIEND_ACCEPT);
     $this->Viewer_Assign('USER_FRIEND_REJECT', ModuleUser::USER_FRIEND_REJECT);
     $this->Viewer_Assign('USER_FRIEND_DELETE', ModuleUser::USER_FRIEND_DELETE);
 }
开发者ID:lifecom,项目名称:test,代码行数:26,代码来源:ActionProfile.class.php

示例13: GenerateInvite

 /**
  * Генерирует новый инвайт
  *
  * @param unknown_type $oUser
  * @return unknown
  */
 public function GenerateInvite($oUser)
 {
     $oInvite = Engine::GetEntity('User_Invite');
     $oInvite->setCode(func_generator(32));
     $oInvite->setDateAdd(date("Y-m-d H:i:s"));
     $oInvite->setUserFromId($oUser->getId());
     return $this->AddInvite($oInvite);
 }
开发者ID:lifecom,项目名称:Huddlebuddle,代码行数:14,代码来源:User.class.php

示例14: RebuildUrlFull

 /**
  * Рекурсивно обновляет полный URL у всех дочерних страниц(веток)
  *
  * @param unknown_type $oPageStart
  */
 public function RebuildUrlFull($oPageStart)
 {
     $aPages = $this->GetPagesByPid($oPageStart->getId());
     foreach ($aPages as $oPage) {
         if ($oPage->getId() == $oPageStart->getId()) {
             continue;
         }
         if (in_array($oPage->getId(), $this->aRebuildIds)) {
             continue;
         }
         $this->aRebuildIds[] = $oPage->getId();
         $oPage->setUrlFull($oPageStart->getUrlFull() . '/' . $oPage->getUrl());
         $this->UpdatePage($oPage);
         $this->RebuildUrlFull($oPage);
     }
 }
开发者ID:lifecom,项目名称:Huddlebuddle,代码行数:21,代码来源:Page.class.php

示例15: applyFilterToCollection

 /**
  * Enter description here ...
  *
  * @param unknown_type $collection
  * @param unknown_type $attribute
  * @param unknown_type $value
  * @return Mage_CatalogIndex_Model_Resource_Attribute
  */
 public function applyFilterToCollection($collection, $attribute, $value)
 {
     /**
      * Will be used after SQL review
      */
     //        if ($collection->isEnabledFlat()) {
     //            $collection->getSelect()->where("e.{$attribute->getAttributeCode()}=?", $value);
     //            return $this;
     //        }
     $alias = 'attr_index_' . $attribute->getId();
     $collection->getSelect()->join(array($alias => $this->getMainTable()), $alias . '.entity_id=e.entity_id', array())->where($alias . '.store_id = ?', $this->getStoreId())->where($alias . '.attribute_id = ?', $attribute->getId())->where($alias . '.value = ?', $value);
     return $this;
 }
开发者ID:hientruong90,项目名称:ee_14_installer,代码行数:21,代码来源:Attribute.php


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