public function set_pinned(int $targetstate): void {
        if ($targetstate != $this->pinned) {
            $this->pinned = $targetstate;
        }
    }
public function set_pinned(int $targetstate): void {
        if ($targetstate != $this->pinned) {
            $this->pinned = $targetstate;
        }
    }
public function set_pinned ( int $ targetstate ) : void { if ( $ targetstate != $ this -> pinned ) { $ this -> pinned = $ targetstate ; } }
Set the pinned value for this entity

@param int $targetstate The state to change the pin to
@return bool
Set the pinned value for this entity