Set the pinned value for this entity

@param int $targetstate The state to change the pin to
@return bool
189914
public function set_pinned(int $targetstate): void {
        if ($targetstate != $this->pinned) {
            $this->pinned = $targetstate;
        }
    }
625934
public function setTarget( $domainOrIp, $resetStatus = TRUE ){
		if( $this->target !== $domainOrIp ){
			$this->target	= $domainOrIp;
			if( $resetStatus )
				$this->status	= self::STATUS_UNKNOWN;
		}
		return $this;
	}
914093
public function setState($state)
    {
        if (!isset($this->_states[$state])) {
            include_once 'Zend/Search/Exception.php';
            throw new Zend_Search_Exception('State \'' . $state . '\' is not on of the possible FSM states.');
        }

        $this->_currentState = $state;
    }
921529
public function setTargetUri($targetUri)
    {
        if (null === $targetUri) {
            $targetUri = '';
        }
        $this->_targetUri = (string) $targetUri;
        return $this;
    }
842593
public function switchPinState($post)
    {
        $post->setPinned(!$post->isPinned());
        $this->om->persist($post);
        $this->om->flush();
    }
1275306
public function setState($state) {
        $statusProp = $this->getProperty(OntologyDeliveryExecution::PROPERTY_STATUS);
        $state = $this->getResource($state);
        $currentStatus = $this->getState();
        if ($currentStatus->getUri() == $state->getUri()) {
            common_Logger::w('Delivery execution '.$this->getIdentifier().' already in state '.$state->getUri());
            return false;
        }
        $this->editPropertyValues($statusProp, $state);
        if ($state->getUri() == DeliveryExecutionInterface::STATE_FINISHED) {
            $this->setPropertyValue($this->getProperty(OntologyDeliveryExecution::PROPERTY_TIME_END), microtime());
        }
        $this->state = $state;
        return true;
    }
616690
public function setTargetPort($targetPort)
    {
        if (
               $this->getAddressType() != AF_UNIX
            && !is_integer($targetPort)
        ) {
            throw new \InvalidArgumentException('Target port parameter must be an integer');
        }
        $this->targetPort = $targetPort;

        return $this;
    }
536288
public function setTarget($target)
    {
        if (is_array($target)) {
            $this->_params = array_merge($this->_params, $target);
        }
        $this->_target = $target;
    }
560670
public function setState($fid, $state)
  {
    $payload = new ToggleFidPayload();
    $payload->state = $state;
    $payload->fid = $fid;

    $ep = AffiliatePixelEndpoint::bound($this->getApi());
    return $ep->setState($payload)->get();
  }
270699
public function setStatus($status)
    {
        $validStatus = [
            100,
            101,
            102,
            200,
            201,
            202,
            203,
            204,
            205,
            206,
            207,
            208,
            300,
            301,
            302,
            303,
            304,
            305,
            306,
            307,
            400,
            401,
            402,
            403,
            404,
            405,
            406,
            407,
            408,
            409,
            410,
            411,
            412,
            413,
            414,
            415,
            416,
            417,
            418,
            422,
            423,
            424,
            425,
            426,
            428,
            429,
            431,
            500,
            501,
            502,
            503,
            504,
            505,
            506,
            507,
            508,
            511,
        ];

        if (false === in_array($status, $validStatus, false)) {
            throw new \InvalidArgumentException(sprintf(
                'Provided status does not match a valid HTTP Status Code.',
                $status
            ));
        }
        $this->status = (int) $status;
    }
818671
public function setPlatformState(MaintenanceState $state)
    {
        if ($previous = $this->getDriver()->get(self::PREFIX . self::LAST_MODE)) {
            $currentState = new MaintenanceState(json_decode($previous, true));
            $currentState->setEndTime($state->getStartTime());
            $this->getDriver()->set(self::PREFIX . $currentState->getId(), json_encode($currentState->toArray()));

            $state->setId($currentState->getId() + 1);
        }


        $this->getDriver()->set(self::PREFIX . self::LAST_MODE, json_encode($state->toArray()));
    }
1067148
function cancelTarget($targetTicket) {
		$cancelTargetRequest = new cancelTarget ();
		$cancelTargetRequest->targetId = $targetTicket;
		return $this->targetService->cancelTarget ( $cancelTargetRequest );
	}
553984
public function setState(int $state)
    {
        if ($state < 0 || $state > 2) {
            Throw new UserException('Users state value can be 0 (active), 1 (awaits activation by mail) or 2 (awaits activation by admin)');
        }

        $this->state = $state;
    }
534339
public function setSiteTargetId(int $nb_site_target_id) : CNabuDataObject
    {
        if ($nb_site_target_id === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$nb_site_target_id")
            );
        }
        $this->setValue('nb_site_target_id', $nb_site_target_id);
        
        return $this;
    }
706219
public function setValue(int $state): bool
    {
        if ($this->type == GPIO::IN) {
            throw new GPIOException('Setting the value of a GPIO input pin is not supported!');
        }
        return $this->adapter->write($this->pin, $state);
    }
230639
public function setPublicationState($publicationState)
    {
        if (array_key_exists($publicationState, self::PUBLICATION_STATES)) {
            $this->publicationState = self::PUBLICATION_STATES[$publicationState];
        } else {
            throw new \Exception('publication state is unknown');
        }
    }
684469
public function set( $reference, $target, EditInfo $editInfo = null ) {
		if( $reference instanceof Reference ) {
			$reference = $reference->getHash();
		}
		if( !is_string( $reference ) ) {
			throw new UnexpectedValueException( 'Could not get reference hash from $reference' );
		}

		if( is_string( $target ) ) {
			$guid = $target;
		} else if ( $target instanceof StatementGuid ) {
			$guid = $target->getSerialization();
		} else if ( $target instanceof Statement ) {
			$guid = $target->getGuid();
		} else {
			throw new UnexpectedValueException( 'Could not get statement guid from $target' );
		}
		if( !is_string( $guid ) ) {
			throw new UnexpectedValueException( 'Unexpected statement guid got from $target' );
		}

		$params = array(
			'statement' => $guid,
			'references' => $reference,
		);

		$this->api->postRequest( 'wbremovereferences', $params, $editInfo );
		return true;
	}