Get post terms.

@param int $id
@param array $arguments

@return \Illuminate\Support\Collection
357564
public function terms($taxonomy = null, array $arguments = [])
    {
        if (isset($taxonomy)) {
            return $this->model->getTerms($this, $taxonomy, $arguments);
        }

        return $this->model->getAllTerms($this);
    }
1277552
protected static function retrieve($id = null, $params = [])
    {
        $url = static::classUrl();
        if ($id) {
            $url = $url . '/' . $id;
        }
        list($response) = static::staticRequest('get', $url, $params);
        return $response;
    }
37415
private static function getArguments(array $arguments = [])
    {
        $args = [];

        foreach ($arguments as $argument) {
            $args[] = $argument instanceof self ? $argument->getMoney() : $argument;
        }

        return $args;
    }
270443
public function getEdit($id) {
    $vocabulary = $this->vocabulary->find($id);

    Session::put('vocabulary_id', $vocabulary->id);

    if (is_null($vocabulary)) {
      return Redirect::route($this->route_prefix . 'taxonomy.index');
    }

    $terms = $vocabulary->terms()->orderBy('parent', 'ASC')->orderBy('weight', 'ASC')->get();

    $ordered_terms = [];
    foreach ($terms as $term) {
      if (!$term->parent) {
        $ordered_terms[$term->id] = [
          'term' => $term,
          'children' => [],
        ];
      }
      else {
        $ordered_terms[$term->parent]['children'][] = $term;
      }
    }

    $terms = $ordered_terms;

    return View::make('taxonomy::vocabulary.edit', compact('vocabulary', 'terms'));
  }
916658
public function make($id, ...$args)
    {
        $this->bind($id, ...$args);

        return $this->resolve($id);
    }
199504
public function query(array $arguments = [])
    {
        $adaptees = get_terms(['taxonomy' => $this->getSlug()]);

        return $this->plugger
            ->setModel($this)
            ->setAdapter(Term::class)
            ->plugIn($adaptees)
            ->getConnected();
    }
1364503
protected function getCollection($id)
    {
        $collection = $this->collectionManager->find($id);

        if (null === $collection) {
            throw new NotFoundHttpException(sprintf('Collection (%d) not found', $id));
        }

        return $collection;
    }
1345168
public function getContacts($id = null, $parameters = array())
    {
        if (is_null($id)) {
            throw new InvalidArgumentException('No group id provided.');
        }

        $this->setResourceName($this->resourceName . '/' . $id . '/contacts');
        return $this->getList($parameters);
    }
126230
public function getList($id, $args = array(), $returnRaw = false)
    {
        $args['id'] = $id;

        return $this->getResult('getList', $args, false, $returnRaw);
    }
522074
protected function getApi($id, $name, array $arguments = [])
    {
        if (!isset($this->container)) {
            throw new \RuntimeException(\sprintf('$container is not attribute of class "%s"', __CLASS__));
        }

        if (!$this->container->has($id)) {
            throw new ApiNotFoundException($name);
        }

        $api = $this->container->get($id);

        if ($arguments) {
            return \call_user_func_array([$api, $name], $arguments);
        }

        return $api;
    }
1254931
public function get($id, $args = [])
    {
        $wpcli_args = buildCLIArgs(
            array(
                'field',
                'fields',
            ),
            $args
        );

        array_unshift($wpcli_args, $args['taxonomy'], $id, '--format=json');
        $term = $this->drivers->getDriver()->wpcli('term', 'get', $wpcli_args)['stdout'];
        $term = json_decode($term);

        if (! $term) {
            throw new UnexpectedValueException(sprintf('[W503] Could not find term with ID %d', $id));
        }

        return $term;
    }
375435
public function getEntities($id, array $params = array())
    {
        return $this->get($this->path.'/'.rawurlencode($id).'/entities', $params);
    }
462129
public static function query($args = null)
    {
        $args = is_array($args) ? $args : [];

        // Set the correct post type
        $args = array_merge($args, ['post_type' => static::getPostType()]);

        if (!isset($args['post_status'])) {
            $args['post_status'] = 'publish';
        }

        return static::posts($args);
    }
1318908
protected function _getMetadatas($id)
    {
        if (isset($this->_metadatasArray[$id])) {
            return $this->_metadatasArray[$id];
        } else {
            $metadatas = $this->_loadMetadatas($id);
            if (!$metadatas) {
                return false;
            }
            $this->_setMetadatas($id, $metadatas, false);
            return $metadatas;
        }
    }
80656
public function getItemById($id)
    {
        return new ListItem(
            $this->getContext(),
            new ResourcePathEntity($this->getContext(),$this->getResourcePath(),"items({$id})")
        );
    }
1270887
public function get($id, $args = [])
    {
        if (is_numeric($id) || ! isset($args['by'])) {
            $type = 'ID';
        } else {
            $type = $args['by'];
        }

        $user = get_user_by($type, $id);

        if (! $user) {
            throw new UnexpectedValueException(sprintf('[W616] Could not find user with ID %d', $id));
        }

        return $user;
    }
694280
public function getContentTags($id)
    {
        $items = array();
        $tags = Content::model()->findByPk($id)->getTags();
        foreach ($tags as $item)
            $items[] = array('label' => $item, 'url' => Yii::app()->createUrl('/search?q=' . $item));

        return $items;
    }