mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-26 20:18:52 +02:00
N°8771 - Add Symfony form component to iTop core
- WIP
This commit is contained in:
16
sources/Forms/Converter/OqlToClassName.php
Normal file
16
sources/Forms/Converter/OqlToClassName.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace Combodo\iTop\Forms\Converter;
|
||||
|
||||
class OqlToClassName extends AbstractConverter
|
||||
{
|
||||
|
||||
public function Convert(mixed $oData): ?string
|
||||
{
|
||||
if($oData === null)
|
||||
return null;
|
||||
// extract selected class
|
||||
preg_match('/SELECT\s+(\w+)/', $oData, $aMatches);
|
||||
return $aMatches[1] ?? null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user