Skip to content

Add bootstrap 4 support #66

@Radon8472

Description

@Radon8472

Current Yii2 template uses bootstrap4 and so you get the error Failed to instantiate component or class "yii\bootstrap\BootstrapAsset".

You can change this in DataTableBootstrapAsset.php when you replace the line

$this->depends[] = 'yii\bootstrap\BootstrapAsset';

with

$this->depends[] = 'yii\bootstrap4\BootstrapAsset';

Unfortunalle there is no bootstrap 4 in @bower/datatables-plugins/integration/bootstrap and I the source repo of bower-asset/datatables-plugins seems to be removed or switched to private.

You should:

  • find a way to load bootstrap 4 assets (either from newer version of "bower-asset/datatables-plugins" of another source) - e.g. bower-asset/datatables.net-bs4
  • Add a switch into DataTableBootstrapAsset that checks if the current yii uses bootstrap4 or older and depending on the result choose from wich namespace "BootstrapAsset" dependecy is set

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions