Return the first (and only) back-matter-type for a specific post

@param int $id Post ID

@return string
973091
public function getBackMatterType( $id ) {

		$terms = get_the_terms( $id, 'back-matter-type' );
		if ( $terms && ! is_wp_error( $terms ) ) {
			foreach ( $terms as $term ) {
				return $term->slug;
			}
		}

		return 'miscellaneous';
	}
791364
private function getDirectoryStructure($id)
    {
        // our base string is the last 4 digits, defaulting to 0, reversed
        $idString = strrev(
            substr(str_pad($id, 4, 0, STR_PAD_LEFT), -4)
        );

        return trim(
            chunk_split($idString, 1, '/'),
            '/'
        );
    }
962363
public function getColumn($id)
    {
        $returnValue = null;

        
		if(isset($this->columns[$id]) && $this->columns[$id] instanceof tao_helpers_grid_Column){
			$returnValue = $this->columns[$id];
		}
        

        return $returnValue;
    }
83981
public function getTypeOfId($id)
    {
        if (self::validateUserId($id, USER_ID_TYPE_COMMUNITY)) return USER_ID_TYPE_COMMUNITY;
        if (self::validateUserId($id, USER_ID_TYPE_STEAM)) return USER_ID_TYPE_STEAM;
        if (self::validateUserId($id, USER_ID_TYPE_VANITY)) return USER_ID_TYPE_VANITY;
        return FALSE;
    }
195685
public function rawPost($id) {
		$item = $this->dataService->byId('MicroPost', $id);
		if ($item->checkPerm('Write')) {
			return $item;
		}
	}
915027
public static function getById($id)
    {
        $result = null;
        $info = CldrData::getLanguageInfo($id);
        if (isset($info)) {
            $result = new Language($info);
        }

        return $result;
    }
837929
public function getField($id)
    {
        if (!isset($this->_fields[$id])) {
            $this->$id = ''; // @see SearchIndexDocument::__set()
        }
        return $this->_fields[$id];
    }
925952
private function getEnumById($id)
    {
        if (!$enum = SchemaStore::getEnumById($id, true)) {
            throw new \InvalidArgumentException(sprintf(
                'Cannot find an enum with id "%s"',
                $id
            ));
        }

        return $enum;
    }
1161755
private function _getObjectOrigin($id)
    {
        $select = Statement::get(
            'GET_OBJECT_ORIGIN_DATE',
            [
                '@collection' => $this->_name,
                '@id' => $this->_connector->quote($id)
            ]
        );
        $record = $this->_connector->query($select)->fetch();
        return ($record) ? $record['updated'] : null;
    }
915184
public function getContentTypeById($id)
    {
        return $this->om->getRepository($this->configurationManager->getEntityClass('content_type'))->find($id);
    }
685349
public function findById($id)
    {
        $post = get_post($id);
        if (!is_null($post)) {
            return self::getEntity($post);
        }
    }
1193017
public function getBreakType($id)
    {
        list($response, $statusCode, $httpHeader) = $this->getBreakTypeWithHttpInfo ($id);
        return $response; 
    }
357579
function getCategory($id){
        if(is_numeric($id))
            $model=self::where('id',$id)->select();
        else
            $model=self::where('slug',$id)->select();

        $model->where('model_type',$this->modelType);

        return $model->first();
    }
1254341
public function getFrontMatterType( $id ) {

		$terms = get_the_terms( $id, 'front-matter-type' );
		if ( $terms && ! is_wp_error( $terms ) ) {
			foreach ( $terms as $term ) {
				return $term->slug;
			}
		}

		return 'miscellaneous';
	}
1040799
public function exportById($id): string
    {
        $siteGroup = Craft::$app->sites->getGroupById((int) $id);

        return $this->export($siteGroup);
    }
349048
public function get_page_type_idstring($id) {
        foreach ($this->types as $pagetype) {
            if ((int)$pagetype->typeid === (int)$id) {
                return $pagetype->idstring;
            }
        }
        return 'unknown';
    }
1210775
public function getChapterType( $id ) {

		$terms = get_the_terms( $id, 'chapter-type' );
		if ( $terms && ! is_wp_error( $terms ) ) {
			foreach ( $terms as $term ) {
				if ( 'type-1' === $term->slug ) {
					return 'standard';
				} else {
					return $term->slug;
				}
			}
		}

		return 'standard';
	}