SPSite class
このクラスは、主に PageContext
クラスで使用されます。 ページをホストする SharePoint サイト コレクション ("SPSite") のコンテキスト情報が提供されます。
注釈
このクラスのコンストラクターは、内部にマークされています。 サードパーティのコードは、コンストラクターを直接呼び出したり、SPSite
クラスを展開するサブクラスを作成したりすることはできません。
プロパティ
absolute |
この SPSite の絶対 URL を返します。 |
cdn |
アプリケーションで指定された cdn のプレフィックスを返します。指定されていない場合は空の文字列を返します。 |
classification | サイトの分類を返します。 |
correlation |
現在のサーバー リクエストへの相関 ID を返します。 |
group | このサイトに関連付けられている O365 グループに関するコンテキスト情報。 現在のサイトに関連付けられている O365Group がない場合、このプロパティは未定義になります。 |
id | サーバー上の SPSite を識別する GUID を返します。 |
is |
isNoScript が SPSite で有効化されている場合は true を返します。 |
recycle |
ごみ箱内のアイテムの量。 |
server |
この SPSite のサーバー相対 URL を返します。 |
server |
元のリクエストの serverRelativeUrl を返します。 |
site |
この SPSite で SitePages が有効化されている場合は true を返します。 |
プロパティの詳細
absoluteUrl
この SPSite の絶対 URL を返します。
readonly absoluteUrl: string;
プロパティ値
string
注釈
例: "https://example.com/sites/PubSite"
cdnPrefix
アプリケーションで指定された cdn のプレフィックスを返します。指定されていない場合は空の文字列を返します。
readonly cdnPrefix: string;
プロパティ値
string
classification
サイトの分類を返します。
readonly classification: string;
プロパティ値
string
correlationId
group
このサイトに関連付けられている O365 グループに関するコンテキスト情報。 現在のサイトに関連付けられている O365Group がない場合、このプロパティは未定義になります。
readonly group: O365GroupAssociation | undefined;
プロパティ値
@microsoft/sp-page-context!O365GroupAssociation:class | undefined
id
isNoScriptEnabled
isNoScript が SPSite で有効化されている場合は true を返します。
readonly isNoScriptEnabled: boolean;
プロパティ値
boolean
recycleBinItemCount
ごみ箱内のアイテムの量。
readonly recycleBinItemCount: number;
プロパティ値
number
serverRelativeUrl
この SPSite のサーバー相対 URL を返します。
readonly serverRelativeUrl: string;
プロパティ値
string
注釈
例: "/sites/PubSite"
serverRequestPath
元のリクエストの serverRelativeUrl を返します。
readonly serverRequestPath: string;
プロパティ値
string
注釈
例: "/teams/SPClientTest/SitePages/Home.aspx"
sitePagesEnabled
この SPSite で SitePages が有効化されている場合は true を返します。
readonly sitePagesEnabled: boolean;
プロパティ値
boolean