Set a given board's state
@link https://trello.com/docs/api/board/#put-1-boards-board-id-closed

@param string $id     the board's id
@param bool   $closed whether the board should be closed or not

@return array
167775
public function setClosed($id, $closed = true)
    {
        return $this->put($this->getPath().'/'.rawurlencode($id).'/closed', array('value' => $closed));
    }
895024
public function isLocked($id)
    {
        $record = $this->model->findOrFail($id);

        if ($record->locked_by > 0) return true;

        return false;
    }
1374308
public function isLocked($id=-1)
	{
		if($id === -1){
			return $self->state === 0 ? true : false;
		}else{
			$rec = Member::find($id)->state;
			if(count($rec)){
				return Member::find($id)->state === 0 ? true : false;
			}else{
				die('FooWeChat\Authorize\Auth\isLocked: 无效id');
			}
			
		}
	}
1287857
public function setId($id)
    {
        if (!is_null($id)) {
            $id = (string) $id;
        }

        $this->id = $id;
        return $this;
    }
999525
public function getState($id)
	{
		if ($id === null || $id === array() || $id === false || $id === '') {
			return '';
		}

		$q = $this->createQueryBuilder()
			->select(null)
			->limit(1);

		$this->queryAddStateSelect($q);
		$this->queryAddPrimaryKeyWhere($q, $id);

		$r = $q->query();
		$state = $r->fetchColumn(0);
		$r->closeCursor();

		return (string) $state;
	}
471196
public function make_public(string $id, bool $cancel = false): ?int
  {
    if ( $cfg = $this->get($id) ){
      return $this->db->update($this->class_table, ['public' => $cancel ? 0 : 1], [
        $this->fields['id'] => $id
      ]);
    }
    return null;
  }
36171
public function setId($id)
    {
        if (($content = $this->getContent()) instanceof FormInterface) {
            $content->setId($id);
        }

        return $this;
    }
166710
public function setId($id)
    {
        if ($this->id) {
            return;
        }
        if (strlen($id) >= 20) {
            $this->id = $id;

            return;
        }
        list($a, $b) = explode(' ', microtime());
        $this->id = preg_replace("/[^\d]/", '', $b.$a.$id);
    }
920721
public function setBaseId( $id )
	{
		if ( $id == $this->getBaseId() ) { return; }

		$this->_values['baseid'] = (int) $id;
		$this->setModified();
	}
345320
public function & SetId ($id) {
		/** @var $this \MvcCore\Ext\Forms\IForm */
		$this->id = $id;
		self::$instances[$id] = & $this;
		return $this;
	}
1319416
public function setIssueStatus($id, $status)
    {
        $api = $this->client->issue_status;
        $statusId = $api->getIdByName($status);

        return $this->update($id, [
            'status_id' => $statusId,
        ]);
    }
1346019
public function setAdmins($id)
    {
        if (is_array($id)) {
            $id = implode(',', $id);
        }

        return $this->addTag('fb', 'admins', $id);
    }
111258
function _get_plan_by_id( $id ) {
            $this->_logger->entrance();

            if ( ! is_array( $this->_plans ) || 0 === count( $this->_plans ) ) {
                $this->_sync_plans();
            }

            foreach ( $this->_plans as $plan ) {
                if ( $id == $plan->id ) {
                    return $plan;
                }
            }

            return false;
        }
237458
public function populateLockFields($id)
    {
        // $this->getSave($data);   --> creates new record ;-(
        // $this->getUpdate($data); --> integrity constraint violation: 1451 Cannot delete or
        //                              update a parent row: a foreign key constraint fails  ;-(
        // use the model, not the repository, to UPDATE
        $record = $this->model->findOrFail($id);

        $record->locked_by = Auth::user()->id;
        $record->locked_at = date('Y-m-d H:i:s');

        return $record->save();
    }
970535
public function makeBlockShared($id)
    {
        $block = $this->find($id, true);
        $this->publish($block);

        // Duplicate some of the settings to the pointer
        $pointer = new PointerBlock();
        $pointer->setOwner($block->getOwner());
        $pointer->setParent($block->getParent());
        $pointer->setPosition($block->getPosition());
        $pointer->setSort($block->getSort());
        $pointer->setReference($block);
        $pointer->setDraft(true);

        // Detach and make shared
        $block->setShared(true);
        $block->setSharedName(sprintf('%s_%s', $block->getBlockType(), $block->getOwner()->getId()));
        $block->setSharedDisplayName(sprintf('%s from %s', $block->getBlockType(), $block->getOwnerName()));
        $block->setParent(null);
        $block->setOwner(null);
        $block->setPosition(null);
        $block->setSort(null);

        $this->save($block, false)->save($pointer);

        if ($block instanceof CompositeBlock) {
            $iterator = new \RecursiveIteratorIterator(
                new RecursiveBlockIterator($block->getChildren()),
                \RecursiveIteratorIterator::SELF_FIRST
            );

            foreach ($iterator as $child) {
                $child->setOwner(null);
                $this->publish($child);
                $this->save($child, false);
            }
        }

        return $pointer;
    }
1362693
public function store($id)
    {
        $block = $this->getBlock($id);
        if (!empty($block)) {
            $this->authorize('create', $block);
            $this->authorize('update', $block);
            $input       = $this->validator->validate('create');
            $translation = $this->repository->createTranslation($block, $input);
            return $this->respondWithSuccess($translation, new BlockTranslationTransformer);
        }
        return $this->respondNotFound();
    }
502156
public function setId($id = null)
    {
        if ($id !== null) {
            $id = preg_replace("/[^a-z0-9_\\\d]/i", '_', $id);

            $this->id = (string) $id;
        }
    }