0

Can I access old-style piBase classes and methods from my Extbase extension?

For example, can I create an AccessMyoldExtensionService.php Service as a wrapper class and then pull the return values into my controller?

In my case, I need to return a list of old data records that can't be migrated to MVC style directly.

If so, what would the basic approach be?

Mateng
  • 3,742
  • 5
  • 37
  • 64
  • Which methods do you need ? Do "data records" mean database records ? – CalleKhan Aug 13 '13 at 11:24
  • I'd like to access functions of an individual extension, like `tx_myoldextension_pi1::listElements()` and/or the corresponding database records. – Mateng Aug 13 '13 at 21:33

1 Answers1

2

To get access on the db records of your old extension you can map the table into your new extension. Create a new model with matching properties of the needed table fields. Create the mapping in TS setup.txt like

persistence{
[...]
    classes{
        Tx_YourNewExtension_Domain_Model_Bar {
            mapping {
                tableName = tableNameOfOldExtension
            }
        }

    }
}

Create the related repository.

CalleKhan
  • 1,608
  • 1
  • 14
  • 16
  • Thanks, that's exactly what I actually ended up doing. Just forgot to update this question in time. Works nicely. – Mateng Aug 23 '13 at 11:21