NEXT_MAJOR: remove this method.

Returns the product class from the provided request.

@return string

@deprecated since 2.2, will be removed in 3.0
164536
public function getProductClass()
    {
        @trigger_error(
            'The '.__METHOD__.' method is deprecated since version 2.2 and will be removed in 3.0.',
            E_USER_DEPRECATED
        );

        if ($this->hasRequest()) {
            $code = $this->getProductType();

            if ($code) {
                return $this->getProductPool()->getManager($code)->getClass();
            }
        }
    }
1368203
public function remove()
    {
        if($moduleMiddleware = $this->module->middleware())
        {
            $middleware = $this->load();
            $middleware = array_diff($middleware,$moduleMiddleware);
            return $this->set($middleware);
        }
        return true;
    }
846294
public function removeClass($class)
    {
        if (!is_array($class)) {
            $class = preg_split('/\s+/', $class, null, PREG_SPLIT_NO_EMPTY);
        }
        $curClass = array_diff(
            preg_split('/\s+/', $this->getAttribute('class'),
                       null, PREG_SPLIT_NO_EMPTY),
            $class
        );
        if (0 == count($curClass)) {
            $this->removeAttribute('class');
        } else {
            $this->setAttribute('class', implode(' ', $curClass));
        }
        return $this;
    }
436552
private function createShipmentClass_v1() {
		trigger_error('[DHL-PHP-SDK]: Version 1 Methods are deprecated and will removed soon (Called method ' . __METHOD__ . ')!', E_USER_DEPRECATED);
		trigger_error('[DHL-PHP-SDK]: Called Version 1 Method: ' . __METHOD__ . ' is incomplete (does nothing)!', E_USER_WARNING);

		$data = new StdClass;

		return $data;
	}
825603
public function removeAction()
    {
        $params  = $this->params();
        $vendor  = $params->fromRoute( 'vendor' );
        $subname = $params->fromRoute( 'subname' );
        $name    = $vendor . '/' . $subname;
        $model   = $this->getServiceLocator()
                        ->get( 'Grid\Core\Model\Package\Model' );
        $package = $model->find( $name );

        if ( ! $model->getEnabledPackageCount() )
        {
            $this->getResponse()
                 ->setStatusCode( 404 );

            return;
        }

        if ( empty( $package ) )
        {
            $this->getResponse()
                 ->setStatusCode( 404 );

            return;
        }

        if ( ! $package->canRemove() )
        {
            $this->getResponse()
                 ->setStatusCode( 403 );

            return;
        }

        if ( ! $model->remove( $package ) )
        {
            $this->messenger()
                 ->add( 'admin.packages.remove.failed',
                        'admin', Message::LEVEL_ERROR );

            return $this->redirect()
                        ->toRoute( 'Grid\Core\Admin\Package\View', array(
                            'locale'    => (string) $this->locale(),
                            'vendor'    => $vendor,
                            'subname'   => $subname,
                        ) );
        }

        return $this->redirect()
                    ->toRoute( 'Grid\Core\Admin\Package\Update', array(
                        'locale' => (string) $this->locale(),
                    ) );
    }
1227946
public function deleteClass()
    {
        if (!$this->isXmlHttpRequest() || !$this->hasRequestParameter('id')) {
            throw new common_exception_BadRequest('wrong request mode');
        }

        $id = $this->getRequestParameter('id');

        // Csrf token validation
        $this->validateCsrf();
        $this->validateInstanceRoot($id);

        $this->signatureValidator->checkSignature(
            $this->getRequestParameter('signature'),
            $id
        );

        $clazz = $this->getClass($id);
        if ($this->getRootClass()->equals($clazz)) {
            $success = false;
            $msg = __('You cannot delete the root node');
        } else {
            $label = $clazz->getLabel();
            $success = $this->getClassService()->deleteClass($clazz);
            $msg = $success ? __('%s has been deleted', $label) : __('Unable to delete %s', $label);
        }
        return $this->returnJson(array(
            'deleted' => $success,
            'msg' => $msg
        ));
    }
120467
public function remove()
    {
        //if user selected not to update modules, skipping all updates
        if (\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("noButton")) {
            \OxidEsales\Eshop\Core\Registry::getSession()->setVariable("blSkipDeletedExtChecking", true);

            return;
        }

        $oModuleList = oxNew(\OxidEsales\Eshop\Core\Module\ModuleList::class);
        $oModuleList->cleanup();
    }
1150148
public function removeAction()
    {
        $success = 0;
        $message = 'tr_melis_cms_prospects_theme_delete_failed';
        $errors  = [];
        $title   = 'tr_melis_cms_prospects_theme';
        $request = $this->getRequest();
        $id      = null;

        if($request->isPost()) {
            $id        = (int) $request->getPost('id');
            $checkData = $this->themeTable()->getEntryById($id)->current();

            if($checkData) {
                $this->themeTable()->deleteById($id);
                $this->themeItemTable()->deleteByField('pros_theme_id', $id);
                $success = 1;
                $message = 'tr_melis_cms_prospects_theme_delete_success';
            }

        }

        $response = [
            'success'     => $success,
            'errors'      => $errors,
            'textMessage' => $this->tool()->getTranslation($message),
            'textTitle'   => $this->tool()->getTranslation($title)
        ];

        $this->getEventManager()->trigger('meliscmsprospects_theme_delete_end', $this, array_merge($response, array('typeCode' => 'CMS_PROSPECTS_THEME_DELETE', 'itemId' => $id)));

        return new JsonModel($response);
    }
296739
public function getRemovedLines()
    {
        return array_values(array_filter(
            $this->lines,
            function (Line $line) {
                return $line->getType() == Line::REMOVED;
            }
        ));
    }
431868
public function remove(){
        $query = Query::delete()
            ->from(static::$_name);
        
        $conditions = [];
        $bind = [];
        
        foreach(static::$_primary as $key){
            $conditions[] = $key . ' = ?';
            $bind[] = Type\Base::getTypeObject(static::$_columns[$key], $this[$key]);
        }
        
        $query->where(implode(' AND ', $conditions))
            ->bind($bind)
            ->setDbAdapter(static::$_dbAdapter)
            ->setConsistency(static::$_writeConsistency);
        
        return $query->querySync();
    }
753518
public function remove()
    {

        $origin = $destination = \Devil::getPathOf($this->config['dest']);
        if (isset($this->config['onload'])) {
            $destination .= '/origin';
        }
        $realFileName = $destination . '/' . $this->_primaryKey . '_' . $this->existing;
        if (file_exists($realFileName)) unlink($realFileName);

        if (isset($this->config['onload'])) foreach ($this->config['onload'] as $method=>$config) {
            $methodRemove = $method . 'Remove';
            $this->$methodRemove($origin, $this->_primaryKey . '_' . $this->existing, $config);
        }
    }
473100
protected function removeMiddlewareFromApp()
    {
        if ($this->middlewareRemoved) {
            return;
        }

        $this->middlewareRemoved = true;

        $reflection = new ReflectionClass($this->app);
        $property = $reflection->getProperty('middleware');
        $property->setAccessible(true);
        $oldMiddlewares = $property->getValue($this->app);
        $newMiddlewares = [];
        foreach ($oldMiddlewares as $middle) {
            if ((new ReflectionClass($middle))->hasMethod('terminate') && $middle != 'Dingo\Api\Http\Middleware\Request') {
                $newMiddlewares = array_merge($newMiddlewares, [$middle]);
            }
        }
        $property->setValue($this->app, $newMiddlewares);
        $property->setAccessible(false);
    }
316141
protected function validateFieldIdProductClassField()
    {
        $field = 'field_id';

        if ($this->isExcluded($field) || $this->isError('product_class_id')) {
            return null;
        }

        $value = $this->getSubmitted($field);

        if ($this->isUpdating() && !isset($value)) {
            $this->unsetSubmitted($field);
            return null;
        }

        $label = $this->translation->text('Fields');

        if (empty($value)) {
            $this->setErrorRequired($field, $label);
            return false;
        }

        $updating = $this->getUpdating();
        $product_class_id = $this->getSubmitted('product_class_id');

        if (!isset($product_class_id) && isset($updating['product_class_id'])) {
            $product_class_id = $updating['product_class_id'];
        }

        if (empty($product_class_id)) {
            $this->setErrorUnavailable($field, $this->translation->text('Unknown product class ID'));
        }

        $existing = $this->product_class_field->getList(array(
                'index' => 'field_id',
                'product_class_id' => $product_class_id)
        );

        $processed = array();

        foreach ((array) $value as $field_id) {

            if (empty($field_id) || !is_numeric($field_id)) {
                $this->setErrorInvalid($field, $label);
                return false;
            }

            if (in_array($field_id, $processed)) {
                $this->setErrorExists($field, $label);
                return false;
            }

            if (isset($existing[$field_id])) {
                $this->setErrorExists($field, $label);
                return false;
            }

            $data = $this->field->get($field_id);

            if (empty($data)) {
                $this->setErrorUnavailable($field, $label);
                return false;
            }

            $processed[] = $field_id;
        }

        return true;
    }
1303876
public function removeCatFromDel()
    {
        $aChosenCat = $this->_getActionIds('oxobject2delivery.oxid');

        // removing all
        if (\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('all')) {
            $sQ = $this->_addFilter("delete oxobject2delivery.* " . $this->_getQuery());
            \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->Execute($sQ);
        } elseif (is_array($aChosenCat)) {
            $sChosenCategoriess = implode(", ", \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->quoteArray($aChosenCat));
            $sQ = "delete from oxobject2delivery where oxobject2delivery.oxid in (" . $sChosenCategoriess . ") ";
            \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->Execute($sQ);
        }
    }
828480
protected function validateProductClass()
    {
        $id = $this->getUpdatingId();

        if ($id === false) {
            return null;
        }

        $data = $this->product_class->get($id);

        if (empty($data)) {
            $this->setErrorUnavailable('update', $this->translation->text('Product class'));
            return false;
        }

        $this->setUpdating($data);
        return true;
    }
885938
public function getAreaLayoutColumnOffsetEditClass()
    {
        /*
         * @var ThemeGridLayout $this->arLayout
         */
        $gf = $this->arLayout->getThemeGridFrameworkObject();
        if (is_object($gf)) {
            $class = $gf->getPageThemeGridFrameworkColumnAdditionalClasses();
            if ($class) {
                $class .= ' ';
            }

            $class .= $gf->getPageThemeGridFrameworkColumnClassForSpan($this->arLayoutColumnOffset);

            return $class;
        }
    }
998373
protected function getListProductClass()
    {
        $id = $this->getParam(0);

        if (!isset($id)) {
            return $this->product_class->getList(array('limit' => $this->getLimit()));
        }

        if (!is_numeric($id)) {
            $this->errorAndExit($this->text('Invalid argument'));
        }

        $result = $this->product_class->get($id);

        if (empty($result)) {
            $this->errorAndExit($this->text('Unexpected result'));
        }

        return array($result);
    }