Dislike ----------------------------------
500059
public function run() {

		if( isset( $this->model ) ) {

			$followerService = Yii::$app->factory->get( 'followerService' );

			$user 	= Yii::$app->core->getUser();
			$model	= $this->model;

			$parentType	= $this->parentType;

			$follower = $followerService->updateByParams([
				'modelId' => $user->id, 'parentId' => $model->id,
				'parentType' => $parentType, 'type' => Follower::TYPE_DISLIKE
			]);

			$likeFlag = count( $followerService->getByConfig([
				'modelId' => $user->id, 'parentId' => $model->id,
				'parentType' => $parentType, 'type' => Follower::TYPE_LIKE, 'active' => true
			]));

			$dislikeFlag = count( $followerService->getByConfig([
				'modelId' => $user->id, 'parentId' => $model->id,
				'parentType' => $parentType, 'type' => Follower::TYPE_DISLIKE, 'active' => true
			]));

			$data = [
				'likeFlag' => $likeFlag,
				'dislikeFlag' => $dislikeFlag,
				'likesCount' => $model->getLikesCount(),
				'dislikesCount' => $model->getDislikesCount()
			];

			return AjaxUtil::generateSuccess( Yii::$app->coreMessage->getMessage( CoreGlobal::MESSAGE_REQUEST ), $data );
		}

		// Trigger Ajax Failure
        return AjaxUtil::generateFailure( Yii::$app->coreMessage->getMessage( CoreGlobal::ERROR_NOT_FOUND ) );
	}
224599
def reject(self):
        
        self._result = 0
        if not self.signalsBlocked():
            self.rejected.emit()
        
        if self.autoCloseOnReject():
            self.close()
782172
public function removeStale()
    {
        /** @var \Illuminate\Database\Eloquent\Builder $query */
        $query = $this->importer->getModelInstance()
            ->where('updated_at', '<', $this->now)
            ->orWhereNull('updated_at');

        $this->deleted = $query->count();

        $query->delete();
    }
457485
public function ban()
	{
		if ( ! $this->banned)
		{
			$this->banned = true;
			$this->banned_at = $this->freshTimeStamp();
			$this->save();
		}
	}
423873
function () {

            var parent;

            if (this.element) {
                Event.purgeElement(this.element, true);
                parent = this.element.parentNode;
            }

            if (parent) {
                parent.removeChild(this.element);
            }
        
            this.element = null;
            this.header = null;
            this.body = null;
            this.footer = null;

            Module.textResizeEvent.unsubscribe(this.onDomResize, this);

            this.cfg.destroy();
            this.cfg = null;

            this.destroyEvent.fire();
        }
702714
public function cancel()
    {
        $data = $this->twisto->requestJson('POST', 'invoice/' . urlencode($this->invoice_id) . '/cancel/');
        $this->deserialize($data);
    }
1352286
function(options, callback) {
      if(typeof options === 'function') {
        callback = options;
        options = {};
      }
      if(options.items) {
        options.users = options.users || [];
        for(var i = 0; i < options.items.length ; i++){
          options.users.push(options.items[i]._key);
        }
        delete options.items;
      }
      if(options.title) {
        options.label = options.title;
        delete options.title;
      }
      if (!self.context.player || !options.users || options.users.length === 0 ) {
        callback.apply(self);
      } else {
        UT.Expression._callAPI('dialog.users', [options], function(){
          callback.apply(self);
        });
      }
    }
1072111
public function commentsFilter()
    {
        $post_types = get_post_types();

        foreach ($post_types as &$post_type) {
        	if (post_type_supports($post_type, 'comments')) {
        		$post_type_obj = get_post_type_object($post_type);
        		$post_type = array(
        						'name' => $post_type_obj->name,
        						'label' => $post_type_obj->label
        					);
        	} else {
        		unset($post_types[$post_type]);
        	}
        }

        echo '<select name="post_type"><option value="">' . __('Select post type', 'better-post-ui') . '</option>';
        foreach ($post_types as $post_type) {
            $selected = isset($_GET['post_type']) && $_GET['post_type'] == $post_type['name'] ? 'selected' : '';
            echo '<option value="' . $post_type['name'] . '" ' . $selected . '>' . $post_type['label'] . '</option>';
        }
        echo '</select>';
    }
692827
def disable(other_user, reason)
      return false unless other_user&.system_admin?
      return false if other_user == self

      update_columns(
          disabled_by: other_user.email,
          disabled_at: Time.now,
          disabled_reason: reason,
          enabled: false
      ) && refresh_comments
    end
318009
public function remove_associations() {
        global $DB;

        $associations = $DB->get_records('blog_association', array('blogid' => $this->id));
        foreach ($associations as $association) {

            // Trigger an association deleted event.
            $context = context::instance_by_id($association->contextid);
            $eventparam = array(
                'objectid' => $this->id,
                'other' => array('subject' => $this->subject, 'blogid' => $this->id),
                'relateduserid' => $this->userid
            );
            $event = \core\event\blog_association_deleted::create($eventparam);
            $event->add_record_snapshot('blog_association', $association);
            $event->trigger();

            // Now remove the association.
            $DB->delete_records('blog_association', array('id' => $association->id));
        }
    }
1052424
public function disliked($userId = null)
    {
        return app(LikeableServiceContract::class)->isLiked($this, LikeType::DISLIKE, $userId);
    }
1316451
def exclude(*args)
      args.flatten! # allow [] as a param
      args.collect!(&:to_sym) # symbolize the args
      # check respond_to? :to_sym, ActionColumns doesn't respond to to_sym
      @set.reject! { |c| c.respond_to?(:to_sym) && args.include?(c.to_sym) } # reject all items specified
    end
606619
function removeThis()
    {
        $itemOptionList = eZProductCollectionItemOption::fetchList( $this->attribute( 'id' ) );

        $db = eZDB::instance();
        $db->begin();
        foreach( $itemOptionList as $itemOption )
        {
            $itemOption->remove();
        }
        $this->remove();
        $db->commit();
    }
485191
public function dislike(Model $likedBy): bool
    {
        if (!$like = $this->getLikedRecord($likedBy)) {
            return false;
        }

        $like->delete();

        return (bool) $this->decrementCounter();
    }
739273
public function deleteTagRelations()
    {
        //czyszczenie relacji
        (new CmsTagRelationQuery)
            ->whereObject()->equals($this->_object)
            ->andFieldObjectId()->equals($this->_objectId)
            ->find()
            ->delete();
    }
160188
public function removeLikes()
	{
		Like::where('likeable_type', $this->morphClass)->where('likeable_id', $this->id)->delete();
		
		LikeCounter::where('likeable_type', $this->morphClass)->where('likeable_id', $this->id)->delete();
	}
292513
public function stop()
    {
        $this->oxactions__oxactiveto = new \OxidEsales\Eshop\Core\Field(date('Y-m-d H:i:s', \OxidEsales\Eshop\Core\Registry::getUtilsDate()->getTime()));
        $this->save();
    }