PHP Class Xpressengine\Seo\SeoHandler
### app binding : xe.seo 로 바인딩 되어 있음
XeSEO Facade 로 접근이 가능
### Usage
SEO 를 사용하기 위해선
SeoUsable 인터페이스를 적용하고자하는
대상 객체에 구현해야 함.
예를 들어 Document 라는 객체를 SEO 에 적용 시키고자 하면
다음과 같이 코드를 작성 해야함.
php
class Document implements SeoUsable
{
...
위와 같이 구현된 객체를 Presenter 를 통해 전달하게 되면
객체로부터 내용을 수집하여 meta tag 등 으로 노출하게 되어짐.
php
XePresenter::make('some.view', [$seoUsableObject, $var1, $var2, ...]);
* Not execution
간혹 어떤 상황에서 html 렌더링이 이루어지더라도 SEO 처리가 되지
않길 원하는 경우
XeSEO::notExec() 를 실행하면 SEO 관련 태그들이
적용되지 않음
Datei anzeigen
Open project: xpressengine/xpressengine
Class Usage Examples
Protected Properties
Public Methods
Method |
Description |
|
__construct ( array $importers, Setting $setting, Translator $translator ) |
Constructor |
|
addImporter ( AbstractImporter $importer ) : void |
Add Importer |
|
getSetting ( ) : Setting |
Returns Setting instance |
|
import ( array | Xpressengine\Seo\SeoUsable $items ) : void |
Import to html header |
|
notExec ( ) : void |
Set will not executed |
|
Protected Methods
Method |
Description |
|
extract ( array $items ) : null | Xpressengine\Seo\SeoUsable |
Extract item of seo usable |
|
makeTitle ( Xpressengine\Seo\SeoUsable $item = null ) : string |
Make title text |
|
resolveData ( Xpressengine\Seo\SeoUsable $item = null ) : array |
Data resolve |
|
Method Details
__construct()
public method
public __construct ( array $importers, Setting $setting, Translator $translator ) |
$importers |
array |
Importer instances |
$setting |
Setting |
Setting instances |
$translator |
Xpressengine\Translation\Translator |
Translator instances |
addImporter()
public method
public addImporter ( AbstractImporter $importer ) : void |
$importer |
Xpressengine\Seo\Importers\AbstractImporter |
Importer instance |
return |
void |
|
getSetting()
public method
public import ( array | Xpressengine\Seo\SeoUsable $items ) : void |
$items |
array | Xpressengine\Seo\SeoUsable |
view 에서 사용되어지는 모든 아이템 목록 |
return |
void |
|
makeTitle()
protected method
protected makeTitle ( Xpressengine\Seo\SeoUsable $item = null ) : string |
$item |
Xpressengine\Seo\SeoUsable |
item instance |
return |
string |
|
resolveData()
protected method
protected resolveData ( Xpressengine\Seo\SeoUsable $item = null ) : array |
$item |
Xpressengine\Seo\SeoUsable |
item instance |
return |
array |
|
Property Details
$executable protected_oe property
protected bool $executable |
return |
boolean |
|
$importers protected_oe property
protected AbstractImporter[],Xpressengine\Seo\Importers $importers |
return |
Xpressengine\Seo\Importers\AbstractImporter[] |
|
$isExecuted protected_oe property
protected bool $isExecuted |
return |
boolean |
|
$setting protected_oe property
protected Setting,Xpressengine\Seo $setting |
return |
Setting |
|
$translator protected_oe property
protected Translator,Xpressengine\Translation $translator |
return |
Xpressengine\Translation\Translator |
|