Returns the custom table's name for a module

@param string $module Module's name

@throws \InvalidArgumentException

@return string Returns the table name
172239
public function getModuleCustomTable($module)
    {
        $sugarBean = $this->getBean($module);
        $customTable = $sugarBean->get_custom_table_name();
        $data = $this->db->query("SHOW TABLES LIKE '$customTable'");
        if (empty($data)) {
            return '';
        }

        return $customTable;
    }
137095
public function getModuleVersion($module)
    {
        $config = $this->getModuleDefinition($module);
    
        if (isset($config['version'])) {
            return $config['version'];
        } else {
            return SoftwareVersion::DEFAULT_UNRESOLVED_VERSION;
        }
    }
1320949
protected function getExtendsClassName(string $module): string
    {
        $shortName = (new \ReflectionClass($module))->getShortName();
        $extendClassName = "Package{$shortName}";

        return $extendClassName;
    }
285584
private function findTableByName($tableName)
    {
        $tables = $this->getSchemaManager()->listTables();
        foreach ($tables as $table) {
            if ($table->getName() === $tableName) {
                return $table;
            }
        }

        throw new \InvalidArgumentException(\sprintf('Table with name "%s" does not exists.', $tableName));
    }
855634
protected function getTableName(): string
    {
        $prefix = 'cf_';
        $configuration = GeneralUtility::makeInstance(ConfigurationService::class);
        if ($configuration->isBool('renameTablesToOtherPrefix')) {
            $prefix = 'sfc_';
        }

        return $prefix . 'staticfilecache';
    }
1143174
public function removeModule($module)
    {
        if ($module instanceof ModuleInterface) {
            if (!in_array($module, $this->modules)) {
                throw new \InvalidArgumentException(
                    'This occurrence of '.get_class($module).' is not registered.'
                );
            }

            $this->modules = array_filter($this->modules, function ($instance) use ($module) {
                return $instance !== $module;
            });

            return $this;
        }

        /** @var string $className */
        $className = $module;

        if (!$this->hasModule($className)) {
            throw new \InvalidArgumentException(
                'The container doesn\'t contain a '.$className.' module'
            );
        }

        $this->modules[$className]->detachEvents();
        unset($this->modules[$className]);

        return $this;
    }
801684
public function get_module_type_name($plural = false) {
        $modnames = get_module_types_names($plural);
        if (isset($modnames[$this->modname])) {
            return $modnames[$this->modname];
        } else {
            return null;
        }
    }
1064864
public function setModule($module)
    {
        if (!is_string($module)) {
            throw new \InvalidArgumentException('The attribute module on the class Entity has to be string (' . gettype($module) . ('object' === gettype($module) ? ' ' . get_class($module) : '') . ' given).');
        }

        $this->module = $module;

        return $this;
    }
194096
public static function getModuleNames(Args $args, ModuleList $modules)
    {
        // Display all modules if "all" is set
        if ($args->isOptionSet('all')) {
            return $modules->getModuleNames();
        }

        $moduleNames = array();

        if ($args->isOptionSet('root')) {
            $moduleNames[] = $modules->getRootModuleName();
        }

        foreach ($args->getOption('module') as $moduleName) {
            $moduleNames[] = $moduleName;
        }

        return $moduleNames ?: $modules->getModuleNames();
    }
1280322
final public function getFunctionName(\Twig_Node_Module $module)
    {
        if (null === $this->functionNamingStrategy) {
            $this->functionNamingStrategy = new DefaultFunctionNamingStrategy();
        }

        return $this->functionNamingStrategy->getFunctionName($module);
    }
271590
public function getModulePath($module)
    {
        try {
            return $this->findOrFail($module)->getPath() . '/';
        } catch (ModuleNotFoundException $e) {
            return $this->getPath() . '/' . Str::studly($module) . '/';
        }
    }
1196627
public function getTable($module, $methodName)
    {
        $db = array();
        $config = $this->getServiceLocator()->get('MelisCoreConfig');
        $db = $config->getItem('diagnostic/'.$module.'/db/'.$this->getMethodName($methodName));
        return $db;
    }
1363451
public function isDefaultModule($module=null)
	{
	    $mname = '';
	    if (!$module) {
	        $mname = $this->getCurrentModule()->getName();
	    } else {
	        if (is_string($module)) {
	            $mname = $module;
	        } elseif ($module instanceof Module) {
	            $mname = $module->getName();
	        }
	    }
	    
	    return $mname == $this->getDefaultModule()->getName();
	}
1260139
private function determineTableName()
    {
        $annotations = $this->inspector->getClassAnnotations();
        $name = self::parseTableName($this->entity);
        if ($annotations->hasAnnotation('@table')) {
            $name = $annotations->getAnnotation('@table')->getValue();
        }
        return $name;
    }
1137453
public function getTableName() {
        if(empty($this->trueTableName)) {
            $tableName  = !empty($this->tablePrefix) ? $this->tablePrefix : '';
            if(!empty($this->tableName)) {
                $tableName .= $this->tableName;
            }else{
                $tableName .= parse_name($this->name);
            }
            $this->trueTableName    =   strtolower($tableName);
        }
        return (!empty($this->dbName)?$this->dbName.'.':'').$this->trueTableName;
    }
487497
protected function getModuleName(PackageInterface $package)
    {
        $extra = $package->getExtra();

        if (isset($extra['modulename'])) {
            $name = $extra['modulename'];
        } else {
            $name = strtr($package->getPrettyName(), array(
                '\\' => '.',
                '-' => '.',
                '_' => '.',
                ' ' => ''
            ));
        }

        return $name;
    }
1086026
protected function get_module_names() {
        if ($this->_modnames !== null) {
            return $this->_modnames;
        }
        $this->_modnames = [];
        foreach ($this->modules as $module) {
            $this->_modnames[$module->name] = $module->formattedname;
        }
        return $this->_modnames;
    }