/** * Function to cut off related and table materials * * @param QueryInterface $query Base entity query for modification */ public function parentIdInjection(&$query) { // Cut off related and table materials $query->cond('parent_id', null)->order_by('Modyfied', 'DESC'); }