# 상속처리가 되지 않은 케이스

### 1.   class와 method 미상속

{% hint style="success" %}
**고도몰's 개발자 코멘트**

method의 경우 상속받은 형태로 구현이 불가한 상황이 있을 수 있습니다.\
때문에 가능한 해당 method 상속이 가능한 상황으로 구현하시는 것이 좋습니다.
{% endhint %}

#### ⛔️ As-Is

```php
namespace Component\Excel;

class ExcelRequest extends \Bundle\Component\Excel\ExcelRequest
{
    public function saveInfoExcelRequest($arrData)
    {
        # write your code
    }
}
```

#### ✅ To-be

```php
namespace Component\Excel;

class ExcelRequest extends \Bundle\Component\Excel\ExcelRequest
{
    public function saveInfoExcelRequest($arrData)
    {
        parent::saveInfoExcelRequest($arrData);
        
        # write your code
    }
}
```

### 2. `system`의 `controller` 커스터마이징 시 class 미상속

{% hint style="success" %}
**고도몰's 개발자 코멘트**

하기 예시의 경우 class와 method의 상속을 받지 않고 구현된 내용입니다.\
반드시 \Bundle\Controller\Admin\Goods\GoodsListController 를 사용해서 시스템의 GoodsListController를 상속받아야 하며,  method 내에서는 parent::index(); 를 사용해서 시스템의 index()를 상속받아야 합니다.
{% endhint %}

#### ⛔️ As-Is

```php
namespace Controller\Admin\Goods;

/**
 * 상품 리스트 페이지
 */
class GoodsListController
{
    # write your code
}
```

#### ✅ To-be

```php
namespace Controller\Admin\Goods;

/**
 * 상품 리스트 페이지
 */
class GoodsListController extends \Bundle\Controller\Admin\Goods\GoodsListController
{
    parent::index();
    
    # write your code
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://devcenter-help.nhn-commerce.com/guide/wrong-example/uninherited.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
