<?php
 namespace Extension;
 use TCMS\ModelExtension;
 class AdminCateModel extends ModelExtension {
 private $option = [];
 public function render($value, $option = null) {
 copy_option($this->option, $option);
 }
 public function onModelChanged(\TCMS\Model $model, $isInsert) {
 view()->removeCache('product-category');
 }
 public function onModelDeleted(\TCMS\Model $model, $id) {
 view()->removeCache('product-category');
 }
 }
