|
|
|
복원
<div class="eArea xe_content xe_dr_hx"><h3 id="h1250735208005">pchart class 및 생성자 작성</h3></div><div class="eArea xe_content xe_dr_txt"><p>에디터 컴포넌트의 기본 class인 pchart.class.php파일에 EditorHandler를 상속받는 pchart class를 작성합니다.</p></div><div class="eArea xe_content xe_dr_txt"><p>class <span style="color: rgb(255, 0, 0); font-weight: bold;">pchart</span> extends <span style="background-color: rgb(225, 225, 225);"><span style="background-color: rgb(225, 225, 225);">EditorHandler</span></span> {<br>}<br></p></div><div class="eArea xe_content xe_dr_txt"><p>editorModel::getComponentObject()에서 아래와 같이 에디터 컴포넌트 객체를 생성하시는 부분을 참고하여 생성자 인수를 $editor_sequence와 $component_path를 받는 생성자 pchart를 작성하고 그 인수를 class member variable에 등록합니다.</p><p>XE_ROOT/modules/editor/editor.model.php:388 <br></p><p>388 $eval_str = sprintf('$oComponent = new %s("%s","%s");', $component, $editor_sequence, $class_path);<br>389 @eval($eval_str);<br><br></p></div><div class="eArea xe_content xe_dr_txt"><p>class pchart extends EditorHandler {<br><span style="background-color: rgb(225, 225, 225);"><span style="background-color: rgb(225, 225, 225);"> function <span style="font-weight: bold;">pchart</span>($editor_sequence, $component_path) {</span></span><br><span style="background-color: rgb(225, 225, 225);"><span style="background-color: rgb(225, 225, 225);"> $this->editor_sequence = $editor_sequence;</span></span><br><span style="background-color: rgb(225, 225, 225);"><span style="background-color: rgb(225, 225, 225);"> $this->component_path = $component_path;</span></span><br><span style="background-color: rgb(225, 225, 225);"><span style="background-color: rgb(225, 225, 225);"> }</span></span><br>}</p></div>
|
sol |
2009.08.20 11:26:56 |